diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 91ffce6a..ef9beef9 100644 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -10,7 +10,7 @@ mkdir samples npm install npm install -g ts-node npm link -npm link firehydrant-typescript-sdk +npm link firehydrant TS_CONFIG_CONTENT=$(cat <", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - updateAiPreferences: - speakeasy-default-update-ai-preferences: + list_entitlements: + speakeasy-default-list-entitlements: responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - voteOnIncidentSummary: - speakeasy-default-vote-on-incident-summary: - parameters: - path: - incident_id: "" - generated_summary_id: "" - requestBody: - application/json: {"direction": "down"} + ping_noauth: + speakeasy-default-ping-noauth: responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {} - getBootstrap: + "200": + application/json: {} + get_bootstrap: speakeasy-default-get-bootstrap: - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - listEntitlements: - speakeasy-default-list-entitlements: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": + get_ai_preferences: + speakeasy-default-get-ai-preferences: + responses: + "200": application/json: {} - "500": - application/json: {"key": "", "key1": ""} - apiPingNoAuth: - speakeasy-default-api-ping-no-auth: + update_ai_preferences: + speakeasy-default-update-ai-preferences: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {} - getSavedSearch: - speakeasy-default-get-saved-search: - parameters: - path: - resource_type: "impact_analytics" - saved_search_id: "" + list_environments: + speakeasy-default-list-environments: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteSavedSearch: - speakeasy-default-delete-saved-search: + create_environment: + speakeasy-default-create-environment: + requestBody: + application/json: {"name": ""} + responses: + "201": + application/json: {} + get_environment: + speakeasy-default-get-environment: parameters: path: - resource_type: "scheduled_maintenances" - saved_search_id: "" + environment_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateSavedSearch: - speakeasy-default-update-saved-search: + "200": + application/json: {} + delete_environment: + speakeasy-default-delete-environment: parameters: path: - resource_type: "ticket_tasks" - saved_search_id: "" + environment_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - getIncidentAiSummaryVoteStatus: - speakeasy-default-get-incident-ai-summary-vote-status: + update_environment: + speakeasy-default-update-environment: parameters: path: - incident_id: "" - generated_summary_id: "" + environment_id: "" + requestBody: + application/json: {"name": ""} responses: - "400": + "200": application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - listIncidents: - speakeasy-default-list-incidents: + list_services: + speakeasy-default-list-services: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createIncident: - speakeasy-default-create-incident: + create_service: + speakeasy-default-create-service: requestBody: application/json: {"name": ""} responses: "201": application/json: {} "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getIncident: - speakeasy-default-get-incident: + application/json: {} + create_service_links: + speakeasy-default-create-service-links: + requestBody: + application/json: {"external_service_ids": "", "connection_id": "", "integration": "victorops"} + responses: + "201": + application/json: [{}, {}] + get_service: + speakeasy-default-get-service: parameters: path: - incident_id: "" + service_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - archiveIncident: - speakeasy-default-archive-incident: + delete_service: + speakeasy-default-delete-service: parameters: path: - incident_id: "" + service_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - updateIncident: - speakeasy-default-update-incident: + update_service: + speakeasy-default-update-service: parameters: path: - incident_id: "" + service_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - deleteIncidentAlert: - speakeasy-default-delete-incident-alert: + get_service_dependencies: + speakeasy-default-get-service-dependencies: parameters: path: - incident_alert_id: "" - incident_id: "" + service_id: "" + query: {} responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": + "200": application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - setIncidentAlertAsPrimary: - speakeasy-default-set-incident-alert-as-primary: + list_service_available_upstream_dependencies: + speakeasy-default-list-service-available-upstream-dependencies: parameters: path: - incident_alert_id: "" - incident_id: "" - requestBody: - application/json: {"primary": true} + service_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {} - listIncidentAttachments: - speakeasy-default-list-incident-attachments: + list_service_available_downstream_dependencies: + speakeasy-default-list-service-available-downstream-dependencies: parameters: path: - incident_id: "" - query: {} + service_id: "" responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": + "200": application/json: {} - createIncidentAttachment: - speakeasy-default-create-incident-attachment: + delete_service_link: + speakeasy-default-delete-service-link: parameters: path: - incident_id: "" + service_id: "" + remote_id: "" + create_service_checklist_response: + speakeasy-default-create-service-checklist-response: + parameters: + path: + service_id: "" + checklist_id: "" + requestBody: + application/json: {"check_id": "", "status": true} + create_service_dependency: + speakeasy-default-create-service-dependency: requestBody: - multipart/form-data: {"file": {}} + application/json: {"service_id": "", "connected_service_id": ""} responses: "201": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getIncidentChannel: - speakeasy-default-get-incident-channel: + get_service_dependency: + speakeasy-default-get-service-dependency: parameters: path: - incident_id: "" + service_dependency_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - closeIncident: - speakeasy-default-close-incident: + delete_service_dependency: + speakeasy-default-delete-service-dependency: parameters: path: - incident_id: "" + service_dependency_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - listIncidentEvents: - speakeasy-default-list-incident-events: + update_service_dependency: + speakeasy-default-update-service-dependency: parameters: path: - incident_id: "" - query: {} + service_dependency_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - getIncidentEvent: - speakeasy-default-get-incident-event: - parameters: - path: - incident_id: "" - event_id: "" + list_functionalities: + speakeasy-default-list-functionalities: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {} - deleteIncidentEvent: - speakeasy-default-delete-incident-event: + create_functionality: + speakeasy-default-create-functionality: + requestBody: + application/json: {"name": ""} + responses: + "201": + application/json: {} + get_functionality: + speakeasy-default-get-functionality: parameters: path: - incident_id: "" - event_id: "" + functionality_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateIncidentEvent: - speakeasy-default-update-incident-event: + delete_functionality: + speakeasy-default-delete-functionality: parameters: path: - incident_id: "" - event_id: "" + functionality_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - updateIncidentEventVotes: - speakeasy-default-update-incident-event-votes: + update_functionality: + speakeasy-default-update-functionality: parameters: path: - incident_id: "" - event_id: "" + functionality_id: "" requestBody: - application/json: {"direction": "up"} + application/json: {"remove_remaining_services": false} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getIncidentEventVoteStatus: - speakeasy-default-get-incident-event-vote-status: + list_functionality_services: + speakeasy-default-list-functionality-services: parameters: path: - incident_id: "" - event_id: "" + functionality_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - createIncidentGenericChatMessage: - speakeasy-default-create-incident-generic-chat-message: + list_user_owned_services: + speakeasy-default-list-user-owned-services: parameters: path: - incident_id: "" - requestBody: - application/json: {"body": ""} + id: "" + query: {} responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - deleteIncidentChatMessage: - speakeasy-default-delete-incident-chat-message: - parameters: - path: - message_id: "" - incident_id: "" + "200": + application/json: [{}, {}, {}] + list_infrastructures: + speakeasy-default-list-infrastructures: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - updateIncidentChatMessage: - speakeasy-default-update-incident-chat-message: + refresh_catalog: + speakeasy-default-refresh-catalog: parameters: path: - message_id: "" - incident_id: "" + catalog_id: "" + ingest_catalog_data: + speakeasy-default-ingest-catalog-data: + parameters: + path: + catalog_id: "" requestBody: - application/json: {"body": ""} + application/json: {"encoding": "application/x-yaml", "data": ""} responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": + "201": application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - updateIncidentImpacts: - speakeasy-default-update-incident-impacts: - parameters: - path: - incident_id: "" + list_teams: + speakeasy-default-list-teams: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {} - "500": + create_team: + speakeasy-default-create-team: + requestBody: + application/json: {"name": ""} + responses: + "201": application/json: {} - partialUpdateIncidentImpacts: - speakeasy-default-partial-update-incident-impacts: + get_team: + speakeasy-default-get-team: parameters: path: - incident_id: "" + team_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listIncidentImpact: - speakeasy-default-list-incident-impact: + delete_team: + speakeasy-default-delete-team: parameters: path: - incident_id: "" - type: "environments" + team_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - createIncidentImpact: - speakeasy-default-create-incident-impact: + update_team: + speakeasy-default-update-team: parameters: path: - incident_id: "" - type: "customers" + team_id: "" requestBody: - application/json: {"id": ""} + application/json: {} responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": + "200": application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "413": - application/json: {"key": "", "key1": ""} - "429": + list_schedules: + speakeasy-default-list-schedules: + responses: + "200": application/json: {} - "500": - application/json: {"key": ""} - deleteIncidentImpact: - speakeasy-default-delete-incident-impact: - parameters: - path: - incident_id: "" - type: "environments" - id: "" - responses: - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "413": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listIncidentLinks: - speakeasy-default-list-incident-links: + list_team_escalation_policies: + speakeasy-default-list-team-escalation-policies: parameters: path: - incident_id: "" + team_id: "" query: {} - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {} - createIncidentLink: - speakeasy-default-create-incident-link: + create_team_escalation_policy: + speakeasy-default-create-team-escalation-policy: parameters: path: - incident_id: "" + team_id: "" requestBody: - application/json: {"href": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - updateIncidentLink: - speakeasy-default-update-incident-link: - parameters: - path: - link_id: "" - incident_id: "" - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - deleteIncidentLink: - speakeasy-default-delete-incident-link: - parameters: - path: - link_id: "" - incident_id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listIncidentMilestones: - speakeasy-default-list-incident-milestones: - parameters: - path: - incident_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - updateIncidentMilestonesBulk: - speakeasy-default-update-incident-milestones-bulk: + application/json: {"name": "", "repetitions": 0, "default": false, "steps": [{"targets": [], "timeout": ""}, {"targets": [{"type": "Webhook", "id": ""}, {"type": "OnCallSchedule", "id": ""}], "timeout": ""}, {"targets": [{"type": "SlackChannel", "id": ""}, {"type": "EntireTeam", "id": ""}], "timeout": ""}]} + get_team_escalation_policy: + speakeasy-default-get-team-escalation-policy: parameters: path: - incident_id: "" - requestBody: - application/json: {"milestones": [{"type": "", "occurred_at": "2022-04-23T20:54:26.363Z"}]} - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - createIncidentNote: - speakeasy-default-create-incident-note: + team_id: "" + id: "" + delete_team_escalation_policy: + speakeasy-default-delete-team-escalation-policy: parameters: path: - incident_id: "" - requestBody: - application/json: {"body": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateIncidentNote: - speakeasy-default-update-incident-note: + team_id: "" + id: "" + update_team_escalation_policy: + speakeasy-default-update-team-escalation-policy: parameters: path: - note_id: "" - incident_id: "" + team_id: "" + id: "" requestBody: - application/json: {"body": ""} - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listIncidentRelatedChanges: - speakeasy-default-list-incident-related-changes: + application/json: {"repetitions": 0, "default": false} + list_team_on_call_schedules: + speakeasy-default-list-team-on-call-schedules: parameters: path: - incident_id: "" + team_id: "" query: {} - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {} - createIncidentRelatedChange: - speakeasy-default-create-incident-related-change: + create_team_on_call_schedule: + speakeasy-default-create-team-on-call-schedule: parameters: path: - incident_id: "" + team_id: "" requestBody: - application/json: {"change_event_id": "", "type": "dismissed"} - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "413": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateIncidentRelatedChangeEvent: - speakeasy-default-update-incident-related-change-event: - parameters: - path: - related_change_event_id: "" - incident_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "413": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getIncidentRelationships: - speakeasy-default-get-incident-relationships: - parameters: - path: - incident_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - resolveIncident: - speakeasy-default-resolve-incident: + application/json: {"name": "", "time_zone": "Antarctica/DumontDUrville", "strategy": {"type": "custom"}} + get_team_on_call_schedule: + speakeasy-default-get-team-on-call-schedule: parameters: path: - incident_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listIncidentRoleAssignments: - speakeasy-default-list-incident-role-assignments: + team_id: "" + schedule_id: "" + delete_team_on_call_schedule: + speakeasy-default-delete-team-on-call-schedule: parameters: path: - incident_id: "" - query: {} - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createIncidentRoleAssignment: - speakeasy-default-create-incident-role-assignment: + team_id: "" + schedule_id: "" + update_team_on_call_schedule: + speakeasy-default-update-team-on-call-schedule: parameters: path: - incident_id: "" + team_id: "" + schedule_id: "" requestBody: - application/json: {"user_id": "", "incident_role_id": ""} - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteIncidentRoleAssignment: - speakeasy-default-delete-incident-role-assignment: + application/json: {} + create_on_call_shift: + speakeasy-default-create-on-call-shift: parameters: path: - incident_id: "" - role_assignment_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - getSimilarIncidents: - speakeasy-default-get-similar-incidents: + team_id: "" + schedule_id: "" + requestBody: + application/json: {"start_time": "", "end_time": ""} + get_on_call_shift: + speakeasy-default-get-on-call-shift: parameters: path: - incident_id: "" - query: {} - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listIncidentStatusPages: - speakeasy-default-list-incident-status-pages: + id: "" + team_id: "" + schedule_id: "" + delete_on_call_shift: + speakeasy-default-delete-on-call-shift: parameters: path: - incident_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - createIncidentStatusPage: - speakeasy-default-create-incident-status-page: + id: "" + team_id: "" + schedule_id: "" + update_on_call_shift: + speakeasy-default-update-on-call-shift: parameters: path: - incident_id: "" + id: "" + team_id: "" + schedule_id: "" requestBody: - application/json: {"integration_slug": "", "integration_id": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {} - createIncidentTaskList: - speakeasy-default-create-incident-task-list: + application/json: {} + list_team_signal_rules: + speakeasy-default-list-team-signal-rules: parameters: path: - incident_id: "" - requestBody: - application/json: {"task_list_id": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - createIncidentTeamAssignment: - speakeasy-default-create-incident-team-assignment: + team_id: "" + query: {} + create_team_signal_rule: + speakeasy-default-create-team-signal-rule: parameters: path: - incident_id: "" + team_id: "" requestBody: - application/json: {"team_id": ""} - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - deleteIncidentTeamAssignment: - speakeasy-default-delete-incident-team-assignment: - parameters: - path: - incident_id: "" - team_assignment_id: "" - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getIncidentTranscript: - speakeasy-default-get-incident-transcript: + application/json: {"name": "", "expression": "", "target_type": "OnCallSchedule", "target_id": ""} + get_team_signal_rule: + speakeasy-default-get-team-signal-rule: parameters: path: - incident_id: "" - query: {} - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteIncidentTranscript: - speakeasy-default-delete-incident-transcript: + team_id: "" + id: "" + delete_team_signal_rule: + speakeasy-default-delete-team-signal-rule: parameters: path: - transcript_id: "" - incident_id: "" - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {} - unarchiveIncident: - speakeasy-default-unarchive-incident: + team_id: "" + id: "" + update_team_signal_rule: + speakeasy-default-update-team-signal-rule: parameters: path: - incident_id: "" - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {} - getIncidentUserRole: - speakeasy-default-get-incident-user-role: - parameters: - path: - incident_id: "" - user_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listAlerts: - speakeasy-default-list-alerts: - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - getAlert: - speakeasy-default-get-alert: - parameters: - path: - alert_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listIncidentAlerts: - speakeasy-default-list-incident-alerts: - parameters: - path: - incident_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - createIncidentAlerts: - speakeasy-default-create-incident-alerts: - parameters: - path: - incident_id: "" - requestBody: - application/json: [""] - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listAlertProcessingLogs: - speakeasy-default-list-alert-processing-logs: - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - createServiceDependency: - speakeasy-default-create-service-dependency: - requestBody: - application/json: {"service_id": "", "connected_service_id": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - getServiceDependency: - speakeasy-default-get-service-dependency: - parameters: - path: - service_dependency_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteServiceDependency: - speakeasy-default-delete-service-dependency: - parameters: - path: - service_dependency_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - updateServiceDependency: - speakeasy-default-update-service-dependency: - parameters: - path: - service_dependency_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listServices: - speakeasy-default-list-services: - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createService: - speakeasy-default-create-service: - requestBody: - application/json: {"name": ""} - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "413": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createServiceLinks: - speakeasy-default-create-service-links: - requestBody: - application/json: {"external_service_ids": "", "connection_id": "", "integration": "victorops"} - responses: - "201": - application/json: [{}] - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - getService: - speakeasy-default-get-service: - parameters: - path: - service_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteService: - speakeasy-default-delete-service: - parameters: - path: - service_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateService: - speakeasy-default-update-service: - parameters: - path: - service_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - listServiceAvailableDownstreamDependencies: - speakeasy-default-list-service-available-downstream-dependencies: - parameters: - path: - service_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listServiceAvailableUpstreamDependencies: - speakeasy-default-list-service-available-upstream-dependencies: - parameters: - path: - service_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {} - createServiceChecklistResponse: - speakeasy-default-create-service-checklist-response: - parameters: - path: - service_id: "" - checklist_id: "" - requestBody: - application/json: {"check_id": "", "status": false} - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - getServiceDependencies: - speakeasy-default-get-service-dependencies: - parameters: - path: - service_id: "" - query: {} - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - deleteServiceLink: - speakeasy-default-delete-service-link: - parameters: - path: - service_id: "" - remote_id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listUserServices: - speakeasy-default-list-user-services: - parameters: - path: - id: "" - query: {} - responses: - "200": - application/json: [{}, {}, {}] - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - ingestCatalogData: - speakeasy-default-ingest-catalog-data: - parameters: - path: - catalog_id: "" - requestBody: - application/json: {"encoding": "application/json", "data": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - refreshCatalog: - speakeasy-default-refresh-catalog: - parameters: - path: - catalog_id: "" - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {} - listChangeTypes: - speakeasy-default-list-change-types: - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {} - listChanges: - speakeasy-default-list-changes: - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createChange: - speakeasy-default-create-change: - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "413": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listChangeEvents: - speakeasy-default-list-change-events: - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - createChangeEvent: - speakeasy-default-create-change-event: - requestBody: - application/json: {"summary": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getChangeEvent: - speakeasy-default-get-change-event: - parameters: - path: - change_event_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {} - deleteChangeEvent: - speakeasy-default-delete-change-event: - parameters: - path: - change_event_id: "" - responses: - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateChangeEvent: - speakeasy-default-update-change-event: - parameters: - path: - change_event_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - deleteChange: - speakeasy-default-delete-change: - parameters: - path: - change_id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateChange: - speakeasy-default-update-change: - parameters: - path: - change_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listChangeIdentities: - speakeasy-default-list-change-identities: - parameters: - path: - change_id: "" - query: {} - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {} - createChangeIdentity: - speakeasy-default-create-change-identity: - parameters: - path: - change_id: "" - requestBody: - application/json: {"type": "", "value": ""} - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "413": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteChangeIdentity: - speakeasy-default-delete-change-identity: - parameters: - path: - identity_id: "" - change_id: "" - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "413": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - updateChangeIdentity: - speakeasy-default-update-change-identity: - parameters: - path: - identity_id: "" - change_id: "" - requestBody: - application/json: {"type": "", "value": ""} - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "413": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getScheduledMaintenance: - speakeasy-default-get-scheduled-maintenance: - parameters: - path: - scheduled_maintenance_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateScheduledMaintenance: - speakeasy-default-update-scheduled-maintenance: - parameters: - path: - scheduled_maintenance_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listChecklistTemplates: - speakeasy-default-list-checklist-templates: - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - createChecklistTemplate: - speakeasy-default-create-checklist-template: - requestBody: - application/json: {"name": "", "checks": []} - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "413": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {} - deleteChecklistTemplate: - speakeasy-default-delete-checklist-template: - parameters: - path: - id: "" - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - updateChecklistTemplate: - speakeasy-default-update-checklist-template: + team_id: "" + id: "" + requestBody: + application/json: {} + list_signals_event_sources: {} + list_signals_email_targets: {} + create_signals_email_target: + speakeasy-default-create-signals-email-target: + requestBody: + application/json: {"name": ""} + get_signals_email_target: + speakeasy-default-get-signals-email-target: parameters: path: id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - listIncidentTasks: - speakeasy-default-list-incident-tasks: + delete_signals_email_target: + speakeasy-default-delete-signals-email-target: parameters: path: - incident_id: "" - query: {} - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - createIncidentTask: - speakeasy-default-create-incident-task: + id: "" + update_signals_email_target: + speakeasy-default-update-signals-email-target: parameters: path: - incident_id: "" + id: "" requestBody: - application/json: {"title": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getIncidentTask: - speakeasy-default-get-incident-task: + application/json: {} + list_signals_webhook_targets: {} + create_signals_webhook_target: + speakeasy-default-create-signals-webhook-target: + requestBody: + application/json: {"name": "", "url": "https://our-alligator.net/"} + get_signals_webhook_target: + speakeasy-default-get-signals-webhook-target: parameters: path: - task_id: "" - incident_id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteIncidentTask: - speakeasy-default-delete-incident-task: + id: "" + delete_signals_webhook_target: + speakeasy-default-delete-signals-webhook-target: parameters: path: - task_id: "" - incident_id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateIncidentTask: - speakeasy-default-update-incident-task: + id: "" + update_signals_webhook_target: + speakeasy-default-update-signals-webhook-target: parameters: path: - task_id: "" - incident_id: "" + id: "" + requestBody: + application/json: {} + list_signals_transposers: + speakeasy-default-list-signals-transposers: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - convertIncidentTaskToFollowup: - speakeasy-default-convert-incident-task-to-followup: - parameters: - path: - task_id: "" - incident_id: "" - responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listTaskLists: - speakeasy-default-list-task-lists: + get_signals_ingest_url: + speakeasy-default-get-signals-ingest-url: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createTaskList: - speakeasy-default-create-task-list: + debug_signals_expression: + speakeasy-default-debug-signals-expression: requestBody: - application/json: {"name": "", "task_list_items": [{"summary": ""}, {"summary": ""}]} + application/json: {"expression": "", "signals": [{}]} + list_organization_on_call_schedules: {} + list_changes: {} + create_change: + speakeasy-default-create-change: + requestBody: + application/json: {} responses: "201": application/json: {} "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getTaskList: - speakeasy-default-get-task-list: + application/json: {} + delete_change: + speakeasy-default-delete-change: parameters: path: - task_list_id: "" - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateTaskList: - speakeasy-default-update-task-list: + change_id: "" + update_change: + speakeasy-default-update-change: parameters: path: - task_list_id: "" + change_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - deleteTaskList: - speakeasy-default-delete-task-list: + list_change_identities: + speakeasy-default-list-change-identities: parameters: path: - task_list_id: "" + change_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getChecklistTemplate: - speakeasy-default-get-checklist-template: + create_change_identity: + speakeasy-default-create-change-identity: parameters: path: - id: "" + change_id: "" + requestBody: + application/json: {"type": "", "value": ""} responses: - "200": + "201": application/json: {} "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listConversationComments: - speakeasy-default-list-conversation-comments: + application/json: {} + delete_change_identity: + speakeasy-default-delete-change-identity: parameters: path: - conversation_id: "" - query: {} + identity_id: "" + change_id: "" responses: "400": application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - createConversationComment: - speakeasy-default-create-conversation-comment: + update_change_identity: + speakeasy-default-update-change-identity: parameters: path: - conversation_id: "" + identity_id: "" + change_id: "" requestBody: - application/json: {"body": ""} + application/json: {"type": "", "value": ""} responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": + "200": application/json: {} - getConversationComment: - speakeasy-default-get-conversation-comment: - parameters: - path: - comment_id: "" - conversation_id: "" - responses: "400": - application/json: {"key": ""} - "401": application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - deleteConversationComment: - speakeasy-default-delete-conversation-comment: - parameters: - path: - comment_id: "" - conversation_id: "" + list_change_events: + speakeasy-default-list-change-events: responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": + "200": application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateConversationComment: - speakeasy-default-update-conversation-comment: - parameters: - path: - comment_id: "" - conversation_id: "" + create_change_event: + speakeasy-default-create-change-event: + requestBody: + application/json: {"summary": ""} responses: - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": + "201": application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listConversationCommentReactions: - speakeasy-default-list-conversation-comment-reactions: + get_change_event: + speakeasy-default-get-change-event: parameters: path: - conversation_id: "" - comment_id: "" + change_event_id: "" responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": + "200": application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - createConversationCommentReaction: - speakeasy-default-create-conversation-comment-reaction: + delete_change_event: + speakeasy-default-delete-change-event: parameters: path: - conversation_id: "" - comment_id: "" - requestBody: - application/json: {"reaction": ""} - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - deleteConversationCommentReaction: - speakeasy-default-delete-conversation-comment-reaction: + change_event_id: "" + update_change_event: + speakeasy-default-update-change-event: parameters: path: - reaction_id: "" - conversation_id: "" - comment_id: "" - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getCurrentUser: - speakeasy-default-get-current-user: - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - listUsers: - speakeasy-default-list-users: + change_event_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - getUser: - speakeasy-default-get-user: - parameters: - path: - id: "" + list_change_types: + speakeasy-default-list-change-types: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listCustomFieldDefinitions: - speakeasy-default-list-custom-field-definitions: + list_incidents: + speakeasy-default-list-incidents: responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - createCustomFieldDefinition: - speakeasy-default-create-custom-field-definition: + create_incident: + speakeasy-default-create-incident: requestBody: - application/json: {"display_name": "Juvenal_Herman70", "field_type": "", "required": true} + application/json: {"name": ""} responses: "201": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {} - deleteCustomFieldDefinition: - speakeasy-default-delete-custom-field-definition: + get_incident_channel: + speakeasy-default-get-incident-channel: parameters: path: - field_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - updateCustomFieldDefinition: - speakeasy-default-update-custom-field-definition: + close_incident: + speakeasy-default-close-incident: parameters: path: - field_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - getCustomFieldSelectOptions: - speakeasy-default-get-custom-field-select-options: + resolve_incident: + speakeasy-default-resolve-incident: parameters: path: - field_id: "" - query: {} + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - getFormConfiguration: - speakeasy-default-get-form-configuration: + get_incident: + speakeasy-default-get-incident: parameters: path: - slug: "" - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - listIncidentRoles: - speakeasy-default-list-incident-roles: + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - createIncidentRole: - speakeasy-default-create-incident-role: - requestBody: - application/json: {"name": "", "summary": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - getIncidentRole: - speakeasy-default-get-incident-role: + delete_incident: + speakeasy-default-delete-incident: parameters: path: - incident_role_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteIncidentRole: - speakeasy-default-delete-incident-role: + update_incident: + speakeasy-default-update-incident: parameters: path: - incident_role_id: "" + incident_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - updateIncidentRole: - speakeasy-default-update-incident-role: + unarchive_incident: + speakeasy-default-unarchive-incident: parameters: path: - incident_role_id: "" + incident_id: "" responses: - "200": + "201": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {} - listIncidentTags: - speakeasy-default-list-incident-tags: + bulk_update_incident_milestones: + speakeasy-default-bulk-update-incident-milestones: + parameters: + path: + incident_id: "" + requestBody: + application/json: {"milestones": [{"type": "", "occurred_at": "2025-04-19T18:24:04.583Z"}, {"type": "", "occurred_at": "2024-09-22T18:15:43.263Z"}, {"type": "", "occurred_at": "2023-08-29T06:50:58.826Z"}]} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - validateIncidentTags: - speakeasy-default-validate-incident-tags: - requestBody: - application/json: ["", "", ""] + list_incident_milestones: + speakeasy-default-list-incident-milestones: + parameters: + path: + incident_id: "" responses: - "201": - application/json: {} - "400": + "200": application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listIncidentTypes: - speakeasy-default-list-incident-types: + list_incident_change_events: + speakeasy-default-list-incident-change-events: + parameters: + path: + incident_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createIncidentType: - speakeasy-default-create-incident-type: + create_incident_change_event: + speakeasy-default-create-incident-change-event: + parameters: + path: + incident_id: "" requestBody: - application/json: {"name": ""} + application/json: {"change_event_id": "", "type": "caused"} responses: "201": application/json: {} "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getIncidentType: - speakeasy-default-get-incident-type: + application/json: {} + update_incident_change_event: + speakeasy-default-update-incident-change-event: parameters: path: - id: "" + related_change_event_id: "" + incident_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": application/json: {} - "500": - application/json: {"key": "", "key1": ""} - archiveIncidentType: - speakeasy-default-archive-incident-type: + list_incident_status_pages: + speakeasy-default-list-incident-status-pages: parameters: path: - id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - updateIncidentType: - speakeasy-default-update-incident-type: + create_incident_status_page: + speakeasy-default-create-incident-status-page: parameters: path: - id: "" - requestBody: - application/json: {"name": ""} - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createLifecycleMilestone: - speakeasy-default-create-lifecycle-milestone: + incident_id: "" requestBody: - application/json: {"name": "", "description": "consequently scoff caring inhibit entice wherever", "phase_id": ""} + application/json: {"integration_slug": "", "integration_id": ""} responses: "201": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteLifecycleMilestone: - speakeasy-default-delete-lifecycle-milestone: + list_incident_links: + speakeasy-default-list-incident-links: parameters: path: - milestone_id: "" + incident_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateLifecycleMilestone: - speakeasy-default-update-lifecycle-milestone: + create_incident_link: + speakeasy-default-create-incident-link: parameters: path: - milestone_id: "" + incident_id: "" + requestBody: + application/json: {"href": ""} responses: - "200": + "201": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - listLifecyclePhases: - speakeasy-default-list-lifecycle-phases: + update_incident_link: + speakeasy-default-update-incident-link: + parameters: + path: + link_id: "" + incident_id: "" + requestBody: + application/json: {} + delete_incident_link: + speakeasy-default-delete-incident-link: + parameters: + path: + link_id: "" + incident_id: "" + update_transcript_attribution: + speakeasy-default-update-transcript-attribution: + parameters: + path: + incident_id: "" + requestBody: + application/json: {"to_user_id": ""} + list_transcript_entries: + speakeasy-default-list-transcript-entries: + parameters: + path: + incident_id: "" + query: + sort: "asc" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - listPriorities: - speakeasy-default-list-priorities: + delete_transcript_entry: + speakeasy-default-delete-transcript-entry: + parameters: + path: + transcript_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - createPriority: - speakeasy-default-create-priority: - requestBody: - application/json: {"slug": ""} - responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getPriority: - speakeasy-default-get-priority: + list_incident_conference_bridges: + speakeasy-default-list-incident-conference-bridges: parameters: path: - priority_slug: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - deletePriority: - speakeasy-default-delete-priority: + get_conference_bridge_translation: + speakeasy-default-get-conference-bridge-translation: parameters: path: - priority_slug: "" + id: "" + language_code: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - updatePriority: - speakeasy-default-update-priority: + list_similar_incidents: + speakeasy-default-list-similar-incidents: parameters: path: - priority_slug: "" + incident_id: "" + query: + threshold: 0.2 + limit: 5 responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - listSeverities: - speakeasy-default-list-severities: + list_incident_attachments: + speakeasy-default-list-incident-attachments: + parameters: + path: + incident_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - createSeverity: - speakeasy-default-create-severity: + create_incident_attachment: + speakeasy-default-create-incident-attachment: + parameters: + path: + incident_id: "" requestBody: - application/json: {"slug": ""} + multipart/form-data: {"file": {"": "x-file: example.file"}} responses: "201": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {} - getSeverity: - speakeasy-default-get-severity: + list_incident_events: + speakeasy-default-list-incident-events: parameters: path: - severity_slug: "" + incident_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - deleteSeverity: - speakeasy-default-delete-severity: + get_incident_event: + speakeasy-default-get-incident-event: parameters: path: - severity_slug: "" + incident_id: "" + event_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - updateSeverity: - speakeasy-default-update-severity: + delete_incident_event: + speakeasy-default-delete-incident-event: parameters: path: - severity_slug: "" + incident_id: "" + event_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getSeverityMatrix: - speakeasy-default-get-severity-matrix: + update_incident_event: + speakeasy-default-update-incident-event: + parameters: + path: + incident_id: "" + event_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - updateSeverityMatrix: - speakeasy-default-update-severity-matrix: + update_incident_impact_put: + speakeasy-default-update-incident-impact-put: + parameters: + path: + incident_id: "" requestBody: - application/json: {"data": []} + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - listSeverityMatrixConditions: - speakeasy-default-list-severity-matrix-conditions: + update_incident_impact_patch: + speakeasy-default-update-incident-impact-patch: + parameters: + path: + incident_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": + list_incident_impacts: + speakeasy-default-list-incident-impacts: + parameters: + path: + incident_id: "" + type: "environments" + responses: + "200": application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - createSeverityMatrixCondition: - speakeasy-default-create-severity-matrix-condition: + create_incident_impact: + speakeasy-default-create-incident-impact: + parameters: + path: + incident_id: "" + type: "functionalities" requestBody: - application/json: {"name": ""} + application/json: {"id": ""} responses: "201": application/json: {} "400": application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - getSeverityMatrixCondition: - speakeasy-default-get-severity-matrix-condition: + delete_incident_impact: + speakeasy-default-delete-incident-impact: parameters: path: - condition_id: "" + incident_id: "" + type: "services" + id: "" responses: "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteSeverityMatrixCondition: - speakeasy-default-delete-severity-matrix-condition: + application/json: {} + create_incident_note: + speakeasy-default-create-incident-note: parameters: path: - condition_id: "" + incident_id: "" + requestBody: + application/json: {"body": "", "visibility": "private_to_org"} + responses: + "201": + application/json: {} + update_incident_note: + speakeasy-default-update-incident-note: + parameters: + path: + note_id: "" + incident_id: "" + requestBody: + application/json: {"body": ""} responses: "200": application/json: {} - "400": + create_incident_chat_message: + speakeasy-default-create-incident-chat-message: + parameters: + path: + incident_id: "" + requestBody: + application/json: {"body": ""} + responses: + "201": application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateSeverityMatrixCondition: - speakeasy-default-update-severity-matrix-condition: + delete_incident_chat_message: + speakeasy-default-delete-incident-chat-message: parameters: path: - condition_id: "" + message_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - listSeverityMatrixImpacts: - speakeasy-default-list-severity-matrix-impacts: + update_incident_chat_message: + speakeasy-default-update-incident-chat-message: + parameters: + path: + message_id: "" + incident_id: "" + requestBody: + application/json: {"body": ""} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - createSeverityMatrixImpact: - speakeasy-default-create-severity-matrix-impact: + list_incident_role_assignments: + speakeasy-default-list-incident-role-assignments: + parameters: + path: + incident_id: "" + query: {} + responses: + "200": + application/json: {} + create_incident_role_assignment: + speakeasy-default-create-incident-role-assignment: + parameters: + path: + incident_id: "" requestBody: - application/json: {"affects_type": "", "affects_id": ""} + application/json: {"user_id": "", "incident_role_id": ""} responses: "201": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - deleteSeverityMatrixImpact: - speakeasy-default-delete-severity-matrix-impact: + delete_incident_role_assignment: + speakeasy-default-delete-incident-role-assignment: + parameters: + path: + incident_id: "" + role_assignment_id: "" + responses: + "200": + application/json: {} + create_incident_team_assignment: + speakeasy-default-create-incident-team-assignment: + parameters: + path: + incident_id: "" + requestBody: + application/json: {"team_id": ""} + delete_incident_team_assignment: + speakeasy-default-delete-incident-team-assignment: + parameters: + path: + incident_id: "" + team_assignment_id: "" + get_incident_user: + speakeasy-default-get-incident-user: parameters: path: - impact_id: "" + incident_id: "" + user_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - updateSeverityMatrixImpact: - speakeasy-default-update-severity-matrix-impact: + get_incident_relationships: + speakeasy-default-get-incident-relationships: parameters: path: - impact_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - listTicketingPriorities: - speakeasy-default-list-ticketing-priorities: + list_scheduled_maintenances: + speakeasy-default-list-scheduled-maintenances: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - createTicketingPriority: - speakeasy-default-create-ticketing-priority: + create_scheduled_maintenance: + speakeasy-default-create-scheduled-maintenance: requestBody: - application/json: {"name": ""} + application/json: {"name": "", "starts_at": "2024-11-04T00:39:53.690Z", "ends_at": "2023-11-08T19:38:38.616Z"} responses: "201": application/json: {} "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - listEnvironments: - speakeasy-default-list-environments: - responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createEnvironment: - speakeasy-default-create-environment: - requestBody: - application/json: {"name": ""} - responses: - "201": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getEnvironment: - speakeasy-default-get-environment: + get_scheduled_maintenance: + speakeasy-default-get-scheduled-maintenance: parameters: path: - environment_id: "" + scheduled_maintenance_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteEnvironment: - speakeasy-default-delete-environment: + delete_scheduled_maintenance: + speakeasy-default-delete-scheduled-maintenance: parameters: path: - environment_id: "" + scheduled_maintenance_id: "" + update_scheduled_maintenance: + speakeasy-default-update-scheduled-maintenance: + parameters: + path: + scheduled_maintenance_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateEnvironment: - speakeasy-default-update-environment: + get_ai_incident_summary_vote_status: + speakeasy-default-get-ai-incident-summary-vote-status: parameters: path: - environment_id: "" + incident_id: "" + generated_summary_id: "" + vote_ai_incident_summary: + speakeasy-default-vote-ai-incident-summary: + parameters: + path: + incident_id: "" + generated_summary_id: "" requestBody: - application/json: {"name": ""} + application/json: {"direction": "down"} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listFunctionalities: - speakeasy-default-list-functionalities: + list_incident_alerts: + speakeasy-default-list-incident-alerts: + parameters: + path: + incident_id: "" responses: "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createFunctionality: - speakeasy-default-create-functionality: + application/json: {"data": [{"alert": {"signal_rule": {"deduplication_expiry": "PT1H"}, "parent_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}], "child_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}]}}, {"alert": {"signal_rule": {"deduplication_expiry": "PT1H"}, "parent_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}], "child_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}]}}]} + create_incident_alert: + speakeasy-default-create-incident-alert: + parameters: + path: + incident_id: "" requestBody: - application/json: {"name": ""} - responses: - "201": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getFunctionality: - speakeasy-default-get-functionality: + application/json: ["", "", ""] + update_incident_alert_primary: + speakeasy-default-update-incident-alert-primary: parameters: path: - functionality_id: "" + incident_alert_id: "" + incident_id: "" + requestBody: + application/json: {"primary": false} responses: "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteFunctionality: - speakeasy-default-delete-functionality: + application/json: {"alert": {"signal_rule": {"deduplication_expiry": "PT1H"}, "parent_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}], "child_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}]}} + delete_incident_alert: + speakeasy-default-delete-incident-alert: parameters: path: - functionality_id: "" + incident_alert_id: "" + incident_id: "" + list_alerts: + speakeasy-default-list-alerts: responses: "200": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateFunctionality: - speakeasy-default-update-functionality: + application/json: {"data": [{"signal_rule": {"deduplication_expiry": "PT1H"}, "parent_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}], "child_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}]}]} + get_alert: + speakeasy-default-get-alert: parameters: path: - functionality_id: "" + alert_id: "" responses: "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - getFunctionalityServices: - speakeasy-default-get-functionality-services: - parameters: - path: - functionality_id: "" + application/json: {"signal_rule": {"deduplication_expiry": "PT1H"}, "parent_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}], "child_alerts": [{"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}, {"signal_rule": {"deduplication_expiry": "PT1H"}}]} + list_processing_log_entries: + speakeasy-default-list-processing-log-entries: responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteIncidentStatusPage: + "200": + application/json: {} + delete_incident_status_page: speakeasy-default-delete-incident-status-page: parameters: path: status_page_id: "" incident_id: "" + list_nunc_connections: + speakeasy-default-list-nunc-connections: responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - createStatusPageSubscription: - speakeasy-default-create-status-page-subscription: - requestBody: - application/json: {"email": "Christ52@gmail.com"} + "200": + application/json: {} + create_nunc_connection: + speakeasy-default-create-nunc-connection: + requestBody: + application/json: {"domain": "pertinent-ribbon.com", "conditions[nunc_condition]": ["", ""], "conditions[condition_id]": [""], "components[infrastructure_type]": ["", ""], "components[infrastructure_id]": ["", "", ""]} responses: "201": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteNuncSubscription: - speakeasy-default-delete-nunc-subscription: + list_email_subscribers: + speakeasy-default-list-email-subscribers: parameters: path: - unsubscribe_token: "" - responses: - "200": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - listStatusPages: - speakeasy-default-list-status-pages: + nunc_connection_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createStatusPage: - speakeasy-default-create-status-page: + create_email_subscriber: + speakeasy-default-create-email-subscriber: + parameters: + path: + nunc_connection_id: "" requestBody: - application/json: {"domain": "low-packaging.info", "conditions[nunc_condition]": [], "conditions[condition_id]": [], "components[infrastructure_type]": ["", "", ""], "components[infrastructure_id]": ["", "", ""]} + application/json: {"emails": ""} responses: "201": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": + delete_email_subscriber: + speakeasy-default-delete-email-subscriber: + parameters: + path: + nunc_connection_id: "" + query: + subscriber_ids: "" + responses: + "200": application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getStatusPage: - speakeasy-default-get-status-page: + get_nunc_connection: + speakeasy-default-get-nunc-connection: parameters: path: nunc_connection_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateStatusPage: - speakeasy-default-update-status-page: + update_nunc_connection: + speakeasy-default-update-nunc-connection: parameters: path: nunc_connection_id: "" requestBody: - application/json: {"conditions[nunc_condition]": ["", "", ""], "conditions[condition_id]": ["", ""], "components[infrastructure_type]": [""], "components[infrastructure_id]": ["", "", ""]} + application/json: {"conditions[nunc_condition]": [], "conditions[condition_id]": ["", "", ""], "components[infrastructure_type]": [""], "components[infrastructure_id]": [""]} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteStatusPage: - speakeasy-default-delete-status-page: + delete_nunc_connection: + speakeasy-default-delete-nunc-connection: parameters: path: nunc_connection_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - createStatusPageComponentGroup: - speakeasy-default-create-status-page-component-group: + delete_nunc_component_group: + speakeasy-default-delete-nunc-component-group: + parameters: + path: + nunc_connection_id: "" + group_id: "" + update_nunc_component_group: + speakeasy-default-update-nunc-component-group: + parameters: + path: + nunc_connection_id: "" + group_id: "" + create_nunc_component_group: + speakeasy-default-create-nunc-component-group: parameters: path: nunc_connection_id: "" @@ -5863,58 +4011,30 @@ examples: responses: "201": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteStatusPageComponentGroup: - speakeasy-default-delete-status-page-component-group: + delete_nunc_link: + speakeasy-default-delete-nunc-link: parameters: path: nunc_connection_id: "" - group_id: "" - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateStatusPageComponentGroup: - speakeasy-default-update-status-page-component-group: + link_id: "" + update_nunc_link: + speakeasy-default-update-nunc-link: + parameters: + path: + nunc_connection_id: "" + link_id: "" + requestBody: + application/json: {} + create_nunc_link: + speakeasy-default-create-nunc-link: parameters: path: nunc_connection_id: "" - group_id: "" responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": + "201": application/json: {} - updateStatusPageImage: - speakeasy-default-update-status-page-image: + update_nunc_image: + speakeasy-default-update-nunc-image: parameters: path: nunc_connection_id: "" @@ -5922,20 +4042,8 @@ examples: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteStatusPageImage: - speakeasy-default-delete-status-page-image: + delete_nunc_image: + speakeasy-default-delete-nunc-image: parameters: path: nunc_connection_id: "" @@ -5943,3008 +4051,1561 @@ examples: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createStatusPageLink: - speakeasy-default-create-status-page-link: + delete_nunc_subscription: + speakeasy-default-delete-nunc-subscription: parameters: path: - nunc_connection_id: "" + unsubscribe_token: "" responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": + "200": application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteStatusPageLink: - speakeasy-default-delete-status-page-link: - parameters: - path: - nunc_connection_id: "" - link_id: "" + create_nunc_subscription: + speakeasy-default-create-nunc-subscription: + requestBody: + application/json: {"email": "Arvilla_Funk@gmail.com"} responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": + "201": application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateStatusPageLink: - speakeasy-default-update-status-page-link: + create_incident_task_list: + speakeasy-default-create-incident-task-list: parameters: path: - nunc_connection_id: "" - link_id: "" + incident_id: "" + requestBody: + application/json: {"task_list_id": ""} responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": + "201": application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - listStatusPageSubscribers: - speakeasy-default-list-status-page-subscribers: + list_incident_tasks: + speakeasy-default-list-incident-tasks: parameters: path: - nunc_connection_id: "" + incident_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createStatusPageSubscribers: - speakeasy-default-create-status-page-subscribers: + create_incident_task: + speakeasy-default-create-incident-task: parameters: path: - nunc_connection_id: "" + incident_id: "" requestBody: - application/json: {"emails": ""} + application/json: {"title": ""} responses: "201": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteStatusPageSubscribers: - speakeasy-default-delete-status-page-subscribers: + get_incident_task: + speakeasy-default-get-incident-task: parameters: path: - nunc_connection_id: "" - query: - subscriber_ids: "" + task_id: "" + incident_id: "" + delete_incident_task: + speakeasy-default-delete-incident-task: + parameters: + path: + task_id: "" + incident_id: "" + update_incident_task: + speakeasy-default-update-incident-task: + parameters: + path: + task_id: "" + incident_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listInfrastructures: - speakeasy-default-list-infrastructures: + convert_incident_task: + speakeasy-default-convert-incident-task: + parameters: + path: + task_id: "" + incident_id: "" + requestBody: + application/json: {} responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": + "201": application/json: {} - listIntegrations: - speakeasy-default-list-integrations: + list_task_lists: + speakeasy-default-list-task-lists: responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": + "200": application/json: {} - "429": + create_task_list: + speakeasy-default-create-task-list: + requestBody: + application/json: {"name": "", "task_list_items": [{"summary": ""}, {"summary": ""}]} + responses: + "201": application/json: {} - "500": + get_task_list: + speakeasy-default-get-task-list: + parameters: + path: + task_list_id: "" + responses: + "200": application/json: {} - listAwsCloudtrailBatches: - speakeasy-default-list-aws-cloudtrail-batches: + delete_task_list: + speakeasy-default-delete-task-list: + parameters: + path: + task_list_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - updateAwsCloudTrailBatch: - speakeasy-default-update-aws-cloud-trail-batch: + update_task_list: + speakeasy-default-update-task-list: parameters: path: - id: "" + task_list_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": + list_checklist_templates: + speakeasy-default-list-checklist-templates: + responses: + "200": application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listIntegrationConnections: - speakeasy-default-list-integration-connections: + create_checklist_template: + speakeasy-default-create-checklist-template: + requestBody: + application/json: {"name": "", "checks": [{"name": ""}, {"name": ""}, {"name": ""}]} responses: + "201": + application/json: {} "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": application/json: {} - "500": - application/json: {"key": "", "key1": ""} - createIntegrationConnection: - speakeasy-default-create-integration-connection: + get_checklist_template: + speakeasy-default-get-checklist-template: parameters: path: - slug: "" + id: "" responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": + "200": application/json: {} - updateIntegrationConnection: - speakeasy-default-update-integration-connection: + delete_checklist_template: + speakeasy-default-delete-checklist-template: parameters: path: - slug: "" - connection_id: "" + id: "" responses: - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": + "200": application/json: {} - "500": - application/json: {"key": ""} - refreshIntegrationConnection: - speakeasy-default-refresh-integration-connection: + update_checklist_template: + speakeasy-default-update-checklist-template: parameters: path: - slug: "" - connection_id: "" + id: "" + requestBody: + application/json: {} responses: - "400": - application/json: {"key": ""} - "401": + "200": application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - updateIntegrationFieldMap: - speakeasy-default-update-integration-field-map: + get_vote_status: + speakeasy-default-get-vote-status: parameters: path: - field_map_id: "" + incident_id: "" + event_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getIntegrationFieldMapAvailableFields: - speakeasy-default-get-integration-field-map-available-fields: + update_vote: + speakeasy-default-update-vote: parameters: path: - field_map_id: "" + incident_id: "" + event_id: "" + requestBody: + application/json: {"direction": "dig"} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - listSlackEmojiActions: - speakeasy-default-list-slack-emoji-actions: + delete_comment_reaction: + speakeasy-default-delete-comment-reaction: parameters: path: - connection_id: "" - query: {} + reaction_id: "" + conversation_id: "" + comment_id: "" + list_comment_reactions: + speakeasy-default-list-comment-reactions: + parameters: + path: + conversation_id: "" + comment_id: "" + create_comment_reaction: + speakeasy-default-create-comment-reaction: + parameters: + path: + conversation_id: "" + comment_id: "" + requestBody: + application/json: {"reaction": ""} + get_comment: + speakeasy-default-get-comment: + parameters: + path: + comment_id: "" + conversation_id: "" + delete_comment: + speakeasy-default-delete-comment: + parameters: + path: + comment_id: "" + conversation_id: "" + update_comment: + speakeasy-default-update-comment: + parameters: + path: + comment_id: "" + conversation_id: "" + requestBody: + application/json: {} + list_comments: + speakeasy-default-list-comments: + parameters: + path: + conversation_id: "" + query: + sort: "asc" + create_comment: + speakeasy-default-create-comment: + parameters: + path: + conversation_id: "" + requestBody: + application/json: {"body": ""} + share_incident_retrospectives: + speakeasy-default-share-incident-retrospectives: + parameters: + path: + incident_id: "" + requestBody: + application/json: {"retrospective_ids": [""]} responses: - "400": + "201": application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - getIntegrationStatus: - speakeasy-default-get-integration-status: + export_incident_retrospectives: + speakeasy-default-export-incident-retrospectives: parameters: path: - slug: "" + incident_id: "" + requestBody: + application/json: {"integration_slug": "google_docs"} responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getStatuspageConnection: - speakeasy-default-get-statuspage-connection: + "201": + application/json: {} + list_incident_retrospectives: + speakeasy-default-list-incident-retrospectives: parameters: path: - connection_id: "" + incident_id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": + create_incident_retrospective: + speakeasy-default-create-incident-retrospective: + parameters: + path: + incident_id: "" + requestBody: + application/json: {"retrospective_template_id": ""} + responses: + "201": application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteStatuspageConnection: - speakeasy-default-delete-statuspage-connection: + update_incident_retrospective: + speakeasy-default-update-incident-retrospective: parameters: path: - connection_id: "" + retrospective_id: "" + incident_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - getIntegration: - speakeasy-default-get-integration: + create_incident_retrospective_field: + speakeasy-default-create-incident-retrospective-field: parameters: path: - integration_id: "" + retrospective_id: "" + incident_id: "" + requestBody: + application/json: {"label": "", "type": "dynamic_input_group"} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteTicketingPriority: - speakeasy-default-delete-ticketing-priority: + get_incident_retrospective_field: + speakeasy-default-get-incident-retrospective-field: parameters: path: - id: "" + retrospective_id: "" + field_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - updateTicketingPriority: - speakeasy-default-update-ticketing-priority: + update_incident_retrospective_field: + speakeasy-default-update-incident-retrospective-field: parameters: path: - id: "" + retrospective_id: "" + field_id: "" + incident_id: "" + requestBody: + application/json: {"value": 168058} responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": + create_incident_retrospective_dynamic_input: + speakeasy-default-create-incident-retrospective-dynamic-input: + parameters: + path: + retrospective_id: "" + field_id: "" + incident_id: "" + responses: + "201": application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - listTicketingProjects: - speakeasy-default-list-ticketing-projects: + delete_incident_retrospective_dynamic_input: + speakeasy-default-delete-incident-retrospective-dynamic-input: + parameters: + path: + retrospective_id: "" + field_id: "" + incident_id: "" + query: + dynamic_input_field_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": + list_retrospectives: + speakeasy-default-list-retrospectives: + responses: + "200": application/json: {} - "404": + list_post_mortem_reports: + speakeasy-default-list-post-mortem-reports: + responses: + "200": application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": + create_post_mortem_report: + speakeasy-default-create-post-mortem-report: + requestBody: + application/json: {"incident_id": ""} + responses: + "201": application/json: {} - getTicketingProjectConfigurationOptions: - speakeasy-default-get-ticketing-project-configuration-options: + get_post_mortem_report: + speakeasy-default-get-post-mortem-report: parameters: path: - ticketing_project_id: "" + report_id: "" responses: - "400": + "200": application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": + update_post_mortem_report: + speakeasy-default-update-post-mortem-report: + parameters: + path: + report_id: "" + requestBody: + application/json: {} + responses: + "200": application/json: {} - "500": - application/json: {"key": ""} - getTicketingProjectFieldOptions: - speakeasy-default-get-ticketing-project-field-options: + list_post_mortem_reasons: + speakeasy-default-list-post-mortem-reasons: parameters: path: - field_id: "" - ticketing_project_id: "" + report_id: "" + query: {} responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - createTicketingProjectFieldMap: - speakeasy-default-create-ticketing-project-field-map: + "200": + application/json: {} + create_post_mortem_reason: + speakeasy-default-create-post-mortem-reason: parameters: path: - ticketing_project_id: "" + report_id: "" + requestBody: + application/json: {"summary": ""} responses: "201": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getTicketingProjectAvailableFields: - speakeasy-default-get-ticketing-project-available-fields: + delete_post_mortem_reason: + speakeasy-default-delete-post-mortem-reason: parameters: path: - ticketing_project_id: "" + report_id: "" + reason_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteTicketingProjectFieldMap: - speakeasy-default-delete-ticketing-project-field-map: + update_post_mortem_reason: + speakeasy-default-update-post-mortem-reason: parameters: path: - map_id: "" - ticketing_project_id: "" + report_id: "" + reason_id: "" + requestBody: + application/json: {} responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": + "200": application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateTicketingProjectFieldMap: - speakeasy-default-update-ticketing-project-field-map: + reorder_post_mortem_reasons: + speakeasy-default-reorder-post-mortem-reasons: parameters: path: - map_id: "" - ticketing_project_id: "" + report_id: "" + requestBody: + application/json: {"old_position": 735999, "new_position": 264317} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteTicketingProjectConfig: - speakeasy-default-delete-ticketing-project-config: + publish_post_mortem_report: + speakeasy-default-publish-post-mortem-report: parameters: path: - ticketing_project_id: "" - config_id: "" + report_id: "" + requestBody: + application/json: {} responses: - "200": + "201": application/json: {} "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getTicket: - speakeasy-default-get-ticket: + application/json: {} + update_post_mortem_field: + speakeasy-default-update-post-mortem-field: parameters: path: - ticket_id: "" + field_id: "" + report_id: "" + requestBody: + application/json: {"value": ""} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": + list_post_mortem_questions: + speakeasy-default-list-post-mortem-questions: + responses: + "200": + application/json: {} + update_post_mortem_questions: + speakeasy-default-update-post-mortem-questions: + requestBody: + application/json: {} + responses: + "200": application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getAwsCloudTrailBatch: - speakeasy-default-get-aws-cloud-trail-batch: + get_post_mortem_question: + speakeasy-default-get-post-mortem-question: parameters: path: - id: "" + question_id: "" + list_retrospective_templates: + speakeasy-default-list-retrospective-templates: responses: "200": application/json: {} - "400": + create_retrospective_template: + speakeasy-default-create-retrospective-template: + requestBody: + application/json: {"name": "", "description": "second-hand ample mid bidet fooey", "sections[slug]": ["key_data", "key_data", "key_data"], "sections[elements]": ["", "", ""], "fields[label]": [], "fields[type]": ["multi_select"]} + responses: + "201": application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - updateAwsConnection: - speakeasy-default-update-aws-connection: + get_retrospective_template: + speakeasy-default-get-retrospective-template: parameters: path: - id: "" + retrospective_template_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - getSlackEmojiAction: - speakeasy-default-get-slack-emoji-action: + delete_retrospective_template: + speakeasy-default-delete-retrospective-template: parameters: path: - connection_id: "" - emoji_action_id: "" + retrospective_template_id: "" responses: - "400": + "200": application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - deleteSlackEmojiAction: - speakeasy-default-delete-slack-emoji-action: + update_retrospective_template: + speakeasy-default-update-retrospective-template: parameters: path: - connection_id: "" - emoji_action_id: "" + retrospective_template_id: "" + requestBody: + application/json: {"sections[slug]": [], "sections[elements]": ["", "", ""], "fields[label]": [], "fields[type]": []} responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": + "200": + application/json: {} + list_incident_roles: + speakeasy-default-list-incident-roles: + responses: + "200": + application/json: {} + create_incident_role: + speakeasy-default-create-incident-role: + requestBody: + application/json: {"name": "", "summary": ""} + responses: + "201": application/json: {} - getSlackWorkspaces: - speakeasy-default-get-slack-workspaces: + get_incident_role: + speakeasy-default-get-incident-role: parameters: path: - connection_id: "" - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {} - listStatuspageConnections: - speakeasy-default-list-statuspage-connections: + incident_role_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - listStatuspagePages: - speakeasy-default-list-statuspage-pages: + delete_incident_role: + speakeasy-default-delete-incident-role: parameters: path: - connection_id: "" + incident_role_id: "" responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getTicketingProject: - speakeasy-default-get-ticketing-project: + "200": + application/json: {} + update_incident_role: + speakeasy-default-update-incident-role: parameters: path: - ticketing_project_id: "" + incident_role_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listTicketTags: - speakeasy-default-list-ticket-tags: + validate_incident_tags: + speakeasy-default-validate-incident-tags: + requestBody: + application/json: ["", "", ""] responses: - "200": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": + "201": application/json: {} - "500": - application/json: {"key": ""} - getAwsCloudtrailBatchEvents: - speakeasy-default-get-aws-cloudtrail-batch-events: - parameters: - path: - id: "" + list_incident_tags: + speakeasy-default-list-incident-tags: responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": + "200": application/json: {} - listAwsConnections: - speakeasy-default-list-aws-connections: + list_incident_types: + speakeasy-default-list-incident-types: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": + create_incident_type: + speakeasy-default-create-incident-type: + requestBody: + application/json: {"name": "", "template": {}} + responses: + "201": application/json: {} - getAwsConnection: - speakeasy-default-get-aws-connection: + get_incident_type: + speakeasy-default-get-incident-type: parameters: path: id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listConfluenceSpaces: - speakeasy-default-list-confluence-spaces: + delete_incident_type: + speakeasy-default-delete-incident-type: parameters: path: id: "" - query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - createSlackEmojiAction: - speakeasy-default-create-slack-emoji-action: + update_incident_type: + speakeasy-default-update-incident-type: parameters: path: - connection_id: "" + id: "" requestBody: - application/json: {"emoji_name": ""} + application/json: {"name": "", "template": {}} responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - updateSlackEmojiAction: - speakeasy-default-update-slack-emoji-action: + "200": + application/json: {} + list_lifecycle_measurement_definitions: {} + create_lifecycle_measurement_definition: + speakeasy-default-create-lifecycle-measurement-definition: + requestBody: + application/json: {"name": "", "starts_at_milestone_id": "", "ends_at_milestone_id": ""} + get_lifecycle_measurement_definition: + speakeasy-default-get-lifecycle-measurement-definition: parameters: path: - connection_id: "" - emoji_action_id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - listSlackUsergroups: - speakeasy-default-list-slack-usergroups: - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - updateStatuspageConnection: - speakeasy-default-update-statuspage-connection: + measurement_definition_id: "" + delete_lifecycle_measurement_definition: + speakeasy-default-delete-lifecycle-measurement-definition: parameters: path: - connection_id: "" + measurement_definition_id: "" + update_lifecycle_measurement_definition: + speakeasy-default-update-lifecycle-measurement-definition: + parameters: + path: + measurement_definition_id: "" + list_lifecycle_phases: + speakeasy-default-list-lifecycle-phases: responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": + create_lifecycle_milestone: + speakeasy-default-create-lifecycle-milestone: + requestBody: + application/json: {"name": "", "description": "serpentine blah into after pendant zowie athletic", "phase_id": ""} + responses: + "201": application/json: {} - "500": - application/json: {"key": ""} - searchZendeskTickets: - speakeasy-default-search-zendesk-tickets: + delete_lifecycle_milestone: + speakeasy-default-delete-lifecycle-milestone: parameters: - query: - ticket_id: "" + path: + milestone_id: "" responses: - "400": + "200": application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listMeasurementDefinitions: - speakeasy-default-list-measurement-definitions: + update_lifecycle_milestone: + speakeasy-default-update-lifecycle-milestone: + parameters: + path: + milestone_id: "" responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": + "200": application/json: {} - "429": - application/json: {"key": ""} - "500": + list_priorities: + speakeasy-default-list-priorities: + responses: + "200": application/json: {} - createMeasurementDefinition: - speakeasy-default-create-measurement-definition: + create_priority: + speakeasy-default-create-priority: requestBody: - application/json: {"name": "", "starts_at_milestone_id": "", "ends_at_milestone_id": ""} + application/json: {"slug": ""} responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - getMeasurementDefinition: - speakeasy-default-get-measurement-definition: + "201": + application/json: {} + get_priority: + speakeasy-default-get-priority: parameters: path: - measurement_definition_id: "" + priority_slug: "" responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": + "200": application/json: {} - deleteMeasurementDefinition: - speakeasy-default-delete-measurement-definition: + delete_priority: + speakeasy-default-delete-priority: parameters: path: - measurement_definition_id: "" + priority_slug: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": + "200": application/json: {} - updateMeasurementDefinition: - speakeasy-default-update-measurement-definition: + update_priority: + speakeasy-default-update-priority: parameters: path: - measurement_definition_id: "" + priority_slug: "" + requestBody: + application/json: {} responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": + "200": application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listIncidentMetrics: - speakeasy-default-list-incident-metrics: + list_severities: + speakeasy-default-list-severities: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - listRetrospectiveMetrics: - speakeasy-default-list-retrospective-metrics: + create_severity: + speakeasy-default-create-severity: + requestBody: + application/json: {"slug": ""} responses: - "200": + "201": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - listUserInvolvementMetrics: - speakeasy-default-list-user-involvement-metrics: + get_severity: + speakeasy-default-get-severity: + parameters: + path: + severity_slug: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {} - listInfrastructureMetrics: - speakeasy-default-list-infrastructure-metrics: + delete_severity: + speakeasy-default-delete-severity: parameters: path: - infra_type: "services" - query: {} + severity_slug: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getMeanTimeReport: - speakeasy-default-get-mean-time-report: + update_severity: + speakeasy-default-update-severity: + parameters: + path: + severity_slug: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {} - "401": + get_severity_matrix: + speakeasy-default-get-severity-matrix: + responses: + "200": application/json: {} - "404": + update_severity_matrix: + speakeasy-default-update-severity-matrix: + requestBody: + application/json: {"data": [{"severity": "", "impact_id": "", "condition_id": ""}, {"severity": "", "impact_id": "", "condition_id": ""}, {"severity": "", "impact_id": "", "condition_id": ""}]} + responses: + "200": application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": + list_severity_matrix_conditions: + speakeasy-default-list-severity-matrix-conditions: + responses: + "200": application/json: {} - "500": + create_severity_matrix_condition: + speakeasy-default-create-severity-matrix-condition: + requestBody: + application/json: {"name": ""} + responses: + "201": application/json: {} - listSavedSearches: - speakeasy-default-list-saved-searches: + get_severity_matrix_condition: + speakeasy-default-get-severity-matrix-condition: parameters: path: - resource_type: "incident_events" - query: {} + condition_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - createSavedSearch: - speakeasy-default-create-saved-search: + delete_severity_matrix_condition: + speakeasy-default-delete-severity-matrix-condition: parameters: path: - resource_type: "ticket_follow_ups" - requestBody: - application/json: {"name": "", "filter_values": {}} + condition_id: "" responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": + "200": application/json: {} - getInfrastructureMetrics: - speakeasy-default-get-infrastructure-metrics: + update_severity_matrix_condition: + speakeasy-default-update-severity-matrix-condition: parameters: path: - infra_type: "environments" - infra_id: "" - query: {} + condition_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - apiPing: - speakeasy-default-api-ping: + list_severity_matrix_impacts: + speakeasy-default-list-severity-matrix-impacts: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": + create_severity_matrix_impact: + speakeasy-default-create-severity-matrix-impact: + requestBody: + application/json: {"affects_type": "", "affects_id": ""} + responses: + "201": application/json: {} - listRetrospectiveQuestions: - speakeasy-default-list-retrospective-questions: + delete_severity_matrix_impact: + speakeasy-default-delete-severity-matrix-impact: + parameters: + path: + impact_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateRetrospectiveQuestions: - speakeasy-default-update-retrospective-questions: + update_severity_matrix_impact: + speakeasy-default-update-severity-matrix-impact: + parameters: + path: + impact_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - getRetrospectiveQuestion: - speakeasy-default-get-retrospective-question: + delete_custom_field_definition: + speakeasy-default-delete-custom-field-definition: parameters: path: - question_id: "" + field_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": + "200": application/json: {} - listRetrospectiveReports: - speakeasy-default-list-retrospective-reports: + update_custom_field_definition: + speakeasy-default-update-custom-field-definition: + parameters: + path: + field_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": + list_custom_field_definitions: + speakeasy-default-list-custom-field-definitions: + responses: + "200": application/json: {} - "500": - application/json: {"key": ""} - createRetrospectiveReport: - speakeasy-default-create-retrospective-report: + create_custom_field_definition: + speakeasy-default-create-custom-field-definition: requestBody: - application/json: {"incident_id": ""} + application/json: {"display_name": "Meredith_Gibson", "field_type": "", "required": true} responses: "201": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getPostMortemReport: - speakeasy-default-get-post-mortem-report: + list_custom_field_select_options: + speakeasy-default-list-custom-field-select-options: parameters: path: - report_id: "" + field_id: "" + query: {} + responses: + "200": + application/json: {} + get_form_configuration: + speakeasy-default-get-form-configuration: + parameters: + path: + slug: "" + responses: + "200": + application/json: {} + list_integrations: + speakeasy-default-list-integrations: responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - updatePostMortemReport: - speakeasy-default-update-post-mortem-report: + get_integration: + speakeasy-default-get-integration: parameters: path: - report_id: "" + integration_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - updateRetrospectiveField: - speakeasy-default-update-retrospective-field: + update_field_map: + speakeasy-default-update-field-map: parameters: path: - field_id: "" - report_id: "" - requestBody: - application/json: {"value": ""} + field_map_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - publishRetrospectiveReport: - speakeasy-default-publish-retrospective-report: + list_field_map_available_fields: + speakeasy-default-list-field-map-available-fields: parameters: path: - report_id: "" + field_map_id: "" responses: - "201": - application/json: {} - "400": + "200": application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "413": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listRetrospectiveReportReasons: - speakeasy-default-list-retrospective-report-reasons: + list_authed_providers: + speakeasy-default-list-authed-providers: parameters: path: - report_id: "" + integration_slug: "" + connection_id: "" query: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": + update_authed_provider: + speakeasy-default-update-authed-provider: + parameters: + path: + integration_slug: "" + connection_id: "" + authed_provider_id: "" + responses: + "200": application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": + list_connections: + speakeasy-default-list-connections: + responses: + "200": application/json: {} - createRetrospectiveReportReason: - speakeasy-default-create-retrospective-report-reason: + create_connection: + speakeasy-default-create-connection: parameters: path: - report_id: "" - requestBody: - application/json: {"summary": ""} + slug: "" responses: "201": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateRetrospectiveReportReasonOrder: - speakeasy-default-update-retrospective-report-reason-order: + refresh_connection: + speakeasy-default-refresh-connection: parameters: path: - report_id: "" - requestBody: - application/json: {"old_position": 698480, "new_position": 723135} + slug: "" + connection_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteRetrospectiveReason: - speakeasy-default-delete-retrospective-reason: + update_connection: + speakeasy-default-update-connection: parameters: path: - report_id: "" - reason_id: "" + slug: "" + connection_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": + list_connection_statuses: + speakeasy-default-list-connection-statuses: + responses: + "200": application/json: {} - "500": - application/json: {"key": ""} - updateRetrospectiveReason: - speakeasy-default-update-retrospective-reason: + list_connection_statuses_by_slug: + speakeasy-default-list-connection-statuses-by-slug: parameters: path: - report_id: "" - reason_id: "" + slug: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - listRunbookAudits: - speakeasy-default-list-runbook-audits: - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {} - listRunbooks: - speakeasy-default-list-runbooks: + list_connection_statuses_by_slug_and_id: + speakeasy-default-list-connection-statuses-by-slug-and-id: + parameters: + path: + slug: "" + by_connection_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createRunbook: - speakeasy-default-create-runbook: - requestBody: - application/json: {"name": "", "type": "general"} - responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listRunbookActions: - speakeasy-default-list-runbook-actions: + list_aws_connections: + speakeasy-default-list-aws-connections: responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - listRunbookExecutions: - speakeasy-default-list-runbook-executions: + get_aws_connection: + speakeasy-default-get-aws-connection: + parameters: + path: + id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {} - createRunbookExecution: - speakeasy-default-create-runbook-execution: + update_aws_connection: + speakeasy-default-update-aws-connection: + parameters: + path: + id: "" requestBody: - application/json: {"execute_for": "", "runbook_id": ""} + application/json: {} responses: - "201": - application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": + "200": application/json: {} - "429": - application/json: {"key": ""} - "500": + list_aws_cloudtrail_batches: + speakeasy-default-list-aws-cloudtrail-batches: + responses: + "200": application/json: {} - getRunbookExecution: - speakeasy-default-get-runbook-execution: + get_aws_cloudtrail_batch: + speakeasy-default-get-aws-cloudtrail-batch: parameters: path: - execution_id: "" + id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {} - updateRunbookExecutionStep: - speakeasy-default-update-runbook-execution-step: + update_aws_cloudtrail_batch: + speakeasy-default-update-aws-cloudtrail-batch: parameters: path: - execution_id: "" - step_id: "" + id: "" requestBody: - application/json: {"state": "Colorado"} + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - getRunbookExecutionStepScript: - speakeasy-default-get-runbook-execution-step-script: + list_aws_cloudtrail_batch_events: + speakeasy-default-list-aws-cloudtrail-batch-events: parameters: path: - execution_id: "" - step_id: "" + id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateRunbookExecutionStepScriptState: - speakeasy-default-update-runbook-execution-step-script-state: + search_confluence_spaces: + speakeasy-default-search-confluence-spaces: parameters: path: - execution_id: "" - step_id: "" - state: "West Virginia" + id: "" + query: {} responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - updateRunbookExecutionStepVotes: - speakeasy-default-update-runbook-execution-step-votes: + list_slack_workspaces: + speakeasy-default-list-slack-workspaces: parameters: path: - execution_id: "" - step_id: "" - requestBody: - application/json: {"direction": "up"} + connection_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - getRunbookStepVoteStatus: - speakeasy-default-get-runbook-step-vote-status: - parameters: - path: - execution_id: "" - step_id: "" + list_slack_usergroups: + speakeasy-default-list-slack-usergroups: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - updateRunbookExecutionVotes: - speakeasy-default-update-runbook-execution-votes: + list_slack_emoji_actions: + speakeasy-default-list-slack-emoji-actions: parameters: path: - execution_id: "" + connection_id: "" + query: {} + create_slack_emoji_action: + speakeasy-default-create-slack-emoji-action: + parameters: + path: + connection_id: "" requestBody: - application/json: {"direction": "down"} - responses: - "200": - application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getRunbookExecutionVoteStatus: - speakeasy-default-get-runbook-execution-vote-status: + application/json: {"emoji_name": ""} + get_slack_emoji_action: + speakeasy-default-get-slack-emoji-action: parameters: path: - execution_id: "" + connection_id: "" + emoji_action_id: "" + delete_slack_emoji_action: + speakeasy-default-delete-slack-emoji-action: + parameters: + path: + connection_id: "" + emoji_action_id: "" + update_slack_emoji_action: + speakeasy-default-update-slack-emoji-action: + parameters: + path: + connection_id: "" + emoji_action_id: "" + list_statuspage_connections: + speakeasy-default-list-statuspage-connections: responses: "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - getRunbookSelectOptions: - speakeasy-default-get-runbook-select-options: + get_statuspage_connection: + speakeasy-default-get-statuspage-connection: parameters: path: - integration_slug: "" - action_slug: "" - field: "" - query: {} + connection_id: "" responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - getRunbook: - speakeasy-default-get-runbook: + "200": + application/json: {} + delete_statuspage_connection: + speakeasy-default-delete-statuspage-connection: parameters: path: - runbook_id: "" + connection_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateRunbook: - speakeasy-default-update-runbook: + update_statuspage_connection: + speakeasy-default-update-statuspage-connection: parameters: path: - runbook_id: "" + connection_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - deleteRunbook: - speakeasy-default-delete-runbook: + list_statuspage_connection_pages: + speakeasy-default-list-statuspage-connection-pages: parameters: path: - runbook_id: "" + connection_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteRunbookExecution: - speakeasy-default-delete-runbook-execution: + search_zendesk_tickets: + speakeasy-default-search-zendesk-tickets: parameters: path: - execution_id: "" + connection_id: "" query: - reason: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - listScheduledMaintenances: - speakeasy-default-list-scheduled-maintenances: + query: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createScheduledMaintenance: - speakeasy-default-create-scheduled-maintenance: - requestBody: - application/json: {"name": "", "starts_at": "2023-06-18T07:14:55.338Z", "ends_at": "2023-12-01T17:06:07.804Z"} + get_zendesk_customer_support_issue: + speakeasy-default-get-zendesk-customer-support-issue: + parameters: + query: + ticket_id: "" + list_users: + speakeasy-default-list-users: responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {} - "413": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": + "200": application/json: {} - deleteScheduledMaintenance: - speakeasy-default-delete-scheduled-maintenance: + get_user: + speakeasy-default-get-user: parameters: path: - scheduled_maintenance_id: "" + id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - listSchedules: - speakeasy-default-list-schedules: + "200": + application/json: {} + get_current_user: + speakeasy-default-get-current-user: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listTeams: - speakeasy-default-list-teams: + get_mean_time_report: + speakeasy-default-get-mean-time-report: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": + list_retrospective_metrics: + speakeasy-default-list-retrospective-metrics: + responses: + "200": + application/json: {} + list_user_involvement_metrics: + speakeasy-default-list-user-involvement-metrics: + responses: + "200": application/json: {} - "429": + list_incident_metrics: + speakeasy-default-list-incident-metrics: + responses: + "200": application/json: {} - "500": + list_infrastructure_type_metrics: + speakeasy-default-list-infrastructure-type-metrics: + parameters: + path: + infra_type: "customers" + query: {} + responses: + "200": application/json: {} - createTeam: - speakeasy-default-create-team: - requestBody: - application/json: {"name": ""} + list_infrastructure_metrics: + speakeasy-default-list-infrastructure-metrics: + parameters: + path: + infra_type: "environments" + infra_id: "" + query: {} responses: - "201": + "200": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getTeam: - speakeasy-default-get-team: + get_saved_search: + speakeasy-default-get-saved-search: parameters: path: - team_id: "" - query: {} + resource_type: "incidents" + saved_search_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - archiveTeam: - speakeasy-default-archive-team: + delete_saved_search: + speakeasy-default-delete-saved-search: parameters: path: - team_id: "" + resource_type: "scheduled_maintenances" + saved_search_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - updateTeam: - speakeasy-default-update-team: + update_saved_search: + speakeasy-default-update-saved-search: parameters: path: - team_id: "" + resource_type: "incident_events" + saved_search_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listTeamOnCallSchedules: - speakeasy-default-list-team-on-call-schedules: + list_saved_searches: + speakeasy-default-list-saved-searches: parameters: path: - team_id: "" + resource_type: "incidents" query: {} responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - createTeamOnCallSchedule: - speakeasy-default-create-team-on-call-schedule: + "200": + application/json: {} + create_saved_search: + speakeasy-default-create-saved-search: parameters: path: - team_id: "" + resource_type: "services" requestBody: - application/json: {"name": "", "time_zone": "America/Santo_Domingo", "strategy": {"type": "daily"}} + application/json: {"name": "", "filter_values": {"key": "", "key1": "", "key2": ""}} responses: - "400": + "201": application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": + get_signals_timeseries_analytics: {} + get_signals_grouped_metrics: {} + get_signals_mttx_analytics: {} + list_runbook_actions: + speakeasy-default-list-runbook-actions: + responses: + "200": application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": + list_runbook_executions: + speakeasy-default-list-runbook-executions: + responses: + "200": application/json: {} - getTeamScheduleShift: - speakeasy-default-get-team-schedule-shift: - parameters: - path: - id: "" - team_id: "" - schedule_id: "" + create_runbook_execution: + speakeasy-default-create-runbook-execution: + requestBody: + application/json: {"execute_for": "", "runbook_id": ""} responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteTeamScheduleShift: - speakeasy-default-delete-team-schedule-shift: + "201": + application/json: {} + get_runbook_execution: + speakeasy-default-get-runbook-execution: parameters: path: - id: "" - team_id: "" - schedule_id: "" + execution_id: "" responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": + "200": application/json: {} - updateTeamScheduleShift: - speakeasy-default-update-team-schedule-shift: + delete_runbook_execution: + speakeasy-default-delete-runbook-execution: parameters: path: - id: "" - team_id: "" - schedule_id: "" - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - createTeamEscalationPolicy: - speakeasy-default-create-team-escalation-policy: + execution_id: "" + query: + reason: "" + update_runbook_execution_step: + speakeasy-default-update-runbook-execution-step: parameters: path: - team_id: "" + execution_id: "" + step_id: "" requestBody: - application/json: {"name": "", "steps": [{"targets": [{"type": "Webhook", "id": ""}], "timeout": ""}]} + application/json: {"state": "Maine"} responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - updateTeamEscalationPolicy: - speakeasy-default-update-team-escalation-policy: + "200": + application/json: {} + get_runbook_execution_step_script: + speakeasy-default-get-runbook-execution-step-script: parameters: path: - team_id: "" - id: "" + execution_id: "" + step_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": + "200": application/json: {} - "500": - application/json: {"key": ""} - createTeamOnCallScheduleShift: - speakeasy-default-create-team-on-call-schedule-shift: + update_runbook_execution_step_script: + speakeasy-default-update-runbook-execution-step-script: parameters: path: - team_id: "" - schedule_id: "" - requestBody: - application/json: {"start_time": "", "end_time": ""} - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - getScimGroups: - speakeasy-default-get-scim-groups: + execution_id: "" + step_id: "" + state: "Tennessee" responses: - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": + "200": application/json: {} - "500": + get_runbook_action_field_options: + speakeasy-default-get-runbook-action-field-options: + parameters: + path: + integration_slug: "" + action_slug: "" + field: "" + query: {} + list_runbooks: + speakeasy-default-list-runbooks: + responses: + "200": application/json: {} - createScimGroup: - speakeasy-default-create-scim-group: + create_runbook: + speakeasy-default-create-runbook: requestBody: - application/scim+json: {"displayName": "Jed6", "members": [{"value": ""}, {"value": ""}, {"value": ""}]} + application/json: {"name": "", "type": "incident_role"} responses: - "400": - application/json: {} - "401": - application/json: {} - "404": + "201": application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getScimGroup: - speakeasy-default-get-scim-group: + get_runbook: + speakeasy-default-get-runbook: parameters: path: - id: "" + runbook_id: "" responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - updateScimGroup: - speakeasy-default-update-scim-group: + "200": + application/json: {} + update_runbook: + speakeasy-default-update-runbook: parameters: path: - id: "" + runbook_id: "" requestBody: - application/scim+json: {"displayName": "Ibrahim.Kuhic40", "members": [{"value": ""}, {"value": ""}, {"value": ""}]} + application/json: {} responses: - "400": + "200": application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteScimGroup: - speakeasy-default-delete-scim-group: + delete_runbook: + speakeasy-default-delete-runbook: parameters: path: - id: "" + runbook_id: "" responses: - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": + "200": application/json: {} - getScimUsers: - speakeasy-default-get-scim-users: + list_runbook_audits: + speakeasy-default-list-runbook-audits: + parameters: + query: + auditable_type: "Runbooks::Step" + list_status_update_templates: + speakeasy-default-list-status-update-templates: responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - createScimUser: - speakeasy-default-create-scim-user: + "200": + application/json: {} + create_status_update_template: + speakeasy-default-create-status-update-template: requestBody: - application/scim+json: {"userName": "Jimmy12", "name": {"familyName": "", "givenName": ""}, "emails": [{"value": "", "primary": false}]} + application/json: {"name": "", "body": ""} responses: - "400": + "201": application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {} - getScimUser: - speakeasy-default-get-scim-user: + get_status_update_template: + speakeasy-default-get-status-update-template: parameters: path: - id: "" + status_update_template_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": + "200": application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - replaceScimUser: - speakeasy-default-replace-scim-user: - parameters: - path: - id: "" - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - deleteScimUser: - speakeasy-default-delete-scim-user: + delete_status_update_template: + speakeasy-default-delete-status-update-template: parameters: path: - id: "" + status_update_template_id: "" responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - updateScimUser: - speakeasy-default-update-scim-user: + "200": + application/json: {} + update_status_update_template: + speakeasy-default-update-status-update-template: parameters: path: - id: "" + status_update_template_id: "" requestBody: - application/scim+json: {"Operations": []} - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - getSignalGroupedMetrics: - speakeasy-default-get-signal-grouped-metrics: - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - getSignalsMttxAnalytics: - speakeasy-default-get-signals-mttx-analytics: + application/json: {} responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": + "200": application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getSignalsAnalyticsTimeseries: - speakeasy-default-get-signals-analytics-timeseries: - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - debugSignal: - speakeasy-default-debug-signal: - requestBody: - application/json: {"expression": "", "signals": []} - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listSignalEmailTargets: - speakeasy-default-list-signal-email-targets: + list_tickets: + speakeasy-default-list-tickets: responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - createSignalEmailTarget: - speakeasy-default-create-signal-email-target: + "200": + application/json: {} + create_ticket: + speakeasy-default-create-ticket: requestBody: - application/json: {"name": ""} + application/json: {"summary": ""} responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": + "201": application/json: {} - "500": - application/json: {"key": "", "key1": ""} - getSignalEmailTarget: - speakeasy-default-get-signal-email-target: + get_ticket: + speakeasy-default-get-ticket: parameters: path: - id: "" + ticket_id: "" responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": + "200": application/json: {} - "500": - application/json: {"key": ""} - deleteSignalEmailTarget: - speakeasy-default-delete-signal-email-target: + delete_ticket: + speakeasy-default-delete-ticket: parameters: path: - id: "" - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - updateSignalEmailTarget: - speakeasy-default-update-signal-email-target: + ticket_id: "" + update_ticket: + speakeasy-default-update-ticket: parameters: path: - id: "" - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - listSignalEventSources: - speakeasy-default-list-signal-event-sources: - responses: - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - getSignalIngestUrl: - speakeasy-default-get-signal-ingest-url: + ticket_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listSignalTransposers: - speakeasy-default-list-signal-transposers: + list_ticketing_projects: + speakeasy-default-list-ticketing-projects: responses: - "400": - application/json: {} - "401": + "200": application/json: {} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - listSignalWebhookTargets: - speakeasy-default-list-signal-webhook-targets: + get_ticketing_project: + speakeasy-default-get-ticketing-project: + parameters: + path: + ticketing_project_id: "" responses: - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": + "200": application/json: {} - "500": - application/json: {"key": "", "key1": ""} - createSignalWebhookTarget: - speakeasy-default-create-signal-webhook-target: - requestBody: - application/json: {"name": "", "url": "https://critical-prohibition.biz"} - responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {} - getSignalsWebhookTarget: - speakeasy-default-get-signals-webhook-target: + get_configuration_options: + speakeasy-default-get-configuration-options: parameters: path: - id: "" - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteSignalsWebhookTarget: - speakeasy-default-delete-signals-webhook-target: + ticketing_project_id: "" + get_options_for_field: + speakeasy-default-get-options-for-field: parameters: path: - id: "" + field_id: "" + ticketing_project_id: "" + list_available_ticketing_field_maps: + speakeasy-default-list-available-ticketing-field-maps: + parameters: + path: + ticketing_project_id: "" responses: - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": + "200": application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - updateSignalsWebhookTarget: - speakeasy-default-update-signals-webhook-target: + create_ticketing_field_map: + speakeasy-default-create-ticketing-field-map: parameters: path: - id: "" - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": ""} - listSignalsOnCall: - speakeasy-default-list-signals-on-call: + ticketing_project_id: "" responses: - "400": - application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": + "201": application/json: {} - listTeamEscalationPolicies: - speakeasy-default-list-team-escalation-policies: + get_ticketing_field_map: + speakeasy-default-get-ticketing-field-map: parameters: path: - team_id: "" - query: {} + map_id: "" + ticketing_project_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteTeamEscalationPolicy: - speakeasy-default-delete-team-escalation-policy: + "200": + application/json: {} + delete_ticketing_field_map: + speakeasy-default-delete-ticketing-field-map: parameters: path: - team_id: "" - id: "" - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": ""} - "500": - application/json: {} - getTeamOnCallSchedule: - speakeasy-default-get-team-on-call-schedule: + map_id: "" + ticketing_project_id: "" + update_ticketing_field_map: + speakeasy-default-update-ticketing-field-map: parameters: path: - team_id: "" - schedule_id: "" + map_id: "" + ticketing_project_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - updateTeamOnCallSchedule: - speakeasy-default-update-team-on-call-schedule: + "200": + application/json: {} + list_available_inbound_field_maps: + speakeasy-default-list-available-inbound-field-maps: parameters: path: - team_id: "" - schedule_id: "" + ticketing_project_id: "" responses: - "400": + "200": application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listTeamSignalRules: - speakeasy-default-list-team-signal-rules: + list_inbound_field_maps: + speakeasy-default-list-inbound-field-maps: parameters: path: - team_id: "" + ticketing_project_id: "" query: {} responses: - "400": + "200": application/json: {} - "401": - application/json: {"key": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - createTeamSignalRule: - speakeasy-default-create-team-signal-rule: + create_inbound_field_map: + speakeasy-default-create-inbound-field-map: parameters: path: - team_id: "" - requestBody: - application/json: {"name": "", "expression": "", "target_type": "User", "target_id": ""} + ticketing_project_id: "" responses: - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": + "201": application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getTeamSignalRule: - speakeasy-default-get-team-signal-rule: + get_inbound_field_map: + speakeasy-default-get-inbound-field-map: parameters: path: - team_id: "" - id: "" + map_id: "" + ticketing_project_id: "" responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - deleteTeamSignalRule: - speakeasy-default-delete-team-signal-rule: + "200": + application/json: {} + update_inbound_field_map: + speakeasy-default-update-inbound-field-map: parameters: path: - team_id: "" - id: "" + map_id: "" + ticketing_project_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateTeamSignalRule: - speakeasy-default-update-team-signal-rule: + "200": + application/json: {} + delete_inbound_field_map: + speakeasy-default-delete-inbound-field-map: parameters: path: - team_id: "" - id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {} - "500": - application/json: {} - getTeamEscalationPolicy: - speakeasy-default-get-team-escalation-policy: + map_id: "" + ticketing_project_id: "" + create_ticketing_project_config: + speakeasy-default-create-ticketing-project-config: parameters: path: - team_id: "" - id: "" - responses: - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": ""} - listStatusUpdateTemplates: - speakeasy-default-list-status-update-templates: + ticketing_project_id: "" responses: - "200": + "201": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getStatusUpdateTemplate: - speakeasy-default-get-status-update-template: + get_ticketing_project_config: + speakeasy-default-get-ticketing-project-config: parameters: path: - status_update_template_id: "" + ticketing_project_id: "" + config_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteStatusUpdateTemplate: - speakeasy-default-delete-status-update-template: + delete_ticketing_project_config: + speakeasy-default-delete-ticketing-project-config: parameters: path: - status_update_template_id: "" + ticketing_project_id: "" + config_id: "" responses: "200": application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {} - updateStatusUpdateTemplate: - speakeasy-default-update-status-update-template: + update_ticketing_project_config: + speakeasy-default-update-ticketing-project-config: parameters: path: - status_update_template_id: "" + ticketing_project_id: "" + config_id: "" responses: "200": application/json: {} - "400": + list_ticketing_priorities: + speakeasy-default-list-ticketing-priorities: + responses: + "200": application/json: {} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {"key": ""} - "500": - application/json: {"key": "", "key1": ""} - createStatusUpdateTemplate: - speakeasy-default-create-status-update-template: + create_ticketing_priority: + speakeasy-default-create-ticketing-priority: requestBody: - application/json: {"name": "", "body": ""} + application/json: {"name": ""} responses: "201": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteTeamOnCallSchedule: - speakeasy-default-delete-team-on-call-schedule: - parameters: - path: - team_id: "" - schedule_id: "" - responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - getTicketingPriority: + get_ticketing_priority: speakeasy-default-get-ticketing-priority: parameters: path: @@ -8952,285 +5613,211 @@ examples: responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - getTicketingProjectFieldMap: - speakeasy-default-get-ticketing-project-field-map: + delete_ticketing_priority: + speakeasy-default-delete-ticketing-priority: parameters: path: - map_id: "" - ticketing_project_id: "" + id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": ""} - "429": - application/json: {} - "500": - application/json: {"key": ""} - updateTicketingProjectConfig: - speakeasy-default-update-ticketing-project-config: + update_ticketing_priority: + speakeasy-default-update-ticketing-priority: parameters: path: - ticketing_project_id: "" - config_id: "" + id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": + list_ticket_tags: + speakeasy-default-list-ticket-tags: + responses: + "200": application/json: {} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} - createTicketingProjectConfiguration: - speakeasy-default-create-ticketing-project-configuration: + get_scim_group: + speakeasy-default-get-scim-group: parameters: path: - ticketing_project_id: "" + id: "" + update_scim_group: + speakeasy-default-update-scim-group: + parameters: + path: + id: "" + requestBody: + application/scim+json: {"displayName": "Monte_Schowalter", "members": [{"value": ""}]} + delete_scim_group: + speakeasy-default-delete-scim-group: + parameters: + path: + id: "" + list_scim_groups: {} + create_scim_group: + speakeasy-default-create-scim-group: + requestBody: + application/scim+json: {"displayName": "Allie.Schowalter", "members": [{"value": ""}, {"value": ""}, {"value": ""}]} + get_scim_user: + speakeasy-default-get-scim-user: + parameters: + path: + id: "" + update_scim_user: + speakeasy-default-update-scim-user: + parameters: + path: + id: "" + requestBody: + application/scim+json: {} + delete_scim_user: + speakeasy-default-delete-scim-user: + parameters: + path: + id: "" + patch_scim_user: + speakeasy-default-patch-scim-user: + parameters: + path: + id: "" + requestBody: + application/scim+json: {"Operations": [{"op": "", "path": "/System"}, {"op": "", "path": "/lib"}, {"op": "", "path": "/etc/namedb"}]} + list_scim_users: {} + create_scim_user: + speakeasy-default-create-scim-user: + requestBody: + application/scim+json: {"userName": "Angeline72", "name": {"familyName": "", "givenName": ""}, "emails": [{"value": "", "primary": false}, {"value": "", "primary": false}, {"value": "", "primary": true}]} + list_call_routes: {} + list_webhooks: + speakeasy-default-list-webhooks: + responses: + "200": + application/json: {} + create_webhook: + speakeasy-default-create-webhook: + requestBody: + application/json: {"url": "https://prime-tooth.biz/"} responses: "201": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - getTicketingProjectConfig: - speakeasy-default-get-ticketing-project-config: + list_webhook_deliveries: + speakeasy-default-list-webhook-deliveries: parameters: path: - ticketing_project_id: "" - config_id: "" + webhook_id: "" + get_webhook: + speakeasy-default-get-webhook: + parameters: + path: + webhook_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - listTickets: - speakeasy-default-list-tickets: + delete_webhook: + speakeasy-default-delete-webhook: + parameters: + path: + webhook_id: "" + update_webhook: + speakeasy-default-update-webhook: + parameters: + path: + webhook_id: "" + requestBody: + application/json: {} responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": + list_audiences: + speakeasy-default-list-audiences: + parameters: + query: + include_archived: false + responses: + "200": application/json: {} - createTicket: - speakeasy-default-create-ticket: + create_audience: + speakeasy-default-create-audience: requestBody: - application/json: {"summary": ""} + application/json: {"name": "", "description": "sandy closely closely suddenly whose rear", "default": false, "details[question]": [""], "details[prompt]": [""]} responses: "201": application/json: {} - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {"key": "", "key1": "", "key2": ""} - deleteTicket: - speakeasy-default-delete-ticket: + get_audience: + speakeasy-default-get-audience: parameters: path: - ticket_id: "" + audience_id: "" responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateTicket: - speakeasy-default-update-ticket: + "200": + application/json: {} + archive_audience: + speakeasy-default-archive-audience: parameters: path: - ticket_id: "" + audience_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listWebhooks: - speakeasy-default-list-webhooks: + update_audience: + speakeasy-default-update-audience: + parameters: + path: + audience_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": - application/json: {} - createWebhook: - speakeasy-default-create-webhook: - requestBody: - application/json: {"url": "https://probable-heating.com/"} + restore_audience: + speakeasy-default-restore-audience: + parameters: + path: + audience_id: "" responses: - "201": - application/json: {} - "400": - application/json: {} - "401": - application/json: {"key": "", "key1": "", "key2": ""} - "404": - application/json: {"key": "", "key1": "", "key2": ""} - "408": - application/json: {} - "429": - application/json: {} - "500": + "200": application/json: {} - getWebhook: - speakeasy-default-get-webhook: + get_member_default_audience: + speakeasy-default-get-member-default-audience: parameters: path: - webhook_id: "" + member_id: 518189 responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": "", "key1": ""} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": ""} - deleteWebhook: - speakeasy-default-delete-webhook: + set_member_default_audience: + speakeasy-default-set-member-default-audience: parameters: path: - webhook_id: "" + member_id: 191738 + requestBody: + application/json: {"audience_id": ""} responses: - "400": - application/json: {"key": "", "key1": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": "", "key2": ""} - "500": - application/json: {"key": "", "key1": ""} - updateWebhook: - speakeasy-default-update-webhook: + "200": + application/json: {} + get_audience_summary: + speakeasy-default-get-audience-summary: parameters: path: - webhook_id: "" + audience_id: "" + incident_id: "" responses: "200": application/json: {} - "400": - application/json: {"key": "", "key1": "", "key2": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {"key": ""} - "408": - application/json: {"key": "", "key1": "", "key2": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": ""} - listWebhookDeliveries: - speakeasy-default-list-webhook-deliveries: + generate_audience_summary: + speakeasy-default-generate-audience-summary: parameters: path: - webhook_id: "" + audience_id: "" + incident_id: "" responses: - "400": - application/json: {"key": ""} - "401": - application/json: {"key": "", "key1": ""} - "404": - application/json: {} - "408": - application/json: {"key": "", "key1": ""} - "429": - application/json: {"key": "", "key1": ""} - "500": - application/json: {"key": "", "key1": ""} + "201": + application/json: {} + list_audience_summaries: + speakeasy-default-list-audience-summaries: + parameters: + path: + incident_id: "" + responses: + "200": + application/json: {} +examplesVersion: 1.0.1 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 8de63518..9849c83f 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -19,7 +19,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true typescript: - version: 0.1.13 + version: 1.0.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1428a382..bcbedb68 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,12 @@ -speakeasyVersion: 1.465.1 +speakeasyVersion: 1.543.4 sources: firehydrant-oas: sourceNamespace: firehydrant-oas - sourceRevisionDigest: sha256:e512d73a7a46a2f2c3619032e3b2f10ddf25a609b2d6f02175595d3392240980 - sourceBlobDigest: sha256:f6ffe4d71cbc8f195cf28218fe7c5a6212053a7fa58a4e0aa275374cfcf3c675 + sourceRevisionDigest: sha256:9ea407d00bbdbe45cdedc31a2fea7f227d9b6748bf26b8ec1d3e4163f8f7c29c + sourceBlobDigest: sha256:b7e17ea5065fa99817b5397ccc5460e2410b92a032d7b95d60f2d4aa5ba580a2 tags: - latest - - speakeasy-sdk-regen-1735863790 + - speakeasy-sdk-regen-1745434787 - 0.0.1 firehydrant-typescript-sdk-OAS: sourceNamespace: firehydrant-typescript-sdk-oas @@ -19,20 +19,17 @@ targets: firehydrant-typescript-sdk: source: firehydrant-oas sourceNamespace: firehydrant-oas - sourceRevisionDigest: sha256:e512d73a7a46a2f2c3619032e3b2f10ddf25a609b2d6f02175595d3392240980 - sourceBlobDigest: sha256:f6ffe4d71cbc8f195cf28218fe7c5a6212053a7fa58a4e0aa275374cfcf3c675 + sourceRevisionDigest: sha256:9ea407d00bbdbe45cdedc31a2fea7f227d9b6748bf26b8ec1d3e4163f8f7c29c + sourceBlobDigest: sha256:b7e17ea5065fa99817b5397ccc5460e2410b92a032d7b95d60f2d4aa5ba580a2 codeSamplesNamespace: firehydrant-typescript-sdk-oas-code-samples - codeSamplesRevisionDigest: sha256:91c6eb6c8fcf0eba140b3cf4dfb4da432f53f34b7f39b10f77f2e08baaf30784 + codeSamplesRevisionDigest: sha256:287c59a646472087833053d43964b5f983e07c66c42b4a66576d371ff507aeb7 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: firehydrant-oas: inputs: - - location: ./openapi.yaml - overlays: - - location: .speakeasy/speakeasy-modifications-overlay.yaml - - location: errors-overlay.yaml + - location: ${GITHUB_WORKSPACE}/openapi.json registry: location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas targets: diff --git a/FUNCTIONS.md b/FUNCTIONS.md index e4a128da..00ea6170 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -19,18 +19,18 @@ specific category of applications. ## Example ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsGetAiPreferences } from "firehydrant-typescript-sdk/funcs/accountSettingsGetAiPreferences.js"; -import { SDKValidationError } from "firehydrant-typescript-sdk/models/errors/sdkvalidationerror.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { accountSettingsPing } from "firehydrant/funcs/accountSettingsPing.js"; +import { SDKValidationError } from "firehydrant/models/errors/sdkvalidationerror.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await accountSettingsGetAiPreferences(firehydrantTypescriptSDK); + const res = await accountSettingsPing(firehydrant); switch (true) { case res.ok: diff --git a/README.md b/README.md index 67128bbb..971e553c 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,118 @@ Developer-friendly & type-safe Typescript SDK specifically catered to leverage * ## Summary +FireHydrant API: The FireHydrant API is based around REST. It uses Bearer token authentication and returns JSON responses. You can use the FireHydrant API to configure integrations, define incidents, and set up webhooks--anything you can do on the FireHydrant UI. +* [Dig into our API endpoints](https://developers.firehydrant.io/docs/api) +* [View your bot users](https://app.firehydrant.io/organizations/bots) + +## Base API endpoint + +[https://api.firehydrant.io/v1](https://api.firehydrant.io/v1) + +## Current version + +v1 + +## Authentication + +All requests to the FireHydrant API require an `Authorization` header with the value set to `Bearer {token}`. FireHydrant supports bot tokens to act on behalf of a computer instead of a user's account. This prevents integrations from breaking when people leave your organization or their token is revoked. See the Bot tokens section (below) for more information on this. + +An example of a header to authenticate against FireHydrant would look like: + +``` +Authorization: Bearer fhb-thisismytoken +``` + +## Bot tokens + +To access the FireHydrant API, you must authenticate with a bot token. (You must have owner permissions on your organization to see bot tokens.) Bot users allow you to interact with the FireHydrant API by using token-based authentication. To create bot tokens, log in to your organization and refer to the **Bot users** [page](https://app.firehydrant.io/organizations/bots). + +Bot tokens enable you to create a bot that has no ties to any user. Normally, all actions associated with an API token are associated with the user who created it. Bot tokens attribute all actions to the bot user itself. This way, all data associated with the token actions can be performed against the FireHydrant API without a user. + +Every request to the API is authenticated unless specified otherwise. + +### Rate Limiting + +Currently, requests made with bot tokens are rate limited on a per-account level. If your account has multiple bot token then the rate limit is shared across all of them. As of February 7th, 2023, the rate limit is at least 50 requests per account every 10 seconds, or 300 requests per minute. + +Rate limited responses will be served with a `429` status code and a JSON body of: + +```json +{"error": "rate limit exceeded"} +``` +and headers of: +``` +"RateLimit-Limit" -> the maximum number of requests in the rate limit pool +"Retry-After" -> the number of seconds to wait before trying again +``` + +## How lists are returned + +API lists are returned as arrays. A paginated entity in FireHydrant will return two top-level keys in the response object: a data key and a pagination key. + +### Paginated requests + +The `data` key is returned as an array. Each item in the array includes all of the entity data specified in the API endpoint. (The per-page default for the array is 20 items.) + +Pagination is the second key (`pagination`) returned in the overall response body. It includes medtadata around the current page, total count of items, and options to go to the next and previous page. All of the specifications returned in the pagination object are available as URL parameters. So if you want to specify, for example, going to the second page of a response, you can send a request to the same endpoint but pass the URL parameter **page=2**. + +For example, you might request **https://api.firehydrant.io/v1/environments/** to retrieve environments data. The JSON returned contains the above-mentioned data section and pagination section. The data section includes various details about an incident, such as the environment name, description, and when it was created. + +``` +{ + "data": [ + { + "id": "f8125cf4-b3a7-4f88-b5ab-57a60b9ed89b", + "name": "Production - GCP", + "description": "", + "created_at": "2021-02-17T20:02:10.679Z" + }, + { + "id": "a69f1f58-af77-4708-802d-7e73c0bf261c", + "name": "Staging", + "description": "", + "created_at": "2021-04-16T13:41:59.418Z" + } + ], + "pagination": { + "count": 2, + "page": 1, + "items": 2, + "pages": 1, + "last": 1, + "prev": null, + "next": null + } +} +``` + +To request the second page, you'd request the same endpoint with the additional query parameter of `page` in the URL: + +``` +GET https://api.firehydrant.io/v1/environments?page=2 +``` + +If you need to modify the number of records coming back from FireHydrant, you can use the `per_page` parameter (max is 200): + +``` +GET https://api.firehydrant.io/v1/environments?per_page=50 +``` ## Table of Contents * [firehydrant-typescript-sdk](#firehydrant-typescript-sdk) + * [Base API endpoint](#base-api-endpoint) + * [Current version](#current-version) + * [Authentication](#authentication) + * [Bot tokens](#bot-tokens) + * [How lists are returned](#how-lists-are-returned) * [SDK Installation](#sdk-installation) * [Requirements](#requirements) * [SDK Example Usage](#sdk-example-usage) - * [Authentication](#authentication) + * [Authentication](#authentication-1) * [Available Resources and Operations](#available-resources-and-operations) * [Standalone functions](#standalone-functions) * [File uploads](#file-uploads) @@ -45,29 +146,116 @@ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https ### NPM ```bash -npm add firehydrant-typescript-sdk +npm add firehydrant ``` ### PNPM ```bash -pnpm add firehydrant-typescript-sdk +pnpm add firehydrant ``` ### Bun ```bash -bun add firehydrant-typescript-sdk +bun add firehydrant ``` ### Yarn ```bash -yarn add firehydrant-typescript-sdk zod +yarn add firehydrant zod # Note that Yarn does not install peer dependencies automatically. You will need # to install zod as shown above. ``` + +> [!NOTE] +> This package is published with CommonJS and ES Modules (ESM) support. + + +### Model Context Protocol (MCP) Server + +This SDK is also an installable MCP server where the various SDK methods are +exposed as tools that can be invoked by AI applications. + +> Node.js v20 or greater is required to run the MCP server from npm. + +
+Claude installation steps + +Add the following server definition to your `claude_desktop_config.json` file: + +```json +{ + "mcpServers": { + "Firehydrant": { + "command": "npx", + "args": [ + "-y", "--package", "firehydrant", + "--", + "mcp", "start", + "--api-key", "..." + ] + } + } +} +``` + +
+ +
+Cursor installation steps + +Create a `.cursor/mcp.json` file in your project root with the following content: + +```json +{ + "mcpServers": { + "Firehydrant": { + "command": "npx", + "args": [ + "-y", "--package", "firehydrant", + "--", + "mcp", "start", + "--api-key", "..." + ] + } + } +} +``` + +
+ +You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases: + +```bash +curl -L -o mcp-server \ + https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \ +chmod +x mcp-server +``` + +If the repo is a private repo you must add your Github PAT to download a release `-H "Authorization: Bearer {GITHUB_PAT}"`. + + +```json +{ + "mcpServers": { + "Todos": { + "command": "./DOWNLOAD/PATH/mcp-server", + "args": [ + "start" + ] + } + } +} +``` + +For a full list of server arguments, run: + +```sh +npx -y --package firehydrant -- mcp start --help +``` @@ -82,15 +270,14 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). ### Example ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings - .getAiPreferences(); + const result = await firehydrant.accountSettings.ping(); // Handle the result console.log(result); @@ -108,21 +295,20 @@ run(); This SDK supports the following security scheme globally: -| Name | Type | Scheme | Environment Variable | -| -------- | ------ | ------- | ---------------------------------- | -| `apiKey` | apiKey | API key | `FIREHYDRANTTYPESCRIPTSDK_API_KEY` | +| Name | Type | Scheme | Environment Variable | +| -------- | ------ | ------- | --------------------- | +| `apiKey` | apiKey | API key | `FIREHYDRANT_API_KEY` | To authenticate with the API the `apiKey` parameter must be set when initializing the SDK client instance. For example: ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings - .getAiPreferences(); + const result = await firehydrant.accountSettings.ping(); // Handle the result console.log(result); @@ -141,175 +327,195 @@ run(); ### [accountSettings](docs/sdks/accountsettings/README.md) +* [ping](docs/sdks/accountsettings/README.md#ping) - Check API connectivity +* [listEntitlements](docs/sdks/accountsettings/README.md#listentitlements) - List entitlements +* [pingNoauth](docs/sdks/accountsettings/README.md#pingnoauth) - Check API connectivity +* [getBootstrap](docs/sdks/accountsettings/README.md#getbootstrap) - Get initial application configuration * [getAiPreferences](docs/sdks/accountsettings/README.md#getaipreferences) - Get AI preferences * [updateAiPreferences](docs/sdks/accountsettings/README.md#updateaipreferences) - Update AI preferences -* [voteOnIncidentSummary](docs/sdks/accountsettings/README.md#voteonincidentsummary) - Vote on an AI-generated incident summary -* [getBootstrap](docs/sdks/accountsettings/README.md#getbootstrap) - Get initial application configuration and settings -* [listEntitlements](docs/sdks/accountsettings/README.md#listentitlements) - List entitlements -* [ping](docs/sdks/accountsettings/README.md#ping) - Check API connectivity -* [getSavedSearch](docs/sdks/accountsettings/README.md#getsavedsearch) - Get a saved search -* [deleteSavedSearch](docs/sdks/accountsettings/README.md#deletesavedsearch) - Delete a saved search -* [updateSavedSearch](docs/sdks/accountsettings/README.md#updatesavedsearch) - Update a saved search ### [alerts](docs/sdks/alerts/README.md) -* [list](docs/sdks/alerts/README.md#list) - List alerts -* [get](docs/sdks/alerts/README.md#get) - Get an alert -* [listForIncident](docs/sdks/alerts/README.md#listforincident) - List alerts for an incident -* [create](docs/sdks/alerts/README.md#create) - Attach alerts to an incident -* [listProcessingLogs](docs/sdks/alerts/README.md#listprocessinglogs) - List alert processing log entries - -### [awsCloudtrailBatchEvents](docs/sdks/awscloudtrailbatchevents/README.md) - -* [list](docs/sdks/awscloudtrailbatchevents/README.md#list) - List events for an AWS CloudTrail batch - -### [awsConnections](docs/sdks/awsconnections/README.md) - -* [list](docs/sdks/awsconnections/README.md#list) - List AWS integration connections -* [get](docs/sdks/awsconnections/README.md#get) - Get an AWS connection +* [listIncidentAlerts](docs/sdks/alerts/README.md#listincidentalerts) - List alerts for an incident +* [createIncidentAlert](docs/sdks/alerts/README.md#createincidentalert) - Attach an alert to an incident +* [updateIncidentAlertPrimary](docs/sdks/alerts/README.md#updateincidentalertprimary) - Set an alert as primary for an incident +* [deleteIncidentAlert](docs/sdks/alerts/README.md#deleteincidentalert) - Remove an alert from an incident +* [listAlerts](docs/sdks/alerts/README.md#listalerts) - List alerts +* [getAlert](docs/sdks/alerts/README.md#getalert) - Get an alert +* [listProcessingLogEntries](docs/sdks/alerts/README.md#listprocessinglogentries) - List alert processing log entries + +### [audiences](docs/sdks/audiences/README.md) + +* [listAudiences](docs/sdks/audiences/README.md#listaudiences) - List audiences +* [createAudience](docs/sdks/audiences/README.md#createaudience) - Create audience +* [getAudience](docs/sdks/audiences/README.md#getaudience) - Get audience +* [archiveAudience](docs/sdks/audiences/README.md#archiveaudience) - Archive audience +* [updateAudience](docs/sdks/audiences/README.md#updateaudience) - Update audience +* [restoreAudience](docs/sdks/audiences/README.md#restoreaudience) - Restore audience +* [getMemberDefaultAudience](docs/sdks/audiences/README.md#getmemberdefaultaudience) - Get default audience +* [setMemberDefaultAudience](docs/sdks/audiences/README.md#setmemberdefaultaudience) - Set default audience +* [getAudienceSummary](docs/sdks/audiences/README.md#getaudiencesummary) - Get latest summary +* [generateAudienceSummary](docs/sdks/audiences/README.md#generateaudiencesummary) - Generate summary +* [listAudienceSummaries](docs/sdks/audiences/README.md#listaudiencesummaries) - List audience summaries + +### [callRoutes](docs/sdks/callroutes/README.md) + +* [listCallRoutes](docs/sdks/callroutes/README.md#listcallroutes) - List call routes + +### [catalogEntries](docs/sdks/catalogentries/README.md) + +* [listEnvironments](docs/sdks/catalogentries/README.md#listenvironments) - List environments +* [createEnvironment](docs/sdks/catalogentries/README.md#createenvironment) - Create an environment +* [getEnvironment](docs/sdks/catalogentries/README.md#getenvironment) - Get an environment +* [deleteEnvironment](docs/sdks/catalogentries/README.md#deleteenvironment) - Archive an environment +* [updateEnvironment](docs/sdks/catalogentries/README.md#updateenvironment) - Update an environment +* [listServices](docs/sdks/catalogentries/README.md#listservices) - List services +* [createService](docs/sdks/catalogentries/README.md#createservice) - Create a service +* [createServiceLinks](docs/sdks/catalogentries/README.md#createservicelinks) - Create multiple services linked to external services +* [getService](docs/sdks/catalogentries/README.md#getservice) - Get a service +* [deleteService](docs/sdks/catalogentries/README.md#deleteservice) - Delete a service +* [updateService](docs/sdks/catalogentries/README.md#updateservice) - Update a service +* [getServiceDependencies](docs/sdks/catalogentries/README.md#getservicedependencies) - List dependencies for a service +* [listServiceAvailableUpstreamDependencies](docs/sdks/catalogentries/README.md#listserviceavailableupstreamdependencies) - List available upstream service dependencies +* [listServiceAvailableDownstreamDependencies](docs/sdks/catalogentries/README.md#listserviceavailabledownstreamdependencies) - List available downstream service dependencies +* [deleteServiceLink](docs/sdks/catalogentries/README.md#deleteservicelink) - Delete a service link +* [createServiceChecklistResponse](docs/sdks/catalogentries/README.md#createservicechecklistresponse) - Record a response for a checklist item +* [createServiceDependency](docs/sdks/catalogentries/README.md#createservicedependency) - Create a service dependency +* [getServiceDependency](docs/sdks/catalogentries/README.md#getservicedependency) - Get a service dependency +* [deleteServiceDependency](docs/sdks/catalogentries/README.md#deleteservicedependency) - Delete a service dependency +* [updateServiceDependency](docs/sdks/catalogentries/README.md#updateservicedependency) - Update a service dependency +* [listFunctionalities](docs/sdks/catalogentries/README.md#listfunctionalities) - List functionalities +* [createFunctionality](docs/sdks/catalogentries/README.md#createfunctionality) - Create a functionality +* [getFunctionality](docs/sdks/catalogentries/README.md#getfunctionality) - Get a functionality +* [deleteFunctionality](docs/sdks/catalogentries/README.md#deletefunctionality) - Archive a functionality +* [updateFunctionality](docs/sdks/catalogentries/README.md#updatefunctionality) - Update a functionality +* [listFunctionalityServices](docs/sdks/catalogentries/README.md#listfunctionalityservices) - List services for a functionality +* [listUserOwnedServices](docs/sdks/catalogentries/README.md#listuserownedservices) - List services owned by a user's teams +* [listInfrastructures](docs/sdks/catalogentries/README.md#listinfrastructures) - Lists functionality, service and environment objects +* [refreshCatalog](docs/sdks/catalogentries/README.md#refreshcatalog) - Refresh a service catalog +* [ingestCatalogData](docs/sdks/catalogentries/README.md#ingestcatalogdata) - Ingest service catalog data ### [changes](docs/sdks/changes/README.md) -* [listTypes](docs/sdks/changes/README.md#listtypes) - List change types -* [list](docs/sdks/changes/README.md#list) - List changes -* [create](docs/sdks/changes/README.md#create) - Create a change -* [listEvents](docs/sdks/changes/README.md#listevents) - List change events -* [createEvent](docs/sdks/changes/README.md#createevent) - Create a change event -* [getEvent](docs/sdks/changes/README.md#getevent) - Get a change event -* [deleteEvent](docs/sdks/changes/README.md#deleteevent) - Delete a change event -* [updateEvent](docs/sdks/changes/README.md#updateevent) - Update a change event -* [delete](docs/sdks/changes/README.md#delete) - Archive a change -* [update](docs/sdks/changes/README.md#update) - Update a change -* [listIdentities](docs/sdks/changes/README.md#listidentities) - List identities for a change -* [createIdentity](docs/sdks/changes/README.md#createidentity) - Create an identity for a change -* [deleteIdentity](docs/sdks/changes/README.md#deleteidentity) - Delete an identity from a change -* [updateIdentity](docs/sdks/changes/README.md#updateidentity) - Update an identity for a change -* [get](docs/sdks/changes/README.md#get) - Get a scheduled maintenance event -* [updateScheduledMaintenance](docs/sdks/changes/README.md#updatescheduledmaintenance) - Update a scheduled maintenance event - -### [checklistTemplates](docs/sdks/checklisttemplates/README.md) - -* [get](docs/sdks/checklisttemplates/README.md#get) - Get a checklist template +* [listChanges](docs/sdks/changes/README.md#listchanges) - List changes +* [createChange](docs/sdks/changes/README.md#createchange) - Create a new change entry +* [deleteChange](docs/sdks/changes/README.md#deletechange) - Archive a change entry +* [updateChange](docs/sdks/changes/README.md#updatechange) - Update a change entry +* [listChangeIdentities](docs/sdks/changes/README.md#listchangeidentities) - List identities for a change entry +* [createChangeIdentity](docs/sdks/changes/README.md#createchangeidentity) - Create an identity for a change entry +* [deleteChangeIdentity](docs/sdks/changes/README.md#deletechangeidentity) - Delete an identity from a change entry +* [updateChangeIdentity](docs/sdks/changes/README.md#updatechangeidentity) - Update an identity for a change entry +* [listChangeEvents](docs/sdks/changes/README.md#listchangeevents) - List change events +* [createChangeEvent](docs/sdks/changes/README.md#createchangeevent) - Create a change event +* [getChangeEvent](docs/sdks/changes/README.md#getchangeevent) - Get a change event +* [deleteChangeEvent](docs/sdks/changes/README.md#deletechangeevent) - Delete a change event +* [updateChangeEvent](docs/sdks/changes/README.md#updatechangeevent) - Update a change event +* [listChangeTypes](docs/sdks/changes/README.md#listchangetypes) - List change types ### [communication](docs/sdks/communication/README.md) -* [listTemplates](docs/sdks/communication/README.md#listtemplates) - List status update templates -* [getTemplate](docs/sdks/communication/README.md#gettemplate) - Get a status update template +* [listStatusUpdateTemplates](docs/sdks/communication/README.md#liststatusupdatetemplates) - List status update templates +* [createStatusUpdateTemplate](docs/sdks/communication/README.md#createstatusupdatetemplate) - Create a status update template +* [getStatusUpdateTemplate](docs/sdks/communication/README.md#getstatusupdatetemplate) - Get a status update template * [deleteStatusUpdateTemplate](docs/sdks/communication/README.md#deletestatusupdatetemplate) - Delete a status update template -* [updateTemplate](docs/sdks/communication/README.md#updatetemplate) - Update a status update template - -### [confluence](docs/sdks/confluence/README.md) - -* [listSpaces](docs/sdks/confluence/README.md#listspaces) - List Confluence spaces +* [updateStatusUpdateTemplate](docs/sdks/communication/README.md#updatestatusupdatetemplate) - Update a status update template ### [conversations](docs/sdks/conversations/README.md) -* [listComments](docs/sdks/conversations/README.md#listcomments) - List comments for a conversation -* [createComment](docs/sdks/conversations/README.md#createcomment) - Create a comment for a conversation -* [getComment](docs/sdks/conversations/README.md#getcomment) - Get a conversation comment -* [deleteComment](docs/sdks/conversations/README.md#deletecomment) - Delete a conversation comment -* [updateComment](docs/sdks/conversations/README.md#updatecomment) - Update a conversation comment +* [getVoteStatus](docs/sdks/conversations/README.md#getvotestatus) - Get votes +* [updateVote](docs/sdks/conversations/README.md#updatevote) - Update votes +* [deleteCommentReaction](docs/sdks/conversations/README.md#deletecommentreaction) - Delete a reaction from a conversation comment * [listCommentReactions](docs/sdks/conversations/README.md#listcommentreactions) - List reactions for a conversation comment * [createCommentReaction](docs/sdks/conversations/README.md#createcommentreaction) - Create a reaction for a conversation comment -* [deleteCommentReaction](docs/sdks/conversations/README.md#deletecommentreaction) - Delete a reaction from a conversation comment - -### [environments](docs/sdks/environments/README.md) - -* [list](docs/sdks/environments/README.md#list) - List environments -* [create](docs/sdks/environments/README.md#create) - Create an environment -* [get](docs/sdks/environments/README.md#get) - Get an environment -* [delete](docs/sdks/environments/README.md#delete) - Archive an environment -* [update](docs/sdks/environments/README.md#update) - Update an environment - - -### [functionalities](docs/sdks/functionalities/README.md) +* [getComment](docs/sdks/conversations/README.md#getcomment) - Get a conversation comment +* [deleteComment](docs/sdks/conversations/README.md#deletecomment) - Archive a conversation comment +* [updateComment](docs/sdks/conversations/README.md#updatecomment) - Update a conversation comment +* [listComments](docs/sdks/conversations/README.md#listcomments) - List comments for a conversation +* [createComment](docs/sdks/conversations/README.md#createcomment) - Create a conversation comment -* [list](docs/sdks/functionalities/README.md#list) - List functionalities -* [create](docs/sdks/functionalities/README.md#create) - Create a functionality -* [get](docs/sdks/functionalities/README.md#get) - Get a functionality -* [delete](docs/sdks/functionalities/README.md#delete) - Archive a functionality -* [update](docs/sdks/functionalities/README.md#update) - Update a functionality -* [listServices](docs/sdks/functionalities/README.md#listservices) - List services for a functionality ### [incidents](docs/sdks/incidents/README.md) -* [getAiSummaryVoteStatus](docs/sdks/incidents/README.md#getaisummaryvotestatus) - Get the vote status for an AI-generated incident summary -* [list](docs/sdks/incidents/README.md#list) - List incidents -* [create](docs/sdks/incidents/README.md#create) - Create an incident -* [get](docs/sdks/incidents/README.md#get) - Get an incident -* [archive](docs/sdks/incidents/README.md#archive) - Archive an incident -* [update](docs/sdks/incidents/README.md#update) - Update an incident -* [deleteAlert](docs/sdks/incidents/README.md#deletealert) - Delete an alert from an incident -* [setAlertAsPrimary](docs/sdks/incidents/README.md#setalertasprimary) - Set an alert as primary for an incident -* [listAttachments](docs/sdks/incidents/README.md#listattachments) - List attachments for an incident -* [createAttachment](docs/sdks/incidents/README.md#createattachment) - Create an attachment for an incident -* [getChannel](docs/sdks/incidents/README.md#getchannel) - Get chat channel information for an incident -* [close](docs/sdks/incidents/README.md#close) - Close an incident -* [listEvents](docs/sdks/incidents/README.md#listevents) - List events for an incident -* [getEvent](docs/sdks/incidents/README.md#getevent) - Get an incident event -* [deleteEvent](docs/sdks/incidents/README.md#deleteevent) - Delete an incident event -* [updateEvent](docs/sdks/incidents/README.md#updateevent) - Update an incident event -* [updateEventVotes](docs/sdks/incidents/README.md#updateeventvotes) - Update votes for an incident event -* [getEventVoteStatus](docs/sdks/incidents/README.md#geteventvotestatus) - Get vote counts for an incident event -* [createGenericChatMessage](docs/sdks/incidents/README.md#creategenericchatmessage) - Create a chat message for an incident -* [deleteChatMessage](docs/sdks/incidents/README.md#deletechatmessage) - Delete a chat message from an incident -* [updateChatMessage](docs/sdks/incidents/README.md#updatechatmessage) - Update a chat message in an incident -* [updateImpacts](docs/sdks/incidents/README.md#updateimpacts) - Replace all impacts for an incident -* [partialUpdateImpacts](docs/sdks/incidents/README.md#partialupdateimpacts) - Update impacts for an incident -* [listImpact](docs/sdks/incidents/README.md#listimpact) - List impacted infrastructure for an incident -* [createImpact](docs/sdks/incidents/README.md#createimpact) - Add impacted infrastructure to an incident -* [deleteImpact](docs/sdks/incidents/README.md#deleteimpact) - Remove impacted infrastructure from an incident -* [listLinks](docs/sdks/incidents/README.md#listlinks) - List links for an incident -* [createLink](docs/sdks/incidents/README.md#createlink) - Create a link for an incident -* [updateLink](docs/sdks/incidents/README.md#updatelink) - Update an external link for an incident -* [deleteLink](docs/sdks/incidents/README.md#deletelink) - Delete an external link from an incident -* [listMilestones](docs/sdks/incidents/README.md#listmilestones) - List milestones for an incident -* [updateMilestonesBulk](docs/sdks/incidents/README.md#updatemilestonesbulk) - Bulk update milestone timestamps for an incident -* [createNote](docs/sdks/incidents/README.md#createnote) - Create a note for an incident -* [updateNote](docs/sdks/incidents/README.md#updatenote) - Update a note for an incident -* [listRelatedChangeEvents](docs/sdks/incidents/README.md#listrelatedchangeevents) - List related changes for an incident -* [createRelatedChange](docs/sdks/incidents/README.md#createrelatedchange) - Add a related change to an incident -* [updateRelatedChangeEvent](docs/sdks/incidents/README.md#updaterelatedchangeevent) - Update a related change event for an incident -* [getRelationships](docs/sdks/incidents/README.md#getrelationships) - List incident relationships -* [resolve](docs/sdks/incidents/README.md#resolve) - Resolve an incident -* [listRoleAssignments](docs/sdks/incidents/README.md#listroleassignments) - List role assignments for an incident -* [createRoleAssignment](docs/sdks/incidents/README.md#createroleassignment) - Create a role assignment for an incident -* [deleteRoleAssignment](docs/sdks/incidents/README.md#deleteroleassignment) - Delete a role assignment from an incident -* [listSimilar](docs/sdks/incidents/README.md#listsimilar) - List similar incidents -* [listStatusPages](docs/sdks/incidents/README.md#liststatuspages) - List status pages for an incident -* [addStatusPage](docs/sdks/incidents/README.md#addstatuspage) - Add a status page to an incident -* [createTaskList](docs/sdks/incidents/README.md#createtasklist) - Add tasks from a task list to an incident -* [createTeamAssignment](docs/sdks/incidents/README.md#createteamassignment) - Assign a team to an incident -* [deleteTeamAssignment](docs/sdks/incidents/README.md#deleteteamassignment) - Remove a team assignment from an incident -* [getTranscript](docs/sdks/incidents/README.md#gettranscript) - List transcript messages for an incident -* [deleteTranscript](docs/sdks/incidents/README.md#deletetranscript) - Delete a transcript from an incident -* [unarchive](docs/sdks/incidents/README.md#unarchive) - Unarchive an incident -* [getUserRole](docs/sdks/incidents/README.md#getuserrole) - Get a user's role in an incident +* [listIncidents](docs/sdks/incidents/README.md#listincidents) - List incidents +* [createIncident](docs/sdks/incidents/README.md#createincident) - Create an incident +* [getIncidentChannel](docs/sdks/incidents/README.md#getincidentchannel) - Get chat channel information for an incident +* [closeIncident](docs/sdks/incidents/README.md#closeincident) - Close an incident +* [resolveIncident](docs/sdks/incidents/README.md#resolveincident) - Resolve an incident +* [getIncident](docs/sdks/incidents/README.md#getincident) - Get an incident +* [deleteIncident](docs/sdks/incidents/README.md#deleteincident) - Archive an incident +* [updateIncident](docs/sdks/incidents/README.md#updateincident) - Update an incident +* [unarchiveIncident](docs/sdks/incidents/README.md#unarchiveincident) - Unarchive an incident +* [bulkUpdateIncidentMilestones](docs/sdks/incidents/README.md#bulkupdateincidentmilestones) - Update milestone times +* [listIncidentMilestones](docs/sdks/incidents/README.md#listincidentmilestones) - List incident milestones +* [listIncidentChangeEvents](docs/sdks/incidents/README.md#listincidentchangeevents) - List related changes on an incident +* [createIncidentChangeEvent](docs/sdks/incidents/README.md#createincidentchangeevent) - Add a related change to an incident +* [updateIncidentChangeEvent](docs/sdks/incidents/README.md#updateincidentchangeevent) - Update a change attached to an incident +* [listIncidentStatusPages](docs/sdks/incidents/README.md#listincidentstatuspages) - List status pages for an incident +* [createIncidentStatusPage](docs/sdks/incidents/README.md#createincidentstatuspage) - Add a status page to an incident +* [listIncidentLinks](docs/sdks/incidents/README.md#listincidentlinks) - List links on an incident +* [createIncidentLink](docs/sdks/incidents/README.md#createincidentlink) - Add a link to an incident +* [updateIncidentLink](docs/sdks/incidents/README.md#updateincidentlink) - Update the external incident link +* [deleteIncidentLink](docs/sdks/incidents/README.md#deleteincidentlink) - Remove a link from an incident +* [updateTranscriptAttribution](docs/sdks/incidents/README.md#updatetranscriptattribution) - Update the attribution of a transcript +* [listTranscriptEntries](docs/sdks/incidents/README.md#listtranscriptentries) - Lists all of the messages in the incident's transcript +* [deleteTranscriptEntry](docs/sdks/incidents/README.md#deletetranscriptentry) - Delete a transcript from an incident +* [listIncidentConferenceBridges](docs/sdks/incidents/README.md#listincidentconferencebridges) - Retrieve all conference bridges for an incident +* [getConferenceBridgeTranslation](docs/sdks/incidents/README.md#getconferencebridgetranslation) - Retrieve the translations for a specific conference bridge +* [listSimilarIncidents](docs/sdks/incidents/README.md#listsimilarincidents) - List similar incidents +* [listIncidentAttachments](docs/sdks/incidents/README.md#listincidentattachments) - List attachments for an incident +* [createIncidentAttachment](docs/sdks/incidents/README.md#createincidentattachment) - Add an attachment to the incident timeline +* [listIncidentEvents](docs/sdks/incidents/README.md#listincidentevents) - List events for an incident +* [getIncidentEvent](docs/sdks/incidents/README.md#getincidentevent) - Get an incident event +* [deleteIncidentEvent](docs/sdks/incidents/README.md#deleteincidentevent) - Delete an incident event +* [updateIncidentEvent](docs/sdks/incidents/README.md#updateincidentevent) - Update an incident event +* [updateIncidentImpactPut](docs/sdks/incidents/README.md#updateincidentimpactput) - Update impacts for an incident +* [updateIncidentImpactPatch](docs/sdks/incidents/README.md#updateincidentimpactpatch) - Update impacts for an incident +* [listIncidentImpacts](docs/sdks/incidents/README.md#listincidentimpacts) - List impacted infrastructure for an incident +* [createIncidentImpact](docs/sdks/incidents/README.md#createincidentimpact) - Add impacted infrastructure to an incident +* [deleteIncidentImpact](docs/sdks/incidents/README.md#deleteincidentimpact) - Remove impacted infrastructure from an incident +* [createIncidentNote](docs/sdks/incidents/README.md#createincidentnote) - Add a note to an incident +* [updateIncidentNote](docs/sdks/incidents/README.md#updateincidentnote) - Update a note +* [createIncidentChatMessage](docs/sdks/incidents/README.md#createincidentchatmessage) - Add a chat message to an incident +* [deleteIncidentChatMessage](docs/sdks/incidents/README.md#deleteincidentchatmessage) - Delete a chat message from an incident +* [updateIncidentChatMessage](docs/sdks/incidents/README.md#updateincidentchatmessage) - Update a chat message on an incident +* [listIncidentRoleAssignments](docs/sdks/incidents/README.md#listincidentroleassignments) - List incident assignees +* [createIncidentRoleAssignment](docs/sdks/incidents/README.md#createincidentroleassignment) - Assign a user to an incident +* [deleteIncidentRoleAssignment](docs/sdks/incidents/README.md#deleteincidentroleassignment) - Unassign a user from an incident +* [createIncidentTeamAssignment](docs/sdks/incidents/README.md#createincidentteamassignment) - Assign a team to an incident +* [deleteIncidentTeamAssignment](docs/sdks/incidents/README.md#deleteincidentteamassignment) - Unassign a team from an incident +* [getIncidentUser](docs/sdks/incidents/README.md#getincidentuser) - Get the current user's incident role +* [getIncidentRelationships](docs/sdks/incidents/README.md#getincidentrelationships) - List incident relationships +* [listScheduledMaintenances](docs/sdks/incidents/README.md#listscheduledmaintenances) - List scheduled maintenance events +* [createScheduledMaintenance](docs/sdks/incidents/README.md#createscheduledmaintenance) - Create a scheduled maintenance event +* [getScheduledMaintenance](docs/sdks/incidents/README.md#getscheduledmaintenance) - Get a scheduled maintenance event +* [deleteScheduledMaintenance](docs/sdks/incidents/README.md#deletescheduledmaintenance) - Delete a scheduled maintenance event +* [updateScheduledMaintenance](docs/sdks/incidents/README.md#updatescheduledmaintenance) - Update a scheduled maintenance event +* [getAiIncidentSummaryVoteStatus](docs/sdks/incidents/README.md#getaiincidentsummaryvotestatus) - Get the current user's vote status for an AI-generated incident summary +* [voteAiIncidentSummary](docs/sdks/incidents/README.md#voteaiincidentsummary) - Vote on an AI-generated incident summary ### [incidentSettings](docs/sdks/incidentsettings/README.md) -* [listCustomFieldDefinitions](docs/sdks/incidentsettings/README.md#listcustomfielddefinitions) - List custom field definitions -* [createCustomFieldDefinition](docs/sdks/incidentsettings/README.md#createcustomfielddefinition) - Create a custom field definition -* [deleteCustomFieldDefinition](docs/sdks/incidentsettings/README.md#deletecustomfielddefinition) - Delete a custom field definition -* [updateCustomFieldDefinition](docs/sdks/incidentsettings/README.md#updatecustomfielddefinition) - Update a custom field definition -* [listSelectOptions](docs/sdks/incidentsettings/README.md#listselectoptions) - List select options for a custom field -* [getFormConfiguration](docs/sdks/incidentsettings/README.md#getformconfiguration) - Get a form configuration -* [listRoles](docs/sdks/incidentsettings/README.md#listroles) - List incident roles +* [listIncidentRoles](docs/sdks/incidentsettings/README.md#listincidentroles) - List incident roles * [createIncidentRole](docs/sdks/incidentsettings/README.md#createincidentrole) - Create an incident role * [getIncidentRole](docs/sdks/incidentsettings/README.md#getincidentrole) - Get an incident role -* [deleteRole](docs/sdks/incidentsettings/README.md#deleterole) - Archive an incident role +* [deleteIncidentRole](docs/sdks/incidentsettings/README.md#deleteincidentrole) - Archive an incident role * [updateIncidentRole](docs/sdks/incidentsettings/README.md#updateincidentrole) - Update an incident role -* [listIncidentTags](docs/sdks/incidentsettings/README.md#listincidenttags) - List incident tags * [validateIncidentTags](docs/sdks/incidentsettings/README.md#validateincidenttags) - Validate incident tags +* [listIncidentTags](docs/sdks/incidentsettings/README.md#listincidenttags) - List incident tags * [listIncidentTypes](docs/sdks/incidentsettings/README.md#listincidenttypes) - List incident types * [createIncidentType](docs/sdks/incidentsettings/README.md#createincidenttype) - Create an incident type * [getIncidentType](docs/sdks/incidentsettings/README.md#getincidenttype) - Get an incident type -* [archiveIncidentType](docs/sdks/incidentsettings/README.md#archiveincidenttype) - Archive an incident type -* [updateType](docs/sdks/incidentsettings/README.md#updatetype) - Update an incident type -* [createMilestone](docs/sdks/incidentsettings/README.md#createmilestone) - Create a milestone for an incident lifecycle -* [deleteLifecycleMilestone](docs/sdks/incidentsettings/README.md#deletelifecyclemilestone) - Delete a lifecycle milestone -* [updateLifecycleMilestone](docs/sdks/incidentsettings/README.md#updatelifecyclemilestone) - Update a lifecycle milestone -* [listLifecyclePhases](docs/sdks/incidentsettings/README.md#listlifecyclephases) - List lifecycle phases and milestones +* [deleteIncidentType](docs/sdks/incidentsettings/README.md#deleteincidenttype) - Archive an incident type +* [updateIncidentType](docs/sdks/incidentsettings/README.md#updateincidenttype) - Update an incident type +* [listLifecycleMeasurementDefinitions](docs/sdks/incidentsettings/README.md#listlifecyclemeasurementdefinitions) - List measurement definitions +* [createLifecycleMeasurementDefinition](docs/sdks/incidentsettings/README.md#createlifecyclemeasurementdefinition) - Create a measurement definition +* [getLifecycleMeasurementDefinition](docs/sdks/incidentsettings/README.md#getlifecyclemeasurementdefinition) - Get a measurement definition +* [deleteLifecycleMeasurementDefinition](docs/sdks/incidentsettings/README.md#deletelifecyclemeasurementdefinition) - Archive a measurement definition +* [updateLifecycleMeasurementDefinition](docs/sdks/incidentsettings/README.md#updatelifecyclemeasurementdefinition) - Update a measurement definition +* [listLifecyclePhases](docs/sdks/incidentsettings/README.md#listlifecyclephases) - List phases and milestones +* [createLifecycleMilestone](docs/sdks/incidentsettings/README.md#createlifecyclemilestone) - Create a milestone +* [deleteLifecycleMilestone](docs/sdks/incidentsettings/README.md#deletelifecyclemilestone) - Delete a milestone +* [updateLifecycleMilestone](docs/sdks/incidentsettings/README.md#updatelifecyclemilestone) - Update a milestone * [listPriorities](docs/sdks/incidentsettings/README.md#listpriorities) - List priorities * [createPriority](docs/sdks/incidentsettings/README.md#createpriority) - Create a priority * [getPriority](docs/sdks/incidentsettings/README.md#getpriority) - Get a priority @@ -326,327 +532,273 @@ run(); * [createSeverityMatrixCondition](docs/sdks/incidentsettings/README.md#createseveritymatrixcondition) - Create a severity matrix condition * [getSeverityMatrixCondition](docs/sdks/incidentsettings/README.md#getseveritymatrixcondition) - Get a severity matrix condition * [deleteSeverityMatrixCondition](docs/sdks/incidentsettings/README.md#deleteseveritymatrixcondition) - Delete a severity matrix condition -* [updateCondition](docs/sdks/incidentsettings/README.md#updatecondition) - Update a severity matrix condition +* [updateSeverityMatrixCondition](docs/sdks/incidentsettings/README.md#updateseveritymatrixcondition) - Update a severity matrix condition * [listSeverityMatrixImpacts](docs/sdks/incidentsettings/README.md#listseveritymatriximpacts) - List severity matrix impacts -* [createImpact](docs/sdks/incidentsettings/README.md#createimpact) - Create a severity matrix impact -* [deleteSeverityMatrixImpact](docs/sdks/incidentsettings/README.md#deleteseveritymatriximpact) - Delete an impact from the severity matrix -* [updateImpact](docs/sdks/incidentsettings/README.md#updateimpact) - Update an impact in the severity matrix -* [listTicketingPriorities](docs/sdks/incidentsettings/README.md#listticketingpriorities) - List ticketing priorities -* [createTicketingPriority](docs/sdks/incidentsettings/README.md#createticketingpriority) - Create a ticketing priority - -### [infrastructures](docs/sdks/infrastructures/README.md) - -* [list](docs/sdks/infrastructures/README.md#list) - List catalog entries +* [createSeverityMatrixImpact](docs/sdks/incidentsettings/README.md#createseveritymatriximpact) - Create a severity matrix impact +* [deleteSeverityMatrixImpact](docs/sdks/incidentsettings/README.md#deleteseveritymatriximpact) - Delete a severity matrix impact +* [updateSeverityMatrixImpact](docs/sdks/incidentsettings/README.md#updateseveritymatriximpact) - Update a severity matrix impact +* [deleteCustomFieldDefinition](docs/sdks/incidentsettings/README.md#deletecustomfielddefinition) - Delete a custom field definition +* [updateCustomFieldDefinition](docs/sdks/incidentsettings/README.md#updatecustomfielddefinition) - Update a custom field definition +* [listCustomFieldDefinitions](docs/sdks/incidentsettings/README.md#listcustomfielddefinitions) - List custom field definitions +* [createCustomFieldDefinition](docs/sdks/incidentsettings/README.md#createcustomfielddefinition) - Create a custom field definition +* [listCustomFieldSelectOptions](docs/sdks/incidentsettings/README.md#listcustomfieldselectoptions) - Get available values for a custom field +* [getFormConfiguration](docs/sdks/incidentsettings/README.md#getformconfiguration) - Get a form configuration ### [integrations](docs/sdks/integrations/README.md) -* [list](docs/sdks/integrations/README.md#list) - List all available integrations -* [listCloudtrailBatches](docs/sdks/integrations/README.md#listcloudtrailbatches) - List AWS CloudTrail batches -* [updateCloudTrailBatch](docs/sdks/integrations/README.md#updatecloudtrailbatch) - Update an AWS CloudTrail batch +* [listIntegrations](docs/sdks/integrations/README.md#listintegrations) - List integrations +* [getIntegration](docs/sdks/integrations/README.md#getintegration) - Get an integration +* [updateFieldMap](docs/sdks/integrations/README.md#updatefieldmap) - Update field mapping +* [listFieldMapAvailableFields](docs/sdks/integrations/README.md#listfieldmapavailablefields) - List available fields for field mapping +* [listAuthedProviders](docs/sdks/integrations/README.md#listauthedproviders) - Lists the available and configured integrations +* [updateAuthedProvider](docs/sdks/integrations/README.md#updateauthedprovider) - Get an authed provider * [listConnections](docs/sdks/integrations/README.md#listconnections) - List integration connections * [createConnection](docs/sdks/integrations/README.md#createconnection) - Create a new integration connection -* [updateConnection](docs/sdks/integrations/README.md#updateconnection) - Update an integration connection * [refreshConnection](docs/sdks/integrations/README.md#refreshconnection) - Refresh an integration connection -* [updateFieldMap](docs/sdks/integrations/README.md#updatefieldmap) - Update a field mapping configuration -* [getFieldMapAvailableFields](docs/sdks/integrations/README.md#getfieldmapavailablefields) - List available fields for field mapping -* [listEmojiActions](docs/sdks/integrations/README.md#listemojiactions) - List Slack emoji actions -* [getStatus](docs/sdks/integrations/README.md#getstatus) - Get an integration status +* [updateConnection](docs/sdks/integrations/README.md#updateconnection) - Update an integration connection +* [listConnectionStatuses](docs/sdks/integrations/README.md#listconnectionstatuses) - Get integration connection status +* [listConnectionStatusesBySlug](docs/sdks/integrations/README.md#listconnectionstatusesbyslug) - Get an integration connection status +* [listConnectionStatusesBySlugAndId](docs/sdks/integrations/README.md#listconnectionstatusesbyslugandid) - Get an integration connection status +* [listAwsConnections](docs/sdks/integrations/README.md#listawsconnections) - List AWS connections +* [getAwsConnection](docs/sdks/integrations/README.md#getawsconnection) - Get an AWS connection +* [updateAwsConnection](docs/sdks/integrations/README.md#updateawsconnection) - Update an AWS connection +* [listAwsCloudtrailBatches](docs/sdks/integrations/README.md#listawscloudtrailbatches) - List CloudTrail batches +* [getAwsCloudtrailBatch](docs/sdks/integrations/README.md#getawscloudtrailbatch) - Get a CloudTrail batch +* [updateAwsCloudtrailBatch](docs/sdks/integrations/README.md#updateawscloudtrailbatch) - Update a CloudTrail batch +* [listAwsCloudtrailBatchEvents](docs/sdks/integrations/README.md#listawscloudtrailbatchevents) - List events for an AWS CloudTrail batch +* [searchConfluenceSpaces](docs/sdks/integrations/README.md#searchconfluencespaces) - List Confluence spaces +* [listSlackWorkspaces](docs/sdks/integrations/README.md#listslackworkspaces) - List Slack workspaces +* [listSlackUsergroups](docs/sdks/integrations/README.md#listslackusergroups) - List Slack user groups +* [listSlackEmojiActions](docs/sdks/integrations/README.md#listslackemojiactions) - List Slack emoji actions +* [createSlackEmojiAction](docs/sdks/integrations/README.md#createslackemojiaction) - Create a new Slack emoji action +* [getSlackEmojiAction](docs/sdks/integrations/README.md#getslackemojiaction) - Get a Slack emoji action +* [deleteSlackEmojiAction](docs/sdks/integrations/README.md#deleteslackemojiaction) - Delete a Slack emoji action +* [updateSlackEmojiAction](docs/sdks/integrations/README.md#updateslackemojiaction) - Update a Slack emoji action +* [listStatuspageConnections](docs/sdks/integrations/README.md#liststatuspageconnections) - List Statuspage connections * [getStatuspageConnection](docs/sdks/integrations/README.md#getstatuspageconnection) - Get a Statuspage connection * [deleteStatuspageConnection](docs/sdks/integrations/README.md#deletestatuspageconnection) - Delete a Statuspage connection -* [get](docs/sdks/integrations/README.md#get) - Get an integration -* [deletePriority](docs/sdks/integrations/README.md#deletepriority) - Delete a ticketing priority -* [updatePriority](docs/sdks/integrations/README.md#updatepriority) - Update a ticketing priority -* [listProjects](docs/sdks/integrations/README.md#listprojects) - List ticketing projects -* [getProjectConfigurationOptions](docs/sdks/integrations/README.md#getprojectconfigurationoptions) - List configuration options for a ticketing project -* [getProjectFieldOptions](docs/sdks/integrations/README.md#getprojectfieldoptions) - List configuration options for a ticketing project field -* [createFieldMap](docs/sdks/integrations/README.md#createfieldmap) - Create a field mapping for a ticketing project -* [getAvailableFields](docs/sdks/integrations/README.md#getavailablefields) - List available fields for ticket field mapping -* [deleteFieldMap](docs/sdks/integrations/README.md#deletefieldmap) - Delete a field map for a ticketing project -* [updateTicketingFieldMap](docs/sdks/integrations/README.md#updateticketingfieldmap) - Update a field map for a ticketing project -* [deleteProjectConfig](docs/sdks/integrations/README.md#deleteprojectconfig) - Delete a ticketing project configuration -* [getTicket](docs/sdks/integrations/README.md#getticket) - Get a ticket - -#### [integrations.aws](docs/sdks/aws/README.md) - -* [getCloudTrailBatch](docs/sdks/aws/README.md#getcloudtrailbatch) - Get an AWS CloudTrail batch -* [updateConnection](docs/sdks/aws/README.md#updateconnection) - Update an AWS connection - -#### [integrations.slack](docs/sdks/firehydranttypescriptsdkslack/README.md) - -* [getEmojiAction](docs/sdks/firehydranttypescriptsdkslack/README.md#getemojiaction) - Get a Slack emoji action -* [deleteEmojiAction](docs/sdks/firehydranttypescriptsdkslack/README.md#deleteemojiaction) - Delete a Slack emoji action -* [listWorkspaces](docs/sdks/firehydranttypescriptsdkslack/README.md#listworkspaces) - List Slack workspaces for a connection - -#### [integrations.statuspage](docs/sdks/firehydranttypescriptsdkstatuspage/README.md) - -* [listConnections](docs/sdks/firehydranttypescriptsdkstatuspage/README.md#listconnections) - List Statuspage connections -* [listPages](docs/sdks/firehydranttypescriptsdkstatuspage/README.md#listpages) - List StatusPage pages for a connection - -#### [integrations.ticketing](docs/sdks/firehydranttypescriptsdkticketing/README.md) - -* [getProject](docs/sdks/firehydranttypescriptsdkticketing/README.md#getproject) - Get a ticketing project -* [listTags](docs/sdks/firehydranttypescriptsdkticketing/README.md#listtags) - List ticket tags - -### [maintenances](docs/sdks/maintenances/README.md) - -* [list](docs/sdks/maintenances/README.md#list) - List scheduled maintenance events -* [create](docs/sdks/maintenances/README.md#create) - Create a scheduled maintenance event -* [delete](docs/sdks/maintenances/README.md#delete) - Delete a scheduled maintenance event - -### [metrics](docs/sdks/metrics/README.md) - -* [getInfrastructure](docs/sdks/metrics/README.md#getinfrastructure) - Get metrics for a specific catalog entry +* [updateStatuspageConnection](docs/sdks/integrations/README.md#updatestatuspageconnection) - Update a Statuspage connection +* [listStatuspageConnectionPages](docs/sdks/integrations/README.md#liststatuspageconnectionpages) - List StatusPage pages for a connection +* [searchZendeskTickets](docs/sdks/integrations/README.md#searchzendesktickets) - Search for Zendesk tickets +* [getZendeskCustomerSupportIssue](docs/sdks/integrations/README.md#getzendeskcustomersupportissue) - Search for Zendesk tickets ### [metricsReporting](docs/sdks/metricsreporting/README.md) -* [listMeasurementDefinitions](docs/sdks/metricsreporting/README.md#listmeasurementdefinitions) - List measurement definitions -* [createMeasurementDefinition](docs/sdks/metricsreporting/README.md#createmeasurementdefinition) - Create a measurement definition -* [getMeasurementDefinition](docs/sdks/metricsreporting/README.md#getmeasurementdefinition) - Get a measurement definition -* [deleteMeasurementDefinition](docs/sdks/metricsreporting/README.md#deletemeasurementdefinition) - Archive a measurement definition -* [updateMeasurementDefinition](docs/sdks/metricsreporting/README.md#updatemeasurementdefinition) - Update a measurement definition +* [getMeanTimeReport](docs/sdks/metricsreporting/README.md#getmeantimereport) - Get mean time metrics for incidents +* [listRetrospectiveMetrics](docs/sdks/metricsreporting/README.md#listretrospectivemetrics) - List retrospective metrics +* [listUserInvolvementMetrics](docs/sdks/metricsreporting/README.md#listuserinvolvementmetrics) - List user metrics * [listIncidentMetrics](docs/sdks/metricsreporting/README.md#listincidentmetrics) - List incident metrics and analytics -* [listRetrospectives](docs/sdks/metricsreporting/README.md#listretrospectives) - List retrospective metrics for a date range -* [listUserInvolvementMetrics](docs/sdks/metricsreporting/README.md#listuserinvolvementmetrics) - List user involvement metrics -* [listInfrastructureMetrics](docs/sdks/metricsreporting/README.md#listinfrastructuremetrics) - List metrics for all services, environments, functionalities, or customers -* [getMeanTime](docs/sdks/metricsreporting/README.md#getmeantime) - Get mean time metrics for incidents +* [listInfrastructureTypeMetrics](docs/sdks/metricsreporting/README.md#listinfrastructuretypemetrics) - List metrics for a component type +* [listInfrastructureMetrics](docs/sdks/metricsreporting/README.md#listinfrastructuremetrics) - Get metrics for a component +* [getSavedSearch](docs/sdks/metricsreporting/README.md#getsavedsearch) - Get a saved search +* [deleteSavedSearch](docs/sdks/metricsreporting/README.md#deletesavedsearch) - Delete a saved search +* [updateSavedSearch](docs/sdks/metricsreporting/README.md#updatesavedsearch) - Update a saved search * [listSavedSearches](docs/sdks/metricsreporting/README.md#listsavedsearches) - List saved searches * [createSavedSearch](docs/sdks/metricsreporting/README.md#createsavedsearch) - Create a saved search - -### [onCallSchedules](docs/sdks/oncallschedules/README.md) - -* [delete](docs/sdks/oncallschedules/README.md#delete) - Delete an on-call schedule for a team - -### [projectConfigurations](docs/sdks/projectconfigurations/README.md) - -* [create](docs/sdks/projectconfigurations/README.md#create) - Create a ticketing project configuration -* [get](docs/sdks/projectconfigurations/README.md#get) - Get a ticketing project configuration +* [getSignalsTimeseriesAnalytics](docs/sdks/metricsreporting/README.md#getsignalstimeseriesanalytics) - Generate timeseries alert metrics +* [getSignalsGroupedMetrics](docs/sdks/metricsreporting/README.md#getsignalsgroupedmetrics) - Generate grouped alert metrics +* [getSignalsMttxAnalytics](docs/sdks/metricsreporting/README.md#getsignalsmttxanalytics) - Get MTTX analytics for signals ### [retrospectives](docs/sdks/retrospectives/README.md) -* [listQuestions](docs/sdks/retrospectives/README.md#listquestions) - List retrospective questions -* [updateQuestions](docs/sdks/retrospectives/README.md#updatequestions) - Update retrospective questions -* [getQuestion](docs/sdks/retrospectives/README.md#getquestion) - Get a retrospective question -* [listReports](docs/sdks/retrospectives/README.md#listreports) - List retrospective reports -* [createReport](docs/sdks/retrospectives/README.md#createreport) - Create a retrospective report -* [getReport](docs/sdks/retrospectives/README.md#getreport) - Get a retrospective report -* [updateReport](docs/sdks/retrospectives/README.md#updatereport) - Update a retrospective report -* [updateField](docs/sdks/retrospectives/README.md#updatefield) - Update a retrospective field -* [publishReport](docs/sdks/retrospectives/README.md#publishreport) - Publish a retrospective report -* [listReportReasons](docs/sdks/retrospectives/README.md#listreportreasons) - List contributing factors for a retrospective report -* [createReason](docs/sdks/retrospectives/README.md#createreason) - Create a contributing factor for a retrospective report -* [updateReportReasonOrder](docs/sdks/retrospectives/README.md#updatereportreasonorder) - Update the order of contributing factors in a retrospective report -* [deleteReason](docs/sdks/retrospectives/README.md#deletereason) - Delete a contributing factor from a retrospective report -* [updateReason](docs/sdks/retrospectives/README.md#updatereason) - Update a contributing factor in a retrospective report +* [shareIncidentRetrospectives](docs/sdks/retrospectives/README.md#shareincidentretrospectives) - Share an incident's retrospective +* [exportIncidentRetrospectives](docs/sdks/retrospectives/README.md#exportincidentretrospectives) - Export an incident's retrospective(s) +* [listIncidentRetrospectives](docs/sdks/retrospectives/README.md#listincidentretrospectives) - All attached retrospectives for an incident +* [createIncidentRetrospective](docs/sdks/retrospectives/README.md#createincidentretrospective) - Create a new retrospective on the incident using the template +* [updateIncidentRetrospective](docs/sdks/retrospectives/README.md#updateincidentretrospective) - Update a retrospective on the incident +* [createIncidentRetrospectiveField](docs/sdks/retrospectives/README.md#createincidentretrospectivefield) - Appends a new incident retrospective field to an incident retrospective +* [getIncidentRetrospectiveField](docs/sdks/retrospectives/README.md#getincidentretrospectivefield) - Get a retrospective field +* [updateIncidentRetrospectiveField](docs/sdks/retrospectives/README.md#updateincidentretrospectivefield) - Update the value on a retrospective field +* [createIncidentRetrospectiveDynamicInput](docs/sdks/retrospectives/README.md#createincidentretrospectivedynamicinput) - Add a new dynamic input field to a retrospective's dynamic input group field +* [deleteIncidentRetrospectiveDynamicInput](docs/sdks/retrospectives/README.md#deleteincidentretrospectivedynamicinput) - Removes a dynamic input from a retrospective's dynamic input group field +* [listRetrospectives](docs/sdks/retrospectives/README.md#listretrospectives) - List retrospective reports +* [listPostMortemReports](docs/sdks/retrospectives/README.md#listpostmortemreports) - List retrospective reports +* [createPostMortemReport](docs/sdks/retrospectives/README.md#createpostmortemreport) - Create a retrospective report +* [getPostMortemReport](docs/sdks/retrospectives/README.md#getpostmortemreport) - Get a retrospective report +* [updatePostMortemReport](docs/sdks/retrospectives/README.md#updatepostmortemreport) - Update a retrospective report +* [listPostMortemReasons](docs/sdks/retrospectives/README.md#listpostmortemreasons) - List contributing factors for a retrospective report +* [createPostMortemReason](docs/sdks/retrospectives/README.md#createpostmortemreason) - Create a contributing factor for a retrospective report +* [deletePostMortemReason](docs/sdks/retrospectives/README.md#deletepostmortemreason) - Delete a contributing factor from a retrospective report +* [updatePostMortemReason](docs/sdks/retrospectives/README.md#updatepostmortemreason) - Update a contributing factor in a retrospective report +* [reorderPostMortemReasons](docs/sdks/retrospectives/README.md#reorderpostmortemreasons) - Reorder a contributing factor for a retrospective report +* [publishPostMortemReport](docs/sdks/retrospectives/README.md#publishpostmortemreport) - Publish a retrospective report +* [updatePostMortemField](docs/sdks/retrospectives/README.md#updatepostmortemfield) - Update a retrospective field +* [listPostMortemQuestions](docs/sdks/retrospectives/README.md#listpostmortemquestions) - List retrospective questions +* [updatePostMortemQuestions](docs/sdks/retrospectives/README.md#updatepostmortemquestions) - Update retrospective questions +* [getPostMortemQuestion](docs/sdks/retrospectives/README.md#getpostmortemquestion) - Get a retrospective question +* [listRetrospectiveTemplates](docs/sdks/retrospectives/README.md#listretrospectivetemplates) - List retrospective templates +* [createRetrospectiveTemplate](docs/sdks/retrospectives/README.md#createretrospectivetemplate) - Create a retrospective template +* [getRetrospectiveTemplate](docs/sdks/retrospectives/README.md#getretrospectivetemplate) - Get a retrospective template +* [deleteRetrospectiveTemplate](docs/sdks/retrospectives/README.md#deleteretrospectivetemplate) - Delete a retrospective template +* [updateRetrospectiveTemplate](docs/sdks/retrospectives/README.md#updateretrospectivetemplate) - Update a retrospective template ### [runbooks](docs/sdks/runbooks/README.md) -* [listAudits](docs/sdks/runbooks/README.md#listaudits) - List runbook audits -* [list](docs/sdks/runbooks/README.md#list) - List runbooks -* [create](docs/sdks/runbooks/README.md#create) - Create a runbook -* [listActions](docs/sdks/runbooks/README.md#listactions) - List runbook actions -* [listExecutions](docs/sdks/runbooks/README.md#listexecutions) - List runbook executions -* [createExecution](docs/sdks/runbooks/README.md#createexecution) - Create a runbook execution -* [getExecution](docs/sdks/runbooks/README.md#getexecution) - Get a runbook execution -* [updateExecutionStep](docs/sdks/runbooks/README.md#updateexecutionstep) - Update a runbook execution step -* [getExecutionStepScript](docs/sdks/runbooks/README.md#getexecutionstepscript) - Get a runbook execution step script -* [updateExecutionStepScriptState](docs/sdks/runbooks/README.md#updateexecutionstepscriptstate) - Update the script state for a runbook execution step -* [updateExecutionStepVotes](docs/sdks/runbooks/README.md#updateexecutionstepvotes) - Update votes for a runbook execution step -* [getStepVoteStatus](docs/sdks/runbooks/README.md#getstepvotestatus) - Get vote counts for a runbook step -* [updateExecutionVotes](docs/sdks/runbooks/README.md#updateexecutionvotes) - Vote on a runbook execution -* [getExecutionVoteStatus](docs/sdks/runbooks/README.md#getexecutionvotestatus) - Get vote counts for a runbook execution -* [listSelectOptions](docs/sdks/runbooks/README.md#listselectoptions) - List select options for a runbook integration action field -* [get](docs/sdks/runbooks/README.md#get) - Get a runbook -* [update](docs/sdks/runbooks/README.md#update) - Update a runbook -* [delete](docs/sdks/runbooks/README.md#delete) - Delete a runbook - -#### [runbooks.executions](docs/sdks/executions/README.md) - -* [delete](docs/sdks/executions/README.md#delete) - Terminate a runbook execution +* [listRunbookActions](docs/sdks/runbooks/README.md#listrunbookactions) - List runbook actions +* [listRunbookExecutions](docs/sdks/runbooks/README.md#listrunbookexecutions) - List runbook executions +* [createRunbookExecution](docs/sdks/runbooks/README.md#createrunbookexecution) - Create a runbook execution +* [getRunbookExecution](docs/sdks/runbooks/README.md#getrunbookexecution) - Get a runbook execution +* [deleteRunbookExecution](docs/sdks/runbooks/README.md#deleterunbookexecution) - Terminate a runbook execution +* [updateRunbookExecutionStep](docs/sdks/runbooks/README.md#updaterunbookexecutionstep) - Update a runbook step execution +* [getRunbookExecutionStepScript](docs/sdks/runbooks/README.md#getrunbookexecutionstepscript) - Get a step's bash script +* [updateRunbookExecutionStepScript](docs/sdks/runbooks/README.md#updaterunbookexecutionstepscript) - Update a script step's execution status +* [getRunbookActionFieldOptions](docs/sdks/runbooks/README.md#getrunbookactionfieldoptions) - List select options for a runbook integration action field +* [listRunbooks](docs/sdks/runbooks/README.md#listrunbooks) - List runbooks +* [createRunbook](docs/sdks/runbooks/README.md#createrunbook) - Create a runbook +* [getRunbook](docs/sdks/runbooks/README.md#getrunbook) - Get a runbook +* [updateRunbook](docs/sdks/runbooks/README.md#updaterunbook) - Update a runbook +* [deleteRunbook](docs/sdks/runbooks/README.md#deleterunbook) - Delete a runbook +* [listRunbookAudits](docs/sdks/runbooks/README.md#listrunbookaudits) - List runbook audits ### [scim](docs/sdks/scim/README.md) -* [listGroups](docs/sdks/scim/README.md#listgroups) - List teams via SCIM -* [create](docs/sdks/scim/README.md#create) - Create a team via SCIM -* [getGroup](docs/sdks/scim/README.md#getgroup) - Get a SCIM group -* [updateGroup](docs/sdks/scim/README.md#updategroup) - Update a SCIM group -* [deleteGroup](docs/sdks/scim/README.md#deletegroup) - Delete a SCIM group -* [listUsers](docs/sdks/scim/README.md#listusers) - List users via SCIM -* [createUser](docs/sdks/scim/README.md#createuser) - Create a user via SCIM -* [getUser](docs/sdks/scim/README.md#getuser) - Get a SCIM user -* [replaceUser](docs/sdks/scim/README.md#replaceuser) - Replace a SCIM user -* [deleteUser](docs/sdks/scim/README.md#deleteuser) - Delete a SCIM user -* [updateUser](docs/sdks/scim/README.md#updateuser) - Update a SCIM user - -### [services](docs/sdks/services/README.md) - -* [createDependency](docs/sdks/services/README.md#createdependency) - Create a dependency relationship between services -* [getDependency](docs/sdks/services/README.md#getdependency) - Get a service dependency -* [deleteDependency](docs/sdks/services/README.md#deletedependency) - Delete a service dependency -* [update](docs/sdks/services/README.md#update) - Update a service dependency -* [list](docs/sdks/services/README.md#list) - List services -* [create](docs/sdks/services/README.md#create) - Create a service -* [createLinks](docs/sdks/services/README.md#createlinks) - Create multiple services and link them to external services -* [get](docs/sdks/services/README.md#get) - Get a service -* [delete](docs/sdks/services/README.md#delete) - Delete a service -* [patch](docs/sdks/services/README.md#patch) - Update a service -* [getAvailableDownstreamDependencies](docs/sdks/services/README.md#getavailabledownstreamdependencies) - List available downstream service dependencies -* [listAvailableUpstreamDependencies](docs/sdks/services/README.md#listavailableupstreamdependencies) - List available upstream service dependencies -* [createChecklistResponse](docs/sdks/services/README.md#createchecklistresponse) - Create a checklist response for a service -* [listDependencies](docs/sdks/services/README.md#listdependencies) - List dependencies for a service -* [deleteLink](docs/sdks/services/README.md#deletelink) - Delete a service link -* [listForUser](docs/sdks/services/README.md#listforuser) - List services for a user's teams - -#### [services.catalogs](docs/sdks/catalogs/README.md) - -* [ingest](docs/sdks/catalogs/README.md#ingest) - Ingest service catalog data -* [refresh](docs/sdks/catalogs/README.md#refresh) - Refresh a service catalog +* [getScimGroup](docs/sdks/scim/README.md#getscimgroup) - Get a SCIM group +* [updateScimGroup](docs/sdks/scim/README.md#updatescimgroup) - Update a SCIM group and assign members +* [deleteScimGroup](docs/sdks/scim/README.md#deletescimgroup) - Delete a SCIM group +* [listScimGroups](docs/sdks/scim/README.md#listscimgroups) - List SCIM groups +* [createScimGroup](docs/sdks/scim/README.md#createscimgroup) - Create a SCIM group and assign members +* [getScimUser](docs/sdks/scim/README.md#getscimuser) - Get a SCIM user +* [updateScimUser](docs/sdks/scim/README.md#updatescimuser) - Update a User from SCIM data +* [deleteScimUser](docs/sdks/scim/README.md#deletescimuser) - Delete a User matching SCIM data +* [patchScimUser](docs/sdks/scim/README.md#patchscimuser) - Update a User from SCIM data +* [listScimUsers](docs/sdks/scim/README.md#listscimusers) - List SCIM users +* [createScimUser](docs/sdks/scim/README.md#createscimuser) - Create a User from SCIM data ### [signals](docs/sdks/signals/README.md) -* [listGroupedMetrics](docs/sdks/signals/README.md#listgroupedmetrics) - List grouped signal alert metrics -* [getMttxAnalytics](docs/sdks/signals/README.md#getmttxanalytics) - Get MTTX analytics for signals -* [getAnalyticsTimeseries](docs/sdks/signals/README.md#getanalyticstimeseries) - List timeseries metrics for signal alerts -* [debug](docs/sdks/signals/README.md#debug) - Debug a signal -* [listEmailTargets](docs/sdks/signals/README.md#listemailtargets) - List email targets for signals -* [createEmailTarget](docs/sdks/signals/README.md#createemailtarget) - Create an email target for signals -* [getEmailTarget](docs/sdks/signals/README.md#getemailtarget) - Get a signal email target -* [deleteEmailTarget](docs/sdks/signals/README.md#deleteemailtarget) - Delete a signal email target -* [updateEmailTarget](docs/sdks/signals/README.md#updateemailtarget) - Update a signal email target -* [listEventSources](docs/sdks/signals/README.md#listeventsources) - List event sources for signals -* [getIngestUrl](docs/sdks/signals/README.md#getingesturl) - Get signal ingestion URL -* [listTransposers](docs/sdks/signals/README.md#listtransposers) - List signal transposers -* [listWebhookTargets](docs/sdks/signals/README.md#listwebhooktargets) - List webhook targets for signals -* [createWebhookTarget](docs/sdks/signals/README.md#createwebhooktarget) - Create a webhook target for signals -* [getWebhookTarget](docs/sdks/signals/README.md#getwebhooktarget) - Get a webhook target -* [deleteWebhookTarget](docs/sdks/signals/README.md#deletewebhooktarget) - Delete a webhook target -* [updateWebhookTarget](docs/sdks/signals/README.md#updatewebhooktarget) - Update a webhook target -* [listOnCall](docs/sdks/signals/README.md#listoncall) - List on-call schedules -* [listEscalationPolicies](docs/sdks/signals/README.md#listescalationpolicies) - List escalation policies for a team -* [deleteEscalationPolicy](docs/sdks/signals/README.md#deleteescalationpolicy) - Delete an escalation policy for a team -* [getOnCallSchedule](docs/sdks/signals/README.md#getoncallschedule) - Get an on-call schedule for a team -* [updateOnCallSchedule](docs/sdks/signals/README.md#updateoncallschedule) - Update an on-call schedule for a team -* [listRules](docs/sdks/signals/README.md#listrules) - List signal rules for a team -* [createRule](docs/sdks/signals/README.md#createrule) - Create a signal rule for a team -* [getRule](docs/sdks/signals/README.md#getrule) - Get a signal rule -* [deleteRule](docs/sdks/signals/README.md#deleterule) - Delete a signal rule -* [updateRule](docs/sdks/signals/README.md#updaterule) - Update a signal rule - -#### [signals.teams](docs/sdks/firehydranttypescriptsdksignalsteams/README.md) - -* [getEscalationPolicy](docs/sdks/firehydranttypescriptsdksignalsteams/README.md#getescalationpolicy) - Get an escalation policy for a team - -### [slack](docs/sdks/slack/README.md) - -* [createEmojiAction](docs/sdks/slack/README.md#createemojiaction) - Create a Slack emoji action -* [updateEmojiAction](docs/sdks/slack/README.md#updateemojiaction) - Update a Slack emoji action -* [listUsergroups](docs/sdks/slack/README.md#listusergroups) - List Slack usergroups - -### [statuspage](docs/sdks/statuspage/README.md) - -* [updateConnection](docs/sdks/statuspage/README.md#updateconnection) - Update a Statuspage connection +* [listTeamEscalationPolicies](docs/sdks/signals/README.md#listteamescalationpolicies) - List escalation policies for a team +* [createTeamEscalationPolicy](docs/sdks/signals/README.md#createteamescalationpolicy) - Create an escalation policy for a team +* [getTeamEscalationPolicy](docs/sdks/signals/README.md#getteamescalationpolicy) - Get an escalation policy for a team +* [deleteTeamEscalationPolicy](docs/sdks/signals/README.md#deleteteamescalationpolicy) - Delete an escalation policy for a team +* [updateTeamEscalationPolicy](docs/sdks/signals/README.md#updateteamescalationpolicy) - Update an escalation policy for a team +* [listTeamOnCallSchedules](docs/sdks/signals/README.md#listteamoncallschedules) - List on-call schedules for a team +* [createTeamOnCallSchedule](docs/sdks/signals/README.md#createteamoncallschedule) - Create an on-call schedule for a team +* [getTeamOnCallSchedule](docs/sdks/signals/README.md#getteamoncallschedule) - Get an on-call schedule for a team +* [deleteTeamOnCallSchedule](docs/sdks/signals/README.md#deleteteamoncallschedule) - Delete an on-call schedule for a team +* [updateTeamOnCallSchedule](docs/sdks/signals/README.md#updateteamoncallschedule) - Update an on-call schedule for a team +* [createOnCallShift](docs/sdks/signals/README.md#createoncallshift) - Create a shift for an on-call schedule +* [getOnCallShift](docs/sdks/signals/README.md#getoncallshift) - Get an on-call shift for a team schedule +* [deleteOnCallShift](docs/sdks/signals/README.md#deleteoncallshift) - Delete an on-call shift from a team schedule +* [updateOnCallShift](docs/sdks/signals/README.md#updateoncallshift) - Update an on-call shift for a team schedule +* [listTeamSignalRules](docs/sdks/signals/README.md#listteamsignalrules) - List Signals rules +* [createTeamSignalRule](docs/sdks/signals/README.md#createteamsignalrule) - Create a Signals rule +* [getTeamSignalRule](docs/sdks/signals/README.md#getteamsignalrule) - Get a Signals rule +* [deleteTeamSignalRule](docs/sdks/signals/README.md#deleteteamsignalrule) - Delete a Signals rule +* [updateTeamSignalRule](docs/sdks/signals/README.md#updateteamsignalrule) - Update a Signals rule +* [listSignalsEventSources](docs/sdks/signals/README.md#listsignalseventsources) - List event sources for Signals +* [listSignalsEmailTargets](docs/sdks/signals/README.md#listsignalsemailtargets) - List email targets for signals +* [createSignalsEmailTarget](docs/sdks/signals/README.md#createsignalsemailtarget) - Create an email target for signals +* [getSignalsEmailTarget](docs/sdks/signals/README.md#getsignalsemailtarget) - Get a signal email target +* [deleteSignalsEmailTarget](docs/sdks/signals/README.md#deletesignalsemailtarget) - Delete a signal email target +* [updateSignalsEmailTarget](docs/sdks/signals/README.md#updatesignalsemailtarget) - Update an email target +* [listSignalsWebhookTargets](docs/sdks/signals/README.md#listsignalswebhooktargets) - List webhook targets +* [createSignalsWebhookTarget](docs/sdks/signals/README.md#createsignalswebhooktarget) - Create a webhook target +* [getSignalsWebhookTarget](docs/sdks/signals/README.md#getsignalswebhooktarget) - Get a webhook target +* [deleteSignalsWebhookTarget](docs/sdks/signals/README.md#deletesignalswebhooktarget) - Delete a webhook target +* [updateSignalsWebhookTarget](docs/sdks/signals/README.md#updatesignalswebhooktarget) - Update a webhook target +* [listSignalsTransposers](docs/sdks/signals/README.md#listsignalstransposers) - List signal transposers +* [getSignalsIngestUrl](docs/sdks/signals/README.md#getsignalsingesturl) - Get the signals ingestion URL +* [debugSignalsExpression](docs/sdks/signals/README.md#debugsignalsexpression) - Debug Signals expressions +* [listOrganizationOnCallSchedules](docs/sdks/signals/README.md#listorganizationoncallschedules) - List on-call schedules ### [statusPages](docs/sdks/statuspages/README.md) -* [deleteIncident](docs/sdks/statuspages/README.md#deleteincident) - Remove a status page from an incident -* [createSubscription](docs/sdks/statuspages/README.md#createsubscription) - Create a status page subscription -* [deleteSubscription](docs/sdks/statuspages/README.md#deletesubscription) - Unsubscribe from status page notifications -* [list](docs/sdks/statuspages/README.md#list) - List status pages -* [create](docs/sdks/statuspages/README.md#create) - Create a status page -* [get](docs/sdks/statuspages/README.md#get) - Get a status page -* [update](docs/sdks/statuspages/README.md#update) - Update a status page -* [delete](docs/sdks/statuspages/README.md#delete) - Delete a status page -* [createComponentGroup](docs/sdks/statuspages/README.md#createcomponentgroup) - Create a component group for a status page -* [deleteComponentGroup](docs/sdks/statuspages/README.md#deletecomponentgroup) - Delete a status page component group -* [updateComponentGroup](docs/sdks/statuspages/README.md#updatecomponentgroup) - Update a status page component group -* [updateImage](docs/sdks/statuspages/README.md#updateimage) - Upload an image for a status page -* [deleteImage](docs/sdks/statuspages/README.md#deleteimage) - Delete an image from a status page -* [createLink](docs/sdks/statuspages/README.md#createlink) - Create a link for a status page -* [deleteLink](docs/sdks/statuspages/README.md#deletelink) - Delete a status page link -* [updateLink](docs/sdks/statuspages/README.md#updatelink) - Update a status page link -* [listSubscribers](docs/sdks/statuspages/README.md#listsubscribers) - List status page subscribers -* [createSubscribers](docs/sdks/statuspages/README.md#createsubscribers) - Add subscribers to a status page -* [deleteSubscribers](docs/sdks/statuspages/README.md#deletesubscribers) - Remove subscribers from a status page - -### [statusUpdateTemplates](docs/sdks/statusupdatetemplates/README.md) - -* [create](docs/sdks/statusupdatetemplates/README.md#create) - Create a status update template - -### [system](docs/sdks/system/README.md) - -* [ping](docs/sdks/system/README.md#ping) - Check API connectivity +* [deleteIncidentStatusPage](docs/sdks/statuspages/README.md#deleteincidentstatuspage) - Remove a status page from an incident +* [listNuncConnections](docs/sdks/statuspages/README.md#listnuncconnections) - List status pages +* [createNuncConnection](docs/sdks/statuspages/README.md#createnuncconnection) - Create a status page +* [listEmailSubscribers](docs/sdks/statuspages/README.md#listemailsubscribers) - List status page subscribers +* [createEmailSubscriber](docs/sdks/statuspages/README.md#createemailsubscriber) - Add subscribers to a status page +* [deleteEmailSubscriber](docs/sdks/statuspages/README.md#deleteemailsubscriber) - Remove subscribers from a status page +* [getNuncConnection](docs/sdks/statuspages/README.md#getnuncconnection) - Get a status page +* [updateNuncConnection](docs/sdks/statuspages/README.md#updatenuncconnection) - Update a status page +* [deleteNuncConnection](docs/sdks/statuspages/README.md#deletenuncconnection) - Delete a status page +* [deleteNuncComponentGroup](docs/sdks/statuspages/README.md#deletenunccomponentgroup) - Delete a status page component group +* [updateNuncComponentGroup](docs/sdks/statuspages/README.md#updatenunccomponentgroup) - Update a status page component group +* [createNuncComponentGroup](docs/sdks/statuspages/README.md#createnunccomponentgroup) - Create a component group for a status page +* [deleteNuncLink](docs/sdks/statuspages/README.md#deletenunclink) - Delete a status page link +* [updateNuncLink](docs/sdks/statuspages/README.md#updatenunclink) - Update a status page link +* [createNuncLink](docs/sdks/statuspages/README.md#createnunclink) - Add link to a status page +* [updateNuncImage](docs/sdks/statuspages/README.md#updatenuncimage) - Upload an image for a status page +* [deleteNuncImage](docs/sdks/statuspages/README.md#deletenuncimage) - Delete an image from a status page +* [deleteNuncSubscription](docs/sdks/statuspages/README.md#deletenuncsubscription) - Unsubscribe from status page notifications +* [createNuncSubscription](docs/sdks/statuspages/README.md#createnuncsubscription) - Create a status page subscription ### [tasks](docs/sdks/tasks/README.md) +* [createIncidentTaskList](docs/sdks/tasks/README.md#createincidenttasklist) - Add tasks from a task list to an incident +* [listIncidentTasks](docs/sdks/tasks/README.md#listincidenttasks) - List tasks for an incident +* [createIncidentTask](docs/sdks/tasks/README.md#createincidenttask) - Create an incident task +* [getIncidentTask](docs/sdks/tasks/README.md#getincidenttask) - Get an incident task +* [deleteIncidentTask](docs/sdks/tasks/README.md#deleteincidenttask) - Delete an incident task +* [updateIncidentTask](docs/sdks/tasks/README.md#updateincidenttask) - Update an incident task +* [convertIncidentTask](docs/sdks/tasks/README.md#convertincidenttask) - Convert a task to a follow-up +* [listTaskLists](docs/sdks/tasks/README.md#listtasklists) - List task lists +* [createTaskList](docs/sdks/tasks/README.md#createtasklist) - Create a task list +* [getTaskList](docs/sdks/tasks/README.md#gettasklist) - Get a task list +* [deleteTaskList](docs/sdks/tasks/README.md#deletetasklist) - Delete a task list +* [updateTaskList](docs/sdks/tasks/README.md#updatetasklist) - Update a task list * [listChecklistTemplates](docs/sdks/tasks/README.md#listchecklisttemplates) - List checklist templates * [createChecklistTemplate](docs/sdks/tasks/README.md#createchecklisttemplate) - Create a checklist template +* [getChecklistTemplate](docs/sdks/tasks/README.md#getchecklisttemplate) - Get a checklist template * [deleteChecklistTemplate](docs/sdks/tasks/README.md#deletechecklisttemplate) - Archive a checklist template * [updateChecklistTemplate](docs/sdks/tasks/README.md#updatechecklisttemplate) - Update a checklist template -* [listForIncident](docs/sdks/tasks/README.md#listforincident) - List tasks for an incident -* [create](docs/sdks/tasks/README.md#create) - Create a task for an incident -* [getForIncident](docs/sdks/tasks/README.md#getforincident) - Get a task for an incident -* [delete](docs/sdks/tasks/README.md#delete) - Delete a task from an incident -* [updateTask](docs/sdks/tasks/README.md#updatetask) - Update a task for an incident -* [convertToFollowup](docs/sdks/tasks/README.md#converttofollowup) - Convert a task to a follow-up -* [listTasks](docs/sdks/tasks/README.md#listtasks) - List task lists -* [createList](docs/sdks/tasks/README.md#createlist) - Create a task list -* [get](docs/sdks/tasks/README.md#get) - Get a task list -* [update](docs/sdks/tasks/README.md#update) - Update a task list - -#### [tasks.list](docs/sdks/list/README.md) - -* [delete](docs/sdks/list/README.md#delete) - Delete a task list ### [teams](docs/sdks/teams/README.md) +* [listTeams](docs/sdks/teams/README.md#listteams) - List teams +* [createTeam](docs/sdks/teams/README.md#createteam) - Create a team +* [getTeam](docs/sdks/teams/README.md#getteam) - Get a team +* [deleteTeam](docs/sdks/teams/README.md#deleteteam) - Archive a team +* [updateTeam](docs/sdks/teams/README.md#updateteam) - Update a team * [listSchedules](docs/sdks/teams/README.md#listschedules) - List schedules -* [list](docs/sdks/teams/README.md#list) - List teams -* [create](docs/sdks/teams/README.md#create) - Create a team -* [get](docs/sdks/teams/README.md#get) - Get a team -* [archive](docs/sdks/teams/README.md#archive) - Archive a team -* [update](docs/sdks/teams/README.md#update) - Update a team -* [listOnCallSchedules](docs/sdks/teams/README.md#listoncallschedules) - List on-call schedules for a team -* [createOnCallSchedule](docs/sdks/teams/README.md#createoncallschedule) - Create an on-call schedule for a team -* [getScheduleShift](docs/sdks/teams/README.md#getscheduleshift) - Get an on-call shift for a team schedule -* [deleteScheduleShift](docs/sdks/teams/README.md#deletescheduleshift) - Delete an on-call shift from a team schedule -* [updateScheduleShift](docs/sdks/teams/README.md#updatescheduleshift) - Update an on-call shift in a team schedule -* [createEscalationPolicy](docs/sdks/teams/README.md#createescalationpolicy) - Create an escalation policy for a team -* [updateEscalationPolicy](docs/sdks/teams/README.md#updateescalationpolicy) - Update an escalation policy for a team -* [createShift](docs/sdks/teams/README.md#createshift) - Create a shift for an on-call schedule ### [ticketing](docs/sdks/ticketing/README.md) -* [getFieldMap](docs/sdks/ticketing/README.md#getfieldmap) - Get a field map for a ticketing project -* [updateProjectConfig](docs/sdks/ticketing/README.md#updateprojectconfig) - Update a ticketing project configuration - -### [ticketingPriorities](docs/sdks/ticketingpriorities/README.md) - -* [get](docs/sdks/ticketingpriorities/README.md#get) - Get a ticketing priority - -### [tickets](docs/sdks/tickets/README.md) - -* [list](docs/sdks/tickets/README.md#list) - List tickets -* [create](docs/sdks/tickets/README.md#create) - Create a ticket -* [delete](docs/sdks/tickets/README.md#delete) - Delete a ticket -* [update](docs/sdks/tickets/README.md#update) - Update a ticket +* [listTickets](docs/sdks/ticketing/README.md#listtickets) - List tickets +* [createTicket](docs/sdks/ticketing/README.md#createticket) - Create a ticket +* [getTicket](docs/sdks/ticketing/README.md#getticket) - Get a ticket +* [deleteTicket](docs/sdks/ticketing/README.md#deleteticket) - Archive a ticket +* [updateTicket](docs/sdks/ticketing/README.md#updateticket) - Update a ticket +* [listTicketingProjects](docs/sdks/ticketing/README.md#listticketingprojects) - List ticketing projects +* [getTicketingProject](docs/sdks/ticketing/README.md#getticketingproject) - Get a ticketing project +* [getConfigurationOptions](docs/sdks/ticketing/README.md#getconfigurationoptions) - List configuration options for a ticketing project +* [getOptionsForField](docs/sdks/ticketing/README.md#getoptionsforfield) - List a field's configuration options for a ticketing project +* [listAvailableTicketingFieldMaps](docs/sdks/ticketing/README.md#listavailableticketingfieldmaps) - List available fields for ticket field mapping +* [createTicketingFieldMap](docs/sdks/ticketing/README.md#createticketingfieldmap) - Create a field mapping for a ticketing project +* [getTicketingFieldMap](docs/sdks/ticketing/README.md#getticketingfieldmap) - Get a field map for a ticketing project +* [deleteTicketingFieldMap](docs/sdks/ticketing/README.md#deleteticketingfieldmap) - Archive a field map for a ticketing project +* [updateTicketingFieldMap](docs/sdks/ticketing/README.md#updateticketingfieldmap) - Update a field map for a ticketing project +* [listAvailableInboundFieldMaps](docs/sdks/ticketing/README.md#listavailableinboundfieldmaps) - List available fields for ticket field mapping +* [listInboundFieldMaps](docs/sdks/ticketing/README.md#listinboundfieldmaps) - List inbound field maps for a ticketing project +* [createInboundFieldMap](docs/sdks/ticketing/README.md#createinboundfieldmap) - Create inbound field map for a ticketing project +* [getInboundFieldMap](docs/sdks/ticketing/README.md#getinboundfieldmap) - Get inbound field map for a ticketing project +* [updateInboundFieldMap](docs/sdks/ticketing/README.md#updateinboundfieldmap) - Update inbound field map for a ticketing project +* [deleteInboundFieldMap](docs/sdks/ticketing/README.md#deleteinboundfieldmap) - Archive inbound field map for a ticketing project +* [createTicketingProjectConfig](docs/sdks/ticketing/README.md#createticketingprojectconfig) - Create a ticketing project configuration +* [getTicketingProjectConfig](docs/sdks/ticketing/README.md#getticketingprojectconfig) - Get configuration for a ticketing project +* [deleteTicketingProjectConfig](docs/sdks/ticketing/README.md#deleteticketingprojectconfig) - Archive a ticketing project configuration +* [updateTicketingProjectConfig](docs/sdks/ticketing/README.md#updateticketingprojectconfig) - Update configuration for a ticketing project +* [listTicketingPriorities](docs/sdks/ticketing/README.md#listticketingpriorities) - List ticketing priorities +* [createTicketingPriority](docs/sdks/ticketing/README.md#createticketingpriority) - Create a ticketing priority +* [getTicketingPriority](docs/sdks/ticketing/README.md#getticketingpriority) - Get a ticketing priority +* [deleteTicketingPriority](docs/sdks/ticketing/README.md#deleteticketingpriority) - Delete a ticketing priority +* [updateTicketingPriority](docs/sdks/ticketing/README.md#updateticketingpriority) - Update a ticketing priority +* [listTicketTags](docs/sdks/ticketing/README.md#listtickettags) - List ticket tags ### [users](docs/sdks/users/README.md) -* [getCurrent](docs/sdks/users/README.md#getcurrent) - Get the currently authenticated user -* [list](docs/sdks/users/README.md#list) - List users -* [get](docs/sdks/users/README.md#get) - Get a user +* [listUsers](docs/sdks/users/README.md#listusers) - List users +* [getUser](docs/sdks/users/README.md#getuser) - Get a user +* [getCurrentUser](docs/sdks/users/README.md#getcurrentuser) - Get the currently authenticated user ### [webhooks](docs/sdks/webhooks/README.md) -* [list](docs/sdks/webhooks/README.md#list) - List webhooks -* [create](docs/sdks/webhooks/README.md#create) - Create a webhook -* [get](docs/sdks/webhooks/README.md#get) - Get a webhook -* [delete](docs/sdks/webhooks/README.md#delete) - Delete a webhook -* [update](docs/sdks/webhooks/README.md#update) - Update a webhook -* [listDeliveries](docs/sdks/webhooks/README.md#listdeliveries) - List webhook deliveries - -### [zendesk](docs/sdks/zendesk/README.md) - -* [searchTickets](docs/sdks/zendesk/README.md#searchtickets) - Search for Zendesk tickets +* [listWebhooks](docs/sdks/webhooks/README.md#listwebhooks) - List webhooks +* [createWebhook](docs/sdks/webhooks/README.md#createwebhook) - Create a webhook +* [listWebhookDeliveries](docs/sdks/webhooks/README.md#listwebhookdeliveries) - List webhook deliveries +* [getWebhook](docs/sdks/webhooks/README.md#getwebhook) - Get a webhook +* [deleteWebhook](docs/sdks/webhooks/README.md#deletewebhook) - Delete a webhook +* [updateWebhook](docs/sdks/webhooks/README.md#updatewebhook) - Update a webhook @@ -666,376 +818,414 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). Available standalone functions -- [`accountSettingsDeleteSavedSearch`](docs/sdks/accountsettings/README.md#deletesavedsearch) - Delete a saved search - [`accountSettingsGetAiPreferences`](docs/sdks/accountsettings/README.md#getaipreferences) - Get AI preferences -- [`accountSettingsGetBootstrap`](docs/sdks/accountsettings/README.md#getbootstrap) - Get initial application configuration and settings -- [`accountSettingsGetSavedSearch`](docs/sdks/accountsettings/README.md#getsavedsearch) - Get a saved search +- [`accountSettingsGetBootstrap`](docs/sdks/accountsettings/README.md#getbootstrap) - Get initial application configuration - [`accountSettingsListEntitlements`](docs/sdks/accountsettings/README.md#listentitlements) - List entitlements - [`accountSettingsPing`](docs/sdks/accountsettings/README.md#ping) - Check API connectivity +- [`accountSettingsPingNoauth`](docs/sdks/accountsettings/README.md#pingnoauth) - Check API connectivity - [`accountSettingsUpdateAiPreferences`](docs/sdks/accountsettings/README.md#updateaipreferences) - Update AI preferences -- [`accountSettingsUpdateSavedSearch`](docs/sdks/accountsettings/README.md#updatesavedsearch) - Update a saved search -- [`accountSettingsVoteOnIncidentSummary`](docs/sdks/accountsettings/README.md#voteonincidentsummary) - Vote on an AI-generated incident summary -- [`alertsCreate`](docs/sdks/alerts/README.md#create) - Attach alerts to an incident -- [`alertsGet`](docs/sdks/alerts/README.md#get) - Get an alert -- [`alertsList`](docs/sdks/alerts/README.md#list) - List alerts -- [`alertsListForIncident`](docs/sdks/alerts/README.md#listforincident) - List alerts for an incident -- [`alertsListProcessingLogs`](docs/sdks/alerts/README.md#listprocessinglogs) - List alert processing log entries -- [`awsCloudtrailBatchEventsList`](docs/sdks/awscloudtrailbatchevents/README.md#list) - List events for an AWS CloudTrail batch -- [`awsConnectionsGet`](docs/sdks/awsconnections/README.md#get) - Get an AWS connection -- [`awsConnectionsList`](docs/sdks/awsconnections/README.md#list) - List AWS integration connections -- [`changesCreate`](docs/sdks/changes/README.md#create) - Create a change -- [`changesCreateEvent`](docs/sdks/changes/README.md#createevent) - Create a change event -- [`changesCreateIdentity`](docs/sdks/changes/README.md#createidentity) - Create an identity for a change -- [`changesDelete`](docs/sdks/changes/README.md#delete) - Archive a change -- [`changesDeleteEvent`](docs/sdks/changes/README.md#deleteevent) - Delete a change event -- [`changesDeleteIdentity`](docs/sdks/changes/README.md#deleteidentity) - Delete an identity from a change -- [`changesGet`](docs/sdks/changes/README.md#get) - Get a scheduled maintenance event -- [`changesGetEvent`](docs/sdks/changes/README.md#getevent) - Get a change event -- [`changesList`](docs/sdks/changes/README.md#list) - List changes -- [`changesListEvents`](docs/sdks/changes/README.md#listevents) - List change events -- [`changesListIdentities`](docs/sdks/changes/README.md#listidentities) - List identities for a change -- [`changesListTypes`](docs/sdks/changes/README.md#listtypes) - List change types -- [`changesUpdate`](docs/sdks/changes/README.md#update) - Update a change -- [`changesUpdateEvent`](docs/sdks/changes/README.md#updateevent) - Update a change event -- [`changesUpdateIdentity`](docs/sdks/changes/README.md#updateidentity) - Update an identity for a change -- [`changesUpdateScheduledMaintenance`](docs/sdks/changes/README.md#updatescheduledmaintenance) - Update a scheduled maintenance event -- [`checklistTemplatesGet`](docs/sdks/checklisttemplates/README.md#get) - Get a checklist template +- [`alertsCreateIncidentAlert`](docs/sdks/alerts/README.md#createincidentalert) - Attach an alert to an incident +- [`alertsDeleteIncidentAlert`](docs/sdks/alerts/README.md#deleteincidentalert) - Remove an alert from an incident +- [`alertsGetAlert`](docs/sdks/alerts/README.md#getalert) - Get an alert +- [`alertsListAlerts`](docs/sdks/alerts/README.md#listalerts) - List alerts +- [`alertsListIncidentAlerts`](docs/sdks/alerts/README.md#listincidentalerts) - List alerts for an incident +- [`alertsListProcessingLogEntries`](docs/sdks/alerts/README.md#listprocessinglogentries) - List alert processing log entries +- [`alertsUpdateIncidentAlertPrimary`](docs/sdks/alerts/README.md#updateincidentalertprimary) - Set an alert as primary for an incident +- [`audiencesArchiveAudience`](docs/sdks/audiences/README.md#archiveaudience) - Archive audience +- [`audiencesCreateAudience`](docs/sdks/audiences/README.md#createaudience) - Create audience +- [`audiencesGenerateAudienceSummary`](docs/sdks/audiences/README.md#generateaudiencesummary) - Generate summary +- [`audiencesGetAudience`](docs/sdks/audiences/README.md#getaudience) - Get audience +- [`audiencesGetAudienceSummary`](docs/sdks/audiences/README.md#getaudiencesummary) - Get latest summary +- [`audiencesGetMemberDefaultAudience`](docs/sdks/audiences/README.md#getmemberdefaultaudience) - Get default audience +- [`audiencesListAudiences`](docs/sdks/audiences/README.md#listaudiences) - List audiences +- [`audiencesListAudienceSummaries`](docs/sdks/audiences/README.md#listaudiencesummaries) - List audience summaries +- [`audiencesRestoreAudience`](docs/sdks/audiences/README.md#restoreaudience) - Restore audience +- [`audiencesSetMemberDefaultAudience`](docs/sdks/audiences/README.md#setmemberdefaultaudience) - Set default audience +- [`audiencesUpdateAudience`](docs/sdks/audiences/README.md#updateaudience) - Update audience +- [`callRoutesListCallRoutes`](docs/sdks/callroutes/README.md#listcallroutes) - List call routes +- [`catalogEntriesCreateEnvironment`](docs/sdks/catalogentries/README.md#createenvironment) - Create an environment +- [`catalogEntriesCreateFunctionality`](docs/sdks/catalogentries/README.md#createfunctionality) - Create a functionality +- [`catalogEntriesCreateService`](docs/sdks/catalogentries/README.md#createservice) - Create a service +- [`catalogEntriesCreateServiceChecklistResponse`](docs/sdks/catalogentries/README.md#createservicechecklistresponse) - Record a response for a checklist item +- [`catalogEntriesCreateServiceDependency`](docs/sdks/catalogentries/README.md#createservicedependency) - Create a service dependency +- [`catalogEntriesCreateServiceLinks`](docs/sdks/catalogentries/README.md#createservicelinks) - Create multiple services linked to external services +- [`catalogEntriesDeleteEnvironment`](docs/sdks/catalogentries/README.md#deleteenvironment) - Archive an environment +- [`catalogEntriesDeleteFunctionality`](docs/sdks/catalogentries/README.md#deletefunctionality) - Archive a functionality +- [`catalogEntriesDeleteService`](docs/sdks/catalogentries/README.md#deleteservice) - Delete a service +- [`catalogEntriesDeleteServiceDependency`](docs/sdks/catalogentries/README.md#deleteservicedependency) - Delete a service dependency +- [`catalogEntriesDeleteServiceLink`](docs/sdks/catalogentries/README.md#deleteservicelink) - Delete a service link +- [`catalogEntriesGetEnvironment`](docs/sdks/catalogentries/README.md#getenvironment) - Get an environment +- [`catalogEntriesGetFunctionality`](docs/sdks/catalogentries/README.md#getfunctionality) - Get a functionality +- [`catalogEntriesGetService`](docs/sdks/catalogentries/README.md#getservice) - Get a service +- [`catalogEntriesGetServiceDependencies`](docs/sdks/catalogentries/README.md#getservicedependencies) - List dependencies for a service +- [`catalogEntriesGetServiceDependency`](docs/sdks/catalogentries/README.md#getservicedependency) - Get a service dependency +- [`catalogEntriesIngestCatalogData`](docs/sdks/catalogentries/README.md#ingestcatalogdata) - Ingest service catalog data +- [`catalogEntriesListEnvironments`](docs/sdks/catalogentries/README.md#listenvironments) - List environments +- [`catalogEntriesListFunctionalities`](docs/sdks/catalogentries/README.md#listfunctionalities) - List functionalities +- [`catalogEntriesListFunctionalityServices`](docs/sdks/catalogentries/README.md#listfunctionalityservices) - List services for a functionality +- [`catalogEntriesListInfrastructures`](docs/sdks/catalogentries/README.md#listinfrastructures) - Lists functionality, service and environment objects +- [`catalogEntriesListServiceAvailableDownstreamDependencies`](docs/sdks/catalogentries/README.md#listserviceavailabledownstreamdependencies) - List available downstream service dependencies +- [`catalogEntriesListServiceAvailableUpstreamDependencies`](docs/sdks/catalogentries/README.md#listserviceavailableupstreamdependencies) - List available upstream service dependencies +- [`catalogEntriesListServices`](docs/sdks/catalogentries/README.md#listservices) - List services +- [`catalogEntriesListUserOwnedServices`](docs/sdks/catalogentries/README.md#listuserownedservices) - List services owned by a user's teams +- [`catalogEntriesRefreshCatalog`](docs/sdks/catalogentries/README.md#refreshcatalog) - Refresh a service catalog +- [`catalogEntriesUpdateEnvironment`](docs/sdks/catalogentries/README.md#updateenvironment) - Update an environment +- [`catalogEntriesUpdateFunctionality`](docs/sdks/catalogentries/README.md#updatefunctionality) - Update a functionality +- [`catalogEntriesUpdateService`](docs/sdks/catalogentries/README.md#updateservice) - Update a service +- [`catalogEntriesUpdateServiceDependency`](docs/sdks/catalogentries/README.md#updateservicedependency) - Update a service dependency +- [`changesCreateChange`](docs/sdks/changes/README.md#createchange) - Create a new change entry +- [`changesCreateChangeEvent`](docs/sdks/changes/README.md#createchangeevent) - Create a change event +- [`changesCreateChangeIdentity`](docs/sdks/changes/README.md#createchangeidentity) - Create an identity for a change entry +- [`changesDeleteChange`](docs/sdks/changes/README.md#deletechange) - Archive a change entry +- [`changesDeleteChangeEvent`](docs/sdks/changes/README.md#deletechangeevent) - Delete a change event +- [`changesDeleteChangeIdentity`](docs/sdks/changes/README.md#deletechangeidentity) - Delete an identity from a change entry +- [`changesGetChangeEvent`](docs/sdks/changes/README.md#getchangeevent) - Get a change event +- [`changesListChangeEvents`](docs/sdks/changes/README.md#listchangeevents) - List change events +- [`changesListChangeIdentities`](docs/sdks/changes/README.md#listchangeidentities) - List identities for a change entry +- [`changesListChanges`](docs/sdks/changes/README.md#listchanges) - List changes +- [`changesListChangeTypes`](docs/sdks/changes/README.md#listchangetypes) - List change types +- [`changesUpdateChange`](docs/sdks/changes/README.md#updatechange) - Update a change entry +- [`changesUpdateChangeEvent`](docs/sdks/changes/README.md#updatechangeevent) - Update a change event +- [`changesUpdateChangeIdentity`](docs/sdks/changes/README.md#updatechangeidentity) - Update an identity for a change entry +- [`communicationCreateStatusUpdateTemplate`](docs/sdks/communication/README.md#createstatusupdatetemplate) - Create a status update template - [`communicationDeleteStatusUpdateTemplate`](docs/sdks/communication/README.md#deletestatusupdatetemplate) - Delete a status update template -- [`communicationGetTemplate`](docs/sdks/communication/README.md#gettemplate) - Get a status update template -- [`communicationListTemplates`](docs/sdks/communication/README.md#listtemplates) - List status update templates -- [`communicationUpdateTemplate`](docs/sdks/communication/README.md#updatetemplate) - Update a status update template -- [`confluenceListSpaces`](docs/sdks/confluence/README.md#listspaces) - List Confluence spaces -- [`conversationsCreateComment`](docs/sdks/conversations/README.md#createcomment) - Create a comment for a conversation +- [`communicationGetStatusUpdateTemplate`](docs/sdks/communication/README.md#getstatusupdatetemplate) - Get a status update template +- [`communicationListStatusUpdateTemplates`](docs/sdks/communication/README.md#liststatusupdatetemplates) - List status update templates +- [`communicationUpdateStatusUpdateTemplate`](docs/sdks/communication/README.md#updatestatusupdatetemplate) - Update a status update template +- [`conversationsCreateComment`](docs/sdks/conversations/README.md#createcomment) - Create a conversation comment - [`conversationsCreateCommentReaction`](docs/sdks/conversations/README.md#createcommentreaction) - Create a reaction for a conversation comment -- [`conversationsDeleteComment`](docs/sdks/conversations/README.md#deletecomment) - Delete a conversation comment +- [`conversationsDeleteComment`](docs/sdks/conversations/README.md#deletecomment) - Archive a conversation comment - [`conversationsDeleteCommentReaction`](docs/sdks/conversations/README.md#deletecommentreaction) - Delete a reaction from a conversation comment - [`conversationsGetComment`](docs/sdks/conversations/README.md#getcomment) - Get a conversation comment +- [`conversationsGetVoteStatus`](docs/sdks/conversations/README.md#getvotestatus) - Get votes - [`conversationsListCommentReactions`](docs/sdks/conversations/README.md#listcommentreactions) - List reactions for a conversation comment - [`conversationsListComments`](docs/sdks/conversations/README.md#listcomments) - List comments for a conversation - [`conversationsUpdateComment`](docs/sdks/conversations/README.md#updatecomment) - Update a conversation comment -- [`environmentsCreate`](docs/sdks/environments/README.md#create) - Create an environment -- [`environmentsDelete`](docs/sdks/environments/README.md#delete) - Archive an environment -- [`environmentsGet`](docs/sdks/environments/README.md#get) - Get an environment -- [`environmentsList`](docs/sdks/environments/README.md#list) - List environments -- [`environmentsUpdate`](docs/sdks/environments/README.md#update) - Update an environment -- [`functionalitiesCreate`](docs/sdks/functionalities/README.md#create) - Create a functionality -- [`functionalitiesDelete`](docs/sdks/functionalities/README.md#delete) - Archive a functionality -- [`functionalitiesGet`](docs/sdks/functionalities/README.md#get) - Get a functionality -- [`functionalitiesList`](docs/sdks/functionalities/README.md#list) - List functionalities -- [`functionalitiesListServices`](docs/sdks/functionalities/README.md#listservices) - List services for a functionality -- [`functionalitiesUpdate`](docs/sdks/functionalities/README.md#update) - Update a functionality -- [`incidentsAddStatusPage`](docs/sdks/incidents/README.md#addstatuspage) - Add a status page to an incident -- [`incidentsArchive`](docs/sdks/incidents/README.md#archive) - Archive an incident -- [`incidentsClose`](docs/sdks/incidents/README.md#close) - Close an incident -- [`incidentsCreate`](docs/sdks/incidents/README.md#create) - Create an incident -- [`incidentsCreateAttachment`](docs/sdks/incidents/README.md#createattachment) - Create an attachment for an incident -- [`incidentsCreateGenericChatMessage`](docs/sdks/incidents/README.md#creategenericchatmessage) - Create a chat message for an incident -- [`incidentsCreateImpact`](docs/sdks/incidents/README.md#createimpact) - Add impacted infrastructure to an incident -- [`incidentsCreateLink`](docs/sdks/incidents/README.md#createlink) - Create a link for an incident -- [`incidentsCreateNote`](docs/sdks/incidents/README.md#createnote) - Create a note for an incident -- [`incidentsCreateRelatedChange`](docs/sdks/incidents/README.md#createrelatedchange) - Add a related change to an incident -- [`incidentsCreateRoleAssignment`](docs/sdks/incidents/README.md#createroleassignment) - Create a role assignment for an incident -- [`incidentsCreateTaskList`](docs/sdks/incidents/README.md#createtasklist) - Add tasks from a task list to an incident -- [`incidentsCreateTeamAssignment`](docs/sdks/incidents/README.md#createteamassignment) - Assign a team to an incident -- [`incidentsDeleteAlert`](docs/sdks/incidents/README.md#deletealert) - Delete an alert from an incident -- [`incidentsDeleteChatMessage`](docs/sdks/incidents/README.md#deletechatmessage) - Delete a chat message from an incident -- [`incidentsDeleteEvent`](docs/sdks/incidents/README.md#deleteevent) - Delete an incident event -- [`incidentsDeleteImpact`](docs/sdks/incidents/README.md#deleteimpact) - Remove impacted infrastructure from an incident -- [`incidentsDeleteLink`](docs/sdks/incidents/README.md#deletelink) - Delete an external link from an incident -- [`incidentsDeleteRoleAssignment`](docs/sdks/incidents/README.md#deleteroleassignment) - Delete a role assignment from an incident -- [`incidentsDeleteTeamAssignment`](docs/sdks/incidents/README.md#deleteteamassignment) - Remove a team assignment from an incident -- [`incidentsDeleteTranscript`](docs/sdks/incidents/README.md#deletetranscript) - Delete a transcript from an incident -- [`incidentSettingsArchiveIncidentType`](docs/sdks/incidentsettings/README.md#archiveincidenttype) - Archive an incident type +- [`conversationsUpdateVote`](docs/sdks/conversations/README.md#updatevote) - Update votes +- [`incidentsBulkUpdateIncidentMilestones`](docs/sdks/incidents/README.md#bulkupdateincidentmilestones) - Update milestone times +- [`incidentsCloseIncident`](docs/sdks/incidents/README.md#closeincident) - Close an incident +- [`incidentsCreateIncident`](docs/sdks/incidents/README.md#createincident) - Create an incident +- [`incidentsCreateIncidentAttachment`](docs/sdks/incidents/README.md#createincidentattachment) - Add an attachment to the incident timeline +- [`incidentsCreateIncidentChangeEvent`](docs/sdks/incidents/README.md#createincidentchangeevent) - Add a related change to an incident +- [`incidentsCreateIncidentChatMessage`](docs/sdks/incidents/README.md#createincidentchatmessage) - Add a chat message to an incident +- [`incidentsCreateIncidentImpact`](docs/sdks/incidents/README.md#createincidentimpact) - Add impacted infrastructure to an incident +- [`incidentsCreateIncidentLink`](docs/sdks/incidents/README.md#createincidentlink) - Add a link to an incident +- [`incidentsCreateIncidentNote`](docs/sdks/incidents/README.md#createincidentnote) - Add a note to an incident +- [`incidentsCreateIncidentRoleAssignment`](docs/sdks/incidents/README.md#createincidentroleassignment) - Assign a user to an incident +- [`incidentsCreateIncidentStatusPage`](docs/sdks/incidents/README.md#createincidentstatuspage) - Add a status page to an incident +- [`incidentsCreateIncidentTeamAssignment`](docs/sdks/incidents/README.md#createincidentteamassignment) - Assign a team to an incident +- [`incidentsCreateScheduledMaintenance`](docs/sdks/incidents/README.md#createscheduledmaintenance) - Create a scheduled maintenance event +- [`incidentsDeleteIncident`](docs/sdks/incidents/README.md#deleteincident) - Archive an incident +- [`incidentsDeleteIncidentChatMessage`](docs/sdks/incidents/README.md#deleteincidentchatmessage) - Delete a chat message from an incident +- [`incidentsDeleteIncidentEvent`](docs/sdks/incidents/README.md#deleteincidentevent) - Delete an incident event +- [`incidentsDeleteIncidentImpact`](docs/sdks/incidents/README.md#deleteincidentimpact) - Remove impacted infrastructure from an incident +- [`incidentsDeleteIncidentLink`](docs/sdks/incidents/README.md#deleteincidentlink) - Remove a link from an incident +- [`incidentsDeleteIncidentRoleAssignment`](docs/sdks/incidents/README.md#deleteincidentroleassignment) - Unassign a user from an incident +- [`incidentsDeleteIncidentTeamAssignment`](docs/sdks/incidents/README.md#deleteincidentteamassignment) - Unassign a team from an incident +- [`incidentsDeleteScheduledMaintenance`](docs/sdks/incidents/README.md#deletescheduledmaintenance) - Delete a scheduled maintenance event +- [`incidentsDeleteTranscriptEntry`](docs/sdks/incidents/README.md#deletetranscriptentry) - Delete a transcript from an incident - [`incidentSettingsCreateCustomFieldDefinition`](docs/sdks/incidentsettings/README.md#createcustomfielddefinition) - Create a custom field definition -- [`incidentSettingsCreateImpact`](docs/sdks/incidentsettings/README.md#createimpact) - Create a severity matrix impact - [`incidentSettingsCreateIncidentRole`](docs/sdks/incidentsettings/README.md#createincidentrole) - Create an incident role - [`incidentSettingsCreateIncidentType`](docs/sdks/incidentsettings/README.md#createincidenttype) - Create an incident type -- [`incidentSettingsCreateMilestone`](docs/sdks/incidentsettings/README.md#createmilestone) - Create a milestone for an incident lifecycle +- [`incidentSettingsCreateLifecycleMeasurementDefinition`](docs/sdks/incidentsettings/README.md#createlifecyclemeasurementdefinition) - Create a measurement definition +- [`incidentSettingsCreateLifecycleMilestone`](docs/sdks/incidentsettings/README.md#createlifecyclemilestone) - Create a milestone - [`incidentSettingsCreatePriority`](docs/sdks/incidentsettings/README.md#createpriority) - Create a priority - [`incidentSettingsCreateSeverity`](docs/sdks/incidentsettings/README.md#createseverity) - Create a severity - [`incidentSettingsCreateSeverityMatrixCondition`](docs/sdks/incidentsettings/README.md#createseveritymatrixcondition) - Create a severity matrix condition -- [`incidentSettingsCreateTicketingPriority`](docs/sdks/incidentsettings/README.md#createticketingpriority) - Create a ticketing priority +- [`incidentSettingsCreateSeverityMatrixImpact`](docs/sdks/incidentsettings/README.md#createseveritymatriximpact) - Create a severity matrix impact - [`incidentSettingsDeleteCustomFieldDefinition`](docs/sdks/incidentsettings/README.md#deletecustomfielddefinition) - Delete a custom field definition -- [`incidentSettingsDeleteLifecycleMilestone`](docs/sdks/incidentsettings/README.md#deletelifecyclemilestone) - Delete a lifecycle milestone +- [`incidentSettingsDeleteIncidentRole`](docs/sdks/incidentsettings/README.md#deleteincidentrole) - Archive an incident role +- [`incidentSettingsDeleteIncidentType`](docs/sdks/incidentsettings/README.md#deleteincidenttype) - Archive an incident type +- [`incidentSettingsDeleteLifecycleMeasurementDefinition`](docs/sdks/incidentsettings/README.md#deletelifecyclemeasurementdefinition) - Archive a measurement definition +- [`incidentSettingsDeleteLifecycleMilestone`](docs/sdks/incidentsettings/README.md#deletelifecyclemilestone) - Delete a milestone - [`incidentSettingsDeletePriority`](docs/sdks/incidentsettings/README.md#deletepriority) - Delete a priority -- [`incidentSettingsDeleteRole`](docs/sdks/incidentsettings/README.md#deleterole) - Archive an incident role - [`incidentSettingsDeleteSeverity`](docs/sdks/incidentsettings/README.md#deleteseverity) - Delete a severity - [`incidentSettingsDeleteSeverityMatrixCondition`](docs/sdks/incidentsettings/README.md#deleteseveritymatrixcondition) - Delete a severity matrix condition -- [`incidentSettingsDeleteSeverityMatrixImpact`](docs/sdks/incidentsettings/README.md#deleteseveritymatriximpact) - Delete an impact from the severity matrix +- [`incidentSettingsDeleteSeverityMatrixImpact`](docs/sdks/incidentsettings/README.md#deleteseveritymatriximpact) - Delete a severity matrix impact - [`incidentSettingsGetFormConfiguration`](docs/sdks/incidentsettings/README.md#getformconfiguration) - Get a form configuration - [`incidentSettingsGetIncidentRole`](docs/sdks/incidentsettings/README.md#getincidentrole) - Get an incident role - [`incidentSettingsGetIncidentType`](docs/sdks/incidentsettings/README.md#getincidenttype) - Get an incident type +- [`incidentSettingsGetLifecycleMeasurementDefinition`](docs/sdks/incidentsettings/README.md#getlifecyclemeasurementdefinition) - Get a measurement definition - [`incidentSettingsGetPriority`](docs/sdks/incidentsettings/README.md#getpriority) - Get a priority - [`incidentSettingsGetSeverity`](docs/sdks/incidentsettings/README.md#getseverity) - Get a severity - [`incidentSettingsGetSeverityMatrix`](docs/sdks/incidentsettings/README.md#getseveritymatrix) - Get severity matrix - [`incidentSettingsGetSeverityMatrixCondition`](docs/sdks/incidentsettings/README.md#getseveritymatrixcondition) - Get a severity matrix condition - [`incidentSettingsListCustomFieldDefinitions`](docs/sdks/incidentsettings/README.md#listcustomfielddefinitions) - List custom field definitions +- [`incidentSettingsListCustomFieldSelectOptions`](docs/sdks/incidentsettings/README.md#listcustomfieldselectoptions) - Get available values for a custom field +- [`incidentSettingsListIncidentRoles`](docs/sdks/incidentsettings/README.md#listincidentroles) - List incident roles - [`incidentSettingsListIncidentTags`](docs/sdks/incidentsettings/README.md#listincidenttags) - List incident tags - [`incidentSettingsListIncidentTypes`](docs/sdks/incidentsettings/README.md#listincidenttypes) - List incident types -- [`incidentSettingsListLifecyclePhases`](docs/sdks/incidentsettings/README.md#listlifecyclephases) - List lifecycle phases and milestones +- [`incidentSettingsListLifecycleMeasurementDefinitions`](docs/sdks/incidentsettings/README.md#listlifecyclemeasurementdefinitions) - List measurement definitions +- [`incidentSettingsListLifecyclePhases`](docs/sdks/incidentsettings/README.md#listlifecyclephases) - List phases and milestones - [`incidentSettingsListPriorities`](docs/sdks/incidentsettings/README.md#listpriorities) - List priorities -- [`incidentSettingsListRoles`](docs/sdks/incidentsettings/README.md#listroles) - List incident roles -- [`incidentSettingsListSelectOptions`](docs/sdks/incidentsettings/README.md#listselectoptions) - List select options for a custom field - [`incidentSettingsListSeverities`](docs/sdks/incidentsettings/README.md#listseverities) - List severities - [`incidentSettingsListSeverityMatrixConditions`](docs/sdks/incidentsettings/README.md#listseveritymatrixconditions) - List severity matrix conditions - [`incidentSettingsListSeverityMatrixImpacts`](docs/sdks/incidentsettings/README.md#listseveritymatriximpacts) - List severity matrix impacts -- [`incidentSettingsListTicketingPriorities`](docs/sdks/incidentsettings/README.md#listticketingpriorities) - List ticketing priorities -- [`incidentSettingsUpdateCondition`](docs/sdks/incidentsettings/README.md#updatecondition) - Update a severity matrix condition - [`incidentSettingsUpdateCustomFieldDefinition`](docs/sdks/incidentsettings/README.md#updatecustomfielddefinition) - Update a custom field definition -- [`incidentSettingsUpdateImpact`](docs/sdks/incidentsettings/README.md#updateimpact) - Update an impact in the severity matrix - [`incidentSettingsUpdateIncidentRole`](docs/sdks/incidentsettings/README.md#updateincidentrole) - Update an incident role -- [`incidentSettingsUpdateLifecycleMilestone`](docs/sdks/incidentsettings/README.md#updatelifecyclemilestone) - Update a lifecycle milestone +- [`incidentSettingsUpdateIncidentType`](docs/sdks/incidentsettings/README.md#updateincidenttype) - Update an incident type +- [`incidentSettingsUpdateLifecycleMeasurementDefinition`](docs/sdks/incidentsettings/README.md#updatelifecyclemeasurementdefinition) - Update a measurement definition +- [`incidentSettingsUpdateLifecycleMilestone`](docs/sdks/incidentsettings/README.md#updatelifecyclemilestone) - Update a milestone - [`incidentSettingsUpdatePriority`](docs/sdks/incidentsettings/README.md#updatepriority) - Update a priority - [`incidentSettingsUpdateSeverity`](docs/sdks/incidentsettings/README.md#updateseverity) - Update a severity - [`incidentSettingsUpdateSeverityMatrix`](docs/sdks/incidentsettings/README.md#updateseveritymatrix) - Update severity matrix -- [`incidentSettingsUpdateType`](docs/sdks/incidentsettings/README.md#updatetype) - Update an incident type +- [`incidentSettingsUpdateSeverityMatrixCondition`](docs/sdks/incidentsettings/README.md#updateseveritymatrixcondition) - Update a severity matrix condition +- [`incidentSettingsUpdateSeverityMatrixImpact`](docs/sdks/incidentsettings/README.md#updateseveritymatriximpact) - Update a severity matrix impact - [`incidentSettingsValidateIncidentTags`](docs/sdks/incidentsettings/README.md#validateincidenttags) - Validate incident tags -- [`incidentsGet`](docs/sdks/incidents/README.md#get) - Get an incident -- [`incidentsGetAiSummaryVoteStatus`](docs/sdks/incidents/README.md#getaisummaryvotestatus) - Get the vote status for an AI-generated incident summary -- [`incidentsGetChannel`](docs/sdks/incidents/README.md#getchannel) - Get chat channel information for an incident -- [`incidentsGetEvent`](docs/sdks/incidents/README.md#getevent) - Get an incident event -- [`incidentsGetEventVoteStatus`](docs/sdks/incidents/README.md#geteventvotestatus) - Get vote counts for an incident event -- [`incidentsGetRelationships`](docs/sdks/incidents/README.md#getrelationships) - List incident relationships -- [`incidentsGetTranscript`](docs/sdks/incidents/README.md#gettranscript) - List transcript messages for an incident -- [`incidentsGetUserRole`](docs/sdks/incidents/README.md#getuserrole) - Get a user's role in an incident -- [`incidentsList`](docs/sdks/incidents/README.md#list) - List incidents -- [`incidentsListAttachments`](docs/sdks/incidents/README.md#listattachments) - List attachments for an incident -- [`incidentsListEvents`](docs/sdks/incidents/README.md#listevents) - List events for an incident -- [`incidentsListImpact`](docs/sdks/incidents/README.md#listimpact) - List impacted infrastructure for an incident -- [`incidentsListLinks`](docs/sdks/incidents/README.md#listlinks) - List links for an incident -- [`incidentsListMilestones`](docs/sdks/incidents/README.md#listmilestones) - List milestones for an incident -- [`incidentsListRelatedChangeEvents`](docs/sdks/incidents/README.md#listrelatedchangeevents) - List related changes for an incident -- [`incidentsListRoleAssignments`](docs/sdks/incidents/README.md#listroleassignments) - List role assignments for an incident -- [`incidentsListSimilar`](docs/sdks/incidents/README.md#listsimilar) - List similar incidents -- [`incidentsListStatusPages`](docs/sdks/incidents/README.md#liststatuspages) - List status pages for an incident -- [`incidentsPartialUpdateImpacts`](docs/sdks/incidents/README.md#partialupdateimpacts) - Update impacts for an incident -- [`incidentsResolve`](docs/sdks/incidents/README.md#resolve) - Resolve an incident -- [`incidentsSetAlertAsPrimary`](docs/sdks/incidents/README.md#setalertasprimary) - Set an alert as primary for an incident -- [`incidentsUnarchive`](docs/sdks/incidents/README.md#unarchive) - Unarchive an incident -- [`incidentsUpdate`](docs/sdks/incidents/README.md#update) - Update an incident -- [`incidentsUpdateChatMessage`](docs/sdks/incidents/README.md#updatechatmessage) - Update a chat message in an incident -- [`incidentsUpdateEvent`](docs/sdks/incidents/README.md#updateevent) - Update an incident event -- [`incidentsUpdateEventVotes`](docs/sdks/incidents/README.md#updateeventvotes) - Update votes for an incident event -- [`incidentsUpdateImpacts`](docs/sdks/incidents/README.md#updateimpacts) - Replace all impacts for an incident -- [`incidentsUpdateLink`](docs/sdks/incidents/README.md#updatelink) - Update an external link for an incident -- [`incidentsUpdateMilestonesBulk`](docs/sdks/incidents/README.md#updatemilestonesbulk) - Bulk update milestone timestamps for an incident -- [`incidentsUpdateNote`](docs/sdks/incidents/README.md#updatenote) - Update a note for an incident -- [`incidentsUpdateRelatedChangeEvent`](docs/sdks/incidents/README.md#updaterelatedchangeevent) - Update a related change event for an incident -- [`infrastructuresList`](docs/sdks/infrastructures/README.md#list) - List catalog entries -- [`integrationsAwsGetCloudTrailBatch`](docs/sdks/aws/README.md#getcloudtrailbatch) - Get an AWS CloudTrail batch -- [`integrationsAwsUpdateConnection`](docs/sdks/aws/README.md#updateconnection) - Update an AWS connection +- [`incidentsGetAiIncidentSummaryVoteStatus`](docs/sdks/incidents/README.md#getaiincidentsummaryvotestatus) - Get the current user's vote status for an AI-generated incident summary +- [`incidentsGetConferenceBridgeTranslation`](docs/sdks/incidents/README.md#getconferencebridgetranslation) - Retrieve the translations for a specific conference bridge +- [`incidentsGetIncident`](docs/sdks/incidents/README.md#getincident) - Get an incident +- [`incidentsGetIncidentChannel`](docs/sdks/incidents/README.md#getincidentchannel) - Get chat channel information for an incident +- [`incidentsGetIncidentEvent`](docs/sdks/incidents/README.md#getincidentevent) - Get an incident event +- [`incidentsGetIncidentRelationships`](docs/sdks/incidents/README.md#getincidentrelationships) - List incident relationships +- [`incidentsGetIncidentUser`](docs/sdks/incidents/README.md#getincidentuser) - Get the current user's incident role +- [`incidentsGetScheduledMaintenance`](docs/sdks/incidents/README.md#getscheduledmaintenance) - Get a scheduled maintenance event +- [`incidentsListIncidentAttachments`](docs/sdks/incidents/README.md#listincidentattachments) - List attachments for an incident +- [`incidentsListIncidentChangeEvents`](docs/sdks/incidents/README.md#listincidentchangeevents) - List related changes on an incident +- [`incidentsListIncidentConferenceBridges`](docs/sdks/incidents/README.md#listincidentconferencebridges) - Retrieve all conference bridges for an incident +- [`incidentsListIncidentEvents`](docs/sdks/incidents/README.md#listincidentevents) - List events for an incident +- [`incidentsListIncidentImpacts`](docs/sdks/incidents/README.md#listincidentimpacts) - List impacted infrastructure for an incident +- [`incidentsListIncidentLinks`](docs/sdks/incidents/README.md#listincidentlinks) - List links on an incident +- [`incidentsListIncidentMilestones`](docs/sdks/incidents/README.md#listincidentmilestones) - List incident milestones +- [`incidentsListIncidentRoleAssignments`](docs/sdks/incidents/README.md#listincidentroleassignments) - List incident assignees +- [`incidentsListIncidents`](docs/sdks/incidents/README.md#listincidents) - List incidents +- [`incidentsListIncidentStatusPages`](docs/sdks/incidents/README.md#listincidentstatuspages) - List status pages for an incident +- [`incidentsListScheduledMaintenances`](docs/sdks/incidents/README.md#listscheduledmaintenances) - List scheduled maintenance events +- [`incidentsListSimilarIncidents`](docs/sdks/incidents/README.md#listsimilarincidents) - List similar incidents +- [`incidentsListTranscriptEntries`](docs/sdks/incidents/README.md#listtranscriptentries) - Lists all of the messages in the incident's transcript +- [`incidentsResolveIncident`](docs/sdks/incidents/README.md#resolveincident) - Resolve an incident +- [`incidentsUnarchiveIncident`](docs/sdks/incidents/README.md#unarchiveincident) - Unarchive an incident +- [`incidentsUpdateIncident`](docs/sdks/incidents/README.md#updateincident) - Update an incident +- [`incidentsUpdateIncidentChangeEvent`](docs/sdks/incidents/README.md#updateincidentchangeevent) - Update a change attached to an incident +- [`incidentsUpdateIncidentChatMessage`](docs/sdks/incidents/README.md#updateincidentchatmessage) - Update a chat message on an incident +- [`incidentsUpdateIncidentEvent`](docs/sdks/incidents/README.md#updateincidentevent) - Update an incident event +- [`incidentsUpdateIncidentImpactPatch`](docs/sdks/incidents/README.md#updateincidentimpactpatch) - Update impacts for an incident +- [`incidentsUpdateIncidentImpactPut`](docs/sdks/incidents/README.md#updateincidentimpactput) - Update impacts for an incident +- [`incidentsUpdateIncidentLink`](docs/sdks/incidents/README.md#updateincidentlink) - Update the external incident link +- [`incidentsUpdateIncidentNote`](docs/sdks/incidents/README.md#updateincidentnote) - Update a note +- [`incidentsUpdateScheduledMaintenance`](docs/sdks/incidents/README.md#updatescheduledmaintenance) - Update a scheduled maintenance event +- [`incidentsUpdateTranscriptAttribution`](docs/sdks/incidents/README.md#updatetranscriptattribution) - Update the attribution of a transcript +- [`incidentsVoteAiIncidentSummary`](docs/sdks/incidents/README.md#voteaiincidentsummary) - Vote on an AI-generated incident summary - [`integrationsCreateConnection`](docs/sdks/integrations/README.md#createconnection) - Create a new integration connection -- [`integrationsCreateFieldMap`](docs/sdks/integrations/README.md#createfieldmap) - Create a field mapping for a ticketing project -- [`integrationsDeleteFieldMap`](docs/sdks/integrations/README.md#deletefieldmap) - Delete a field map for a ticketing project -- [`integrationsDeletePriority`](docs/sdks/integrations/README.md#deletepriority) - Delete a ticketing priority -- [`integrationsDeleteProjectConfig`](docs/sdks/integrations/README.md#deleteprojectconfig) - Delete a ticketing project configuration +- [`integrationsCreateSlackEmojiAction`](docs/sdks/integrations/README.md#createslackemojiaction) - Create a new Slack emoji action +- [`integrationsDeleteSlackEmojiAction`](docs/sdks/integrations/README.md#deleteslackemojiaction) - Delete a Slack emoji action - [`integrationsDeleteStatuspageConnection`](docs/sdks/integrations/README.md#deletestatuspageconnection) - Delete a Statuspage connection -- [`integrationsGet`](docs/sdks/integrations/README.md#get) - Get an integration -- [`integrationsGetAvailableFields`](docs/sdks/integrations/README.md#getavailablefields) - List available fields for ticket field mapping -- [`integrationsGetFieldMapAvailableFields`](docs/sdks/integrations/README.md#getfieldmapavailablefields) - List available fields for field mapping -- [`integrationsGetProjectConfigurationOptions`](docs/sdks/integrations/README.md#getprojectconfigurationoptions) - List configuration options for a ticketing project -- [`integrationsGetProjectFieldOptions`](docs/sdks/integrations/README.md#getprojectfieldoptions) - List configuration options for a ticketing project field -- [`integrationsGetStatus`](docs/sdks/integrations/README.md#getstatus) - Get an integration status +- [`integrationsGetAwsCloudtrailBatch`](docs/sdks/integrations/README.md#getawscloudtrailbatch) - Get a CloudTrail batch +- [`integrationsGetAwsConnection`](docs/sdks/integrations/README.md#getawsconnection) - Get an AWS connection +- [`integrationsGetIntegration`](docs/sdks/integrations/README.md#getintegration) - Get an integration +- [`integrationsGetSlackEmojiAction`](docs/sdks/integrations/README.md#getslackemojiaction) - Get a Slack emoji action - [`integrationsGetStatuspageConnection`](docs/sdks/integrations/README.md#getstatuspageconnection) - Get a Statuspage connection -- [`integrationsGetTicket`](docs/sdks/integrations/README.md#getticket) - Get a ticket -- [`integrationsList`](docs/sdks/integrations/README.md#list) - List all available integrations -- [`integrationsListCloudtrailBatches`](docs/sdks/integrations/README.md#listcloudtrailbatches) - List AWS CloudTrail batches +- [`integrationsGetZendeskCustomerSupportIssue`](docs/sdks/integrations/README.md#getzendeskcustomersupportissue) - Search for Zendesk tickets +- [`integrationsListAuthedProviders`](docs/sdks/integrations/README.md#listauthedproviders) - Lists the available and configured integrations +- [`integrationsListAwsCloudtrailBatches`](docs/sdks/integrations/README.md#listawscloudtrailbatches) - List CloudTrail batches +- [`integrationsListAwsCloudtrailBatchEvents`](docs/sdks/integrations/README.md#listawscloudtrailbatchevents) - List events for an AWS CloudTrail batch +- [`integrationsListAwsConnections`](docs/sdks/integrations/README.md#listawsconnections) - List AWS connections - [`integrationsListConnections`](docs/sdks/integrations/README.md#listconnections) - List integration connections -- [`integrationsListEmojiActions`](docs/sdks/integrations/README.md#listemojiactions) - List Slack emoji actions -- [`integrationsListProjects`](docs/sdks/integrations/README.md#listprojects) - List ticketing projects +- [`integrationsListConnectionStatuses`](docs/sdks/integrations/README.md#listconnectionstatuses) - Get integration connection status +- [`integrationsListConnectionStatusesBySlug`](docs/sdks/integrations/README.md#listconnectionstatusesbyslug) - Get an integration connection status +- [`integrationsListConnectionStatusesBySlugAndId`](docs/sdks/integrations/README.md#listconnectionstatusesbyslugandid) - Get an integration connection status +- [`integrationsListFieldMapAvailableFields`](docs/sdks/integrations/README.md#listfieldmapavailablefields) - List available fields for field mapping +- [`integrationsListIntegrations`](docs/sdks/integrations/README.md#listintegrations) - List integrations +- [`integrationsListSlackEmojiActions`](docs/sdks/integrations/README.md#listslackemojiactions) - List Slack emoji actions +- [`integrationsListSlackUsergroups`](docs/sdks/integrations/README.md#listslackusergroups) - List Slack user groups +- [`integrationsListSlackWorkspaces`](docs/sdks/integrations/README.md#listslackworkspaces) - List Slack workspaces +- [`integrationsListStatuspageConnectionPages`](docs/sdks/integrations/README.md#liststatuspageconnectionpages) - List StatusPage pages for a connection +- [`integrationsListStatuspageConnections`](docs/sdks/integrations/README.md#liststatuspageconnections) - List Statuspage connections - [`integrationsRefreshConnection`](docs/sdks/integrations/README.md#refreshconnection) - Refresh an integration connection -- [`integrationsSlackDeleteEmojiAction`](docs/sdks/firehydranttypescriptsdkslack/README.md#deleteemojiaction) - Delete a Slack emoji action -- [`integrationsSlackGetEmojiAction`](docs/sdks/firehydranttypescriptsdkslack/README.md#getemojiaction) - Get a Slack emoji action -- [`integrationsSlackListWorkspaces`](docs/sdks/firehydranttypescriptsdkslack/README.md#listworkspaces) - List Slack workspaces for a connection -- [`integrationsStatuspageListConnections`](docs/sdks/firehydranttypescriptsdkstatuspage/README.md#listconnections) - List Statuspage connections -- [`integrationsStatuspageListPages`](docs/sdks/firehydranttypescriptsdkstatuspage/README.md#listpages) - List StatusPage pages for a connection -- [`integrationsTicketingGetProject`](docs/sdks/firehydranttypescriptsdkticketing/README.md#getproject) - Get a ticketing project -- [`integrationsTicketingListTags`](docs/sdks/firehydranttypescriptsdkticketing/README.md#listtags) - List ticket tags -- [`integrationsUpdateCloudTrailBatch`](docs/sdks/integrations/README.md#updatecloudtrailbatch) - Update an AWS CloudTrail batch +- [`integrationsSearchConfluenceSpaces`](docs/sdks/integrations/README.md#searchconfluencespaces) - List Confluence spaces +- [`integrationsSearchZendeskTickets`](docs/sdks/integrations/README.md#searchzendesktickets) - Search for Zendesk tickets +- [`integrationsUpdateAuthedProvider`](docs/sdks/integrations/README.md#updateauthedprovider) - Get an authed provider +- [`integrationsUpdateAwsCloudtrailBatch`](docs/sdks/integrations/README.md#updateawscloudtrailbatch) - Update a CloudTrail batch +- [`integrationsUpdateAwsConnection`](docs/sdks/integrations/README.md#updateawsconnection) - Update an AWS connection - [`integrationsUpdateConnection`](docs/sdks/integrations/README.md#updateconnection) - Update an integration connection -- [`integrationsUpdateFieldMap`](docs/sdks/integrations/README.md#updatefieldmap) - Update a field mapping configuration -- [`integrationsUpdatePriority`](docs/sdks/integrations/README.md#updatepriority) - Update a ticketing priority -- [`integrationsUpdateTicketingFieldMap`](docs/sdks/integrations/README.md#updateticketingfieldmap) - Update a field map for a ticketing project -- [`maintenancesCreate`](docs/sdks/maintenances/README.md#create) - Create a scheduled maintenance event -- [`maintenancesDelete`](docs/sdks/maintenances/README.md#delete) - Delete a scheduled maintenance event -- [`maintenancesList`](docs/sdks/maintenances/README.md#list) - List scheduled maintenance events -- [`metricsGetInfrastructure`](docs/sdks/metrics/README.md#getinfrastructure) - Get metrics for a specific catalog entry -- [`metricsReportingCreateMeasurementDefinition`](docs/sdks/metricsreporting/README.md#createmeasurementdefinition) - Create a measurement definition +- [`integrationsUpdateFieldMap`](docs/sdks/integrations/README.md#updatefieldmap) - Update field mapping +- [`integrationsUpdateSlackEmojiAction`](docs/sdks/integrations/README.md#updateslackemojiaction) - Update a Slack emoji action +- [`integrationsUpdateStatuspageConnection`](docs/sdks/integrations/README.md#updatestatuspageconnection) - Update a Statuspage connection - [`metricsReportingCreateSavedSearch`](docs/sdks/metricsreporting/README.md#createsavedsearch) - Create a saved search -- [`metricsReportingDeleteMeasurementDefinition`](docs/sdks/metricsreporting/README.md#deletemeasurementdefinition) - Archive a measurement definition -- [`metricsReportingGetMeanTime`](docs/sdks/metricsreporting/README.md#getmeantime) - Get mean time metrics for incidents -- [`metricsReportingGetMeasurementDefinition`](docs/sdks/metricsreporting/README.md#getmeasurementdefinition) - Get a measurement definition +- [`metricsReportingDeleteSavedSearch`](docs/sdks/metricsreporting/README.md#deletesavedsearch) - Delete a saved search +- [`metricsReportingGetMeanTimeReport`](docs/sdks/metricsreporting/README.md#getmeantimereport) - Get mean time metrics for incidents +- [`metricsReportingGetSavedSearch`](docs/sdks/metricsreporting/README.md#getsavedsearch) - Get a saved search +- [`metricsReportingGetSignalsGroupedMetrics`](docs/sdks/metricsreporting/README.md#getsignalsgroupedmetrics) - Generate grouped alert metrics +- [`metricsReportingGetSignalsMttxAnalytics`](docs/sdks/metricsreporting/README.md#getsignalsmttxanalytics) - Get MTTX analytics for signals +- [`metricsReportingGetSignalsTimeseriesAnalytics`](docs/sdks/metricsreporting/README.md#getsignalstimeseriesanalytics) - Generate timeseries alert metrics - [`metricsReportingListIncidentMetrics`](docs/sdks/metricsreporting/README.md#listincidentmetrics) - List incident metrics and analytics -- [`metricsReportingListInfrastructureMetrics`](docs/sdks/metricsreporting/README.md#listinfrastructuremetrics) - List metrics for all services, environments, functionalities, or customers -- [`metricsReportingListMeasurementDefinitions`](docs/sdks/metricsreporting/README.md#listmeasurementdefinitions) - List measurement definitions -- [`metricsReportingListRetrospectives`](docs/sdks/metricsreporting/README.md#listretrospectives) - List retrospective metrics for a date range +- [`metricsReportingListInfrastructureMetrics`](docs/sdks/metricsreporting/README.md#listinfrastructuremetrics) - Get metrics for a component +- [`metricsReportingListInfrastructureTypeMetrics`](docs/sdks/metricsreporting/README.md#listinfrastructuretypemetrics) - List metrics for a component type +- [`metricsReportingListRetrospectiveMetrics`](docs/sdks/metricsreporting/README.md#listretrospectivemetrics) - List retrospective metrics - [`metricsReportingListSavedSearches`](docs/sdks/metricsreporting/README.md#listsavedsearches) - List saved searches -- [`metricsReportingListUserInvolvementMetrics`](docs/sdks/metricsreporting/README.md#listuserinvolvementmetrics) - List user involvement metrics -- [`metricsReportingUpdateMeasurementDefinition`](docs/sdks/metricsreporting/README.md#updatemeasurementdefinition) - Update a measurement definition -- [`onCallSchedulesDelete`](docs/sdks/oncallschedules/README.md#delete) - Delete an on-call schedule for a team -- [`projectConfigurationsCreate`](docs/sdks/projectconfigurations/README.md#create) - Create a ticketing project configuration -- [`projectConfigurationsGet`](docs/sdks/projectconfigurations/README.md#get) - Get a ticketing project configuration -- [`retrospectivesCreateReason`](docs/sdks/retrospectives/README.md#createreason) - Create a contributing factor for a retrospective report -- [`retrospectivesCreateReport`](docs/sdks/retrospectives/README.md#createreport) - Create a retrospective report -- [`retrospectivesDeleteReason`](docs/sdks/retrospectives/README.md#deletereason) - Delete a contributing factor from a retrospective report -- [`retrospectivesGetQuestion`](docs/sdks/retrospectives/README.md#getquestion) - Get a retrospective question -- [`retrospectivesGetReport`](docs/sdks/retrospectives/README.md#getreport) - Get a retrospective report -- [`retrospectivesListQuestions`](docs/sdks/retrospectives/README.md#listquestions) - List retrospective questions -- [`retrospectivesListReportReasons`](docs/sdks/retrospectives/README.md#listreportreasons) - List contributing factors for a retrospective report -- [`retrospectivesListReports`](docs/sdks/retrospectives/README.md#listreports) - List retrospective reports -- [`retrospectivesPublishReport`](docs/sdks/retrospectives/README.md#publishreport) - Publish a retrospective report -- [`retrospectivesUpdateField`](docs/sdks/retrospectives/README.md#updatefield) - Update a retrospective field -- [`retrospectivesUpdateQuestions`](docs/sdks/retrospectives/README.md#updatequestions) - Update retrospective questions -- [`retrospectivesUpdateReason`](docs/sdks/retrospectives/README.md#updatereason) - Update a contributing factor in a retrospective report -- [`retrospectivesUpdateReport`](docs/sdks/retrospectives/README.md#updatereport) - Update a retrospective report -- [`retrospectivesUpdateReportReasonOrder`](docs/sdks/retrospectives/README.md#updatereportreasonorder) - Update the order of contributing factors in a retrospective report -- [`runbooksCreate`](docs/sdks/runbooks/README.md#create) - Create a runbook -- [`runbooksCreateExecution`](docs/sdks/runbooks/README.md#createexecution) - Create a runbook execution -- [`runbooksDelete`](docs/sdks/runbooks/README.md#delete) - Delete a runbook -- [`runbooksExecutionsDelete`](docs/sdks/executions/README.md#delete) - Terminate a runbook execution -- [`runbooksGet`](docs/sdks/runbooks/README.md#get) - Get a runbook -- [`runbooksGetExecution`](docs/sdks/runbooks/README.md#getexecution) - Get a runbook execution -- [`runbooksGetExecutionStepScript`](docs/sdks/runbooks/README.md#getexecutionstepscript) - Get a runbook execution step script -- [`runbooksGetExecutionVoteStatus`](docs/sdks/runbooks/README.md#getexecutionvotestatus) - Get vote counts for a runbook execution -- [`runbooksGetStepVoteStatus`](docs/sdks/runbooks/README.md#getstepvotestatus) - Get vote counts for a runbook step -- [`runbooksList`](docs/sdks/runbooks/README.md#list) - List runbooks -- [`runbooksListActions`](docs/sdks/runbooks/README.md#listactions) - List runbook actions -- [`runbooksListAudits`](docs/sdks/runbooks/README.md#listaudits) - List runbook audits -- [`runbooksListExecutions`](docs/sdks/runbooks/README.md#listexecutions) - List runbook executions -- [`runbooksListSelectOptions`](docs/sdks/runbooks/README.md#listselectoptions) - List select options for a runbook integration action field -- [`runbooksUpdate`](docs/sdks/runbooks/README.md#update) - Update a runbook -- [`runbooksUpdateExecutionStep`](docs/sdks/runbooks/README.md#updateexecutionstep) - Update a runbook execution step -- [`runbooksUpdateExecutionStepScriptState`](docs/sdks/runbooks/README.md#updateexecutionstepscriptstate) - Update the script state for a runbook execution step -- [`runbooksUpdateExecutionStepVotes`](docs/sdks/runbooks/README.md#updateexecutionstepvotes) - Update votes for a runbook execution step -- [`runbooksUpdateExecutionVotes`](docs/sdks/runbooks/README.md#updateexecutionvotes) - Vote on a runbook execution -- [`scimCreate`](docs/sdks/scim/README.md#create) - Create a team via SCIM -- [`scimCreateUser`](docs/sdks/scim/README.md#createuser) - Create a user via SCIM -- [`scimDeleteGroup`](docs/sdks/scim/README.md#deletegroup) - Delete a SCIM group -- [`scimDeleteUser`](docs/sdks/scim/README.md#deleteuser) - Delete a SCIM user -- [`scimGetGroup`](docs/sdks/scim/README.md#getgroup) - Get a SCIM group -- [`scimGetUser`](docs/sdks/scim/README.md#getuser) - Get a SCIM user -- [`scimListGroups`](docs/sdks/scim/README.md#listgroups) - List teams via SCIM -- [`scimListUsers`](docs/sdks/scim/README.md#listusers) - List users via SCIM -- [`scimReplaceUser`](docs/sdks/scim/README.md#replaceuser) - Replace a SCIM user -- [`scimUpdateGroup`](docs/sdks/scim/README.md#updategroup) - Update a SCIM group -- [`scimUpdateUser`](docs/sdks/scim/README.md#updateuser) - Update a SCIM user -- [`servicesCatalogsIngest`](docs/sdks/catalogs/README.md#ingest) - Ingest service catalog data -- [`servicesCatalogsRefresh`](docs/sdks/catalogs/README.md#refresh) - Refresh a service catalog -- [`servicesCreate`](docs/sdks/services/README.md#create) - Create a service -- [`servicesCreateChecklistResponse`](docs/sdks/services/README.md#createchecklistresponse) - Create a checklist response for a service -- [`servicesCreateDependency`](docs/sdks/services/README.md#createdependency) - Create a dependency relationship between services -- [`servicesCreateLinks`](docs/sdks/services/README.md#createlinks) - Create multiple services and link them to external services -- [`servicesDelete`](docs/sdks/services/README.md#delete) - Delete a service -- [`servicesDeleteDependency`](docs/sdks/services/README.md#deletedependency) - Delete a service dependency -- [`servicesDeleteLink`](docs/sdks/services/README.md#deletelink) - Delete a service link -- [`servicesGet`](docs/sdks/services/README.md#get) - Get a service -- [`servicesGetAvailableDownstreamDependencies`](docs/sdks/services/README.md#getavailabledownstreamdependencies) - List available downstream service dependencies -- [`servicesGetDependency`](docs/sdks/services/README.md#getdependency) - Get a service dependency -- [`servicesList`](docs/sdks/services/README.md#list) - List services -- [`servicesListAvailableUpstreamDependencies`](docs/sdks/services/README.md#listavailableupstreamdependencies) - List available upstream service dependencies -- [`servicesListDependencies`](docs/sdks/services/README.md#listdependencies) - List dependencies for a service -- [`servicesListForUser`](docs/sdks/services/README.md#listforuser) - List services for a user's teams -- [`servicesPatch`](docs/sdks/services/README.md#patch) - Update a service -- [`servicesUpdate`](docs/sdks/services/README.md#update) - Update a service dependency -- [`signalsCreateEmailTarget`](docs/sdks/signals/README.md#createemailtarget) - Create an email target for signals -- [`signalsCreateRule`](docs/sdks/signals/README.md#createrule) - Create a signal rule for a team -- [`signalsCreateWebhookTarget`](docs/sdks/signals/README.md#createwebhooktarget) - Create a webhook target for signals -- [`signalsDebug`](docs/sdks/signals/README.md#debug) - Debug a signal -- [`signalsDeleteEmailTarget`](docs/sdks/signals/README.md#deleteemailtarget) - Delete a signal email target -- [`signalsDeleteEscalationPolicy`](docs/sdks/signals/README.md#deleteescalationpolicy) - Delete an escalation policy for a team -- [`signalsDeleteRule`](docs/sdks/signals/README.md#deleterule) - Delete a signal rule -- [`signalsDeleteWebhookTarget`](docs/sdks/signals/README.md#deletewebhooktarget) - Delete a webhook target -- [`signalsGetAnalyticsTimeseries`](docs/sdks/signals/README.md#getanalyticstimeseries) - List timeseries metrics for signal alerts -- [`signalsGetEmailTarget`](docs/sdks/signals/README.md#getemailtarget) - Get a signal email target -- [`signalsGetIngestUrl`](docs/sdks/signals/README.md#getingesturl) - Get signal ingestion URL -- [`signalsGetMttxAnalytics`](docs/sdks/signals/README.md#getmttxanalytics) - Get MTTX analytics for signals -- [`signalsGetOnCallSchedule`](docs/sdks/signals/README.md#getoncallschedule) - Get an on-call schedule for a team -- [`signalsGetRule`](docs/sdks/signals/README.md#getrule) - Get a signal rule -- [`signalsGetWebhookTarget`](docs/sdks/signals/README.md#getwebhooktarget) - Get a webhook target -- [`signalsListEmailTargets`](docs/sdks/signals/README.md#listemailtargets) - List email targets for signals -- [`signalsListEscalationPolicies`](docs/sdks/signals/README.md#listescalationpolicies) - List escalation policies for a team -- [`signalsListEventSources`](docs/sdks/signals/README.md#listeventsources) - List event sources for signals -- [`signalsListGroupedMetrics`](docs/sdks/signals/README.md#listgroupedmetrics) - List grouped signal alert metrics -- [`signalsListOnCall`](docs/sdks/signals/README.md#listoncall) - List on-call schedules -- [`signalsListRules`](docs/sdks/signals/README.md#listrules) - List signal rules for a team -- [`signalsListTransposers`](docs/sdks/signals/README.md#listtransposers) - List signal transposers -- [`signalsListWebhookTargets`](docs/sdks/signals/README.md#listwebhooktargets) - List webhook targets for signals -- [`signalsTeamsGetEscalationPolicy`](docs/sdks/firehydranttypescriptsdksignalsteams/README.md#getescalationpolicy) - Get an escalation policy for a team -- [`signalsUpdateEmailTarget`](docs/sdks/signals/README.md#updateemailtarget) - Update a signal email target -- [`signalsUpdateOnCallSchedule`](docs/sdks/signals/README.md#updateoncallschedule) - Update an on-call schedule for a team -- [`signalsUpdateRule`](docs/sdks/signals/README.md#updaterule) - Update a signal rule -- [`signalsUpdateWebhookTarget`](docs/sdks/signals/README.md#updatewebhooktarget) - Update a webhook target -- [`slackCreateEmojiAction`](docs/sdks/slack/README.md#createemojiaction) - Create a Slack emoji action -- [`slackListUsergroups`](docs/sdks/slack/README.md#listusergroups) - List Slack usergroups -- [`slackUpdateEmojiAction`](docs/sdks/slack/README.md#updateemojiaction) - Update a Slack emoji action -- [`statusPagesCreate`](docs/sdks/statuspages/README.md#create) - Create a status page -- [`statusPagesCreateComponentGroup`](docs/sdks/statuspages/README.md#createcomponentgroup) - Create a component group for a status page -- [`statusPagesCreateLink`](docs/sdks/statuspages/README.md#createlink) - Create a link for a status page -- [`statusPagesCreateSubscribers`](docs/sdks/statuspages/README.md#createsubscribers) - Add subscribers to a status page -- [`statusPagesCreateSubscription`](docs/sdks/statuspages/README.md#createsubscription) - Create a status page subscription -- [`statusPagesDelete`](docs/sdks/statuspages/README.md#delete) - Delete a status page -- [`statusPagesDeleteComponentGroup`](docs/sdks/statuspages/README.md#deletecomponentgroup) - Delete a status page component group -- [`statusPagesDeleteImage`](docs/sdks/statuspages/README.md#deleteimage) - Delete an image from a status page -- [`statusPagesDeleteIncident`](docs/sdks/statuspages/README.md#deleteincident) - Remove a status page from an incident -- [`statusPagesDeleteLink`](docs/sdks/statuspages/README.md#deletelink) - Delete a status page link -- [`statusPagesDeleteSubscribers`](docs/sdks/statuspages/README.md#deletesubscribers) - Remove subscribers from a status page -- [`statusPagesDeleteSubscription`](docs/sdks/statuspages/README.md#deletesubscription) - Unsubscribe from status page notifications -- [`statusPagesGet`](docs/sdks/statuspages/README.md#get) - Get a status page -- [`statusPagesList`](docs/sdks/statuspages/README.md#list) - List status pages -- [`statusPagesListSubscribers`](docs/sdks/statuspages/README.md#listsubscribers) - List status page subscribers -- [`statusPagesUpdate`](docs/sdks/statuspages/README.md#update) - Update a status page -- [`statusPagesUpdateComponentGroup`](docs/sdks/statuspages/README.md#updatecomponentgroup) - Update a status page component group -- [`statusPagesUpdateImage`](docs/sdks/statuspages/README.md#updateimage) - Upload an image for a status page -- [`statusPagesUpdateLink`](docs/sdks/statuspages/README.md#updatelink) - Update a status page link -- [`statuspageUpdateConnection`](docs/sdks/statuspage/README.md#updateconnection) - Update a Statuspage connection -- [`statusUpdateTemplatesCreate`](docs/sdks/statusupdatetemplates/README.md#create) - Create a status update template -- [`systemPing`](docs/sdks/system/README.md#ping) - Check API connectivity -- [`tasksConvertToFollowup`](docs/sdks/tasks/README.md#converttofollowup) - Convert a task to a follow-up -- [`tasksCreate`](docs/sdks/tasks/README.md#create) - Create a task for an incident +- [`metricsReportingListUserInvolvementMetrics`](docs/sdks/metricsreporting/README.md#listuserinvolvementmetrics) - List user metrics +- [`metricsReportingUpdateSavedSearch`](docs/sdks/metricsreporting/README.md#updatesavedsearch) - Update a saved search +- [`retrospectivesCreateIncidentRetrospective`](docs/sdks/retrospectives/README.md#createincidentretrospective) - Create a new retrospective on the incident using the template +- [`retrospectivesCreateIncidentRetrospectiveDynamicInput`](docs/sdks/retrospectives/README.md#createincidentretrospectivedynamicinput) - Add a new dynamic input field to a retrospective's dynamic input group field +- [`retrospectivesCreateIncidentRetrospectiveField`](docs/sdks/retrospectives/README.md#createincidentretrospectivefield) - Appends a new incident retrospective field to an incident retrospective +- [`retrospectivesCreatePostMortemReason`](docs/sdks/retrospectives/README.md#createpostmortemreason) - Create a contributing factor for a retrospective report +- [`retrospectivesCreatePostMortemReport`](docs/sdks/retrospectives/README.md#createpostmortemreport) - Create a retrospective report +- [`retrospectivesCreateRetrospectiveTemplate`](docs/sdks/retrospectives/README.md#createretrospectivetemplate) - Create a retrospective template +- [`retrospectivesDeleteIncidentRetrospectiveDynamicInput`](docs/sdks/retrospectives/README.md#deleteincidentretrospectivedynamicinput) - Removes a dynamic input from a retrospective's dynamic input group field +- [`retrospectivesDeletePostMortemReason`](docs/sdks/retrospectives/README.md#deletepostmortemreason) - Delete a contributing factor from a retrospective report +- [`retrospectivesDeleteRetrospectiveTemplate`](docs/sdks/retrospectives/README.md#deleteretrospectivetemplate) - Delete a retrospective template +- [`retrospectivesExportIncidentRetrospectives`](docs/sdks/retrospectives/README.md#exportincidentretrospectives) - Export an incident's retrospective(s) +- [`retrospectivesGetIncidentRetrospectiveField`](docs/sdks/retrospectives/README.md#getincidentretrospectivefield) - Get a retrospective field +- [`retrospectivesGetPostMortemQuestion`](docs/sdks/retrospectives/README.md#getpostmortemquestion) - Get a retrospective question +- [`retrospectivesGetPostMortemReport`](docs/sdks/retrospectives/README.md#getpostmortemreport) - Get a retrospective report +- [`retrospectivesGetRetrospectiveTemplate`](docs/sdks/retrospectives/README.md#getretrospectivetemplate) - Get a retrospective template +- [`retrospectivesListIncidentRetrospectives`](docs/sdks/retrospectives/README.md#listincidentretrospectives) - All attached retrospectives for an incident +- [`retrospectivesListPostMortemQuestions`](docs/sdks/retrospectives/README.md#listpostmortemquestions) - List retrospective questions +- [`retrospectivesListPostMortemReasons`](docs/sdks/retrospectives/README.md#listpostmortemreasons) - List contributing factors for a retrospective report +- [`retrospectivesListPostMortemReports`](docs/sdks/retrospectives/README.md#listpostmortemreports) - List retrospective reports +- [`retrospectivesListRetrospectives`](docs/sdks/retrospectives/README.md#listretrospectives) - List retrospective reports +- [`retrospectivesListRetrospectiveTemplates`](docs/sdks/retrospectives/README.md#listretrospectivetemplates) - List retrospective templates +- [`retrospectivesPublishPostMortemReport`](docs/sdks/retrospectives/README.md#publishpostmortemreport) - Publish a retrospective report +- [`retrospectivesReorderPostMortemReasons`](docs/sdks/retrospectives/README.md#reorderpostmortemreasons) - Reorder a contributing factor for a retrospective report +- [`retrospectivesShareIncidentRetrospectives`](docs/sdks/retrospectives/README.md#shareincidentretrospectives) - Share an incident's retrospective +- [`retrospectivesUpdateIncidentRetrospective`](docs/sdks/retrospectives/README.md#updateincidentretrospective) - Update a retrospective on the incident +- [`retrospectivesUpdateIncidentRetrospectiveField`](docs/sdks/retrospectives/README.md#updateincidentretrospectivefield) - Update the value on a retrospective field +- [`retrospectivesUpdatePostMortemField`](docs/sdks/retrospectives/README.md#updatepostmortemfield) - Update a retrospective field +- [`retrospectivesUpdatePostMortemQuestions`](docs/sdks/retrospectives/README.md#updatepostmortemquestions) - Update retrospective questions +- [`retrospectivesUpdatePostMortemReason`](docs/sdks/retrospectives/README.md#updatepostmortemreason) - Update a contributing factor in a retrospective report +- [`retrospectivesUpdatePostMortemReport`](docs/sdks/retrospectives/README.md#updatepostmortemreport) - Update a retrospective report +- [`retrospectivesUpdateRetrospectiveTemplate`](docs/sdks/retrospectives/README.md#updateretrospectivetemplate) - Update a retrospective template +- [`runbooksCreateRunbook`](docs/sdks/runbooks/README.md#createrunbook) - Create a runbook +- [`runbooksCreateRunbookExecution`](docs/sdks/runbooks/README.md#createrunbookexecution) - Create a runbook execution +- [`runbooksDeleteRunbook`](docs/sdks/runbooks/README.md#deleterunbook) - Delete a runbook +- [`runbooksDeleteRunbookExecution`](docs/sdks/runbooks/README.md#deleterunbookexecution) - Terminate a runbook execution +- [`runbooksGetRunbook`](docs/sdks/runbooks/README.md#getrunbook) - Get a runbook +- [`runbooksGetRunbookActionFieldOptions`](docs/sdks/runbooks/README.md#getrunbookactionfieldoptions) - List select options for a runbook integration action field +- [`runbooksGetRunbookExecution`](docs/sdks/runbooks/README.md#getrunbookexecution) - Get a runbook execution +- [`runbooksGetRunbookExecutionStepScript`](docs/sdks/runbooks/README.md#getrunbookexecutionstepscript) - Get a step's bash script +- [`runbooksListRunbookActions`](docs/sdks/runbooks/README.md#listrunbookactions) - List runbook actions +- [`runbooksListRunbookAudits`](docs/sdks/runbooks/README.md#listrunbookaudits) - List runbook audits +- [`runbooksListRunbookExecutions`](docs/sdks/runbooks/README.md#listrunbookexecutions) - List runbook executions +- [`runbooksListRunbooks`](docs/sdks/runbooks/README.md#listrunbooks) - List runbooks +- [`runbooksUpdateRunbook`](docs/sdks/runbooks/README.md#updaterunbook) - Update a runbook +- [`runbooksUpdateRunbookExecutionStep`](docs/sdks/runbooks/README.md#updaterunbookexecutionstep) - Update a runbook step execution +- [`runbooksUpdateRunbookExecutionStepScript`](docs/sdks/runbooks/README.md#updaterunbookexecutionstepscript) - Update a script step's execution status +- [`scimCreateSCIMGroup`](docs/sdks/scim/README.md#createscimgroup) - Create a SCIM group and assign members +- [`scimCreateSCIMUser`](docs/sdks/scim/README.md#createscimuser) - Create a User from SCIM data +- [`scimDeleteSCIMGroup`](docs/sdks/scim/README.md#deletescimgroup) - Delete a SCIM group +- [`scimDeleteSCIMUser`](docs/sdks/scim/README.md#deletescimuser) - Delete a User matching SCIM data +- [`scimGetSCIMGroup`](docs/sdks/scim/README.md#getscimgroup) - Get a SCIM group +- [`scimGetSCIMUser`](docs/sdks/scim/README.md#getscimuser) - Get a SCIM user +- [`scimListSCIMGroups`](docs/sdks/scim/README.md#listscimgroups) - List SCIM groups +- [`scimListSCIMUsers`](docs/sdks/scim/README.md#listscimusers) - List SCIM users +- [`scimPatchSCIMUser`](docs/sdks/scim/README.md#patchscimuser) - Update a User from SCIM data +- [`scimUpdateSCIMGroup`](docs/sdks/scim/README.md#updatescimgroup) - Update a SCIM group and assign members +- [`scimUpdateSCIMUser`](docs/sdks/scim/README.md#updatescimuser) - Update a User from SCIM data +- [`signalsCreateOnCallShift`](docs/sdks/signals/README.md#createoncallshift) - Create a shift for an on-call schedule +- [`signalsCreateSignalsEmailTarget`](docs/sdks/signals/README.md#createsignalsemailtarget) - Create an email target for signals +- [`signalsCreateSignalsWebhookTarget`](docs/sdks/signals/README.md#createsignalswebhooktarget) - Create a webhook target +- [`signalsCreateTeamEscalationPolicy`](docs/sdks/signals/README.md#createteamescalationpolicy) - Create an escalation policy for a team +- [`signalsCreateTeamOnCallSchedule`](docs/sdks/signals/README.md#createteamoncallschedule) - Create an on-call schedule for a team +- [`signalsCreateTeamSignalRule`](docs/sdks/signals/README.md#createteamsignalrule) - Create a Signals rule +- [`signalsDebugSignalsExpression`](docs/sdks/signals/README.md#debugsignalsexpression) - Debug Signals expressions +- [`signalsDeleteOnCallShift`](docs/sdks/signals/README.md#deleteoncallshift) - Delete an on-call shift from a team schedule +- [`signalsDeleteSignalsEmailTarget`](docs/sdks/signals/README.md#deletesignalsemailtarget) - Delete a signal email target +- [`signalsDeleteSignalsWebhookTarget`](docs/sdks/signals/README.md#deletesignalswebhooktarget) - Delete a webhook target +- [`signalsDeleteTeamEscalationPolicy`](docs/sdks/signals/README.md#deleteteamescalationpolicy) - Delete an escalation policy for a team +- [`signalsDeleteTeamOnCallSchedule`](docs/sdks/signals/README.md#deleteteamoncallschedule) - Delete an on-call schedule for a team +- [`signalsDeleteTeamSignalRule`](docs/sdks/signals/README.md#deleteteamsignalrule) - Delete a Signals rule +- [`signalsGetOnCallShift`](docs/sdks/signals/README.md#getoncallshift) - Get an on-call shift for a team schedule +- [`signalsGetSignalsEmailTarget`](docs/sdks/signals/README.md#getsignalsemailtarget) - Get a signal email target +- [`signalsGetSignalsIngestUrl`](docs/sdks/signals/README.md#getsignalsingesturl) - Get the signals ingestion URL +- [`signalsGetSignalsWebhookTarget`](docs/sdks/signals/README.md#getsignalswebhooktarget) - Get a webhook target +- [`signalsGetTeamEscalationPolicy`](docs/sdks/signals/README.md#getteamescalationpolicy) - Get an escalation policy for a team +- [`signalsGetTeamOnCallSchedule`](docs/sdks/signals/README.md#getteamoncallschedule) - Get an on-call schedule for a team +- [`signalsGetTeamSignalRule`](docs/sdks/signals/README.md#getteamsignalrule) - Get a Signals rule +- [`signalsListOrganizationOnCallSchedules`](docs/sdks/signals/README.md#listorganizationoncallschedules) - List on-call schedules +- [`signalsListSignalsEmailTargets`](docs/sdks/signals/README.md#listsignalsemailtargets) - List email targets for signals +- [`signalsListSignalsEventSources`](docs/sdks/signals/README.md#listsignalseventsources) - List event sources for Signals +- [`signalsListSignalsTransposers`](docs/sdks/signals/README.md#listsignalstransposers) - List signal transposers +- [`signalsListSignalsWebhookTargets`](docs/sdks/signals/README.md#listsignalswebhooktargets) - List webhook targets +- [`signalsListTeamEscalationPolicies`](docs/sdks/signals/README.md#listteamescalationpolicies) - List escalation policies for a team +- [`signalsListTeamOnCallSchedules`](docs/sdks/signals/README.md#listteamoncallschedules) - List on-call schedules for a team +- [`signalsListTeamSignalRules`](docs/sdks/signals/README.md#listteamsignalrules) - List Signals rules +- [`signalsUpdateOnCallShift`](docs/sdks/signals/README.md#updateoncallshift) - Update an on-call shift for a team schedule +- [`signalsUpdateSignalsEmailTarget`](docs/sdks/signals/README.md#updatesignalsemailtarget) - Update an email target +- [`signalsUpdateSignalsWebhookTarget`](docs/sdks/signals/README.md#updatesignalswebhooktarget) - Update a webhook target +- [`signalsUpdateTeamEscalationPolicy`](docs/sdks/signals/README.md#updateteamescalationpolicy) - Update an escalation policy for a team +- [`signalsUpdateTeamOnCallSchedule`](docs/sdks/signals/README.md#updateteamoncallschedule) - Update an on-call schedule for a team +- [`signalsUpdateTeamSignalRule`](docs/sdks/signals/README.md#updateteamsignalrule) - Update a Signals rule +- [`statusPagesCreateEmailSubscriber`](docs/sdks/statuspages/README.md#createemailsubscriber) - Add subscribers to a status page +- [`statusPagesCreateNuncComponentGroup`](docs/sdks/statuspages/README.md#createnunccomponentgroup) - Create a component group for a status page +- [`statusPagesCreateNuncConnection`](docs/sdks/statuspages/README.md#createnuncconnection) - Create a status page +- [`statusPagesCreateNuncLink`](docs/sdks/statuspages/README.md#createnunclink) - Add link to a status page +- [`statusPagesCreateNuncSubscription`](docs/sdks/statuspages/README.md#createnuncsubscription) - Create a status page subscription +- [`statusPagesDeleteEmailSubscriber`](docs/sdks/statuspages/README.md#deleteemailsubscriber) - Remove subscribers from a status page +- [`statusPagesDeleteIncidentStatusPage`](docs/sdks/statuspages/README.md#deleteincidentstatuspage) - Remove a status page from an incident +- [`statusPagesDeleteNuncComponentGroup`](docs/sdks/statuspages/README.md#deletenunccomponentgroup) - Delete a status page component group +- [`statusPagesDeleteNuncConnection`](docs/sdks/statuspages/README.md#deletenuncconnection) - Delete a status page +- [`statusPagesDeleteNuncImage`](docs/sdks/statuspages/README.md#deletenuncimage) - Delete an image from a status page +- [`statusPagesDeleteNuncLink`](docs/sdks/statuspages/README.md#deletenunclink) - Delete a status page link +- [`statusPagesDeleteNuncSubscription`](docs/sdks/statuspages/README.md#deletenuncsubscription) - Unsubscribe from status page notifications +- [`statusPagesGetNuncConnection`](docs/sdks/statuspages/README.md#getnuncconnection) - Get a status page +- [`statusPagesListEmailSubscribers`](docs/sdks/statuspages/README.md#listemailsubscribers) - List status page subscribers +- [`statusPagesListNuncConnections`](docs/sdks/statuspages/README.md#listnuncconnections) - List status pages +- [`statusPagesUpdateNuncComponentGroup`](docs/sdks/statuspages/README.md#updatenunccomponentgroup) - Update a status page component group +- [`statusPagesUpdateNuncConnection`](docs/sdks/statuspages/README.md#updatenuncconnection) - Update a status page +- [`statusPagesUpdateNuncImage`](docs/sdks/statuspages/README.md#updatenuncimage) - Upload an image for a status page +- [`statusPagesUpdateNuncLink`](docs/sdks/statuspages/README.md#updatenunclink) - Update a status page link +- [`tasksConvertIncidentTask`](docs/sdks/tasks/README.md#convertincidenttask) - Convert a task to a follow-up - [`tasksCreateChecklistTemplate`](docs/sdks/tasks/README.md#createchecklisttemplate) - Create a checklist template -- [`tasksCreateList`](docs/sdks/tasks/README.md#createlist) - Create a task list -- [`tasksDelete`](docs/sdks/tasks/README.md#delete) - Delete a task from an incident +- [`tasksCreateIncidentTask`](docs/sdks/tasks/README.md#createincidenttask) - Create an incident task +- [`tasksCreateIncidentTaskList`](docs/sdks/tasks/README.md#createincidenttasklist) - Add tasks from a task list to an incident +- [`tasksCreateTaskList`](docs/sdks/tasks/README.md#createtasklist) - Create a task list - [`tasksDeleteChecklistTemplate`](docs/sdks/tasks/README.md#deletechecklisttemplate) - Archive a checklist template -- [`tasksGet`](docs/sdks/tasks/README.md#get) - Get a task list -- [`tasksGetForIncident`](docs/sdks/tasks/README.md#getforincident) - Get a task for an incident +- [`tasksDeleteIncidentTask`](docs/sdks/tasks/README.md#deleteincidenttask) - Delete an incident task +- [`tasksDeleteTaskList`](docs/sdks/tasks/README.md#deletetasklist) - Delete a task list +- [`tasksGetChecklistTemplate`](docs/sdks/tasks/README.md#getchecklisttemplate) - Get a checklist template +- [`tasksGetIncidentTask`](docs/sdks/tasks/README.md#getincidenttask) - Get an incident task +- [`tasksGetTaskList`](docs/sdks/tasks/README.md#gettasklist) - Get a task list - [`tasksListChecklistTemplates`](docs/sdks/tasks/README.md#listchecklisttemplates) - List checklist templates -- [`tasksListDelete`](docs/sdks/list/README.md#delete) - Delete a task list -- [`tasksListForIncident`](docs/sdks/tasks/README.md#listforincident) - List tasks for an incident -- [`tasksListTasks`](docs/sdks/tasks/README.md#listtasks) - List task lists -- [`tasksUpdate`](docs/sdks/tasks/README.md#update) - Update a task list +- [`tasksListIncidentTasks`](docs/sdks/tasks/README.md#listincidenttasks) - List tasks for an incident +- [`tasksListTaskLists`](docs/sdks/tasks/README.md#listtasklists) - List task lists - [`tasksUpdateChecklistTemplate`](docs/sdks/tasks/README.md#updatechecklisttemplate) - Update a checklist template -- [`tasksUpdateTask`](docs/sdks/tasks/README.md#updatetask) - Update a task for an incident -- [`teamsArchive`](docs/sdks/teams/README.md#archive) - Archive a team -- [`teamsCreate`](docs/sdks/teams/README.md#create) - Create a team -- [`teamsCreateEscalationPolicy`](docs/sdks/teams/README.md#createescalationpolicy) - Create an escalation policy for a team -- [`teamsCreateOnCallSchedule`](docs/sdks/teams/README.md#createoncallschedule) - Create an on-call schedule for a team -- [`teamsCreateShift`](docs/sdks/teams/README.md#createshift) - Create a shift for an on-call schedule -- [`teamsDeleteScheduleShift`](docs/sdks/teams/README.md#deletescheduleshift) - Delete an on-call shift from a team schedule -- [`teamsGet`](docs/sdks/teams/README.md#get) - Get a team -- [`teamsGetScheduleShift`](docs/sdks/teams/README.md#getscheduleshift) - Get an on-call shift for a team schedule -- [`teamsList`](docs/sdks/teams/README.md#list) - List teams -- [`teamsListOnCallSchedules`](docs/sdks/teams/README.md#listoncallschedules) - List on-call schedules for a team +- [`tasksUpdateIncidentTask`](docs/sdks/tasks/README.md#updateincidenttask) - Update an incident task +- [`tasksUpdateTaskList`](docs/sdks/tasks/README.md#updatetasklist) - Update a task list +- [`teamsCreateTeam`](docs/sdks/teams/README.md#createteam) - Create a team +- [`teamsDeleteTeam`](docs/sdks/teams/README.md#deleteteam) - Archive a team +- [`teamsGetTeam`](docs/sdks/teams/README.md#getteam) - Get a team - [`teamsListSchedules`](docs/sdks/teams/README.md#listschedules) - List schedules -- [`teamsUpdate`](docs/sdks/teams/README.md#update) - Update a team -- [`teamsUpdateEscalationPolicy`](docs/sdks/teams/README.md#updateescalationpolicy) - Update an escalation policy for a team -- [`teamsUpdateScheduleShift`](docs/sdks/teams/README.md#updatescheduleshift) - Update an on-call shift in a team schedule -- [`ticketingGetFieldMap`](docs/sdks/ticketing/README.md#getfieldmap) - Get a field map for a ticketing project -- [`ticketingPrioritiesGet`](docs/sdks/ticketingpriorities/README.md#get) - Get a ticketing priority -- [`ticketingUpdateProjectConfig`](docs/sdks/ticketing/README.md#updateprojectconfig) - Update a ticketing project configuration -- [`ticketsCreate`](docs/sdks/tickets/README.md#create) - Create a ticket -- [`ticketsDelete`](docs/sdks/tickets/README.md#delete) - Delete a ticket -- [`ticketsList`](docs/sdks/tickets/README.md#list) - List tickets -- [`ticketsUpdate`](docs/sdks/tickets/README.md#update) - Update a ticket -- [`usersGet`](docs/sdks/users/README.md#get) - Get a user -- [`usersGetCurrent`](docs/sdks/users/README.md#getcurrent) - Get the currently authenticated user -- [`usersList`](docs/sdks/users/README.md#list) - List users -- [`webhooksCreate`](docs/sdks/webhooks/README.md#create) - Create a webhook -- [`webhooksDelete`](docs/sdks/webhooks/README.md#delete) - Delete a webhook -- [`webhooksGet`](docs/sdks/webhooks/README.md#get) - Get a webhook -- [`webhooksList`](docs/sdks/webhooks/README.md#list) - List webhooks -- [`webhooksListDeliveries`](docs/sdks/webhooks/README.md#listdeliveries) - List webhook deliveries -- [`webhooksUpdate`](docs/sdks/webhooks/README.md#update) - Update a webhook -- [`zendeskSearchTickets`](docs/sdks/zendesk/README.md#searchtickets) - Search for Zendesk tickets +- [`teamsListTeams`](docs/sdks/teams/README.md#listteams) - List teams +- [`teamsUpdateTeam`](docs/sdks/teams/README.md#updateteam) - Update a team +- [`ticketingCreateInboundFieldMap`](docs/sdks/ticketing/README.md#createinboundfieldmap) - Create inbound field map for a ticketing project +- [`ticketingCreateTicket`](docs/sdks/ticketing/README.md#createticket) - Create a ticket +- [`ticketingCreateTicketingFieldMap`](docs/sdks/ticketing/README.md#createticketingfieldmap) - Create a field mapping for a ticketing project +- [`ticketingCreateTicketingPriority`](docs/sdks/ticketing/README.md#createticketingpriority) - Create a ticketing priority +- [`ticketingCreateTicketingProjectConfig`](docs/sdks/ticketing/README.md#createticketingprojectconfig) - Create a ticketing project configuration +- [`ticketingDeleteInboundFieldMap`](docs/sdks/ticketing/README.md#deleteinboundfieldmap) - Archive inbound field map for a ticketing project +- [`ticketingDeleteTicket`](docs/sdks/ticketing/README.md#deleteticket) - Archive a ticket +- [`ticketingDeleteTicketingFieldMap`](docs/sdks/ticketing/README.md#deleteticketingfieldmap) - Archive a field map for a ticketing project +- [`ticketingDeleteTicketingPriority`](docs/sdks/ticketing/README.md#deleteticketingpriority) - Delete a ticketing priority +- [`ticketingDeleteTicketingProjectConfig`](docs/sdks/ticketing/README.md#deleteticketingprojectconfig) - Archive a ticketing project configuration +- [`ticketingGetConfigurationOptions`](docs/sdks/ticketing/README.md#getconfigurationoptions) - List configuration options for a ticketing project +- [`ticketingGetInboundFieldMap`](docs/sdks/ticketing/README.md#getinboundfieldmap) - Get inbound field map for a ticketing project +- [`ticketingGetOptionsForField`](docs/sdks/ticketing/README.md#getoptionsforfield) - List a field's configuration options for a ticketing project +- [`ticketingGetTicket`](docs/sdks/ticketing/README.md#getticket) - Get a ticket +- [`ticketingGetTicketingFieldMap`](docs/sdks/ticketing/README.md#getticketingfieldmap) - Get a field map for a ticketing project +- [`ticketingGetTicketingPriority`](docs/sdks/ticketing/README.md#getticketingpriority) - Get a ticketing priority +- [`ticketingGetTicketingProject`](docs/sdks/ticketing/README.md#getticketingproject) - Get a ticketing project +- [`ticketingGetTicketingProjectConfig`](docs/sdks/ticketing/README.md#getticketingprojectconfig) - Get configuration for a ticketing project +- [`ticketingListAvailableInboundFieldMaps`](docs/sdks/ticketing/README.md#listavailableinboundfieldmaps) - List available fields for ticket field mapping +- [`ticketingListAvailableTicketingFieldMaps`](docs/sdks/ticketing/README.md#listavailableticketingfieldmaps) - List available fields for ticket field mapping +- [`ticketingListInboundFieldMaps`](docs/sdks/ticketing/README.md#listinboundfieldmaps) - List inbound field maps for a ticketing project +- [`ticketingListTicketingPriorities`](docs/sdks/ticketing/README.md#listticketingpriorities) - List ticketing priorities +- [`ticketingListTicketingProjects`](docs/sdks/ticketing/README.md#listticketingprojects) - List ticketing projects +- [`ticketingListTickets`](docs/sdks/ticketing/README.md#listtickets) - List tickets +- [`ticketingListTicketTags`](docs/sdks/ticketing/README.md#listtickettags) - List ticket tags +- [`ticketingUpdateInboundFieldMap`](docs/sdks/ticketing/README.md#updateinboundfieldmap) - Update inbound field map for a ticketing project +- [`ticketingUpdateTicket`](docs/sdks/ticketing/README.md#updateticket) - Update a ticket +- [`ticketingUpdateTicketingFieldMap`](docs/sdks/ticketing/README.md#updateticketingfieldmap) - Update a field map for a ticketing project +- [`ticketingUpdateTicketingPriority`](docs/sdks/ticketing/README.md#updateticketingpriority) - Update a ticketing priority +- [`ticketingUpdateTicketingProjectConfig`](docs/sdks/ticketing/README.md#updateticketingprojectconfig) - Update configuration for a ticketing project +- [`usersGetCurrentUser`](docs/sdks/users/README.md#getcurrentuser) - Get the currently authenticated user +- [`usersGetUser`](docs/sdks/users/README.md#getuser) - Get a user +- [`usersListUsers`](docs/sdks/users/README.md#listusers) - List users +- [`webhooksCreateWebhook`](docs/sdks/webhooks/README.md#createwebhook) - Create a webhook +- [`webhooksDeleteWebhook`](docs/sdks/webhooks/README.md#deletewebhook) - Delete a webhook +- [`webhooksGetWebhook`](docs/sdks/webhooks/README.md#getwebhook) - Get a webhook +- [`webhooksListWebhookDeliveries`](docs/sdks/webhooks/README.md#listwebhookdeliveries) - List webhook deliveries +- [`webhooksListWebhooks`](docs/sdks/webhooks/README.md#listwebhooks) - List webhooks +- [`webhooksUpdateWebhook`](docs/sdks/webhooks/README.md#updatewebhook) - Update a webhook @@ -1055,15 +1245,15 @@ Certain SDK methods accept files as part of a multi-part request. It is possible > - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob). ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; import { openAsBlob } from "node:fs"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createAttachment({ + const result = await firehydrant.incidents.createIncidentAttachment({ incidentId: "", requestBody: { file: await openAsBlob("example.file"), @@ -1086,26 +1276,25 @@ Some of the endpoints in this SDK support retries. If you use the SDK without a To change the default retry strategy for a single API call, simply provide a retryConfig object to the call: ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings - .getAiPreferences({ - retries: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, + const result = await firehydrant.accountSettings.ping({ + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, }, - }); + retryConnectionErrors: false, + }, + }); // Handle the result console.log(result); @@ -1117,9 +1306,9 @@ run(); If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ +const firehydrant = new Firehydrant({ retryConfig: { strategy: "backoff", backoff: { @@ -1130,12 +1319,11 @@ const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ }, retryConnectionErrors: false, }, - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings - .getAiPreferences(); + const result = await firehydrant.accountSettings.ping(); // Handle the result console.log(result); @@ -1149,40 +1337,29 @@ run(); ## Error Handling -Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `getAiPreferences` method may throw the following errors: +Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `createService` method may throw the following errors: -| Error Type | Status Code | Content Type | -| -------------------------- | --------------------------------- | ---------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ----------- | ---------------- | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | If the method throws an error and it is not captured by the known errors, it will default to throwing a `APIError`. ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; -import { - BadRequest, - InternalServerError, - NotFound, - RateLimited, - SDKValidationError, - Timeout, - Unauthorized, -} from "firehydrant-typescript-sdk/models/errors"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +import { Firehydrant } from "firehydrant"; +import { ErrorEntity, SDKValidationError } from "firehydrant/models/errors"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { let result; try { - result = await firehydrantTypescriptSDK.accountSettings.getAiPreferences(); + result = await firehydrant.catalogEntries.createService({ + name: "", + }); // Handle the result console.log(result); @@ -1196,33 +1373,8 @@ async function run() { console.error(err.rawValue); return; } - case (err instanceof BadRequest): { - // Handle err.data$: BadRequestData - console.error(err); - return; - } - case (err instanceof Unauthorized): { - // Handle err.data$: UnauthorizedData - console.error(err); - return; - } - case (err instanceof NotFound): { - // Handle err.data$: NotFoundData - console.error(err); - return; - } - case (err instanceof Timeout): { - // Handle err.data$: TimeoutData - console.error(err); - return; - } - case (err instanceof RateLimited): { - // Handle err.data$: RateLimitedData - console.error(err); - return; - } - case (err instanceof InternalServerError): { - // Handle err.data$: InternalServerErrorData + case (err instanceof ErrorEntity): { + // Handle err.data$: ErrorEntityData console.error(err); return; } @@ -1256,18 +1408,17 @@ In some rare cases, the SDK can fail to get a response from the server or even m ### Override Server URL Per-Client -The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: +The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ +const firehydrant = new Firehydrant({ serverURL: "https://api.firehydrant.io/", - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings - .getAiPreferences(); + const result = await firehydrant.accountSettings.ping(); // Handle the result console.log(result); @@ -1296,8 +1447,8 @@ custom header and a timeout to requests and how to use the `"requestError"` hook to log errors: ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; -import { HTTPClient } from "firehydrant-typescript-sdk/lib/http"; +import { Firehydrant } from "firehydrant"; +import { HTTPClient } from "firehydrant/lib/http"; const httpClient = new HTTPClient({ // fetcher takes a function that has the same signature as native `fetch`. @@ -1323,7 +1474,7 @@ httpClient.addHook("requestError", (error, request) => { console.groupEnd(); }); -const sdk = new FirehydrantTypescriptSDK({ httpClient }); +const sdk = new Firehydrant({ httpClient }); ``` @@ -1338,12 +1489,12 @@ You can pass a logger that matches `console`'s interface as an SDK option. > Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production. ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const sdk = new FirehydrantTypescriptSDK({ debugLogger: console }); +const sdk = new Firehydrant({ debugLogger: console }); ``` -You can also enable a default debug logger by setting an environment variable `FIREHYDRANTTYPESCRIPTSDK_DEBUG` to true. +You can also enable a default debug logger by setting an environment variable `FIREHYDRANT_DEBUG` to true. diff --git a/RELEASES.md b/RELEASES.md index 9f0879fa..02c1d906 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -76,4 +76,14 @@ Based on: ### Generated - [typescript v0.0.11] . ### Releases -- [NPM v0.0.11] https://www.npmjs.com/package/firehydrant-typescript-sdk/v/0.0.11 - . \ No newline at end of file +- [NPM v0.0.11] https://www.npmjs.com/package/firehydrant-typescript-sdk/v/0.0.11 - . + +## 2025-05-12 00:08:01 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.543.4 (2.598.22) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.1.13] . +### Releases +- [NPM v0.1.13] https://www.npmjs.com/package/firehydrant/v/0.1.13 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index bc6b24ba..fa894fa3 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,14 +1,13 @@ ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings - .getAiPreferences(); + const result = await firehydrant.accountSettings.ping(); // Handle the result console.log(result); diff --git a/docs/models/components/actionelement.md b/docs/models/components/actionelement.md new file mode 100644 index 00000000..46cabf20 --- /dev/null +++ b/docs/models/components/actionelement.md @@ -0,0 +1,14 @@ +# ActionElement + +## Example Usage + +```typescript +import { ActionElement } from "firehydrant/models/components"; + +let value: ActionElement = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/actionelements.md b/docs/models/components/actionelements.md deleted file mode 100644 index bc741900..00000000 --- a/docs/models/components/actionelements.md +++ /dev/null @@ -1,14 +0,0 @@ -# ActionElements - -## Example Usage - -```typescript -import { ActionElements } from "firehydrant-typescript-sdk/models/components"; - -let value: ActionElements = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/actorentity.md b/docs/models/components/actorentity.md deleted file mode 100644 index c2376d57..00000000 --- a/docs/models/components/actorentity.md +++ /dev/null @@ -1,18 +0,0 @@ -# ActorEntity - -## Example Usage - -```typescript -import { ActorEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: ActorEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `email` | *string* | :heavy_minus_sign: | N/A | -| `type` | [components.ActorEntityType](../../models/components/actorentitytype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/actorentitytype.md b/docs/models/components/actorentitytype.md deleted file mode 100644 index eb344780..00000000 --- a/docs/models/components/actorentitytype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ActorEntityType - -## Example Usage - -```typescript -import { ActorEntityType } from "firehydrant-typescript-sdk/models/components"; - -let value: ActorEntityType = "signals"; -``` - -## Values - -```typescript -"firehydrant_user" | "firehydrant_bot" | "alertmanager" | "asana" | "aws" | "bugsnag" | "checkly" | "custom_alerts" | "datadog" | "shortcut" | "new_relic" | "nunc" | "github" | "giphy" | "google_meet" | "google_calendar" | "microsoft_teams" | "microsoft_teams_v2" | "webex" | "jira_cloud" | "jira_onprem" | "opsgenie" | "pager_duty" | "honeycomb" | "patchy" | "service_now" | "signals" | "slack" | "statuspage" | "victorops" | "zendesk" | "zoom" | "confluence_cloud" | "google_docs" | "zoom_v2" | "linear" | "cortex" -``` \ No newline at end of file diff --git a/docs/models/components/aientitiesincidentsummaryentity.md b/docs/models/components/aientitiesincidentsummaryentity.md new file mode 100644 index 00000000..dd241827 --- /dev/null +++ b/docs/models/components/aientitiesincidentsummaryentity.md @@ -0,0 +1,22 @@ +# AIEntitiesIncidentSummaryEntity + +AI_Entities_IncidentSummaryEntity model + +## Example Usage + +```typescript +import { AIEntitiesIncidentSummaryEntity } from "firehydrant/models/components"; + +let value: AIEntitiesIncidentSummaryEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `content` | *string* | :heavy_minus_sign: | N/A | +| `sourceHash` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `incidentUpdatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/aientitiespreferencesentity.md b/docs/models/components/aientitiespreferencesentity.md index 550da9ce..d71a7224 100644 --- a/docs/models/components/aientitiespreferencesentity.md +++ b/docs/models/components/aientitiespreferencesentity.md @@ -5,7 +5,7 @@ AI_Entities_PreferencesEntity model ## Example Usage ```typescript -import { AIEntitiesPreferencesEntity } from "firehydrant-typescript-sdk/models/components"; +import { AIEntitiesPreferencesEntity } from "firehydrant/models/components"; let value: AIEntitiesPreferencesEntity = {}; ``` diff --git a/docs/models/components/alertsalertentity.md b/docs/models/components/alertsalertentity.md index 48870e9d..7ede6e85 100644 --- a/docs/models/components/alertsalertentity.md +++ b/docs/models/components/alertsalertentity.md @@ -5,9 +5,27 @@ Alerts_AlertEntity model ## Example Usage ```typescript -import { AlertsAlertEntity } from "firehydrant-typescript-sdk/models/components"; +import { AlertsAlertEntity } from "firehydrant/models/components"; -let value: AlertsAlertEntity = {}; +let value: AlertsAlertEntity = { + signalRule: { + deduplicationExpiry: "PT1H", + }, + parentAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + childAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], +}; ``` ## Fields @@ -26,16 +44,20 @@ let value: AlertsAlertEntity = {}; | `status` | *string* | :heavy_minus_sign: | N/A | | `remoteId` | *string* | :heavy_minus_sign: | N/A | | `remoteUrl` | *string* | :heavy_minus_sign: | N/A | -| `labels` | [components.Labels](../../models/components/labels.md) | :heavy_minus_sign: | Arbitrary key:value pairs of labels. | +| `labels` | [components.AlertsAlertEntityLabels](../../models/components/alertsalertentitylabels.md) | :heavy_minus_sign: | Arbitrary key:value pairs of labels. | | `environments` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | | `services` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | | `tags` | *string*[] | :heavy_minus_sign: | N/A | | `sourceIcon` | *string* | :heavy_minus_sign: | N/A | | `signalId` | *string* | :heavy_minus_sign: | N/A | -| `signalRule` | [components.SignalsAPIRuleEntity](../../models/components/signalsapiruleentity.md) | :heavy_minus_sign: | N/A | +| `signalRule` | [components.NullableSignalsAPIRuleEntity](../../models/components/nullablesignalsapiruleentity.md) | :heavy_minus_sign: | N/A | +| `signalTarget` | [components.NullableSignalsAPITargetEntity](../../models/components/nullablesignalsapitargetentity.md) | :heavy_minus_sign: | N/A | | `teamName` | *string* | :heavy_minus_sign: | N/A | | `teamId` | *string* | :heavy_minus_sign: | N/A | | `position` | *number* | :heavy_minus_sign: | N/A | | `incidents` | [components.PublicApiv1IncidentsSuccinctEntity](../../models/components/publicapiv1incidentssuccinctentity.md)[] | :heavy_minus_sign: | N/A | | `events` | [components.AlertsSirenEventEntity](../../models/components/alertssirenevententity.md)[] | :heavy_minus_sign: | N/A | -| `isExpired` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `isExpired` | *boolean* | :heavy_minus_sign: | N/A | +| `parentAlerts` | [components.AlertsSirenAlertEntity](../../models/components/alertssirenalertentity.md)[] | :heavy_minus_sign: | N/A | +| `childAlerts` | [components.AlertsSirenAlertEntity](../../models/components/alertssirenalertentity.md)[] | :heavy_minus_sign: | N/A | +| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/alertsalertentitylabels.md b/docs/models/components/alertsalertentitylabels.md new file mode 100644 index 00000000..03912a17 --- /dev/null +++ b/docs/models/components/alertsalertentitylabels.md @@ -0,0 +1,16 @@ +# AlertsAlertEntityLabels + +Arbitrary key:value pairs of labels. + +## Example Usage + +```typescript +import { AlertsAlertEntityLabels } from "firehydrant/models/components"; + +let value: AlertsAlertEntityLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/alertsalertentitypaginated.md b/docs/models/components/alertsalertentitypaginated.md index 0d18c71d..0cab242d 100644 --- a/docs/models/components/alertsalertentitypaginated.md +++ b/docs/models/components/alertsalertentitypaginated.md @@ -5,14 +5,36 @@ Alerts_AlertEntityPaginated model ## Example Usage ```typescript -import { AlertsAlertEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { AlertsAlertEntityPaginated } from "firehydrant/models/components"; -let value: AlertsAlertEntityPaginated = {}; +let value: AlertsAlertEntityPaginated = { + data: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + parentAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + childAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + }, + ], +}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `data` | [components.AlertsAlertEntity](../../models/components/alertsalertentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.AlertsAlertEntity](../../models/components/alertsalertentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/alertsprocessinglogentryentity.md b/docs/models/components/alertsprocessinglogentryentity.md index 8fdcaad5..5a4fdcc3 100644 --- a/docs/models/components/alertsprocessinglogentryentity.md +++ b/docs/models/components/alertsprocessinglogentryentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { AlertsProcessingLogEntryEntity } from "firehydrant-typescript-sdk/models/components"; +import { AlertsProcessingLogEntryEntity } from "firehydrant/models/components"; let value: AlertsProcessingLogEntryEntity = {}; ``` diff --git a/docs/models/components/alertsprocessinglogentryentitypaginated.md b/docs/models/components/alertsprocessinglogentryentitypaginated.md index c6ede4be..9feb210a 100644 --- a/docs/models/components/alertsprocessinglogentryentitypaginated.md +++ b/docs/models/components/alertsprocessinglogentryentitypaginated.md @@ -5,7 +5,7 @@ Alerts_ProcessingLogEntryEntityPaginated model ## Example Usage ```typescript -import { AlertsProcessingLogEntryEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { AlertsProcessingLogEntryEntityPaginated } from "firehydrant/models/components"; let value: AlertsProcessingLogEntryEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: AlertsProcessingLogEntryEntityPaginated = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | | `data` | [components.AlertsProcessingLogEntryEntity](../../models/components/alertsprocessinglogentryentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/alertssirenalertentity.md b/docs/models/components/alertssirenalertentity.md new file mode 100644 index 00000000..e22a7d09 --- /dev/null +++ b/docs/models/components/alertssirenalertentity.md @@ -0,0 +1,30 @@ +# AlertsSirenAlertEntity + +## Example Usage + +```typescript +import { AlertsSirenAlertEntity } from "firehydrant/models/components"; + +let value: AlertsSirenAlertEntity = { + signalRule: { + deduplicationExpiry: "PT1H", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `remoteId` | *string* | :heavy_minus_sign: | N/A | +| `remoteUrl` | *string* | :heavy_minus_sign: | N/A | +| `labels` | [components.AlertsSirenAlertEntityLabels](../../models/components/alertssirenalertentitylabels.md) | :heavy_minus_sign: | Arbitrary key:value pairs of labels. | +| `tags` | *string*[] | :heavy_minus_sign: | N/A | +| `signalId` | *string* | :heavy_minus_sign: | N/A | +| `signalRule` | [components.NullableSignalsAPIRuleEntity](../../models/components/nullablesignalsapiruleentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/alertssirenalertentitylabels.md b/docs/models/components/alertssirenalertentitylabels.md new file mode 100644 index 00000000..f1a0f2c1 --- /dev/null +++ b/docs/models/components/alertssirenalertentitylabels.md @@ -0,0 +1,16 @@ +# AlertsSirenAlertEntityLabels + +Arbitrary key:value pairs of labels. + +## Example Usage + +```typescript +import { AlertsSirenAlertEntityLabels } from "firehydrant/models/components"; + +let value: AlertsSirenAlertEntityLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/alertssirenevententity.md b/docs/models/components/alertssirenevententity.md index 236a7c19..c83b4df1 100644 --- a/docs/models/components/alertssirenevententity.md +++ b/docs/models/components/alertssirenevententity.md @@ -3,16 +3,16 @@ ## Example Usage ```typescript -import { AlertsSirenEventEntity } from "firehydrant-typescript-sdk/models/components"; +import { AlertsSirenEventEntity } from "firehydrant/models/components"; let value: AlertsSirenEventEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `data` | [components.Data](../../models/components/data.md) | :heavy_minus_sign: | The event's payload | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `data` | [components.AlertsSirenEventEntityData](../../models/components/alertssirenevententitydata.md) | :heavy_minus_sign: | The event's payload | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/alertssirenevententitydata.md b/docs/models/components/alertssirenevententitydata.md new file mode 100644 index 00000000..e2650d52 --- /dev/null +++ b/docs/models/components/alertssirenevententitydata.md @@ -0,0 +1,16 @@ +# AlertsSirenEventEntityData + +The event's payload + +## Example Usage + +```typescript +import { AlertsSirenEventEntityData } from "firehydrant/models/components"; + +let value: AlertsSirenEventEntityData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/annotations.md b/docs/models/components/annotations.md new file mode 100644 index 00000000..9dc47f54 --- /dev/null +++ b/docs/models/components/annotations.md @@ -0,0 +1,14 @@ +# Annotations + +## Example Usage + +```typescript +import { Annotations } from "firehydrant/models/components"; + +let value: Annotations = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/attachmentrule.md b/docs/models/components/attachmentrule.md deleted file mode 100644 index f6578de4..00000000 --- a/docs/models/components/attachmentrule.md +++ /dev/null @@ -1,18 +0,0 @@ -# AttachmentRule - -## Example Usage - -```typescript -import { AttachmentRule } from "firehydrant-typescript-sdk/models/components"; - -let value: AttachmentRule = { - logic: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `logic` | *string* | :heavy_check_mark: | The JSON logic for the attaching the runbook | -| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/attachments.md b/docs/models/components/attachments.md deleted file mode 100644 index ea1d4fdf..00000000 --- a/docs/models/components/attachments.md +++ /dev/null @@ -1,17 +0,0 @@ -# Attachments - -## Example Usage - -```typescript -import { Attachments } from "firehydrant-typescript-sdk/models/components"; - -let value: Attachments = { - type: "link", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [components.ChangesEventsType](../../models/components/changeseventstype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/attachmentslinkentity.md b/docs/models/components/attachmentslinkentity.md index 49566f24..59f7d73b 100644 --- a/docs/models/components/attachmentslinkentity.md +++ b/docs/models/components/attachmentslinkentity.md @@ -5,7 +5,7 @@ Attachments_LinkEntity model ## Example Usage ```typescript -import { AttachmentsLinkEntity } from "firehydrant-typescript-sdk/models/components"; +import { AttachmentsLinkEntity } from "firehydrant/models/components"; let value: AttachmentsLinkEntity = {}; ``` diff --git a/docs/models/components/attachmentslinkentitypaginated.md b/docs/models/components/attachmentslinkentitypaginated.md index 0d147484..48c0ceaa 100644 --- a/docs/models/components/attachmentslinkentitypaginated.md +++ b/docs/models/components/attachmentslinkentitypaginated.md @@ -5,14 +5,14 @@ Attachments_LinkEntityPaginated model ## Example Usage ```typescript -import { AttachmentsLinkEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { AttachmentsLinkEntityPaginated } from "firehydrant/models/components"; let value: AttachmentsLinkEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `data` | [components.AttachmentsLinkEntity](../../models/components/attachmentslinkentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.AttachmentsLinkEntity](../../models/components/attachmentslinkentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/attachmentstypedattachmententity.md b/docs/models/components/attachmentstypedattachmententity.md new file mode 100644 index 00000000..d3389c8e --- /dev/null +++ b/docs/models/components/attachmentstypedattachmententity.md @@ -0,0 +1,22 @@ +# AttachmentsTypedAttachmentEntity + +## Example Usage + +```typescript +import { AttachmentsTypedAttachmentEntity } from "firehydrant/models/components"; + +let value: AttachmentsTypedAttachmentEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `attachedToId` | *string* | :heavy_minus_sign: | N/A | +| `attachedToType` | *string* | :heavy_minus_sign: | N/A | +| `secondaryAttachedToId` | *string* | :heavy_minus_sign: | N/A | +| `secondaryAttachedToType` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `attributes` | [components.Attributes](../../models/components/attributes.md) | :heavy_minus_sign: | Can be one of: Attachments::LinkEntity, Integrations::CustomerSupportIssueEntity, Attachments::GenericAttachmentEntity | \ No newline at end of file diff --git a/docs/models/components/attachmentstypedattachmententitypaginated.md b/docs/models/components/attachmentstypedattachmententitypaginated.md new file mode 100644 index 00000000..68bc6cc9 --- /dev/null +++ b/docs/models/components/attachmentstypedattachmententitypaginated.md @@ -0,0 +1,18 @@ +# AttachmentsTypedAttachmentEntityPaginated + +Attachments_TypedAttachmentEntityPaginated model + +## Example Usage + +```typescript +import { AttachmentsTypedAttachmentEntityPaginated } from "firehydrant/models/components"; + +let value: AttachmentsTypedAttachmentEntityPaginated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `data` | [components.AttachmentsTypedAttachmentEntity](../../models/components/attachmentstypedattachmententity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/attributes.md b/docs/models/components/attributes.md new file mode 100644 index 00000000..fb0b5f05 --- /dev/null +++ b/docs/models/components/attributes.md @@ -0,0 +1,16 @@ +# Attributes + +Can be one of: Attachments::LinkEntity, Integrations::CustomerSupportIssueEntity, Attachments::GenericAttachmentEntity + +## Example Usage + +```typescript +import { Attributes } from "firehydrant/models/components"; + +let value: Attributes = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/audiencesentitiesaudienceentity.md b/docs/models/components/audiencesentitiesaudienceentity.md new file mode 100644 index 00000000..5c26af54 --- /dev/null +++ b/docs/models/components/audiencesentitiesaudienceentity.md @@ -0,0 +1,25 @@ +# AudiencesEntitiesAudienceEntity + +Audiences_Entities_AudienceEntity model + +## Example Usage + +```typescript +import { AudiencesEntitiesAudienceEntity } from "firehydrant/models/components"; + +let value: AudiencesEntitiesAudienceEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the audience | +| `name` | *string* | :heavy_minus_sign: | Name of the audience (maximum 255 characters) | +| `slug` | *string* | :heavy_minus_sign: | Slug of the audience, unique and autogenerated | +| `description` | *string* | :heavy_minus_sign: | Description of the audience and its purpose (maximum 4000 characters) | +| `default` | *boolean* | :heavy_minus_sign: | Whether this is the organization's default audience | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | When the audience was created | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | When the audience was last updated | +| `discardedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | When the audience was discarded (soft deleted) | +| `details` | [components.AudiencesEntitiesDetailEntity](../../models/components/audiencesentitiesdetailentity.md)[] | :heavy_minus_sign: | List of incident details for this audience | \ No newline at end of file diff --git a/docs/models/components/audiencesentitiesaudiencesummariesentity.md b/docs/models/components/audiencesentitiesaudiencesummariesentity.md new file mode 100644 index 00000000..22e35a69 --- /dev/null +++ b/docs/models/components/audiencesentitiesaudiencesummariesentity.md @@ -0,0 +1,18 @@ +# AudiencesEntitiesAudienceSummariesEntity + +Audiences_Entities_AudienceSummariesEntity model + +## Example Usage + +```typescript +import { AudiencesEntitiesAudienceSummariesEntity } from "firehydrant/models/components"; + +let value: AudiencesEntitiesAudienceSummariesEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `incidentId` | *string* | :heavy_minus_sign: | N/A | +| `audiences` | *string* | :heavy_minus_sign: | JSON-encoded map of audience summaries | \ No newline at end of file diff --git a/docs/models/components/audiencesentitiesdetailentity.md b/docs/models/components/audiencesentitiesdetailentity.md new file mode 100644 index 00000000..9bc83307 --- /dev/null +++ b/docs/models/components/audiencesentitiesdetailentity.md @@ -0,0 +1,19 @@ +# AudiencesEntitiesDetailEntity + +## Example Usage + +```typescript +import { AudiencesEntitiesDetailEntity } from "firehydrant/models/components"; + +let value: AudiencesEntitiesDetailEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the detail item | +| `question` | *string* | :heavy_minus_sign: | The need-to-know question (maximum 255 characters) | +| `prompt` | *string* | :heavy_minus_sign: | AI prompt used to gather this information | +| `position` | *number* | :heavy_minus_sign: | Order position of this item in the list | +| `slug` | *string* | :heavy_minus_sign: | Slug of the detail, unique and autogenerated | \ No newline at end of file diff --git a/docs/models/components/author.md b/docs/models/components/author.md new file mode 100644 index 00000000..ded53824 --- /dev/null +++ b/docs/models/components/author.md @@ -0,0 +1,21 @@ +# Author + +## Example Usage + +```typescript +import { Author } from "firehydrant/models/components"; + +let value: Author = { + source: "", + sourceId: "", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `source` | *string* | :heavy_check_mark: | N/A | +| `sourceId` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/authorentity.md b/docs/models/components/authorentity.md index ad99aaee..605b4aff 100644 --- a/docs/models/components/authorentity.md +++ b/docs/models/components/authorentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { AuthorEntity } from "firehydrant-typescript-sdk/models/components"; +import { AuthorEntity } from "firehydrant/models/components"; let value: AuthorEntity = {}; ``` diff --git a/docs/models/components/authors.md b/docs/models/components/authors.md deleted file mode 100644 index 22b982b5..00000000 --- a/docs/models/components/authors.md +++ /dev/null @@ -1,21 +0,0 @@ -# Authors - -## Example Usage - -```typescript -import { Authors } from "firehydrant-typescript-sdk/models/components"; - -let value: Authors = { - source: "", - sourceId: "", - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `source` | *string* | :heavy_check_mark: | N/A | -| `sourceId` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/body.md b/docs/models/components/body.md index 2f3f787b..6204f80f 100644 --- a/docs/models/components/body.md +++ b/docs/models/components/body.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { Body } from "firehydrant-typescript-sdk/models/components"; +import { Body } from "firehydrant/models/components"; let value: Body = {}; ``` diff --git a/docs/models/components/bucket.md b/docs/models/components/bucket.md new file mode 100644 index 00000000..a46f6dd8 --- /dev/null +++ b/docs/models/components/bucket.md @@ -0,0 +1,14 @@ +# Bucket + +## Example Usage + +```typescript +import { Bucket } from "firehydrant/models/components"; + +let value: Bucket = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/buckets.md b/docs/models/components/buckets.md deleted file mode 100644 index cc1f55dc..00000000 --- a/docs/models/components/buckets.md +++ /dev/null @@ -1,14 +0,0 @@ -# Buckets - -## Example Usage - -```typescript -import { Buckets } from "firehydrant-typescript-sdk/models/components"; - -let value: Buckets = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/bulk.md b/docs/models/components/bulk.md index e6d692fe..99941f8a 100644 --- a/docs/models/components/bulk.md +++ b/docs/models/components/bulk.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { Bulk } from "firehydrant-typescript-sdk/models/components"; +import { Bulk } from "firehydrant/models/components"; let value: Bulk = "true"; ``` diff --git a/docs/models/components/bulkupdateincidentmilestones.md b/docs/models/components/bulkupdateincidentmilestones.md new file mode 100644 index 00000000..1960fb60 --- /dev/null +++ b/docs/models/components/bulkupdateincidentmilestones.md @@ -0,0 +1,31 @@ +# BulkUpdateIncidentMilestones + +Update milestone times in bulk for a given incident. All milestone +times for an incident must occur in chronological order +corresponding to the configured order of milestones. If the result +of this request would cause any milestone(s) to appear out of place, +a 422 response will instead be returned. This includes milestones +not explicitly submitted or updated in this request. + + +## Example Usage + +```typescript +import { BulkUpdateIncidentMilestones } from "firehydrant/models/components"; + +let value: BulkUpdateIncidentMilestones = { + milestones: [ + { + type: "", + occurredAt: new Date("2025-09-01T03:01:19.515Z"), + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `bulk` | [components.Bulk](../../models/components/bulk.md) | :heavy_minus_sign: | N/A | +| `milestones` | [components.BulkUpdateIncidentMilestonesMilestone](../../models/components/bulkupdateincidentmilestonesmilestone.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/bulkupdateincidentmilestonesmilestone.md b/docs/models/components/bulkupdateincidentmilestonesmilestone.md new file mode 100644 index 00000000..4161f3e8 --- /dev/null +++ b/docs/models/components/bulkupdateincidentmilestonesmilestone.md @@ -0,0 +1,20 @@ +# BulkUpdateIncidentMilestonesMilestone + +## Example Usage + +```typescript +import { BulkUpdateIncidentMilestonesMilestone } from "firehydrant/models/components"; + +let value: BulkUpdateIncidentMilestonesMilestone = { + type: "", + occurredAt: new Date("2025-10-08T05:09:58.072Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | The type/slug of the milestone. Must be one of the currently configured milestones for the given incident. | +| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value | +| `remove` | *boolean* | :heavy_minus_sign: | If set to true, the milestone will be removed from the incident | \ No newline at end of file diff --git a/docs/models/components/calendarsevententity.md b/docs/models/components/calendarsevententity.md deleted file mode 100644 index cfbba385..00000000 --- a/docs/models/components/calendarsevententity.md +++ /dev/null @@ -1,23 +0,0 @@ -# CalendarsEventEntity - -## Example Usage - -```typescript -import { CalendarsEventEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: CalendarsEventEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `startsAt` | *string* | :heavy_minus_sign: | N/A | -| `endsAt` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | *string* | :heavy_minus_sign: | N/A | -| `updatedAt` | *string* | :heavy_minus_sign: | N/A | -| `providerUrl` | *string* | :heavy_minus_sign: | N/A | -| `providerIconUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/changeentity.md b/docs/models/components/changeentity.md index 87cacb97..1f212ec3 100644 --- a/docs/models/components/changeentity.md +++ b/docs/models/components/changeentity.md @@ -5,7 +5,7 @@ ChangeEntity model ## Example Usage ```typescript -import { ChangeEntity } from "firehydrant-typescript-sdk/models/components"; +import { ChangeEntity } from "firehydrant/models/components"; let value: ChangeEntity = {}; ``` diff --git a/docs/models/components/changeentitylabels.md b/docs/models/components/changeentitylabels.md index 9674f696..a5d3ed6a 100644 --- a/docs/models/components/changeentitylabels.md +++ b/docs/models/components/changeentitylabels.md @@ -5,7 +5,7 @@ Arbitrary key/value pairs of labels. ## Example Usage ```typescript -import { ChangeEntityLabels } from "firehydrant-typescript-sdk/models/components"; +import { ChangeEntityLabels } from "firehydrant/models/components"; let value: ChangeEntityLabels = {}; ``` diff --git a/docs/models/components/changeevententity.md b/docs/models/components/changeevententity.md index b6e766e6..debc5413 100644 --- a/docs/models/components/changeevententity.md +++ b/docs/models/components/changeevententity.md @@ -5,7 +5,7 @@ ChangeEventEntity model ## Example Usage ```typescript -import { ChangeEventEntity } from "firehydrant-typescript-sdk/models/components"; +import { ChangeEventEntity } from "firehydrant/models/components"; let value: ChangeEventEntity = {}; ``` @@ -28,6 +28,6 @@ let value: ChangeEventEntity = {}; | `relatedChanges` | [components.ChangeEntity](../../models/components/changeentity.md)[] | :heavy_minus_sign: | N/A | | `identities` | [components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)[] | :heavy_minus_sign: | N/A | | `authors` | [components.AuthorEntity](../../models/components/authorentity.md)[] | :heavy_minus_sign: | N/A | -| `attachments` | [components.ChangeEventEntityAttachments](../../models/components/changeevententityattachments.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `attachments` | [components.ChangeEventEntityAttachment](../../models/components/changeevententityattachment.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | | `labels` | [components.ChangeEventEntityLabels](../../models/components/changeevententitylabels.md) | :heavy_minus_sign: | An object of label key and values | | `services` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/changeevententityattachment.md b/docs/models/components/changeevententityattachment.md new file mode 100644 index 00000000..58901fcf --- /dev/null +++ b/docs/models/components/changeevententityattachment.md @@ -0,0 +1,14 @@ +# ChangeEventEntityAttachment + +## Example Usage + +```typescript +import { ChangeEventEntityAttachment } from "firehydrant/models/components"; + +let value: ChangeEventEntityAttachment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/changeevententityattachments.md b/docs/models/components/changeevententityattachments.md deleted file mode 100644 index f38b6b14..00000000 --- a/docs/models/components/changeevententityattachments.md +++ /dev/null @@ -1,14 +0,0 @@ -# ChangeEventEntityAttachments - -## Example Usage - -```typescript -import { ChangeEventEntityAttachments } from "firehydrant-typescript-sdk/models/components"; - -let value: ChangeEventEntityAttachments = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/changeevententitylabels.md b/docs/models/components/changeevententitylabels.md index 8222a53c..02f2e906 100644 --- a/docs/models/components/changeevententitylabels.md +++ b/docs/models/components/changeevententitylabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { ChangeEventEntityLabels } from "firehydrant-typescript-sdk/models/components"; +import { ChangeEventEntityLabels } from "firehydrant/models/components"; let value: ChangeEventEntityLabels = {}; ``` diff --git a/docs/models/components/changeeventslimentity.md b/docs/models/components/changeeventslimentity.md index 74d7b36f..7939d4f3 100644 --- a/docs/models/components/changeeventslimentity.md +++ b/docs/models/components/changeeventslimentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ChangeEventSlimEntity } from "firehydrant-typescript-sdk/models/components"; +import { ChangeEventSlimEntity } from "firehydrant/models/components"; let value: ChangeEventSlimEntity = {}; ``` diff --git a/docs/models/components/changeeventslimentitylabels.md b/docs/models/components/changeeventslimentitylabels.md index d35f27d4..52483b3b 100644 --- a/docs/models/components/changeeventslimentitylabels.md +++ b/docs/models/components/changeeventslimentitylabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { ChangeEventSlimEntityLabels } from "firehydrant-typescript-sdk/models/components"; +import { ChangeEventSlimEntityLabels } from "firehydrant/models/components"; let value: ChangeEventSlimEntityLabels = {}; ``` diff --git a/docs/models/components/changeeventslimentitypaginated.md b/docs/models/components/changeeventslimentitypaginated.md index c9c16e9c..700d0624 100644 --- a/docs/models/components/changeeventslimentitypaginated.md +++ b/docs/models/components/changeeventslimentitypaginated.md @@ -5,14 +5,14 @@ ChangeEventSlimEntityPaginated model ## Example Usage ```typescript -import { ChangeEventSlimEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { ChangeEventSlimEntityPaginated } from "firehydrant/models/components"; let value: ChangeEventSlimEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `data` | [components.ChangeEventSlimEntity](../../models/components/changeeventslimentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.ChangeEventSlimEntity](../../models/components/changeeventslimentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/changeidentities.md b/docs/models/components/changeidentities.md deleted file mode 100644 index f4b253ff..00000000 --- a/docs/models/components/changeidentities.md +++ /dev/null @@ -1,19 +0,0 @@ -# ChangeIdentities - -## Example Usage - -```typescript -import { ChangeIdentities } from "firehydrant-typescript-sdk/models/components"; - -let value: ChangeIdentities = { - type: "", - value: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | -| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/changeidentity.md b/docs/models/components/changeidentity.md new file mode 100644 index 00000000..c6827fae --- /dev/null +++ b/docs/models/components/changeidentity.md @@ -0,0 +1,19 @@ +# ChangeIdentity + +## Example Usage + +```typescript +import { ChangeIdentity } from "firehydrant/models/components"; + +let value: ChangeIdentity = { + type: "", + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *string* | :heavy_check_mark: | N/A | +| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/changeidentityentity.md b/docs/models/components/changeidentityentity.md index 308b7697..5faab712 100644 --- a/docs/models/components/changeidentityentity.md +++ b/docs/models/components/changeidentityentity.md @@ -5,7 +5,7 @@ ChangeIdentityEntity model ## Example Usage ```typescript -import { ChangeIdentityEntity } from "firehydrant-typescript-sdk/models/components"; +import { ChangeIdentityEntity } from "firehydrant/models/components"; let value: ChangeIdentityEntity = {}; ``` diff --git a/docs/models/components/changeidentityentitypaginated.md b/docs/models/components/changeidentityentitypaginated.md index 7ca10370..9d54f68e 100644 --- a/docs/models/components/changeidentityentitypaginated.md +++ b/docs/models/components/changeidentityentitypaginated.md @@ -5,14 +5,14 @@ ChangeIdentityEntityPaginated model ## Example Usage ```typescript -import { ChangeIdentityEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { ChangeIdentityEntityPaginated } from "firehydrant/models/components"; let value: ChangeIdentityEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `data` | [components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/changesevents.md b/docs/models/components/changesevents.md deleted file mode 100644 index 5673cb3b..00000000 --- a/docs/models/components/changesevents.md +++ /dev/null @@ -1,30 +0,0 @@ -# ChangesEvents - -Create a change event - -## Example Usage - -```typescript -import { ChangesEvents } from "firehydrant-typescript-sdk/models/components"; - -let value: ChangesEvents = { - summary: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `summary` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | N/A | -| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `environments` | *string*[] | :heavy_minus_sign: | An array of environment IDs | -| `services` | *string*[] | :heavy_minus_sign: | An array of service IDs | -| `changes` | *string*[] | :heavy_minus_sign: | An array of change IDs | -| `externalId` | *string* | :heavy_minus_sign: | The ID of a change event as assigned by an external provider | -| `changeIdentities` | [components.ChangeIdentities](../../models/components/changeidentities.md)[] | :heavy_minus_sign: | If provided and valid, the event will be linked to all changes that have the same identities. Identity *values* must be unique. | -| `attachments` | [components.Attachments](../../models/components/attachments.md)[] | :heavy_minus_sign: | JSON objects representing attachments, see attachments documentation for the schema | -| `authors` | [components.Authors](../../models/components/authors.md)[] | :heavy_minus_sign: | Array of additional authors to add to the change event, the creating actor will automatically be added as an author | \ No newline at end of file diff --git a/docs/models/components/changeseventstype.md b/docs/models/components/changeseventstype.md deleted file mode 100644 index 7f9a6c6b..00000000 --- a/docs/models/components/changeseventstype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ChangesEventsType - -## Example Usage - -```typescript -import { ChangesEventsType } from "firehydrant-typescript-sdk/models/components"; - -let value: ChangesEventsType = "link"; -``` - -## Values - -```typescript -"link" -``` \ No newline at end of file diff --git a/docs/models/components/changetypeentity.md b/docs/models/components/changetypeentity.md index 00449d6d..86e75471 100644 --- a/docs/models/components/changetypeentity.md +++ b/docs/models/components/changetypeentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ChangeTypeEntity } from "firehydrant-typescript-sdk/models/components"; +import { ChangeTypeEntity } from "firehydrant/models/components"; let value: ChangeTypeEntity = {}; ``` diff --git a/docs/models/components/changetypeentitypaginated.md b/docs/models/components/changetypeentitypaginated.md index 598897a8..51d0f6bc 100644 --- a/docs/models/components/changetypeentitypaginated.md +++ b/docs/models/components/changetypeentitypaginated.md @@ -5,14 +5,14 @@ ChangeTypeEntityPaginated model ## Example Usage ```typescript -import { ChangeTypeEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { ChangeTypeEntityPaginated } from "firehydrant/models/components"; let value: ChangeTypeEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `data` | [components.ChangeTypeEntity](../../models/components/changetypeentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.ChangeTypeEntity](../../models/components/changetypeentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/checklist.md b/docs/models/components/checklist.md new file mode 100644 index 00000000..a3761a28 --- /dev/null +++ b/docs/models/components/checklist.md @@ -0,0 +1,18 @@ +# Checklist + +## Example Usage + +```typescript +import { Checklist } from "firehydrant/models/components"; + +let value: Checklist = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `remove` | *boolean* | :heavy_minus_sign: | Set to `true` to remove checklist from service | \ No newline at end of file diff --git a/docs/models/components/checklistcheckentity.md b/docs/models/components/checklistcheckentity.md index 2758abda..3db9c90b 100644 --- a/docs/models/components/checklistcheckentity.md +++ b/docs/models/components/checklistcheckentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ChecklistCheckEntity } from "firehydrant-typescript-sdk/models/components"; +import { ChecklistCheckEntity } from "firehydrant/models/components"; let value: ChecklistCheckEntity = {}; ``` diff --git a/docs/models/components/checklists.md b/docs/models/components/checklists.md deleted file mode 100644 index 4f7cb37a..00000000 --- a/docs/models/components/checklists.md +++ /dev/null @@ -1,18 +0,0 @@ -# Checklists - -## Example Usage - -```typescript -import { Checklists } from "firehydrant-typescript-sdk/models/components"; - -let value: Checklists = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `remove` | *boolean* | :heavy_minus_sign: | Set to `true` to remove checklist from service | \ No newline at end of file diff --git a/docs/models/components/checklisttemplateentity.md b/docs/models/components/checklisttemplateentity.md index f56e2f1c..4b2081d5 100644 --- a/docs/models/components/checklisttemplateentity.md +++ b/docs/models/components/checklisttemplateentity.md @@ -5,7 +5,7 @@ ChecklistTemplateEntity model ## Example Usage ```typescript -import { ChecklistTemplateEntity } from "firehydrant-typescript-sdk/models/components"; +import { ChecklistTemplateEntity } from "firehydrant/models/components"; let value: ChecklistTemplateEntity = {}; ``` @@ -20,5 +20,5 @@ let value: ChecklistTemplateEntity = {}; | `createdAt` | *string* | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `checks` | [components.ChecklistCheckEntity](../../models/components/checklistcheckentity.md)[] | :heavy_minus_sign: | N/A | -| `owner` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | | `connectedServices` | [components.ServiceEntityChecklist](../../models/components/serviceentitychecklist.md)[] | :heavy_minus_sign: | List of services that use this checklist | \ No newline at end of file diff --git a/docs/models/components/checklisttemplateentitypaginated.md b/docs/models/components/checklisttemplateentitypaginated.md index 5a70fed7..1af4f36d 100644 --- a/docs/models/components/checklisttemplateentitypaginated.md +++ b/docs/models/components/checklisttemplateentitypaginated.md @@ -5,7 +5,7 @@ ChecklistTemplateEntityPaginated model ## Example Usage ```typescript -import { ChecklistTemplateEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { ChecklistTemplateEntityPaginated } from "firehydrant/models/components"; let value: ChecklistTemplateEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: ChecklistTemplateEntityPaginated = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `data` | [components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/checks.md b/docs/models/components/checks.md deleted file mode 100644 index 3a5c8185..00000000 --- a/docs/models/components/checks.md +++ /dev/null @@ -1,18 +0,0 @@ -# Checks - -## Example Usage - -```typescript -import { Checks } from "firehydrant-typescript-sdk/models/components"; - -let value: Checks = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `name` | *string* | :heavy_check_mark: | The name of the check | -| `description` | *string* | :heavy_minus_sign: | The description of the check | \ No newline at end of file diff --git a/docs/models/components/color.md b/docs/models/components/color.md deleted file mode 100644 index 6e8eebee..00000000 --- a/docs/models/components/color.md +++ /dev/null @@ -1,15 +0,0 @@ -# Color - -## Example Usage - -```typescript -import { Color } from "firehydrant-typescript-sdk/models/components"; - -let value: Color = "teal"; -``` - -## Values - -```typescript -"red" | "orange" | "yellow" | "blue" | "teal" | "grey" -``` \ No newline at end of file diff --git a/docs/models/components/condition.md b/docs/models/components/condition.md new file mode 100644 index 00000000..4d57b25c --- /dev/null +++ b/docs/models/components/condition.md @@ -0,0 +1,19 @@ +# Condition + +## Example Usage + +```typescript +import { Condition } from "firehydrant/models/components"; + +let value: Condition = { + conditionId: "", + statuspageioCondition: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `conditionId` | *string* | :heavy_check_mark: | FireHydrant condition id | +| `statuspageioCondition` | *string* | :heavy_check_mark: | Statuspage.io condition name | \ No newline at end of file diff --git a/docs/models/components/conditions.md b/docs/models/components/conditions.md deleted file mode 100644 index 669a8dc7..00000000 --- a/docs/models/components/conditions.md +++ /dev/null @@ -1,19 +0,0 @@ -# Conditions - -## Example Usage - -```typescript -import { Conditions } from "firehydrant-typescript-sdk/models/components"; - -let value: Conditions = { - conditionId: "", - statuspageioCondition: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `conditionId` | *string* | :heavy_check_mark: | FireHydrant condition id | -| `statuspageioCondition` | *string* | :heavy_check_mark: | Statuspage.io condition name | \ No newline at end of file diff --git a/docs/models/components/config.md b/docs/models/components/config.md deleted file mode 100644 index 546620a1..00000000 --- a/docs/models/components/config.md +++ /dev/null @@ -1,16 +0,0 @@ -# Config - -An unstructured object of key/value pairs describing the config settings for the step. - -## Example Usage - -```typescript -import { Config } from "firehydrant-typescript-sdk/models/components"; - -let value: Config = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/connectedservices.md b/docs/models/components/connectedservices.md deleted file mode 100644 index 66a2045f..00000000 --- a/docs/models/components/connectedservices.md +++ /dev/null @@ -1,17 +0,0 @@ -# ConnectedServices - -## Example Usage - -```typescript -import { ConnectedServices } from "firehydrant-typescript-sdk/models/components"; - -let value: ConnectedServices = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/connectionstatus.md b/docs/models/components/connectionstatus.md deleted file mode 100644 index f0d399c3..00000000 --- a/docs/models/components/connectionstatus.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConnectionStatus - -## Example Usage - -```typescript -import { ConnectionStatus } from "firehydrant-typescript-sdk/models/components"; - -let value: ConnectionStatus = "pending_setup"; -``` - -## Values - -```typescript -"pending_setup" | "role_assumed" | "cant_assume_role" | "invalid_permissions" | "validated" -``` \ No newline at end of file diff --git a/docs/models/components/context.md b/docs/models/components/context.md index bd52ae29..e27950af 100644 --- a/docs/models/components/context.md +++ b/docs/models/components/context.md @@ -5,7 +5,7 @@ An unstructured representation of this log entry's context. ## Example Usage ```typescript -import { Context } from "firehydrant-typescript-sdk/models/components"; +import { Context } from "firehydrant/models/components"; let value: Context = {}; ``` diff --git a/docs/models/components/conversationsapientitieschannel.md b/docs/models/components/conversationsapientitieschannel.md deleted file mode 100644 index 18a48eb5..00000000 --- a/docs/models/components/conversationsapientitieschannel.md +++ /dev/null @@ -1,15 +0,0 @@ -# ConversationsAPIEntitiesChannel - -## Example Usage - -```typescript -import { ConversationsAPIEntitiesChannel } from "firehydrant-typescript-sdk/models/components"; - -let value: ConversationsAPIEntitiesChannel = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/conversationsapientitiesreference.md b/docs/models/components/conversationsapientitiesreference.md index b59f3fef..d5ad9efd 100644 --- a/docs/models/components/conversationsapientitiesreference.md +++ b/docs/models/components/conversationsapientitiesreference.md @@ -3,18 +3,18 @@ ## Example Usage ```typescript -import { ConversationsAPIEntitiesReference } from "firehydrant-typescript-sdk/models/components"; +import { ConversationsAPIEntitiesReference } from "firehydrant/models/components"; let value: ConversationsAPIEntitiesReference = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `resourceClass` | *string* | :heavy_minus_sign: | N/A | -| `resourceId` | *string* | :heavy_minus_sign: | N/A | -| `field` | *string* | :heavy_minus_sign: | N/A | -| `commentsUrl` | *string* | :heavy_minus_sign: | N/A | -| `channel` | [components.ConversationsAPIEntitiesChannel](../../models/components/conversationsapientitieschannel.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `resourceClass` | *string* | :heavy_minus_sign: | N/A | +| `resourceId` | *string* | :heavy_minus_sign: | N/A | +| `field` | *string* | :heavy_minus_sign: | N/A | +| `commentsUrl` | *string* | :heavy_minus_sign: | N/A | +| `channel` | [components.NullableConversationsAPIEntitiesChannel](../../models/components/nullableconversationsapientitieschannel.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/convertincidenttask.md b/docs/models/components/convertincidenttask.md new file mode 100644 index 00000000..c537c2c2 --- /dev/null +++ b/docs/models/components/convertincidenttask.md @@ -0,0 +1,21 @@ +# ConvertIncidentTask + +Convert a task to a follow-up + +## Example Usage + +```typescript +import { ConvertIncidentTask } from "firehydrant/models/components"; + +let value: ConvertIncidentTask = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `projectId` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `state` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the ticket | \ No newline at end of file diff --git a/docs/models/components/createchange.md b/docs/models/components/createchange.md new file mode 100644 index 00000000..6dca5968 --- /dev/null +++ b/docs/models/components/createchange.md @@ -0,0 +1,19 @@ +# CreateChange + +Create a new change entry + +## Example Usage + +```typescript +import { CreateChange } from "firehydrant/models/components"; + +let value: CreateChange = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | A labels hash of keys and values | \ No newline at end of file diff --git a/docs/models/components/createchangeevent.md b/docs/models/components/createchangeevent.md new file mode 100644 index 00000000..078e298c --- /dev/null +++ b/docs/models/components/createchangeevent.md @@ -0,0 +1,30 @@ +# CreateChangeEvent + +Create a change event + +## Example Usage + +```typescript +import { CreateChangeEvent } from "firehydrant/models/components"; + +let value: CreateChangeEvent = { + summary: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `summary` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | N/A | +| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `environments` | *string*[] | :heavy_minus_sign: | An array of environment IDs | +| `services` | *string*[] | :heavy_minus_sign: | An array of service IDs | +| `changes` | *string*[] | :heavy_minus_sign: | An array of change IDs | +| `externalId` | *string* | :heavy_minus_sign: | The ID of a change event as assigned by an external provider | +| `changeIdentities` | [components.ChangeIdentity](../../models/components/changeidentity.md)[] | :heavy_minus_sign: | If provided and valid, the event will be linked to all changes that have the same identities. Identity *values* must be unique. | +| `attachments` | [components.CreateChangeEventAttachment](../../models/components/createchangeeventattachment.md)[] | :heavy_minus_sign: | JSON objects representing attachments, see attachments documentation for the schema | +| `authors` | [components.Author](../../models/components/author.md)[] | :heavy_minus_sign: | Array of additional authors to add to the change event, the creating actor will automatically be added as an author | \ No newline at end of file diff --git a/docs/models/components/createchangeeventattachment.md b/docs/models/components/createchangeeventattachment.md new file mode 100644 index 00000000..bde5b3af --- /dev/null +++ b/docs/models/components/createchangeeventattachment.md @@ -0,0 +1,17 @@ +# CreateChangeEventAttachment + +## Example Usage + +```typescript +import { CreateChangeEventAttachment } from "firehydrant/models/components"; + +let value: CreateChangeEventAttachment = { + type: "link", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `type` | [components.CreateChangeEventType](../../models/components/createchangeeventtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createchangeeventtype.md b/docs/models/components/createchangeeventtype.md new file mode 100644 index 00000000..41f4191d --- /dev/null +++ b/docs/models/components/createchangeeventtype.md @@ -0,0 +1,15 @@ +# CreateChangeEventType + +## Example Usage + +```typescript +import { CreateChangeEventType } from "firehydrant/models/components"; + +let value: CreateChangeEventType = "link"; +``` + +## Values + +```typescript +"link" +``` \ No newline at end of file diff --git a/docs/models/components/createchangeidentity.md b/docs/models/components/createchangeidentity.md new file mode 100644 index 00000000..840b1d17 --- /dev/null +++ b/docs/models/components/createchangeidentity.md @@ -0,0 +1,21 @@ +# CreateChangeIdentity + +Create an identity for the change entry + +## Example Usage + +```typescript +import { CreateChangeIdentity } from "firehydrant/models/components"; + +let value: CreateChangeIdentity = { + type: "", + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *string* | :heavy_check_mark: | N/A | +| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createchecklisttemplate.md b/docs/models/components/createchecklisttemplate.md new file mode 100644 index 00000000..0155e3cc --- /dev/null +++ b/docs/models/components/createchecklisttemplate.md @@ -0,0 +1,28 @@ +# CreateChecklistTemplate + +Creates a checklist template for the organization + +## Example Usage + +```typescript +import { CreateChecklistTemplate } from "firehydrant/models/components"; + +let value: CreateChecklistTemplate = { + name: "", + checks: [ + { + name: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `checks` | [components.CreateChecklistTemplateCheck](../../models/components/createchecklisttemplatecheck.md)[] | :heavy_check_mark: | An array of checks for the checklist template | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `teamId` | *string* | :heavy_minus_sign: | The ID of the Team that owns the checklist template | +| `connectedServices` | [components.CreateChecklistTemplateConnectedService](../../models/components/createchecklisttemplateconnectedservice.md)[] | :heavy_minus_sign: | Array of service IDs to attach checklist template to | \ No newline at end of file diff --git a/docs/models/components/createchecklisttemplatecheck.md b/docs/models/components/createchecklisttemplatecheck.md new file mode 100644 index 00000000..cfaf18e7 --- /dev/null +++ b/docs/models/components/createchecklisttemplatecheck.md @@ -0,0 +1,18 @@ +# CreateChecklistTemplateCheck + +## Example Usage + +```typescript +import { CreateChecklistTemplateCheck } from "firehydrant/models/components"; + +let value: CreateChecklistTemplateCheck = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `name` | *string* | :heavy_check_mark: | The name of the check | +| `description` | *string* | :heavy_minus_sign: | The description of the check | \ No newline at end of file diff --git a/docs/models/components/createchecklisttemplateconnectedservice.md b/docs/models/components/createchecklisttemplateconnectedservice.md new file mode 100644 index 00000000..7efc9b46 --- /dev/null +++ b/docs/models/components/createchecklisttemplateconnectedservice.md @@ -0,0 +1,17 @@ +# CreateChecklistTemplateConnectedService + +## Example Usage + +```typescript +import { CreateChecklistTemplateConnectedService } from "firehydrant/models/components"; + +let value: CreateChecklistTemplateConnectedService = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createcomment.md b/docs/models/components/createcomment.md new file mode 100644 index 00000000..7fec57d0 --- /dev/null +++ b/docs/models/components/createcomment.md @@ -0,0 +1,19 @@ +# CreateComment + +ALPHA - Creates a comment for a project + +## Example Usage + +```typescript +import { CreateComment } from "firehydrant/models/components"; + +let value: CreateComment = { + body: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `body` | *string* | :heavy_check_mark: | Text body of comment | \ No newline at end of file diff --git a/docs/models/components/createcommentreaction.md b/docs/models/components/createcommentreaction.md new file mode 100644 index 00000000..d21fb52c --- /dev/null +++ b/docs/models/components/createcommentreaction.md @@ -0,0 +1,19 @@ +# CreateCommentReaction + +ALPHA - Create a reaction on a comment + +## Example Usage + +```typescript +import { CreateCommentReaction } from "firehydrant/models/components"; + +let value: CreateCommentReaction = { + reaction: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `reaction` | *string* | :heavy_check_mark: | CLDR short name of Unicode emojis | \ No newline at end of file diff --git a/docs/models/components/createcustomfielddefinition.md b/docs/models/components/createcustomfielddefinition.md new file mode 100644 index 00000000..955c6325 --- /dev/null +++ b/docs/models/components/createcustomfielddefinition.md @@ -0,0 +1,26 @@ +# CreateCustomFieldDefinition + +Create a new custom field definition + +## Example Usage + +```typescript +import { CreateCustomFieldDefinition } from "firehydrant/models/components"; + +let value: CreateCustomFieldDefinition = { + displayName: "Chelsey_Batz", + fieldType: "", + required: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `fieldType` | *string* | :heavy_check_mark: | N/A | +| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | +| `required` | *boolean* | :heavy_check_mark: | N/A | +| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. | \ No newline at end of file diff --git a/docs/models/components/createenvironment.md b/docs/models/components/createenvironment.md new file mode 100644 index 00000000..073a3516 --- /dev/null +++ b/docs/models/components/createenvironment.md @@ -0,0 +1,20 @@ +# CreateEnvironment + +Creates an environment for the organization + +## Example Usage + +```typescript +import { CreateEnvironment } from "firehydrant/models/components"; + +let value: CreateEnvironment = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createfunctionality.md b/docs/models/components/createfunctionality.md new file mode 100644 index 00000000..daafd903 --- /dev/null +++ b/docs/models/components/createfunctionality.md @@ -0,0 +1,28 @@ +# CreateFunctionality + +Creates a functionality for the organization + +## Example Usage + +```typescript +import { CreateFunctionality } from "firehydrant/models/components"; + +let value: CreateFunctionality = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `services` | [components.CreateFunctionalityService](../../models/components/createfunctionalityservice.md)[] | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | +| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | +| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | +| `externalResources` | [components.CreateFunctionalityExternalResource](../../models/components/createfunctionalityexternalresource.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | +| `links` | [components.CreateFunctionalityLink](../../models/components/createfunctionalitylink.md)[] | :heavy_minus_sign: | An array of links to associate with this service | +| `owner` | [components.CreateFunctionalityOwner](../../models/components/createfunctionalityowner.md) | :heavy_minus_sign: | An object representing a Team that owns the service | +| `teams` | [components.CreateFunctionalityTeam](../../models/components/createfunctionalityteam.md)[] | :heavy_minus_sign: | An array of teams to attach to this service. | \ No newline at end of file diff --git a/docs/models/components/createfunctionalityexternalresource.md b/docs/models/components/createfunctionalityexternalresource.md new file mode 100644 index 00000000..97a207fe --- /dev/null +++ b/docs/models/components/createfunctionalityexternalresource.md @@ -0,0 +1,18 @@ +# CreateFunctionalityExternalResource + +## Example Usage + +```typescript +import { CreateFunctionalityExternalResource } from "firehydrant/models/components"; + +let value: CreateFunctionalityExternalResource = { + remoteId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `remoteId` | *string* | :heavy_check_mark: | N/A | +| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. | \ No newline at end of file diff --git a/docs/models/components/createfunctionalitylink.md b/docs/models/components/createfunctionalitylink.md new file mode 100644 index 00000000..f79d2327 --- /dev/null +++ b/docs/models/components/createfunctionalitylink.md @@ -0,0 +1,20 @@ +# CreateFunctionalityLink + +## Example Usage + +```typescript +import { CreateFunctionalityLink } from "firehydrant/models/components"; + +let value: CreateFunctionalityLink = { + name: "", + hrefUrl: "https://primary-characterization.biz/", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | +| `hrefUrl` | *string* | :heavy_check_mark: | URL | +| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | \ No newline at end of file diff --git a/docs/models/components/createfunctionalityowner.md b/docs/models/components/createfunctionalityowner.md new file mode 100644 index 00000000..e42bd207 --- /dev/null +++ b/docs/models/components/createfunctionalityowner.md @@ -0,0 +1,19 @@ +# CreateFunctionalityOwner + +An object representing a Team that owns the service + +## Example Usage + +```typescript +import { CreateFunctionalityOwner } from "firehydrant/models/components"; + +let value: CreateFunctionalityOwner = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createfunctionalityservice.md b/docs/models/components/createfunctionalityservice.md new file mode 100644 index 00000000..72a5f847 --- /dev/null +++ b/docs/models/components/createfunctionalityservice.md @@ -0,0 +1,17 @@ +# CreateFunctionalityService + +## Example Usage + +```typescript +import { CreateFunctionalityService } from "firehydrant/models/components"; + +let value: CreateFunctionalityService = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | ID of a service | \ No newline at end of file diff --git a/docs/models/components/createfunctionalityteam.md b/docs/models/components/createfunctionalityteam.md new file mode 100644 index 00000000..750355bc --- /dev/null +++ b/docs/models/components/createfunctionalityteam.md @@ -0,0 +1,17 @@ +# CreateFunctionalityTeam + +## Example Usage + +```typescript +import { CreateFunctionalityTeam } from "firehydrant/models/components"; + +let value: CreateFunctionalityTeam = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincident.md b/docs/models/components/createincident.md new file mode 100644 index 00000000..2756f66b --- /dev/null +++ b/docs/models/components/createincident.md @@ -0,0 +1,37 @@ +# CreateIncident + +Create a new incident + +## Example Usage + +```typescript +import { CreateIncident } from "firehydrant/models/components"; + +let value: CreateIncident = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `severity` | *string* | :heavy_minus_sign: | N/A | +| `severityConditionId` | *string* | :heavy_minus_sign: | N/A | +| `severityImpactId` | *string* | :heavy_minus_sign: | N/A | +| `alertIds` | *string*[] | :heavy_minus_sign: | List of alert IDs that this incident should be associated to | +| `labels` | [components.CreateIncidentLabels](../../models/components/createincidentlabels.md) | :heavy_minus_sign: | Key:value pairs to track custom data for the incident | +| `runbookIds` | *string*[] | :heavy_minus_sign: | List of ids of Runbooks to attach to this incident. Foregoes any conditions these Runbooks may have guarding automatic attachment. | +| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | +| `impacts` | [components.CreateIncidentImpact1](../../models/components/createincidentimpact1.md)[] | :heavy_minus_sign: | An array of impacted infrastructure | +| `milestones` | [components.CreateIncidentMilestone](../../models/components/createincidentmilestone.md)[] | :heavy_minus_sign: | An array of milestones to set on an incident. This can be used to create an already-resolved incident. | +| `restricted` | *boolean* | :heavy_minus_sign: | N/A | +| `teamIds` | *string*[] | :heavy_minus_sign: | IDs of teams you wish to assign to this incident. | +| `customFields` | [components.CustomField](../../models/components/customfield.md)[] | :heavy_minus_sign: | An array of custom fields to set on the incident. | +| `externalLinks` | *string* | :heavy_minus_sign: | N/A | +| `incidentTypeId` | *string* | :heavy_minus_sign: | The ID of the incident type to use as a template when creating the incident. This will copy values from the incident type unless they are being overridden via parameters in this request. | \ No newline at end of file diff --git a/docs/models/components/createincidentchangeevent.md b/docs/models/components/createincidentchangeevent.md new file mode 100644 index 00000000..f4a4a45c --- /dev/null +++ b/docs/models/components/createincidentchangeevent.md @@ -0,0 +1,22 @@ +# CreateIncidentChangeEvent + +Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. + +## Example Usage + +```typescript +import { CreateIncidentChangeEvent } from "firehydrant/models/components"; + +let value: CreateIncidentChangeEvent = { + changeEventId: "", + type: "suspect", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `changeEventId` | *string* | :heavy_check_mark: | The ID of the change event to associate | +| `type` | [components.CreateIncidentChangeEventType](../../models/components/createincidentchangeeventtype.md) | :heavy_check_mark: | N/A | +| `why` | *string* | :heavy_minus_sign: | A short description about why this change event is related | \ No newline at end of file diff --git a/docs/models/components/createincidentchangeeventtype.md b/docs/models/components/createincidentchangeeventtype.md new file mode 100644 index 00000000..38e45f1f --- /dev/null +++ b/docs/models/components/createincidentchangeeventtype.md @@ -0,0 +1,15 @@ +# CreateIncidentChangeEventType + +## Example Usage + +```typescript +import { CreateIncidentChangeEventType } from "firehydrant/models/components"; + +let value: CreateIncidentChangeEventType = "fixed"; +``` + +## Values + +```typescript +"caused" | "fixed" | "suspect" | "dismissed" +``` \ No newline at end of file diff --git a/docs/models/components/createincidentchatmessage.md b/docs/models/components/createincidentchatmessage.md new file mode 100644 index 00000000..44729b2f --- /dev/null +++ b/docs/models/components/createincidentchatmessage.md @@ -0,0 +1,21 @@ +# CreateIncidentChatMessage + +Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. + +## Example Usage + +```typescript +import { CreateIncidentChatMessage } from "firehydrant/models/components"; + +let value: CreateIncidentChatMessage = { + body: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `body` | *string* | :heavy_check_mark: | N/A | +| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for when the chat message occurred | +| `voteDirection` | [components.VoteDirection](../../models/components/votedirection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidentimpact.md b/docs/models/components/createincidentimpact.md new file mode 100644 index 00000000..206ded1a --- /dev/null +++ b/docs/models/components/createincidentimpact.md @@ -0,0 +1,20 @@ +# CreateIncidentImpact + +Add impacted infrastructure to an incident + +## Example Usage + +```typescript +import { CreateIncidentImpact } from "firehydrant/models/components"; + +let value: CreateIncidentImpact = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `conditionId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidentimpact1.md b/docs/models/components/createincidentimpact1.md new file mode 100644 index 00000000..8b9b1047 --- /dev/null +++ b/docs/models/components/createincidentimpact1.md @@ -0,0 +1,21 @@ +# CreateIncidentImpact1 + +## Example Usage + +```typescript +import { CreateIncidentImpact1 } from "firehydrant/models/components"; + +let value: CreateIncidentImpact1 = { + type: "", + id: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | The type of impacted infrastructure. One of: environment, functionality, or service | +| `id` | *string* | :heavy_check_mark: | The ID of the impacted infrastructure | +| `conditionId` | *string* | :heavy_check_mark: | The ID of the impact condition. Find these at /v1/severity_matrix/conditions | \ No newline at end of file diff --git a/docs/models/components/createincidentlabels.md b/docs/models/components/createincidentlabels.md new file mode 100644 index 00000000..6e82e843 --- /dev/null +++ b/docs/models/components/createincidentlabels.md @@ -0,0 +1,16 @@ +# CreateIncidentLabels + +Key:value pairs to track custom data for the incident + +## Example Usage + +```typescript +import { CreateIncidentLabels } from "firehydrant/models/components"; + +let value: CreateIncidentLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/createincidentlink.md b/docs/models/components/createincidentlink.md new file mode 100644 index 00000000..9593fb9c --- /dev/null +++ b/docs/models/components/createincidentlink.md @@ -0,0 +1,21 @@ +# CreateIncidentLink + +Allows adding adhoc links to an incident as an attachment + +## Example Usage + +```typescript +import { CreateIncidentLink } from "firehydrant/models/components"; + +let value: CreateIncidentLink = { + href: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `displayText` | *string* | :heavy_minus_sign: | N/A | +| `iconUrl` | *string* | :heavy_minus_sign: | N/A | +| `href` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidentmilestone.md b/docs/models/components/createincidentmilestone.md new file mode 100644 index 00000000..4c535837 --- /dev/null +++ b/docs/models/components/createincidentmilestone.md @@ -0,0 +1,19 @@ +# CreateIncidentMilestone + +## Example Usage + +```typescript +import { CreateIncidentMilestone } from "firehydrant/models/components"; + +let value: CreateIncidentMilestone = { + type: "", + occurredAt: new Date("2024-04-24T13:05:36.106Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | The type/slug of the milestone. Must be one of the currently configured milestones. | +| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value | \ No newline at end of file diff --git a/docs/models/components/createincidentnote.md b/docs/models/components/createincidentnote.md new file mode 100644 index 00000000..e0402b4e --- /dev/null +++ b/docs/models/components/createincidentnote.md @@ -0,0 +1,22 @@ +# CreateIncidentNote + +Create a new note on for an incident. The visibility field on a note determines where it gets posted. + +## Example Usage + +```typescript +import { CreateIncidentNote } from "firehydrant/models/components"; + +let value: CreateIncidentNote = { + body: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `body` | *string* | :heavy_check_mark: | N/A | +| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for when the note occurred | +| `visibility` | [components.CreateIncidentNoteVisibility](../../models/components/createincidentnotevisibility.md) | :heavy_minus_sign: | N/A | +| `statusPages` | [components.CreateIncidentNoteStatusPage](../../models/components/createincidentnotestatuspage.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidentnotestatuspage.md b/docs/models/components/createincidentnotestatuspage.md new file mode 100644 index 00000000..c53795de --- /dev/null +++ b/docs/models/components/createincidentnotestatuspage.md @@ -0,0 +1,19 @@ +# CreateIncidentNoteStatusPage + +## Example Usage + +```typescript +import { CreateIncidentNoteStatusPage } from "firehydrant/models/components"; + +let value: CreateIncidentNoteStatusPage = { + id: "", + integrationSlug: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `integrationSlug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidentnotevisibility.md b/docs/models/components/createincidentnotevisibility.md new file mode 100644 index 00000000..132b4526 --- /dev/null +++ b/docs/models/components/createincidentnotevisibility.md @@ -0,0 +1,15 @@ +# CreateIncidentNoteVisibility + +## Example Usage + +```typescript +import { CreateIncidentNoteVisibility } from "firehydrant/models/components"; + +let value: CreateIncidentNoteVisibility = "private_to_org"; +``` + +## Values + +```typescript +"private_to_org" | "open_to_public" | "internal_status_page" +``` \ No newline at end of file diff --git a/docs/models/components/createincidentrole.md b/docs/models/components/createincidentrole.md new file mode 100644 index 00000000..4d2512ea --- /dev/null +++ b/docs/models/components/createincidentrole.md @@ -0,0 +1,22 @@ +# CreateIncidentRole + +Create a new incident role + +## Example Usage + +```typescript +import { CreateIncidentRole } from "firehydrant/models/components"; + +let value: CreateIncidentRole = { + name: "", + summary: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `summary` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidentroleassignment.md b/docs/models/components/createincidentroleassignment.md new file mode 100644 index 00000000..28dacfcb --- /dev/null +++ b/docs/models/components/createincidentroleassignment.md @@ -0,0 +1,21 @@ +# CreateIncidentRoleAssignment + +Assign a role to a user for this incident + +## Example Usage + +```typescript +import { CreateIncidentRoleAssignment } from "firehydrant/models/components"; + +let value: CreateIncidentRoleAssignment = { + userId: "", + incidentRoleId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `userId` | *string* | :heavy_check_mark: | The user ID to assign the role to | +| `incidentRoleId` | *string* | :heavy_check_mark: | The Incident Role ID to assign the role to | \ No newline at end of file diff --git a/docs/models/components/createincidentstatuspage.md b/docs/models/components/createincidentstatuspage.md new file mode 100644 index 00000000..7360bcac --- /dev/null +++ b/docs/models/components/createincidentstatuspage.md @@ -0,0 +1,22 @@ +# CreateIncidentStatusPage + +Add a status page to an incident. + +## Example Usage + +```typescript +import { CreateIncidentStatusPage } from "firehydrant/models/components"; + +let value: CreateIncidentStatusPage = { + integrationSlug: "", + integrationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `integrationSlug` | *string* | :heavy_check_mark: | N/A | +| `integrationId` | *string* | :heavy_check_mark: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidenttask.md b/docs/models/components/createincidenttask.md new file mode 100644 index 00000000..0999b265 --- /dev/null +++ b/docs/models/components/createincidenttask.md @@ -0,0 +1,23 @@ +# CreateIncidentTask + +Create a task + +## Example Usage + +```typescript +import { CreateIncidentTask } from "firehydrant/models/components"; + +let value: CreateIncidentTask = { + title: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `title` | *string* | :heavy_check_mark: | The title of the task. | +| `state` | *string* | :heavy_minus_sign: | The state of the task. One of: open, in_progress, cancelled, done | +| `description` | *string* | :heavy_minus_sign: | A description of what the task is for. | +| `assigneeId` | *string* | :heavy_minus_sign: | The ID of the user assigned to the task. | +| `dueAt` | *string* | :heavy_minus_sign: | The due date of the task. Relative values are supported such as '5m' | \ No newline at end of file diff --git a/docs/models/components/createincidenttasklist.md b/docs/models/components/createincidenttasklist.md new file mode 100644 index 00000000..56b96b78 --- /dev/null +++ b/docs/models/components/createincidenttasklist.md @@ -0,0 +1,20 @@ +# CreateIncidentTaskList + +Add all tasks from list to incident + +## Example Usage + +```typescript +import { CreateIncidentTaskList } from "firehydrant/models/components"; + +let value: CreateIncidentTaskList = { + taskListId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `taskListId` | *string* | :heavy_check_mark: | The id of the task list. | +| `assigneeId` | *string* | :heavy_minus_sign: | The ID of the user assigned to the tasks in this list. | \ No newline at end of file diff --git a/docs/models/components/createincidentteamassignment.md b/docs/models/components/createincidentteamassignment.md new file mode 100644 index 00000000..fe7009fa --- /dev/null +++ b/docs/models/components/createincidentteamassignment.md @@ -0,0 +1,19 @@ +# CreateIncidentTeamAssignment + +Assign a team for this incident + +## Example Usage + +```typescript +import { CreateIncidentTeamAssignment } from "firehydrant/models/components"; + +let value: CreateIncidentTeamAssignment = { + teamId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `teamId` | *string* | :heavy_check_mark: | The team ID to associate to the incident | \ No newline at end of file diff --git a/docs/models/components/createincidenttype.md b/docs/models/components/createincidenttype.md new file mode 100644 index 00000000..297797bc --- /dev/null +++ b/docs/models/components/createincidenttype.md @@ -0,0 +1,21 @@ +# CreateIncidentType + +Create a new incident type + +## Example Usage + +```typescript +import { CreateIncidentType } from "firehydrant/models/components"; + +let value: CreateIncidentType = { + name: "", + template: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `template` | [components.CreateIncidentTypeTemplate](../../models/components/createincidenttypetemplate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createincidenttypeimpact.md b/docs/models/components/createincidenttypeimpact.md new file mode 100644 index 00000000..6717a641 --- /dev/null +++ b/docs/models/components/createincidenttypeimpact.md @@ -0,0 +1,19 @@ +# CreateIncidentTypeImpact + +## Example Usage + +```typescript +import { CreateIncidentTypeImpact } from "firehydrant/models/components"; + +let value: CreateIncidentTypeImpact = { + id: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *string* | :heavy_check_mark: | The id of impact | +| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/createincidenttypetemplate.md b/docs/models/components/createincidenttypetemplate.md new file mode 100644 index 00000000..36fb4a2b --- /dev/null +++ b/docs/models/components/createincidenttypetemplate.md @@ -0,0 +1,24 @@ +# CreateIncidentTypeTemplate + +## Example Usage + +```typescript +import { CreateIncidentTypeTemplate } from "firehydrant/models/components"; + +let value: CreateIncidentTypeTemplate = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | A labels hash of keys and values | +| `severity` | *string* | :heavy_minus_sign: | N/A | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | +| `runbookIds` | *string*[] | :heavy_minus_sign: | List of ids of Runbooks to attach to incidents created from this type | +| `privateIncident` | *boolean* | :heavy_minus_sign: | N/A | +| `teamIds` | *string*[] | :heavy_minus_sign: | List of ids of teams to be assigned to incidents | +| `impacts` | [components.CreateIncidentTypeImpact](../../models/components/createincidenttypeimpact.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/createnuncsubscription.md b/docs/models/components/createnuncsubscription.md new file mode 100644 index 00000000..c2c41fda --- /dev/null +++ b/docs/models/components/createnuncsubscription.md @@ -0,0 +1,19 @@ +# CreateNuncSubscription + +Subscribe to status page updates + +## Example Usage + +```typescript +import { CreateNuncSubscription } from "firehydrant/models/components"; + +let value: CreateNuncSubscription = { + email: "Hadley.Feest67@gmail.com", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `email` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createoncallshift.md b/docs/models/components/createoncallshift.md new file mode 100644 index 00000000..6abf15dd --- /dev/null +++ b/docs/models/components/createoncallshift.md @@ -0,0 +1,22 @@ +# CreateOnCallShift + +Create a Signals on-call shift in a schedule. + +## Example Usage + +```typescript +import { CreateOnCallShift } from "firehydrant/models/components"; + +let value: CreateOnCallShift = { + startTime: "", + endTime: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `startTime` | *string* | :heavy_check_mark: | The start time of the shift in ISO8601 format. | +| `endTime` | *string* | :heavy_check_mark: | The end time of the shift in ISO8601 format. | +| `userId` | *string* | :heavy_minus_sign: | The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. | \ No newline at end of file diff --git a/docs/models/components/createpostmortemreason.md b/docs/models/components/createpostmortemreason.md new file mode 100644 index 00000000..8143fc3e --- /dev/null +++ b/docs/models/components/createpostmortemreason.md @@ -0,0 +1,19 @@ +# CreatePostMortemReason + +Add a new contributing factor to an incident + +## Example Usage + +```typescript +import { CreatePostMortemReason } from "firehydrant/models/components"; + +let value: CreatePostMortemReason = { + summary: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `summary` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createpostmortemreport.md b/docs/models/components/createpostmortemreport.md new file mode 100644 index 00000000..0a26259d --- /dev/null +++ b/docs/models/components/createpostmortemreport.md @@ -0,0 +1,19 @@ +# CreatePostMortemReport + +Create a report + +## Example Usage + +```typescript +import { CreatePostMortemReport } from "firehydrant/models/components"; + +let value: CreatePostMortemReport = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createpriority.md b/docs/models/components/createpriority.md new file mode 100644 index 00000000..b96c2cb6 --- /dev/null +++ b/docs/models/components/createpriority.md @@ -0,0 +1,21 @@ +# CreatePriority + +Create a new priority + +## Example Usage + +```typescript +import { CreatePriority } from "firehydrant/models/components"; + +let value: CreatePriority = { + slug: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `default` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createrunbook.md b/docs/models/components/createrunbook.md new file mode 100644 index 00000000..fa97fd7a --- /dev/null +++ b/docs/models/components/createrunbook.md @@ -0,0 +1,28 @@ +# CreateRunbook + +Create a new runbook for use with incidents. + +## Example Usage + +```typescript +import { CreateRunbook } from "firehydrant/models/components"; + +let value: CreateRunbook = { + name: "", + type: "incident_role", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `type` | [components.CreateRunbookType](../../models/components/createrunbooktype.md) | :heavy_check_mark: | Deprecated, but still required. Please just use 'incident' | +| `summary` | *string* | :heavy_minus_sign: | Deprecated. Use description | +| `description` | *string* | :heavy_minus_sign: | A longer description about the Runbook. Supports markdown format | +| `autoAttachToRestrictedIncidents` | *boolean* | :heavy_minus_sign: | Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. | +| `tutorial` | *boolean* | :heavy_minus_sign: | Whether or not this runbook is a tutorial runbook | +| `owner` | [components.CreateRunbookOwner](../../models/components/createrunbookowner.md) | :heavy_minus_sign: | An object representing a Team that owns the runbook | +| `attachmentRule` | [components.CreateRunbookAttachmentRule](../../models/components/createrunbookattachmentrule.md) | :heavy_minus_sign: | N/A | +| `steps` | [components.CreateRunbookStep](../../models/components/createrunbookstep.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createrunbookattachmentrule.md b/docs/models/components/createrunbookattachmentrule.md new file mode 100644 index 00000000..194066df --- /dev/null +++ b/docs/models/components/createrunbookattachmentrule.md @@ -0,0 +1,18 @@ +# CreateRunbookAttachmentRule + +## Example Usage + +```typescript +import { CreateRunbookAttachmentRule } from "firehydrant/models/components"; + +let value: CreateRunbookAttachmentRule = { + logic: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `logic` | *string* | :heavy_check_mark: | The JSON logic for the attaching the runbook | +| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/createrunbookexecution.md b/docs/models/components/createrunbookexecution.md new file mode 100644 index 00000000..06ccb3d3 --- /dev/null +++ b/docs/models/components/createrunbookexecution.md @@ -0,0 +1,21 @@ +# CreateRunbookExecution + +Attaches a runbook to an incident and executes it + +## Example Usage + +```typescript +import { CreateRunbookExecution } from "firehydrant/models/components"; + +let value: CreateRunbookExecution = { + executeFor: "", + runbookId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `executeFor` | *string* | :heavy_check_mark: | The incident to attach the runbook to. Format must be: `incident/${incidentId}` | +| `runbookId` | *string* | :heavy_check_mark: | ID of runbook to attach | \ No newline at end of file diff --git a/docs/models/components/createrunbookowner.md b/docs/models/components/createrunbookowner.md new file mode 100644 index 00000000..17a910ba --- /dev/null +++ b/docs/models/components/createrunbookowner.md @@ -0,0 +1,19 @@ +# CreateRunbookOwner + +An object representing a Team that owns the runbook + +## Example Usage + +```typescript +import { CreateRunbookOwner } from "firehydrant/models/components"; + +let value: CreateRunbookOwner = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createrunbookrule.md b/docs/models/components/createrunbookrule.md new file mode 100644 index 00000000..b9853172 --- /dev/null +++ b/docs/models/components/createrunbookrule.md @@ -0,0 +1,18 @@ +# CreateRunbookRule + +## Example Usage + +```typescript +import { CreateRunbookRule } from "firehydrant/models/components"; + +let value: CreateRunbookRule = { + logic: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `logic` | *string* | :heavy_check_mark: | The JSON logic for the rule | +| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/createrunbookstep.md b/docs/models/components/createrunbookstep.md new file mode 100644 index 00000000..93c38bc0 --- /dev/null +++ b/docs/models/components/createrunbookstep.md @@ -0,0 +1,20 @@ +# CreateRunbookStep + +## Example Usage + +```typescript +import { CreateRunbookStep } from "firehydrant/models/components"; + +let value: CreateRunbookStep = { + name: "", + actionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Name for step | +| `actionId` | *string* | :heavy_check_mark: | ID of action to use for this step. | +| `rule` | [components.CreateRunbookRule](../../models/components/createrunbookrule.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createrunbooktype.md b/docs/models/components/createrunbooktype.md new file mode 100644 index 00000000..d7278282 --- /dev/null +++ b/docs/models/components/createrunbooktype.md @@ -0,0 +1,17 @@ +# CreateRunbookType + +Deprecated, but still required. Please just use 'incident' + +## Example Usage + +```typescript +import { CreateRunbookType } from "firehydrant/models/components"; + +let value: CreateRunbookType = "general"; +``` + +## Values + +```typescript +"incident" | "general" | "infrastructure" | "incident_role" +``` \ No newline at end of file diff --git a/docs/models/components/createsavedsearch.md b/docs/models/components/createsavedsearch.md new file mode 100644 index 00000000..7ccef699 --- /dev/null +++ b/docs/models/components/createsavedsearch.md @@ -0,0 +1,24 @@ +# CreateSavedSearch + +Create a new saved search for a particular resource type + +## Example Usage + +```typescript +import { CreateSavedSearch } from "firehydrant/models/components"; + +let value: CreateSavedSearch = { + name: "", + filterValues: { + "key": "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `isPrivate` | *boolean* | :heavy_minus_sign: | N/A | +| `filterValues` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createscheduledmaintenance.md b/docs/models/components/createscheduledmaintenance.md new file mode 100644 index 00000000..c331e261 --- /dev/null +++ b/docs/models/components/createscheduledmaintenance.md @@ -0,0 +1,28 @@ +# CreateScheduledMaintenance + +Create a new scheduled maintenance event + +## Example Usage + +```typescript +import { CreateScheduledMaintenance } from "firehydrant/models/components"; + +let value: CreateScheduledMaintenance = { + name: "", + startsAt: new Date("2023-04-13T10:47:11.279Z"), + endsAt: new Date("2025-10-18T12:37:20.450Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | ISO8601 timestamp for the start time of the scheduled maintenance | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | ISO8601 timestamp for the end time of the scheduled maintenance | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | A json object of label keys and values | +| `statusPages` | [components.CreateScheduledMaintenanceStatusPage](../../models/components/createscheduledmaintenancestatuspage.md)[] | :heavy_minus_sign: | An array of status pages to display this maintenance on | +| `impacts` | [components.CreateScheduledMaintenanceImpact](../../models/components/createscheduledmaintenanceimpact.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/createscheduledmaintenanceimpact.md b/docs/models/components/createscheduledmaintenanceimpact.md new file mode 100644 index 00000000..fa845704 --- /dev/null +++ b/docs/models/components/createscheduledmaintenanceimpact.md @@ -0,0 +1,21 @@ +# CreateScheduledMaintenanceImpact + +## Example Usage + +```typescript +import { CreateScheduledMaintenanceImpact } from "firehydrant/models/components"; + +let value: CreateScheduledMaintenanceImpact = { + type: "", + id: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `type` | *string* | :heavy_check_mark: | The type of impact | +| `id` | *string* | :heavy_check_mark: | The id of impact | +| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/createscheduledmaintenancestatuspage.md b/docs/models/components/createscheduledmaintenancestatuspage.md new file mode 100644 index 00000000..89f9151d --- /dev/null +++ b/docs/models/components/createscheduledmaintenancestatuspage.md @@ -0,0 +1,18 @@ +# CreateScheduledMaintenanceStatusPage + +## Example Usage + +```typescript +import { CreateScheduledMaintenanceStatusPage } from "firehydrant/models/components"; + +let value: CreateScheduledMaintenanceStatusPage = { + connectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `integrationSlug` | *string* | :heavy_minus_sign: | The slug identifying the type of status page | +| `connectionId` | *string* | :heavy_check_mark: | The UUID of the status page to display this maintenance on | \ No newline at end of file diff --git a/docs/models/components/createscimgroup.md b/docs/models/components/createscimgroup.md new file mode 100644 index 00000000..c5912477 --- /dev/null +++ b/docs/models/components/createscimgroup.md @@ -0,0 +1,25 @@ +# CreateScimGroup + +SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. + +## Example Usage + +```typescript +import { CreateScimGroup } from "firehydrant/models/components"; + +let value: CreateScimGroup = { + displayName: "Pietro_Dare", + members: [ + { + value: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | The name of the team being created | +| `members` | [components.CreateScimGroupMember](../../models/components/createscimgroupmember.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createscimgroupmember.md b/docs/models/components/createscimgroupmember.md new file mode 100644 index 00000000..3bcc7ba8 --- /dev/null +++ b/docs/models/components/createscimgroupmember.md @@ -0,0 +1,17 @@ +# CreateScimGroupMember + +## Example Usage + +```typescript +import { CreateScimGroupMember } from "firehydrant/models/components"; + +let value: CreateScimGroupMember = { + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `value` | *string* | :heavy_check_mark: | String that represents the user's UUID to assign to the team | \ No newline at end of file diff --git a/docs/models/components/createscimuser.md b/docs/models/components/createscimuser.md new file mode 100644 index 00000000..2bd8a90f --- /dev/null +++ b/docs/models/components/createscimuser.md @@ -0,0 +1,33 @@ +# CreateScimUser + +SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. + +## Example Usage + +```typescript +import { CreateScimUser } from "firehydrant/models/components"; + +let value: CreateScimUser = { + userName: "Titus20", + name: { + familyName: "", + givenName: "", + }, + emails: [ + { + value: "", + primary: false, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `userName` | *string* | :heavy_check_mark: | A service provider's unique identifier for the user | +| `name` | [components.CreateScimUserName](../../models/components/createscimusername.md) | :heavy_check_mark: | The components of the user's name | +| `emails` | [components.CreateScimUserEmail](../../models/components/createscimuseremail.md)[] | :heavy_check_mark: | Email addresses for the User | +| `roles` | [components.CreateScimUserRoles](../../models/components/createscimuserroles.md) | :heavy_minus_sign: | Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. | +| `password` | *string* | :heavy_minus_sign: | This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password | \ No newline at end of file diff --git a/docs/models/components/createscimuseremail.md b/docs/models/components/createscimuseremail.md new file mode 100644 index 00000000..eb0f003f --- /dev/null +++ b/docs/models/components/createscimuseremail.md @@ -0,0 +1,19 @@ +# CreateScimUserEmail + +## Example Usage + +```typescript +import { CreateScimUserEmail } from "firehydrant/models/components"; + +let value: CreateScimUserEmail = { + value: "", + primary: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `value` | *string* | :heavy_check_mark: | String that represents an email address for the User | +| `primary` | *boolean* | :heavy_check_mark: | Boolean which signifies if an email is intended as the primary email for the User | \ No newline at end of file diff --git a/docs/models/components/createscimusername.md b/docs/models/components/createscimusername.md new file mode 100644 index 00000000..bdd317d8 --- /dev/null +++ b/docs/models/components/createscimusername.md @@ -0,0 +1,21 @@ +# CreateScimUserName + +The components of the user's name + +## Example Usage + +```typescript +import { CreateScimUserName } from "firehydrant/models/components"; + +let value: CreateScimUserName = { + familyName: "", + givenName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `familyName` | *string* | :heavy_check_mark: | The family name of the User, or last name in most Western languages | +| `givenName` | *string* | :heavy_check_mark: | The given name of the User, or first name in most Western languages | \ No newline at end of file diff --git a/docs/models/components/createscimuserroles.md b/docs/models/components/createscimuserroles.md new file mode 100644 index 00000000..ef3b315d --- /dev/null +++ b/docs/models/components/createscimuserroles.md @@ -0,0 +1,16 @@ +# CreateScimUserRoles + +Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. + +## Example Usage + +```typescript +import { CreateScimUserRoles } from "firehydrant/models/components"; + +let value: CreateScimUserRoles = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/createservice.md b/docs/models/components/createservice.md new file mode 100644 index 00000000..15311edc --- /dev/null +++ b/docs/models/components/createservice.md @@ -0,0 +1,29 @@ +# CreateService + +Creates a service for the organization, you may also create or attach functionalities to the service on create. + +## Example Usage + +```typescript +import { CreateService } from "firehydrant/models/components"; + +let value: CreateService = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | +| `serviceTier` | [components.CreateServiceServiceTier](../../models/components/createserviceservicetier.md) | :heavy_minus_sign: | Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. | +| `functionalities` | [components.CreateServiceFunctionality](../../models/components/createservicefunctionality.md)[] | :heavy_minus_sign: | An array of functionalities | +| `links` | [components.CreateServiceLink](../../models/components/createservicelink.md)[] | :heavy_minus_sign: | An array of links to associate with this service | +| `owner` | [components.CreateServiceOwner](../../models/components/createserviceowner.md) | :heavy_minus_sign: | An object representing a Team that owns the service | +| `teams` | [components.CreateServiceTeam](../../models/components/createserviceteam.md)[] | :heavy_minus_sign: | An array of teams to attach to this service. | +| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | +| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | +| `externalResources` | [components.CreateServiceExternalResource](../../models/components/createserviceexternalresource.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | \ No newline at end of file diff --git a/docs/models/components/createservicechecklistresponse.md b/docs/models/components/createservicechecklistresponse.md new file mode 100644 index 00000000..e2a7f089 --- /dev/null +++ b/docs/models/components/createservicechecklistresponse.md @@ -0,0 +1,21 @@ +# CreateServiceChecklistResponse + +Creates a response for a checklist item + +## Example Usage + +```typescript +import { CreateServiceChecklistResponse } from "firehydrant/models/components"; + +let value: CreateServiceChecklistResponse = { + checkId: "", + status: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `checkId` | *string* | :heavy_check_mark: | N/A | +| `status` | *boolean* | :heavy_check_mark: | Status of the check. 'true' if it's complete, 'false' if incomplete, or blank if not yet interacted with | \ No newline at end of file diff --git a/docs/models/components/createservicedependency.md b/docs/models/components/createservicedependency.md new file mode 100644 index 00000000..fed8c2fb --- /dev/null +++ b/docs/models/components/createservicedependency.md @@ -0,0 +1,22 @@ +# CreateServiceDependency + +Creates a service dependency relationship between two services + +## Example Usage + +```typescript +import { CreateServiceDependency } from "firehydrant/models/components"; + +let value: CreateServiceDependency = { + serviceId: "", + connectedServiceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `serviceId` | *string* | :heavy_check_mark: | N/A | +| `connectedServiceId` | *string* | :heavy_check_mark: | N/A | +| `notes` | *string* | :heavy_minus_sign: | A note to describe the service dependency relationship | \ No newline at end of file diff --git a/docs/models/components/createserviceexternalresource.md b/docs/models/components/createserviceexternalresource.md new file mode 100644 index 00000000..73a790a6 --- /dev/null +++ b/docs/models/components/createserviceexternalresource.md @@ -0,0 +1,18 @@ +# CreateServiceExternalResource + +## Example Usage + +```typescript +import { CreateServiceExternalResource } from "firehydrant/models/components"; + +let value: CreateServiceExternalResource = { + remoteId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `remoteId` | *string* | :heavy_check_mark: | N/A | +| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. | \ No newline at end of file diff --git a/docs/models/components/createservicefunctionality.md b/docs/models/components/createservicefunctionality.md new file mode 100644 index 00000000..ce4de45a --- /dev/null +++ b/docs/models/components/createservicefunctionality.md @@ -0,0 +1,16 @@ +# CreateServiceFunctionality + +## Example Usage + +```typescript +import { CreateServiceFunctionality } from "firehydrant/models/components"; + +let value: CreateServiceFunctionality = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `summary` | *string* | :heavy_minus_sign: | If you are trying to create a new functionality and attach it to this service, set the summary key | +| `id` | *string* | :heavy_minus_sign: | If you are trying to reuse a functionality, you may set the ID to attach it to the service | \ No newline at end of file diff --git a/docs/models/components/createservicelink.md b/docs/models/components/createservicelink.md new file mode 100644 index 00000000..540a56b4 --- /dev/null +++ b/docs/models/components/createservicelink.md @@ -0,0 +1,20 @@ +# CreateServiceLink + +## Example Usage + +```typescript +import { CreateServiceLink } from "firehydrant/models/components"; + +let value: CreateServiceLink = { + name: "", + hrefUrl: "https://usable-premeditation.net/", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | +| `hrefUrl` | *string* | :heavy_check_mark: | URL | +| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | \ No newline at end of file diff --git a/docs/models/components/createservicelinks.md b/docs/models/components/createservicelinks.md new file mode 100644 index 00000000..4319f10d --- /dev/null +++ b/docs/models/components/createservicelinks.md @@ -0,0 +1,23 @@ +# CreateServiceLinks + +Creates a service with the appropriate integration for each external service ID passed + +## Example Usage + +```typescript +import { CreateServiceLinks } from "firehydrant/models/components"; + +let value: CreateServiceLinks = { + externalServiceIds: "", + connectionId: "", + integration: "pager_duty", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `externalServiceIds` | *string* | :heavy_check_mark: | ID of the service | +| `connectionId` | *string* | :heavy_check_mark: | ID for the integration. This can be found by going to the edit page for the integration | +| `integration` | [components.Integration](../../models/components/integration.md) | :heavy_check_mark: | The name of the service | \ No newline at end of file diff --git a/docs/models/components/createserviceowner.md b/docs/models/components/createserviceowner.md new file mode 100644 index 00000000..75adaece --- /dev/null +++ b/docs/models/components/createserviceowner.md @@ -0,0 +1,19 @@ +# CreateServiceOwner + +An object representing a Team that owns the service + +## Example Usage + +```typescript +import { CreateServiceOwner } from "firehydrant/models/components"; + +let value: CreateServiceOwner = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createserviceservicetier.md b/docs/models/components/createserviceservicetier.md new file mode 100644 index 00000000..6bcdcc9d --- /dev/null +++ b/docs/models/components/createserviceservicetier.md @@ -0,0 +1,17 @@ +# CreateServiceServiceTier + +Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. + +## Example Usage + +```typescript +import { CreateServiceServiceTier } from "firehydrant/models/components"; + +let value: CreateServiceServiceTier = 4; +``` + +## Values + +```typescript +0 | 1 | 2 | 3 | 4 | 5 +``` \ No newline at end of file diff --git a/docs/models/components/createserviceteam.md b/docs/models/components/createserviceteam.md new file mode 100644 index 00000000..a45de4f8 --- /dev/null +++ b/docs/models/components/createserviceteam.md @@ -0,0 +1,17 @@ +# CreateServiceTeam + +## Example Usage + +```typescript +import { CreateServiceTeam } from "firehydrant/models/components"; + +let value: CreateServiceTeam = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createseverity.md b/docs/models/components/createseverity.md new file mode 100644 index 00000000..583fbabe --- /dev/null +++ b/docs/models/components/createseverity.md @@ -0,0 +1,22 @@ +# CreateSeverity + +Create a new severity + +## Example Usage + +```typescript +import { CreateSeverity } from "firehydrant/models/components"; + +let value: CreateSeverity = { + slug: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | +| `color` | [components.CreateSeverityColor](../../models/components/createseveritycolor.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createseveritycolor.md b/docs/models/components/createseveritycolor.md new file mode 100644 index 00000000..456091eb --- /dev/null +++ b/docs/models/components/createseveritycolor.md @@ -0,0 +1,15 @@ +# CreateSeverityColor + +## Example Usage + +```typescript +import { CreateSeverityColor } from "firehydrant/models/components"; + +let value: CreateSeverityColor = "orange"; +``` + +## Values + +```typescript +"red" | "orange" | "yellow" | "blue" | "teal" | "grey" +``` \ No newline at end of file diff --git a/docs/models/components/createseveritymatrixcondition.md b/docs/models/components/createseveritymatrixcondition.md new file mode 100644 index 00000000..f064bfce --- /dev/null +++ b/docs/models/components/createseveritymatrixcondition.md @@ -0,0 +1,20 @@ +# CreateSeverityMatrixCondition + +Create a new condition + +## Example Usage + +```typescript +import { CreateSeverityMatrixCondition } from "firehydrant/models/components"; + +let value: CreateSeverityMatrixCondition = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `position` | *number* | :heavy_minus_sign: | Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition | \ No newline at end of file diff --git a/docs/models/components/createseveritymatriximpact.md b/docs/models/components/createseveritymatriximpact.md new file mode 100644 index 00000000..8e42e42b --- /dev/null +++ b/docs/models/components/createseveritymatriximpact.md @@ -0,0 +1,22 @@ +# CreateSeverityMatrixImpact + +Create a new impact + +## Example Usage + +```typescript +import { CreateSeverityMatrixImpact } from "firehydrant/models/components"; + +let value: CreateSeverityMatrixImpact = { + affectsType: "", + affectsId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `affectsType` | *string* | :heavy_check_mark: | N/A | +| `affectsId` | *string* | :heavy_check_mark: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/createsignalsemailtarget.md b/docs/models/components/createsignalsemailtarget.md new file mode 100644 index 00000000..3a62c299 --- /dev/null +++ b/docs/models/components/createsignalsemailtarget.md @@ -0,0 +1,27 @@ +# CreateSignalsEmailTarget + +Create a Signals email target for a team. + +## Example Usage + +```typescript +import { CreateSignalsEmailTarget } from "firehydrant/models/components"; + +let value: CreateSignalsEmailTarget = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The email target's name. | +| `slug` | *string* | :heavy_minus_sign: | The email address that will be listening to events. | +| `description` | *string* | :heavy_minus_sign: | A detailed description of the email target. | +| `target` | [components.CreateSignalsEmailTargetTarget](../../models/components/createsignalsemailtargettarget.md) | :heavy_minus_sign: | The target that the email target will notify. This object must contain a `type`
field that specifies the type of target and an `id` field that specifies the ID of
the target. The `type` field must be one of "escalation_policy", "on_call_schedule",
"team", "user", or "slack_channel".
| +| `allowedSenders` | *string*[] | :heavy_minus_sign: | A list of email addresses that are allowed to send events to the target. Must be exact match. | +| `rules` | *string*[] | :heavy_minus_sign: | A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. | +| `ruleMatchingStrategy` | [components.CreateSignalsEmailTargetRuleMatchingStrategy](../../models/components/createsignalsemailtargetrulematchingstrategy.md) | :heavy_minus_sign: | Whether or not all rules must match, or if only one rule must match. | +| `statusCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the status of an incoming email that is sent to the target. | +| `levelCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the level of an incoming email that is sent to the target. | \ No newline at end of file diff --git a/docs/models/components/createsignalsemailtargetrulematchingstrategy.md b/docs/models/components/createsignalsemailtargetrulematchingstrategy.md new file mode 100644 index 00000000..1176c9f6 --- /dev/null +++ b/docs/models/components/createsignalsemailtargetrulematchingstrategy.md @@ -0,0 +1,17 @@ +# CreateSignalsEmailTargetRuleMatchingStrategy + +Whether or not all rules must match, or if only one rule must match. + +## Example Usage + +```typescript +import { CreateSignalsEmailTargetRuleMatchingStrategy } from "firehydrant/models/components"; + +let value: CreateSignalsEmailTargetRuleMatchingStrategy = "any"; +``` + +## Values + +```typescript +"all" | "any" +``` \ No newline at end of file diff --git a/docs/models/components/createsignalsemailtargettarget.md b/docs/models/components/createsignalsemailtargettarget.md new file mode 100644 index 00000000..585e9767 --- /dev/null +++ b/docs/models/components/createsignalsemailtargettarget.md @@ -0,0 +1,25 @@ +# CreateSignalsEmailTargetTarget + +The target that the email target will notify. This object must contain a `type` +field that specifies the type of target and an `id` field that specifies the ID of +the target. The `type` field must be one of "escalation_policy", "on_call_schedule", +"team", "user", or "slack_channel". + + +## Example Usage + +```typescript +import { CreateSignalsEmailTargetTarget } from "firehydrant/models/components"; + +let value: CreateSignalsEmailTargetTarget = { + type: "Team", + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `type` | [components.CreateSignalsEmailTargetType](../../models/components/createsignalsemailtargettype.md) | :heavy_check_mark: | The type of target that the inbound email will notify when matched. | +| `id` | *string* | :heavy_check_mark: | The ID of the target that the inbound email will notify when matched. | \ No newline at end of file diff --git a/docs/models/components/createsignalsemailtargettype.md b/docs/models/components/createsignalsemailtargettype.md new file mode 100644 index 00000000..e02bfe28 --- /dev/null +++ b/docs/models/components/createsignalsemailtargettype.md @@ -0,0 +1,17 @@ +# CreateSignalsEmailTargetType + +The type of target that the inbound email will notify when matched. + +## Example Usage + +```typescript +import { CreateSignalsEmailTargetType } from "firehydrant/models/components"; + +let value: CreateSignalsEmailTargetType = "Team"; +``` + +## Values + +```typescript +"Team" | "EntireTeam" | "EscalationPolicy" | "OnCallSchedule" | "User" | "SlackChannel" | "Webhook" +``` \ No newline at end of file diff --git a/docs/models/components/createsignalswebhooktarget.md b/docs/models/components/createsignalswebhooktarget.md new file mode 100644 index 00000000..bf85b1e9 --- /dev/null +++ b/docs/models/components/createsignalswebhooktarget.md @@ -0,0 +1,23 @@ +# CreateSignalsWebhookTarget + +Create a Signals webhook target. + +## Example Usage + +```typescript +import { CreateSignalsWebhookTarget } from "firehydrant/models/components"; + +let value: CreateSignalsWebhookTarget = { + name: "", + url: "https://heavy-solution.biz/", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The webhook target's name. | +| `description` | *string* | :heavy_minus_sign: | An optional detailed description of the webhook target. | +| `url` | *string* | :heavy_check_mark: | The URL that the webhook target will notify. | +| `signingKey` | *string* | :heavy_minus_sign: | An optional secret we will provide in the `FH-Signature` header
when sending a payload to the webhook target. This key will not be
shown in any response once configured.
| \ No newline at end of file diff --git a/docs/models/components/createstatusupdatetemplate.md b/docs/models/components/createstatusupdatetemplate.md new file mode 100644 index 00000000..8e6fddf5 --- /dev/null +++ b/docs/models/components/createstatusupdatetemplate.md @@ -0,0 +1,21 @@ +# CreateStatusUpdateTemplate + +Create a status update template for your organization + +## Example Usage + +```typescript +import { CreateStatusUpdateTemplate } from "firehydrant/models/components"; + +let value: CreateStatusUpdateTemplate = { + name: "", + body: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `body` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createtasklist.md b/docs/models/components/createtasklist.md new file mode 100644 index 00000000..7c4bebcd --- /dev/null +++ b/docs/models/components/createtasklist.md @@ -0,0 +1,26 @@ +# CreateTaskList + +Creates a new task list + +## Example Usage + +```typescript +import { CreateTaskList } from "firehydrant/models/components"; + +let value: CreateTaskList = { + name: "", + taskListItems: [ + { + summary: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `taskListItems` | [components.CreateTaskListTaskListItem](../../models/components/createtasklisttasklistitem.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createtasklisttasklistitem.md b/docs/models/components/createtasklisttasklistitem.md new file mode 100644 index 00000000..d26ccc59 --- /dev/null +++ b/docs/models/components/createtasklisttasklistitem.md @@ -0,0 +1,18 @@ +# CreateTaskListTaskListItem + +## Example Usage + +```typescript +import { CreateTaskListTaskListItem } from "firehydrant/models/components"; + +let value: CreateTaskListTaskListItem = { + summary: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `summary` | *string* | :heavy_check_mark: | A summary of the task | +| `description` | *string* | :heavy_minus_sign: | A long-form description for the task if additional context is helpful | \ No newline at end of file diff --git a/docs/models/components/createteam.md b/docs/models/components/createteam.md new file mode 100644 index 00000000..8cac72ce --- /dev/null +++ b/docs/models/components/createteam.md @@ -0,0 +1,25 @@ +# CreateTeam + +Create a new team + +## Example Usage + +```typescript +import { CreateTeam } from "firehydrant/models/components"; + +let value: CreateTeam = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `slackChannelId` | *string* | :heavy_minus_sign: | The Slack channel ID associated with this team. This may be the reference in FireHydrant's system (i.e. UUID) or the ID value from Slack (e.g. C1234567890).
| +| `msTeamsChannel` | [components.CreateTeamMsTeamsChannel](../../models/components/createteammsteamschannel.md) | :heavy_minus_sign: | MS Teams channel identity for channel associated with this team | +| `memberships` | [components.CreateTeamMembership](../../models/components/createteammembership.md)[] | :heavy_minus_sign: | N/A | +| `inviteEmails` | *string*[] | :heavy_minus_sign: | A list of email addresses to invite to join the organization and automatically add to this team. If an email already has a pending invitation, the team will be added to their existing invitation. | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicy.md b/docs/models/components/createteamescalationpolicy.md new file mode 100644 index 00000000..693d0928 --- /dev/null +++ b/docs/models/components/createteamescalationpolicy.md @@ -0,0 +1,37 @@ +# CreateTeamEscalationPolicy + +Create a Signals escalation policy for a team. + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicy } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicy = { + name: "", + steps: [ + { + targets: [ + { + type: "OnCallSchedule", + id: "", + }, + ], + timeout: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_check_mark: | The escalation policy's name. | +| `description` | *string* | :heavy_minus_sign: | A detailed description of the escalation policy. | +| `repetitions` | *number* | :heavy_minus_sign: | The number of times that the escalation policy should repeat before an alert is dropped. | +| `default` | *boolean* | :heavy_minus_sign: | Whether this escalation policy should be the default for the team. | +| `stepStrategy` | *string* | :heavy_minus_sign: | The strategy for handling steps in the escalation policy. Can be "static" or "dynamic_by_priority". | +| `steps` | [components.CreateTeamEscalationPolicyStep](../../models/components/createteamescalationpolicystep.md)[] | :heavy_check_mark: | A list of steps that define how an alert should escalate through the policy. | +| `handoffStep` | [components.CreateTeamEscalationPolicyHandoffStep](../../models/components/createteamescalationpolicyhandoffstep.md) | :heavy_minus_sign: | A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. | +| `prioritizedSettings` | [components.CreateTeamEscalationPolicyPrioritizedSettings](../../models/components/createteamescalationpolicyprioritizedsettings.md) | :heavy_minus_sign: | Priority-specific settings for dynamic escalation policies | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicydistributiontype.md b/docs/models/components/createteamescalationpolicydistributiontype.md new file mode 100644 index 00000000..e46ab8c6 --- /dev/null +++ b/docs/models/components/createteamescalationpolicydistributiontype.md @@ -0,0 +1,18 @@ +# CreateTeamEscalationPolicyDistributionType + +The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyDistributionType } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyDistributionType = + "round_robin_by_escalation_policy"; +``` + +## Values + +```typescript +"unspecified" | "round_robin_by_alert" | "round_robin_by_escalation_policy" +``` \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicyhandoffstep.md b/docs/models/components/createteamescalationpolicyhandoffstep.md new file mode 100644 index 00000000..bbcbff7a --- /dev/null +++ b/docs/models/components/createteamescalationpolicyhandoffstep.md @@ -0,0 +1,21 @@ +# CreateTeamEscalationPolicyHandoffStep + +A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyHandoffStep } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyHandoffStep = { + targetType: "Team", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `targetType` | [components.CreateTeamEscalationPolicyTargetType](../../models/components/createteamescalationpolicytargettype.md) | :heavy_check_mark: | The type of target to which the policy will hand off. | +| `targetId` | *string* | :heavy_check_mark: | The ID of the target to which the policy will hand off. | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicyhigh.md b/docs/models/components/createteamescalationpolicyhigh.md new file mode 100644 index 00000000..048f7dfa --- /dev/null +++ b/docs/models/components/createteamescalationpolicyhigh.md @@ -0,0 +1,18 @@ +# CreateTeamEscalationPolicyHigh + +Settings for HIGH priority alerts + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyHigh } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyHigh = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `repetitions` | *number* | :heavy_minus_sign: | Number of repetitions for HIGH priority alerts | +| `handoffStep` | [components.CreateTeamEscalationPolicyHighHandoffStep](../../models/components/createteamescalationpolicyhighhandoffstep.md) | :heavy_minus_sign: | Handoff step for HIGH priority alerts | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicyhighhandoffstep.md b/docs/models/components/createteamescalationpolicyhighhandoffstep.md new file mode 100644 index 00000000..d5d2a6bc --- /dev/null +++ b/docs/models/components/createteamescalationpolicyhighhandoffstep.md @@ -0,0 +1,21 @@ +# CreateTeamEscalationPolicyHighHandoffStep + +Handoff step for HIGH priority alerts + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyHighHandoffStep } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyHighHandoffStep = { + targetType: "EscalationPolicy", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `targetType` | [components.CreateTeamEscalationPolicyHighTargetType](../../models/components/createteamescalationpolicyhightargettype.md) | :heavy_check_mark: | N/A | +| `targetId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicyhightargettype.md b/docs/models/components/createteamescalationpolicyhightargettype.md new file mode 100644 index 00000000..3ba0b62e --- /dev/null +++ b/docs/models/components/createteamescalationpolicyhightargettype.md @@ -0,0 +1,15 @@ +# CreateTeamEscalationPolicyHighTargetType + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyHighTargetType } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyHighTargetType = "EscalationPolicy"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicylow.md b/docs/models/components/createteamescalationpolicylow.md new file mode 100644 index 00000000..ba9712e5 --- /dev/null +++ b/docs/models/components/createteamescalationpolicylow.md @@ -0,0 +1,18 @@ +# CreateTeamEscalationPolicyLow + +Settings for LOW priority alerts + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyLow } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyLow = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `repetitions` | *number* | :heavy_minus_sign: | Number of repetitions for LOW priority alerts | +| `handoffStep` | [components.CreateTeamEscalationPolicyLowHandoffStep](../../models/components/createteamescalationpolicylowhandoffstep.md) | :heavy_minus_sign: | Handoff step for LOW priority alerts | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicylowhandoffstep.md b/docs/models/components/createteamescalationpolicylowhandoffstep.md new file mode 100644 index 00000000..a16fef25 --- /dev/null +++ b/docs/models/components/createteamescalationpolicylowhandoffstep.md @@ -0,0 +1,21 @@ +# CreateTeamEscalationPolicyLowHandoffStep + +Handoff step for LOW priority alerts + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyLowHandoffStep } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyLowHandoffStep = { + targetType: "EscalationPolicy", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `targetType` | [components.CreateTeamEscalationPolicyLowTargetType](../../models/components/createteamescalationpolicylowtargettype.md) | :heavy_check_mark: | N/A | +| `targetId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicylowtargettype.md b/docs/models/components/createteamescalationpolicylowtargettype.md new file mode 100644 index 00000000..d7bf6247 --- /dev/null +++ b/docs/models/components/createteamescalationpolicylowtargettype.md @@ -0,0 +1,15 @@ +# CreateTeamEscalationPolicyLowTargetType + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyLowTargetType } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyLowTargetType = "Team"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicymedium.md b/docs/models/components/createteamescalationpolicymedium.md new file mode 100644 index 00000000..ade7cc51 --- /dev/null +++ b/docs/models/components/createteamescalationpolicymedium.md @@ -0,0 +1,18 @@ +# CreateTeamEscalationPolicyMedium + +Settings for MEDIUM priority alerts + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyMedium } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyMedium = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `repetitions` | *number* | :heavy_minus_sign: | Number of repetitions for MEDIUM priority alerts | +| `handoffStep` | [components.CreateTeamEscalationPolicyMediumHandoffStep](../../models/components/createteamescalationpolicymediumhandoffstep.md) | :heavy_minus_sign: | Handoff step for MEDIUM priority alerts | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicymediumhandoffstep.md b/docs/models/components/createteamescalationpolicymediumhandoffstep.md new file mode 100644 index 00000000..36cd62ca --- /dev/null +++ b/docs/models/components/createteamescalationpolicymediumhandoffstep.md @@ -0,0 +1,21 @@ +# CreateTeamEscalationPolicyMediumHandoffStep + +Handoff step for MEDIUM priority alerts + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyMediumHandoffStep } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyMediumHandoffStep = { + targetType: "Team", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `targetType` | [components.CreateTeamEscalationPolicyMediumTargetType](../../models/components/createteamescalationpolicymediumtargettype.md) | :heavy_check_mark: | N/A | +| `targetId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicymediumtargettype.md b/docs/models/components/createteamescalationpolicymediumtargettype.md new file mode 100644 index 00000000..e341fd71 --- /dev/null +++ b/docs/models/components/createteamescalationpolicymediumtargettype.md @@ -0,0 +1,15 @@ +# CreateTeamEscalationPolicyMediumTargetType + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyMediumTargetType } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyMediumTargetType = "EscalationPolicy"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicyprioritizedsettings.md b/docs/models/components/createteamescalationpolicyprioritizedsettings.md new file mode 100644 index 00000000..f69ca584 --- /dev/null +++ b/docs/models/components/createteamescalationpolicyprioritizedsettings.md @@ -0,0 +1,19 @@ +# CreateTeamEscalationPolicyPrioritizedSettings + +Priority-specific settings for dynamic escalation policies + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyPrioritizedSettings } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyPrioritizedSettings = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `high` | [components.CreateTeamEscalationPolicyHigh](../../models/components/createteamescalationpolicyhigh.md) | :heavy_minus_sign: | Settings for HIGH priority alerts | +| `medium` | [components.CreateTeamEscalationPolicyMedium](../../models/components/createteamescalationpolicymedium.md) | :heavy_minus_sign: | Settings for MEDIUM priority alerts | +| `low` | [components.CreateTeamEscalationPolicyLow](../../models/components/createteamescalationpolicylow.md) | :heavy_minus_sign: | Settings for LOW priority alerts | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicystep.md b/docs/models/components/createteamescalationpolicystep.md new file mode 100644 index 00000000..2f247a89 --- /dev/null +++ b/docs/models/components/createteamescalationpolicystep.md @@ -0,0 +1,26 @@ +# CreateTeamEscalationPolicyStep + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyStep } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyStep = { + targets: [ + { + type: "User", + id: "", + }, + ], + timeout: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `targets` | [components.CreateTeamEscalationPolicyTarget](../../models/components/createteamescalationpolicytarget.md)[] | :heavy_check_mark: | A list of targets that the step will notify. You can specify up to 15 targets per step. | +| `timeout` | *string* | :heavy_check_mark: | An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. | +| `distributionType` | [components.CreateTeamEscalationPolicyDistributionType](../../models/components/createteamescalationpolicydistributiontype.md) | :heavy_minus_sign: | The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. | +| `priorities` | *string*[] | :heavy_minus_sign: | A list of priorities (HIGH, MEDIUM, LOW) to which the step applies when using a dynamic escalation policy. | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicytarget.md b/docs/models/components/createteamescalationpolicytarget.md new file mode 100644 index 00000000..2cb6b8d8 --- /dev/null +++ b/docs/models/components/createteamescalationpolicytarget.md @@ -0,0 +1,19 @@ +# CreateTeamEscalationPolicyTarget + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyTarget } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyTarget = { + type: "User", + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `type` | [components.CreateTeamEscalationPolicyType](../../models/components/createteamescalationpolicytype.md) | :heavy_check_mark: | The type of target that the step will notify. | +| `id` | *string* | :heavy_check_mark: | The ID of the target that the step will notify. | \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicytargettype.md b/docs/models/components/createteamescalationpolicytargettype.md new file mode 100644 index 00000000..3829265f --- /dev/null +++ b/docs/models/components/createteamescalationpolicytargettype.md @@ -0,0 +1,17 @@ +# CreateTeamEscalationPolicyTargetType + +The type of target to which the policy will hand off. + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyTargetType } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyTargetType = "Team"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/createteamescalationpolicytype.md b/docs/models/components/createteamescalationpolicytype.md new file mode 100644 index 00000000..694f4c79 --- /dev/null +++ b/docs/models/components/createteamescalationpolicytype.md @@ -0,0 +1,17 @@ +# CreateTeamEscalationPolicyType + +The type of target that the step will notify. + +## Example Usage + +```typescript +import { CreateTeamEscalationPolicyType } from "firehydrant/models/components"; + +let value: CreateTeamEscalationPolicyType = "OnCallSchedule"; +``` + +## Values + +```typescript +"OnCallSchedule" | "User" | "SlackChannel" | "EntireTeam" | "Webhook" +``` \ No newline at end of file diff --git a/docs/models/components/createteammembership.md b/docs/models/components/createteammembership.md new file mode 100644 index 00000000..4c4a8d8e --- /dev/null +++ b/docs/models/components/createteammembership.md @@ -0,0 +1,17 @@ +# CreateTeamMembership + +## Example Usage + +```typescript +import { CreateTeamMembership } from "firehydrant/models/components"; + +let value: CreateTeamMembership = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `userId` | *string* | :heavy_minus_sign: | N/A | +| `scheduleId` | *string* | :heavy_minus_sign: | N/A | +| `incidentRoleId` | *string* | :heavy_minus_sign: | An incident role ID that this user will automatically assigned if this team is assigned to an incident | \ No newline at end of file diff --git a/docs/models/components/createteammsteamschannel.md b/docs/models/components/createteammsteamschannel.md new file mode 100644 index 00000000..1cac869b --- /dev/null +++ b/docs/models/components/createteammsteamschannel.md @@ -0,0 +1,21 @@ +# CreateTeamMsTeamsChannel + +MS Teams channel identity for channel associated with this team + +## Example Usage + +```typescript +import { CreateTeamMsTeamsChannel } from "firehydrant/models/components"; + +let value: CreateTeamMsTeamsChannel = { + channelId: "", + msTeamId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `channelId` | *string* | :heavy_check_mark: | N/A | +| `msTeamId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/createteamoncallschedule.md b/docs/models/components/createteamoncallschedule.md new file mode 100644 index 00000000..ac86bd6c --- /dev/null +++ b/docs/models/components/createteamoncallschedule.md @@ -0,0 +1,32 @@ +# CreateTeamOnCallSchedule + +Create a Signals on-call schedule for a team. + +## Example Usage + +```typescript +import { CreateTeamOnCallSchedule } from "firehydrant/models/components"; + +let value: CreateTeamOnCallSchedule = { + name: "", + timeZone: "Europe/Zurich", + strategy: { + type: "daily", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | The on-call schedule's name. | +| `description` | *string* | :heavy_minus_sign: | A detailed description of the on-call schedule. | +| `timeZone` | *string* | :heavy_check_mark: | The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. | +| `slackUserGroupId` | *string* | :heavy_minus_sign: | The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. | +| `members` | [components.CreateTeamOnCallScheduleMember](../../models/components/createteamoncallschedulemember.md)[] | :heavy_minus_sign: | An ordered list of objects that specify members of the on-call schedule's rotation. | +| `strategy` | [components.CreateTeamOnCallScheduleStrategy](../../models/components/createteamoncallschedulestrategy.md) | :heavy_check_mark: | An object that specifies how the schedule's on-call shifts should be generated. | +| `restrictions` | [components.CreateTeamOnCallScheduleRestriction](../../models/components/createteamoncallschedulerestriction.md)[] | :heavy_minus_sign: | A list of objects that restrict the schedule to speccific on-call periods. | +| `startTime` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when the schedule's first shift should start. This value is only used if the schedule's strategy is "custom". | +| `color` | *string* | :heavy_minus_sign: | A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. | +| `memberIds` | *string*[] | :heavy_minus_sign: | This parameter is deprecated; use `members` instead. | \ No newline at end of file diff --git a/docs/models/components/createteamoncallscheduleendday.md b/docs/models/components/createteamoncallscheduleendday.md new file mode 100644 index 00000000..98c7325d --- /dev/null +++ b/docs/models/components/createteamoncallscheduleendday.md @@ -0,0 +1,17 @@ +# CreateTeamOnCallScheduleEndDay + +The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + +## Example Usage + +```typescript +import { CreateTeamOnCallScheduleEndDay } from "firehydrant/models/components"; + +let value: CreateTeamOnCallScheduleEndDay = "monday"; +``` + +## Values + +```typescript +"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" +``` \ No newline at end of file diff --git a/docs/models/components/createteamoncallschedulehandoffday.md b/docs/models/components/createteamoncallschedulehandoffday.md new file mode 100644 index 00000000..900d5196 --- /dev/null +++ b/docs/models/components/createteamoncallschedulehandoffday.md @@ -0,0 +1,17 @@ +# CreateTeamOnCallScheduleHandoffDay + +The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + +## Example Usage + +```typescript +import { CreateTeamOnCallScheduleHandoffDay } from "firehydrant/models/components"; + +let value: CreateTeamOnCallScheduleHandoffDay = "wednesday"; +``` + +## Values + +```typescript +"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" +``` \ No newline at end of file diff --git a/docs/models/components/createteamoncallschedulemember.md b/docs/models/components/createteamoncallschedulemember.md new file mode 100644 index 00000000..f94d8a1b --- /dev/null +++ b/docs/models/components/createteamoncallschedulemember.md @@ -0,0 +1,15 @@ +# CreateTeamOnCallScheduleMember + +## Example Usage + +```typescript +import { CreateTeamOnCallScheduleMember } from "firehydrant/models/components"; + +let value: CreateTeamOnCallScheduleMember = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `userId` | *string* | :heavy_minus_sign: | The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule
multiple times to construct more complex rotations, and you can specify a `null` user ID to create
unassigned slots in the rotation.
| \ No newline at end of file diff --git a/docs/models/components/createteamoncallschedulerestriction.md b/docs/models/components/createteamoncallschedulerestriction.md new file mode 100644 index 00000000..c1393df5 --- /dev/null +++ b/docs/models/components/createteamoncallschedulerestriction.md @@ -0,0 +1,23 @@ +# CreateTeamOnCallScheduleRestriction + +## Example Usage + +```typescript +import { CreateTeamOnCallScheduleRestriction } from "firehydrant/models/components"; + +let value: CreateTeamOnCallScheduleRestriction = { + startDay: "wednesday", + startTime: "", + endDay: "friday", + endTime: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `startDay` | [components.CreateTeamOnCallScheduleStartDay](../../models/components/createteamoncallschedulestartday.md) | :heavy_check_mark: | The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). | +| `startTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should start. | +| `endDay` | [components.CreateTeamOnCallScheduleEndDay](../../models/components/createteamoncallscheduleendday.md) | :heavy_check_mark: | The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). | +| `endTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should end. | \ No newline at end of file diff --git a/docs/models/components/createteamoncallschedulestartday.md b/docs/models/components/createteamoncallschedulestartday.md new file mode 100644 index 00000000..68ba3a7c --- /dev/null +++ b/docs/models/components/createteamoncallschedulestartday.md @@ -0,0 +1,17 @@ +# CreateTeamOnCallScheduleStartDay + +The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + +## Example Usage + +```typescript +import { CreateTeamOnCallScheduleStartDay } from "firehydrant/models/components"; + +let value: CreateTeamOnCallScheduleStartDay = "monday"; +``` + +## Values + +```typescript +"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" +``` \ No newline at end of file diff --git a/docs/models/components/createteamoncallschedulestrategy.md b/docs/models/components/createteamoncallschedulestrategy.md new file mode 100644 index 00000000..592cc48c --- /dev/null +++ b/docs/models/components/createteamoncallschedulestrategy.md @@ -0,0 +1,22 @@ +# CreateTeamOnCallScheduleStrategy + +An object that specifies how the schedule's on-call shifts should be generated. + +## Example Usage + +```typescript +import { CreateTeamOnCallScheduleStrategy } from "firehydrant/models/components"; + +let value: CreateTeamOnCallScheduleStrategy = { + type: "custom", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [components.CreateTeamOnCallScheduleType](../../models/components/createteamoncallscheduletype.md) | :heavy_check_mark: | The type of strategy. Must be one of "daily", "weekly", or "custom". | +| `handoffTime` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". | +| `handoffDay` | [components.CreateTeamOnCallScheduleHandoffDay](../../models/components/createteamoncallschedulehandoffday.md) | :heavy_minus_sign: | The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". | +| `shiftDuration` | *string* | :heavy_minus_sign: | An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". | \ No newline at end of file diff --git a/docs/models/components/createteamoncallscheduletype.md b/docs/models/components/createteamoncallscheduletype.md new file mode 100644 index 00000000..01c25cf7 --- /dev/null +++ b/docs/models/components/createteamoncallscheduletype.md @@ -0,0 +1,17 @@ +# CreateTeamOnCallScheduleType + +The type of strategy. Must be one of "daily", "weekly", or "custom". + +## Example Usage + +```typescript +import { CreateTeamOnCallScheduleType } from "firehydrant/models/components"; + +let value: CreateTeamOnCallScheduleType = "daily"; +``` + +## Values + +```typescript +"daily" | "weekly" | "custom" +``` \ No newline at end of file diff --git a/docs/models/components/createteamsignalrule.md b/docs/models/components/createteamsignalrule.md new file mode 100644 index 00000000..bd349856 --- /dev/null +++ b/docs/models/components/createteamsignalrule.md @@ -0,0 +1,29 @@ +# CreateTeamSignalRule + +Create a Signals rule for a team. + +## Example Usage + +```typescript +import { CreateTeamSignalRule } from "firehydrant/models/components"; + +let value: CreateTeamSignalRule = { + name: "", + expression: "", + targetType: "Webhook", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_check_mark: | The rule's name. | +| `expression` | *string* | :heavy_check_mark: | The CEL expression that defines the rule. | +| `targetType` | [components.CreateTeamSignalRuleTargetType](../../models/components/createteamsignalruletargettype.md) | :heavy_check_mark: | The type of target that the rule will notify when matched. | +| `targetId` | *string* | :heavy_check_mark: | The ID of the target that the rule will notify when matched. | +| `incidentTypeId` | *string* | :heavy_minus_sign: | The ID of an incident type that should be used when an alert is promoted to an incident | +| `notificationPriorityOverride` | [components.CreateTeamSignalRuleNotificationPriorityOverride](../../models/components/createteamsignalrulenotificationpriorityoverride.md) | :heavy_minus_sign: | A notification priority that will be set on the resulting alert (default: HIGH) | +| `createIncidentConditionWhen` | [components.CreateTeamSignalRuleCreateIncidentConditionWhen](../../models/components/createteamsignalrulecreateincidentconditionwhen.md) | :heavy_minus_sign: | Determines when an incident should be created when this rule is matched | +| `deduplicationExpiry` | *string* | :heavy_minus_sign: | The amount of time alerts created from this rule will be deduplicated | \ No newline at end of file diff --git a/docs/models/components/createteamsignalrulecreateincidentconditionwhen.md b/docs/models/components/createteamsignalrulecreateincidentconditionwhen.md new file mode 100644 index 00000000..ebe3c95f --- /dev/null +++ b/docs/models/components/createteamsignalrulecreateincidentconditionwhen.md @@ -0,0 +1,17 @@ +# CreateTeamSignalRuleCreateIncidentConditionWhen + +Determines when an incident should be created when this rule is matched + +## Example Usage + +```typescript +import { CreateTeamSignalRuleCreateIncidentConditionWhen } from "firehydrant/models/components"; + +let value: CreateTeamSignalRuleCreateIncidentConditionWhen = "WHEN_UNSPECIFIED"; +``` + +## Values + +```typescript +"WHEN_UNSPECIFIED" | "WHEN_ALWAYS" +``` \ No newline at end of file diff --git a/docs/models/components/createteamsignalrulenotificationpriorityoverride.md b/docs/models/components/createteamsignalrulenotificationpriorityoverride.md new file mode 100644 index 00000000..deb202c1 --- /dev/null +++ b/docs/models/components/createteamsignalrulenotificationpriorityoverride.md @@ -0,0 +1,17 @@ +# CreateTeamSignalRuleNotificationPriorityOverride + +A notification priority that will be set on the resulting alert (default: HIGH) + +## Example Usage + +```typescript +import { CreateTeamSignalRuleNotificationPriorityOverride } from "firehydrant/models/components"; + +let value: CreateTeamSignalRuleNotificationPriorityOverride = ""; +``` + +## Values + +```typescript +"HIGH" | "MEDIUM" | "LOW" | "" +``` \ No newline at end of file diff --git a/docs/models/components/createteamsignalruletargettype.md b/docs/models/components/createteamsignalruletargettype.md new file mode 100644 index 00000000..1101eddc --- /dev/null +++ b/docs/models/components/createteamsignalruletargettype.md @@ -0,0 +1,17 @@ +# CreateTeamSignalRuleTargetType + +The type of target that the rule will notify when matched. + +## Example Usage + +```typescript +import { CreateTeamSignalRuleTargetType } from "firehydrant/models/components"; + +let value: CreateTeamSignalRuleTargetType = "EscalationPolicy"; +``` + +## Values + +```typescript +"EscalationPolicy" | "OnCallSchedule" | "User" | "Webhook" | "SlackChannel" +``` \ No newline at end of file diff --git a/docs/models/components/createticket.md b/docs/models/components/createticket.md new file mode 100644 index 00000000..615099c4 --- /dev/null +++ b/docs/models/components/createticket.md @@ -0,0 +1,27 @@ +# CreateTicket + +Creates a ticket for a project + +## Example Usage + +```typescript +import { CreateTicket } from "firehydrant/models/components"; + +let value: CreateTicket = { + summary: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `summary` | *string* | :heavy_check_mark: | N/A | +| `relatedTo` | *string* | :heavy_minus_sign: | Which incident this ticket is related to, in the format of 'incident/UUID' | +| `projectId` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `state` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `priorityId` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the ticket | +| `remoteUrl` | *string* | :heavy_minus_sign: | The remote URL for an existing ticket in a supported and configured ticketing integration | \ No newline at end of file diff --git a/docs/models/components/createticketingpriority.md b/docs/models/components/createticketingpriority.md new file mode 100644 index 00000000..f9d1c384 --- /dev/null +++ b/docs/models/components/createticketingpriority.md @@ -0,0 +1,20 @@ +# CreateTicketingPriority + +Create a single ticketing priority + +## Example Usage + +```typescript +import { CreateTicketingPriority } from "firehydrant/models/components"; + +let value: CreateTicketingPriority = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `position` | *number* | :heavy_minus_sign: | The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, that priority and all priorities following it will automatically be moved down the list to make room for the new priority. | \ No newline at end of file diff --git a/docs/models/components/createwebhook.md b/docs/models/components/createwebhook.md new file mode 100644 index 00000000..4e6fd278 --- /dev/null +++ b/docs/models/components/createwebhook.md @@ -0,0 +1,19 @@ +# CreateWebhook + +Create a new webhook + +## Example Usage + +```typescript +import { CreateWebhook } from "firehydrant/models/components"; + +let value: CreateWebhook = { + url: "https://yearly-strategy.com/", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/currentuserentity.md b/docs/models/components/currentuserentity.md index e6e90869..b87a3ad7 100644 --- a/docs/models/components/currentuserentity.md +++ b/docs/models/components/currentuserentity.md @@ -5,7 +5,7 @@ CurrentUserEntity model ## Example Usage ```typescript -import { CurrentUserEntity } from "firehydrant-typescript-sdk/models/components"; +import { CurrentUserEntity } from "firehydrant/models/components"; let value: CurrentUserEntity = {}; ``` diff --git a/docs/models/components/customfield.md b/docs/models/components/customfield.md new file mode 100644 index 00000000..4179e8bb --- /dev/null +++ b/docs/models/components/customfield.md @@ -0,0 +1,19 @@ +# CustomField + +## Example Usage + +```typescript +import { CustomField } from "firehydrant/models/components"; + +let value: CustomField = { + fieldId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `fieldId` | *string* | :heavy_check_mark: | The ID of the custom field you wish to set. | +| `valueString` | *string* | :heavy_minus_sign: | The value you wish to set on the custom field if the type of the field accepts string values | +| `valueArray` | *string*[] | :heavy_minus_sign: | The value you wish to set on the custom field if the type of the field accepts array values | \ No newline at end of file diff --git a/docs/models/components/customfields.md b/docs/models/components/customfields.md deleted file mode 100644 index 9a579116..00000000 --- a/docs/models/components/customfields.md +++ /dev/null @@ -1,19 +0,0 @@ -# CustomFields - -## Example Usage - -```typescript -import { CustomFields } from "firehydrant-typescript-sdk/models/components"; - -let value: CustomFields = { - fieldId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `fieldId` | *string* | :heavy_check_mark: | The ID of the custom field you wish to set. | -| `valueString` | *string* | :heavy_minus_sign: | The value you wish to set on the custom field if the type of the field accepts string values | -| `valueArray` | *string*[] | :heavy_minus_sign: | The value you wish to set on the custom field if the type of the field accepts array values | \ No newline at end of file diff --git a/docs/models/components/customfieldsfieldvalue.md b/docs/models/components/customfieldsfieldvalue.md index 94b17597..13f100b2 100644 --- a/docs/models/components/customfieldsfieldvalue.md +++ b/docs/models/components/customfieldsfieldvalue.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { CustomFieldsFieldValue } from "firehydrant-typescript-sdk/models/components"; +import { CustomFieldsFieldValue } from "firehydrant/models/components"; let value: CustomFieldsFieldValue = {}; ``` @@ -18,6 +18,6 @@ let value: CustomFieldsFieldValue = {}; | `description` | *string* | :heavy_minus_sign: | N/A | | `slug` | *string* | :heavy_minus_sign: | N/A | | `fieldId` | *string* | :heavy_minus_sign: | N/A | -| `valueArray` | *string* | :heavy_minus_sign: | N/A | +| `valueArray` | *string*[] | :heavy_minus_sign: | N/A | | `valueString` | *string* | :heavy_minus_sign: | N/A | | `value` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/data.md b/docs/models/components/data.md deleted file mode 100644 index 3acff180..00000000 --- a/docs/models/components/data.md +++ /dev/null @@ -1,16 +0,0 @@ -# Data - -The event's payload - -## Example Usage - -```typescript -import { Data } from "firehydrant-typescript-sdk/models/components"; - -let value: Data = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/debugsignalsexpression.md b/docs/models/components/debugsignalsexpression.md new file mode 100644 index 00000000..1e440f9c --- /dev/null +++ b/docs/models/components/debugsignalsexpression.md @@ -0,0 +1,23 @@ +# DebugSignalsExpression + +Debug Signals expressions + +## Example Usage + +```typescript +import { DebugSignalsExpression } from "firehydrant/models/components"; + +let value: DebugSignalsExpression = { + expression: "", + signals: [ + {}, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `expression` | *string* | :heavy_check_mark: | CEL expression | +| `signals` | [components.Signal](../../models/components/signal.md)[] | :heavy_check_mark: | List of signals to evaluate rule expression against | \ No newline at end of file diff --git a/docs/models/components/debugsignalsexpressionlink.md b/docs/models/components/debugsignalsexpressionlink.md new file mode 100644 index 00000000..03e858e8 --- /dev/null +++ b/docs/models/components/debugsignalsexpressionlink.md @@ -0,0 +1,16 @@ +# DebugSignalsExpressionLink + +## Example Usage + +```typescript +import { DebugSignalsExpressionLink } from "firehydrant/models/components"; + +let value: DebugSignalsExpressionLink = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `href` | *string* | :heavy_minus_sign: | N/A | +| `text` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/defaultlogic.md b/docs/models/components/defaultlogic.md deleted file mode 100644 index 08b8ff1a..00000000 --- a/docs/models/components/defaultlogic.md +++ /dev/null @@ -1,14 +0,0 @@ -# DefaultLogic - -## Example Usage - -```typescript -import { DefaultLogic } from "firehydrant-typescript-sdk/models/components"; - -let value: DefaultLogic = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/defaultruledata.md b/docs/models/components/defaultruledata.md deleted file mode 100644 index dcf8a7a2..00000000 --- a/docs/models/components/defaultruledata.md +++ /dev/null @@ -1,14 +0,0 @@ -# DefaultRuleData - -## Example Usage - -```typescript -import { DefaultRuleData } from "firehydrant-typescript-sdk/models/components"; - -let value: DefaultRuleData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/details.md b/docs/models/components/details.md deleted file mode 100644 index 4e8aaa66..00000000 --- a/docs/models/components/details.md +++ /dev/null @@ -1,16 +0,0 @@ -# Details - -Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. - -## Example Usage - -```typescript -import { Details } from "firehydrant-typescript-sdk/models/components"; - -let value: Details = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/direction.md b/docs/models/components/direction.md index 5c2152a3..66c412ed 100644 --- a/docs/models/components/direction.md +++ b/docs/models/components/direction.md @@ -5,7 +5,7 @@ The direction you would like to vote, or if you dig it ## Example Usage ```typescript -import { Direction } from "firehydrant-typescript-sdk/models/components"; +import { Direction } from "firehydrant/models/components"; let value: Direction = "dig"; ``` diff --git a/docs/models/components/displayinformation.md b/docs/models/components/displayinformation.md index a237fe2a..7adfcd73 100644 --- a/docs/models/components/displayinformation.md +++ b/docs/models/components/displayinformation.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DisplayInformation } from "firehydrant-typescript-sdk/models/components"; +import { DisplayInformation } from "firehydrant/models/components"; let value: DisplayInformation = {}; ``` diff --git a/docs/models/components/emails.md b/docs/models/components/emails.md deleted file mode 100644 index fc15ee3a..00000000 --- a/docs/models/components/emails.md +++ /dev/null @@ -1,19 +0,0 @@ -# Emails - -## Example Usage - -```typescript -import { Emails } from "firehydrant-typescript-sdk/models/components"; - -let value: Emails = { - value: "", - primary: false, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `value` | *string* | :heavy_check_mark: | String that represents an email address for the User | -| `primary` | *boolean* | :heavy_check_mark: | Boolean which signifies if an email is intended as the primary email for the User | \ No newline at end of file diff --git a/docs/models/components/encoding.md b/docs/models/components/encoding.md index d169af65..d231d51a 100644 --- a/docs/models/components/encoding.md +++ b/docs/models/components/encoding.md @@ -5,7 +5,7 @@ Encoding for submitted data ## Example Usage ```typescript -import { Encoding } from "firehydrant-typescript-sdk/models/components"; +import { Encoding } from "firehydrant/models/components"; let value: Encoding = "application/x-yaml"; ``` diff --git a/docs/models/components/endday.md b/docs/models/components/endday.md deleted file mode 100644 index 493fe156..00000000 --- a/docs/models/components/endday.md +++ /dev/null @@ -1,17 +0,0 @@ -# EndDay - -The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - -## Example Usage - -```typescript -import { EndDay } from "firehydrant-typescript-sdk/models/components"; - -let value: EndDay = "tuesday"; -``` - -## Values - -```typescript -"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" -``` \ No newline at end of file diff --git a/docs/models/components/entitlemententity.md b/docs/models/components/entitlemententity.md index 105391b7..9e8b4299 100644 --- a/docs/models/components/entitlemententity.md +++ b/docs/models/components/entitlemententity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { EntitlementEntity } from "firehydrant-typescript-sdk/models/components"; +import { EntitlementEntity } from "firehydrant/models/components"; let value: EntitlementEntity = {}; ``` diff --git a/docs/models/components/entitlemententitypaginated.md b/docs/models/components/entitlemententitypaginated.md index a3928cb5..2e552486 100644 --- a/docs/models/components/entitlemententitypaginated.md +++ b/docs/models/components/entitlemententitypaginated.md @@ -5,14 +5,14 @@ EntitlementEntityPaginated model ## Example Usage ```typescript -import { EntitlementEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { EntitlementEntityPaginated } from "firehydrant/models/components"; let value: EntitlementEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `data` | [components.EntitlementEntity](../../models/components/entitlemententity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.EntitlementEntity](../../models/components/entitlemententity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/environment.md b/docs/models/components/environment.md new file mode 100644 index 00000000..d4135c5a --- /dev/null +++ b/docs/models/components/environment.md @@ -0,0 +1,15 @@ +# Environment + +## Example Usage + +```typescript +import { Environment } from "firehydrant/models/components"; + +let value: Environment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/environmententryentity.md b/docs/models/components/environmententryentity.md index f3c65265..bb800a99 100644 --- a/docs/models/components/environmententryentity.md +++ b/docs/models/components/environmententryentity.md @@ -5,7 +5,7 @@ EnvironmentEntryEntity model ## Example Usage ```typescript -import { EnvironmentEntryEntity } from "firehydrant-typescript-sdk/models/components"; +import { EnvironmentEntryEntity } from "firehydrant/models/components"; let value: EnvironmentEntryEntity = {}; ``` @@ -20,5 +20,5 @@ let value: EnvironmentEntryEntity = {}; | `description` | *string* | :heavy_minus_sign: | Description of the Environment | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the environment was updated | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the environment was created | -| `activeIncidents` | *string* | :heavy_minus_sign: | List of active incident guids | +| `activeIncidents` | *string*[] | :heavy_minus_sign: | List of active incident guids | | `externalResources` | [components.ExternalResourceEntity](../../models/components/externalresourceentity.md)[] | :heavy_minus_sign: | Information about known linkages to representations of services outside of FireHydrant. | \ No newline at end of file diff --git a/docs/models/components/environmententryentitypaginated.md b/docs/models/components/environmententryentitypaginated.md index cbcd6dba..a244b8d6 100644 --- a/docs/models/components/environmententryentitypaginated.md +++ b/docs/models/components/environmententryentitypaginated.md @@ -5,14 +5,14 @@ EnvironmentEntryEntityPaginated model ## Example Usage ```typescript -import { EnvironmentEntryEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { EnvironmentEntryEntityPaginated } from "firehydrant/models/components"; let value: EnvironmentEntryEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `data` | [components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/environments.md b/docs/models/components/environments.md deleted file mode 100644 index 41ad8cfd..00000000 --- a/docs/models/components/environments.md +++ /dev/null @@ -1,15 +0,0 @@ -# Environments - -## Example Usage - -```typescript -import { Environments } from "firehydrant-typescript-sdk/models/components"; - -let value: Environments = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/eventgenericchatmessageentity.md b/docs/models/components/eventgenericchatmessageentity.md index 64522b88..d062f613 100644 --- a/docs/models/components/eventgenericchatmessageentity.md +++ b/docs/models/components/eventgenericchatmessageentity.md @@ -5,7 +5,7 @@ Event_GenericChatMessageEntity model ## Example Usage ```typescript -import { EventGenericChatMessageEntity } from "firehydrant-typescript-sdk/models/components"; +import { EventGenericChatMessageEntity } from "firehydrant/models/components"; let value: EventGenericChatMessageEntity = {}; ``` diff --git a/docs/models/components/eventnoteentity.md b/docs/models/components/eventnoteentity.md index 978e746e..59c80a54 100644 --- a/docs/models/components/eventnoteentity.md +++ b/docs/models/components/eventnoteentity.md @@ -5,7 +5,7 @@ Event_NoteEntity model ## Example Usage ```typescript -import { EventNoteEntity } from "firehydrant-typescript-sdk/models/components"; +import { EventNoteEntity } from "firehydrant/models/components"; let value: EventNoteEntity = {}; ``` diff --git a/docs/models/components/examplepayload.md b/docs/models/components/examplepayload.md new file mode 100644 index 00000000..48893213 --- /dev/null +++ b/docs/models/components/examplepayload.md @@ -0,0 +1,14 @@ +# ExamplePayload + +## Example Usage + +```typescript +import { ExamplePayload } from "firehydrant/models/components"; + +let value: ExamplePayload = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/externalresourceentity.md b/docs/models/components/externalresourceentity.md index b6b56060..3677022e 100644 --- a/docs/models/components/externalresourceentity.md +++ b/docs/models/components/externalresourceentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ExternalResourceEntity } from "firehydrant-typescript-sdk/models/components"; +import { ExternalResourceEntity } from "firehydrant/models/components"; let value: ExternalResourceEntity = {}; ``` @@ -14,6 +14,7 @@ let value: ExternalResourceEntity = {}; | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | | `connectionType` | *string* | :heavy_minus_sign: | N/A | | `connectionName` | *string* | :heavy_minus_sign: | N/A | +| `connectionFullFaviconUrl` | *string* | :heavy_minus_sign: | N/A | | `connectionId` | *string* | :heavy_minus_sign: | N/A | | `remoteId` | *string* | :heavy_minus_sign: | N/A | | `remoteUrl` | *string* | :heavy_minus_sign: | N/A | diff --git a/docs/models/components/externalresources.md b/docs/models/components/externalresources.md deleted file mode 100644 index f3c12cd6..00000000 --- a/docs/models/components/externalresources.md +++ /dev/null @@ -1,18 +0,0 @@ -# ExternalResources - -## Example Usage - -```typescript -import { ExternalResources } from "firehydrant-typescript-sdk/models/components"; - -let value: ExternalResources = { - remoteId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `remoteId` | *string* | :heavy_check_mark: | N/A | -| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. | \ No newline at end of file diff --git a/docs/models/components/fhtypesgenericentity.md b/docs/models/components/fhtypesgenericentity.md deleted file mode 100644 index 036af501..00000000 --- a/docs/models/components/fhtypesgenericentity.md +++ /dev/null @@ -1,17 +0,0 @@ -# FHTypesGenericEntity - -## Example Usage - -```typescript -import { FHTypesGenericEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: FHTypesGenericEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `value` | *string* | :heavy_minus_sign: | N/A | -| `label` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/fieldmappingfieldmapentity.md b/docs/models/components/fieldmappingfieldmapentity.md index c01af738..d207a651 100644 --- a/docs/models/components/fieldmappingfieldmapentity.md +++ b/docs/models/components/fieldmappingfieldmapentity.md @@ -5,7 +5,7 @@ FieldMapping_FieldMapEntity model ## Example Usage ```typescript -import { FieldMappingFieldMapEntity } from "firehydrant-typescript-sdk/models/components"; +import { FieldMappingFieldMapEntity } from "firehydrant/models/components"; let value: FieldMappingFieldMapEntity = {}; ``` diff --git a/docs/models/components/fieldmappingmappablefieldentity.md b/docs/models/components/fieldmappingmappablefieldentity.md index df415cb8..8e84727f 100644 --- a/docs/models/components/fieldmappingmappablefieldentity.md +++ b/docs/models/components/fieldmappingmappablefieldentity.md @@ -5,7 +5,7 @@ FieldMapping_MappableFieldEntity model ## Example Usage ```typescript -import { FieldMappingMappableFieldEntity } from "firehydrant-typescript-sdk/models/components"; +import { FieldMappingMappableFieldEntity } from "firehydrant/models/components"; let value: FieldMappingMappableFieldEntity = {}; ``` @@ -17,6 +17,6 @@ let value: FieldMappingMappableFieldEntity = {}; | `value` | *string* | :heavy_minus_sign: | The ID of the field | | `label` | *string* | :heavy_minus_sign: | The human-readable name of the field | | `type` | *string* | :heavy_minus_sign: | The allowed type of the field | -| `allowedValues` | *string* | :heavy_minus_sign: | The allowed values of the field | +| `allowedValues` | *string*[] | :heavy_minus_sign: | The allowed values of the field | | `required` | *string* | :heavy_minus_sign: | If the field is required to be mapped | | `helpText` | *string* | :heavy_minus_sign: | Short, inline documentation for the present field | \ No newline at end of file diff --git a/docs/models/components/filtervalues.md b/docs/models/components/filtervalues.md index ba5d16f8..0675737f 100644 --- a/docs/models/components/filtervalues.md +++ b/docs/models/components/filtervalues.md @@ -5,7 +5,7 @@ An unstructured key/value pair of saved values for searching ## Example Usage ```typescript -import { FilterValues } from "firehydrant-typescript-sdk/models/components"; +import { FilterValues } from "firehydrant/models/components"; let value: FilterValues = {}; ``` diff --git a/docs/models/components/formconfigurationentity.md b/docs/models/components/formconfigurationentity.md new file mode 100644 index 00000000..bee828c3 --- /dev/null +++ b/docs/models/components/formconfigurationentity.md @@ -0,0 +1,18 @@ +# FormConfigurationEntity + +FormConfigurationEntity model + +## Example Usage + +```typescript +import { FormConfigurationEntity } from "firehydrant/models/components"; + +let value: FormConfigurationEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `fields` | *string* | :heavy_minus_sign: | N/A | +| `showIncidentTypes` | *boolean* | :heavy_minus_sign: | Whether to show incident types on the declaration form | \ No newline at end of file diff --git a/docs/models/components/functionalities.md b/docs/models/components/functionalities.md deleted file mode 100644 index ee936d76..00000000 --- a/docs/models/components/functionalities.md +++ /dev/null @@ -1,16 +0,0 @@ -# Functionalities - -## Example Usage - -```typescript -import { Functionalities } from "firehydrant-typescript-sdk/models/components"; - -let value: Functionalities = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `summary` | *string* | :heavy_minus_sign: | If you are trying to create a new functionality and attach it to this service, set the summary key | -| `id` | *string* | :heavy_minus_sign: | If you are trying to reuse a functionality, you may set the ID to attach it to the service | \ No newline at end of file diff --git a/docs/models/components/functionalityentity.md b/docs/models/components/functionalityentity.md index abc119c4..98931440 100644 --- a/docs/models/components/functionalityentity.md +++ b/docs/models/components/functionalityentity.md @@ -5,7 +5,7 @@ FunctionalityEntity model ## Example Usage ```typescript -import { FunctionalityEntity } from "firehydrant-typescript-sdk/models/components"; +import { FunctionalityEntity } from "firehydrant/models/components"; let value: FunctionalityEntity = {}; ``` @@ -23,10 +23,10 @@ let value: FunctionalityEntity = {}; | `labels` | [components.FunctionalityEntityLabels](../../models/components/functionalityentitylabels.md) | :heavy_minus_sign: | An object of label key and values | | `activeIncidents` | *string*[] | :heavy_minus_sign: | List of active incident guids | | `links` | [components.LinksEntity](../../models/components/linksentity.md)[] | :heavy_minus_sign: | List of links attached to this functionality. | -| `owner` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | | `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | | `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | -| `updatedBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | `services` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | Services this functionality provides | | `externalResources` | [components.ExternalResourceEntity](../../models/components/externalresourceentity.md)[] | :heavy_minus_sign: | Information about known linkages to representations of services outside of FireHydrant. | | `teams` | [components.TeamEntityLite](../../models/components/teamentitylite.md)[] | :heavy_minus_sign: | List of teams attached to the functionality | \ No newline at end of file diff --git a/docs/models/components/functionalityentitylabels.md b/docs/models/components/functionalityentitylabels.md index 781cec36..c05ae0df 100644 --- a/docs/models/components/functionalityentitylabels.md +++ b/docs/models/components/functionalityentitylabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { FunctionalityEntityLabels } from "firehydrant-typescript-sdk/models/components"; +import { FunctionalityEntityLabels } from "firehydrant/models/components"; let value: FunctionalityEntityLabels = {}; ``` diff --git a/docs/models/components/functionalityentitylite.md b/docs/models/components/functionalityentitylite.md index 0f084316..d825bca2 100644 --- a/docs/models/components/functionalityentitylite.md +++ b/docs/models/components/functionalityentitylite.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { FunctionalityEntityLite } from "firehydrant-typescript-sdk/models/components"; +import { FunctionalityEntityLite } from "firehydrant/models/components"; let value: FunctionalityEntityLite = {}; ``` @@ -21,7 +21,7 @@ let value: FunctionalityEntityLite = {}; | `labels` | [components.FunctionalityEntityLiteLabels](../../models/components/functionalityentitylitelabels.md) | :heavy_minus_sign: | An object of label key and values | | `activeIncidents` | *string*[] | :heavy_minus_sign: | List of active incident guids | | `links` | [components.LinksEntity](../../models/components/linksentity.md)[] | :heavy_minus_sign: | List of links attached to this functionality. | -| `owner` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | | `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | | `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | -| `updatedBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/functionalityentitylitelabels.md b/docs/models/components/functionalityentitylitelabels.md index 8ee047a6..b0eff9e1 100644 --- a/docs/models/components/functionalityentitylitelabels.md +++ b/docs/models/components/functionalityentitylitelabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { FunctionalityEntityLiteLabels } from "firehydrant-typescript-sdk/models/components"; +import { FunctionalityEntityLiteLabels } from "firehydrant/models/components"; let value: FunctionalityEntityLiteLabels = {}; ``` diff --git a/docs/models/components/functionalityentitypaginated.md b/docs/models/components/functionalityentitypaginated.md index 995c4fdb..00d40914 100644 --- a/docs/models/components/functionalityentitypaginated.md +++ b/docs/models/components/functionalityentitypaginated.md @@ -5,14 +5,14 @@ FunctionalityEntityPaginated model ## Example Usage ```typescript -import { FunctionalityEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { FunctionalityEntityPaginated } from "firehydrant/models/components"; let value: FunctionalityEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `data` | [components.FunctionalityEntity](../../models/components/functionalityentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.FunctionalityEntity](../../models/components/functionalityentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/functionalitywithallservicesentity.md b/docs/models/components/functionalitywithallservicesentity.md new file mode 100644 index 00000000..9d1e7a2d --- /dev/null +++ b/docs/models/components/functionalitywithallservicesentity.md @@ -0,0 +1,17 @@ +# FunctionalityWithAllServicesEntity + +FunctionalityWithAllServicesEntity model + +## Example Usage + +```typescript +import { FunctionalityWithAllServicesEntity } from "firehydrant/models/components"; + +let value: FunctionalityWithAllServicesEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `services` | [components.ServiceEntity](../../models/components/serviceentity.md)[] | :heavy_minus_sign: | Services this functionality provides | \ No newline at end of file diff --git a/docs/models/components/handoffday.md b/docs/models/components/handoffday.md deleted file mode 100644 index 3fb3e225..00000000 --- a/docs/models/components/handoffday.md +++ /dev/null @@ -1,17 +0,0 @@ -# HandoffDay - -The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - -## Example Usage - -```typescript -import { HandoffDay } from "firehydrant-typescript-sdk/models/components"; - -let value: HandoffDay = "monday"; -``` - -## Values - -```typescript -"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" -``` \ No newline at end of file diff --git a/docs/models/components/handoffstep.md b/docs/models/components/handoffstep.md deleted file mode 100644 index 5a39284e..00000000 --- a/docs/models/components/handoffstep.md +++ /dev/null @@ -1,21 +0,0 @@ -# HandoffStep - -A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. - -## Example Usage - -```typescript -import { HandoffStep } from "firehydrant-typescript-sdk/models/components"; - -let value: HandoffStep = { - targetType: "EscalationPolicy", - targetId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `targetType` | [components.PostV1TeamsTeamIdEscalationPoliciesTargetType](../../models/components/postv1teamsteamidescalationpoliciestargettype.md) | :heavy_check_mark: | The type of target to which the policy will hand off. | -| `targetId` | *string* | :heavy_check_mark: | The ID of the target to which the policy will hand off. | \ No newline at end of file diff --git a/docs/models/components/image.md b/docs/models/components/image.md new file mode 100644 index 00000000..212ddcf3 --- /dev/null +++ b/docs/models/components/image.md @@ -0,0 +1,16 @@ +# Image + +## Example Usage + +```typescript +import { Image } from "firehydrant/models/components"; + +let value: Image = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `src` | *string* | :heavy_minus_sign: | N/A | +| `alt` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/images.md b/docs/models/components/images.md deleted file mode 100644 index a489799d..00000000 --- a/docs/models/components/images.md +++ /dev/null @@ -1,16 +0,0 @@ -# Images - -## Example Usage - -```typescript -import { Images } from "firehydrant-typescript-sdk/models/components"; - -let value: Images = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `src` | *string* | :heavy_minus_sign: | N/A | -| `alt` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/impact.md b/docs/models/components/impact.md deleted file mode 100644 index 8b9e1b81..00000000 --- a/docs/models/components/impact.md +++ /dev/null @@ -1,19 +0,0 @@ -# Impact - -## Example Usage - -```typescript -import { Impact } from "firehydrant-typescript-sdk/models/components"; - -let value: Impact = { - id: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `conditionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/impacts.md b/docs/models/components/impacts.md deleted file mode 100644 index 026f907f..00000000 --- a/docs/models/components/impacts.md +++ /dev/null @@ -1,21 +0,0 @@ -# Impacts - -## Example Usage - -```typescript -import { Impacts } from "firehydrant-typescript-sdk/models/components"; - -let value: Impacts = { - type: "", - id: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | The type of impacted infrastructure. One of: environment, functionality, or service | -| `id` | *string* | :heavy_check_mark: | The ID of the impacted infrastructure | -| `conditionId` | *string* | :heavy_check_mark: | The ID of the impact condition. Find these at /v1/severity_matrix/conditions | \ No newline at end of file diff --git a/docs/models/components/importsimportableresourceentity.md b/docs/models/components/importsimportableresourceentity.md deleted file mode 100644 index 5f040480..00000000 --- a/docs/models/components/importsimportableresourceentity.md +++ /dev/null @@ -1,18 +0,0 @@ -# ImportsImportableResourceEntity - -## Example Usage - -```typescript -import { ImportsImportableResourceEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: ImportsImportableResourceEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `importErrors` | [components.ImportsImportErrorEntity](../../models/components/importsimporterrorentity.md)[] | :heavy_minus_sign: | N/A | -| `importedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `remoteId` | *string* | :heavy_minus_sign: | N/A | -| `state` | [components.ImportsImportableResourceEntityState](../../models/components/importsimportableresourceentitystate.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/importsimportableresourceentitystate.md b/docs/models/components/importsimportableresourceentitystate.md deleted file mode 100644 index a9a66656..00000000 --- a/docs/models/components/importsimportableresourceentitystate.md +++ /dev/null @@ -1,15 +0,0 @@ -# ImportsImportableResourceEntityState - -## Example Usage - -```typescript -import { ImportsImportableResourceEntityState } from "firehydrant-typescript-sdk/models/components"; - -let value: ImportsImportableResourceEntityState = "skipped"; -``` - -## Values - -```typescript -"selected" | "skipped" | "imported" | "errored" -``` \ No newline at end of file diff --git a/docs/models/components/importsimportentity.md b/docs/models/components/importsimportentity.md index f04c1086..482c1b09 100644 --- a/docs/models/components/importsimportentity.md +++ b/docs/models/components/importsimportentity.md @@ -5,7 +5,7 @@ Imports_ImportEntity model ## Example Usage ```typescript -import { ImportsImportEntity } from "firehydrant-typescript-sdk/models/components"; +import { ImportsImportEntity } from "firehydrant/models/components"; let value: ImportsImportEntity = {}; ``` @@ -14,5 +14,5 @@ let value: ImportsImportEntity = {}; | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `state` | [components.State](../../models/components/state.md) | :heavy_minus_sign: | N/A | +| `state` | [components.ImportsImportEntityState](../../models/components/importsimportentitystate.md) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/importsimportentitystate.md b/docs/models/components/importsimportentitystate.md new file mode 100644 index 00000000..d7d95f0e --- /dev/null +++ b/docs/models/components/importsimportentitystate.md @@ -0,0 +1,15 @@ +# ImportsImportEntityState + +## Example Usage + +```typescript +import { ImportsImportEntityState } from "firehydrant/models/components"; + +let value: ImportsImportEntityState = "ready_for_import"; +``` + +## Values + +```typescript +"preprocessing" | "ready_for_import" | "importing" | "completed" | "failed" +``` \ No newline at end of file diff --git a/docs/models/components/importsimporterrorentity.md b/docs/models/components/importsimporterrorentity.md index fc3370b8..19a5bdd0 100644 --- a/docs/models/components/importsimporterrorentity.md +++ b/docs/models/components/importsimporterrorentity.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { ImportsImportErrorEntity } from "firehydrant-typescript-sdk/models/components"; +import { ImportsImportErrorEntity } from "firehydrant/models/components"; let value: ImportsImportErrorEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `message` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `data` | [components.ImportsImportErrorEntityData](../../models/components/importsimporterrorentitydata.md) | :heavy_minus_sign: | Additional error data | -| `resource` | [components.ImportsImportErrorEntityResourceEntity](../../models/components/importsimporterrorentityresourceentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `data` | [components.ImportsImportErrorEntityData](../../models/components/importsimporterrorentitydata.md) | :heavy_minus_sign: | Additional error data | +| `resource` | [components.NullableImportsImportErrorEntityResourceEntity](../../models/components/nullableimportsimporterrorentityresourceentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/importsimporterrorentitydata.md b/docs/models/components/importsimporterrorentitydata.md index ee4f7d18..09fdb1b7 100644 --- a/docs/models/components/importsimporterrorentitydata.md +++ b/docs/models/components/importsimporterrorentitydata.md @@ -5,7 +5,7 @@ Additional error data ## Example Usage ```typescript -import { ImportsImportErrorEntityData } from "firehydrant-typescript-sdk/models/components"; +import { ImportsImportErrorEntityData } from "firehydrant/models/components"; let value: ImportsImportErrorEntityData = {}; ``` diff --git a/docs/models/components/importsimporterrorentityresourceentity.md b/docs/models/components/importsimporterrorentityresourceentity.md deleted file mode 100644 index d22e5b55..00000000 --- a/docs/models/components/importsimporterrorentityresourceentity.md +++ /dev/null @@ -1,17 +0,0 @@ -# ImportsImportErrorEntityResourceEntity - -## Example Usage - -```typescript -import { ImportsImportErrorEntityResourceEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: ImportsImportErrorEntityResourceEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `resourceId` | *string* | :heavy_minus_sign: | N/A | -| `resourceType` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentattachmententity.md b/docs/models/components/incidentattachmententity.md index 6643232c..ad4810ac 100644 --- a/docs/models/components/incidentattachmententity.md +++ b/docs/models/components/incidentattachmententity.md @@ -5,7 +5,7 @@ IncidentAttachmentEntity model ## Example Usage ```typescript -import { IncidentAttachmentEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentAttachmentEntity } from "firehydrant/models/components"; let value: IncidentAttachmentEntity = {}; ``` diff --git a/docs/models/components/incidentattachmententitystatus.md b/docs/models/components/incidentattachmententitystatus.md index c1ba7246..a476975a 100644 --- a/docs/models/components/incidentattachmententitystatus.md +++ b/docs/models/components/incidentattachmententitystatus.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentAttachmentEntityStatus } from "firehydrant-typescript-sdk/models/components"; +import { IncidentAttachmentEntityStatus } from "firehydrant/models/components"; let value: IncidentAttachmentEntityStatus = "uploaded"; ``` diff --git a/docs/models/components/incidententity.md b/docs/models/components/incidententity.md index 7f5a72c0..e097be96 100644 --- a/docs/models/components/incidententity.md +++ b/docs/models/components/incidententity.md @@ -5,7 +5,7 @@ IncidentEntity model ## Example Usage ```typescript -import { IncidentEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentEntity } from "firehydrant/models/components"; let value: IncidentEntity = {}; ``` @@ -30,8 +30,8 @@ let value: IncidentEntity = {}; | `severityImpact` | *string* | :heavy_minus_sign: | N/A | | `severityCondition` | *string* | :heavy_minus_sign: | N/A | | `tagList` | *string*[] | :heavy_minus_sign: | N/A | -| `severityImpactObject` | [components.SeverityMatrixImpactEntity](../../models/components/severitymatriximpactentity.md) | :heavy_minus_sign: | SeverityMatrix_ImpactEntity model | -| `severityConditionObject` | [components.SeverityMatrixConditionEntity](../../models/components/severitymatrixconditionentity.md) | :heavy_minus_sign: | SeverityMatrix_ConditionEntity model | +| `severityImpactObject` | [components.NullableSeverityMatrixImpactEntity](../../models/components/nullableseveritymatriximpactentity.md) | :heavy_minus_sign: | N/A | +| `severityConditionObject` | [components.NullableSeverityMatrixConditionEntity](../../models/components/nullableseveritymatrixconditionentity.md) | :heavy_minus_sign: | N/A | | `privateId` | *string* | :heavy_minus_sign: | N/A | | `organizationId` | *string* | :heavy_minus_sign: | N/A | | `milestones` | [components.IncidentsMilestoneEntity](../../models/components/incidentsmilestoneentity.md)[] | :heavy_minus_sign: | DEPRECATED: Please use lifecycle phases instead | @@ -43,12 +43,12 @@ let value: IncidentEntity = {}; | `statusPages` | [components.IncidentsStatusPageEntity](../../models/components/incidentsstatuspageentity.md)[] | :heavy_minus_sign: | N/A | | `incidentUrl` | *string* | :heavy_minus_sign: | N/A | | `privateStatusPageUrl` | *string* | :heavy_minus_sign: | N/A | -| `organization` | [components.OrganizationEntity](../../models/components/organizationentity.md) | :heavy_minus_sign: | N/A | +| `organization` | [components.NullableOrganizationEntity](../../models/components/nullableorganizationentity.md) | :heavy_minus_sign: | N/A | | `customersImpacted` | *number* | :heavy_minus_sign: | N/A | | `monetaryImpact` | *number* | :heavy_minus_sign: | N/A | | `monetaryImpactCents` | *number* | :heavy_minus_sign: | N/A | | `lastUpdate` | *string* | :heavy_minus_sign: | N/A | -| `lastNote` | [components.EventNoteEntity](../../models/components/eventnoteentity.md) | :heavy_minus_sign: | Event_NoteEntity model | +| `lastNote` | [components.NullableEventNoteEntity](../../models/components/nullableeventnoteentity.md) | :heavy_minus_sign: | N/A | | `reportId` | *string* | :heavy_minus_sign: | N/A | | `aiIncidentSummary` | *string* | :heavy_minus_sign: | N/A | | `services` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | @@ -59,13 +59,13 @@ let value: IncidentEntity = {}; | `channelId` | *string* | :heavy_minus_sign: | N/A | | `channelStatus` | *string* | :heavy_minus_sign: | inoperative: 0, operational: 1, archived: 2 | | `incidentTickets` | [components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)[] | :heavy_minus_sign: | N/A | -| `ticket` | [components.TicketingTicketEntity](../../models/components/ticketingticketentity.md) | :heavy_minus_sign: | Ticketing_TicketEntity model | +| `ticket` | [components.NullableTicketingTicketEntity](../../models/components/nullableticketingticketentity.md) | :heavy_minus_sign: | N/A | | `impacts` | [components.IncidentsImpactEntity](../../models/components/incidentsimpactentity.md)[] | :heavy_minus_sign: | N/A | | `conferenceBridges` | [components.IncidentsConferenceBridgeEntity](../../models/components/incidentsconferencebridgeentity.md)[] | :heavy_minus_sign: | N/A | | `incidentChannels` | [components.IncidentsChannelEntity](../../models/components/incidentschannelentity.md)[] | :heavy_minus_sign: | N/A | -| `retroExports` | [components.RetroExports](../../models/components/retroexports.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `contextObject` | [components.IncidentsContextObjectEntity](../../models/components/incidentscontextobjectentity.md) | :heavy_minus_sign: | N/A | +| `retroExports` | [components.IncidentEntityRetroExport](../../models/components/incidententityretroexport.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `contextObject` | [components.NullableIncidentsContextObjectEntity](../../models/components/nullableincidentscontextobjectentity.md) | :heavy_minus_sign: | N/A | | `teamAssignments` | [components.IncidentsTeamAssignmentEntityLite](../../models/components/incidentsteamassignmententitylite.md)[] | :heavy_minus_sign: | N/A | | `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | | `customFields` | [components.CustomFieldsFieldValue](../../models/components/customfieldsfieldvalue.md)[] | :heavy_minus_sign: | N/A | diff --git a/docs/models/components/incidententityfieldrequiremententity.md b/docs/models/components/incidententityfieldrequiremententity.md index c7f1855b..e5084f09 100644 --- a/docs/models/components/incidententityfieldrequiremententity.md +++ b/docs/models/components/incidententityfieldrequiremententity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentEntityFieldRequirementEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentEntityFieldRequirementEntity } from "firehydrant/models/components"; let value: IncidentEntityFieldRequirementEntity = {}; ``` diff --git a/docs/models/components/incidententitylabels.md b/docs/models/components/incidententitylabels.md index 65a51716..1c71ed4f 100644 --- a/docs/models/components/incidententitylabels.md +++ b/docs/models/components/incidententitylabels.md @@ -5,7 +5,7 @@ A key/value of labels ## Example Usage ```typescript -import { IncidentEntityLabels } from "firehydrant-typescript-sdk/models/components"; +import { IncidentEntityLabels } from "firehydrant/models/components"; let value: IncidentEntityLabels = {}; ``` diff --git a/docs/models/components/incidententitypaginated.md b/docs/models/components/incidententitypaginated.md index 8baae891..9d2b0a09 100644 --- a/docs/models/components/incidententitypaginated.md +++ b/docs/models/components/incidententitypaginated.md @@ -5,14 +5,14 @@ IncidentEntityPaginated model ## Example Usage ```typescript -import { IncidentEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentEntityPaginated } from "firehydrant/models/components"; let value: IncidentEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.IncidentEntity](../../models/components/incidententity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.IncidentEntity](../../models/components/incidententity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidententityretroexport.md b/docs/models/components/incidententityretroexport.md new file mode 100644 index 00000000..6f21c167 --- /dev/null +++ b/docs/models/components/incidententityretroexport.md @@ -0,0 +1,14 @@ +# IncidentEntityRetroExport + +## Example Usage + +```typescript +import { IncidentEntityRetroExport } from "firehydrant/models/components"; + +let value: IncidentEntityRetroExport = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/incidentevententity.md b/docs/models/components/incidentevententity.md index 2602522b..ef4a8a7d 100644 --- a/docs/models/components/incidentevententity.md +++ b/docs/models/components/incidentevententity.md @@ -5,7 +5,7 @@ IncidentEventEntity model ## Example Usage ```typescript -import { IncidentEventEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentEventEntity } from "firehydrant/models/components"; let value: IncidentEventEntity = {}; ``` @@ -20,7 +20,7 @@ let value: IncidentEventEntity = {}; | `context` | *string* | :heavy_minus_sign: | N/A | | `data` | [components.IncidentEventEntityData](../../models/components/incidentevententitydata.md) | :heavy_minus_sign: | Can be one of: NoteEntity, TourStepEntity, RootCauseEntity, ChangeTypeEntity, RoleUpdateEntity, TaskUpdateEntity, AlertLinkedEntity, ChatMessageEntity, AddTaskListEntity, ImpactUpdateEntity, TicketUpdateEntity, GeneralUpdateEntity, ChangelogEntryEntity, IncidentStatusEntity, TeamAssignmentEntity, BulkUpdateEntity | | `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `visibility` | [components.Visibility](../../models/components/visibility.md) | :heavy_minus_sign: | N/A | -| `author` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `votes` | [components.VotesEntity](../../models/components/votesentity.md) | :heavy_minus_sign: | VotesEntity model | +| `visibility` | [components.IncidentEventEntityVisibility](../../models/components/incidentevententityvisibility.md) | :heavy_minus_sign: | N/A | +| `author` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `votes` | [components.NullableVotesEntity](../../models/components/nullablevotesentity.md) | :heavy_minus_sign: | N/A | | `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentevententitydata.md b/docs/models/components/incidentevententitydata.md index 6f0dfde1..f5b616d1 100644 --- a/docs/models/components/incidentevententitydata.md +++ b/docs/models/components/incidentevententitydata.md @@ -5,7 +5,7 @@ Can be one of: NoteEntity, TourStepEntity, RootCauseEntity, ChangeTypeEntity, Ro ## Example Usage ```typescript -import { IncidentEventEntityData } from "firehydrant-typescript-sdk/models/components"; +import { IncidentEventEntityData } from "firehydrant/models/components"; let value: IncidentEventEntityData = {}; ``` diff --git a/docs/models/components/incidentevententitypaginated.md b/docs/models/components/incidentevententitypaginated.md index 851efebe..769dcf41 100644 --- a/docs/models/components/incidentevententitypaginated.md +++ b/docs/models/components/incidentevententitypaginated.md @@ -5,14 +5,14 @@ IncidentEventEntityPaginated model ## Example Usage ```typescript -import { IncidentEventEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentEventEntityPaginated } from "firehydrant/models/components"; let value: IncidentEventEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `data` | [components.IncidentEventEntity](../../models/components/incidentevententity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.IncidentEventEntity](../../models/components/incidentevententity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentevententityvisibility.md b/docs/models/components/incidentevententityvisibility.md new file mode 100644 index 00000000..ad636af8 --- /dev/null +++ b/docs/models/components/incidentevententityvisibility.md @@ -0,0 +1,15 @@ +# IncidentEventEntityVisibility + +## Example Usage + +```typescript +import { IncidentEventEntityVisibility } from "firehydrant/models/components"; + +let value: IncidentEventEntityVisibility = "private_to_org"; +``` + +## Values + +```typescript +"private_to_org" | "open_to_public" | "internal_status_page" +``` \ No newline at end of file diff --git a/docs/models/components/incidentimpactentity.md b/docs/models/components/incidentimpactentity.md index bb9abddc..63297d99 100644 --- a/docs/models/components/incidentimpactentity.md +++ b/docs/models/components/incidentimpactentity.md @@ -5,15 +5,15 @@ IncidentImpactEntity model ## Example Usage ```typescript -import { IncidentImpactEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentImpactEntity } from "firehydrant/models/components"; let value: IncidentImpactEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `infrastructure` | [components.SuccinctEntity](../../models/components/succinctentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `infrastructure` | [components.NullableSuccinctEntity](../../models/components/nullablesuccinctentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentimpactentitypaginated.md b/docs/models/components/incidentimpactentitypaginated.md index 2a8a2a66..b135ed77 100644 --- a/docs/models/components/incidentimpactentitypaginated.md +++ b/docs/models/components/incidentimpactentitypaginated.md @@ -5,14 +5,14 @@ IncidentImpactEntityPaginated model ## Example Usage ```typescript -import { IncidentImpactEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentImpactEntityPaginated } from "firehydrant/models/components"; let value: IncidentImpactEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `data` | [components.IncidentImpactEntity](../../models/components/incidentimpactentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.IncidentImpactEntity](../../models/components/incidentimpactentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentroleentity.md b/docs/models/components/incidentroleentity.md index f34cf717..b7893bcf 100644 --- a/docs/models/components/incidentroleentity.md +++ b/docs/models/components/incidentroleentity.md @@ -5,7 +5,7 @@ IncidentRoleEntity model ## Example Usage ```typescript -import { IncidentRoleEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentRoleEntity } from "firehydrant/models/components"; let value: IncidentRoleEntity = {}; ``` diff --git a/docs/models/components/incidentroleentitypaginated.md b/docs/models/components/incidentroleentitypaginated.md index facd75cd..6071a57a 100644 --- a/docs/models/components/incidentroleentitypaginated.md +++ b/docs/models/components/incidentroleentitypaginated.md @@ -5,14 +5,14 @@ IncidentRoleEntityPaginated model ## Example Usage ```typescript -import { IncidentRoleEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentRoleEntityPaginated } from "firehydrant/models/components"; let value: IncidentRoleEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `data` | [components.IncidentRoleEntity](../../models/components/incidentroleentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.IncidentRoleEntity](../../models/components/incidentroleentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsalertentity.md b/docs/models/components/incidentsalertentity.md index 1344a1e6..dea53f64 100644 --- a/docs/models/components/incidentsalertentity.md +++ b/docs/models/components/incidentsalertentity.md @@ -5,15 +5,35 @@ Incidents_AlertEntity model ## Example Usage ```typescript -import { IncidentsAlertEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsAlertEntity } from "firehydrant/models/components"; -let value: IncidentsAlertEntity = {}; +let value: IncidentsAlertEntity = { + alert: { + signalRule: { + deduplicationExpiry: "PT1H", + }, + parentAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + childAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + }, +}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `alert` | [components.AlertsAlertEntity](../../models/components/alertsalertentity.md) | :heavy_minus_sign: | Alerts_AlertEntity model | -| `primary` | *boolean* | :heavy_minus_sign: | whether or not this is the primary alert for this incident | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `alert` | [components.NullableAlertsAlertEntity](../../models/components/nullablealertsalertentity.md) | :heavy_minus_sign: | N/A | +| `primary` | *boolean* | :heavy_minus_sign: | whether or not this is the primary alert for this incident | \ No newline at end of file diff --git a/docs/models/components/incidentsalertentitypaginated.md b/docs/models/components/incidentsalertentitypaginated.md index 81e91bc4..53e2dc5e 100644 --- a/docs/models/components/incidentsalertentitypaginated.md +++ b/docs/models/components/incidentsalertentitypaginated.md @@ -5,14 +5,38 @@ Incidents_AlertEntityPaginated model ## Example Usage ```typescript -import { IncidentsAlertEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsAlertEntityPaginated } from "firehydrant/models/components"; -let value: IncidentsAlertEntityPaginated = {}; +let value: IncidentsAlertEntityPaginated = { + data: [ + { + alert: { + signalRule: { + deduplicationExpiry: "PT1H", + }, + parentAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + childAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + }, + }, + ], +}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `data` | [components.IncidentsAlertEntity](../../models/components/incidentsalertentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.IncidentsAlertEntity](../../models/components/incidentsalertentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentschannelentity.md b/docs/models/components/incidentschannelentity.md index 1fe61cdd..7a933b9f 100644 --- a/docs/models/components/incidentschannelentity.md +++ b/docs/models/components/incidentschannelentity.md @@ -5,7 +5,7 @@ Incidents_ChannelEntity model ## Example Usage ```typescript -import { IncidentsChannelEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsChannelEntity } from "firehydrant/models/components"; let value: IncidentsChannelEntity = {}; ``` diff --git a/docs/models/components/incidentsconferencebridgeentity.md b/docs/models/components/incidentsconferencebridgeentity.md index 03bf57c7..6d9cca02 100644 --- a/docs/models/components/incidentsconferencebridgeentity.md +++ b/docs/models/components/incidentsconferencebridgeentity.md @@ -1,16 +1,22 @@ # IncidentsConferenceBridgeEntity +Incidents_ConferenceBridgeEntity model + ## Example Usage ```typescript -import { IncidentsConferenceBridgeEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsConferenceBridgeEntity } from "firehydrant/models/components"; let value: IncidentsConferenceBridgeEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `attachments` | [components.IncidentsConferenceBridgeEntityAttachments](../../models/components/incidentsconferencebridgeentityattachments.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `attachments` | [components.IncidentsConferenceBridgeEntityAttachment](../../models/components/incidentsconferencebridgeentityattachment.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `hasTranslatedTranscripts` | *boolean* | :heavy_minus_sign: | N/A | +| `languageCodes` | *string*[] | :heavy_minus_sign: | A list of language codes that have translated transcripts for this conference bridge | +| `transcriptionStatus` | *string* | :heavy_minus_sign: | N/A | +| `transcriptionSubCode` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsconferencebridgeentityattachment.md b/docs/models/components/incidentsconferencebridgeentityattachment.md new file mode 100644 index 00000000..d0ec478b --- /dev/null +++ b/docs/models/components/incidentsconferencebridgeentityattachment.md @@ -0,0 +1,14 @@ +# IncidentsConferenceBridgeEntityAttachment + +## Example Usage + +```typescript +import { IncidentsConferenceBridgeEntityAttachment } from "firehydrant/models/components"; + +let value: IncidentsConferenceBridgeEntityAttachment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/incidentsconferencebridgeentityattachments.md b/docs/models/components/incidentsconferencebridgeentityattachments.md deleted file mode 100644 index fec1e3ad..00000000 --- a/docs/models/components/incidentsconferencebridgeentityattachments.md +++ /dev/null @@ -1,14 +0,0 @@ -# IncidentsConferenceBridgeEntityAttachments - -## Example Usage - -```typescript -import { IncidentsConferenceBridgeEntityAttachments } from "firehydrant-typescript-sdk/models/components"; - -let value: IncidentsConferenceBridgeEntityAttachments = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/incidentscontextobjectentity.md b/docs/models/components/incidentscontextobjectentity.md deleted file mode 100644 index 3d43c853..00000000 --- a/docs/models/components/incidentscontextobjectentity.md +++ /dev/null @@ -1,18 +0,0 @@ -# IncidentsContextObjectEntity - -## Example Usage - -```typescript -import { IncidentsContextObjectEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: IncidentsContextObjectEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `objectType` | *string* | :heavy_minus_sign: | N/A | -| `objectId` | *string* | :heavy_minus_sign: | N/A | -| `contextTag` | *string* | :heavy_minus_sign: | N/A | -| `contextDescription` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsexportretrospectivesresultentity.md b/docs/models/components/incidentsexportretrospectivesresultentity.md new file mode 100644 index 00000000..1cb69ffa --- /dev/null +++ b/docs/models/components/incidentsexportretrospectivesresultentity.md @@ -0,0 +1,17 @@ +# IncidentsExportRetrospectivesResultEntity + +Incidents_ExportRetrospectivesResultEntity model + +## Example Usage + +```typescript +import { IncidentsExportRetrospectivesResultEntity } from "firehydrant/models/components"; + +let value: IncidentsExportRetrospectivesResultEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `externalResource` | [components.NullableExternalResourceEntity](../../models/components/nullableexternalresourceentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsimpactentity.md b/docs/models/components/incidentsimpactentity.md index b6351d42..54ccbfe4 100644 --- a/docs/models/components/incidentsimpactentity.md +++ b/docs/models/components/incidentsimpactentity.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { IncidentsImpactEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsImpactEntity } from "firehydrant/models/components"; let value: IncidentsImpactEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | [components.IncidentsImpactEntityType](../../models/components/incidentsimpactentitytype.md) | :heavy_minus_sign: | N/A | -| `impact` | [components.SuccinctEntity](../../models/components/succinctentity.md) | :heavy_minus_sign: | N/A | -| `condition` | [components.SeverityMatrixConditionEntity](../../models/components/severitymatrixconditionentity.md) | :heavy_minus_sign: | SeverityMatrix_ConditionEntity model | -| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.IncidentsImpactEntityType](../../models/components/incidentsimpactentitytype.md) | :heavy_minus_sign: | N/A | +| `impact` | [components.NullableSuccinctEntity](../../models/components/nullablesuccinctentity.md) | :heavy_minus_sign: | N/A | +| `condition` | [components.NullableSeverityMatrixConditionEntity](../../models/components/nullableseveritymatrixconditionentity.md) | :heavy_minus_sign: | N/A | +| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsimpactentitytype.md b/docs/models/components/incidentsimpactentitytype.md index becc7b5f..70ab6136 100644 --- a/docs/models/components/incidentsimpactentitytype.md +++ b/docs/models/components/incidentsimpactentitytype.md @@ -3,13 +3,13 @@ ## Example Usage ```typescript -import { IncidentsImpactEntityType } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsImpactEntityType } from "firehydrant/models/components"; -let value: IncidentsImpactEntityType = "functionality"; +let value: IncidentsImpactEntityType = "service"; ``` ## Values ```typescript -"environment" | "functionality" | "service" +"customer" | "environment" | "functionality" | "service" ``` \ No newline at end of file diff --git a/docs/models/components/incidentslifecyclemeasuremententity.md b/docs/models/components/incidentslifecyclemeasuremententity.md index 321b12bf..4f05470c 100644 --- a/docs/models/components/incidentslifecyclemeasuremententity.md +++ b/docs/models/components/incidentslifecyclemeasuremententity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentsLifecycleMeasurementEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsLifecycleMeasurementEntity } from "firehydrant/models/components"; let value: IncidentsLifecycleMeasurementEntity = {}; ``` diff --git a/docs/models/components/incidentslifecyclemilestoneentity.md b/docs/models/components/incidentslifecyclemilestoneentity.md index 661b37f3..0b677495 100644 --- a/docs/models/components/incidentslifecyclemilestoneentity.md +++ b/docs/models/components/incidentslifecyclemilestoneentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentsLifecycleMilestoneEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsLifecycleMilestoneEntity } from "firehydrant/models/components"; let value: IncidentsLifecycleMilestoneEntity = {}; ``` @@ -19,5 +19,5 @@ let value: IncidentsLifecycleMilestoneEntity = {}; | `position` | *number* | :heavy_minus_sign: | N/A | | `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `duration` | *string* | :heavy_minus_sign: | N/A | -| `updatedBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentslifecyclephaseentity.md b/docs/models/components/incidentslifecyclephaseentity.md index fe1dfedf..075fa4f2 100644 --- a/docs/models/components/incidentslifecyclephaseentity.md +++ b/docs/models/components/incidentslifecyclephaseentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentsLifecyclePhaseEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsLifecyclePhaseEntity } from "firehydrant/models/components"; let value: IncidentsLifecyclePhaseEntity = {}; ``` diff --git a/docs/models/components/incidentsmilestoneentity.md b/docs/models/components/incidentsmilestoneentity.md index c60830b0..c4fb5453 100644 --- a/docs/models/components/incidentsmilestoneentity.md +++ b/docs/models/components/incidentsmilestoneentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentsMilestoneEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsMilestoneEntity } from "firehydrant/models/components"; let value: IncidentsMilestoneEntity = {}; ``` diff --git a/docs/models/components/incidentsmilestoneentitypaginated.md b/docs/models/components/incidentsmilestoneentitypaginated.md index aa116c19..47cf5a68 100644 --- a/docs/models/components/incidentsmilestoneentitypaginated.md +++ b/docs/models/components/incidentsmilestoneentitypaginated.md @@ -5,7 +5,7 @@ Incidents_MilestoneEntityPaginated model ## Example Usage ```typescript -import { IncidentsMilestoneEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsMilestoneEntityPaginated } from "firehydrant/models/components"; let value: IncidentsMilestoneEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: IncidentsMilestoneEntityPaginated = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | `data` | [components.IncidentsMilestoneEntity](../../models/components/incidentsmilestoneentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsrelatedchangeevententity.md b/docs/models/components/incidentsrelatedchangeevententity.md index 3f1cf557..4ab39154 100644 --- a/docs/models/components/incidentsrelatedchangeevententity.md +++ b/docs/models/components/incidentsrelatedchangeevententity.md @@ -5,7 +5,7 @@ Incidents_RelatedChangeEventEntity model ## Example Usage ```typescript -import { IncidentsRelatedChangeEventEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsRelatedChangeEventEntity } from "firehydrant/models/components"; let value: IncidentsRelatedChangeEventEntity = {}; ``` @@ -19,6 +19,6 @@ let value: IncidentsRelatedChangeEventEntity = {}; | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `why` | *string* | :heavy_minus_sign: | The reason why this change event is related to this incident | | `type` | [components.IncidentsRelatedChangeEventEntityType](../../models/components/incidentsrelatedchangeevententitytype.md) | :heavy_minus_sign: | N/A | -| `changeEvent` | [components.ChangeEventEntity](../../models/components/changeevententity.md) | :heavy_minus_sign: | ChangeEventEntity model | +| `changeEvent` | [components.NullableChangeEventEntity](../../models/components/nullablechangeevententity.md) | :heavy_minus_sign: | N/A | | `incidentId` | *string* | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsrelatedchangeevententitypaginated.md b/docs/models/components/incidentsrelatedchangeevententitypaginated.md index d150d9c5..079b0279 100644 --- a/docs/models/components/incidentsrelatedchangeevententitypaginated.md +++ b/docs/models/components/incidentsrelatedchangeevententitypaginated.md @@ -5,7 +5,7 @@ Incidents_RelatedChangeEventEntityPaginated model ## Example Usage ```typescript -import { IncidentsRelatedChangeEventEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsRelatedChangeEventEntityPaginated } from "firehydrant/models/components"; let value: IncidentsRelatedChangeEventEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: IncidentsRelatedChangeEventEntityPaginated = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | `data` | [components.IncidentsRelatedChangeEventEntity](../../models/components/incidentsrelatedchangeevententity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsrelatedchangeevententitytype.md b/docs/models/components/incidentsrelatedchangeevententitytype.md index 715a09be..584f56fe 100644 --- a/docs/models/components/incidentsrelatedchangeevententitytype.md +++ b/docs/models/components/incidentsrelatedchangeevententitytype.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentsRelatedChangeEventEntityType } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsRelatedChangeEventEntityType } from "firehydrant/models/components"; let value: IncidentsRelatedChangeEventEntityType = "caused"; ``` diff --git a/docs/models/components/incidentsrelationshipsentity.md b/docs/models/components/incidentsrelationshipsentity.md index 2c39ae2b..1b3a3bf9 100644 --- a/docs/models/components/incidentsrelationshipsentity.md +++ b/docs/models/components/incidentsrelationshipsentity.md @@ -5,15 +5,15 @@ Incidents_RelationshipsEntity model ## Example Usage ```typescript -import { IncidentsRelationshipsEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsRelationshipsEntity } from "firehydrant/models/components"; let value: IncidentsRelationshipsEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `parent` | [components.PublicApiv1IncidentsSuccinctEntity](../../models/components/publicapiv1incidentssuccinctentity.md) | :heavy_minus_sign: | N/A | -| `children` | [components.PublicApiv1IncidentsSuccinctEntity](../../models/components/publicapiv1incidentssuccinctentity.md)[] | :heavy_minus_sign: | The root incident's child incidents. | -| `siblings` | [components.PublicApiv1IncidentsSuccinctEntity](../../models/components/publicapiv1incidentssuccinctentity.md)[] | :heavy_minus_sign: | A list of incidents that share the root incident's parent. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `parent` | [components.NullablePublicApiv1IncidentsSuccinctEntity](../../models/components/nullablepublicapiv1incidentssuccinctentity.md) | :heavy_minus_sign: | N/A | +| `children` | [components.PublicApiv1IncidentsSuccinctEntity](../../models/components/publicapiv1incidentssuccinctentity.md)[] | :heavy_minus_sign: | The root incident's child incidents. | +| `siblings` | [components.PublicApiv1IncidentsSuccinctEntity](../../models/components/publicapiv1incidentssuccinctentity.md)[] | :heavy_minus_sign: | A list of incidents that share the root incident's parent. | \ No newline at end of file diff --git a/docs/models/components/incidentsretrospectiveentity.md b/docs/models/components/incidentsretrospectiveentity.md new file mode 100644 index 00000000..cc079d74 --- /dev/null +++ b/docs/models/components/incidentsretrospectiveentity.md @@ -0,0 +1,23 @@ +# IncidentsRetrospectiveEntity + +Incidents_RetrospectiveEntity model + +## Example Usage + +```typescript +import { IncidentsRetrospectiveEntity } from "firehydrant/models/components"; + +let value: IncidentsRetrospectiveEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `sections` | [components.IncidentsRetrospectiveEntitySectionEntity](../../models/components/incidentsretrospectiveentitysectionentity.md)[] | :heavy_minus_sign: | N/A | +| `isHidden` | *boolean* | :heavy_minus_sign: | N/A | +| `fields` | [components.IncidentsRetrospectiveFieldEntity](../../models/components/incidentsretrospectivefieldentity.md)[] | :heavy_minus_sign: | N/A | +| `exports` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsretrospectiveentitypaginated.md b/docs/models/components/incidentsretrospectiveentitypaginated.md new file mode 100644 index 00000000..9afde380 --- /dev/null +++ b/docs/models/components/incidentsretrospectiveentitypaginated.md @@ -0,0 +1,18 @@ +# IncidentsRetrospectiveEntityPaginated + +Incidents_RetrospectiveEntityPaginated model + +## Example Usage + +```typescript +import { IncidentsRetrospectiveEntityPaginated } from "firehydrant/models/components"; + +let value: IncidentsRetrospectiveEntityPaginated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `data` | [components.IncidentsRetrospectiveEntity](../../models/components/incidentsretrospectiveentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsretrospectiveentitysectionentity.md b/docs/models/components/incidentsretrospectiveentitysectionentity.md new file mode 100644 index 00000000..4bd20956 --- /dev/null +++ b/docs/models/components/incidentsretrospectiveentitysectionentity.md @@ -0,0 +1,16 @@ +# IncidentsRetrospectiveEntitySectionEntity + +## Example Usage + +```typescript +import { IncidentsRetrospectiveEntitySectionEntity } from "firehydrant/models/components"; + +let value: IncidentsRetrospectiveEntitySectionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `elements` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsretrospectivefieldentity.md b/docs/models/components/incidentsretrospectivefieldentity.md new file mode 100644 index 00000000..c790da20 --- /dev/null +++ b/docs/models/components/incidentsretrospectivefieldentity.md @@ -0,0 +1,24 @@ +# IncidentsRetrospectiveFieldEntity + +Incidents_RetrospectiveFieldEntity model + +## Example Usage + +```typescript +import { IncidentsRetrospectiveFieldEntity } from "firehydrant/models/components"; + +let value: IncidentsRetrospectiveFieldEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.IncidentsRetrospectiveFieldEntityType](../../models/components/incidentsretrospectivefieldentitytype.md) | :heavy_minus_sign: | N/A | +| `helpText` | *string* | :heavy_minus_sign: | N/A | +| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | +| `isRequired` | *boolean* | :heavy_minus_sign: | N/A | +| `value` | *string* | :heavy_minus_sign: | N/A | +| `schema` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsretrospectivefieldentitytype.md b/docs/models/components/incidentsretrospectivefieldentitytype.md new file mode 100644 index 00000000..a928d8e4 --- /dev/null +++ b/docs/models/components/incidentsretrospectivefieldentitytype.md @@ -0,0 +1,15 @@ +# IncidentsRetrospectiveFieldEntityType + +## Example Usage + +```typescript +import { IncidentsRetrospectiveFieldEntityType } from "firehydrant/models/components"; + +let value: IncidentsRetrospectiveFieldEntityType = "multi_select"; +``` + +## Values + +```typescript +"text" | "single_select" | "multi_select" | "numeric" | "datetime" | "dynamic_input_group" | "markdown" | "markdown_text" +``` \ No newline at end of file diff --git a/docs/models/components/incidentsroleassignmententity.md b/docs/models/components/incidentsroleassignmententity.md index 6d2c69fb..d38b2b9b 100644 --- a/docs/models/components/incidentsroleassignmententity.md +++ b/docs/models/components/incidentsroleassignmententity.md @@ -5,18 +5,18 @@ Incidents_RoleAssignmentEntity model ## Example Usage ```typescript -import { IncidentsRoleAssignmentEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsRoleAssignmentEntity } from "firehydrant/models/components"; let value: IncidentsRoleAssignmentEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `status` | [components.Status](../../models/components/status.md) | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `incidentRole` | [components.IncidentRoleEntity](../../models/components/incidentroleentity.md) | :heavy_minus_sign: | IncidentRoleEntity model | -| `user` | [components.UserEntity](../../models/components/userentity.md) | :heavy_minus_sign: | UserEntity model | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `status` | [components.IncidentsRoleAssignmentEntityStatus](../../models/components/incidentsroleassignmententitystatus.md) | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `incidentRole` | [components.NullableIncidentRoleEntity](../../models/components/nullableincidentroleentity.md) | :heavy_minus_sign: | N/A | +| `user` | [components.NullableUserEntity](../../models/components/nullableuserentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsroleassignmententitypaginated.md b/docs/models/components/incidentsroleassignmententitypaginated.md index 16cd4d91..5c09b5a7 100644 --- a/docs/models/components/incidentsroleassignmententitypaginated.md +++ b/docs/models/components/incidentsroleassignmententitypaginated.md @@ -5,7 +5,7 @@ Incidents_RoleAssignmentEntityPaginated model ## Example Usage ```typescript -import { IncidentsRoleAssignmentEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsRoleAssignmentEntityPaginated } from "firehydrant/models/components"; let value: IncidentsRoleAssignmentEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: IncidentsRoleAssignmentEntityPaginated = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `data` | [components.IncidentsRoleAssignmentEntity](../../models/components/incidentsroleassignmententity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsroleassignmententitystatus.md b/docs/models/components/incidentsroleassignmententitystatus.md new file mode 100644 index 00000000..93d61624 --- /dev/null +++ b/docs/models/components/incidentsroleassignmententitystatus.md @@ -0,0 +1,15 @@ +# IncidentsRoleAssignmentEntityStatus + +## Example Usage + +```typescript +import { IncidentsRoleAssignmentEntityStatus } from "firehydrant/models/components"; + +let value: IncidentsRoleAssignmentEntityStatus = "inactive"; +``` + +## Values + +```typescript +"active" | "inactive" +``` \ No newline at end of file diff --git a/docs/models/components/incidentsshareretrospectivesresultentity.md b/docs/models/components/incidentsshareretrospectivesresultentity.md new file mode 100644 index 00000000..64a5b94c --- /dev/null +++ b/docs/models/components/incidentsshareretrospectivesresultentity.md @@ -0,0 +1,18 @@ +# IncidentsShareRetrospectivesResultEntity + +Incidents_ShareRetrospectivesResultEntity model + +## Example Usage + +```typescript +import { IncidentsShareRetrospectivesResultEntity } from "firehydrant/models/components"; + +let value: IncidentsShareRetrospectivesResultEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `retrospectiveIds` | *string*[] | :heavy_minus_sign: | The IDs of the retrospectives that were shared. | +| `userIds` | *string*[] | :heavy_minus_sign: | The IDs of the users with whom the retrospectives were shared. | \ No newline at end of file diff --git a/docs/models/components/incidentsstatuspageentity.md b/docs/models/components/incidentsstatuspageentity.md index 5f984a3f..43b8f6c2 100644 --- a/docs/models/components/incidentsstatuspageentity.md +++ b/docs/models/components/incidentsstatuspageentity.md @@ -5,18 +5,18 @@ Incidents_StatusPageEntity model ## Example Usage ```typescript -import { IncidentsStatusPageEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsStatusPageEntity } from "firehydrant/models/components"; let value: IncidentsStatusPageEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `url` | *string* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `displayName` | *string* | :heavy_minus_sign: | N/A | -| `integration` | [components.IntegrationEntity](../../models/components/integrationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `url` | *string* | :heavy_minus_sign: | N/A | +| `externalId` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `displayName` | *string* | :heavy_minus_sign: | N/A | +| `integration` | [components.NullableIntegrationEntity](../../models/components/nullableintegrationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsstatuspageentitypaginated.md b/docs/models/components/incidentsstatuspageentitypaginated.md index 7be0dd07..bd3d43e6 100644 --- a/docs/models/components/incidentsstatuspageentitypaginated.md +++ b/docs/models/components/incidentsstatuspageentitypaginated.md @@ -5,7 +5,7 @@ Incidents_StatusPageEntityPaginated model ## Example Usage ```typescript -import { IncidentsStatusPageEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsStatusPageEntityPaginated } from "firehydrant/models/components"; let value: IncidentsStatusPageEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: IncidentsStatusPageEntityPaginated = {}; | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `data` | [components.IncidentsStatusPageEntity](../../models/components/incidentsstatuspageentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidentsteamassignmententitylite.md b/docs/models/components/incidentsteamassignmententitylite.md index 6e42cd65..901dcf10 100644 --- a/docs/models/components/incidentsteamassignmententitylite.md +++ b/docs/models/components/incidentsteamassignmententitylite.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IncidentsTeamAssignmentEntityLite } from "firehydrant-typescript-sdk/models/components"; +import { IncidentsTeamAssignmentEntityLite } from "firehydrant/models/components"; let value: IncidentsTeamAssignmentEntityLite = {}; ``` @@ -16,4 +16,4 @@ let value: IncidentsTeamAssignmentEntityLite = {}; | `status` | *string* | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `team` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `team` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidenttypeentity.md b/docs/models/components/incidenttypeentity.md index 06b33895..9de6f791 100644 --- a/docs/models/components/incidenttypeentity.md +++ b/docs/models/components/incidenttypeentity.md @@ -5,18 +5,18 @@ IncidentTypeEntity model ## Example Usage ```typescript -import { IncidentTypeEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentTypeEntity } from "firehydrant/models/components"; let value: IncidentTypeEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `template` | [components.IncidentTypeEntityTemplateEntity](../../models/components/incidenttypeentitytemplateentity.md) | :heavy_minus_sign: | N/A | -| `templateValues` | [components.IncidentTypeEntityTemplateValuesEntity](../../models/components/incidenttypeentitytemplatevaluesentity.md) | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `template` | [components.NullableIncidentTypeEntityTemplateEntity](../../models/components/nullableincidenttypeentitytemplateentity.md) | :heavy_minus_sign: | N/A | +| `templateValues` | [components.NullableIncidentTypeEntityTemplateValuesEntity](../../models/components/nullableincidenttypeentitytemplatevaluesentity.md) | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidenttypeentitypaginated.md b/docs/models/components/incidenttypeentitypaginated.md index 7e530788..41cb4df0 100644 --- a/docs/models/components/incidenttypeentitypaginated.md +++ b/docs/models/components/incidenttypeentitypaginated.md @@ -5,14 +5,14 @@ IncidentTypeEntityPaginated model ## Example Usage ```typescript -import { IncidentTypeEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IncidentTypeEntityPaginated } from "firehydrant/models/components"; let value: IncidentTypeEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `data` | [components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidenttypeentitytemplateentity.md b/docs/models/components/incidenttypeentitytemplateentity.md deleted file mode 100644 index 97b668f3..00000000 --- a/docs/models/components/incidenttypeentitytemplateentity.md +++ /dev/null @@ -1,27 +0,0 @@ -# IncidentTypeEntityTemplateEntity - -## Example Usage - -```typescript -import { IncidentTypeEntityTemplateEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: IncidentTypeEntityTemplateEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `incidentName` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | -| `labels` | [components.IncidentTypeEntityTemplateEntityLabels](../../models/components/incidenttypeentitytemplateentitylabels.md) | :heavy_minus_sign: | Arbitrary key:value pairs of labels for your incidents. | -| `severity` | *string* | :heavy_minus_sign: | N/A | -| `priority` | *string* | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | N/A | -| `runbookIds` | *string*[] | :heavy_minus_sign: | N/A | -| `teamIds` | *string*[] | :heavy_minus_sign: | N/A | -| `privateIncident` | *boolean* | :heavy_minus_sign: | N/A | -| `customFields` | *string* | :heavy_minus_sign: | N/A | -| `impacts` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidenttypeentitytemplateentitylabels.md b/docs/models/components/incidenttypeentitytemplateentitylabels.md deleted file mode 100644 index 61864d90..00000000 --- a/docs/models/components/incidenttypeentitytemplateentitylabels.md +++ /dev/null @@ -1,16 +0,0 @@ -# IncidentTypeEntityTemplateEntityLabels - -Arbitrary key:value pairs of labels for your incidents. - -## Example Usage - -```typescript -import { IncidentTypeEntityTemplateEntityLabels } from "firehydrant-typescript-sdk/models/components"; - -let value: IncidentTypeEntityTemplateEntityLabels = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/incidenttypeentitytemplateimpactentity.md b/docs/models/components/incidenttypeentitytemplateimpactentity.md index a2d8952b..1aaadbd6 100644 --- a/docs/models/components/incidenttypeentitytemplateimpactentity.md +++ b/docs/models/components/incidenttypeentitytemplateimpactentity.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { IncidentTypeEntityTemplateImpactEntity } from "firehydrant-typescript-sdk/models/components"; +import { IncidentTypeEntityTemplateImpactEntity } from "firehydrant/models/components"; let value: IncidentTypeEntityTemplateImpactEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `conditionId` | *string* | :heavy_minus_sign: | N/A | -| `conditionName` | *string* | :heavy_minus_sign: | N/A | -| `type` | [components.Type](../../models/components/type.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `conditionId` | *string* | :heavy_minus_sign: | N/A | +| `conditionName` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.IncidentTypeEntityTemplateImpactEntityType](../../models/components/incidenttypeentitytemplateimpactentitytype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/incidenttypeentitytemplateimpactentitytype.md b/docs/models/components/incidenttypeentitytemplateimpactentitytype.md new file mode 100644 index 00000000..a88c6505 --- /dev/null +++ b/docs/models/components/incidenttypeentitytemplateimpactentitytype.md @@ -0,0 +1,15 @@ +# IncidentTypeEntityTemplateImpactEntityType + +## Example Usage + +```typescript +import { IncidentTypeEntityTemplateImpactEntityType } from "firehydrant/models/components"; + +let value: IncidentTypeEntityTemplateImpactEntityType = "customer"; +``` + +## Values + +```typescript +"customer" | "environment" | "functionality" | "service" +``` \ No newline at end of file diff --git a/docs/models/components/incidenttypeentitytemplatevaluesentity.md b/docs/models/components/incidenttypeentitytemplatevaluesentity.md deleted file mode 100644 index 39c9c0a2..00000000 --- a/docs/models/components/incidenttypeentitytemplatevaluesentity.md +++ /dev/null @@ -1,19 +0,0 @@ -# IncidentTypeEntityTemplateValuesEntity - -## Example Usage - -```typescript -import { IncidentTypeEntityTemplateValuesEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: IncidentTypeEntityTemplateValuesEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `services` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | -| `functionalities` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | -| `environments` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | -| `runbooks` | [components.Runbooks](../../models/components/runbooks.md) | :heavy_minus_sign: | A hash mapping runbook IDs to runbook names. | -| `teams` | [components.TeamEntity](../../models/components/teamentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/infrastructuresearchentity.md b/docs/models/components/infrastructuresearchentity.md index 70b1337d..4e8ad23a 100644 --- a/docs/models/components/infrastructuresearchentity.md +++ b/docs/models/components/infrastructuresearchentity.md @@ -5,7 +5,7 @@ InfrastructureSearchEntity model ## Example Usage ```typescript -import { InfrastructureSearchEntity } from "firehydrant-typescript-sdk/models/components"; +import { InfrastructureSearchEntity } from "firehydrant/models/components"; let value: InfrastructureSearchEntity = {}; ``` diff --git a/docs/models/components/ingestcatalogdata.md b/docs/models/components/ingestcatalogdata.md new file mode 100644 index 00000000..7873b0e6 --- /dev/null +++ b/docs/models/components/ingestcatalogdata.md @@ -0,0 +1,21 @@ +# IngestCatalogData + +Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. + +## Example Usage + +```typescript +import { IngestCatalogData } from "firehydrant/models/components"; + +let value: IngestCatalogData = { + encoding: "text/yaml", + data: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `encoding` | [components.Encoding](../../models/components/encoding.md) | :heavy_check_mark: | Encoding for submitted data | +| `data` | *string* | :heavy_check_mark: | Service data | \ No newline at end of file diff --git a/docs/models/components/integration.md b/docs/models/components/integration.md index 5976b89b..a43fa32c 100644 --- a/docs/models/components/integration.md +++ b/docs/models/components/integration.md @@ -5,7 +5,7 @@ The name of the service ## Example Usage ```typescript -import { Integration } from "firehydrant-typescript-sdk/models/components"; +import { Integration } from "firehydrant/models/components"; let value: Integration = "opsgenie"; ``` diff --git a/docs/models/components/integrationentity.md b/docs/models/components/integrationentity.md deleted file mode 100644 index b6d15667..00000000 --- a/docs/models/components/integrationentity.md +++ /dev/null @@ -1,19 +0,0 @@ -# IntegrationEntity - -## Example Usage - -```typescript -import { IntegrationEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: IntegrationEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `integrationName` | *string* | :heavy_minus_sign: | N/A | -| `integrationSlug` | *string* | :heavy_minus_sign: | N/A | -| `displayName` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsauthedproviderentitypaginated.md b/docs/models/components/integrationsauthedproviderentitypaginated.md new file mode 100644 index 00000000..6fca6f98 --- /dev/null +++ b/docs/models/components/integrationsauthedproviderentitypaginated.md @@ -0,0 +1,18 @@ +# IntegrationsAuthedProviderEntityPaginated + +Integrations_AuthedProviderEntityPaginated model + +## Example Usage + +```typescript +import { IntegrationsAuthedProviderEntityPaginated } from "firehydrant/models/components"; + +let value: IntegrationsAuthedProviderEntityPaginated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [components.PublicApiv1IntegrationsAuthedProviderEntity](../../models/components/publicapiv1integrationsauthedproviderentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsawscloudtrailbatchentity.md b/docs/models/components/integrationsawscloudtrailbatchentity.md index a4b62e5f..92896110 100644 --- a/docs/models/components/integrationsawscloudtrailbatchentity.md +++ b/docs/models/components/integrationsawscloudtrailbatchentity.md @@ -5,7 +5,7 @@ Integrations_Aws_CloudtrailBatchEntity model ## Example Usage ```typescript -import { IntegrationsAwsCloudtrailBatchEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsAwsCloudtrailBatchEntity } from "firehydrant/models/components"; let value: IntegrationsAwsCloudtrailBatchEntity = {}; ``` @@ -19,5 +19,5 @@ let value: IntegrationsAwsCloudtrailBatchEntity = {}; | `status` | [components.IntegrationsAwsCloudtrailBatchEntityStatus](../../models/components/integrationsawscloudtrailbatchentitystatus.md) | :heavy_minus_sign: | N/A | | `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `connection` | [components.IntegrationsAwsConnectionEntity](../../models/components/integrationsawsconnectionentity.md) | :heavy_minus_sign: | Integrations_Aws_ConnectionEntity model | +| `connection` | [components.NullableIntegrationsAwsConnectionEntity](../../models/components/nullableintegrationsawsconnectionentity.md) | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsawscloudtrailbatchentitypaginated.md b/docs/models/components/integrationsawscloudtrailbatchentitypaginated.md index d2f26a48..be997429 100644 --- a/docs/models/components/integrationsawscloudtrailbatchentitypaginated.md +++ b/docs/models/components/integrationsawscloudtrailbatchentitypaginated.md @@ -5,7 +5,7 @@ Integrations_Aws_CloudtrailBatchEntityPaginated model ## Example Usage ```typescript -import { IntegrationsAwsCloudtrailBatchEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsAwsCloudtrailBatchEntityPaginated } from "firehydrant/models/components"; let value: IntegrationsAwsCloudtrailBatchEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: IntegrationsAwsCloudtrailBatchEntityPaginated = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `data` | [components.IntegrationsAwsCloudtrailBatchEntity](../../models/components/integrationsawscloudtrailbatchentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsawscloudtrailbatchentitystatus.md b/docs/models/components/integrationsawscloudtrailbatchentitystatus.md index 18041ee0..945250dc 100644 --- a/docs/models/components/integrationsawscloudtrailbatchentitystatus.md +++ b/docs/models/components/integrationsawscloudtrailbatchentitystatus.md @@ -3,9 +3,9 @@ ## Example Usage ```typescript -import { IntegrationsAwsCloudtrailBatchEntityStatus } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsAwsCloudtrailBatchEntityStatus } from "firehydrant/models/components"; -let value: IntegrationsAwsCloudtrailBatchEntityStatus = "pending"; +let value: IntegrationsAwsCloudtrailBatchEntityStatus = "failed"; ``` ## Values diff --git a/docs/models/components/integrationsawsconnectionentity.md b/docs/models/components/integrationsawsconnectionentity.md index fb3953cf..3dc140ae 100644 --- a/docs/models/components/integrationsawsconnectionentity.md +++ b/docs/models/components/integrationsawsconnectionentity.md @@ -5,22 +5,22 @@ Integrations_Aws_ConnectionEntity model ## Example Usage ```typescript -import { IntegrationsAwsConnectionEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsAwsConnectionEntity } from "firehydrant/models/components"; let value: IntegrationsAwsConnectionEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `awsAccountId` | *string* | :heavy_minus_sign: | N/A | -| `targetArn` | *string* | :heavy_minus_sign: | N/A | -| `externalId` | *string* | :heavy_minus_sign: | N/A | -| `connectionStatus` | [components.ConnectionStatus](../../models/components/connectionstatus.md) | :heavy_minus_sign: | N/A | -| `statusText` | *string* | :heavy_minus_sign: | N/A | -| `statusDescription` | *string* | :heavy_minus_sign: | N/A | -| `environmentId` | *string* | :heavy_minus_sign: | N/A | -| `environmentName` | *string* | :heavy_minus_sign: | N/A | -| `regions` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `awsAccountId` | *string* | :heavy_minus_sign: | N/A | +| `targetArn` | *string* | :heavy_minus_sign: | N/A | +| `externalId` | *string* | :heavy_minus_sign: | N/A | +| `connectionStatus` | [components.IntegrationsAwsConnectionEntityConnectionStatus](../../models/components/integrationsawsconnectionentityconnectionstatus.md) | :heavy_minus_sign: | N/A | +| `statusText` | *string* | :heavy_minus_sign: | N/A | +| `statusDescription` | *string* | :heavy_minus_sign: | N/A | +| `environmentId` | *string* | :heavy_minus_sign: | N/A | +| `environmentName` | *string* | :heavy_minus_sign: | N/A | +| `regions` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsawsconnectionentityconnectionstatus.md b/docs/models/components/integrationsawsconnectionentityconnectionstatus.md new file mode 100644 index 00000000..1a818ee3 --- /dev/null +++ b/docs/models/components/integrationsawsconnectionentityconnectionstatus.md @@ -0,0 +1,16 @@ +# IntegrationsAwsConnectionEntityConnectionStatus + +## Example Usage + +```typescript +import { IntegrationsAwsConnectionEntityConnectionStatus } from "firehydrant/models/components"; + +let value: IntegrationsAwsConnectionEntityConnectionStatus = + "invalid_permissions"; +``` + +## Values + +```typescript +"pending_setup" | "role_assumed" | "cant_assume_role" | "invalid_permissions" | "validated" +``` \ No newline at end of file diff --git a/docs/models/components/integrationsawsconnectionentitypaginated.md b/docs/models/components/integrationsawsconnectionentitypaginated.md index f2541192..45067e60 100644 --- a/docs/models/components/integrationsawsconnectionentitypaginated.md +++ b/docs/models/components/integrationsawsconnectionentitypaginated.md @@ -5,7 +5,7 @@ Integrations_Aws_ConnectionEntityPaginated model ## Example Usage ```typescript -import { IntegrationsAwsConnectionEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsAwsConnectionEntityPaginated } from "firehydrant/models/components"; let value: IntegrationsAwsConnectionEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: IntegrationsAwsConnectionEntityPaginated = {}; | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | `data` | [components.IntegrationsAwsConnectionEntity](../../models/components/integrationsawsconnectionentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsconfluencecloudspacekeyentity.md b/docs/models/components/integrationsconfluencecloudspacekeyentity.md index 05bcbfa4..fce7b7d6 100644 --- a/docs/models/components/integrationsconfluencecloudspacekeyentity.md +++ b/docs/models/components/integrationsconfluencecloudspacekeyentity.md @@ -5,7 +5,7 @@ Integrations_ConfluenceCloud_SpaceKeyEntity model ## Example Usage ```typescript -import { IntegrationsConfluenceCloudSpaceKeyEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsConfluenceCloudSpaceKeyEntity } from "firehydrant/models/components"; let value: IntegrationsConfluenceCloudSpaceKeyEntity = {}; ``` diff --git a/docs/models/components/integrationsconnectionentity.md b/docs/models/components/integrationsconnectionentity.md index b38d00f9..492b1e36 100644 --- a/docs/models/components/integrationsconnectionentity.md +++ b/docs/models/components/integrationsconnectionentity.md @@ -1,9 +1,11 @@ # IntegrationsConnectionEntity +Integrations_ConnectionEntity model + ## Example Usage ```typescript -import { IntegrationsConnectionEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsConnectionEntity } from "firehydrant/models/components"; let value: IntegrationsConnectionEntity = {}; ``` @@ -21,5 +23,5 @@ let value: IntegrationsConnectionEntity = {}; | `authorizedById` | *string* | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `details` | [components.Details](../../models/components/details.md) | :heavy_minus_sign: | Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. | -| `defaultAuthorizedActor` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `details` | [components.IntegrationsConnectionEntityDetails](../../models/components/integrationsconnectionentitydetails.md) | :heavy_minus_sign: | Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. | +| `defaultAuthorizedActor` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsconnectionentitydetails.md b/docs/models/components/integrationsconnectionentitydetails.md new file mode 100644 index 00000000..90dfcf5e --- /dev/null +++ b/docs/models/components/integrationsconnectionentitydetails.md @@ -0,0 +1,16 @@ +# IntegrationsConnectionEntityDetails + +Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. + +## Example Usage + +```typescript +import { IntegrationsConnectionEntityDetails } from "firehydrant/models/components"; + +let value: IntegrationsConnectionEntityDetails = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/integrationsconnectionentitypaginated.md b/docs/models/components/integrationsconnectionentitypaginated.md new file mode 100644 index 00000000..e415e116 --- /dev/null +++ b/docs/models/components/integrationsconnectionentitypaginated.md @@ -0,0 +1,18 @@ +# IntegrationsConnectionEntityPaginated + +Integrations_ConnectionEntityPaginated model + +## Example Usage + +```typescript +import { IntegrationsConnectionEntityPaginated } from "firehydrant/models/components"; + +let value: IntegrationsConnectionEntityPaginated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `data` | [components.IntegrationsConnectionEntity](../../models/components/integrationsconnectionentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsconnectionstatusentity.md b/docs/models/components/integrationsconnectionstatusentity.md new file mode 100644 index 00000000..1df1b83e --- /dev/null +++ b/docs/models/components/integrationsconnectionstatusentity.md @@ -0,0 +1,25 @@ +# IntegrationsConnectionStatusEntity + +Integrations_ConnectionStatusEntity model + +## Example Usage + +```typescript +import { IntegrationsConnectionStatusEntity } from "firehydrant/models/components"; + +let value: IntegrationsConnectionStatusEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `checkedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `status` | [components.IntegrationsConnectionStatusEntityStatus](../../models/components/integrationsconnectionstatusentitystatus.md) | :heavy_minus_sign: | N/A | +| `message` | *string* | :heavy_minus_sign: | N/A | +| `checkType` | *string* | :heavy_minus_sign: | N/A | +| `errorType` | *string* | :heavy_minus_sign: | N/A | +| `integrationSlug` | *string* | :heavy_minus_sign: | N/A | +| `connectionId` | *string* | :heavy_minus_sign: | N/A | +| `data` | [components.IntegrationsConnectionStatusEntityData](../../models/components/integrationsconnectionstatusentitydata.md) | :heavy_minus_sign: | Additional unstructured data about the status check. | +| `performedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsconnectionstatusentitydata.md b/docs/models/components/integrationsconnectionstatusentitydata.md new file mode 100644 index 00000000..b725f36e --- /dev/null +++ b/docs/models/components/integrationsconnectionstatusentitydata.md @@ -0,0 +1,16 @@ +# IntegrationsConnectionStatusEntityData + +Additional unstructured data about the status check. + +## Example Usage + +```typescript +import { IntegrationsConnectionStatusEntityData } from "firehydrant/models/components"; + +let value: IntegrationsConnectionStatusEntityData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/integrationsconnectionstatusentitystatus.md b/docs/models/components/integrationsconnectionstatusentitystatus.md new file mode 100644 index 00000000..aeb175da --- /dev/null +++ b/docs/models/components/integrationsconnectionstatusentitystatus.md @@ -0,0 +1,15 @@ +# IntegrationsConnectionStatusEntityStatus + +## Example Usage + +```typescript +import { IntegrationsConnectionStatusEntityStatus } from "firehydrant/models/components"; + +let value: IntegrationsConnectionStatusEntityStatus = "error"; +``` + +## Values + +```typescript +"ok" | "info" | "warning" | "error" +``` \ No newline at end of file diff --git a/docs/models/components/integrationsintegrationentity.md b/docs/models/components/integrationsintegrationentity.md index 49cd06ba..8724e3de 100644 --- a/docs/models/components/integrationsintegrationentity.md +++ b/docs/models/components/integrationsintegrationentity.md @@ -5,24 +5,24 @@ Integrations_IntegrationEntity model ## Example Usage ```typescript -import { IntegrationsIntegrationEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsIntegrationEntity } from "firehydrant/models/components"; let value: IntegrationsIntegrationEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `setupUrl` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `connections` | [components.IntegrationsConnectionEntity](../../models/components/integrationsconnectionentity.md) | :heavy_minus_sign: | N/A | -| `enabled` | *boolean* | :heavy_minus_sign: | N/A | -| `installed` | *boolean* | :heavy_minus_sign: | N/A | -| `deprecated` | *boolean* | :heavy_minus_sign: | N/A | -| `logo` | [components.IntegrationsIntegrationEntityLogoEntity](../../models/components/integrationsintegrationentitylogoentity.md) | :heavy_minus_sign: | N/A | -| `natIp` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `setupUrl` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `connections` | [components.NullableIntegrationsConnectionEntity](../../models/components/nullableintegrationsconnectionentity.md) | :heavy_minus_sign: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | N/A | +| `installed` | *boolean* | :heavy_minus_sign: | N/A | +| `deprecated` | *boolean* | :heavy_minus_sign: | N/A | +| `logo` | [components.NullableIntegrationsIntegrationEntityLogoEntity](../../models/components/nullableintegrationsintegrationentitylogoentity.md) | :heavy_minus_sign: | N/A | +| `natIp` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsintegrationentitylogoentity.md b/docs/models/components/integrationsintegrationentitylogoentity.md deleted file mode 100644 index 67e6c244..00000000 --- a/docs/models/components/integrationsintegrationentitylogoentity.md +++ /dev/null @@ -1,15 +0,0 @@ -# IntegrationsIntegrationEntityLogoEntity - -## Example Usage - -```typescript -import { IntegrationsIntegrationEntityLogoEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: IntegrationsIntegrationEntityLogoEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `logoUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsintegrationentitypaginated.md b/docs/models/components/integrationsintegrationentitypaginated.md new file mode 100644 index 00000000..11f65e7c --- /dev/null +++ b/docs/models/components/integrationsintegrationentitypaginated.md @@ -0,0 +1,18 @@ +# IntegrationsIntegrationEntityPaginated + +Integrations_IntegrationEntityPaginated model + +## Example Usage + +```typescript +import { IntegrationsIntegrationEntityPaginated } from "firehydrant/models/components"; + +let value: IntegrationsIntegrationEntityPaginated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `data` | [components.IntegrationsIntegrationEntity](../../models/components/integrationsintegrationentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsmicrosoftteamsv2channelentity.md b/docs/models/components/integrationsmicrosoftteamsv2channelentity.md deleted file mode 100644 index 12a77623..00000000 --- a/docs/models/components/integrationsmicrosoftteamsv2channelentity.md +++ /dev/null @@ -1,22 +0,0 @@ -# IntegrationsMicrosoftTeamsV2ChannelEntity - -## Example Usage - -```typescript -import { IntegrationsMicrosoftTeamsV2ChannelEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: IntegrationsMicrosoftTeamsV2ChannelEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `channelId` | *string* | :heavy_minus_sign: | N/A | -| `channelName` | *string* | :heavy_minus_sign: | N/A | -| `msTeamId` | *string* | :heavy_minus_sign: | N/A | -| `teamName` | *string* | :heavy_minus_sign: | N/A | -| `channelUrl` | *string* | :heavy_minus_sign: | N/A | -| `status` | *string* | :heavy_minus_sign: | N/A | -| `incident` | [components.IncidentEntity](../../models/components/incidententity.md) | :heavy_minus_sign: | IncidentEntity model | \ No newline at end of file diff --git a/docs/models/components/integrationsslackslackchannelentity.md b/docs/models/components/integrationsslackslackchannelentity.md deleted file mode 100644 index 90743860..00000000 --- a/docs/models/components/integrationsslackslackchannelentity.md +++ /dev/null @@ -1,17 +0,0 @@ -# IntegrationsSlackSlackChannelEntity - -## Example Usage - -```typescript -import { IntegrationsSlackSlackChannelEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: IntegrationsSlackSlackChannelEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `slackChannelId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsslackusergroupentity.md b/docs/models/components/integrationsslackusergroupentity.md new file mode 100644 index 00000000..67f70cce --- /dev/null +++ b/docs/models/components/integrationsslackusergroupentity.md @@ -0,0 +1,20 @@ +# IntegrationsSlackUsergroupEntity + +Integrations_Slack_UsergroupEntity model + +## Example Usage + +```typescript +import { IntegrationsSlackUsergroupEntity } from "firehydrant/models/components"; + +let value: IntegrationsSlackUsergroupEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `handle` | *string* | :heavy_minus_sign: | N/A | +| `isDisabled` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsslackworkspaceentity.md b/docs/models/components/integrationsslackworkspaceentity.md new file mode 100644 index 00000000..fea02961 --- /dev/null +++ b/docs/models/components/integrationsslackworkspaceentity.md @@ -0,0 +1,19 @@ +# IntegrationsSlackWorkspaceEntity + +Integrations_Slack_WorkspaceEntity model + +## Example Usage + +```typescript +import { IntegrationsSlackWorkspaceEntity } from "firehydrant/models/components"; + +let value: IntegrationsSlackWorkspaceEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `teamId` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsstatuspageconditionentity.md b/docs/models/components/integrationsstatuspageconditionentity.md index d2107f2e..2499f3df 100644 --- a/docs/models/components/integrationsstatuspageconditionentity.md +++ b/docs/models/components/integrationsstatuspageconditionentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IntegrationsStatuspageConditionEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsStatuspageConditionEntity } from "firehydrant/models/components"; let value: IntegrationsStatuspageConditionEntity = {}; ``` diff --git a/docs/models/components/integrationsstatuspageconnectionentity.md b/docs/models/components/integrationsstatuspageconnectionentity.md index af924e23..8ffe2a47 100644 --- a/docs/models/components/integrationsstatuspageconnectionentity.md +++ b/docs/models/components/integrationsstatuspageconnectionentity.md @@ -5,7 +5,7 @@ Integrations_Statuspage_ConnectionEntity model ## Example Usage ```typescript -import { IntegrationsStatuspageConnectionEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsStatuspageConnectionEntity } from "firehydrant/models/components"; let value: IntegrationsStatuspageConnectionEntity = {}; ``` diff --git a/docs/models/components/integrationsstatuspageconnectionentitypaginated.md b/docs/models/components/integrationsstatuspageconnectionentitypaginated.md index 5ecf1251..5b49b6a7 100644 --- a/docs/models/components/integrationsstatuspageconnectionentitypaginated.md +++ b/docs/models/components/integrationsstatuspageconnectionentitypaginated.md @@ -5,7 +5,7 @@ Integrations_Statuspage_ConnectionEntityPaginated model ## Example Usage ```typescript -import { IntegrationsStatuspageConnectionEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsStatuspageConnectionEntityPaginated } from "firehydrant/models/components"; let value: IntegrationsStatuspageConnectionEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: IntegrationsStatuspageConnectionEntityPaginated = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | `data` | [components.IntegrationsStatuspageConnectionEntity](../../models/components/integrationsstatuspageconnectionentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsstatuspagemilestonemappingentity.md b/docs/models/components/integrationsstatuspagemilestonemappingentity.md index 843dbbcc..9c41d24c 100644 --- a/docs/models/components/integrationsstatuspagemilestonemappingentity.md +++ b/docs/models/components/integrationsstatuspagemilestonemappingentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IntegrationsStatuspageMilestoneMappingEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsStatuspageMilestoneMappingEntity } from "firehydrant/models/components"; let value: IntegrationsStatuspageMilestoneMappingEntity = {}; ``` diff --git a/docs/models/components/integrationsstatuspagepageentity.md b/docs/models/components/integrationsstatuspagepageentity.md new file mode 100644 index 00000000..75a2a739 --- /dev/null +++ b/docs/models/components/integrationsstatuspagepageentity.md @@ -0,0 +1,18 @@ +# IntegrationsStatuspagePageEntity + +Integrations_Statuspage_PageEntity model + +## Example Usage + +```typescript +import { IntegrationsStatuspagePageEntity } from "firehydrant/models/components"; + +let value: IntegrationsStatuspagePageEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationsstatuspageseverityentity.md b/docs/models/components/integrationsstatuspageseverityentity.md index 3bc2879b..559ff741 100644 --- a/docs/models/components/integrationsstatuspageseverityentity.md +++ b/docs/models/components/integrationsstatuspageseverityentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { IntegrationsStatuspageSeverityEntity } from "firehydrant-typescript-sdk/models/components"; +import { IntegrationsStatuspageSeverityEntity } from "firehydrant/models/components"; let value: IntegrationsStatuspageSeverityEntity = {}; ``` diff --git a/docs/models/components/integrationszendesksearchticketspaginatedentity.md b/docs/models/components/integrationszendesksearchticketspaginatedentity.md new file mode 100644 index 00000000..ad7c5c7c --- /dev/null +++ b/docs/models/components/integrationszendesksearchticketspaginatedentity.md @@ -0,0 +1,18 @@ +# IntegrationsZendeskSearchTicketsPaginatedEntity + +Integrations_Zendesk_SearchTickets_PaginatedEntity model + +## Example Usage + +```typescript +import { IntegrationsZendeskSearchTicketsPaginatedEntity } from "firehydrant/models/components"; + +let value: IntegrationsZendeskSearchTicketsPaginatedEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `data` | [components.IntegrationsZendeskSupportIssueEntity](../../models/components/integrationszendesksupportissueentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/integrationszendesksupportissueentity.md b/docs/models/components/integrationszendesksupportissueentity.md new file mode 100644 index 00000000..38096cf5 --- /dev/null +++ b/docs/models/components/integrationszendesksupportissueentity.md @@ -0,0 +1,24 @@ +# IntegrationsZendeskSupportIssueEntity + +## Example Usage + +```typescript +import { IntegrationsZendeskSupportIssueEntity } from "firehydrant/models/components"; + +let value: IntegrationsZendeskSupportIssueEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `remoteId` | *string* | :heavy_minus_sign: | The ID of this support issue in the system that originated this issue, eg Zendesk. | +| `title` | *string* | :heavy_minus_sign: | Title or name of this issue. | +| `description` | *string* | :heavy_minus_sign: | Longer description of the issue. | +| `remoteUrl` | *string* | :heavy_minus_sign: | Browser-accessible url for this issue in the originating system, eg Zendesk. | +| `data` | [components.IntegrationsZendeskSupportIssueEntityData](../../models/components/integrationszendesksupportissueentitydata.md) | :heavy_minus_sign: | Raw data associated with this issue from originating system. | +| `attachments` | *string* | :heavy_minus_sign: | Attachment information for this issue. | +| `customers` | [components.NullableIntegrationsZendeskSupportIssueEntityCustomerEntity](../../models/components/nullableintegrationszendesksupportissueentitycustomerentity.md) | :heavy_minus_sign: | N/A | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `attachedIncidents` | [components.IncidentEntity](../../models/components/incidententity.md)[] | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | Type designator for this entity | \ No newline at end of file diff --git a/docs/models/components/integrationszendesksupportissueentitydata.md b/docs/models/components/integrationszendesksupportissueentitydata.md new file mode 100644 index 00000000..de63dce0 --- /dev/null +++ b/docs/models/components/integrationszendesksupportissueentitydata.md @@ -0,0 +1,16 @@ +# IntegrationsZendeskSupportIssueEntityData + +Raw data associated with this issue from originating system. + +## Example Usage + +```typescript +import { IntegrationsZendeskSupportIssueEntityData } from "firehydrant/models/components"; + +let value: IntegrationsZendeskSupportIssueEntityData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/labels.md b/docs/models/components/labels.md deleted file mode 100644 index 837981b3..00000000 --- a/docs/models/components/labels.md +++ /dev/null @@ -1,16 +0,0 @@ -# Labels - -Arbitrary key:value pairs of labels. - -## Example Usage - -```typescript -import { Labels } from "firehydrant-typescript-sdk/models/components"; - -let value: Labels = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/level.md b/docs/models/components/level.md index 8520e368..bd545f39 100644 --- a/docs/models/components/level.md +++ b/docs/models/components/level.md @@ -3,9 +3,9 @@ ## Example Usage ```typescript -import { Level } from "firehydrant-typescript-sdk/models/components"; +import { Level } from "firehydrant/models/components"; -let value: Level = "fatal"; +let value: Level = "warn"; ``` ## Values diff --git a/docs/models/components/lifecyclesmilestoneentity.md b/docs/models/components/lifecyclesmilestoneentity.md index 49506a97..de48b800 100644 --- a/docs/models/components/lifecyclesmilestoneentity.md +++ b/docs/models/components/lifecyclesmilestoneentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { LifecyclesMilestoneEntity } from "firehydrant-typescript-sdk/models/components"; +import { LifecyclesMilestoneEntity } from "firehydrant/models/components"; let value: LifecyclesMilestoneEntity = {}; ``` @@ -16,8 +16,9 @@ let value: LifecyclesMilestoneEntity = {}; | `name` | *string* | :heavy_minus_sign: | N/A | | `description` | *string* | :heavy_minus_sign: | N/A | | `slug` | *string* | :heavy_minus_sign: | N/A | +| `autoAssignTimestampOnCreate` | *string* | :heavy_minus_sign: | N/A | | `position` | *number* | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `updatedBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/lifecyclesphaseentity.md b/docs/models/components/lifecyclesphaseentity.md index b62ab945..ce4f13cb 100644 --- a/docs/models/components/lifecyclesphaseentity.md +++ b/docs/models/components/lifecyclesphaseentity.md @@ -5,7 +5,7 @@ Lifecycles_PhaseEntity model ## Example Usage ```typescript -import { LifecyclesPhaseEntity } from "firehydrant-typescript-sdk/models/components"; +import { LifecyclesPhaseEntity } from "firehydrant/models/components"; let value: LifecyclesPhaseEntity = {}; ``` diff --git a/docs/models/components/lifecyclesphaseentitylist.md b/docs/models/components/lifecyclesphaseentitylist.md index d40b6854..d701a406 100644 --- a/docs/models/components/lifecyclesphaseentitylist.md +++ b/docs/models/components/lifecyclesphaseentitylist.md @@ -5,7 +5,7 @@ Lifecycles_PhaseEntityList model ## Example Usage ```typescript -import { LifecyclesPhaseEntityList } from "firehydrant-typescript-sdk/models/components"; +import { LifecyclesPhaseEntityList } from "firehydrant/models/components"; let value: LifecyclesPhaseEntityList = {}; ``` diff --git a/docs/models/components/links.md b/docs/models/components/links.md deleted file mode 100644 index b14e25b4..00000000 --- a/docs/models/components/links.md +++ /dev/null @@ -1,20 +0,0 @@ -# Links - -## Example Usage - -```typescript -import { Links } from "firehydrant-typescript-sdk/models/components"; - -let value: Links = { - name: "", - hrefUrl: "https://gigantic-freezing.name/", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | -| `hrefUrl` | *string* | :heavy_check_mark: | URL | -| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | \ No newline at end of file diff --git a/docs/models/components/linksentity.md b/docs/models/components/linksentity.md index 2330e2b7..d946d88e 100644 --- a/docs/models/components/linksentity.md +++ b/docs/models/components/linksentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { LinksEntity } from "firehydrant-typescript-sdk/models/components"; +import { LinksEntity } from "firehydrant/models/components"; let value: LinksEntity = {}; ``` diff --git a/docs/models/components/logic.md b/docs/models/components/logic.md deleted file mode 100644 index e94f3c6f..00000000 --- a/docs/models/components/logic.md +++ /dev/null @@ -1,16 +0,0 @@ -# Logic - -An unstructured object of key/value pairs describing the logic for applying the rule. - -## Example Usage - -```typescript -import { Logic } from "firehydrant-typescript-sdk/models/components"; - -let value: Logic = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/managedbysettings.md b/docs/models/components/managedbysettings.md deleted file mode 100644 index 87c69b95..00000000 --- a/docs/models/components/managedbysettings.md +++ /dev/null @@ -1,16 +0,0 @@ -# ManagedBySettings - -Indicates the settings of the catalog that manages this service - -## Example Usage - -```typescript -import { ManagedBySettings } from "firehydrant-typescript-sdk/models/components"; - -let value: ManagedBySettings = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/mediaimageentity.md b/docs/models/components/mediaimageentity.md deleted file mode 100644 index 3726ccdb..00000000 --- a/docs/models/components/mediaimageentity.md +++ /dev/null @@ -1,16 +0,0 @@ -# MediaImageEntity - -## Example Usage - -```typescript -import { MediaImageEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: MediaImageEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `originalUrl` | *string* | :heavy_minus_sign: | N/A | -| `versionsUrls` | [components.VersionsUrls](../../models/components/versionsurls.md) | :heavy_minus_sign: | An object with keys that can have different versions of an image | \ No newline at end of file diff --git a/docs/models/components/members.md b/docs/models/components/members.md deleted file mode 100644 index 3d3bf878..00000000 --- a/docs/models/components/members.md +++ /dev/null @@ -1,17 +0,0 @@ -# Members - -## Example Usage - -```typescript -import { Members } from "firehydrant-typescript-sdk/models/components"; - -let value: Members = { - value: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `value` | *string* | :heavy_check_mark: | String that represents the user's UUID to assign to the team | \ No newline at end of file diff --git a/docs/models/components/membershipentity.md b/docs/models/components/membershipentity.md index f10707d1..096815a0 100644 --- a/docs/models/components/membershipentity.md +++ b/docs/models/components/membershipentity.md @@ -3,16 +3,16 @@ ## Example Usage ```typescript -import { MembershipEntity } from "firehydrant-typescript-sdk/models/components"; +import { MembershipEntity } from "firehydrant/models/components"; let value: MembershipEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `user` | [components.UserEntity](../../models/components/userentity.md) | :heavy_minus_sign: | UserEntity model | -| `schedule` | [components.ScheduleEntity](../../models/components/scheduleentity.md) | :heavy_minus_sign: | N/A | -| `signalsOnCallSchedule` | [components.SuccinctEntity](../../models/components/succinctentity.md) | :heavy_minus_sign: | N/A | -| `defaultIncidentRole` | [components.IncidentRoleEntity](../../models/components/incidentroleentity.md) | :heavy_minus_sign: | IncidentRoleEntity model | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `user` | [components.NullableUserEntity](../../models/components/nullableuserentity.md) | :heavy_minus_sign: | N/A | +| `schedule` | [components.NullableScheduleEntity](../../models/components/nullablescheduleentity.md) | :heavy_minus_sign: | N/A | +| `signalsOnCallSchedule` | [components.NullableSuccinctEntity](../../models/components/nullablesuccinctentity.md) | :heavy_minus_sign: | N/A | +| `defaultIncidentRole` | [components.NullableIncidentRoleEntity](../../models/components/nullableincidentroleentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/memberships.md b/docs/models/components/memberships.md deleted file mode 100644 index bf64232e..00000000 --- a/docs/models/components/memberships.md +++ /dev/null @@ -1,17 +0,0 @@ -# Memberships - -## Example Usage - -```typescript -import { Memberships } from "firehydrant-typescript-sdk/models/components"; - -let value: Memberships = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `userId` | *string* | :heavy_minus_sign: | N/A | -| `scheduleId` | *string* | :heavy_minus_sign: | N/A | -| `incidentRoleId` | *string* | :heavy_minus_sign: | An incident role ID that this user will automatically assigned if this team is assigned to an incident | \ No newline at end of file diff --git a/docs/models/components/messagetype.md b/docs/models/components/messagetype.md index 0c88367a..1c0d8267 100644 --- a/docs/models/components/messagetype.md +++ b/docs/models/components/messagetype.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { MessageType } from "firehydrant-typescript-sdk/models/components"; +import { MessageType } from "firehydrant/models/components"; let value: MessageType = "custom"; ``` diff --git a/docs/models/components/metricsinfrastructurelistentity.md b/docs/models/components/metricsinfrastructurelistentity.md index 3e34e358..d6e8434e 100644 --- a/docs/models/components/metricsinfrastructurelistentity.md +++ b/docs/models/components/metricsinfrastructurelistentity.md @@ -5,7 +5,7 @@ Metrics_InfrastructureListEntity model ## Example Usage ```typescript -import { MetricsInfrastructureListEntity } from "firehydrant-typescript-sdk/models/components"; +import { MetricsInfrastructureListEntity } from "firehydrant/models/components"; let value: MetricsInfrastructureListEntity = {}; ``` diff --git a/docs/models/components/metricsinfrastructuremetricsentity.md b/docs/models/components/metricsinfrastructuremetricsentity.md index 32fcf669..1fb3d520 100644 --- a/docs/models/components/metricsinfrastructuremetricsentity.md +++ b/docs/models/components/metricsinfrastructuremetricsentity.md @@ -5,7 +5,7 @@ Metrics_InfrastructureMetricsEntity model ## Example Usage ```typescript -import { MetricsInfrastructureMetricsEntity } from "firehydrant-typescript-sdk/models/components"; +import { MetricsInfrastructureMetricsEntity } from "firehydrant/models/components"; let value: MetricsInfrastructureMetricsEntity = {}; ``` diff --git a/docs/models/components/metricsmetricsentity.md b/docs/models/components/metricsmetricsentity.md index 833183a7..28bcd125 100644 --- a/docs/models/components/metricsmetricsentity.md +++ b/docs/models/components/metricsmetricsentity.md @@ -5,7 +5,7 @@ Metrics_MetricsEntity model ## Example Usage ```typescript -import { MetricsMetricsEntity } from "firehydrant-typescript-sdk/models/components"; +import { MetricsMetricsEntity } from "firehydrant/models/components"; let value: MetricsMetricsEntity = {}; ``` @@ -19,5 +19,5 @@ let value: MetricsMetricsEntity = {}; | `bucketSize` | *number* | :heavy_minus_sign: | The size of returned buckets. Can be one of: day, week, month, or all_time. | | `displayInformation` | [components.DisplayInformation](../../models/components/displayinformation.md) | :heavy_minus_sign: | N/A | | `keys` | *string*[] | :heavy_minus_sign: | N/A | -| `buckets` | [components.Buckets](../../models/components/buckets.md)[] | :heavy_minus_sign: | N/A | -| `sort` | [components.MetricsMetricsEntitySortEntity](../../models/components/metricsmetricsentitysortentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `buckets` | [components.Bucket](../../models/components/bucket.md)[] | :heavy_minus_sign: | N/A | +| `sort` | [components.NullableMetricsMetricsEntitySortEntity](../../models/components/nullablemetricsmetricsentitysortentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/metricsmetricsentitysortentity.md b/docs/models/components/metricsmetricsentitysortentity.md deleted file mode 100644 index 7b5effa7..00000000 --- a/docs/models/components/metricsmetricsentitysortentity.md +++ /dev/null @@ -1,17 +0,0 @@ -# MetricsMetricsEntitySortEntity - -## Example Usage - -```typescript -import { MetricsMetricsEntitySortEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: MetricsMetricsEntitySortEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `field` | *string* | :heavy_minus_sign: | N/A | -| `direction` | *string* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/metricsretrospectiveentity.md b/docs/models/components/metricsretrospectiveentity.md index ffb26eb1..066d85d6 100644 --- a/docs/models/components/metricsretrospectiveentity.md +++ b/docs/models/components/metricsretrospectiveentity.md @@ -5,14 +5,14 @@ Metrics_RetrospectiveEntity model ## Example Usage ```typescript -import { MetricsRetrospectiveEntity } from "firehydrant-typescript-sdk/models/components"; +import { MetricsRetrospectiveEntity } from "firehydrant/models/components"; let value: MetricsRetrospectiveEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `data` | [components.MetricsRetrospectiveEntityDataEntity](../../models/components/metricsretrospectiveentitydataentity.md)[] | :heavy_minus_sign: | N/A | -| `summary` | [components.MetricsRetrospectiveEntitySummaryEntity](../../models/components/metricsretrospectiveentitysummaryentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [components.MetricsRetrospectiveEntityDataEntity](../../models/components/metricsretrospectiveentitydataentity.md)[] | :heavy_minus_sign: | N/A | +| `summary` | [components.NullableMetricsRetrospectiveEntitySummaryEntity](../../models/components/nullablemetricsretrospectiveentitysummaryentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/metricsretrospectiveentitydataentity.md b/docs/models/components/metricsretrospectiveentitydataentity.md index 7d5f4c87..f040d445 100644 --- a/docs/models/components/metricsretrospectiveentitydataentity.md +++ b/docs/models/components/metricsretrospectiveentitydataentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { MetricsRetrospectiveEntityDataEntity } from "firehydrant-typescript-sdk/models/components"; +import { MetricsRetrospectiveEntityDataEntity } from "firehydrant/models/components"; let value: MetricsRetrospectiveEntityDataEntity = {}; ``` diff --git a/docs/models/components/metricsretrospectiveentitysummaryentity.md b/docs/models/components/metricsretrospectiveentitysummaryentity.md deleted file mode 100644 index 0d31516b..00000000 --- a/docs/models/components/metricsretrospectiveentitysummaryentity.md +++ /dev/null @@ -1,21 +0,0 @@ -# MetricsRetrospectiveEntitySummaryEntity - -## Example Usage - -```typescript -import { MetricsRetrospectiveEntitySummaryEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: MetricsRetrospectiveEntitySummaryEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `completed` | *number* | :heavy_minus_sign: | N/A | -| `total` | *number* | :heavy_minus_sign: | N/A | -| `incomplete` | *number* | :heavy_minus_sign: | N/A | -| `mean` | *number* | :heavy_minus_sign: | N/A | -| `shortest` | *number* | :heavy_minus_sign: | N/A | -| `longest` | *number* | :heavy_minus_sign: | N/A | -| `completionPercentage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/milestonemapping.md b/docs/models/components/milestonemapping.md new file mode 100644 index 00000000..1fe8322e --- /dev/null +++ b/docs/models/components/milestonemapping.md @@ -0,0 +1,19 @@ +# MilestoneMapping + +## Example Usage + +```typescript +import { MilestoneMapping } from "firehydrant/models/components"; + +let value: MilestoneMapping = { + milestoneId: "", + status: "resolved", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `milestoneId` | *string* | :heavy_check_mark: | FireHydrant milestone id | +| `status` | [components.UpdateStatuspageConnectionStatus](../../models/components/updatestatuspageconnectionstatus.md) | :heavy_check_mark: | Statuspage.io status | \ No newline at end of file diff --git a/docs/models/components/milestonemappings.md b/docs/models/components/milestonemappings.md deleted file mode 100644 index 0afcab17..00000000 --- a/docs/models/components/milestonemappings.md +++ /dev/null @@ -1,19 +0,0 @@ -# MilestoneMappings - -## Example Usage - -```typescript -import { MilestoneMappings } from "firehydrant-typescript-sdk/models/components"; - -let value: MilestoneMappings = { - milestoneId: "", - status: "resolved", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `milestoneId` | *string* | :heavy_check_mark: | FireHydrant milestone id | -| `status` | [components.PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus](../../models/components/patchv1integrationsstatuspageconnectionsconnectionidstatus.md) | :heavy_check_mark: | Statuspage.io status | \ No newline at end of file diff --git a/docs/models/components/milestones.md b/docs/models/components/milestones.md deleted file mode 100644 index c332a01f..00000000 --- a/docs/models/components/milestones.md +++ /dev/null @@ -1,19 +0,0 @@ -# Milestones - -## Example Usage - -```typescript -import { Milestones } from "firehydrant-typescript-sdk/models/components"; - -let value: Milestones = { - type: "", - occurredAt: new Date("2024-04-24T14:17:38.418Z"), -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | The type/slug of the milestone. Must be one of the currently configured milestones. | -| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value | \ No newline at end of file diff --git a/docs/models/components/msteamschannel.md b/docs/models/components/msteamschannel.md deleted file mode 100644 index 2297e753..00000000 --- a/docs/models/components/msteamschannel.md +++ /dev/null @@ -1,21 +0,0 @@ -# MsTeamsChannel - -MS Teams channel identity for channel associated with this team - -## Example Usage - -```typescript -import { MsTeamsChannel } from "firehydrant-typescript-sdk/models/components"; - -let value: MsTeamsChannel = { - channelId: "", - msTeamId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `channelId` | *string* | :heavy_check_mark: | N/A | -| `msTeamId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/name.md b/docs/models/components/name.md deleted file mode 100644 index f95b7a6d..00000000 --- a/docs/models/components/name.md +++ /dev/null @@ -1,21 +0,0 @@ -# Name - -The components of the user's name - -## Example Usage - -```typescript -import { Name } from "firehydrant-typescript-sdk/models/components"; - -let value: Name = { - familyName: "", - givenName: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `familyName` | *string* | :heavy_check_mark: | The family name of the User, or last name in most Western languages | -| `givenName` | *string* | :heavy_check_mark: | The given name of the User, or first name in most Western languages | \ No newline at end of file diff --git a/docs/models/components/notificationpriorityoverride.md b/docs/models/components/notificationpriorityoverride.md deleted file mode 100644 index f2b1aec7..00000000 --- a/docs/models/components/notificationpriorityoverride.md +++ /dev/null @@ -1,15 +0,0 @@ -# NotificationPriorityOverride - -## Example Usage - -```typescript -import { NotificationPriorityOverride } from "firehydrant-typescript-sdk/models/components"; - -let value: NotificationPriorityOverride = "LOW"; -``` - -## Values - -```typescript -"HIGH" | "MEDIUM" | "LOW" -``` \ No newline at end of file diff --git a/docs/models/components/nullableactorentity.md b/docs/models/components/nullableactorentity.md new file mode 100644 index 00000000..6cce9600 --- /dev/null +++ b/docs/models/components/nullableactorentity.md @@ -0,0 +1,18 @@ +# NullableActorEntity + +## Example Usage + +```typescript +import { NullableActorEntity } from "firehydrant/models/components"; + +let value: NullableActorEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `email` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.NullableActorEntityType](../../models/components/nullableactorentitytype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableactorentitytype.md b/docs/models/components/nullableactorentitytype.md new file mode 100644 index 00000000..1939061e --- /dev/null +++ b/docs/models/components/nullableactorentitytype.md @@ -0,0 +1,15 @@ +# NullableActorEntityType + +## Example Usage + +```typescript +import { NullableActorEntityType } from "firehydrant/models/components"; + +let value: NullableActorEntityType = "firehydrant_bot"; +``` + +## Values + +```typescript +"firehydrant_user" | "firehydrant_bot" | "alertmanager" | "asana" | "aws" | "bugsnag" | "checkly" | "custom_alerts" | "datadog" | "shortcut" | "new_relic" | "nunc" | "github" | "giphy" | "google_meet" | "google_calendar" | "microsoft_teams" | "microsoft_teams_v2" | "webex" | "jira_cloud" | "jira_onprem" | "opsgenie" | "pager_duty" | "honeycomb" | "patchy" | "service_now" | "signals" | "slack" | "statuspage" | "victorops" | "zendesk" | "zoom" | "confluence_cloud" | "google_docs" | "zoom_v2" | "linear" | "cortex" +``` \ No newline at end of file diff --git a/docs/models/components/nullablealertsalertentity.md b/docs/models/components/nullablealertsalertentity.md new file mode 100644 index 00000000..2ae58626 --- /dev/null +++ b/docs/models/components/nullablealertsalertentity.md @@ -0,0 +1,63 @@ +# NullableAlertsAlertEntity + +Alerts_AlertEntity model + +## Example Usage + +```typescript +import { NullableAlertsAlertEntity } from "firehydrant/models/components"; + +let value: NullableAlertsAlertEntity = { + signalRule: { + deduplicationExpiry: "PT1H", + }, + parentAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], + childAlerts: [ + { + signalRule: { + deduplicationExpiry: "PT1H", + }, + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `integrationName` | *string* | :heavy_minus_sign: | N/A | +| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `durationMs` | *number* | :heavy_minus_sign: | N/A | +| `durationIso8601` | *string* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `remoteId` | *string* | :heavy_minus_sign: | N/A | +| `remoteUrl` | *string* | :heavy_minus_sign: | N/A | +| `labels` | [components.NullableAlertsAlertEntityLabels](../../models/components/nullablealertsalertentitylabels.md) | :heavy_minus_sign: | Arbitrary key:value pairs of labels. | +| `environments` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | +| `services` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | +| `tags` | *string*[] | :heavy_minus_sign: | N/A | +| `sourceIcon` | *string* | :heavy_minus_sign: | N/A | +| `signalId` | *string* | :heavy_minus_sign: | N/A | +| `signalRule` | [components.NullableSignalsAPIRuleEntity](../../models/components/nullablesignalsapiruleentity.md) | :heavy_minus_sign: | N/A | +| `signalTarget` | [components.NullableSignalsAPITargetEntity](../../models/components/nullablesignalsapitargetentity.md) | :heavy_minus_sign: | N/A | +| `teamName` | *string* | :heavy_minus_sign: | N/A | +| `teamId` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | +| `incidents` | [components.PublicApiv1IncidentsSuccinctEntity](../../models/components/publicapiv1incidentssuccinctentity.md)[] | :heavy_minus_sign: | N/A | +| `events` | [components.AlertsSirenEventEntity](../../models/components/alertssirenevententity.md)[] | :heavy_minus_sign: | N/A | +| `isExpired` | *boolean* | :heavy_minus_sign: | N/A | +| `parentAlerts` | [components.AlertsSirenAlertEntity](../../models/components/alertssirenalertentity.md)[] | :heavy_minus_sign: | N/A | +| `childAlerts` | [components.AlertsSirenAlertEntity](../../models/components/alertssirenalertentity.md)[] | :heavy_minus_sign: | N/A | +| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablealertsalertentitylabels.md b/docs/models/components/nullablealertsalertentitylabels.md new file mode 100644 index 00000000..65af6dc7 --- /dev/null +++ b/docs/models/components/nullablealertsalertentitylabels.md @@ -0,0 +1,16 @@ +# NullableAlertsAlertEntityLabels + +Arbitrary key:value pairs of labels. + +## Example Usage + +```typescript +import { NullableAlertsAlertEntityLabels } from "firehydrant/models/components"; + +let value: NullableAlertsAlertEntityLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableattachmentslinkentity.md b/docs/models/components/nullableattachmentslinkentity.md new file mode 100644 index 00000000..6de0a67e --- /dev/null +++ b/docs/models/components/nullableattachmentslinkentity.md @@ -0,0 +1,23 @@ +# NullableAttachmentsLinkEntity + +Attachments_LinkEntity model + +## Example Usage + +```typescript +import { NullableAttachmentsLinkEntity } from "firehydrant/models/components"; + +let value: NullableAttachmentsLinkEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `displayText` | *string* | :heavy_minus_sign: | N/A | +| `hrefUrl` | *string* | :heavy_minus_sign: | N/A | +| `iconUrl` | *string* | :heavy_minus_sign: | N/A | +| `editable` | *boolean* | :heavy_minus_sign: | Link can be edited | +| `deletable` | *boolean* | :heavy_minus_sign: | Link can be deleted | \ No newline at end of file diff --git a/docs/models/components/nullableauthorentity.md b/docs/models/components/nullableauthorentity.md new file mode 100644 index 00000000..27f92297 --- /dev/null +++ b/docs/models/components/nullableauthorentity.md @@ -0,0 +1,18 @@ +# NullableAuthorEntity + +## Example Usage + +```typescript +import { NullableAuthorEntity } from "firehydrant/models/components"; + +let value: NullableAuthorEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `source` | *string* | :heavy_minus_sign: | N/A | +| `email` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablecalendarsevententity.md b/docs/models/components/nullablecalendarsevententity.md new file mode 100644 index 00000000..4cfaa69d --- /dev/null +++ b/docs/models/components/nullablecalendarsevententity.md @@ -0,0 +1,23 @@ +# NullableCalendarsEventEntity + +## Example Usage + +```typescript +import { NullableCalendarsEventEntity } from "firehydrant/models/components"; + +let value: NullableCalendarsEventEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `startsAt` | *string* | :heavy_minus_sign: | N/A | +| `endsAt` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | *string* | :heavy_minus_sign: | N/A | +| `updatedAt` | *string* | :heavy_minus_sign: | N/A | +| `providerUrl` | *string* | :heavy_minus_sign: | N/A | +| `providerIconUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablechangeevententity.md b/docs/models/components/nullablechangeevententity.md new file mode 100644 index 00000000..8c97e8ae --- /dev/null +++ b/docs/models/components/nullablechangeevententity.md @@ -0,0 +1,33 @@ +# NullableChangeEventEntity + +ChangeEventEntity model + +## Example Usage + +```typescript +import { NullableChangeEventEntity } from "firehydrant/models/components"; + +let value: NullableChangeEventEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `externalId` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `durationMs` | *number* | :heavy_minus_sign: | N/A | +| `durationIso8601` | *string* | :heavy_minus_sign: | N/A | +| `environments` | [components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)[] | :heavy_minus_sign: | N/A | +| `relatedChanges` | [components.ChangeEntity](../../models/components/changeentity.md)[] | :heavy_minus_sign: | N/A | +| `identities` | [components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)[] | :heavy_minus_sign: | N/A | +| `authors` | [components.AuthorEntity](../../models/components/authorentity.md)[] | :heavy_minus_sign: | N/A | +| `attachments` | [components.NullableChangeEventEntityAttachment](../../models/components/nullablechangeevententityattachment.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `labels` | [components.NullableChangeEventEntityLabels](../../models/components/nullablechangeevententitylabels.md) | :heavy_minus_sign: | An object of label key and values | +| `services` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablechangeevententityattachment.md b/docs/models/components/nullablechangeevententityattachment.md new file mode 100644 index 00000000..0f6c431d --- /dev/null +++ b/docs/models/components/nullablechangeevententityattachment.md @@ -0,0 +1,14 @@ +# NullableChangeEventEntityAttachment + +## Example Usage + +```typescript +import { NullableChangeEventEntityAttachment } from "firehydrant/models/components"; + +let value: NullableChangeEventEntityAttachment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablechangeevententitylabels.md b/docs/models/components/nullablechangeevententitylabels.md new file mode 100644 index 00000000..e7a6c559 --- /dev/null +++ b/docs/models/components/nullablechangeevententitylabels.md @@ -0,0 +1,16 @@ +# NullableChangeEventEntityLabels + +An object of label key and values + +## Example Usage + +```typescript +import { NullableChangeEventEntityLabels } from "firehydrant/models/components"; + +let value: NullableChangeEventEntityLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableconversationsapientitieschannel.md b/docs/models/components/nullableconversationsapientitieschannel.md new file mode 100644 index 00000000..56807af3 --- /dev/null +++ b/docs/models/components/nullableconversationsapientitieschannel.md @@ -0,0 +1,15 @@ +# NullableConversationsAPIEntitiesChannel + +## Example Usage + +```typescript +import { NullableConversationsAPIEntitiesChannel } from "firehydrant/models/components"; + +let value: NullableConversationsAPIEntitiesChannel = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableeventnoteentity.md b/docs/models/components/nullableeventnoteentity.md new file mode 100644 index 00000000..36a4e16d --- /dev/null +++ b/docs/models/components/nullableeventnoteentity.md @@ -0,0 +1,21 @@ +# NullableEventNoteEntity + +Event_NoteEntity model + +## Example Usage + +```typescript +import { NullableEventNoteEntity } from "firehydrant/models/components"; + +let value: NullableEventNoteEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `body` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `statusPages` | [components.IncidentsStatusPageEntity](../../models/components/incidentsstatuspageentity.md)[] | :heavy_minus_sign: | N/A | +| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableexternalresourceentity.md b/docs/models/components/nullableexternalresourceentity.md new file mode 100644 index 00000000..b3180fe0 --- /dev/null +++ b/docs/models/components/nullableexternalresourceentity.md @@ -0,0 +1,23 @@ +# NullableExternalResourceEntity + +## Example Usage + +```typescript +import { NullableExternalResourceEntity } from "firehydrant/models/components"; + +let value: NullableExternalResourceEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `connectionType` | *string* | :heavy_minus_sign: | N/A | +| `connectionName` | *string* | :heavy_minus_sign: | N/A | +| `connectionFullFaviconUrl` | *string* | :heavy_minus_sign: | N/A | +| `connectionId` | *string* | :heavy_minus_sign: | N/A | +| `remoteId` | *string* | :heavy_minus_sign: | N/A | +| `remoteUrl` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablefhtypesgenericentity.md b/docs/models/components/nullablefhtypesgenericentity.md new file mode 100644 index 00000000..24766e73 --- /dev/null +++ b/docs/models/components/nullablefhtypesgenericentity.md @@ -0,0 +1,17 @@ +# NullableFHTypesGenericEntity + +## Example Usage + +```typescript +import { NullableFHTypesGenericEntity } from "firehydrant/models/components"; + +let value: NullableFHTypesGenericEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `value` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableimportsimportableresourceentity.md b/docs/models/components/nullableimportsimportableresourceentity.md new file mode 100644 index 00000000..dcfc9b76 --- /dev/null +++ b/docs/models/components/nullableimportsimportableresourceentity.md @@ -0,0 +1,18 @@ +# NullableImportsImportableResourceEntity + +## Example Usage + +```typescript +import { NullableImportsImportableResourceEntity } from "firehydrant/models/components"; + +let value: NullableImportsImportableResourceEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `importErrors` | [components.ImportsImportErrorEntity](../../models/components/importsimporterrorentity.md)[] | :heavy_minus_sign: | N/A | +| `importedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `remoteId` | *string* | :heavy_minus_sign: | N/A | +| `state` | [components.NullableImportsImportableResourceEntityState](../../models/components/nullableimportsimportableresourceentitystate.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableimportsimportableresourceentitystate.md b/docs/models/components/nullableimportsimportableresourceentitystate.md new file mode 100644 index 00000000..797336e8 --- /dev/null +++ b/docs/models/components/nullableimportsimportableresourceentitystate.md @@ -0,0 +1,15 @@ +# NullableImportsImportableResourceEntityState + +## Example Usage + +```typescript +import { NullableImportsImportableResourceEntityState } from "firehydrant/models/components"; + +let value: NullableImportsImportableResourceEntityState = "errored"; +``` + +## Values + +```typescript +"selected" | "skipped" | "imported" | "errored" +``` \ No newline at end of file diff --git a/docs/models/components/nullableimportsimporterrorentityresourceentity.md b/docs/models/components/nullableimportsimporterrorentityresourceentity.md new file mode 100644 index 00000000..65d3dfbe --- /dev/null +++ b/docs/models/components/nullableimportsimporterrorentityresourceentity.md @@ -0,0 +1,17 @@ +# NullableImportsImportErrorEntityResourceEntity + +## Example Usage + +```typescript +import { NullableImportsImportErrorEntityResourceEntity } from "firehydrant/models/components"; + +let value: NullableImportsImportErrorEntityResourceEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `resourceId` | *string* | :heavy_minus_sign: | N/A | +| `resourceType` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableincidententity.md b/docs/models/components/nullableincidententity.md new file mode 100644 index 00000000..3bdff424 --- /dev/null +++ b/docs/models/components/nullableincidententity.md @@ -0,0 +1,72 @@ +# NullableIncidentEntity + +IncidentEntity model + +## Example Usage + +```typescript +import { NullableIncidentEntity } from "firehydrant/models/components"; + +let value: NullableIncidentEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | UUID of the Incident | +| `name` | *string* | :heavy_minus_sign: | Name of the incident | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the incident was opened | +| `startedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the incident started | +| `discardedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the incident was archived | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `currentMilestone` | *string* | :heavy_minus_sign: | The type/slug of the current milestone. Will be one of the currently configured milestones for the given incident. | +| `number` | *number* | :heavy_minus_sign: | Incident number | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `severity` | *string* | :heavy_minus_sign: | N/A | +| `severityColor` | *string* | :heavy_minus_sign: | N/A | +| `severityImpact` | *string* | :heavy_minus_sign: | N/A | +| `severityCondition` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | N/A | +| `severityImpactObject` | [components.NullableSeverityMatrixImpactEntity](../../models/components/nullableseveritymatriximpactentity.md) | :heavy_minus_sign: | N/A | +| `severityConditionObject` | [components.NullableSeverityMatrixConditionEntity](../../models/components/nullableseveritymatrixconditionentity.md) | :heavy_minus_sign: | N/A | +| `privateId` | *string* | :heavy_minus_sign: | N/A | +| `organizationId` | *string* | :heavy_minus_sign: | N/A | +| `milestones` | [components.IncidentsMilestoneEntity](../../models/components/incidentsmilestoneentity.md)[] | :heavy_minus_sign: | DEPRECATED: Please use lifecycle phases instead | +| `lifecyclePhases` | [components.IncidentsLifecyclePhaseEntity](../../models/components/incidentslifecyclephaseentity.md)[] | :heavy_minus_sign: | N/A | +| `lifecycleMeasurements` | [components.IncidentsLifecycleMeasurementEntity](../../models/components/incidentslifecyclemeasuremententity.md)[] | :heavy_minus_sign: | N/A | +| `active` | *boolean* | :heavy_minus_sign: | N/A | +| `labels` | [components.NullableIncidentEntityLabels](../../models/components/nullableincidententitylabels.md) | :heavy_minus_sign: | A key/value of labels | +| `roleAssignments` | [components.IncidentsRoleAssignmentEntity](../../models/components/incidentsroleassignmententity.md)[] | :heavy_minus_sign: | N/A | +| `statusPages` | [components.IncidentsStatusPageEntity](../../models/components/incidentsstatuspageentity.md)[] | :heavy_minus_sign: | N/A | +| `incidentUrl` | *string* | :heavy_minus_sign: | N/A | +| `privateStatusPageUrl` | *string* | :heavy_minus_sign: | N/A | +| `organization` | [components.NullableOrganizationEntity](../../models/components/nullableorganizationentity.md) | :heavy_minus_sign: | N/A | +| `customersImpacted` | *number* | :heavy_minus_sign: | N/A | +| `monetaryImpact` | *number* | :heavy_minus_sign: | N/A | +| `monetaryImpactCents` | *number* | :heavy_minus_sign: | N/A | +| `lastUpdate` | *string* | :heavy_minus_sign: | N/A | +| `lastNote` | [components.NullableEventNoteEntity](../../models/components/nullableeventnoteentity.md) | :heavy_minus_sign: | N/A | +| `reportId` | *string* | :heavy_minus_sign: | N/A | +| `aiIncidentSummary` | *string* | :heavy_minus_sign: | N/A | +| `services` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | +| `environments` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | +| `functionalities` | [components.SuccinctEntity](../../models/components/succinctentity.md)[] | :heavy_minus_sign: | N/A | +| `channelName` | *string* | :heavy_minus_sign: | N/A | +| `channelReference` | *string* | :heavy_minus_sign: | N/A | +| `channelId` | *string* | :heavy_minus_sign: | N/A | +| `channelStatus` | *string* | :heavy_minus_sign: | inoperative: 0, operational: 1, archived: 2 | +| `incidentTickets` | [components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)[] | :heavy_minus_sign: | N/A | +| `ticket` | [components.NullableTicketingTicketEntity](../../models/components/nullableticketingticketentity.md) | :heavy_minus_sign: | N/A | +| `impacts` | [components.IncidentsImpactEntity](../../models/components/incidentsimpactentity.md)[] | :heavy_minus_sign: | N/A | +| `conferenceBridges` | [components.IncidentsConferenceBridgeEntity](../../models/components/incidentsconferencebridgeentity.md)[] | :heavy_minus_sign: | N/A | +| `incidentChannels` | [components.IncidentsChannelEntity](../../models/components/incidentschannelentity.md)[] | :heavy_minus_sign: | N/A | +| `retroExports` | [components.NullableIncidentEntityRetroExport](../../models/components/nullableincidententityretroexport.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `contextObject` | [components.NullableIncidentsContextObjectEntity](../../models/components/nullableincidentscontextobjectentity.md) | :heavy_minus_sign: | N/A | +| `teamAssignments` | [components.IncidentsTeamAssignmentEntityLite](../../models/components/incidentsteamassignmententitylite.md)[] | :heavy_minus_sign: | N/A | +| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | +| `customFields` | [components.CustomFieldsFieldValue](../../models/components/customfieldsfieldvalue.md)[] | :heavy_minus_sign: | N/A | +| `fieldRequirements` | [components.IncidentEntityFieldRequirementEntity](../../models/components/incidententityfieldrequiremententity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableincidententitylabels.md b/docs/models/components/nullableincidententitylabels.md new file mode 100644 index 00000000..5e2e472f --- /dev/null +++ b/docs/models/components/nullableincidententitylabels.md @@ -0,0 +1,16 @@ +# NullableIncidentEntityLabels + +A key/value of labels + +## Example Usage + +```typescript +import { NullableIncidentEntityLabels } from "firehydrant/models/components"; + +let value: NullableIncidentEntityLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableincidententityretroexport.md b/docs/models/components/nullableincidententityretroexport.md new file mode 100644 index 00000000..192defe3 --- /dev/null +++ b/docs/models/components/nullableincidententityretroexport.md @@ -0,0 +1,14 @@ +# NullableIncidentEntityRetroExport + +## Example Usage + +```typescript +import { NullableIncidentEntityRetroExport } from "firehydrant/models/components"; + +let value: NullableIncidentEntityRetroExport = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableincidentroleentity.md b/docs/models/components/nullableincidentroleentity.md new file mode 100644 index 00000000..d84f5e4e --- /dev/null +++ b/docs/models/components/nullableincidentroleentity.md @@ -0,0 +1,23 @@ +# NullableIncidentRoleEntity + +IncidentRoleEntity model + +## Example Usage + +```typescript +import { NullableIncidentRoleEntity } from "firehydrant/models/components"; + +let value: NullableIncidentRoleEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `discardedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableincidentsconferencebridgeentity.md b/docs/models/components/nullableincidentsconferencebridgeentity.md new file mode 100644 index 00000000..0e40126f --- /dev/null +++ b/docs/models/components/nullableincidentsconferencebridgeentity.md @@ -0,0 +1,22 @@ +# NullableIncidentsConferenceBridgeEntity + +Incidents_ConferenceBridgeEntity model + +## Example Usage + +```typescript +import { NullableIncidentsConferenceBridgeEntity } from "firehydrant/models/components"; + +let value: NullableIncidentsConferenceBridgeEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `attachments` | [components.NullableIncidentsConferenceBridgeEntityAttachment](../../models/components/nullableincidentsconferencebridgeentityattachment.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `hasTranslatedTranscripts` | *boolean* | :heavy_minus_sign: | N/A | +| `languageCodes` | *string*[] | :heavy_minus_sign: | A list of language codes that have translated transcripts for this conference bridge | +| `transcriptionStatus` | *string* | :heavy_minus_sign: | N/A | +| `transcriptionSubCode` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableincidentsconferencebridgeentityattachment.md b/docs/models/components/nullableincidentsconferencebridgeentityattachment.md new file mode 100644 index 00000000..3fc3a8bb --- /dev/null +++ b/docs/models/components/nullableincidentsconferencebridgeentityattachment.md @@ -0,0 +1,14 @@ +# NullableIncidentsConferenceBridgeEntityAttachment + +## Example Usage + +```typescript +import { NullableIncidentsConferenceBridgeEntityAttachment } from "firehydrant/models/components"; + +let value: NullableIncidentsConferenceBridgeEntityAttachment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableincidentscontextobjectentity.md b/docs/models/components/nullableincidentscontextobjectentity.md new file mode 100644 index 00000000..d5ac8fb1 --- /dev/null +++ b/docs/models/components/nullableincidentscontextobjectentity.md @@ -0,0 +1,18 @@ +# NullableIncidentsContextObjectEntity + +## Example Usage + +```typescript +import { NullableIncidentsContextObjectEntity } from "firehydrant/models/components"; + +let value: NullableIncidentsContextObjectEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `objectType` | *string* | :heavy_minus_sign: | N/A | +| `objectId` | *string* | :heavy_minus_sign: | N/A | +| `contextTag` | *string* | :heavy_minus_sign: | N/A | +| `contextDescription` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableincidenttypeentitytemplateentity.md b/docs/models/components/nullableincidenttypeentitytemplateentity.md new file mode 100644 index 00000000..c7ad2782 --- /dev/null +++ b/docs/models/components/nullableincidenttypeentitytemplateentity.md @@ -0,0 +1,27 @@ +# NullableIncidentTypeEntityTemplateEntity + +## Example Usage + +```typescript +import { NullableIncidentTypeEntityTemplateEntity } from "firehydrant/models/components"; + +let value: NullableIncidentTypeEntityTemplateEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `incidentName` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | +| `labels` | [components.NullableIncidentTypeEntityTemplateEntityLabels](../../models/components/nullableincidenttypeentitytemplateentitylabels.md) | :heavy_minus_sign: | Arbitrary key:value pairs of labels for your incidents. | +| `severity` | *string* | :heavy_minus_sign: | N/A | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | N/A | +| `runbookIds` | *string*[] | :heavy_minus_sign: | N/A | +| `teamIds` | *string*[] | :heavy_minus_sign: | N/A | +| `privateIncident` | *boolean* | :heavy_minus_sign: | N/A | +| `customFields` | *string* | :heavy_minus_sign: | N/A | +| `impacts` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableincidenttypeentitytemplateentitylabels.md b/docs/models/components/nullableincidenttypeentitytemplateentitylabels.md new file mode 100644 index 00000000..0fd986c6 --- /dev/null +++ b/docs/models/components/nullableincidenttypeentitytemplateentitylabels.md @@ -0,0 +1,16 @@ +# NullableIncidentTypeEntityTemplateEntityLabels + +Arbitrary key:value pairs of labels for your incidents. + +## Example Usage + +```typescript +import { NullableIncidentTypeEntityTemplateEntityLabels } from "firehydrant/models/components"; + +let value: NullableIncidentTypeEntityTemplateEntityLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableincidenttypeentitytemplatevaluesentity.md b/docs/models/components/nullableincidenttypeentitytemplatevaluesentity.md new file mode 100644 index 00000000..d81f5f13 --- /dev/null +++ b/docs/models/components/nullableincidenttypeentitytemplatevaluesentity.md @@ -0,0 +1,19 @@ +# NullableIncidentTypeEntityTemplateValuesEntity + +## Example Usage + +```typescript +import { NullableIncidentTypeEntityTemplateValuesEntity } from "firehydrant/models/components"; + +let value: NullableIncidentTypeEntityTemplateValuesEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `services` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | +| `functionalities` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | +| `environments` | [components.IncidentTypeEntityTemplateImpactEntity](../../models/components/incidenttypeentitytemplateimpactentity.md)[] | :heavy_minus_sign: | N/A | +| `runbooks` | [components.Runbooks](../../models/components/runbooks.md) | :heavy_minus_sign: | A hash mapping runbook IDs to runbook names. | +| `teams` | [components.TeamEntity](../../models/components/teamentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationentity.md b/docs/models/components/nullableintegrationentity.md new file mode 100644 index 00000000..d1a736aa --- /dev/null +++ b/docs/models/components/nullableintegrationentity.md @@ -0,0 +1,19 @@ +# NullableIntegrationEntity + +## Example Usage + +```typescript +import { NullableIntegrationEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `integrationName` | *string* | :heavy_minus_sign: | N/A | +| `integrationSlug` | *string* | :heavy_minus_sign: | N/A | +| `displayName` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsawsconnectionentity.md b/docs/models/components/nullableintegrationsawsconnectionentity.md new file mode 100644 index 00000000..af300ca3 --- /dev/null +++ b/docs/models/components/nullableintegrationsawsconnectionentity.md @@ -0,0 +1,26 @@ +# NullableIntegrationsAwsConnectionEntity + +Integrations_Aws_ConnectionEntity model + +## Example Usage + +```typescript +import { NullableIntegrationsAwsConnectionEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationsAwsConnectionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `awsAccountId` | *string* | :heavy_minus_sign: | N/A | +| `targetArn` | *string* | :heavy_minus_sign: | N/A | +| `externalId` | *string* | :heavy_minus_sign: | N/A | +| `connectionStatus` | [components.NullableIntegrationsAwsConnectionEntityConnectionStatus](../../models/components/nullableintegrationsawsconnectionentityconnectionstatus.md) | :heavy_minus_sign: | N/A | +| `statusText` | *string* | :heavy_minus_sign: | N/A | +| `statusDescription` | *string* | :heavy_minus_sign: | N/A | +| `environmentId` | *string* | :heavy_minus_sign: | N/A | +| `environmentName` | *string* | :heavy_minus_sign: | N/A | +| `regions` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsawsconnectionentityconnectionstatus.md b/docs/models/components/nullableintegrationsawsconnectionentityconnectionstatus.md new file mode 100644 index 00000000..6cf071f9 --- /dev/null +++ b/docs/models/components/nullableintegrationsawsconnectionentityconnectionstatus.md @@ -0,0 +1,16 @@ +# NullableIntegrationsAwsConnectionEntityConnectionStatus + +## Example Usage + +```typescript +import { NullableIntegrationsAwsConnectionEntityConnectionStatus } from "firehydrant/models/components"; + +let value: NullableIntegrationsAwsConnectionEntityConnectionStatus = + "invalid_permissions"; +``` + +## Values + +```typescript +"pending_setup" | "role_assumed" | "cant_assume_role" | "invalid_permissions" | "validated" +``` \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsconnectionentity.md b/docs/models/components/nullableintegrationsconnectionentity.md new file mode 100644 index 00000000..b6eaa83a --- /dev/null +++ b/docs/models/components/nullableintegrationsconnectionentity.md @@ -0,0 +1,27 @@ +# NullableIntegrationsConnectionEntity + +Integrations_ConnectionEntity model + +## Example Usage + +```typescript +import { NullableIntegrationsConnectionEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationsConnectionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `integrationSlug` | *string* | :heavy_minus_sign: | N/A | +| `integrationId` | *string* | :heavy_minus_sign: | N/A | +| `displayName` | *string* | :heavy_minus_sign: | N/A | +| `configurationUrl` | *string* | :heavy_minus_sign: | N/A | +| `authorizedBy` | *string* | :heavy_minus_sign: | N/A | +| `authorizedById` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `details` | [components.NullableIntegrationsConnectionEntityDetails](../../models/components/nullableintegrationsconnectionentitydetails.md) | :heavy_minus_sign: | Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. | +| `defaultAuthorizedActor` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsconnectionentitydetails.md b/docs/models/components/nullableintegrationsconnectionentitydetails.md new file mode 100644 index 00000000..0d1bd606 --- /dev/null +++ b/docs/models/components/nullableintegrationsconnectionentitydetails.md @@ -0,0 +1,16 @@ +# NullableIntegrationsConnectionEntityDetails + +Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. + +## Example Usage + +```typescript +import { NullableIntegrationsConnectionEntityDetails } from "firehydrant/models/components"; + +let value: NullableIntegrationsConnectionEntityDetails = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsintegrationentity.md b/docs/models/components/nullableintegrationsintegrationentity.md new file mode 100644 index 00000000..f80cee3c --- /dev/null +++ b/docs/models/components/nullableintegrationsintegrationentity.md @@ -0,0 +1,28 @@ +# NullableIntegrationsIntegrationEntity + +Integrations_IntegrationEntity model + +## Example Usage + +```typescript +import { NullableIntegrationsIntegrationEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationsIntegrationEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `setupUrl` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `connections` | [components.NullableIntegrationsConnectionEntity](../../models/components/nullableintegrationsconnectionentity.md) | :heavy_minus_sign: | N/A | +| `enabled` | *boolean* | :heavy_minus_sign: | N/A | +| `installed` | *boolean* | :heavy_minus_sign: | N/A | +| `deprecated` | *boolean* | :heavy_minus_sign: | N/A | +| `logo` | [components.NullableIntegrationsIntegrationEntityLogoEntity](../../models/components/nullableintegrationsintegrationentitylogoentity.md) | :heavy_minus_sign: | N/A | +| `natIp` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsintegrationentitylogoentity.md b/docs/models/components/nullableintegrationsintegrationentitylogoentity.md new file mode 100644 index 00000000..709a6b9b --- /dev/null +++ b/docs/models/components/nullableintegrationsintegrationentitylogoentity.md @@ -0,0 +1,15 @@ +# NullableIntegrationsIntegrationEntityLogoEntity + +## Example Usage + +```typescript +import { NullableIntegrationsIntegrationEntityLogoEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationsIntegrationEntityLogoEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `logoUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsmicrosoftteamsv2channelentity.md b/docs/models/components/nullableintegrationsmicrosoftteamsv2channelentity.md new file mode 100644 index 00000000..2ab654bb --- /dev/null +++ b/docs/models/components/nullableintegrationsmicrosoftteamsv2channelentity.md @@ -0,0 +1,22 @@ +# NullableIntegrationsMicrosoftTeamsV2ChannelEntity + +## Example Usage + +```typescript +import { NullableIntegrationsMicrosoftTeamsV2ChannelEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationsMicrosoftTeamsV2ChannelEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `channelId` | *string* | :heavy_minus_sign: | N/A | +| `channelName` | *string* | :heavy_minus_sign: | N/A | +| `msTeamId` | *string* | :heavy_minus_sign: | N/A | +| `teamName` | *string* | :heavy_minus_sign: | N/A | +| `channelUrl` | *string* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `incident` | [components.NullableIncidentEntity](../../models/components/nullableincidententity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationsslackslackchannelentity.md b/docs/models/components/nullableintegrationsslackslackchannelentity.md new file mode 100644 index 00000000..3ccc6a31 --- /dev/null +++ b/docs/models/components/nullableintegrationsslackslackchannelentity.md @@ -0,0 +1,17 @@ +# NullableIntegrationsSlackSlackChannelEntity + +## Example Usage + +```typescript +import { NullableIntegrationsSlackSlackChannelEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationsSlackSlackChannelEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slackChannelId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableintegrationszendesksupportissueentitycustomerentity.md b/docs/models/components/nullableintegrationszendesksupportissueentitycustomerentity.md new file mode 100644 index 00000000..612187d8 --- /dev/null +++ b/docs/models/components/nullableintegrationszendesksupportissueentitycustomerentity.md @@ -0,0 +1,16 @@ +# NullableIntegrationsZendeskSupportIssueEntityCustomerEntity + +## Example Usage + +```typescript +import { NullableIntegrationsZendeskSupportIssueEntityCustomerEntity } from "firehydrant/models/components"; + +let value: NullableIntegrationsZendeskSupportIssueEntityCustomerEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `id` | *string* | :heavy_minus_sign: | UUID of the Customer | +| `name` | *string* | :heavy_minus_sign: | Name of the Customer | \ No newline at end of file diff --git a/docs/models/components/nullablemediaimageentity.md b/docs/models/components/nullablemediaimageentity.md new file mode 100644 index 00000000..12e44bb4 --- /dev/null +++ b/docs/models/components/nullablemediaimageentity.md @@ -0,0 +1,16 @@ +# NullableMediaImageEntity + +## Example Usage + +```typescript +import { NullableMediaImageEntity } from "firehydrant/models/components"; + +let value: NullableMediaImageEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `originalUrl` | *string* | :heavy_minus_sign: | N/A | +| `versionsUrls` | [components.VersionsUrls](../../models/components/versionsurls.md) | :heavy_minus_sign: | An object with keys that can have different versions of an image | \ No newline at end of file diff --git a/docs/models/components/nullablemetricsmetricsentitysortentity.md b/docs/models/components/nullablemetricsmetricsentitysortentity.md new file mode 100644 index 00000000..fa33bfd3 --- /dev/null +++ b/docs/models/components/nullablemetricsmetricsentitysortentity.md @@ -0,0 +1,17 @@ +# NullableMetricsMetricsEntitySortEntity + +## Example Usage + +```typescript +import { NullableMetricsMetricsEntitySortEntity } from "firehydrant/models/components"; + +let value: NullableMetricsMetricsEntitySortEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `field` | *string* | :heavy_minus_sign: | N/A | +| `direction` | *string* | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablemetricsretrospectiveentitysummaryentity.md b/docs/models/components/nullablemetricsretrospectiveentitysummaryentity.md new file mode 100644 index 00000000..2fd9a891 --- /dev/null +++ b/docs/models/components/nullablemetricsretrospectiveentitysummaryentity.md @@ -0,0 +1,21 @@ +# NullableMetricsRetrospectiveEntitySummaryEntity + +## Example Usage + +```typescript +import { NullableMetricsRetrospectiveEntitySummaryEntity } from "firehydrant/models/components"; + +let value: NullableMetricsRetrospectiveEntitySummaryEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `completed` | *number* | :heavy_minus_sign: | N/A | +| `total` | *number* | :heavy_minus_sign: | N/A | +| `incomplete` | *number* | :heavy_minus_sign: | N/A | +| `mean` | *number* | :heavy_minus_sign: | N/A | +| `shortest` | *number* | :heavy_minus_sign: | N/A | +| `longest` | *number* | :heavy_minus_sign: | N/A | +| `completionPercentage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablenunccomponententity.md b/docs/models/components/nullablenunccomponententity.md new file mode 100644 index 00000000..ea411b80 --- /dev/null +++ b/docs/models/components/nullablenunccomponententity.md @@ -0,0 +1,19 @@ +# NullableNuncComponentEntity + +## Example Usage + +```typescript +import { NullableNuncComponentEntity } from "firehydrant/models/components"; + +let value: NullableNuncComponentEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `infrastructureType` | *string* | :heavy_minus_sign: | N/A | +| `infrastructureId` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | +| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablenunccomponentgroupentity.md b/docs/models/components/nullablenunccomponentgroupentity.md new file mode 100644 index 00000000..fc6e05af --- /dev/null +++ b/docs/models/components/nullablenunccomponentgroupentity.md @@ -0,0 +1,18 @@ +# NullableNuncComponentGroupEntity + +## Example Usage + +```typescript +import { NullableNuncComponentGroupEntity } from "firehydrant/models/components"; + +let value: NullableNuncComponentGroupEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablenuncconditionentity.md b/docs/models/components/nullablenuncconditionentity.md new file mode 100644 index 00000000..f9cfafdb --- /dev/null +++ b/docs/models/components/nullablenuncconditionentity.md @@ -0,0 +1,17 @@ +# NullableNuncConditionEntity + +## Example Usage + +```typescript +import { NullableNuncConditionEntity } from "firehydrant/models/components"; + +let value: NullableNuncConditionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncCondition` | *string* | :heavy_minus_sign: | N/A | +| `conditionName` | *string* | :heavy_minus_sign: | N/A | +| `conditionId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableorganizationentity.md b/docs/models/components/nullableorganizationentity.md new file mode 100644 index 00000000..b430da11 --- /dev/null +++ b/docs/models/components/nullableorganizationentity.md @@ -0,0 +1,16 @@ +# NullableOrganizationEntity + +## Example Usage + +```typescript +import { NullableOrganizationEntity } from "firehydrant/models/components"; + +let value: NullableOrganizationEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablepaginationentity.md b/docs/models/components/nullablepaginationentity.md new file mode 100644 index 00000000..e61ae20a --- /dev/null +++ b/docs/models/components/nullablepaginationentity.md @@ -0,0 +1,21 @@ +# NullablePaginationEntity + +## Example Usage + +```typescript +import { NullablePaginationEntity } from "firehydrant/models/components"; + +let value: NullablePaginationEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `count` | *number* | :heavy_minus_sign: | N/A | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `items` | *number* | :heavy_minus_sign: | N/A | +| `pages` | *number* | :heavy_minus_sign: | N/A | +| `last` | *number* | :heavy_minus_sign: | N/A | +| `prev` | *number* | :heavy_minus_sign: | N/A | +| `next` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablepostmortemsquestionentity.md b/docs/models/components/nullablepostmortemsquestionentity.md new file mode 100644 index 00000000..c08dc148 --- /dev/null +++ b/docs/models/components/nullablepostmortemsquestionentity.md @@ -0,0 +1,23 @@ +# NullablePostMortemsQuestionEntity + +## Example Usage + +```typescript +import { NullablePostMortemsQuestionEntity } from "firehydrant/models/components"; + +let value: NullablePostMortemsQuestionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `body` | *string* | :heavy_minus_sign: | N/A | +| `tooltip` | *string* | :heavy_minus_sign: | N/A | +| `kind` | *string* | :heavy_minus_sign: | N/A | +| `questionTypeId` | *string* | :heavy_minus_sign: | N/A | +| `isRequired` | *boolean* | :heavy_minus_sign: | N/A | +| `availableOptions` | *string*[] | :heavy_minus_sign: | N/A | +| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablepublicapiv1incidentssuccinctentity.md b/docs/models/components/nullablepublicapiv1incidentssuccinctentity.md new file mode 100644 index 00000000..15f94060 --- /dev/null +++ b/docs/models/components/nullablepublicapiv1incidentssuccinctentity.md @@ -0,0 +1,17 @@ +# NullablePublicApiv1IncidentsSuccinctEntity + +## Example Usage + +```typescript +import { NullablePublicApiv1IncidentsSuccinctEntity } from "firehydrant/models/components"; + +let value: NullablePublicApiv1IncidentsSuccinctEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `number` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerulesruleentity.md b/docs/models/components/nullablerulesruleentity.md new file mode 100644 index 00000000..4974144b --- /dev/null +++ b/docs/models/components/nullablerulesruleentity.md @@ -0,0 +1,16 @@ +# NullableRulesRuleEntity + +## Example Usage + +```typescript +import { NullableRulesRuleEntity } from "firehydrant/models/components"; + +let value: NullableRulesRuleEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `logic` | [components.NullableRulesRuleEntityLogic](../../models/components/nullablerulesruleentitylogic.md) | :heavy_minus_sign: | An unstructured object of key/value pairs describing the logic for applying the rule. | +| `userData` | [components.NullableFHTypesGenericEntity](../../models/components/nullablefhtypesgenericentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerulesruleentitylogic.md b/docs/models/components/nullablerulesruleentitylogic.md new file mode 100644 index 00000000..8a797981 --- /dev/null +++ b/docs/models/components/nullablerulesruleentitylogic.md @@ -0,0 +1,16 @@ +# NullableRulesRuleEntityLogic + +An unstructured object of key/value pairs describing the logic for applying the rule. + +## Example Usage + +```typescript +import { NullableRulesRuleEntityLogic } from "firehydrant/models/components"; + +let value: NullableRulesRuleEntityLogic = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksactionconfigentity.md b/docs/models/components/nullablerunbooksactionconfigentity.md new file mode 100644 index 00000000..66e969b8 --- /dev/null +++ b/docs/models/components/nullablerunbooksactionconfigentity.md @@ -0,0 +1,16 @@ +# NullableRunbooksActionConfigEntity + +## Example Usage + +```typescript +import { NullableRunbooksActionConfigEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksActionConfigEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `elements` | [components.NullableRunbooksElementEntity](../../models/components/nullablerunbookselemententity.md) | :heavy_minus_sign: | N/A | +| `documentationUrl` | *string* | :heavy_minus_sign: | Location of documentation for this action | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksactionsentity.md b/docs/models/components/nullablerunbooksactionsentity.md new file mode 100644 index 00000000..14dd6c88 --- /dev/null +++ b/docs/models/components/nullablerunbooksactionsentity.md @@ -0,0 +1,30 @@ +# NullableRunbooksActionsEntity + +## Example Usage + +```typescript +import { NullableRunbooksActionsEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksActionsEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `config` | [components.NullableRunbooksActionConfigEntity](../../models/components/nullablerunbooksactionconfigentity.md) | :heavy_minus_sign: | N/A | +| `category` | *string* | :heavy_minus_sign: | N/A | +| `prerequisites` | [components.NullableRunbooksActionsEntityPrerequisites](../../models/components/nullablerunbooksactionsentityprerequisites.md) | :heavy_minus_sign: | N/A | +| `integration` | [components.NullableIntegrationsIntegrationEntity](../../models/components/nullableintegrationsintegrationentity.md) | :heavy_minus_sign: | N/A | +| `supportedRunbookTypes` | *string*[] | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `automatable` | *boolean* | :heavy_minus_sign: | N/A | +| `rerunnable` | *boolean* | :heavy_minus_sign: | N/A | +| `repeatable` | *boolean* | :heavy_minus_sign: | N/A | +| `defaultLogic` | [components.NullableRunbooksActionsEntityDefaultLogic](../../models/components/nullablerunbooksactionsentitydefaultlogic.md) | :heavy_minus_sign: | N/A | +| `defaultRuleData` | [components.NullableRunbooksActionsEntityDefaultRuleData](../../models/components/nullablerunbooksactionsentitydefaultruledata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksactionsentitydefaultlogic.md b/docs/models/components/nullablerunbooksactionsentitydefaultlogic.md new file mode 100644 index 00000000..f9338328 --- /dev/null +++ b/docs/models/components/nullablerunbooksactionsentitydefaultlogic.md @@ -0,0 +1,14 @@ +# NullableRunbooksActionsEntityDefaultLogic + +## Example Usage + +```typescript +import { NullableRunbooksActionsEntityDefaultLogic } from "firehydrant/models/components"; + +let value: NullableRunbooksActionsEntityDefaultLogic = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksactionsentitydefaultruledata.md b/docs/models/components/nullablerunbooksactionsentitydefaultruledata.md new file mode 100644 index 00000000..cbd7f3e8 --- /dev/null +++ b/docs/models/components/nullablerunbooksactionsentitydefaultruledata.md @@ -0,0 +1,14 @@ +# NullableRunbooksActionsEntityDefaultRuleData + +## Example Usage + +```typescript +import { NullableRunbooksActionsEntityDefaultRuleData } from "firehydrant/models/components"; + +let value: NullableRunbooksActionsEntityDefaultRuleData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksactionsentityprerequisites.md b/docs/models/components/nullablerunbooksactionsentityprerequisites.md new file mode 100644 index 00000000..05c4c0be --- /dev/null +++ b/docs/models/components/nullablerunbooksactionsentityprerequisites.md @@ -0,0 +1,14 @@ +# NullableRunbooksActionsEntityPrerequisites + +## Example Usage + +```typescript +import { NullableRunbooksActionsEntityPrerequisites } from "firehydrant/models/components"; + +let value: NullableRunbooksActionsEntityPrerequisites = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookselementdynamicselectentity.md b/docs/models/components/nullablerunbookselementdynamicselectentity.md new file mode 100644 index 00000000..5fc63b47 --- /dev/null +++ b/docs/models/components/nullablerunbookselementdynamicselectentity.md @@ -0,0 +1,22 @@ +# NullableRunbooksElementDynamicSelectEntity + +## Example Usage + +```typescript +import { NullableRunbooksElementDynamicSelectEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksElementDynamicSelectEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `placeholder` | *string* | :heavy_minus_sign: | N/A | +| `asyncUrl` | *string* | :heavy_minus_sign: | N/A | +| `required` | *boolean* | :heavy_minus_sign: | N/A | +| `clearable` | *boolean* | :heavy_minus_sign: | N/A | +| `isMulti` | *boolean* | :heavy_minus_sign: | N/A | +| `defaultValue` | [components.NullableRunbooksElementDynamicSelectEntitySelectOptionEntity](../../models/components/nullablerunbookselementdynamicselectentityselectoptionentity.md) | :heavy_minus_sign: | N/A | +| `options` | [components.RunbooksElementDynamicSelectEntitySelectOptionEntity](../../models/components/runbookselementdynamicselectentityselectoptionentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookselementdynamicselectentityselectoptionentity.md b/docs/models/components/nullablerunbookselementdynamicselectentityselectoptionentity.md new file mode 100644 index 00000000..dfc61c8b --- /dev/null +++ b/docs/models/components/nullablerunbookselementdynamicselectentityselectoptionentity.md @@ -0,0 +1,16 @@ +# NullableRunbooksElementDynamicSelectEntitySelectOptionEntity + +## Example Usage + +```typescript +import { NullableRunbooksElementDynamicSelectEntitySelectOptionEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksElementDynamicSelectEntitySelectOptionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `value` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookselemententity.md b/docs/models/components/nullablerunbookselemententity.md new file mode 100644 index 00000000..1cec6819 --- /dev/null +++ b/docs/models/components/nullablerunbookselemententity.md @@ -0,0 +1,21 @@ +# NullableRunbooksElementEntity + +## Example Usage + +```typescript +import { NullableRunbooksElementEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksElementEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `markdown` | [components.NullableRunbooksElementMarkdownEntity](../../models/components/nullablerunbookselementmarkdownentity.md) | :heavy_minus_sign: | N/A | +| `textarea` | [components.NullableRunbooksElementTextareaEntity](../../models/components/nullablerunbookselementtextareaentity.md) | :heavy_minus_sign: | N/A | +| `input` | [components.NullableRunbooksElementInputEntity](../../models/components/nullablerunbookselementinputentity.md) | :heavy_minus_sign: | N/A | +| `plainText` | [components.NullableRunbooksElementMarkdownEntity](../../models/components/nullablerunbookselementmarkdownentity.md) | :heavy_minus_sign: | N/A | +| `dynamicSelect` | [components.NullableRunbooksElementDynamicSelectEntity](../../models/components/nullablerunbookselementdynamicselectentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookselementinputentity.md b/docs/models/components/nullablerunbookselementinputentity.md new file mode 100644 index 00000000..e2807800 --- /dev/null +++ b/docs/models/components/nullablerunbookselementinputentity.md @@ -0,0 +1,18 @@ +# NullableRunbooksElementInputEntity + +## Example Usage + +```typescript +import { NullableRunbooksElementInputEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksElementInputEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `placeholder` | *string* | :heavy_minus_sign: | N/A | +| `defaultValue` | *string* | :heavy_minus_sign: | N/A | +| `required` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookselementmarkdownentity.md b/docs/models/components/nullablerunbookselementmarkdownentity.md new file mode 100644 index 00000000..5ba5f034 --- /dev/null +++ b/docs/models/components/nullablerunbookselementmarkdownentity.md @@ -0,0 +1,15 @@ +# NullableRunbooksElementMarkdownEntity + +## Example Usage + +```typescript +import { NullableRunbooksElementMarkdownEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksElementMarkdownEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `text` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookselementtextareaentity.md b/docs/models/components/nullablerunbookselementtextareaentity.md new file mode 100644 index 00000000..9f5b94ba --- /dev/null +++ b/docs/models/components/nullablerunbookselementtextareaentity.md @@ -0,0 +1,17 @@ +# NullableRunbooksElementTextareaEntity + +## Example Usage + +```typescript +import { NullableRunbooksElementTextareaEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksElementTextareaEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `placeholder` | *string* | :heavy_minus_sign: | N/A | +| `defaultValue` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksexecutionentityexecutedforentity.md b/docs/models/components/nullablerunbooksexecutionentityexecutedforentity.md new file mode 100644 index 00000000..85fbeb94 --- /dev/null +++ b/docs/models/components/nullablerunbooksexecutionentityexecutedforentity.md @@ -0,0 +1,17 @@ +# NullableRunbooksExecutionEntityExecutedForEntity + +## Example Usage + +```typescript +import { NullableRunbooksExecutionEntityExecutedForEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksExecutionEntityExecutedForEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksexecutionstepentity.md b/docs/models/components/nullablerunbooksexecutionstepentity.md new file mode 100644 index 00000000..f562050b --- /dev/null +++ b/docs/models/components/nullablerunbooksexecutionstepentity.md @@ -0,0 +1,33 @@ +# NullableRunbooksExecutionStepEntity + +## Example Usage + +```typescript +import { NullableRunbooksExecutionStepEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksExecutionStepEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `actionSlug` | *string* | :heavy_minus_sign: | N/A | +| `actionType` | *string* | :heavy_minus_sign: | N/A | +| `integrationName` | *string* | :heavy_minus_sign: | N/A | +| `integrationSlug` | *string* | :heavy_minus_sign: | N/A | +| `automatic` | *boolean* | :heavy_minus_sign: | N/A | +| `config` | [components.NullableRunbooksExecutionStepEntityConfig](../../models/components/nullablerunbooksexecutionstepentityconfig.md) | :heavy_minus_sign: | N/A | +| `stepElements` | [components.NullableRunbooksExecutionStepEntityStepElement](../../models/components/nullablerunbooksexecutionstepentitystepelement.md)[] | :heavy_minus_sign: | N/A | +| `executable` | *boolean* | :heavy_minus_sign: | N/A | +| `repeats` | *boolean* | :heavy_minus_sign: | N/A | +| `repeatsDuration` | *string* | :heavy_minus_sign: | ISO8601 formatted duration string | +| `repeatsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `hasBeenRerun` | *boolean* | :heavy_minus_sign: | N/A | +| `hasBeenRetried` | *boolean* | :heavy_minus_sign: | N/A | +| `execution` | [components.NullableRunbooksExecutionStepExecutionEntity](../../models/components/nullablerunbooksexecutionstepexecutionentity.md) | :heavy_minus_sign: | N/A | +| `repeatable` | *boolean* | :heavy_minus_sign: | N/A | +| `conferenceBridge` | [components.NullableIncidentsConferenceBridgeEntity](../../models/components/nullableincidentsconferencebridgeentity.md) | :heavy_minus_sign: | N/A | +| `rule` | [components.NullableRulesRuleEntity](../../models/components/nullablerulesruleentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksexecutionstepentityconfig.md b/docs/models/components/nullablerunbooksexecutionstepentityconfig.md new file mode 100644 index 00000000..bf48ba6d --- /dev/null +++ b/docs/models/components/nullablerunbooksexecutionstepentityconfig.md @@ -0,0 +1,14 @@ +# NullableRunbooksExecutionStepEntityConfig + +## Example Usage + +```typescript +import { NullableRunbooksExecutionStepEntityConfig } from "firehydrant/models/components"; + +let value: NullableRunbooksExecutionStepEntityConfig = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksexecutionstepentitystepelement.md b/docs/models/components/nullablerunbooksexecutionstepentitystepelement.md new file mode 100644 index 00000000..acb8cef0 --- /dev/null +++ b/docs/models/components/nullablerunbooksexecutionstepentitystepelement.md @@ -0,0 +1,14 @@ +# NullableRunbooksExecutionStepEntityStepElement + +## Example Usage + +```typescript +import { NullableRunbooksExecutionStepEntityStepElement } from "firehydrant/models/components"; + +let value: NullableRunbooksExecutionStepEntityStepElement = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksexecutionstepexecutionentity.md b/docs/models/components/nullablerunbooksexecutionstepexecutionentity.md new file mode 100644 index 00000000..8e415a4b --- /dev/null +++ b/docs/models/components/nullablerunbooksexecutionstepexecutionentity.md @@ -0,0 +1,21 @@ +# NullableRunbooksExecutionStepExecutionEntity + +## Example Usage + +```typescript +import { NullableRunbooksExecutionStepExecutionEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksExecutionStepExecutionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `state` | [components.NullableRunbooksExecutionStepExecutionEntityState](../../models/components/nullablerunbooksexecutionstepexecutionentitystate.md) | :heavy_minus_sign: | N/A | +| `data` | [components.NullableRunbooksExecutionStepExecutionEntityData](../../models/components/nullablerunbooksexecutionstepexecutionentitydata.md) | :heavy_minus_sign: | N/A | +| `performedBy` | [components.NullableActorEntity](../../models/components/nullableactorentity.md) | :heavy_minus_sign: | N/A | +| `performedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `scheduledFor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `error` | *string* | :heavy_minus_sign: | N/A | +| `webhookDelivery` | [components.NullableRunbooksWebhookDeliveryEntity](../../models/components/nullablerunbookswebhookdeliveryentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksexecutionstepexecutionentitydata.md b/docs/models/components/nullablerunbooksexecutionstepexecutionentitydata.md new file mode 100644 index 00000000..16898e9e --- /dev/null +++ b/docs/models/components/nullablerunbooksexecutionstepexecutionentitydata.md @@ -0,0 +1,14 @@ +# NullableRunbooksExecutionStepExecutionEntityData + +## Example Usage + +```typescript +import { NullableRunbooksExecutionStepExecutionEntityData } from "firehydrant/models/components"; + +let value: NullableRunbooksExecutionStepExecutionEntityData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbooksexecutionstepexecutionentitystate.md b/docs/models/components/nullablerunbooksexecutionstepexecutionentitystate.md new file mode 100644 index 00000000..64ff64c0 --- /dev/null +++ b/docs/models/components/nullablerunbooksexecutionstepexecutionentitystate.md @@ -0,0 +1,15 @@ +# NullableRunbooksExecutionStepExecutionEntityState + +## Example Usage + +```typescript +import { NullableRunbooksExecutionStepExecutionEntityState } from "firehydrant/models/components"; + +let value: NullableRunbooksExecutionStepExecutionEntityState = "errored"; +``` + +## Values + +```typescript +"initial" | "pending" | "scheduled" | "started" | "dismissed" | "completed" | "errored" +``` \ No newline at end of file diff --git a/docs/models/components/nullablerunbookstepentity.md b/docs/models/components/nullablerunbookstepentity.md new file mode 100644 index 00000000..bf1a431a --- /dev/null +++ b/docs/models/components/nullablerunbookstepentity.md @@ -0,0 +1,28 @@ +# NullableRunbookStepEntity + +## Example Usage + +```typescript +import { NullableRunbookStepEntity } from "firehydrant/models/components"; + +let value: NullableRunbookStepEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `actionId` | *string* | :heavy_minus_sign: | N/A | +| `stepId` | *string* | :heavy_minus_sign: | N/A | +| `config` | [components.NullableRunbookStepEntityConfig](../../models/components/nullablerunbookstepentityconfig.md) | :heavy_minus_sign: | An unstructured object of key/value pairs describing the config settings for the step. | +| `actionElements` | [components.ActionElement](../../models/components/actionelement.md)[] | :heavy_minus_sign: | A list of action elements | +| `stepElements` | [components.NullableRunbookStepEntityStepElement](../../models/components/nullablerunbookstepentitystepelement.md)[] | :heavy_minus_sign: | A list of step elements | +| `automatic` | *boolean* | :heavy_minus_sign: | N/A | +| `delayDuration` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `action` | [components.NullableRunbooksActionsEntity](../../models/components/nullablerunbooksactionsentity.md) | :heavy_minus_sign: | N/A | +| `reruns` | *boolean* | :heavy_minus_sign: | N/A | +| `repeats` | *boolean* | :heavy_minus_sign: | N/A | +| `repeatsDuration` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `votes` | [components.NullableVotesEntity](../../models/components/nullablevotesentity.md) | :heavy_minus_sign: | N/A | +| `rule` | [components.NullableRulesRuleEntity](../../models/components/nullablerulesruleentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookstepentityconfig.md b/docs/models/components/nullablerunbookstepentityconfig.md new file mode 100644 index 00000000..8d476180 --- /dev/null +++ b/docs/models/components/nullablerunbookstepentityconfig.md @@ -0,0 +1,16 @@ +# NullableRunbookStepEntityConfig + +An unstructured object of key/value pairs describing the config settings for the step. + +## Example Usage + +```typescript +import { NullableRunbookStepEntityConfig } from "firehydrant/models/components"; + +let value: NullableRunbookStepEntityConfig = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookstepentitystepelement.md b/docs/models/components/nullablerunbookstepentitystepelement.md new file mode 100644 index 00000000..5df85c33 --- /dev/null +++ b/docs/models/components/nullablerunbookstepentitystepelement.md @@ -0,0 +1,14 @@ +# NullableRunbookStepEntityStepElement + +## Example Usage + +```typescript +import { NullableRunbookStepEntityStepElement } from "firehydrant/models/components"; + +let value: NullableRunbookStepEntityStepElement = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullablerunbookswebhookdeliveryentity.md b/docs/models/components/nullablerunbookswebhookdeliveryentity.md new file mode 100644 index 00000000..c78e7daa --- /dev/null +++ b/docs/models/components/nullablerunbookswebhookdeliveryentity.md @@ -0,0 +1,16 @@ +# NullableRunbooksWebhookDeliveryEntity + +## Example Usage + +```typescript +import { NullableRunbooksWebhookDeliveryEntity } from "firehydrant/models/components"; + +let value: NullableRunbooksWebhookDeliveryEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `headers` | *string* | :heavy_minus_sign: | N/A | +| `statusCode` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablescheduleentity.md b/docs/models/components/nullablescheduleentity.md new file mode 100644 index 00000000..f427ceb0 --- /dev/null +++ b/docs/models/components/nullablescheduleentity.md @@ -0,0 +1,18 @@ +# NullableScheduleEntity + +## Example Usage + +```typescript +import { NullableScheduleEntity } from "firehydrant/models/components"; + +let value: NullableScheduleEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `integration` | *string* | :heavy_minus_sign: | N/A | +| `discarded` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableserviceentity.md b/docs/models/components/nullableserviceentity.md new file mode 100644 index 00000000..6dc92887 --- /dev/null +++ b/docs/models/components/nullableserviceentity.md @@ -0,0 +1,40 @@ +# NullableServiceEntity + +ServiceEntity model + +## Example Usage + +```typescript +import { NullableServiceEntity } from "firehydrant/models/components"; + +let value: NullableServiceEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `serviceTier` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `allowedParams` | *string*[] | :heavy_minus_sign: | N/A | +| `labels` | [components.NullableServiceEntityLabels](../../models/components/nullableserviceentitylabels.md) | :heavy_minus_sign: | An object of label key and values | +| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | +| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | +| `activeIncidents` | *string*[] | :heavy_minus_sign: | List of active incident guids | +| `checklists` | [components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)[] | :heavy_minus_sign: | List of checklists associated with a service | +| `completedChecks` | *number* | :heavy_minus_sign: | N/A | +| `externalResources` | [components.ExternalResourceEntity](../../models/components/externalresourceentity.md)[] | :heavy_minus_sign: | Information about known linkages to representations of services outside of FireHydrant. | +| `functionalities` | [components.FunctionalityEntity](../../models/components/functionalityentity.md)[] | :heavy_minus_sign: | List of functionalities attached to the service | +| `lastImport` | [components.NullableImportsImportableResourceEntity](../../models/components/nullableimportsimportableresourceentity.md) | :heavy_minus_sign: | N/A | +| `links` | [components.LinksEntity](../../models/components/linksentity.md)[] | :heavy_minus_sign: | List of links attached to this service. | +| `managedBy` | *string* | :heavy_minus_sign: | If set, this field indicates that the service is managed by an integration and thus cannot be set manually | +| `managedBySettings` | [components.NullableServiceEntityManagedBySettings](../../models/components/nullableserviceentitymanagedbysettings.md) | :heavy_minus_sign: | Indicates the settings of the catalog that manages this service | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | +| `serviceChecklistUpdatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `teams` | [components.TeamEntityLite](../../models/components/teamentitylite.md)[] | :heavy_minus_sign: | List of teams attached to the service | +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableserviceentitylabels.md b/docs/models/components/nullableserviceentitylabels.md new file mode 100644 index 00000000..8a8b2994 --- /dev/null +++ b/docs/models/components/nullableserviceentitylabels.md @@ -0,0 +1,16 @@ +# NullableServiceEntityLabels + +An object of label key and values + +## Example Usage + +```typescript +import { NullableServiceEntityLabels } from "firehydrant/models/components"; + +let value: NullableServiceEntityLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableserviceentitymanagedbysettings.md b/docs/models/components/nullableserviceentitymanagedbysettings.md new file mode 100644 index 00000000..1a808ec4 --- /dev/null +++ b/docs/models/components/nullableserviceentitymanagedbysettings.md @@ -0,0 +1,16 @@ +# NullableServiceEntityManagedBySettings + +Indicates the settings of the catalog that manages this service + +## Example Usage + +```typescript +import { NullableServiceEntityManagedBySettings } from "firehydrant/models/components"; + +let value: NullableServiceEntityManagedBySettings = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableseveritymatrixconditionentity.md b/docs/models/components/nullableseveritymatrixconditionentity.md new file mode 100644 index 00000000..cd015521 --- /dev/null +++ b/docs/models/components/nullableseveritymatrixconditionentity.md @@ -0,0 +1,19 @@ +# NullableSeverityMatrixConditionEntity + +SeverityMatrix_ConditionEntity model + +## Example Usage + +```typescript +import { NullableSeverityMatrixConditionEntity } from "firehydrant/models/components"; + +let value: NullableSeverityMatrixConditionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition | \ No newline at end of file diff --git a/docs/models/components/nullableseveritymatriximpactentity.md b/docs/models/components/nullableseveritymatriximpactentity.md new file mode 100644 index 00000000..03115648 --- /dev/null +++ b/docs/models/components/nullableseveritymatriximpactentity.md @@ -0,0 +1,21 @@ +# NullableSeverityMatrixImpactEntity + +SeverityMatrix_ImpactEntity model + +## Example Usage + +```typescript +import { NullableSeverityMatrixImpactEntity } from "firehydrant/models/components"; + +let value: NullableSeverityMatrixImpactEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `affectsId` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablesignalsapiruleentity.md b/docs/models/components/nullablesignalsapiruleentity.md new file mode 100644 index 00000000..6e6ed008 --- /dev/null +++ b/docs/models/components/nullablesignalsapiruleentity.md @@ -0,0 +1,28 @@ +# NullableSignalsAPIRuleEntity + +## Example Usage + +```typescript +import { NullableSignalsAPIRuleEntity } from "firehydrant/models/components"; + +let value: NullableSignalsAPIRuleEntity = { + deduplicationExpiry: "PT1H", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | | +| `name` | *string* | :heavy_minus_sign: | N/A | | +| `expression` | *string* | :heavy_minus_sign: | N/A | | +| `teamId` | *string* | :heavy_minus_sign: | N/A | | +| `target` | [components.NullableSignalsAPITargetEntity](../../models/components/nullablesignalsapitargetentity.md) | :heavy_minus_sign: | N/A | | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | +| `incidentType` | [components.NullableSuccinctEntity](../../models/components/nullablesuccinctentity.md) | :heavy_minus_sign: | N/A | | +| `notificationPriorityOverride` | [components.NullableSignalsAPIRuleEntityNotificationPriorityOverride](../../models/components/nullablesignalsapiruleentitynotificationpriorityoverride.md) | :heavy_minus_sign: | N/A | | +| `createIncidentConditionWhen` | [components.NullableSignalsAPIRuleEntityCreateIncidentConditionWhen](../../models/components/nullablesignalsapiruleentitycreateincidentconditionwhen.md) | :heavy_minus_sign: | N/A | | +| `deduplicationExpiry` | *string* | :heavy_minus_sign: | Duration for deduplicating similar alerts (ISO8601 duration format e.g., 'PT30M', 'PT2H', 'P1D') | PT1H | \ No newline at end of file diff --git a/docs/models/components/nullablesignalsapiruleentitycreateincidentconditionwhen.md b/docs/models/components/nullablesignalsapiruleentitycreateincidentconditionwhen.md new file mode 100644 index 00000000..d26811ee --- /dev/null +++ b/docs/models/components/nullablesignalsapiruleentitycreateincidentconditionwhen.md @@ -0,0 +1,16 @@ +# NullableSignalsAPIRuleEntityCreateIncidentConditionWhen + +## Example Usage + +```typescript +import { NullableSignalsAPIRuleEntityCreateIncidentConditionWhen } from "firehydrant/models/components"; + +let value: NullableSignalsAPIRuleEntityCreateIncidentConditionWhen = + "WHEN_UNSPECIFIED"; +``` + +## Values + +```typescript +"WHEN_UNSPECIFIED" | "WHEN_ALWAYS" +``` \ No newline at end of file diff --git a/docs/models/components/nullablesignalsapiruleentitynotificationpriorityoverride.md b/docs/models/components/nullablesignalsapiruleentitynotificationpriorityoverride.md new file mode 100644 index 00000000..958a59a5 --- /dev/null +++ b/docs/models/components/nullablesignalsapiruleentitynotificationpriorityoverride.md @@ -0,0 +1,15 @@ +# NullableSignalsAPIRuleEntityNotificationPriorityOverride + +## Example Usage + +```typescript +import { NullableSignalsAPIRuleEntityNotificationPriorityOverride } from "firehydrant/models/components"; + +let value: NullableSignalsAPIRuleEntityNotificationPriorityOverride = "HIGH"; +``` + +## Values + +```typescript +"HIGH" | "MEDIUM" | "LOW" +``` \ No newline at end of file diff --git a/docs/models/components/nullablesignalsapitargetentity.md b/docs/models/components/nullablesignalsapitargetentity.md new file mode 100644 index 00000000..0de5e2b9 --- /dev/null +++ b/docs/models/components/nullablesignalsapitargetentity.md @@ -0,0 +1,18 @@ +# NullableSignalsAPITargetEntity + +## Example Usage + +```typescript +import { NullableSignalsAPITargetEntity } from "firehydrant/models/components"; + +let value: NullableSignalsAPITargetEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `isPageable` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablesignalsapitransposerentity.md b/docs/models/components/nullablesignalsapitransposerentity.md new file mode 100644 index 00000000..b55b0a10 --- /dev/null +++ b/docs/models/components/nullablesignalsapitransposerentity.md @@ -0,0 +1,26 @@ +# NullableSignalsAPITransposerEntity + +## Example Usage + +```typescript +import { NullableSignalsAPITransposerEntity } from "firehydrant/models/components"; + +let value: NullableSignalsAPITransposerEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `examplePayload` | [components.ExamplePayload](../../models/components/examplepayload.md) | :heavy_minus_sign: | N/A | +| `expression` | *string* | :heavy_minus_sign: | N/A | +| `expected` | *string* | :heavy_minus_sign: | N/A | +| `website` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `tags` | *string*[] | :heavy_minus_sign: | N/A | +| `ingestUrl` | *string* | :heavy_minus_sign: | N/A | +| `editable` | *boolean* | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableslimrunbookentity.md b/docs/models/components/nullableslimrunbookentity.md new file mode 100644 index 00000000..ba07eeab --- /dev/null +++ b/docs/models/components/nullableslimrunbookentity.md @@ -0,0 +1,24 @@ +# NullableSlimRunbookEntity + +## Example Usage + +```typescript +import { NullableSlimRunbookEntity } from "firehydrant/models/components"; + +let value: NullableSlimRunbookEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `attachmentRule` | [components.NullableRulesRuleEntity](../../models/components/nullablerulesruleentity.md) | :heavy_minus_sign: | N/A | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | +| `categories` | *string*[] | :heavy_minus_sign: | categories the runbook applies to | \ No newline at end of file diff --git a/docs/models/components/nullablesuccinctentity.md b/docs/models/components/nullablesuccinctentity.md new file mode 100644 index 00000000..487ffa07 --- /dev/null +++ b/docs/models/components/nullablesuccinctentity.md @@ -0,0 +1,16 @@ +# NullableSuccinctEntity + +## Example Usage + +```typescript +import { NullableSuccinctEntity } from "firehydrant/models/components"; + +let value: NullableSuccinctEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullabletasklistitementity.md b/docs/models/components/nullabletasklistitementity.md new file mode 100644 index 00000000..3d7b1949 --- /dev/null +++ b/docs/models/components/nullabletasklistitementity.md @@ -0,0 +1,16 @@ +# NullableTaskListItemEntity + +## Example Usage + +```typescript +import { NullableTaskListItemEntity } from "firehydrant/models/components"; + +let value: NullableTaskListItemEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableteamentitylite.md b/docs/models/components/nullableteamentitylite.md new file mode 100644 index 00000000..1cb1e167 --- /dev/null +++ b/docs/models/components/nullableteamentitylite.md @@ -0,0 +1,23 @@ +# NullableTeamEntityLite + +## Example Usage + +```typescript +import { NullableTeamEntityLite } from "firehydrant/models/components"; + +let value: NullableTeamEntityLite = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `signalsIcalUrl` | *string* | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `inSupportHours` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableticketingpriorityentity.md b/docs/models/components/nullableticketingpriorityentity.md new file mode 100644 index 00000000..9e4fe07c --- /dev/null +++ b/docs/models/components/nullableticketingpriorityentity.md @@ -0,0 +1,21 @@ +# NullableTicketingPriorityEntity + +Ticketing_PriorityEntity model + +## Example Usage + +```typescript +import { NullableTicketingPriorityEntity } from "firehydrant/models/components"; + +let value: NullableTicketingPriorityEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableticketingprojectconfigentity.md b/docs/models/components/nullableticketingprojectconfigentity.md new file mode 100644 index 00000000..5f9ce6d2 --- /dev/null +++ b/docs/models/components/nullableticketingprojectconfigentity.md @@ -0,0 +1,22 @@ +# NullableTicketingProjectConfigEntity + +Ticketing_ProjectConfigEntity model + +## Example Usage + +```typescript +import { NullableTicketingProjectConfigEntity } from "firehydrant/models/components"; + +let value: NullableTicketingProjectConfigEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `connectionId` | *string* | :heavy_minus_sign: | N/A | +| `connectionType` | *string* | :heavy_minus_sign: | N/A | +| `ticketingProjectId` | *string* | :heavy_minus_sign: | N/A | +| `ticketingProjectName` | *string* | :heavy_minus_sign: | N/A | +| `details` | [components.NullableTicketingProjectConfigEntityDetails](../../models/components/nullableticketingprojectconfigentitydetails.md) | :heavy_minus_sign: | A config object containing details about the project config. Can be one of: Ticketing::JiraCloud::ProjectConfigEntity, Ticketing::JiraOnprem::ProjectConfigEntity, or Ticketing::Shortcut::ProjectConfigEntity | \ No newline at end of file diff --git a/docs/models/components/nullableticketingprojectconfigentitydetails.md b/docs/models/components/nullableticketingprojectconfigentitydetails.md new file mode 100644 index 00000000..05bb44ca --- /dev/null +++ b/docs/models/components/nullableticketingprojectconfigentitydetails.md @@ -0,0 +1,16 @@ +# NullableTicketingProjectConfigEntityDetails + +A config object containing details about the project config. Can be one of: Ticketing::JiraCloud::ProjectConfigEntity, Ticketing::JiraOnprem::ProjectConfigEntity, or Ticketing::Shortcut::ProjectConfigEntity + +## Example Usage + +```typescript +import { NullableTicketingProjectConfigEntityDetails } from "firehydrant/models/components"; + +let value: NullableTicketingProjectConfigEntityDetails = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableticketingprojectfieldmapcaseselseentity.md b/docs/models/components/nullableticketingprojectfieldmapcaseselseentity.md new file mode 100644 index 00000000..e5121503 --- /dev/null +++ b/docs/models/components/nullableticketingprojectfieldmapcaseselseentity.md @@ -0,0 +1,15 @@ +# NullableTicketingProjectFieldMapCasesElseEntity + +## Example Usage + +```typescript +import { NullableTicketingProjectFieldMapCasesElseEntity } from "firehydrant/models/components"; + +let value: NullableTicketingProjectFieldMapCasesElseEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `externalValue` | [components.NullableTicketingProjectFieldMapExternalValueEntity](../../models/components/nullableticketingprojectfieldmapexternalvalueentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableticketingprojectfieldmapentity.md b/docs/models/components/nullableticketingprojectfieldmapentity.md new file mode 100644 index 00000000..f7c62946 --- /dev/null +++ b/docs/models/components/nullableticketingprojectfieldmapentity.md @@ -0,0 +1,21 @@ +# NullableTicketingProjectFieldMapEntity + +Ticketing_ProjectFieldMapEntity model + +## Example Usage + +```typescript +import { NullableTicketingProjectFieldMapEntity } from "firehydrant/models/components"; + +let value: NullableTicketingProjectFieldMapEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `connectionId` | *string* | :heavy_minus_sign: | N/A | +| `connectionType` | *string* | :heavy_minus_sign: | N/A | +| `ticketingProjectId` | *string* | :heavy_minus_sign: | N/A | +| `body` | [components.TicketingProjectFieldMapBodyEntity](../../models/components/ticketingprojectfieldmapbodyentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableticketingprojectfieldmapexternalvalueentity.md b/docs/models/components/nullableticketingprojectfieldmapexternalvalueentity.md new file mode 100644 index 00000000..bcd5d5cb --- /dev/null +++ b/docs/models/components/nullableticketingprojectfieldmapexternalvalueentity.md @@ -0,0 +1,18 @@ +# NullableTicketingProjectFieldMapExternalValueEntity + +## Example Usage + +```typescript +import { NullableTicketingProjectFieldMapExternalValueEntity } from "firehydrant/models/components"; + +let value: NullableTicketingProjectFieldMapExternalValueEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [components.NullableTicketingProjectFieldMapExternalValueEntityType](../../models/components/nullableticketingprojectfieldmapexternalvalueentitytype.md) | :heavy_minus_sign: | N/A | +| `value` | *string* | :heavy_minus_sign: | N/A | +| `attribute` | *string* | :heavy_minus_sign: | N/A | +| `presentation` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableticketingprojectfieldmapexternalvalueentitytype.md b/docs/models/components/nullableticketingprojectfieldmapexternalvalueentitytype.md new file mode 100644 index 00000000..8637167c --- /dev/null +++ b/docs/models/components/nullableticketingprojectfieldmapexternalvalueentitytype.md @@ -0,0 +1,15 @@ +# NullableTicketingProjectFieldMapExternalValueEntityType + +## Example Usage + +```typescript +import { NullableTicketingProjectFieldMapExternalValueEntityType } from "firehydrant/models/components"; + +let value: NullableTicketingProjectFieldMapExternalValueEntityType = "literal"; +``` + +## Values + +```typescript +"literal" | "fh-attribute" | "fh-type" +``` \ No newline at end of file diff --git a/docs/models/components/nullableticketingticketentity.md b/docs/models/components/nullableticketingticketentity.md new file mode 100644 index 00000000..8b12fec0 --- /dev/null +++ b/docs/models/components/nullableticketingticketentity.md @@ -0,0 +1,34 @@ +# NullableTicketingTicketEntity + +Ticketing_TicketEntity model + +## Example Usage + +```typescript +import { NullableTicketingTicketEntity } from "firehydrant/models/components"; + +let value: NullableTicketingTicketEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `state` | [components.NullableTicketingTicketEntityState](../../models/components/nullableticketingticketentitystate.md) | :heavy_minus_sign: | N/A | +| `type` | [components.NullableTicketingTicketEntityType](../../models/components/nullableticketingticketentitytype.md) | :heavy_minus_sign: | N/A | +| `assignees` | [components.AuthorEntity](../../models/components/authorentity.md)[] | :heavy_minus_sign: | N/A | +| `priority` | [components.NullableTicketingPriorityEntity](../../models/components/nullableticketingpriorityentity.md) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `attachments` | [components.NullableTicketingTicketEntityAttachment](../../models/components/nullableticketingticketentityattachment.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | N/A | +| `incidentId` | *string* | :heavy_minus_sign: | ID of incident that this ticket is related to | +| `incidentName` | *string* | :heavy_minus_sign: | Name of incident that this ticket is related to | +| `incidentCurrentMilestone` | *string* | :heavy_minus_sign: | Milestone of incident that this ticket is related to | +| `taskId` | *string* | :heavy_minus_sign: | ID of task that this ticket is related to | +| `dueAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `link` | [components.NullableAttachmentsLinkEntity](../../models/components/nullableattachmentslinkentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullableticketingticketentityattachment.md b/docs/models/components/nullableticketingticketentityattachment.md new file mode 100644 index 00000000..abb6e180 --- /dev/null +++ b/docs/models/components/nullableticketingticketentityattachment.md @@ -0,0 +1,14 @@ +# NullableTicketingTicketEntityAttachment + +## Example Usage + +```typescript +import { NullableTicketingTicketEntityAttachment } from "firehydrant/models/components"; + +let value: NullableTicketingTicketEntityAttachment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/nullableticketingticketentitystate.md b/docs/models/components/nullableticketingticketentitystate.md new file mode 100644 index 00000000..3352194a --- /dev/null +++ b/docs/models/components/nullableticketingticketentitystate.md @@ -0,0 +1,15 @@ +# NullableTicketingTicketEntityState + +## Example Usage + +```typescript +import { NullableTicketingTicketEntityState } from "firehydrant/models/components"; + +let value: NullableTicketingTicketEntityState = "done"; +``` + +## Values + +```typescript +"open" | "in_progress" | "cancelled" | "done" +``` \ No newline at end of file diff --git a/docs/models/components/nullableticketingticketentitytype.md b/docs/models/components/nullableticketingticketentitytype.md new file mode 100644 index 00000000..c3da4904 --- /dev/null +++ b/docs/models/components/nullableticketingticketentitytype.md @@ -0,0 +1,15 @@ +# NullableTicketingTicketEntityType + +## Example Usage + +```typescript +import { NullableTicketingTicketEntityType } from "firehydrant/models/components"; + +let value: NullableTicketingTicketEntityType = "follow_up"; +``` + +## Values + +```typescript +"incident" | "task" | "follow_up" +``` \ No newline at end of file diff --git a/docs/models/components/nullableuserentity.md b/docs/models/components/nullableuserentity.md new file mode 100644 index 00000000..c3fdd223 --- /dev/null +++ b/docs/models/components/nullableuserentity.md @@ -0,0 +1,24 @@ +# NullableUserEntity + +UserEntity model + +## Example Usage + +```typescript +import { NullableUserEntity } from "firehydrant/models/components"; + +let value: NullableUserEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `email` | *string* | :heavy_minus_sign: | N/A | +| `slackUserId` | *string* | :heavy_minus_sign: | N/A | +| `slackLinked` | *boolean* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `signalsEnabledNotificationTypes` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nullablevotesentity.md b/docs/models/components/nullablevotesentity.md new file mode 100644 index 00000000..02259579 --- /dev/null +++ b/docs/models/components/nullablevotesentity.md @@ -0,0 +1,21 @@ +# NullableVotesEntity + +VotesEntity model + +## Example Usage + +```typescript +import { NullableVotesEntity } from "firehydrant/models/components"; + +let value: NullableVotesEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `voted` | *boolean* | :heavy_minus_sign: | Whether or not the current actor has voted | +| `liked` | *boolean* | :heavy_minus_sign: | Whether or not the current actor has voted positively | +| `disliked` | *boolean* | :heavy_minus_sign: | Whether or not the current actor has voted negatively | +| `likes` | *number* | :heavy_minus_sign: | N/A | +| `dislikes` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nunccomponententity.md b/docs/models/components/nunccomponententity.md deleted file mode 100644 index 3daae18d..00000000 --- a/docs/models/components/nunccomponententity.md +++ /dev/null @@ -1,19 +0,0 @@ -# NuncComponentEntity - -## Example Usage - -```typescript -import { NuncComponentEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: NuncComponentEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `infrastructureType` | *string* | :heavy_minus_sign: | N/A | -| `infrastructureId` | *string* | :heavy_minus_sign: | N/A | -| `label` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | -| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nunccomponentgroupentity.md b/docs/models/components/nunccomponentgroupentity.md deleted file mode 100644 index 799489dc..00000000 --- a/docs/models/components/nunccomponentgroupentity.md +++ /dev/null @@ -1,18 +0,0 @@ -# NuncComponentGroupEntity - -## Example Usage - -```typescript -import { NuncComponentGroupEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: NuncComponentGroupEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nuncconditionentity.md b/docs/models/components/nuncconditionentity.md deleted file mode 100644 index 85c37424..00000000 --- a/docs/models/components/nuncconditionentity.md +++ /dev/null @@ -1,17 +0,0 @@ -# NuncConditionEntity - -## Example Usage - -```typescript -import { NuncConditionEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: NuncConditionEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncCondition` | *string* | :heavy_minus_sign: | N/A | -| `conditionName` | *string* | :heavy_minus_sign: | N/A | -| `conditionId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nuncconnectionentity.md b/docs/models/components/nuncconnectionentity.md index 611b4387..4544393c 100644 --- a/docs/models/components/nuncconnectionentity.md +++ b/docs/models/components/nuncconnectionentity.md @@ -5,39 +5,39 @@ NuncConnectionEntity model ## Example Usage ```typescript -import { NuncConnectionEntity } from "firehydrant-typescript-sdk/models/components"; +import { NuncConnectionEntity } from "firehydrant/models/components"; let value: NuncConnectionEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `domain` | *string* | :heavy_minus_sign: | N/A | -| `companyName` | *string* | :heavy_minus_sign: | N/A | -| `companyWebsite` | *string* | :heavy_minus_sign: | N/A | -| `cname` | *string* | :heavy_minus_sign: | N/A | -| `greetingTitle` | *string* | :heavy_minus_sign: | N/A | -| `greetingBody` | *string* | :heavy_minus_sign: | N/A | -| `operationalMessage` | *string* | :heavy_minus_sign: | N/A | -| `companyTosUrl` | *string* | :heavy_minus_sign: | N/A | -| `primaryColor` | *string* | :heavy_minus_sign: | N/A | -| `secondaryColor` | *string* | :heavy_minus_sign: | N/A | -| `buttonBackgroundColor` | *string* | :heavy_minus_sign: | N/A | -| `buttonTextColor` | *string* | :heavy_minus_sign: | N/A | -| `linkColor` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `exposedFields` | *string* | :heavy_minus_sign: | N/A | -| `conditions` | [components.NuncConditionEntity](../../models/components/nuncconditionentity.md) | :heavy_minus_sign: | N/A | -| `components` | [components.NuncComponentEntity](../../models/components/nunccomponententity.md) | :heavy_minus_sign: | N/A | -| `componentGroups` | [components.NuncComponentGroupEntity](../../models/components/nunccomponentgroupentity.md) | :heavy_minus_sign: | N/A | -| `logo` | [components.MediaImageEntity](../../models/components/mediaimageentity.md) | :heavy_minus_sign: | N/A | -| `coverImage` | [components.MediaImageEntity](../../models/components/mediaimageentity.md) | :heavy_minus_sign: | N/A | -| `favicon` | [components.MediaImageEntity](../../models/components/mediaimageentity.md) | :heavy_minus_sign: | N/A | -| `openGraphImage` | [components.MediaImageEntity](../../models/components/mediaimageentity.md) | :heavy_minus_sign: | N/A | -| `darkLogo` | [components.MediaImageEntity](../../models/components/mediaimageentity.md) | :heavy_minus_sign: | N/A | -| `enableHistogram` | *boolean* | :heavy_minus_sign: | N/A | -| `uiVersion` | *number* | :heavy_minus_sign: | N/A | -| `links` | [components.LinksEntity](../../models/components/linksentity.md)[] | :heavy_minus_sign: | List of links attached to this status page. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `domain` | *string* | :heavy_minus_sign: | N/A | +| `companyName` | *string* | :heavy_minus_sign: | N/A | +| `companyWebsite` | *string* | :heavy_minus_sign: | N/A | +| `cname` | *string* | :heavy_minus_sign: | N/A | +| `greetingTitle` | *string* | :heavy_minus_sign: | N/A | +| `greetingBody` | *string* | :heavy_minus_sign: | N/A | +| `operationalMessage` | *string* | :heavy_minus_sign: | N/A | +| `companyTosUrl` | *string* | :heavy_minus_sign: | N/A | +| `primaryColor` | *string* | :heavy_minus_sign: | N/A | +| `secondaryColor` | *string* | :heavy_minus_sign: | N/A | +| `buttonBackgroundColor` | *string* | :heavy_minus_sign: | N/A | +| `buttonTextColor` | *string* | :heavy_minus_sign: | N/A | +| `linkColor` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `exposedFields` | *string*[] | :heavy_minus_sign: | N/A | +| `conditions` | [components.NullableNuncConditionEntity](../../models/components/nullablenuncconditionentity.md) | :heavy_minus_sign: | N/A | +| `components` | [components.NullableNuncComponentEntity](../../models/components/nullablenunccomponententity.md) | :heavy_minus_sign: | N/A | +| `componentGroups` | [components.NullableNuncComponentGroupEntity](../../models/components/nullablenunccomponentgroupentity.md) | :heavy_minus_sign: | N/A | +| `logo` | [components.NullableMediaImageEntity](../../models/components/nullablemediaimageentity.md) | :heavy_minus_sign: | N/A | +| `coverImage` | [components.NullableMediaImageEntity](../../models/components/nullablemediaimageentity.md) | :heavy_minus_sign: | N/A | +| `favicon` | [components.NullableMediaImageEntity](../../models/components/nullablemediaimageentity.md) | :heavy_minus_sign: | N/A | +| `openGraphImage` | [components.NullableMediaImageEntity](../../models/components/nullablemediaimageentity.md) | :heavy_minus_sign: | N/A | +| `darkLogo` | [components.NullableMediaImageEntity](../../models/components/nullablemediaimageentity.md) | :heavy_minus_sign: | N/A | +| `enableHistogram` | *boolean* | :heavy_minus_sign: | N/A | +| `uiVersion` | *number* | :heavy_minus_sign: | N/A | +| `links` | [components.LinksEntity](../../models/components/linksentity.md)[] | :heavy_minus_sign: | List of links attached to this status page. | \ No newline at end of file diff --git a/docs/models/components/nuncconnectionentitypaginated.md b/docs/models/components/nuncconnectionentitypaginated.md index 6a98089f..47bdda0b 100644 --- a/docs/models/components/nuncconnectionentitypaginated.md +++ b/docs/models/components/nuncconnectionentitypaginated.md @@ -5,14 +5,14 @@ NuncConnectionEntityPaginated model ## Example Usage ```typescript -import { NuncConnectionEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { NuncConnectionEntityPaginated } from "firehydrant/models/components"; let value: NuncConnectionEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `data` | [components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/nuncemailsubscribersentity.md b/docs/models/components/nuncemailsubscribersentity.md index 16f1bf18..f47b05af 100644 --- a/docs/models/components/nuncemailsubscribersentity.md +++ b/docs/models/components/nuncemailsubscribersentity.md @@ -5,7 +5,7 @@ NuncEmailSubscribersEntity model ## Example Usage ```typescript -import { NuncEmailSubscribersEntity } from "firehydrant-typescript-sdk/models/components"; +import { NuncEmailSubscribersEntity } from "firehydrant/models/components"; let value: NuncEmailSubscribersEntity = {}; ``` diff --git a/docs/models/components/nuncnuncsubscription.md b/docs/models/components/nuncnuncsubscription.md index 93d7abda..620ce730 100644 --- a/docs/models/components/nuncnuncsubscription.md +++ b/docs/models/components/nuncnuncsubscription.md @@ -5,7 +5,7 @@ Nunc_NuncSubscription model ## Example Usage ```typescript -import { NuncNuncSubscription } from "firehydrant-typescript-sdk/models/components"; +import { NuncNuncSubscription } from "firehydrant/models/components"; let value: NuncNuncSubscription = {}; ``` diff --git a/docs/models/components/operation.md b/docs/models/components/operation.md new file mode 100644 index 00000000..949632f8 --- /dev/null +++ b/docs/models/components/operation.md @@ -0,0 +1,19 @@ +# Operation + +## Example Usage + +```typescript +import { Operation } from "firehydrant/models/components"; + +let value: Operation = { + op: "", + path: "/System", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `op` | *string* | :heavy_check_mark: | The operation to perform on the user. Options are add, remove, replace | +| `path` | *string* | :heavy_check_mark: | The path to the attribute to be modified | \ No newline at end of file diff --git a/docs/models/components/operations.md b/docs/models/components/operations.md deleted file mode 100644 index d0feb594..00000000 --- a/docs/models/components/operations.md +++ /dev/null @@ -1,19 +0,0 @@ -# Operations - -## Example Usage - -```typescript -import { Operations } from "firehydrant-typescript-sdk/models/components"; - -let value: Operations = { - op: "", - path: "/usr/share", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `op` | *string* | :heavy_check_mark: | The operation to perform on the user. Options are add, remove, replace | -| `path` | *string* | :heavy_check_mark: | The path to the attribute to be modified | \ No newline at end of file diff --git a/docs/models/components/organizationentity.md b/docs/models/components/organizationentity.md deleted file mode 100644 index c8caed7d..00000000 --- a/docs/models/components/organizationentity.md +++ /dev/null @@ -1,16 +0,0 @@ -# OrganizationEntity - -## Example Usage - -```typescript -import { OrganizationEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: OrganizationEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/organizationscustomfielddefinitionentity.md b/docs/models/components/organizationscustomfielddefinitionentity.md index 52faae87..1439110d 100644 --- a/docs/models/components/organizationscustomfielddefinitionentity.md +++ b/docs/models/components/organizationscustomfielddefinitionentity.md @@ -5,7 +5,7 @@ Organizations_CustomFieldDefinitionEntity model ## Example Usage ```typescript -import { OrganizationsCustomFieldDefinitionEntity } from "firehydrant-typescript-sdk/models/components"; +import { OrganizationsCustomFieldDefinitionEntity } from "firehydrant/models/components"; let value: OrganizationsCustomFieldDefinitionEntity = {}; ``` @@ -21,4 +21,4 @@ let value: OrganizationsCustomFieldDefinitionEntity = {}; | `description` | *string* | :heavy_minus_sign: | N/A | | `required` | *boolean* | :heavy_minus_sign: | N/A | | `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | The milestone at which this field is required, if `required` is set to `true`. When null, a required field is always required. | -| `permissibleValues` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/owner.md b/docs/models/components/owner.md deleted file mode 100644 index 333277f8..00000000 --- a/docs/models/components/owner.md +++ /dev/null @@ -1,19 +0,0 @@ -# Owner - -An object representing a Team that owns the service - -## Example Usage - -```typescript -import { Owner } from "firehydrant-typescript-sdk/models/components"; - -let value: Owner = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/paginationentity.md b/docs/models/components/paginationentity.md deleted file mode 100644 index cf24f2b5..00000000 --- a/docs/models/components/paginationentity.md +++ /dev/null @@ -1,21 +0,0 @@ -# PaginationEntity - -## Example Usage - -```typescript -import { PaginationEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: PaginationEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `count` | *number* | :heavy_minus_sign: | N/A | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `items` | *number* | :heavy_minus_sign: | N/A | -| `pages` | *number* | :heavy_minus_sign: | N/A | -| `last` | *number* | :heavy_minus_sign: | N/A | -| `prev` | *number* | :heavy_minus_sign: | N/A | -| `next` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchscimuser.md b/docs/models/components/patchscimuser.md new file mode 100644 index 00000000..149559e8 --- /dev/null +++ b/docs/models/components/patchscimuser.md @@ -0,0 +1,25 @@ +# PatchScimUser + +PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. + +## Example Usage + +```typescript +import { PatchScimUser } from "firehydrant/models/components"; + +let value: PatchScimUser = { + operations: [ + { + op: "", + path: "/rescue", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `trail` | *string* | :heavy_minus_sign: | An optional trail to log the request | +| `operations` | [components.Operation](../../models/components/operation.md)[] | :heavy_check_mark: | An array of operations to perform on the user | \ No newline at end of file diff --git a/docs/models/components/patchv1changeschangeid.md b/docs/models/components/patchv1changeschangeid.md deleted file mode 100644 index e68883f2..00000000 --- a/docs/models/components/patchv1changeschangeid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1ChangesChangeId - -Update a change entry - -## Example Usage - -```typescript -import { PatchV1ChangesChangeId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChangesChangeId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1changeschangeididentitiesidentityid.md b/docs/models/components/patchv1changeschangeididentitiesidentityid.md deleted file mode 100644 index 3780e4b1..00000000 --- a/docs/models/components/patchv1changeschangeididentitiesidentityid.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1ChangesChangeIdIdentitiesIdentityId - -Update an identity - -## Example Usage - -```typescript -import { PatchV1ChangesChangeIdIdentitiesIdentityId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChangesChangeIdIdentitiesIdentityId = { - type: "", - value: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | -| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1changeseventschangeeventid.md b/docs/models/components/patchv1changeseventschangeeventid.md deleted file mode 100644 index 2ecb0881..00000000 --- a/docs/models/components/patchv1changeseventschangeeventid.md +++ /dev/null @@ -1,24 +0,0 @@ -# PatchV1ChangesEventsChangeEventId - -Update a change event - -## Example Usage - -```typescript -import { PatchV1ChangesEventsChangeEventId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChangesEventsChangeEventId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | N/A | -| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `environments` | *string*[] | :heavy_minus_sign: | An array of environment IDs (setting this will overwrite the current environments) | -| `services` | *string*[] | :heavy_minus_sign: | An array of service IDs (setting this will overwrite the current services) | -| `attachments` | [components.PatchV1ChangesEventsChangeEventIdAttachments](../../models/components/patchv1changeseventschangeeventidattachments.md)[] | :heavy_minus_sign: | JSON objects representing attachments, see attachments documentation for the schema | \ No newline at end of file diff --git a/docs/models/components/patchv1changeseventschangeeventidattachments.md b/docs/models/components/patchv1changeseventschangeeventidattachments.md deleted file mode 100644 index ce948f39..00000000 --- a/docs/models/components/patchv1changeseventschangeeventidattachments.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1ChangesEventsChangeEventIdAttachments - -## Example Usage - -```typescript -import { PatchV1ChangesEventsChangeEventIdAttachments } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChangesEventsChangeEventIdAttachments = { - type: "link", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.PatchV1ChangesEventsChangeEventIdType](../../models/components/patchv1changeseventschangeeventidtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1changeseventschangeeventidtype.md b/docs/models/components/patchv1changeseventschangeeventidtype.md deleted file mode 100644 index 388da482..00000000 --- a/docs/models/components/patchv1changeseventschangeeventidtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchV1ChangesEventsChangeEventIdType - -## Example Usage - -```typescript -import { PatchV1ChangesEventsChangeEventIdType } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChangesEventsChangeEventIdType = "link"; -``` - -## Values - -```typescript -"link" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1checklisttemplatesid.md b/docs/models/components/patchv1checklisttemplatesid.md deleted file mode 100644 index 137afd3f..00000000 --- a/docs/models/components/patchv1checklisttemplatesid.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1ChecklistTemplatesId - -Update a checklist templates attributes - -## Example Usage - -```typescript -import { PatchV1ChecklistTemplatesId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChecklistTemplatesId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `checks` | [components.PatchV1ChecklistTemplatesIdChecks](../../models/components/patchv1checklisttemplatesidchecks.md)[] | :heavy_minus_sign: | An array of checks for the checklist template | -| `teamId` | *string* | :heavy_minus_sign: | The ID of the Team that owns the checklist template | -| `connectedServices` | [components.PatchV1ChecklistTemplatesIdConnectedServices](../../models/components/patchv1checklisttemplatesidconnectedservices.md)[] | :heavy_minus_sign: | Array of service IDs to attach checklist template to | -| `removeRemainingConnectedServices` | *boolean* | :heavy_minus_sign: | If set to true, any services tagged on the checklist that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the services | \ No newline at end of file diff --git a/docs/models/components/patchv1checklisttemplatesidchecks.md b/docs/models/components/patchv1checklisttemplatesidchecks.md deleted file mode 100644 index 0c425da0..00000000 --- a/docs/models/components/patchv1checklisttemplatesidchecks.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1ChecklistTemplatesIdChecks - -## Example Usage - -```typescript -import { PatchV1ChecklistTemplatesIdChecks } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChecklistTemplatesIdChecks = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | Specify the check ID when updating an already existing check | -| `description` | *string* | :heavy_minus_sign: | The description of the check | -| `name` | *string* | :heavy_check_mark: | The name of the check | \ No newline at end of file diff --git a/docs/models/components/patchv1checklisttemplatesidconnectedservices.md b/docs/models/components/patchv1checklisttemplatesidconnectedservices.md deleted file mode 100644 index a61a2b86..00000000 --- a/docs/models/components/patchv1checklisttemplatesidconnectedservices.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1ChecklistTemplatesIdConnectedServices - -## Example Usage - -```typescript -import { PatchV1ChecklistTemplatesIdConnectedServices } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ChecklistTemplatesIdConnectedServices = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `remove` | *boolean* | :heavy_minus_sign: | Set to `true` to remove checklist from service | \ No newline at end of file diff --git a/docs/models/components/patchv1conversationsconversationidcommentscommentid.md b/docs/models/components/patchv1conversationsconversationidcommentscommentid.md deleted file mode 100644 index 50842d46..00000000 --- a/docs/models/components/patchv1conversationsconversationidcommentscommentid.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1ConversationsConversationIdCommentsCommentId - -ALPHA - Update a comment's attributes - -## Example Usage - -```typescript -import { PatchV1ConversationsConversationIdCommentsCommentId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ConversationsConversationIdCommentsCommentId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `body` | *string* | :heavy_minus_sign: | Text body of comment | \ No newline at end of file diff --git a/docs/models/components/patchv1customfieldsdefinitionsfieldid.md b/docs/models/components/patchv1customfieldsdefinitionsfieldid.md deleted file mode 100644 index f1c22ab2..00000000 --- a/docs/models/components/patchv1customfieldsdefinitionsfieldid.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1CustomFieldsDefinitionsFieldId - -Update a single custom field definition - -## Example Usage - -```typescript -import { PatchV1CustomFieldsDefinitionsFieldId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1CustomFieldsDefinitionsFieldId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `displayName` | *string* | :heavy_minus_sign: | N/A | -| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | -| `required` | *boolean* | :heavy_minus_sign: | N/A | -| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. | \ No newline at end of file diff --git a/docs/models/components/patchv1environmentsenvironmentid.md b/docs/models/components/patchv1environmentsenvironmentid.md deleted file mode 100644 index bdb652bb..00000000 --- a/docs/models/components/patchv1environmentsenvironmentid.md +++ /dev/null @@ -1,20 +0,0 @@ -# PatchV1EnvironmentsEnvironmentId - -Update a environments attributes - -## Example Usage - -```typescript -import { PatchV1EnvironmentsEnvironmentId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1EnvironmentsEnvironmentId = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1functionalitiesfunctionalityid.md b/docs/models/components/patchv1functionalitiesfunctionalityid.md deleted file mode 100644 index 769ffbb3..00000000 --- a/docs/models/components/patchv1functionalitiesfunctionalityid.md +++ /dev/null @@ -1,30 +0,0 @@ -# PatchV1FunctionalitiesFunctionalityId - -Update a functionalities attributes - -## Example Usage - -```typescript -import { PatchV1FunctionalitiesFunctionalityId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1FunctionalitiesFunctionalityId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `services` | [components.PatchV1FunctionalitiesFunctionalityIdServices](../../models/components/patchv1functionalitiesfunctionalityidservices.md)[] | :heavy_minus_sign: | N/A | -| `links` | [components.PatchV1FunctionalitiesFunctionalityIdLinks](../../models/components/patchv1functionalitiesfunctionalityidlinks.md)[] | :heavy_minus_sign: | An array of links to associate with this functionality. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. | -| `owner` | [components.PatchV1FunctionalitiesFunctionalityIdOwner](../../models/components/patchv1functionalitiesfunctionalityidowner.md) | :heavy_minus_sign: | An object representing a Team that owns the functionality | -| `removeOwner` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team as an owner from a functionality, set this to 'true' | -| `teams` | [components.PatchV1FunctionalitiesFunctionalityIdTeams](../../models/components/patchv1functionalitiesfunctionalityidteams.md)[] | :heavy_minus_sign: | An array of teams to attach to this functionality. | -| `removeRemainingTeams` | *boolean* | :heavy_minus_sign: | If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams | -| `externalResources` | [components.PatchV1FunctionalitiesFunctionalityIdExternalResources](../../models/components/patchv1functionalitiesfunctionalityidexternalresources.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | -| `removeRemainingExternalResources` | *boolean* | :heavy_minus_sign: | If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources | -| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | -| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | -| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | -| `removeRemainingServices` | *boolean* | :heavy_minus_sign: | Set this to true if you want to remove all of the services that are not included in the services array from the functionality | \ No newline at end of file diff --git a/docs/models/components/patchv1functionalitiesfunctionalityidexternalresources.md b/docs/models/components/patchv1functionalitiesfunctionalityidexternalresources.md deleted file mode 100644 index 61984fb1..00000000 --- a/docs/models/components/patchv1functionalitiesfunctionalityidexternalresources.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1FunctionalitiesFunctionalityIdExternalResources - -## Example Usage - -```typescript -import { PatchV1FunctionalitiesFunctionalityIdExternalResources } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1FunctionalitiesFunctionalityIdExternalResources = { - remoteId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `remoteId` | *string* | :heavy_check_mark: | N/A | -| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. | -| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove an external resource from a service, set this to 'true'. | \ No newline at end of file diff --git a/docs/models/components/patchv1functionalitiesfunctionalityidlinks.md b/docs/models/components/patchv1functionalitiesfunctionalityidlinks.md deleted file mode 100644 index d1d23fd5..00000000 --- a/docs/models/components/patchv1functionalitiesfunctionalityidlinks.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1FunctionalitiesFunctionalityIdLinks - -## Example Usage - -```typescript -import { PatchV1FunctionalitiesFunctionalityIdLinks } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1FunctionalitiesFunctionalityIdLinks = { - hrefUrl: "https://writhing-brochure.biz/", - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `hrefUrl` | *string* | :heavy_check_mark: | URL | -| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | -| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | -| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a link, set this to 'true' | -| `id` | *string* | :heavy_minus_sign: | If updating an existing link, specify it's id. | \ No newline at end of file diff --git a/docs/models/components/patchv1functionalitiesfunctionalityidowner.md b/docs/models/components/patchv1functionalitiesfunctionalityidowner.md deleted file mode 100644 index cb0496eb..00000000 --- a/docs/models/components/patchv1functionalitiesfunctionalityidowner.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1FunctionalitiesFunctionalityIdOwner - -An object representing a Team that owns the functionality - -## Example Usage - -```typescript -import { PatchV1FunctionalitiesFunctionalityIdOwner } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1FunctionalitiesFunctionalityIdOwner = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1functionalitiesfunctionalityidservices.md b/docs/models/components/patchv1functionalitiesfunctionalityidservices.md deleted file mode 100644 index d1524805..00000000 --- a/docs/models/components/patchv1functionalitiesfunctionalityidservices.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1FunctionalitiesFunctionalityIdServices - -## Example Usage - -```typescript -import { PatchV1FunctionalitiesFunctionalityIdServices } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1FunctionalitiesFunctionalityIdServices = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | ID of a service | -| `remove` | *boolean* | :heavy_minus_sign: | Set to true if you want to remove the given service from the functionality | \ No newline at end of file diff --git a/docs/models/components/patchv1functionalitiesfunctionalityidteams.md b/docs/models/components/patchv1functionalitiesfunctionalityidteams.md deleted file mode 100644 index b70fc963..00000000 --- a/docs/models/components/patchv1functionalitiesfunctionalityidteams.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1FunctionalitiesFunctionalityIdTeams - -## Example Usage - -```typescript -import { PatchV1FunctionalitiesFunctionalityIdTeams } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1FunctionalitiesFunctionalityIdTeams = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team from a functionality, set this to 'true' | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentrolesincidentroleid.md b/docs/models/components/patchv1incidentrolesincidentroleid.md deleted file mode 100644 index 65708667..00000000 --- a/docs/models/components/patchv1incidentrolesincidentroleid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentRolesIncidentRoleId - -Update a single incident role from its ID - -## Example Usage - -```typescript -import { PatchV1IncidentRolesIncidentRoleId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentRolesIncidentRoleId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentid.md b/docs/models/components/patchv1incidentsincidentid.md deleted file mode 100644 index b8d55159..00000000 --- a/docs/models/components/patchv1incidentsincidentid.md +++ /dev/null @@ -1,26 +0,0 @@ -# PatchV1IncidentsIncidentId - -Updates an incident with provided parameters - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | [components.PatchV1IncidentsIncidentIdLabels](../../models/components/patchv1incidentsincidentidlabels.md) | :heavy_minus_sign: | Key:value pairs to track custom data for the incident | -| `priority` | *string* | :heavy_minus_sign: | N/A | -| `severity` | *string* | :heavy_minus_sign: | N/A | -| `severityConditionId` | *string* | :heavy_minus_sign: | N/A | -| `severityImpactId` | *string* | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidalertsincidentalertidprimary.md b/docs/models/components/patchv1incidentsincidentidalertsincidentalertidprimary.md deleted file mode 100644 index 9fa0f429..00000000 --- a/docs/models/components/patchv1incidentsincidentidalertsincidentalertidprimary.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary - -Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary = { - primary: false, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `primary` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentideventseventidvotes.md b/docs/models/components/patchv1incidentsincidentideventseventidvotes.md deleted file mode 100644 index ef138153..00000000 --- a/docs/models/components/patchv1incidentsincidentideventseventidvotes.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentsIncidentIdEventsEventIdVotes - -Allows for upvoting or downvoting an event - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdEventsEventIdVotes } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdEventsEventIdVotes = { - direction: "down", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `direction` | [components.Direction](../../models/components/direction.md) | :heavy_check_mark: | The direction you would like to vote, or if you dig it | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidgenericchatmessagesmessageid.md b/docs/models/components/patchv1incidentsincidentidgenericchatmessagesmessageid.md deleted file mode 100644 index 97a50dfc..00000000 --- a/docs/models/components/patchv1incidentsincidentidgenericchatmessagesmessageid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentsIncidentIdGenericChatMessagesMessageId - -Update an existing generic chat message on an incident. - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdGenericChatMessagesMessageId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdGenericChatMessagesMessageId = { - body: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `body` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidimpact.md b/docs/models/components/patchv1incidentsincidentidimpact.md deleted file mode 100644 index 1989cfae..00000000 --- a/docs/models/components/patchv1incidentsincidentidimpact.md +++ /dev/null @@ -1,27 +0,0 @@ -# PatchV1IncidentsIncidentIdImpact - -Allows updating an incident's impacted infrastructure, with the option to -move the incident into a different milestone and provide a note to update -the incident timeline and any attached status pages. If this method is -requested with the PUT verb, impacts will be completely replaced with the -information in the request body, even if not provided (effectively clearing -all impacts). If this method is requested with the PATCH verb, the provided -impacts will be added or updated, but no impacts will be removed. - - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdImpact } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdImpact = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `note` | *string* | :heavy_minus_sign: | N/A | -| `milestone` | *string* | :heavy_minus_sign: | N/A | -| `impact` | [components.PatchV1IncidentsIncidentIdImpactImpact](../../models/components/patchv1incidentsincidentidimpactimpact.md)[] | :heavy_minus_sign: | N/A | -| `statusPages` | [components.PatchV1IncidentsIncidentIdImpactStatusPages](../../models/components/patchv1incidentsincidentidimpactstatuspages.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidimpactimpact.md b/docs/models/components/patchv1incidentsincidentidimpactimpact.md deleted file mode 100644 index 2ec264bd..00000000 --- a/docs/models/components/patchv1incidentsincidentidimpactimpact.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentsIncidentIdImpactImpact - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdImpactImpact } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdImpactImpact = { - id: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `conditionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidimpactstatuspages.md b/docs/models/components/patchv1incidentsincidentidimpactstatuspages.md deleted file mode 100644 index 4154ac9c..00000000 --- a/docs/models/components/patchv1incidentsincidentidimpactstatuspages.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentsIncidentIdImpactStatusPages - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdImpactStatusPages } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdImpactStatusPages = { - id: "", - integrationSlug: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `integrationSlug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidlabels.md b/docs/models/components/patchv1incidentsincidentidlabels.md deleted file mode 100644 index 05403de2..00000000 --- a/docs/models/components/patchv1incidentsincidentidlabels.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchV1IncidentsIncidentIdLabels - -Key:value pairs to track custom data for the incident - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdLabels } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdLabels = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidnotesnoteid.md b/docs/models/components/patchv1incidentsincidentidnotesnoteid.md deleted file mode 100644 index 5b4f4bb0..00000000 --- a/docs/models/components/patchv1incidentsincidentidnotesnoteid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentsIncidentIdNotesNoteId - -Updates the body of a note - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdNotesNoteId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdNotesNoteId = { - body: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `body` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.md b/docs/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.md deleted file mode 100644 index 11626ec3..00000000 --- a/docs/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId - -Update a change attached to an incident - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId = - {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType](../../models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventidtype.md) | :heavy_minus_sign: | N/A | -| `why` | *string* | :heavy_minus_sign: | A short description about why this change event is related | \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventidtype.md b/docs/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventidtype.md deleted file mode 100644 index 794afc17..00000000 --- a/docs/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventidtype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType } from "firehydrant-typescript-sdk/models/components"; - -let value: - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType = - "dismissed"; -``` - -## Values - -```typescript -"caused" | "fixed" | "suspect" | "dismissed" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1incidentsincidentidtaskstaskid.md b/docs/models/components/patchv1incidentsincidentidtaskstaskid.md deleted file mode 100644 index ae1a7c4f..00000000 --- a/docs/models/components/patchv1incidentsincidentidtaskstaskid.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1IncidentsIncidentIdTasksTaskId - -Update a task's attributes - -## Example Usage - -```typescript -import { PatchV1IncidentsIncidentIdTasksTaskId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentsIncidentIdTasksTaskId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `title` | *string* | :heavy_minus_sign: | The title of the task. | -| `description` | *string* | :heavy_minus_sign: | A description of what the task is for. | -| `state` | *string* | :heavy_minus_sign: | The state of the task. One of: open, in_progress, cancelled, done | -| `assigneeId` | *string* | :heavy_minus_sign: | The ID of the user assigned to the task. | -| `dueAt` | *string* | :heavy_minus_sign: | The due date of the task. Relative values are supported such as '5m' | \ No newline at end of file diff --git a/docs/models/components/patchv1incidenttypesid.md b/docs/models/components/patchv1incidenttypesid.md deleted file mode 100644 index e7c78916..00000000 --- a/docs/models/components/patchv1incidenttypesid.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1IncidentTypesId - -Update a single incident type from its ID - -## Example Usage - -```typescript -import { PatchV1IncidentTypesId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentTypesId = { - name: "", - template: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `template` | [components.PatchV1IncidentTypesIdTemplate](../../models/components/patchv1incidenttypesidtemplate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1incidenttypesidimpacts.md b/docs/models/components/patchv1incidenttypesidimpacts.md deleted file mode 100644 index 0b8b8f21..00000000 --- a/docs/models/components/patchv1incidenttypesidimpacts.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IncidentTypesIdImpacts - -## Example Usage - -```typescript -import { PatchV1IncidentTypesIdImpacts } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentTypesIdImpacts = { - id: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `id` | *string* | :heavy_check_mark: | The id of impact | -| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/patchv1incidenttypesidtemplate.md b/docs/models/components/patchv1incidenttypesidtemplate.md deleted file mode 100644 index 08d07bcd..00000000 --- a/docs/models/components/patchv1incidenttypesidtemplate.md +++ /dev/null @@ -1,24 +0,0 @@ -# PatchV1IncidentTypesIdTemplate - -## Example Usage - -```typescript -import { PatchV1IncidentTypesIdTemplate } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IncidentTypesIdTemplate = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | A labels hash of keys and values | -| `severity` | *string* | :heavy_minus_sign: | N/A | -| `priority` | *string* | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | -| `runbookIds` | *string*[] | :heavy_minus_sign: | List of ids of Runbooks to attach to incidents created from this type | -| `privateIncident` | *boolean* | :heavy_minus_sign: | N/A | -| `teamIds` | *string*[] | :heavy_minus_sign: | List of ids of teams to be assigned to incidents | -| `impacts` | [components.PatchV1IncidentTypesIdImpacts](../../models/components/patchv1incidenttypesidimpacts.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/patchv1integrationsawscloudtrailbatchesid.md b/docs/models/components/patchv1integrationsawscloudtrailbatchesid.md deleted file mode 100644 index 5971b322..00000000 --- a/docs/models/components/patchv1integrationsawscloudtrailbatchesid.md +++ /dev/null @@ -1,20 +0,0 @@ -# PatchV1IntegrationsAwsCloudtrailBatchesId - -Update a CloudTrail batch with new information. - -## Example Usage - -```typescript -import { PatchV1IntegrationsAwsCloudtrailBatchesId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IntegrationsAwsCloudtrailBatchesId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `eventsCreated` | *number* | :heavy_minus_sign: | N/A | -| `status` | *string* | :heavy_minus_sign: | N/A | -| `error` | *string* | :heavy_minus_sign: | N/A | -| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1integrationsawsconnectionsid.md b/docs/models/components/patchv1integrationsawsconnectionsid.md deleted file mode 100644 index a5889c12..00000000 --- a/docs/models/components/patchv1integrationsawsconnectionsid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1IntegrationsAwsConnectionsId - -Update the AWS connection with the provided data. - -## Example Usage - -```typescript -import { PatchV1IntegrationsAwsConnectionsId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IntegrationsAwsConnectionsId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `awsAccountId` | *string* | :heavy_minus_sign: | N/A | -| `targetArn` | *string* | :heavy_minus_sign: | N/A | -| `connectionStatus` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1integrationsstatuspageconnectionsconnectionid.md b/docs/models/components/patchv1integrationsstatuspageconnectionsconnectionid.md deleted file mode 100644 index f94a412f..00000000 --- a/docs/models/components/patchv1integrationsstatuspageconnectionsconnectionid.md +++ /dev/null @@ -1,20 +0,0 @@ -# PatchV1IntegrationsStatuspageConnectionsConnectionId - -Update the given Statuspage integration connection. - -## Example Usage - -```typescript -import { PatchV1IntegrationsStatuspageConnectionsConnectionId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IntegrationsStatuspageConnectionsConnectionId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `pageId` | *string* | :heavy_minus_sign: | N/A | -| `severities` | [components.Severities](../../models/components/severities.md)[] | :heavy_minus_sign: | N/A | -| `conditions` | [components.Conditions](../../models/components/conditions.md)[] | :heavy_minus_sign: | N/A | -| `milestoneMappings` | [components.MilestoneMappings](../../models/components/milestonemappings.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1integrationsstatuspageconnectionsconnectionidstatus.md b/docs/models/components/patchv1integrationsstatuspageconnectionsconnectionidstatus.md deleted file mode 100644 index 34ab9fad..00000000 --- a/docs/models/components/patchv1integrationsstatuspageconnectionsconnectionidstatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus - -Statuspage.io status - -## Example Usage - -```typescript -import { PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus = - "investigating"; -``` - -## Values - -```typescript -"investigating" | "identified" | "monitoring" | "resolved" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1nuncconnectionsnuncconnectionidlinkslinkid.md b/docs/models/components/patchv1nuncconnectionsnuncconnectionidlinkslinkid.md deleted file mode 100644 index 3c092226..00000000 --- a/docs/models/components/patchv1nuncconnectionsnuncconnectionidlinkslinkid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1NuncConnectionsNuncConnectionIdLinksLinkId - -Update a link to be displayed on a FireHydrant status page - -## Example Usage - -```typescript -import { PatchV1NuncConnectionsNuncConnectionIdLinksLinkId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1NuncConnectionsNuncConnectionIdLinksLinkId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `displayText` | *string* | :heavy_minus_sign: | N/A | -| `iconUrl` | *string* | :heavy_minus_sign: | N/A | -| `hrefUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1postmortemsreportsreportid.md b/docs/models/components/patchv1postmortemsreportsreportid.md deleted file mode 100644 index 36c85444..00000000 --- a/docs/models/components/patchv1postmortemsreportsreportid.md +++ /dev/null @@ -1,20 +0,0 @@ -# PatchV1PostMortemsReportsReportId - -Update a report - -## Example Usage - -```typescript -import { PatchV1PostMortemsReportsReportId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1PostMortemsReportsReportId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `additionalDetails` | *string* | :heavy_minus_sign: | N/A | -| `questions` | [components.PatchV1PostMortemsReportsReportIdQuestions](../../models/components/patchv1postmortemsreportsreportidquestions.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1postmortemsreportsreportidfieldsfieldid.md b/docs/models/components/patchv1postmortemsreportsreportidfieldsfieldid.md deleted file mode 100644 index 9f128501..00000000 --- a/docs/models/components/patchv1postmortemsreportsreportidfieldsfieldid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1PostMortemsReportsReportIdFieldsFieldId - -Update a field value on a post mortem report - -## Example Usage - -```typescript -import { PatchV1PostMortemsReportsReportIdFieldsFieldId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1PostMortemsReportsReportIdFieldsFieldId = { - value: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1postmortemsreportsreportidquestions.md b/docs/models/components/patchv1postmortemsreportsreportidquestions.md deleted file mode 100644 index 12f5224a..00000000 --- a/docs/models/components/patchv1postmortemsreportsreportidquestions.md +++ /dev/null @@ -1,16 +0,0 @@ -# PatchV1PostMortemsReportsReportIdQuestions - -## Example Usage - -```typescript -import { PatchV1PostMortemsReportsReportIdQuestions } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1PostMortemsReportsReportIdQuestions = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | ID of a question | -| `body` | *string* | :heavy_minus_sign: | Answer to question | \ No newline at end of file diff --git a/docs/models/components/patchv1postmortemsreportsreportidreasonsreasonid.md b/docs/models/components/patchv1postmortemsreportsreportidreasonsreasonid.md deleted file mode 100644 index 3e931e07..00000000 --- a/docs/models/components/patchv1postmortemsreportsreportidreasonsreasonid.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1PostMortemsReportsReportIdReasonsReasonId - -Update a contributing factor - -## Example Usage - -```typescript -import { PatchV1PostMortemsReportsReportIdReasonsReasonId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1PostMortemsReportsReportIdReasonsReasonId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `summary` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1prioritiespriorityslug.md b/docs/models/components/patchv1prioritiespriorityslug.md deleted file mode 100644 index 5f21076b..00000000 --- a/docs/models/components/patchv1prioritiespriorityslug.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1PrioritiesPrioritySlug - -Update a specific priority - -## Example Usage - -```typescript -import { PatchV1PrioritiesPrioritySlug } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1PrioritiesPrioritySlug = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `default` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotes.md b/docs/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotes.md deleted file mode 100644 index 791c55a1..00000000 --- a/docs/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotes.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes - -Allows for upvoting or downvoting an event - -## Example Usage - -```typescript -import { PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes = { - direction: "up", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `direction` | [components.PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection](../../models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotesdirection.md) | :heavy_check_mark: | The direction you would like to vote, or if you dig it | \ No newline at end of file diff --git a/docs/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotesdirection.md b/docs/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotesdirection.md deleted file mode 100644 index 43786b31..00000000 --- a/docs/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotesdirection.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection - -The direction you would like to vote, or if you dig it - -## Example Usage - -```typescript -import { PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection = "up"; -``` - -## Values - -```typescript -"up" | "down" | "dig" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1runbooksexecutionsexecutionidvotes.md b/docs/models/components/patchv1runbooksexecutionsexecutionidvotes.md deleted file mode 100644 index b134afc7..00000000 --- a/docs/models/components/patchv1runbooksexecutionsexecutionidvotes.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1RunbooksExecutionsExecutionIdVotes - -Allows for upvoting or downvoting an event - -## Example Usage - -```typescript -import { PatchV1RunbooksExecutionsExecutionIdVotes } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1RunbooksExecutionsExecutionIdVotes = { - direction: "up", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `direction` | [components.PatchV1RunbooksExecutionsExecutionIdVotesDirection](../../models/components/patchv1runbooksexecutionsexecutionidvotesdirection.md) | :heavy_check_mark: | The direction you would like to vote, or if you dig it | \ No newline at end of file diff --git a/docs/models/components/patchv1runbooksexecutionsexecutionidvotesdirection.md b/docs/models/components/patchv1runbooksexecutionsexecutionidvotesdirection.md deleted file mode 100644 index 2b58c79f..00000000 --- a/docs/models/components/patchv1runbooksexecutionsexecutionidvotesdirection.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1RunbooksExecutionsExecutionIdVotesDirection - -The direction you would like to vote, or if you dig it - -## Example Usage - -```typescript -import { PatchV1RunbooksExecutionsExecutionIdVotesDirection } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1RunbooksExecutionsExecutionIdVotesDirection = "up"; -``` - -## Values - -```typescript -"up" | "down" | "dig" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1savedsearchesresourcetypesavedsearchid.md b/docs/models/components/patchv1savedsearchesresourcetypesavedsearchid.md deleted file mode 100644 index 3016ef98..00000000 --- a/docs/models/components/patchv1savedsearchesresourcetypesavedsearchid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1SavedSearchesResourceTypeSavedSearchId - -Update a specific saved search - -## Example Usage - -```typescript -import { PatchV1SavedSearchesResourceTypeSavedSearchId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SavedSearchesResourceTypeSavedSearchId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `isPrivate` | *boolean* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `filterValues` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceid.md b/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceid.md deleted file mode 100644 index 1e69b608..00000000 --- a/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceid.md +++ /dev/null @@ -1,24 +0,0 @@ -# PatchV1ScheduledMaintenancesScheduledMaintenanceId - -Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. - -## Example Usage - -```typescript -import { PatchV1ScheduledMaintenancesScheduledMaintenanceId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ScheduledMaintenancesScheduledMaintenanceId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for the start time of the scheduled maintenance | -| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for the end time of the scheduled maintenance | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | A json object of label keys and values | -| `statusPages` | [components.PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages](../../models/components/patchv1scheduledmaintenancesscheduledmaintenanceidstatuspages.md)[] | :heavy_minus_sign: | An array of status pages to display this maintenance on | -| `impacts` | [components.PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts](../../models/components/patchv1scheduledmaintenancesscheduledmaintenanceidimpacts.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceidimpacts.md b/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceidimpacts.md deleted file mode 100644 index ad59422b..00000000 --- a/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceidimpacts.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts - -## Example Usage - -```typescript -import { PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts = { - type: "", - id: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `type` | *string* | :heavy_check_mark: | The type of impact | -| `id` | *string* | :heavy_check_mark: | The id of impact | -| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceidstatuspages.md b/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceidstatuspages.md deleted file mode 100644 index 1d19109f..00000000 --- a/docs/models/components/patchv1scheduledmaintenancesscheduledmaintenanceidstatuspages.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages - -## Example Usage - -```typescript -import { PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages = { - connectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `integrationSlug` | *string* | :heavy_minus_sign: | The slug identifying the type of status page | -| `connectionId` | *string* | :heavy_check_mark: | The UUID of the status page to display this maintenance on | \ No newline at end of file diff --git a/docs/models/components/patchv1scimv2usersid.md b/docs/models/components/patchv1scimv2usersid.md deleted file mode 100644 index cc2fcfc0..00000000 --- a/docs/models/components/patchv1scimv2usersid.md +++ /dev/null @@ -1,25 +0,0 @@ -# PatchV1ScimV2UsersId - -PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. - -## Example Usage - -```typescript -import { PatchV1ScimV2UsersId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ScimV2UsersId = { - operations: [ - { - op: "", - path: "/usr/X11R6", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `trail` | *string* | :heavy_minus_sign: | An optional trail to log the request | -| `operations` | [components.Operations](../../models/components/operations.md)[] | :heavy_check_mark: | An array of operations to perform on the user | \ No newline at end of file diff --git a/docs/models/components/patchv1servicedependenciesservicedependencyid.md b/docs/models/components/patchv1servicedependenciesservicedependencyid.md deleted file mode 100644 index 1464b097..00000000 --- a/docs/models/components/patchv1servicedependenciesservicedependencyid.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1ServiceDependenciesServiceDependencyId - -Update the notes of the service dependency - -## Example Usage - -```typescript -import { PatchV1ServiceDependenciesServiceDependencyId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServiceDependenciesServiceDependencyId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `notes` | *string* | :heavy_minus_sign: | A note to describe the service dependency relationship | \ No newline at end of file diff --git a/docs/models/components/patchv1servicesserviceid.md b/docs/models/components/patchv1servicesserviceid.md deleted file mode 100644 index a88d8bb2..00000000 --- a/docs/models/components/patchv1servicesserviceid.md +++ /dev/null @@ -1,35 +0,0 @@ -# PatchV1ServicesServiceId - -Update a services attributes, you may also add or remove functionalities from the service as well. -Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. - - -## Example Usage - -```typescript -import { PatchV1ServicesServiceId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServicesServiceId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | -| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | -| `checklists` | [components.Checklists](../../models/components/checklists.md)[] | :heavy_minus_sign: | Array of checklist IDs to attach to the service | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `externalResources` | [components.PatchV1ServicesServiceIdExternalResources](../../models/components/patchv1servicesserviceidexternalresources.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | -| `functionalities` | [components.PatchV1ServicesServiceIdFunctionalities](../../models/components/patchv1servicesserviceidfunctionalities.md)[] | :heavy_minus_sign: | An array of functionalities | -| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | -| `links` | [components.PatchV1ServicesServiceIdLinks](../../models/components/patchv1servicesserviceidlinks.md)[] | :heavy_minus_sign: | An array of links to associate with this service. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `owner` | [components.PatchV1ServicesServiceIdOwner](../../models/components/patchv1servicesserviceidowner.md) | :heavy_minus_sign: | An object representing a Team that owns the service | -| `removeOwner` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team as an owner from a service, set this to 'true' | -| `removeRemainingChecklists` | *boolean* | :heavy_minus_sign: | If set to true, any checklists tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the checklists | -| `removeRemainingExternalResources` | *boolean* | :heavy_minus_sign: | If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources | -| `removeRemainingFunctionalities` | *boolean* | :heavy_minus_sign: | If set to true, any functionalities tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the functionalities | -| `removeRemainingTeams` | *boolean* | :heavy_minus_sign: | If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams | -| `serviceTier` | [components.PatchV1ServicesServiceIdServiceTier](../../models/components/patchv1servicesserviceidservicetier.md) | :heavy_minus_sign: | Integer representing service tier | -| `teams` | [components.PatchV1ServicesServiceIdTeams](../../models/components/patchv1servicesserviceidteams.md)[] | :heavy_minus_sign: | An array of teams to attach to this service. | \ No newline at end of file diff --git a/docs/models/components/patchv1servicesserviceidexternalresources.md b/docs/models/components/patchv1servicesserviceidexternalresources.md deleted file mode 100644 index fb6f6a89..00000000 --- a/docs/models/components/patchv1servicesserviceidexternalresources.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1ServicesServiceIdExternalResources - -## Example Usage - -```typescript -import { PatchV1ServicesServiceIdExternalResources } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServicesServiceIdExternalResources = { - remoteId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `remoteId` | *string* | :heavy_check_mark: | N/A | -| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. | -| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove an external resource from a service, set this to 'true'. | \ No newline at end of file diff --git a/docs/models/components/patchv1servicesserviceidfunctionalities.md b/docs/models/components/patchv1servicesserviceidfunctionalities.md deleted file mode 100644 index 49fcbd2c..00000000 --- a/docs/models/components/patchv1servicesserviceidfunctionalities.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1ServicesServiceIdFunctionalities - -## Example Usage - -```typescript -import { PatchV1ServicesServiceIdFunctionalities } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServicesServiceIdFunctionalities = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | If you are trying to reuse a functionality, you may set the ID to attach it to the service | -| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a functionality from a service, set this to 'true' | -| `summary` | *string* | :heavy_minus_sign: | If you are trying to create a new functionality and attach it to this service, set the summary key | \ No newline at end of file diff --git a/docs/models/components/patchv1servicesserviceidlinks.md b/docs/models/components/patchv1servicesserviceidlinks.md deleted file mode 100644 index 4010b692..00000000 --- a/docs/models/components/patchv1servicesserviceidlinks.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1ServicesServiceIdLinks - -## Example Usage - -```typescript -import { PatchV1ServicesServiceIdLinks } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServicesServiceIdLinks = { - hrefUrl: "https://sorrowful-import.name/", - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `hrefUrl` | *string* | :heavy_check_mark: | URL | -| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | -| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | -| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a link, set this to 'true' | -| `id` | *string* | :heavy_minus_sign: | If updating an existing link, specify it's id. | \ No newline at end of file diff --git a/docs/models/components/patchv1servicesserviceidowner.md b/docs/models/components/patchv1servicesserviceidowner.md deleted file mode 100644 index bb499ddb..00000000 --- a/docs/models/components/patchv1servicesserviceidowner.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1ServicesServiceIdOwner - -An object representing a Team that owns the service - -## Example Usage - -```typescript -import { PatchV1ServicesServiceIdOwner } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServicesServiceIdOwner = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1servicesserviceidservicetier.md b/docs/models/components/patchv1servicesserviceidservicetier.md deleted file mode 100644 index 19929063..00000000 --- a/docs/models/components/patchv1servicesserviceidservicetier.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1ServicesServiceIdServiceTier - -Integer representing service tier - -## Example Usage - -```typescript -import { PatchV1ServicesServiceIdServiceTier } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServicesServiceIdServiceTier = 0; -``` - -## Values - -```typescript -0 | 1 | 2 | 3 | 4 | 5 -``` \ No newline at end of file diff --git a/docs/models/components/patchv1servicesserviceidteams.md b/docs/models/components/patchv1servicesserviceidteams.md deleted file mode 100644 index a9910393..00000000 --- a/docs/models/components/patchv1servicesserviceidteams.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1ServicesServiceIdTeams - -## Example Usage - -```typescript -import { PatchV1ServicesServiceIdTeams } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1ServicesServiceIdTeams = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team from a service, set this to 'true' | \ No newline at end of file diff --git a/docs/models/components/patchv1severitiesseverityslug.md b/docs/models/components/patchv1severitiesseverityslug.md deleted file mode 100644 index fb30e4f0..00000000 --- a/docs/models/components/patchv1severitiesseverityslug.md +++ /dev/null @@ -1,20 +0,0 @@ -# PatchV1SeveritiesSeveritySlug - -Update a specific severity - -## Example Usage - -```typescript -import { PatchV1SeveritiesSeveritySlug } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SeveritiesSeveritySlug = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | -| `color` | [components.PatchV1SeveritiesSeveritySlugColor](../../models/components/patchv1severitiesseverityslugcolor.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1severitiesseverityslugcolor.md b/docs/models/components/patchv1severitiesseverityslugcolor.md deleted file mode 100644 index 847ea74a..00000000 --- a/docs/models/components/patchv1severitiesseverityslugcolor.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchV1SeveritiesSeveritySlugColor - -## Example Usage - -```typescript -import { PatchV1SeveritiesSeveritySlugColor } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SeveritiesSeveritySlugColor = "orange"; -``` - -## Values - -```typescript -"red" | "orange" | "yellow" | "blue" | "teal" | "grey" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1severitymatrix.md b/docs/models/components/patchv1severitymatrix.md deleted file mode 100644 index 7f403395..00000000 --- a/docs/models/components/patchv1severitymatrix.md +++ /dev/null @@ -1,26 +0,0 @@ -# PatchV1SeverityMatrix - -Update available severities and impacts in your organization's severity matrix. - -## Example Usage - -```typescript -import { PatchV1SeverityMatrix } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SeverityMatrix = { - data: [ - { - severity: "", - impactId: "", - conditionId: "", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `data` | [components.PatchV1SeverityMatrixData](../../models/components/patchv1severitymatrixdata.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1severitymatrixconditionsconditionid.md b/docs/models/components/patchv1severitymatrixconditionsconditionid.md deleted file mode 100644 index 9c7206eb..00000000 --- a/docs/models/components/patchv1severitymatrixconditionsconditionid.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1SeverityMatrixConditionsConditionId - -Update a specific condition - -## Example Usage - -```typescript -import { PatchV1SeverityMatrixConditionsConditionId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SeverityMatrixConditionsConditionId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition | \ No newline at end of file diff --git a/docs/models/components/patchv1severitymatrixdata.md b/docs/models/components/patchv1severitymatrixdata.md deleted file mode 100644 index d3611bbb..00000000 --- a/docs/models/components/patchv1severitymatrixdata.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1SeverityMatrixData - -## Example Usage - -```typescript -import { PatchV1SeverityMatrixData } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SeverityMatrixData = { - severity: "", - impactId: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `severity` | *string* | :heavy_check_mark: | Slug of a severity | -| `impactId` | *string* | :heavy_check_mark: | Impact id | -| `conditionId` | *string* | :heavy_check_mark: | Condition id | \ No newline at end of file diff --git a/docs/models/components/patchv1severitymatriximpactsimpactid.md b/docs/models/components/patchv1severitymatriximpactsimpactid.md deleted file mode 100644 index 46c76142..00000000 --- a/docs/models/components/patchv1severitymatriximpactsimpactid.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1SeverityMatrixImpactsImpactId - -Update a specific impact - -## Example Usage - -```typescript -import { PatchV1SeverityMatrixImpactsImpactId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SeverityMatrixImpactsImpactId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1signalsemailtargetsid.md b/docs/models/components/patchv1signalsemailtargetsid.md deleted file mode 100644 index 42237a7c..00000000 --- a/docs/models/components/patchv1signalsemailtargetsid.md +++ /dev/null @@ -1,25 +0,0 @@ -# PatchV1SignalsEmailTargetsId - -Update a Signals email target by ID - -## Example Usage - -```typescript -import { PatchV1SignalsEmailTargetsId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SignalsEmailTargetsId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | The email target's name. | -| `slug` | *string* | :heavy_minus_sign: | The email address that will be listening to events. | -| `description` | *string* | :heavy_minus_sign: | A detailed description of the email target. | -| `target` | [components.PatchV1SignalsEmailTargetsIdTarget](../../models/components/patchv1signalsemailtargetsidtarget.md) | :heavy_minus_sign: | The target that the email target will notify. This object must contain a `type`
field that specifies the type of target and an `id` field that specifies the ID of
the target. The `type` field must be one of "escalation_policy", "on_call_schedule",
"team", "user", or "slack_channel".
| -| `allowedSenders` | *string*[] | :heavy_minus_sign: | A list of email addresses that are allowed to send events to the target. Must be exact match. | -| `statusCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the status of an incoming email that is sent to the target. | -| `levelCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the level of an incoming email that is sent to the target. | -| `rules` | *string*[] | :heavy_minus_sign: | A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. | -| `ruleMatchingStrategy` | [components.PatchV1SignalsEmailTargetsIdRuleMatchingStrategy](../../models/components/patchv1signalsemailtargetsidrulematchingstrategy.md) | :heavy_minus_sign: | Whether or not all rules must match, or if only one rule must match. | \ No newline at end of file diff --git a/docs/models/components/patchv1signalsemailtargetsidrulematchingstrategy.md b/docs/models/components/patchv1signalsemailtargetsidrulematchingstrategy.md deleted file mode 100644 index 4ee4cfb2..00000000 --- a/docs/models/components/patchv1signalsemailtargetsidrulematchingstrategy.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1SignalsEmailTargetsIdRuleMatchingStrategy - -Whether or not all rules must match, or if only one rule must match. - -## Example Usage - -```typescript -import { PatchV1SignalsEmailTargetsIdRuleMatchingStrategy } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SignalsEmailTargetsIdRuleMatchingStrategy = "any"; -``` - -## Values - -```typescript -"all" | "any" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1signalsemailtargetsidtarget.md b/docs/models/components/patchv1signalsemailtargetsidtarget.md deleted file mode 100644 index 615ff4b9..00000000 --- a/docs/models/components/patchv1signalsemailtargetsidtarget.md +++ /dev/null @@ -1,25 +0,0 @@ -# PatchV1SignalsEmailTargetsIdTarget - -The target that the email target will notify. This object must contain a `type` -field that specifies the type of target and an `id` field that specifies the ID of -the target. The `type` field must be one of "escalation_policy", "on_call_schedule", -"team", "user", or "slack_channel". - - -## Example Usage - -```typescript -import { PatchV1SignalsEmailTargetsIdTarget } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SignalsEmailTargetsIdTarget = { - type: "EscalationPolicy", - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `type` | [components.PatchV1SignalsEmailTargetsIdType](../../models/components/patchv1signalsemailtargetsidtype.md) | :heavy_check_mark: | The type of target that the inbound email will notify when matched. | -| `id` | *string* | :heavy_check_mark: | The ID of the target that the inbound email will notify when matched. | \ No newline at end of file diff --git a/docs/models/components/patchv1signalsemailtargetsidtype.md b/docs/models/components/patchv1signalsemailtargetsidtype.md deleted file mode 100644 index d57ba19e..00000000 --- a/docs/models/components/patchv1signalsemailtargetsidtype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1SignalsEmailTargetsIdType - -The type of target that the inbound email will notify when matched. - -## Example Usage - -```typescript -import { PatchV1SignalsEmailTargetsIdType } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SignalsEmailTargetsIdType = "User"; -``` - -## Values - -```typescript -"Team" | "EntireTeam" | "EscalationPolicy" | "OnCallSchedule" | "User" | "SlackChannel" | "Webhook" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1signalswebhooktargetsid.md b/docs/models/components/patchv1signalswebhooktargetsid.md deleted file mode 100644 index 76081c5a..00000000 --- a/docs/models/components/patchv1signalswebhooktargetsid.md +++ /dev/null @@ -1,20 +0,0 @@ -# PatchV1SignalsWebhookTargetsId - -Update a Signals webhook target by ID - -## Example Usage - -```typescript -import { PatchV1SignalsWebhookTargetsId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1SignalsWebhookTargetsId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | The webhook target's name. | -| `description` | *string* | :heavy_minus_sign: | An optional detailed description of the webhook target. | -| `url` | *string* | :heavy_minus_sign: | The URL that the webhook target will notify. | -| `signingKey` | *string* | :heavy_minus_sign: | An optional secret we will provide in the `FH-Signature` header
when sending a payload to the webhook target. This key will not be
shown in any response once configured.
| \ No newline at end of file diff --git a/docs/models/components/patchv1statusupdatetemplatesstatusupdatetemplateid.md b/docs/models/components/patchv1statusupdatetemplatesstatusupdatetemplateid.md deleted file mode 100644 index 6e23880f..00000000 --- a/docs/models/components/patchv1statusupdatetemplatesstatusupdatetemplateid.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1StatusUpdateTemplatesStatusUpdateTemplateId - -Update a single status update template - -## Example Usage - -```typescript -import { PatchV1StatusUpdateTemplatesStatusUpdateTemplateId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1StatusUpdateTemplatesStatusUpdateTemplateId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `body` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1taskliststasklistid.md b/docs/models/components/patchv1taskliststasklistid.md deleted file mode 100644 index 25b7cda4..00000000 --- a/docs/models/components/patchv1taskliststasklistid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1TaskListsTaskListId - -Updates a task list's attributes and task list items - -## Example Usage - -```typescript -import { PatchV1TaskListsTaskListId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TaskListsTaskListId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `taskListItems` | [components.PatchV1TaskListsTaskListIdTaskListItems](../../models/components/patchv1taskliststasklistidtasklistitems.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1taskliststasklistidtasklistitems.md b/docs/models/components/patchv1taskliststasklistidtasklistitems.md deleted file mode 100644 index af9d3821..00000000 --- a/docs/models/components/patchv1taskliststasklistidtasklistitems.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1TaskListsTaskListIdTaskListItems - -## Example Usage - -```typescript -import { PatchV1TaskListsTaskListIdTaskListItems } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TaskListsTaskListIdTaskListItems = { - summary: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `summary` | *string* | :heavy_check_mark: | A summary of the task | -| `description` | *string* | :heavy_minus_sign: | A long-form description for the task if additional context is helpful | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamid.md b/docs/models/components/patchv1teamsteamid.md deleted file mode 100644 index e64742e1..00000000 --- a/docs/models/components/patchv1teamsteamid.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1TeamsTeamId - -Update a single team from its ID - -## Example Usage - -```typescript -import { PatchV1TeamsTeamId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `slackChannelId` | *string* | :heavy_minus_sign: | The Slack channel ID that this team is associated with | -| `msTeamsChannel` | [components.PatchV1TeamsTeamIdMsTeamsChannel](../../models/components/patchv1teamsteamidmsteamschannel.md) | :heavy_minus_sign: | MS Teams channel identity for channel associated with this team | -| `memberships` | [components.PatchV1TeamsTeamIdMemberships](../../models/components/patchv1teamsteamidmemberships.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidescalationpoliciesid.md b/docs/models/components/patchv1teamsteamidescalationpoliciesid.md deleted file mode 100644 index b54117a5..00000000 --- a/docs/models/components/patchv1teamsteamidescalationpoliciesid.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1TeamsTeamIdEscalationPoliciesId - -Update a Signals escalation policy by ID - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdEscalationPoliciesId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdEscalationPoliciesId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | The escalation policy's name. | -| `description` | *string* | :heavy_minus_sign: | A detailed description of the escalation policy. | -| `repetitions` | *number* | :heavy_minus_sign: | The number of times that the escalation policy should repeat before an alert is dropped. | -| `default` | *boolean* | :heavy_minus_sign: | Whether this escalation policy should be the default for the team. | -| `steps` | [components.PatchV1TeamsTeamIdEscalationPoliciesIdSteps](../../models/components/patchv1teamsteamidescalationpoliciesidsteps.md)[] | :heavy_minus_sign: | A list of steps that define how an alert should escalate through the policy. | -| `handoffStep` | [components.PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep](../../models/components/patchv1teamsteamidescalationpoliciesidhandoffstep.md) | :heavy_minus_sign: | A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidescalationpoliciesidhandoffstep.md b/docs/models/components/patchv1teamsteamidescalationpoliciesidhandoffstep.md deleted file mode 100644 index 6fdf66e9..00000000 --- a/docs/models/components/patchv1teamsteamidescalationpoliciesidhandoffstep.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep - -A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep = { - targetType: "EscalationPolicy", - targetId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `targetType` | [components.PatchV1TeamsTeamIdEscalationPoliciesIdTargetType](../../models/components/patchv1teamsteamidescalationpoliciesidtargettype.md) | :heavy_check_mark: | The type of target to which the policy will hand off. | -| `targetId` | *string* | :heavy_check_mark: | The ID of the target to which the policy will hand off. | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidescalationpoliciesidsteps.md b/docs/models/components/patchv1teamsteamidescalationpoliciesidsteps.md deleted file mode 100644 index bcaa3e2e..00000000 --- a/docs/models/components/patchv1teamsteamidescalationpoliciesidsteps.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1TeamsTeamIdEscalationPoliciesIdSteps - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdEscalationPoliciesIdSteps } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdEscalationPoliciesIdSteps = { - timeout: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `targets` | [components.PatchV1TeamsTeamIdEscalationPoliciesIdTargets](../../models/components/patchv1teamsteamidescalationpoliciesidtargets.md)[] | :heavy_minus_sign: | A list of targets that the step will notify. You can specify up to 15 targets per step. | -| `timeout` | *string* | :heavy_check_mark: | An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidescalationpoliciesidtargets.md b/docs/models/components/patchv1teamsteamidescalationpoliciesidtargets.md deleted file mode 100644 index d354042f..00000000 --- a/docs/models/components/patchv1teamsteamidescalationpoliciesidtargets.md +++ /dev/null @@ -1,19 +0,0 @@ -# PatchV1TeamsTeamIdEscalationPoliciesIdTargets - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdEscalationPoliciesIdTargets } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdEscalationPoliciesIdTargets = { - type: "OnCallSchedule", - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.PatchV1TeamsTeamIdEscalationPoliciesIdType](../../models/components/patchv1teamsteamidescalationpoliciesidtype.md) | :heavy_check_mark: | The type of target that the step will notify. | -| `id` | *string* | :heavy_check_mark: | The ID of the target that the step will notify. | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidescalationpoliciesidtargettype.md b/docs/models/components/patchv1teamsteamidescalationpoliciesidtargettype.md deleted file mode 100644 index 71009c37..00000000 --- a/docs/models/components/patchv1teamsteamidescalationpoliciesidtargettype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdEscalationPoliciesIdTargetType - -The type of target to which the policy will hand off. - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdEscalationPoliciesIdTargetType } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdEscalationPoliciesIdTargetType = "Team"; -``` - -## Values - -```typescript -"EscalationPolicy" | "Team" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidescalationpoliciesidtype.md b/docs/models/components/patchv1teamsteamidescalationpoliciesidtype.md deleted file mode 100644 index 2736099d..00000000 --- a/docs/models/components/patchv1teamsteamidescalationpoliciesidtype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdEscalationPoliciesIdType - -The type of target that the step will notify. - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdEscalationPoliciesIdType } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdEscalationPoliciesIdType = "SlackChannel"; -``` - -## Values - -```typescript -"OnCallSchedule" | "User" | "SlackChannel" | "EntireTeam" | "Webhook" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidmemberships.md b/docs/models/components/patchv1teamsteamidmemberships.md deleted file mode 100644 index b40fa0ec..00000000 --- a/docs/models/components/patchv1teamsteamidmemberships.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdMemberships - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdMemberships } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdMemberships = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `userId` | *string* | :heavy_minus_sign: | N/A | -| `scheduleId` | *string* | :heavy_minus_sign: | N/A | -| `incidentRoleId` | *string* | :heavy_minus_sign: | An incident role ID that this user will automatically assigned if this team is assigned to an incident | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidmsteamschannel.md b/docs/models/components/patchv1teamsteamidmsteamschannel.md deleted file mode 100644 index bee375ff..00000000 --- a/docs/models/components/patchv1teamsteamidmsteamschannel.md +++ /dev/null @@ -1,21 +0,0 @@ -# PatchV1TeamsTeamIdMsTeamsChannel - -MS Teams channel identity for channel associated with this team - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdMsTeamsChannel } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdMsTeamsChannel = { - channelId: "", - msTeamId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `channelId` | *string* | :heavy_check_mark: | N/A | -| `msTeamId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleid.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleid.md deleted file mode 100644 index 63fe68b1..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleid.md +++ /dev/null @@ -1,26 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleId - -Update a Signals on-call schedule by ID - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | The on-call schedule's name. | -| `description` | *string* | :heavy_minus_sign: | A detailed description of the on-call schedule. | -| `timeZone` | *string* | :heavy_minus_sign: | The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. | -| `slackUserGroupId` | *string* | :heavy_minus_sign: | The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. | -| `members` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers](../../models/components/patchv1teamsteamidoncallschedulesscheduleidmembers.md)[] | :heavy_minus_sign: | An ordered list of objects that specify members of the on-call schedule's rotation. | -| `strategy` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy](../../models/components/patchv1teamsteamidoncallschedulesscheduleidstrategy.md) | :heavy_minus_sign: | An object that specifies how the schedule's on-call shifts should be generated. | -| `restrictions` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions](../../models/components/patchv1teamsteamidoncallschedulesscheduleidrestrictions.md)[] | :heavy_minus_sign: | A list of objects that restrict the schedule to speccific on-call periods. | -| `effectiveAt` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when the updated schedule should take effect. This
value must be provided if editing an attribute that would affect how the schedule's
shifts are generated, such as the time zone, members, strategy, or restrictions.
| -| `color` | *string* | :heavy_minus_sign: | A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. | -| `memberIds` | *string*[] | :heavy_minus_sign: | This parameter is deprecated; use `members` instead. | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidendday.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidendday.md deleted file mode 100644 index 419aeabe..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidendday.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay - -The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay = "thursday"; -``` - -## Values - -```typescript -"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidhandoffday.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidhandoffday.md deleted file mode 100644 index 11c566fc..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidhandoffday.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay - -The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay = "thursday"; -``` - -## Values - -```typescript -"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidmembers.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidmembers.md deleted file mode 100644 index 2271cfdb..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidmembers.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `userId` | *string* | :heavy_minus_sign: | The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule
multiple times to construct more complex rotations, and you can specify a `null` user ID to create
unassigned slots in the rotation.
| \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidrestrictions.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidrestrictions.md deleted file mode 100644 index 31693451..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidrestrictions.md +++ /dev/null @@ -1,23 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions = { - startDay: "friday", - startTime: "", - endDay: "friday", - endTime: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `startDay` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay](../../models/components/patchv1teamsteamidoncallschedulesscheduleidstartday.md) | :heavy_check_mark: | The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). | -| `startTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should start. | -| `endDay` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay](../../models/components/patchv1teamsteamidoncallschedulesscheduleidendday.md) | :heavy_check_mark: | The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). | -| `endTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should end. | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidshiftsid.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidshiftsid.md deleted file mode 100644 index ba8c849b..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidshiftsid.md +++ /dev/null @@ -1,20 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId - -Update a Signals on-call shift by ID - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `startTime` | *string* | :heavy_minus_sign: | The start time of the shift in ISO8601 format. | -| `endTime` | *string* | :heavy_minus_sign: | The end time of the shift in ISO8601 format. | -| `userId` | *string* | :heavy_minus_sign: | The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. | -| `coverageRequest` | *string* | :heavy_minus_sign: | A description of why coverage is needed for this shift. If the shift is re-assigned, this will automatically be cleared unless provided again. | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidstartday.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidstartday.md deleted file mode 100644 index e9c2455e..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidstartday.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay - -The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay = "wednesday"; -``` - -## Values - -```typescript -"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidstrategy.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidstrategy.md deleted file mode 100644 index fc9c9a01..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidstrategy.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy - -An object that specifies how the schedule's on-call shifts should be generated. - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy = { - type: "daily", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType](../../models/components/patchv1teamsteamidoncallschedulesscheduleidtype.md) | :heavy_check_mark: | The type of strategy. Must be one of "daily", "weekly", or "custom". | -| `handoffTime` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". | -| `handoffDay` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay](../../models/components/patchv1teamsteamidoncallschedulesscheduleidhandoffday.md) | :heavy_minus_sign: | The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". | -| `shiftDuration` | *string* | :heavy_minus_sign: | An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidtype.md b/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidtype.md deleted file mode 100644 index 64930c06..00000000 --- a/docs/models/components/patchv1teamsteamidoncallschedulesscheduleidtype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType - -The type of strategy. Must be one of "daily", "weekly", or "custom". - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType = "weekly"; -``` - -## Values - -```typescript -"daily" | "weekly" | "custom" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidsignalrulesid.md b/docs/models/components/patchv1teamsteamidsignalrulesid.md deleted file mode 100644 index 153a9af5..00000000 --- a/docs/models/components/patchv1teamsteamidsignalrulesid.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1TeamsTeamIdSignalRulesId - -Update a Signals rule by ID - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdSignalRulesId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdSignalRulesId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | The rule's name. | -| `expression` | *string* | :heavy_minus_sign: | The CEL expression that defines the rule. | -| `targetType` | [components.PatchV1TeamsTeamIdSignalRulesIdTargetType](../../models/components/patchv1teamsteamidsignalrulesidtargettype.md) | :heavy_minus_sign: | The type of target that the rule will notify when matched. | -| `targetId` | *string* | :heavy_minus_sign: | The ID of the target that the rule will notify when matched. | -| `incidentTypeId` | *string* | :heavy_minus_sign: | The ID of an incident type that should be used when an alert is promoted to an incident | -| `notificationPriorityOverride` | [components.PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride](../../models/components/patchv1teamsteamidsignalrulesidnotificationpriorityoverride.md) | :heavy_minus_sign: | A notification priority that will be set on the resulting alert (default: HIGH) | \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidsignalrulesidnotificationpriorityoverride.md b/docs/models/components/patchv1teamsteamidsignalrulesidnotificationpriorityoverride.md deleted file mode 100644 index 58c38dd0..00000000 --- a/docs/models/components/patchv1teamsteamidsignalrulesidnotificationpriorityoverride.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride - -A notification priority that will be set on the resulting alert (default: HIGH) - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride = - "MEDIUM"; -``` - -## Values - -```typescript -"HIGH" | "MEDIUM" | "LOW" | "" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1teamsteamidsignalrulesidtargettype.md b/docs/models/components/patchv1teamsteamidsignalrulesidtargettype.md deleted file mode 100644 index 1b8b5268..00000000 --- a/docs/models/components/patchv1teamsteamidsignalrulesidtargettype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PatchV1TeamsTeamIdSignalRulesIdTargetType - -The type of target that the rule will notify when matched. - -## Example Usage - -```typescript -import { PatchV1TeamsTeamIdSignalRulesIdTargetType } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TeamsTeamIdSignalRulesIdTargetType = "Webhook"; -``` - -## Values - -```typescript -"EscalationPolicy" | "OnCallSchedule" | "User" | "Webhook" -``` \ No newline at end of file diff --git a/docs/models/components/patchv1ticketingprioritiesid.md b/docs/models/components/patchv1ticketingprioritiesid.md deleted file mode 100644 index 3084415f..00000000 --- a/docs/models/components/patchv1ticketingprioritiesid.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1TicketingPrioritiesId - -Update a single ticketing priority's attributes - -## Example Usage - -```typescript -import { PatchV1TicketingPrioritiesId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TicketingPrioritiesId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, this priority will shift that priority and all priorities down the list. | \ No newline at end of file diff --git a/docs/models/components/patchv1ticketingticketsticketid.md b/docs/models/components/patchv1ticketingticketsticketid.md deleted file mode 100644 index 33557885..00000000 --- a/docs/models/components/patchv1ticketingticketsticketid.md +++ /dev/null @@ -1,22 +0,0 @@ -# PatchV1TicketingTicketsTicketId - -Update a ticket's attributes - -## Example Usage - -```typescript -import { PatchV1TicketingTicketsTicketId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1TicketingTicketsTicketId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `state` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `priorityId` | *string* | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the ticket | \ No newline at end of file diff --git a/docs/models/components/patchv1webhookswebhookid.md b/docs/models/components/patchv1webhookswebhookid.md deleted file mode 100644 index df64200a..00000000 --- a/docs/models/components/patchv1webhookswebhookid.md +++ /dev/null @@ -1,18 +0,0 @@ -# PatchV1WebhooksWebhookId - -Update a specific webhook - -## Example Usage - -```typescript -import { PatchV1WebhooksWebhookId } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1WebhooksWebhookId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `url` | *string* | :heavy_minus_sign: | N/A | -| `state` | [components.PatchV1WebhooksWebhookIdState](../../models/components/patchv1webhookswebhookidstate.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/patchv1webhookswebhookidstate.md b/docs/models/components/patchv1webhookswebhookidstate.md deleted file mode 100644 index ca535c76..00000000 --- a/docs/models/components/patchv1webhookswebhookidstate.md +++ /dev/null @@ -1,15 +0,0 @@ -# PatchV1WebhooksWebhookIdState - -## Example Usage - -```typescript -import { PatchV1WebhooksWebhookIdState } from "firehydrant-typescript-sdk/models/components"; - -let value: PatchV1WebhooksWebhookIdState = "active"; -``` - -## Values - -```typescript -"active" | "inactive" -``` \ No newline at end of file diff --git a/docs/models/components/pongentity.md b/docs/models/components/pongentity.md index e707ceb7..d8f0cf0b 100644 --- a/docs/models/components/pongentity.md +++ b/docs/models/components/pongentity.md @@ -5,15 +5,15 @@ PongEntity model ## Example Usage ```typescript -import { PongEntity } from "firehydrant-typescript-sdk/models/components"; +import { PongEntity } from "firehydrant/models/components"; let value: PongEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `response` | *string* | :heavy_minus_sign: | N/A | -| `actor` | [components.ActorEntity](../../models/components/actorentity.md) | :heavy_minus_sign: | N/A | -| `organization` | [components.OrganizationEntity](../../models/components/organizationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `response` | *string* | :heavy_minus_sign: | N/A | +| `actor` | [components.NullableActorEntity](../../models/components/nullableactorentity.md) | :heavy_minus_sign: | N/A | +| `organization` | [components.NullableOrganizationEntity](../../models/components/nullableorganizationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postmortemspostmortemreportentity.md b/docs/models/components/postmortemspostmortemreportentity.md index fb2e55f3..1b34094e 100644 --- a/docs/models/components/postmortemspostmortemreportentity.md +++ b/docs/models/components/postmortemspostmortemreportentity.md @@ -5,23 +5,26 @@ PostMortems_PostMortemReportEntity model ## Example Usage ```typescript -import { PostMortemsPostMortemReportEntity } from "firehydrant-typescript-sdk/models/components"; +import { PostMortemsPostMortemReportEntity } from "firehydrant/models/components"; let value: PostMortemsPostMortemReportEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `incidentId` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | N/A | -| `additionalDetails` | *string*[] | :heavy_minus_sign: | N/A | -| `incident` | [components.IncidentEntity](../../models/components/incidententity.md) | :heavy_minus_sign: | IncidentEntity model | -| `questions` | [components.PostMortemsQuestionEntity](../../models/components/postmortemsquestionentity.md) | :heavy_minus_sign: | N/A | -| `calendarEvents` | [components.CalendarsEventEntity](../../models/components/calendarsevententity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `incidentId` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | N/A | +| `additionalDetails` | *string*[] | :heavy_minus_sign: | N/A | +| `incident` | [components.NullableIncidentEntity](../../models/components/nullableincidententity.md) | :heavy_minus_sign: | N/A | +| `questions` | [components.NullablePostMortemsQuestionEntity](../../models/components/nullablepostmortemsquestionentity.md) | :heavy_minus_sign: | N/A | +| `calendarEvents` | [components.NullableCalendarsEventEntity](../../models/components/nullablecalendarsevententity.md) | :heavy_minus_sign: | N/A | +| `retrospectiveShim` | *boolean* | :heavy_minus_sign: | N/A | +| `retrospectiveId` | *string* | :heavy_minus_sign: | N/A | +| `retrospectiveNote` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postmortemspostmortemreportentitypaginated.md b/docs/models/components/postmortemspostmortemreportentitypaginated.md index 0ddeb267..8ac2b125 100644 --- a/docs/models/components/postmortemspostmortemreportentitypaginated.md +++ b/docs/models/components/postmortemspostmortemreportentitypaginated.md @@ -5,7 +5,7 @@ PostMortems_PostMortemReportEntityPaginated model ## Example Usage ```typescript -import { PostMortemsPostMortemReportEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { PostMortemsPostMortemReportEntityPaginated } from "firehydrant/models/components"; let value: PostMortemsPostMortemReportEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: PostMortemsPostMortemReportEntityPaginated = {}; | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | `data` | [components.PostMortemsPostMortemReportEntity](../../models/components/postmortemspostmortemreportentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postmortemsquestionentity.md b/docs/models/components/postmortemsquestionentity.md deleted file mode 100644 index 923b33b6..00000000 --- a/docs/models/components/postmortemsquestionentity.md +++ /dev/null @@ -1,23 +0,0 @@ -# PostMortemsQuestionEntity - -## Example Usage - -```typescript -import { PostMortemsQuestionEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: PostMortemsQuestionEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `body` | *string* | :heavy_minus_sign: | N/A | -| `tooltip` | *string* | :heavy_minus_sign: | N/A | -| `kind` | *string* | :heavy_minus_sign: | N/A | -| `questionTypeId` | *string* | :heavy_minus_sign: | N/A | -| `isRequired` | *boolean* | :heavy_minus_sign: | N/A | -| `availableOptions` | *string*[] | :heavy_minus_sign: | N/A | -| `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postmortemsquestiontypeentity.md b/docs/models/components/postmortemsquestiontypeentity.md index aa296388..e33bfd73 100644 --- a/docs/models/components/postmortemsquestiontypeentity.md +++ b/docs/models/components/postmortemsquestiontypeentity.md @@ -5,7 +5,7 @@ PostMortems_QuestionTypeEntity model ## Example Usage ```typescript -import { PostMortemsQuestionTypeEntity } from "firehydrant-typescript-sdk/models/components"; +import { PostMortemsQuestionTypeEntity } from "firehydrant/models/components"; let value: PostMortemsQuestionTypeEntity = {}; ``` diff --git a/docs/models/components/postmortemsquestiontypeentitypaginated.md b/docs/models/components/postmortemsquestiontypeentitypaginated.md index b2d2bb90..a99953b1 100644 --- a/docs/models/components/postmortemsquestiontypeentitypaginated.md +++ b/docs/models/components/postmortemsquestiontypeentitypaginated.md @@ -5,7 +5,7 @@ PostMortems_QuestionTypeEntityPaginated model ## Example Usage ```typescript -import { PostMortemsQuestionTypeEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { PostMortemsQuestionTypeEntityPaginated } from "firehydrant/models/components"; let value: PostMortemsQuestionTypeEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: PostMortemsQuestionTypeEntityPaginated = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `data` | [components.PostMortemsQuestionTypeEntity](../../models/components/postmortemsquestiontypeentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postmortemsreasonentity.md b/docs/models/components/postmortemsreasonentity.md index 588b4b64..5f0d9c93 100644 --- a/docs/models/components/postmortemsreasonentity.md +++ b/docs/models/components/postmortemsreasonentity.md @@ -5,7 +5,7 @@ PostMortems_ReasonEntity model ## Example Usage ```typescript -import { PostMortemsReasonEntity } from "firehydrant-typescript-sdk/models/components"; +import { PostMortemsReasonEntity } from "firehydrant/models/components"; let value: PostMortemsReasonEntity = {}; ``` @@ -17,5 +17,5 @@ let value: PostMortemsReasonEntity = {}; | `id` | *string* | :heavy_minus_sign: | N/A | | `summary` | *string* | :heavy_minus_sign: | N/A | | `position` | *number* | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | `conversations` | [components.ConversationsAPIEntitiesReference](../../models/components/conversationsapientitiesreference.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postmortemsreasonentitypaginated.md b/docs/models/components/postmortemsreasonentitypaginated.md index 77c5d998..a89eeb7d 100644 --- a/docs/models/components/postmortemsreasonentitypaginated.md +++ b/docs/models/components/postmortemsreasonentitypaginated.md @@ -5,7 +5,7 @@ PostMortems_ReasonEntityPaginated model ## Example Usage ```typescript -import { PostMortemsReasonEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { PostMortemsReasonEntityPaginated } from "firehydrant/models/components"; let value: PostMortemsReasonEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: PostMortemsReasonEntityPaginated = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `data` | [components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postmortemssectionfieldentity.md b/docs/models/components/postmortemssectionfieldentity.md index 521343e6..2bfe10ba 100644 --- a/docs/models/components/postmortemssectionfieldentity.md +++ b/docs/models/components/postmortemssectionfieldentity.md @@ -5,7 +5,7 @@ PostMortems_SectionFieldEntity model ## Example Usage ```typescript -import { PostMortemsSectionFieldEntity } from "firehydrant-typescript-sdk/models/components"; +import { PostMortemsSectionFieldEntity } from "firehydrant/models/components"; let value: PostMortemsSectionFieldEntity = {}; ``` diff --git a/docs/models/components/postv1catalogscatalogidingest.md b/docs/models/components/postv1catalogscatalogidingest.md deleted file mode 100644 index 63e61c92..00000000 --- a/docs/models/components/postv1catalogscatalogidingest.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1CatalogsCatalogIdIngest - -Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. - -## Example Usage - -```typescript -import { PostV1CatalogsCatalogIdIngest } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1CatalogsCatalogIdIngest = { - encoding: "application/x-yaml", - data: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `encoding` | [components.Encoding](../../models/components/encoding.md) | :heavy_check_mark: | Encoding for submitted data | -| `data` | *string* | :heavy_check_mark: | Service data | \ No newline at end of file diff --git a/docs/models/components/postv1changes.md b/docs/models/components/postv1changes.md deleted file mode 100644 index d5054ba0..00000000 --- a/docs/models/components/postv1changes.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1Changes - -Create a new change entry - -## Example Usage - -```typescript -import { PostV1Changes } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Changes = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | A labels hash of keys and values | \ No newline at end of file diff --git a/docs/models/components/postv1changeschangeididentities.md b/docs/models/components/postv1changeschangeididentities.md deleted file mode 100644 index 70e6b7bc..00000000 --- a/docs/models/components/postv1changeschangeididentities.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1ChangesChangeIdIdentities - -Create an identity for this change - -## Example Usage - -```typescript -import { PostV1ChangesChangeIdIdentities } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ChangesChangeIdIdentities = { - type: "", - value: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | -| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1checklisttemplates.md b/docs/models/components/postv1checklisttemplates.md deleted file mode 100644 index a118fa68..00000000 --- a/docs/models/components/postv1checklisttemplates.md +++ /dev/null @@ -1,28 +0,0 @@ -# PostV1ChecklistTemplates - -Creates a checklist template for the organization - -## Example Usage - -```typescript -import { PostV1ChecklistTemplates } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ChecklistTemplates = { - name: "", - checks: [ - { - name: "", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `checks` | [components.Checks](../../models/components/checks.md)[] | :heavy_check_mark: | An array of checks for the checklist template | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `teamId` | *string* | :heavy_minus_sign: | The ID of the Team that owns the checklist template | -| `connectedServices` | [components.ConnectedServices](../../models/components/connectedservices.md)[] | :heavy_minus_sign: | Array of service IDs to attach checklist template to | \ No newline at end of file diff --git a/docs/models/components/postv1conversationsconversationidcomments.md b/docs/models/components/postv1conversationsconversationidcomments.md deleted file mode 100644 index ea5527e4..00000000 --- a/docs/models/components/postv1conversationsconversationidcomments.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1ConversationsConversationIdComments - -ALPHA - Creates a comment for a project - -## Example Usage - -```typescript -import { PostV1ConversationsConversationIdComments } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ConversationsConversationIdComments = { - body: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `body` | *string* | :heavy_check_mark: | Text body of comment | \ No newline at end of file diff --git a/docs/models/components/postv1conversationsconversationidcommentscommentidreactions.md b/docs/models/components/postv1conversationsconversationidcommentscommentidreactions.md deleted file mode 100644 index 5b489aa7..00000000 --- a/docs/models/components/postv1conversationsconversationidcommentscommentidreactions.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1ConversationsConversationIdCommentsCommentIdReactions - -ALPHA - Create a reaction on a comment - -## Example Usage - -```typescript -import { PostV1ConversationsConversationIdCommentsCommentIdReactions } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ConversationsConversationIdCommentsCommentIdReactions = { - reaction: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `reaction` | *string* | :heavy_check_mark: | CLDR short name of Unicode emojis | \ No newline at end of file diff --git a/docs/models/components/postv1customfieldsdefinitions.md b/docs/models/components/postv1customfieldsdefinitions.md deleted file mode 100644 index 7e04854a..00000000 --- a/docs/models/components/postv1customfieldsdefinitions.md +++ /dev/null @@ -1,26 +0,0 @@ -# PostV1CustomFieldsDefinitions - -Create a new custom field definition - -## Example Usage - -```typescript -import { PostV1CustomFieldsDefinitions } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1CustomFieldsDefinitions = { - displayName: "Tyra.Hessel69", - fieldType: "", - required: false, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `displayName` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `fieldType` | *string* | :heavy_check_mark: | N/A | -| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | -| `required` | *boolean* | :heavy_check_mark: | N/A | -| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. | \ No newline at end of file diff --git a/docs/models/components/postv1environments.md b/docs/models/components/postv1environments.md deleted file mode 100644 index f79c12fc..00000000 --- a/docs/models/components/postv1environments.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostV1Environments - -Creates an environment for the organization - -## Example Usage - -```typescript -import { PostV1Environments } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Environments = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1functionalities.md b/docs/models/components/postv1functionalities.md deleted file mode 100644 index 4b2a744d..00000000 --- a/docs/models/components/postv1functionalities.md +++ /dev/null @@ -1,28 +0,0 @@ -# PostV1Functionalities - -Creates a functionality for the organization - -## Example Usage - -```typescript -import { PostV1Functionalities } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Functionalities = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `services` | [components.Services](../../models/components/services.md)[] | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | -| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | -| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | -| `externalResources` | [components.ExternalResources](../../models/components/externalresources.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | -| `links` | [components.Links](../../models/components/links.md)[] | :heavy_minus_sign: | An array of links to associate with this service | -| `owner` | [components.Owner](../../models/components/owner.md) | :heavy_minus_sign: | An object representing a Team that owns the service | -| `teams` | [components.Teams](../../models/components/teams.md)[] | :heavy_minus_sign: | An array of teams to attach to this service. | \ No newline at end of file diff --git a/docs/models/components/postv1incidentroles.md b/docs/models/components/postv1incidentroles.md deleted file mode 100644 index 9427c1ea..00000000 --- a/docs/models/components/postv1incidentroles.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1IncidentRoles - -Create a new incident role - -## Example Usage - -```typescript -import { PostV1IncidentRoles } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentRoles = { - name: "", - summary: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `summary` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidents.md b/docs/models/components/postv1incidents.md deleted file mode 100644 index 87118081..00000000 --- a/docs/models/components/postv1incidents.md +++ /dev/null @@ -1,37 +0,0 @@ -# PostV1Incidents - -Create a new incident - -## Example Usage - -```typescript -import { PostV1Incidents } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Incidents = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `priority` | *string* | :heavy_minus_sign: | N/A | -| `severity` | *string* | :heavy_minus_sign: | N/A | -| `severityConditionId` | *string* | :heavy_minus_sign: | N/A | -| `severityImpactId` | *string* | :heavy_minus_sign: | N/A | -| `alertIds` | *string*[] | :heavy_minus_sign: | List of alert IDs that this incident should be associated to | -| `labels` | [components.PostV1IncidentsLabels](../../models/components/postv1incidentslabels.md) | :heavy_minus_sign: | Key:value pairs to track custom data for the incident | -| `runbookIds` | *string*[] | :heavy_minus_sign: | List of ids of Runbooks to attach to this incident. Foregoes any conditions these Runbooks may have guarding automatic attachment. | -| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | -| `impacts` | [components.Impacts](../../models/components/impacts.md)[] | :heavy_minus_sign: | An array of impacted infrastructure | -| `milestones` | [components.Milestones](../../models/components/milestones.md)[] | :heavy_minus_sign: | An array of milestones to set on an incident. This can be used to create an already-resolved incident. | -| `restricted` | *boolean* | :heavy_minus_sign: | N/A | -| `teamIds` | *string*[] | :heavy_minus_sign: | IDs of teams you wish to assign to this incident. | -| `customFields` | [components.CustomFields](../../models/components/customfields.md)[] | :heavy_minus_sign: | An array of custom fields to set on the incident. | -| `externalLinks` | *string* | :heavy_minus_sign: | N/A | -| `skipIncidentTypeValues` | *boolean* | :heavy_minus_sign: | If true, the incident type values will not be copied to the incident. This is useful when creating an incident from an incident type, but you want to set the values manually. | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidgenericchatmessages.md b/docs/models/components/postv1incidentsincidentidgenericchatmessages.md deleted file mode 100644 index 9f0a4523..00000000 --- a/docs/models/components/postv1incidentsincidentidgenericchatmessages.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1IncidentsIncidentIdGenericChatMessages - -Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdGenericChatMessages } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdGenericChatMessages = { - body: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `body` | *string* | :heavy_check_mark: | N/A | -| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for when the chat message occurred | -| `voteDirection` | [components.VoteDirection](../../models/components/votedirection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidimpacttype.md b/docs/models/components/postv1incidentsincidentidimpacttype.md deleted file mode 100644 index e1ffe7b5..00000000 --- a/docs/models/components/postv1incidentsincidentidimpacttype.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostV1IncidentsIncidentIdImpactType - -Add impacted infrastructure to an incident - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdImpactType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdImpactType = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `conditionId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidlinks.md b/docs/models/components/postv1incidentsincidentidlinks.md deleted file mode 100644 index a10e17dd..00000000 --- a/docs/models/components/postv1incidentsincidentidlinks.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1IncidentsIncidentIdLinks - -Allows adding adhoc links to an incident as an attachment - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdLinks } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdLinks = { - href: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `displayText` | *string* | :heavy_minus_sign: | N/A | -| `iconUrl` | *string* | :heavy_minus_sign: | N/A | -| `href` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidnotes.md b/docs/models/components/postv1incidentsincidentidnotes.md deleted file mode 100644 index e917bf7b..00000000 --- a/docs/models/components/postv1incidentsincidentidnotes.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1IncidentsIncidentIdNotes - -Create a new note on for an incident. The visibility field on a note determines where it gets posted. - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdNotes } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdNotes = { - body: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `body` | *string* | :heavy_check_mark: | N/A | -| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for when the note occurred | -| `visibility` | [components.PostV1IncidentsIncidentIdNotesVisibility](../../models/components/postv1incidentsincidentidnotesvisibility.md) | :heavy_minus_sign: | N/A | -| `statusPages` | [components.PostV1IncidentsIncidentIdNotesStatusPages](../../models/components/postv1incidentsincidentidnotesstatuspages.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidnotesstatuspages.md b/docs/models/components/postv1incidentsincidentidnotesstatuspages.md deleted file mode 100644 index b770d809..00000000 --- a/docs/models/components/postv1incidentsincidentidnotesstatuspages.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1IncidentsIncidentIdNotesStatusPages - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdNotesStatusPages } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdNotesStatusPages = { - id: "", - integrationSlug: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `integrationSlug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidnotesvisibility.md b/docs/models/components/postv1incidentsincidentidnotesvisibility.md deleted file mode 100644 index 503a373e..00000000 --- a/docs/models/components/postv1incidentsincidentidnotesvisibility.md +++ /dev/null @@ -1,15 +0,0 @@ -# PostV1IncidentsIncidentIdNotesVisibility - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdNotesVisibility } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdNotesVisibility = "private_to_org"; -``` - -## Values - -```typescript -"private_to_org" | "open_to_public" | "internal_status_page" -``` \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidrelatedchangeevents.md b/docs/models/components/postv1incidentsincidentidrelatedchangeevents.md deleted file mode 100644 index fe1ec50f..00000000 --- a/docs/models/components/postv1incidentsincidentidrelatedchangeevents.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1IncidentsIncidentIdRelatedChangeEvents - -Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdRelatedChangeEvents } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdRelatedChangeEvents = { - changeEventId: "", - type: "dismissed", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `changeEventId` | *string* | :heavy_check_mark: | The ID of the change event to associate | -| `type` | [components.PostV1IncidentsIncidentIdRelatedChangeEventsType](../../models/components/postv1incidentsincidentidrelatedchangeeventstype.md) | :heavy_check_mark: | N/A | -| `why` | *string* | :heavy_minus_sign: | A short description about why this change event is related | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidrelatedchangeeventstype.md b/docs/models/components/postv1incidentsincidentidrelatedchangeeventstype.md deleted file mode 100644 index 99a06890..00000000 --- a/docs/models/components/postv1incidentsincidentidrelatedchangeeventstype.md +++ /dev/null @@ -1,15 +0,0 @@ -# PostV1IncidentsIncidentIdRelatedChangeEventsType - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdRelatedChangeEventsType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdRelatedChangeEventsType = "dismissed"; -``` - -## Values - -```typescript -"caused" | "fixed" | "suspect" | "dismissed" -``` \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidroleassignments.md b/docs/models/components/postv1incidentsincidentidroleassignments.md deleted file mode 100644 index 6cc4341c..00000000 --- a/docs/models/components/postv1incidentsincidentidroleassignments.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1IncidentsIncidentIdRoleAssignments - -Assign a role to a user for this incident - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdRoleAssignments } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdRoleAssignments = { - userId: "", - incidentRoleId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `userId` | *string* | :heavy_check_mark: | The user ID to assign the role to | -| `incidentRoleId` | *string* | :heavy_check_mark: | The Incident Role ID to assign the role to | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidstatuspages.md b/docs/models/components/postv1incidentsincidentidstatuspages.md deleted file mode 100644 index 2f6385be..00000000 --- a/docs/models/components/postv1incidentsincidentidstatuspages.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1IncidentsIncidentIdStatusPages - -Add a status page to an incident. - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdStatusPages } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdStatusPages = { - integrationSlug: "", - integrationId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `integrationSlug` | *string* | :heavy_check_mark: | N/A | -| `integrationId` | *string* | :heavy_check_mark: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidtasklists.md b/docs/models/components/postv1incidentsincidentidtasklists.md deleted file mode 100644 index 3f46ac40..00000000 --- a/docs/models/components/postv1incidentsincidentidtasklists.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostV1IncidentsIncidentIdTaskLists - -Add all tasks from list to incident - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdTaskLists } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdTaskLists = { - taskListId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `taskListId` | *string* | :heavy_check_mark: | The id of the task list. | -| `assigneeId` | *string* | :heavy_minus_sign: | The ID of the user assigned to the tasks in this list. | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidtasks.md b/docs/models/components/postv1incidentsincidentidtasks.md deleted file mode 100644 index b96f80d1..00000000 --- a/docs/models/components/postv1incidentsincidentidtasks.md +++ /dev/null @@ -1,23 +0,0 @@ -# PostV1IncidentsIncidentIdTasks - -Create a task - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdTasks } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdTasks = { - title: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `title` | *string* | :heavy_check_mark: | The title of the task. | -| `state` | *string* | :heavy_minus_sign: | The state of the task. One of: open, in_progress, cancelled, done | -| `description` | *string* | :heavy_minus_sign: | A description of what the task is for. | -| `assigneeId` | *string* | :heavy_minus_sign: | The ID of the user assigned to the task. | -| `dueAt` | *string* | :heavy_minus_sign: | The due date of the task. Relative values are supported such as '5m' | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidtaskstaskidconvert.md b/docs/models/components/postv1incidentsincidentidtaskstaskidconvert.md deleted file mode 100644 index a365ccc4..00000000 --- a/docs/models/components/postv1incidentsincidentidtaskstaskidconvert.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1IncidentsIncidentIdTasksTaskIdConvert - -Convert a task to a follow-up - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdTasksTaskIdConvert } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdTasksTaskIdConvert = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `projectId` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `state` | *string* | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the ticket | \ No newline at end of file diff --git a/docs/models/components/postv1incidentsincidentidteamassignments.md b/docs/models/components/postv1incidentsincidentidteamassignments.md deleted file mode 100644 index 6501c9da..00000000 --- a/docs/models/components/postv1incidentsincidentidteamassignments.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1IncidentsIncidentIdTeamAssignments - -Assign a team for this incident - -## Example Usage - -```typescript -import { PostV1IncidentsIncidentIdTeamAssignments } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsIncidentIdTeamAssignments = { - teamId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `teamId` | *string* | :heavy_check_mark: | The team ID to associate to the incident | \ No newline at end of file diff --git a/docs/models/components/postv1incidentslabels.md b/docs/models/components/postv1incidentslabels.md deleted file mode 100644 index f68ac7e6..00000000 --- a/docs/models/components/postv1incidentslabels.md +++ /dev/null @@ -1,16 +0,0 @@ -# PostV1IncidentsLabels - -Key:value pairs to track custom data for the incident - -## Example Usage - -```typescript -import { PostV1IncidentsLabels } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentsLabels = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/postv1incidenttypes.md b/docs/models/components/postv1incidenttypes.md deleted file mode 100644 index 5209c050..00000000 --- a/docs/models/components/postv1incidenttypes.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1IncidentTypes - -Create a new incident type - -## Example Usage - -```typescript -import { PostV1IncidentTypes } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentTypes = { - name: "", - template: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `template` | [components.Template](../../models/components/template.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1incidenttypesimpacts.md b/docs/models/components/postv1incidenttypesimpacts.md deleted file mode 100644 index 81509ff2..00000000 --- a/docs/models/components/postv1incidenttypesimpacts.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1IncidentTypesImpacts - -## Example Usage - -```typescript -import { PostV1IncidentTypesImpacts } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1IncidentTypesImpacts = { - id: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `id` | *string* | :heavy_check_mark: | The id of impact | -| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/postv1nuncsubscriptions.md b/docs/models/components/postv1nuncsubscriptions.md deleted file mode 100644 index 3fe46a5b..00000000 --- a/docs/models/components/postv1nuncsubscriptions.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1NuncSubscriptions - -Subscribe to status page updates - -## Example Usage - -```typescript -import { PostV1NuncSubscriptions } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1NuncSubscriptions = { - email: "Madaline.Konopelski15@gmail.com", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `email` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1postmortemsreports.md b/docs/models/components/postv1postmortemsreports.md deleted file mode 100644 index 1054466f..00000000 --- a/docs/models/components/postv1postmortemsreports.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1PostMortemsReports - -Create a report - -## Example Usage - -```typescript -import { PostV1PostMortemsReports } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1PostMortemsReports = { - incidentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1postmortemsreportsreportidpublish.md b/docs/models/components/postv1postmortemsreportsreportidpublish.md deleted file mode 100644 index 9d4bd3b7..00000000 --- a/docs/models/components/postv1postmortemsreportsreportidpublish.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostV1PostMortemsReportsReportIdPublish - -Marks an incident retrospective as published and emails all of the participants in the report the summary - -## Example Usage - -```typescript -import { PostV1PostMortemsReportsReportIdPublish } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1PostMortemsReportsReportIdPublish = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `userIds` | *string*[] | :heavy_minus_sign: | An array of user IDs with whom to share the report | -| `teamIds` | *string*[] | :heavy_minus_sign: | An array of team IDs with whom to share the report | \ No newline at end of file diff --git a/docs/models/components/postv1postmortemsreportsreportidreasons.md b/docs/models/components/postv1postmortemsreportsreportidreasons.md deleted file mode 100644 index 6b768df5..00000000 --- a/docs/models/components/postv1postmortemsreportsreportidreasons.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1PostMortemsReportsReportIdReasons - -Add a new contributing factor to an incident - -## Example Usage - -```typescript -import { PostV1PostMortemsReportsReportIdReasons } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1PostMortemsReportsReportIdReasons = { - summary: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `summary` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1priorities.md b/docs/models/components/postv1priorities.md deleted file mode 100644 index 6a1a2507..00000000 --- a/docs/models/components/postv1priorities.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1Priorities - -Create a new priority - -## Example Usage - -```typescript -import { PostV1Priorities } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Priorities = { - slug: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `slug` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `default` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1runbooks.md b/docs/models/components/postv1runbooks.md deleted file mode 100644 index b0a5e939..00000000 --- a/docs/models/components/postv1runbooks.md +++ /dev/null @@ -1,28 +0,0 @@ -# PostV1Runbooks - -Create a new runbook for use with incidents. - -## Example Usage - -```typescript -import { PostV1Runbooks } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Runbooks = { - name: "", - type: "incident_role", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `type` | [components.PostV1RunbooksType](../../models/components/postv1runbookstype.md) | :heavy_check_mark: | Deprecated, but still required. Please just use 'incident' | -| `summary` | *string* | :heavy_minus_sign: | Deprecated. Use description | -| `description` | *string* | :heavy_minus_sign: | A longer description about the Runbook. Supports markdown format | -| `autoAttachToRestrictedIncidents` | *boolean* | :heavy_minus_sign: | Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. | -| `tutorial` | *boolean* | :heavy_minus_sign: | Whether or not this runbook is a tutorial runbook | -| `owner` | [components.PostV1RunbooksOwner](../../models/components/postv1runbooksowner.md) | :heavy_minus_sign: | An object representing a Team that owns the runbook | -| `attachmentRule` | [components.AttachmentRule](../../models/components/attachmentrule.md) | :heavy_minus_sign: | N/A | -| `steps` | [components.Steps](../../models/components/steps.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1runbooksexecutions.md b/docs/models/components/postv1runbooksexecutions.md deleted file mode 100644 index 2572b2cf..00000000 --- a/docs/models/components/postv1runbooksexecutions.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1RunbooksExecutions - -Attaches a runbook to an incident and executes it - -## Example Usage - -```typescript -import { PostV1RunbooksExecutions } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1RunbooksExecutions = { - executeFor: "", - runbookId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `executeFor` | *string* | :heavy_check_mark: | The incident to attach the runbook to. Format must be: `incident/${incidentId}` | -| `runbookId` | *string* | :heavy_check_mark: | ID of runbook to attach | \ No newline at end of file diff --git a/docs/models/components/postv1runbooksowner.md b/docs/models/components/postv1runbooksowner.md deleted file mode 100644 index aca5ae32..00000000 --- a/docs/models/components/postv1runbooksowner.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1RunbooksOwner - -An object representing a Team that owns the runbook - -## Example Usage - -```typescript -import { PostV1RunbooksOwner } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1RunbooksOwner = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1runbookstype.md b/docs/models/components/postv1runbookstype.md deleted file mode 100644 index f87f8d58..00000000 --- a/docs/models/components/postv1runbookstype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1RunbooksType - -Deprecated, but still required. Please just use 'incident' - -## Example Usage - -```typescript -import { PostV1RunbooksType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1RunbooksType = "general"; -``` - -## Values - -```typescript -"incident" | "general" | "infrastructure" | "incident_role" -``` \ No newline at end of file diff --git a/docs/models/components/postv1savedsearchesresourcetype.md b/docs/models/components/postv1savedsearchesresourcetype.md deleted file mode 100644 index d16e9547..00000000 --- a/docs/models/components/postv1savedsearchesresourcetype.md +++ /dev/null @@ -1,24 +0,0 @@ -# PostV1SavedSearchesResourceType - -Create a new saved search for a particular resource type - -## Example Usage - -```typescript -import { PostV1SavedSearchesResourceType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SavedSearchesResourceType = { - name: "", - filterValues: { - "key": "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `isPrivate` | *boolean* | :heavy_minus_sign: | N/A | -| `filterValues` | Record | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1scheduledmaintenances.md b/docs/models/components/postv1scheduledmaintenances.md deleted file mode 100644 index 6cfa1029..00000000 --- a/docs/models/components/postv1scheduledmaintenances.md +++ /dev/null @@ -1,28 +0,0 @@ -# PostV1ScheduledMaintenances - -Create a new scheduled maintenance event - -## Example Usage - -```typescript -import { PostV1ScheduledMaintenances } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ScheduledMaintenances = { - name: "", - startsAt: new Date("2023-05-11T03:00:50.109Z"), - endsAt: new Date("2023-12-15T12:13:46.383Z"), -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | ISO8601 timestamp for the start time of the scheduled maintenance | -| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | ISO8601 timestamp for the end time of the scheduled maintenance | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | A json object of label keys and values | -| `statusPages` | [components.PostV1ScheduledMaintenancesStatusPages](../../models/components/postv1scheduledmaintenancesstatuspages.md)[] | :heavy_minus_sign: | An array of status pages to display this maintenance on | -| `impacts` | [components.PostV1ScheduledMaintenancesImpacts](../../models/components/postv1scheduledmaintenancesimpacts.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/postv1scheduledmaintenancesimpacts.md b/docs/models/components/postv1scheduledmaintenancesimpacts.md deleted file mode 100644 index 8a2faad4..00000000 --- a/docs/models/components/postv1scheduledmaintenancesimpacts.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1ScheduledMaintenancesImpacts - -## Example Usage - -```typescript -import { PostV1ScheduledMaintenancesImpacts } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ScheduledMaintenancesImpacts = { - type: "", - id: "", - conditionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `type` | *string* | :heavy_check_mark: | The type of impact | -| `id` | *string* | :heavy_check_mark: | The id of impact | -| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/postv1scheduledmaintenancesstatuspages.md b/docs/models/components/postv1scheduledmaintenancesstatuspages.md deleted file mode 100644 index 83e460e5..00000000 --- a/docs/models/components/postv1scheduledmaintenancesstatuspages.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostV1ScheduledMaintenancesStatusPages - -## Example Usage - -```typescript -import { PostV1ScheduledMaintenancesStatusPages } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ScheduledMaintenancesStatusPages = { - connectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `integrationSlug` | *string* | :heavy_minus_sign: | The slug identifying the type of status page | -| `connectionId` | *string* | :heavy_check_mark: | The UUID of the status page to display this maintenance on | \ No newline at end of file diff --git a/docs/models/components/postv1scimv2groups.md b/docs/models/components/postv1scimv2groups.md deleted file mode 100644 index b881e178..00000000 --- a/docs/models/components/postv1scimv2groups.md +++ /dev/null @@ -1,25 +0,0 @@ -# PostV1ScimV2Groups - -SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. - -## Example Usage - -```typescript -import { PostV1ScimV2Groups } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ScimV2Groups = { - displayName: "Mariano_Rice", - members: [ - { - value: "", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `displayName` | *string* | :heavy_check_mark: | The name of the team being created | -| `members` | [components.Members](../../models/components/members.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1scimv2users.md b/docs/models/components/postv1scimv2users.md deleted file mode 100644 index 690b81c2..00000000 --- a/docs/models/components/postv1scimv2users.md +++ /dev/null @@ -1,33 +0,0 @@ -# PostV1ScimV2Users - -SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. - -## Example Usage - -```typescript -import { PostV1ScimV2Users } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ScimV2Users = { - userName: "Maximo.Schulist", - name: { - familyName: "", - givenName: "", - }, - emails: [ - { - value: "", - primary: false, - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -| `userName` | *string* | :heavy_check_mark: | A service provider's unique identifier for the user | -| `name` | [components.Name](../../models/components/name.md) | :heavy_check_mark: | The components of the user's name | -| `emails` | [components.Emails](../../models/components/emails.md)[] | :heavy_check_mark: | Email addresses for the User | -| `roles` | *string*[] | :heavy_minus_sign: | Roles for the User. Options are owner, member or collaborator | -| `password` | *string* | :heavy_minus_sign: | This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password | \ No newline at end of file diff --git a/docs/models/components/postv1servicedependencies.md b/docs/models/components/postv1servicedependencies.md deleted file mode 100644 index a455bda8..00000000 --- a/docs/models/components/postv1servicedependencies.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1ServiceDependencies - -Creates a service dependency relationship between two services - -## Example Usage - -```typescript -import { PostV1ServiceDependencies } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ServiceDependencies = { - serviceId: "", - connectedServiceId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `serviceId` | *string* | :heavy_check_mark: | N/A | -| `connectedServiceId` | *string* | :heavy_check_mark: | N/A | -| `notes` | *string* | :heavy_minus_sign: | A note to describe the service dependency relationship | \ No newline at end of file diff --git a/docs/models/components/postv1services.md b/docs/models/components/postv1services.md deleted file mode 100644 index ccd8a73b..00000000 --- a/docs/models/components/postv1services.md +++ /dev/null @@ -1,29 +0,0 @@ -# PostV1Services - -Creates a service for the organization, you may also create or attach functionalities to the service on create. - -## Example Usage - -```typescript -import { PostV1Services } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Services = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | -| `serviceTier` | [components.ServiceTier](../../models/components/servicetier.md) | :heavy_minus_sign: | Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. | -| `functionalities` | [components.Functionalities](../../models/components/functionalities.md)[] | :heavy_minus_sign: | An array of functionalities | -| `links` | [components.PostV1ServicesLinks](../../models/components/postv1serviceslinks.md)[] | :heavy_minus_sign: | An array of links to associate with this service | -| `owner` | [components.PostV1ServicesOwner](../../models/components/postv1servicesowner.md) | :heavy_minus_sign: | An object representing a Team that owns the service | -| `teams` | [components.PostV1ServicesTeams](../../models/components/postv1servicesteams.md)[] | :heavy_minus_sign: | An array of teams to attach to this service. | -| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | -| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | -| `externalResources` | [components.PostV1ServicesExternalResources](../../models/components/postv1servicesexternalresources.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | \ No newline at end of file diff --git a/docs/models/components/postv1servicesexternalresources.md b/docs/models/components/postv1servicesexternalresources.md deleted file mode 100644 index af9258bb..00000000 --- a/docs/models/components/postv1servicesexternalresources.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostV1ServicesExternalResources - -## Example Usage - -```typescript -import { PostV1ServicesExternalResources } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ServicesExternalResources = { - remoteId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `remoteId` | *string* | :heavy_check_mark: | N/A | -| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. | \ No newline at end of file diff --git a/docs/models/components/postv1serviceslinks.md b/docs/models/components/postv1serviceslinks.md deleted file mode 100644 index 9a60b41b..00000000 --- a/docs/models/components/postv1serviceslinks.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostV1ServicesLinks - -## Example Usage - -```typescript -import { PostV1ServicesLinks } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ServicesLinks = { - name: "", - hrefUrl: "https://productive-charm.org/", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | -| `hrefUrl` | *string* | :heavy_check_mark: | URL | -| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | \ No newline at end of file diff --git a/docs/models/components/postv1servicesowner.md b/docs/models/components/postv1servicesowner.md deleted file mode 100644 index 08b4a46a..00000000 --- a/docs/models/components/postv1servicesowner.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1ServicesOwner - -An object representing a Team that owns the service - -## Example Usage - -```typescript -import { PostV1ServicesOwner } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ServicesOwner = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1servicesserviceidchecklistresponsechecklistid.md b/docs/models/components/postv1servicesserviceidchecklistresponsechecklistid.md deleted file mode 100644 index c2cb86aa..00000000 --- a/docs/models/components/postv1servicesserviceidchecklistresponsechecklistid.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1ServicesServiceIdChecklistResponseChecklistId - -Creates a response for a checklist item - -## Example Usage - -```typescript -import { PostV1ServicesServiceIdChecklistResponseChecklistId } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ServicesServiceIdChecklistResponseChecklistId = { - checkId: "", - status: false, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `checkId` | *string* | :heavy_check_mark: | N/A | -| `status` | *boolean* | :heavy_check_mark: | Status of the check. 'true' if it's complete, 'false' if incomplete, or blank if not yet interacted with | \ No newline at end of file diff --git a/docs/models/components/postv1servicesservicelinks.md b/docs/models/components/postv1servicesservicelinks.md deleted file mode 100644 index b3f1e095..00000000 --- a/docs/models/components/postv1servicesservicelinks.md +++ /dev/null @@ -1,23 +0,0 @@ -# PostV1ServicesServiceLinks - -Creates a service with the appropriate integration for each external service ID passed - -## Example Usage - -```typescript -import { PostV1ServicesServiceLinks } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ServicesServiceLinks = { - externalServiceIds: "", - connectionId: "", - integration: "opsgenie", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| `externalServiceIds` | *string* | :heavy_check_mark: | ID of the service | -| `connectionId` | *string* | :heavy_check_mark: | ID for the integration. This can be found by going to the edit page for the integration | -| `integration` | [components.Integration](../../models/components/integration.md) | :heavy_check_mark: | The name of the service | \ No newline at end of file diff --git a/docs/models/components/postv1servicesteams.md b/docs/models/components/postv1servicesteams.md deleted file mode 100644 index 8aa7dab3..00000000 --- a/docs/models/components/postv1servicesteams.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1ServicesTeams - -## Example Usage - -```typescript -import { PostV1ServicesTeams } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1ServicesTeams = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1severities.md b/docs/models/components/postv1severities.md deleted file mode 100644 index 4142bb94..00000000 --- a/docs/models/components/postv1severities.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1Severities - -Create a new severity - -## Example Usage - -```typescript -import { PostV1Severities } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Severities = { - slug: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `slug` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | -| `color` | [components.Color](../../models/components/color.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1severitymatrixconditions.md b/docs/models/components/postv1severitymatrixconditions.md deleted file mode 100644 index d445538f..00000000 --- a/docs/models/components/postv1severitymatrixconditions.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostV1SeverityMatrixConditions - -Create a new condition - -## Example Usage - -```typescript -import { PostV1SeverityMatrixConditions } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SeverityMatrixConditions = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `position` | *number* | :heavy_minus_sign: | Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition | \ No newline at end of file diff --git a/docs/models/components/postv1severitymatriximpacts.md b/docs/models/components/postv1severitymatriximpacts.md deleted file mode 100644 index 73365517..00000000 --- a/docs/models/components/postv1severitymatriximpacts.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1SeverityMatrixImpacts - -Create a new impact - -## Example Usage - -```typescript -import { PostV1SeverityMatrixImpacts } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SeverityMatrixImpacts = { - affectsType: "", - affectsId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `affectsType` | *string* | :heavy_check_mark: | N/A | -| `affectsId` | *string* | :heavy_check_mark: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1signalsdebugger.md b/docs/models/components/postv1signalsdebugger.md deleted file mode 100644 index 3ecb4ec0..00000000 --- a/docs/models/components/postv1signalsdebugger.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1SignalsDebugger - -## Example Usage - -```typescript -import { PostV1SignalsDebugger } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SignalsDebugger = { - expression: "", - signals: [ - {}, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `expression` | *string* | :heavy_check_mark: | CEL expression | -| `signals` | [components.Signals](../../models/components/signals.md)[] | :heavy_check_mark: | List of signals to evaluate rule expression against | \ No newline at end of file diff --git a/docs/models/components/postv1signalsdebuggerlinks.md b/docs/models/components/postv1signalsdebuggerlinks.md deleted file mode 100644 index c1c33e9e..00000000 --- a/docs/models/components/postv1signalsdebuggerlinks.md +++ /dev/null @@ -1,16 +0,0 @@ -# PostV1SignalsDebuggerLinks - -## Example Usage - -```typescript -import { PostV1SignalsDebuggerLinks } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SignalsDebuggerLinks = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `href` | *string* | :heavy_minus_sign: | N/A | -| `text` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1signalsemailtargets.md b/docs/models/components/postv1signalsemailtargets.md deleted file mode 100644 index 1b0226f9..00000000 --- a/docs/models/components/postv1signalsemailtargets.md +++ /dev/null @@ -1,27 +0,0 @@ -# PostV1SignalsEmailTargets - -Create a Signals email target for a team. - -## Example Usage - -```typescript -import { PostV1SignalsEmailTargets } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SignalsEmailTargets = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The email target's name. | -| `slug` | *string* | :heavy_minus_sign: | The email address that will be listening to events. | -| `description` | *string* | :heavy_minus_sign: | A detailed description of the email target. | -| `target` | [components.Target](../../models/components/target.md) | :heavy_minus_sign: | The target that the email target will notify. This object must contain a `type`
field that specifies the type of target and an `id` field that specifies the ID of
the target. The `type` field must be one of "escalation_policy", "on_call_schedule",
"team", "user", or "slack_channel".
| -| `allowedSenders` | *string*[] | :heavy_minus_sign: | A list of email addresses that are allowed to send events to the target. Must be exact match. | -| `rules` | *string*[] | :heavy_minus_sign: | A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. | -| `ruleMatchingStrategy` | [components.RuleMatchingStrategy](../../models/components/rulematchingstrategy.md) | :heavy_minus_sign: | Whether or not all rules must match, or if only one rule must match. | -| `statusCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the status of an incoming email that is sent to the target. | -| `levelCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the level of an incoming email that is sent to the target. | \ No newline at end of file diff --git a/docs/models/components/postv1signalsemailtargetstype.md b/docs/models/components/postv1signalsemailtargetstype.md deleted file mode 100644 index 08ddf944..00000000 --- a/docs/models/components/postv1signalsemailtargetstype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1SignalsEmailTargetsType - -The type of target that the inbound email will notify when matched. - -## Example Usage - -```typescript -import { PostV1SignalsEmailTargetsType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SignalsEmailTargetsType = "SlackChannel"; -``` - -## Values - -```typescript -"Team" | "EntireTeam" | "EscalationPolicy" | "OnCallSchedule" | "User" | "SlackChannel" | "Webhook" -``` \ No newline at end of file diff --git a/docs/models/components/postv1signalswebhooktargets.md b/docs/models/components/postv1signalswebhooktargets.md deleted file mode 100644 index 57bc3895..00000000 --- a/docs/models/components/postv1signalswebhooktargets.md +++ /dev/null @@ -1,23 +0,0 @@ -# PostV1SignalsWebhookTargets - -Create a Signals webhook target. - -## Example Usage - -```typescript -import { PostV1SignalsWebhookTargets } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1SignalsWebhookTargets = { - name: "", - url: "https://frizzy-perp.biz/", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The webhook target's name. | -| `description` | *string* | :heavy_minus_sign: | An optional detailed description of the webhook target. | -| `url` | *string* | :heavy_check_mark: | The URL that the webhook target will notify. | -| `signingKey` | *string* | :heavy_minus_sign: | An optional secret we will provide in the `FH-Signature` header
when sending a payload to the webhook target. This key will not be
shown in any response once configured.
| \ No newline at end of file diff --git a/docs/models/components/postv1statusupdatetemplates.md b/docs/models/components/postv1statusupdatetemplates.md deleted file mode 100644 index da99d7b4..00000000 --- a/docs/models/components/postv1statusupdatetemplates.md +++ /dev/null @@ -1,21 +0,0 @@ -# PostV1StatusUpdateTemplates - -Create a status update template for your organization - -## Example Usage - -```typescript -import { PostV1StatusUpdateTemplates } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1StatusUpdateTemplates = { - name: "", - body: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `body` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1tasklists.md b/docs/models/components/postv1tasklists.md deleted file mode 100644 index 5bce87a7..00000000 --- a/docs/models/components/postv1tasklists.md +++ /dev/null @@ -1,26 +0,0 @@ -# PostV1TaskLists - -Creates a new task list - -## Example Usage - -```typescript -import { PostV1TaskLists } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TaskLists = { - name: "", - taskListItems: [ - { - summary: "", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `taskListItems` | [components.TaskListItems](../../models/components/tasklistitems.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1teams.md b/docs/models/components/postv1teams.md deleted file mode 100644 index 200a03f8..00000000 --- a/docs/models/components/postv1teams.md +++ /dev/null @@ -1,24 +0,0 @@ -# PostV1Teams - -Create a new team - -## Example Usage - -```typescript -import { PostV1Teams } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Teams = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `slackChannelId` | *string* | :heavy_minus_sign: | The Slack channel ID that this team is associated with | -| `msTeamsChannel` | [components.MsTeamsChannel](../../models/components/msteamschannel.md) | :heavy_minus_sign: | MS Teams channel identity for channel associated with this team | -| `memberships` | [components.Memberships](../../models/components/memberships.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidescalationpolicies.md b/docs/models/components/postv1teamsteamidescalationpolicies.md deleted file mode 100644 index c7f501e5..00000000 --- a/docs/models/components/postv1teamsteamidescalationpolicies.md +++ /dev/null @@ -1,35 +0,0 @@ -# PostV1TeamsTeamIdEscalationPolicies - -Create a Signals escalation policy for a team. - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdEscalationPolicies } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdEscalationPolicies = { - name: "", - steps: [ - { - targets: [ - { - type: "OnCallSchedule", - id: "", - }, - ], - timeout: "", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The escalation policy's name. | -| `description` | *string* | :heavy_minus_sign: | A detailed description of the escalation policy. | -| `repetitions` | *number* | :heavy_minus_sign: | The number of times that the escalation policy should repeat before an alert is dropped. | -| `default` | *boolean* | :heavy_minus_sign: | Whether this escalation policy should be the default for the team. | -| `steps` | [components.PostV1TeamsTeamIdEscalationPoliciesSteps](../../models/components/postv1teamsteamidescalationpoliciessteps.md)[] | :heavy_check_mark: | A list of steps that define how an alert should escalate through the policy. | -| `handoffStep` | [components.HandoffStep](../../models/components/handoffstep.md) | :heavy_minus_sign: | A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. | \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidescalationpoliciessteps.md b/docs/models/components/postv1teamsteamidescalationpoliciessteps.md deleted file mode 100644 index b145583b..00000000 --- a/docs/models/components/postv1teamsteamidescalationpoliciessteps.md +++ /dev/null @@ -1,24 +0,0 @@ -# PostV1TeamsTeamIdEscalationPoliciesSteps - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdEscalationPoliciesSteps } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdEscalationPoliciesSteps = { - targets: [ - { - type: "OnCallSchedule", - id: "", - }, - ], - timeout: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `targets` | [components.Targets](../../models/components/targets.md)[] | :heavy_check_mark: | A list of targets that the step will notify. You can specify up to 15 targets per step. | -| `timeout` | *string* | :heavy_check_mark: | An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. | \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidescalationpoliciestargettype.md b/docs/models/components/postv1teamsteamidescalationpoliciestargettype.md deleted file mode 100644 index ed60092a..00000000 --- a/docs/models/components/postv1teamsteamidescalationpoliciestargettype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1TeamsTeamIdEscalationPoliciesTargetType - -The type of target to which the policy will hand off. - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdEscalationPoliciesTargetType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdEscalationPoliciesTargetType = "Team"; -``` - -## Values - -```typescript -"EscalationPolicy" | "Team" -``` \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidescalationpoliciestype.md b/docs/models/components/postv1teamsteamidescalationpoliciestype.md deleted file mode 100644 index f0cd8fc8..00000000 --- a/docs/models/components/postv1teamsteamidescalationpoliciestype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1TeamsTeamIdEscalationPoliciesType - -The type of target that the step will notify. - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdEscalationPoliciesType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdEscalationPoliciesType = "User"; -``` - -## Values - -```typescript -"OnCallSchedule" | "User" | "SlackChannel" | "EntireTeam" | "Webhook" -``` \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidoncallschedules.md b/docs/models/components/postv1teamsteamidoncallschedules.md deleted file mode 100644 index 1e561ab6..00000000 --- a/docs/models/components/postv1teamsteamidoncallschedules.md +++ /dev/null @@ -1,32 +0,0 @@ -# PostV1TeamsTeamIdOnCallSchedules - -Create a Signals on-call schedule for a team. - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdOnCallSchedules } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdOnCallSchedules = { - name: "", - timeZone: "Asia/Jerusalem", - strategy: { - type: "custom", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The on-call schedule's name. | -| `description` | *string* | :heavy_minus_sign: | A detailed description of the on-call schedule. | -| `timeZone` | *string* | :heavy_check_mark: | The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. | -| `slackUserGroupId` | *string* | :heavy_minus_sign: | The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. | -| `members` | [components.PostV1TeamsTeamIdOnCallSchedulesMembers](../../models/components/postv1teamsteamidoncallschedulesmembers.md)[] | :heavy_minus_sign: | An ordered list of objects that specify members of the on-call schedule's rotation. | -| `strategy` | [components.Strategy](../../models/components/strategy.md) | :heavy_check_mark: | An object that specifies how the schedule's on-call shifts should be generated. | -| `restrictions` | [components.Restrictions](../../models/components/restrictions.md)[] | :heavy_minus_sign: | A list of objects that restrict the schedule to speccific on-call periods. | -| `startTime` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when the schedule's first shift should start. This value is only used if the schedule's strategy is "custom". | -| `color` | *string* | :heavy_minus_sign: | A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. | -| `memberIds` | *string*[] | :heavy_minus_sign: | This parameter is deprecated; use `members` instead. | \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidoncallschedulesmembers.md b/docs/models/components/postv1teamsteamidoncallschedulesmembers.md deleted file mode 100644 index fbd3d1be..00000000 --- a/docs/models/components/postv1teamsteamidoncallschedulesmembers.md +++ /dev/null @@ -1,15 +0,0 @@ -# PostV1TeamsTeamIdOnCallSchedulesMembers - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdOnCallSchedulesMembers } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdOnCallSchedulesMembers = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `userId` | *string* | :heavy_minus_sign: | The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule
multiple times to construct more complex rotations, and you can specify a `null` user ID to create
unassigned slots in the rotation.
| \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidoncallschedulesscheduleidshifts.md b/docs/models/components/postv1teamsteamidoncallschedulesscheduleidshifts.md deleted file mode 100644 index ebc53dad..00000000 --- a/docs/models/components/postv1teamsteamidoncallschedulesscheduleidshifts.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts - -Create a Signals on-call shift in a schedule. - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts = { - startTime: "", - endTime: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `startTime` | *string* | :heavy_check_mark: | The start time of the shift in ISO8601 format. | -| `endTime` | *string* | :heavy_check_mark: | The end time of the shift in ISO8601 format. | -| `userId` | *string* | :heavy_minus_sign: | The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. | \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidoncallschedulestype.md b/docs/models/components/postv1teamsteamidoncallschedulestype.md deleted file mode 100644 index da0b8a10..00000000 --- a/docs/models/components/postv1teamsteamidoncallschedulestype.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1TeamsTeamIdOnCallSchedulesType - -The type of strategy. Must be one of "daily", "weekly", or "custom". - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdOnCallSchedulesType } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdOnCallSchedulesType = "weekly"; -``` - -## Values - -```typescript -"daily" | "weekly" | "custom" -``` \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidsignalrules.md b/docs/models/components/postv1teamsteamidsignalrules.md deleted file mode 100644 index a45c42ee..00000000 --- a/docs/models/components/postv1teamsteamidsignalrules.md +++ /dev/null @@ -1,27 +0,0 @@ -# PostV1TeamsTeamIdSignalRules - -Create a Signals rule for a team. - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdSignalRules } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdSignalRules = { - name: "", - expression: "", - targetType: "OnCallSchedule", - targetId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The rule's name. | -| `expression` | *string* | :heavy_check_mark: | The CEL expression that defines the rule. | -| `targetType` | [components.TargetType](../../models/components/targettype.md) | :heavy_check_mark: | The type of target that the rule will notify when matched. | -| `targetId` | *string* | :heavy_check_mark: | The ID of the target that the rule will notify when matched. | -| `incidentTypeId` | *string* | :heavy_minus_sign: | The ID of an incident type that should be used when an alert is promoted to an incident | -| `notificationPriorityOverride` | [components.PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride](../../models/components/postv1teamsteamidsignalrulesnotificationpriorityoverride.md) | :heavy_minus_sign: | A notification priority that will be set on the resulting alert (default: HIGH) | \ No newline at end of file diff --git a/docs/models/components/postv1teamsteamidsignalrulesnotificationpriorityoverride.md b/docs/models/components/postv1teamsteamidsignalrulesnotificationpriorityoverride.md deleted file mode 100644 index 90f26274..00000000 --- a/docs/models/components/postv1teamsteamidsignalrulesnotificationpriorityoverride.md +++ /dev/null @@ -1,17 +0,0 @@ -# PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride - -A notification priority that will be set on the resulting alert (default: HIGH) - -## Example Usage - -```typescript -import { PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride = "LOW"; -``` - -## Values - -```typescript -"HIGH" | "MEDIUM" | "LOW" | "" -``` \ No newline at end of file diff --git a/docs/models/components/postv1ticketingpriorities.md b/docs/models/components/postv1ticketingpriorities.md deleted file mode 100644 index f0e7b89e..00000000 --- a/docs/models/components/postv1ticketingpriorities.md +++ /dev/null @@ -1,20 +0,0 @@ -# PostV1TicketingPriorities - -Create a single ticketing priority - -## Example Usage - -```typescript -import { PostV1TicketingPriorities } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TicketingPriorities = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `position` | *number* | :heavy_minus_sign: | The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, that priority and all priorities following it will automatically be moved down the list to make room for the new priority. | \ No newline at end of file diff --git a/docs/models/components/postv1ticketingtickets.md b/docs/models/components/postv1ticketingtickets.md deleted file mode 100644 index 0d1e27ce..00000000 --- a/docs/models/components/postv1ticketingtickets.md +++ /dev/null @@ -1,27 +0,0 @@ -# PostV1TicketingTickets - -Creates a ticket for a project - -## Example Usage - -```typescript -import { PostV1TicketingTickets } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1TicketingTickets = { - summary: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `summary` | *string* | :heavy_check_mark: | N/A | -| `relatedTo` | *string* | :heavy_minus_sign: | Which incident this ticket is related to, in the format of 'incident/UUID' | -| `projectId` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `state` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `priorityId` | *string* | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the ticket | -| `remoteUrl` | *string* | :heavy_minus_sign: | The remote URL for an existing ticket in a supported and configured ticketing integration | \ No newline at end of file diff --git a/docs/models/components/postv1webhooks.md b/docs/models/components/postv1webhooks.md deleted file mode 100644 index 0d017edf..00000000 --- a/docs/models/components/postv1webhooks.md +++ /dev/null @@ -1,19 +0,0 @@ -# PostV1Webhooks - -Create a new webhook - -## Example Usage - -```typescript -import { PostV1Webhooks } from "firehydrant-typescript-sdk/models/components"; - -let value: PostV1Webhooks = { - url: "https://unique-shipper.net/", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/prerequisites.md b/docs/models/components/prerequisites.md deleted file mode 100644 index 78b2d921..00000000 --- a/docs/models/components/prerequisites.md +++ /dev/null @@ -1,14 +0,0 @@ -# Prerequisites - -## Example Usage - -```typescript -import { Prerequisites } from "firehydrant-typescript-sdk/models/components"; - -let value: Prerequisites = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/priorityentity.md b/docs/models/components/priorityentity.md index dcbf0fdc..567c71fd 100644 --- a/docs/models/components/priorityentity.md +++ b/docs/models/components/priorityentity.md @@ -5,7 +5,7 @@ PriorityEntity model ## Example Usage ```typescript -import { PriorityEntity } from "firehydrant-typescript-sdk/models/components"; +import { PriorityEntity } from "firehydrant/models/components"; let value: PriorityEntity = {}; ``` diff --git a/docs/models/components/publicapiv1bootstrapentity.md b/docs/models/components/publicapiv1bootstrapentity.md new file mode 100644 index 00000000..459f3bfe --- /dev/null +++ b/docs/models/components/publicapiv1bootstrapentity.md @@ -0,0 +1,17 @@ +# PublicApiv1BootstrapEntity + +PublicAPI_V1_BootstrapEntity model + +## Example Usage + +```typescript +import { PublicApiv1BootstrapEntity } from "firehydrant/models/components"; + +let value: PublicApiv1BootstrapEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `posthogWriteKey` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/publicapiv1incidentssuccinctentity.md b/docs/models/components/publicapiv1incidentssuccinctentity.md index 1399b8f9..480f84de 100644 --- a/docs/models/components/publicapiv1incidentssuccinctentity.md +++ b/docs/models/components/publicapiv1incidentssuccinctentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { PublicApiv1IncidentsSuccinctEntity } from "firehydrant-typescript-sdk/models/components"; +import { PublicApiv1IncidentsSuccinctEntity } from "firehydrant/models/components"; let value: PublicApiv1IncidentsSuccinctEntity = {}; ``` @@ -14,4 +14,4 @@ let value: PublicApiv1IncidentsSuccinctEntity = {}; | ------------------ | ------------------ | ------------------ | ------------------ | | `id` | *string* | :heavy_minus_sign: | N/A | | `name` | *string* | :heavy_minus_sign: | N/A | -| `number` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `number` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/publicapiv1incidentstranscriptentity.md b/docs/models/components/publicapiv1incidentstranscriptentity.md index b10a4a1b..3e35b853 100644 --- a/docs/models/components/publicapiv1incidentstranscriptentity.md +++ b/docs/models/components/publicapiv1incidentstranscriptentity.md @@ -5,7 +5,7 @@ PublicAPI_V1_Incidents_TranscriptEntity model ## Example Usage ```typescript -import { PublicApiv1IncidentsTranscriptEntity } from "firehydrant-typescript-sdk/models/components"; +import { PublicApiv1IncidentsTranscriptEntity } from "firehydrant/models/components"; let value: PublicApiv1IncidentsTranscriptEntity = {}; ``` @@ -20,4 +20,5 @@ let value: PublicApiv1IncidentsTranscriptEntity = {}; | `until` | *number* | :heavy_minus_sign: | The end time for the transcript entry | | `words` | *string* | :heavy_minus_sign: | The words spoken for the transcript entry | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the transcript entry was created | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the transcript entry was last updated | \ No newline at end of file +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The time the transcript entry was last updated | +| `author` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/publicapiv1integrationsauthedproviderentity.md b/docs/models/components/publicapiv1integrationsauthedproviderentity.md new file mode 100644 index 00000000..6802ee10 --- /dev/null +++ b/docs/models/components/publicapiv1integrationsauthedproviderentity.md @@ -0,0 +1,23 @@ +# PublicApiv1IntegrationsAuthedProviderEntity + +PublicAPI_V1_Integrations_AuthedProviderEntity model + +## Example Usage + +```typescript +import { PublicApiv1IntegrationsAuthedProviderEntity } from "firehydrant/models/components"; + +let value: PublicApiv1IntegrationsAuthedProviderEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `user` | [components.NullableSuccinctEntity](../../models/components/nullablesuccinctentity.md) | :heavy_minus_sign: | N/A | +| `integrationDefault` | *boolean* | :heavy_minus_sign: | N/A | +| `authorizedEmail` | *string* | :heavy_minus_sign: | The email of the user who authorized the integration | +| `isExpired` | *boolean* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/publicapiv1similarincidententity.md b/docs/models/components/publicapiv1similarincidententity.md new file mode 100644 index 00000000..89d84ee0 --- /dev/null +++ b/docs/models/components/publicapiv1similarincidententity.md @@ -0,0 +1,17 @@ +# PublicApiv1SimilarIncidentEntity + +## Example Usage + +```typescript +import { PublicApiv1SimilarIncidentEntity } from "firehydrant/models/components"; + +let value: PublicApiv1SimilarIncidentEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `distance` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/publish.md b/docs/models/components/publish.md new file mode 100644 index 00000000..1afd39d0 --- /dev/null +++ b/docs/models/components/publish.md @@ -0,0 +1,15 @@ +# Publish + +## Example Usage + +```typescript +import { Publish } from "firehydrant/models/components"; + +let value: Publish = "true"; +``` + +## Values + +```typescript +"true" +``` \ No newline at end of file diff --git a/docs/models/components/publishpostmortemreport.md b/docs/models/components/publishpostmortemreport.md new file mode 100644 index 00000000..06b42020 --- /dev/null +++ b/docs/models/components/publishpostmortemreport.md @@ -0,0 +1,19 @@ +# PublishPostMortemReport + +Marks an incident retrospective as published and emails all of the participants in the report the summary + +## Example Usage + +```typescript +import { PublishPostMortemReport } from "firehydrant/models/components"; + +let value: PublishPostMortemReport = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `publish` | [components.Publish](../../models/components/publish.md) | :heavy_minus_sign: | N/A | +| `userIds` | *string*[] | :heavy_minus_sign: | An array of user IDs with whom to share the report | +| `teamIds` | *string*[] | :heavy_minus_sign: | An array of team IDs with whom to share the report | \ No newline at end of file diff --git a/docs/models/components/putv1incidentsincidentidimpact.md b/docs/models/components/putv1incidentsincidentidimpact.md deleted file mode 100644 index 9a1a7e5b..00000000 --- a/docs/models/components/putv1incidentsincidentidimpact.md +++ /dev/null @@ -1,27 +0,0 @@ -# PutV1IncidentsIncidentIdImpact - -Allows updating an incident's impacted infrastructure, with the option to -move the incident into a different milestone and provide a note to update -the incident timeline and any attached status pages. If this method is -requested with the PUT verb, impacts will be completely replaced with the -information in the request body, even if not provided (effectively clearing -all impacts). If this method is requested with the PATCH verb, the provided -impacts will be added or updated, but no impacts will be removed. - - -## Example Usage - -```typescript -import { PutV1IncidentsIncidentIdImpact } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1IncidentsIncidentIdImpact = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `note` | *string* | :heavy_minus_sign: | N/A | -| `milestone` | *string* | :heavy_minus_sign: | N/A | -| `impact` | [components.Impact](../../models/components/impact.md)[] | :heavy_minus_sign: | N/A | -| `statusPages` | [components.StatusPages](../../models/components/statuspages.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1incidentsincidentidlinkslinkid.md b/docs/models/components/putv1incidentsincidentidlinkslinkid.md deleted file mode 100644 index ca6f0abe..00000000 --- a/docs/models/components/putv1incidentsincidentidlinkslinkid.md +++ /dev/null @@ -1,19 +0,0 @@ -# PutV1IncidentsIncidentIdLinksLinkId - -Updates the external incident link attributes - -## Example Usage - -```typescript -import { PutV1IncidentsIncidentIdLinksLinkId } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1IncidentsIncidentIdLinksLinkId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `displayText` | *string* | :heavy_minus_sign: | N/A | -| `iconUrl` | *string* | :heavy_minus_sign: | N/A | -| `hrefUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1incidentsincidentidmilestonesbulkupdate.md b/docs/models/components/putv1incidentsincidentidmilestonesbulkupdate.md deleted file mode 100644 index bb4312ef..00000000 --- a/docs/models/components/putv1incidentsincidentidmilestonesbulkupdate.md +++ /dev/null @@ -1,31 +0,0 @@ -# PutV1IncidentsIncidentIdMilestonesBulkUpdate - -Update milestone times in bulk for a given incident. All milestone -times for an incident must occur in chronological order -corresponding to the configured order of milestones. If the result -of this request would cause any milestone(s) to appear out of place, -a 422 response will instead be returned. This includes milestones -not explicitly submitted or updated in this request. - - -## Example Usage - -```typescript -import { PutV1IncidentsIncidentIdMilestonesBulkUpdate } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1IncidentsIncidentIdMilestonesBulkUpdate = { - milestones: [ - { - type: "", - occurredAt: new Date("2023-03-19T20:31:56.909Z"), - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `bulk` | [components.Bulk](../../models/components/bulk.md) | :heavy_minus_sign: | N/A | -| `milestones` | [components.PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones](../../models/components/putv1incidentsincidentidmilestonesbulkupdatemilestones.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1incidentsincidentidmilestonesbulkupdatemilestones.md b/docs/models/components/putv1incidentsincidentidmilestonesbulkupdatemilestones.md deleted file mode 100644 index 2eeebc83..00000000 --- a/docs/models/components/putv1incidentsincidentidmilestonesbulkupdatemilestones.md +++ /dev/null @@ -1,20 +0,0 @@ -# PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones - -## Example Usage - -```typescript -import { PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones = { - type: "", - occurredAt: new Date("2025-10-11T10:53:38.306Z"), -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | *string* | :heavy_check_mark: | The type/slug of the milestone. Must be one of the currently configured milestones for the given incident. | -| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value | -| `remove` | *boolean* | :heavy_minus_sign: | If set to true, the milestone will be removed from the incident | \ No newline at end of file diff --git a/docs/models/components/putv1postmortemsquestions.md b/docs/models/components/putv1postmortemsquestions.md deleted file mode 100644 index 84c12a10..00000000 --- a/docs/models/components/putv1postmortemsquestions.md +++ /dev/null @@ -1,18 +0,0 @@ -# PutV1PostMortemsQuestions - -Update the questions configured to be provided and filled out on future retrospective reports. - -## Example Usage - -```typescript -import { PutV1PostMortemsQuestions } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1PostMortemsQuestions = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `makeSwaggerWork` | *string* | :heavy_minus_sign: | N/A | -| `questions` | [components.Questions](../../models/components/questions.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1postmortemsreportsreportidreasonsorder.md b/docs/models/components/putv1postmortemsreportsreportidreasonsorder.md deleted file mode 100644 index cfb6c60a..00000000 --- a/docs/models/components/putv1postmortemsreportsreportidreasonsorder.md +++ /dev/null @@ -1,21 +0,0 @@ -# PutV1PostMortemsReportsReportIdReasonsOrder - -Reorder a contributing factor - -## Example Usage - -```typescript -import { PutV1PostMortemsReportsReportIdReasonsOrder } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1PostMortemsReportsReportIdReasonsOrder = { - oldPosition: 96098, - newPosition: 976460, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `oldPosition` | *number* | :heavy_check_mark: | N/A | -| `newPosition` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksexecutionsexecutionidstepsstepid.md b/docs/models/components/putv1runbooksexecutionsexecutionidstepsstepid.md deleted file mode 100644 index 7ff82535..00000000 --- a/docs/models/components/putv1runbooksexecutionsexecutionidstepsstepid.md +++ /dev/null @@ -1,22 +0,0 @@ -# PutV1RunbooksExecutionsExecutionIdStepsStepId - -Updates a runbook step execution, especially for changing the state of a step execution. - -## Example Usage - -```typescript -import { PutV1RunbooksExecutionsExecutionIdStepsStepId } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksExecutionsExecutionIdStepsStepId = { - state: "Oregon", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `state` | *string* | :heavy_check_mark: | N/A | -| `scheduleFor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `data` | Record | :heavy_minus_sign: | Data for execution of this step | -| `repeatsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksrunbookid.md b/docs/models/components/putv1runbooksrunbookid.md deleted file mode 100644 index 6666e0a7..00000000 --- a/docs/models/components/putv1runbooksrunbookid.md +++ /dev/null @@ -1,29 +0,0 @@ -# PutV1RunbooksRunbookId - -Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything -about a runbook, including but not limited to the steps, environments, attachment rules, and severities. - - -## Example Usage - -```typescript -import { PutV1RunbooksRunbookId } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksRunbookId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `tutorial` | *boolean* | :heavy_minus_sign: | Whether or not this runbook is a tutorial runbook | -| `owner` | [components.PutV1RunbooksRunbookIdOwner](../../models/components/putv1runbooksrunbookidowner.md) | :heavy_minus_sign: | An object representing a Team that owns the runbook | -| `severities` | [components.PutV1RunbooksRunbookIdSeverities](../../models/components/putv1runbooksrunbookidseverities.md)[] | :heavy_minus_sign: | N/A | -| `services` | [components.PutV1RunbooksRunbookIdServices](../../models/components/putv1runbooksrunbookidservices.md)[] | :heavy_minus_sign: | N/A | -| `environments` | [components.Environments](../../models/components/environments.md)[] | :heavy_minus_sign: | N/A | -| `attachmentRule` | [components.PutV1RunbooksRunbookIdAttachmentRule](../../models/components/putv1runbooksrunbookidattachmentrule.md) | :heavy_minus_sign: | N/A | -| `steps` | [components.PutV1RunbooksRunbookIdSteps](../../models/components/putv1runbooksrunbookidsteps.md)[] | :heavy_minus_sign: | N/A | -| `autoAttachToRestrictedIncidents` | *boolean* | :heavy_minus_sign: | Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksrunbookidattachmentrule.md b/docs/models/components/putv1runbooksrunbookidattachmentrule.md deleted file mode 100644 index 5da11b8d..00000000 --- a/docs/models/components/putv1runbooksrunbookidattachmentrule.md +++ /dev/null @@ -1,18 +0,0 @@ -# PutV1RunbooksRunbookIdAttachmentRule - -## Example Usage - -```typescript -import { PutV1RunbooksRunbookIdAttachmentRule } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksRunbookIdAttachmentRule = { - logic: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `logic` | *string* | :heavy_check_mark: | The JSON logic for the attaching the runbook | -| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksrunbookidowner.md b/docs/models/components/putv1runbooksrunbookidowner.md deleted file mode 100644 index 4439398e..00000000 --- a/docs/models/components/putv1runbooksrunbookidowner.md +++ /dev/null @@ -1,17 +0,0 @@ -# PutV1RunbooksRunbookIdOwner - -An object representing a Team that owns the runbook - -## Example Usage - -```typescript -import { PutV1RunbooksRunbookIdOwner } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksRunbookIdOwner = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksrunbookidrule.md b/docs/models/components/putv1runbooksrunbookidrule.md deleted file mode 100644 index a7b4bdb5..00000000 --- a/docs/models/components/putv1runbooksrunbookidrule.md +++ /dev/null @@ -1,18 +0,0 @@ -# PutV1RunbooksRunbookIdRule - -## Example Usage - -```typescript -import { PutV1RunbooksRunbookIdRule } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksRunbookIdRule = { - logic: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `logic` | *string* | :heavy_check_mark: | The JSON logic for the rule | -| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksrunbookidservices.md b/docs/models/components/putv1runbooksrunbookidservices.md deleted file mode 100644 index 0504271c..00000000 --- a/docs/models/components/putv1runbooksrunbookidservices.md +++ /dev/null @@ -1,15 +0,0 @@ -# PutV1RunbooksRunbookIdServices - -## Example Usage - -```typescript -import { PutV1RunbooksRunbookIdServices } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksRunbookIdServices = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksrunbookidseverities.md b/docs/models/components/putv1runbooksrunbookidseverities.md deleted file mode 100644 index df4383e8..00000000 --- a/docs/models/components/putv1runbooksrunbookidseverities.md +++ /dev/null @@ -1,15 +0,0 @@ -# PutV1RunbooksRunbookIdSeverities - -## Example Usage - -```typescript -import { PutV1RunbooksRunbookIdSeverities } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksRunbookIdSeverities = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1runbooksrunbookidsteps.md b/docs/models/components/putv1runbooksrunbookidsteps.md deleted file mode 100644 index d912de32..00000000 --- a/docs/models/components/putv1runbooksrunbookidsteps.md +++ /dev/null @@ -1,21 +0,0 @@ -# PutV1RunbooksRunbookIdSteps - -## Example Usage - -```typescript -import { PutV1RunbooksRunbookIdSteps } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1RunbooksRunbookIdSteps = { - name: "", - actionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `stepId` | *string* | :heavy_minus_sign: | ID of step to be updated | -| `name` | *string* | :heavy_check_mark: | Name for step | -| `actionId` | *string* | :heavy_check_mark: | ID of action to use for this step. | -| `rule` | [components.PutV1RunbooksRunbookIdRule](../../models/components/putv1runbooksrunbookidrule.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1scimv2groupsid.md b/docs/models/components/putv1scimv2groupsid.md deleted file mode 100644 index 67772d5b..00000000 --- a/docs/models/components/putv1scimv2groupsid.md +++ /dev/null @@ -1,25 +0,0 @@ -# PutV1ScimV2GroupsId - -SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. - -## Example Usage - -```typescript -import { PutV1ScimV2GroupsId } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1ScimV2GroupsId = { - displayName: "Laron44", - members: [ - { - value: "", - }, - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `displayName` | *string* | :heavy_check_mark: | The name of the team being updated | -| `members` | [components.PutV1ScimV2GroupsIdMembers](../../models/components/putv1scimv2groupsidmembers.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/putv1scimv2groupsidmembers.md b/docs/models/components/putv1scimv2groupsidmembers.md deleted file mode 100644 index 52b6d097..00000000 --- a/docs/models/components/putv1scimv2groupsidmembers.md +++ /dev/null @@ -1,17 +0,0 @@ -# PutV1ScimV2GroupsIdMembers - -## Example Usage - -```typescript -import { PutV1ScimV2GroupsIdMembers } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1ScimV2GroupsIdMembers = { - value: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `value` | *string* | :heavy_check_mark: | String that represents the user's UUID to assign to the team | \ No newline at end of file diff --git a/docs/models/components/putv1scimv2usersid.md b/docs/models/components/putv1scimv2usersid.md deleted file mode 100644 index 3a70ccca..00000000 --- a/docs/models/components/putv1scimv2usersid.md +++ /dev/null @@ -1,21 +0,0 @@ -# PutV1ScimV2UsersId - -PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. - -## Example Usage - -```typescript -import { PutV1ScimV2UsersId } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1ScimV2UsersId = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `userName` | *string* | :heavy_minus_sign: | A service provider's unique identifier for the user | -| `name` | [components.PutV1ScimV2UsersIdName](../../models/components/putv1scimv2usersidname.md) | :heavy_minus_sign: | The components of the user's name | -| `emails` | [components.PutV1ScimV2UsersIdEmails](../../models/components/putv1scimv2usersidemails.md)[] | :heavy_minus_sign: | Email addresses for the User | -| `roles` | *string*[] | :heavy_minus_sign: | Roles for the User | -| `active` | *boolean* | :heavy_minus_sign: | Boolean that represents whether user is active | \ No newline at end of file diff --git a/docs/models/components/putv1scimv2usersidemails.md b/docs/models/components/putv1scimv2usersidemails.md deleted file mode 100644 index a618096d..00000000 --- a/docs/models/components/putv1scimv2usersidemails.md +++ /dev/null @@ -1,18 +0,0 @@ -# PutV1ScimV2UsersIdEmails - -## Example Usage - -```typescript -import { PutV1ScimV2UsersIdEmails } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1ScimV2UsersIdEmails = { - value: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `value` | *string* | :heavy_check_mark: | String that represents an email address for the User | -| `primary` | *boolean* | :heavy_minus_sign: | Boolean which signifies if an email is intended as the primary email for the User | \ No newline at end of file diff --git a/docs/models/components/putv1scimv2usersidname.md b/docs/models/components/putv1scimv2usersidname.md deleted file mode 100644 index 3307d7cc..00000000 --- a/docs/models/components/putv1scimv2usersidname.md +++ /dev/null @@ -1,21 +0,0 @@ -# PutV1ScimV2UsersIdName - -The components of the user's name - -## Example Usage - -```typescript -import { PutV1ScimV2UsersIdName } from "firehydrant-typescript-sdk/models/components"; - -let value: PutV1ScimV2UsersIdName = { - givenName: "", - familyName: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `givenName` | *string* | :heavy_check_mark: | The family name of the User, or last name in most Western languages | -| `familyName` | *string* | :heavy_check_mark: | The given name of the User, or first name in most Western languages | \ No newline at end of file diff --git a/docs/models/components/questions.md b/docs/models/components/questions.md deleted file mode 100644 index 0739b01b..00000000 --- a/docs/models/components/questions.md +++ /dev/null @@ -1,17 +0,0 @@ -# Questions - -## Example Usage - -```typescript -import { Questions } from "firehydrant-typescript-sdk/models/components"; - -let value: Questions = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `id` | *string* | :heavy_minus_sign: | ID of a question | -| `title` | *string* | :heavy_minus_sign: | title of a question | -| `tooltip` | *string* | :heavy_minus_sign: | tooltip of a question | \ No newline at end of file diff --git a/docs/models/components/reorderpostmortemreasons.md b/docs/models/components/reorderpostmortemreasons.md new file mode 100644 index 00000000..5add84bf --- /dev/null +++ b/docs/models/components/reorderpostmortemreasons.md @@ -0,0 +1,21 @@ +# ReorderPostMortemReasons + +Update the order of contributing factors in a retrospective report + +## Example Usage + +```typescript +import { ReorderPostMortemReasons } from "firehydrant/models/components"; + +let value: ReorderPostMortemReasons = { + oldPosition: 381379, + newPosition: 84686, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `oldPosition` | *number* | :heavy_check_mark: | N/A | +| `newPosition` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/reportentity.md b/docs/models/components/reportentity.md index fce2c653..2cd66e35 100644 --- a/docs/models/components/reportentity.md +++ b/docs/models/components/reportentity.md @@ -5,7 +5,7 @@ ReportEntity model ## Example Usage ```typescript -import { ReportEntity } from "firehydrant-typescript-sdk/models/components"; +import { ReportEntity } from "firehydrant/models/components"; let value: ReportEntity = {}; ``` diff --git a/docs/models/components/reportsbucketentity.md b/docs/models/components/reportsbucketentity.md index 2a3d9a1b..ad8297be 100644 --- a/docs/models/components/reportsbucketentity.md +++ b/docs/models/components/reportsbucketentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ReportsBucketEntity } from "firehydrant-typescript-sdk/models/components"; +import { ReportsBucketEntity } from "firehydrant/models/components"; let value: ReportsBucketEntity = {}; ``` diff --git a/docs/models/components/reportsdatapointentity.md b/docs/models/components/reportsdatapointentity.md index 28217b6f..3286546d 100644 --- a/docs/models/components/reportsdatapointentity.md +++ b/docs/models/components/reportsdatapointentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ReportsDataPointEntity } from "firehydrant-typescript-sdk/models/components"; +import { ReportsDataPointEntity } from "firehydrant/models/components"; let value: ReportsDataPointEntity = {}; ``` diff --git a/docs/models/components/restrictions.md b/docs/models/components/restrictions.md deleted file mode 100644 index d3b3f0aa..00000000 --- a/docs/models/components/restrictions.md +++ /dev/null @@ -1,23 +0,0 @@ -# Restrictions - -## Example Usage - -```typescript -import { Restrictions } from "firehydrant-typescript-sdk/models/components"; - -let value: Restrictions = { - startDay: "thursday", - startTime: "", - endDay: "monday", - endTime: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `startDay` | [components.StartDay](../../models/components/startday.md) | :heavy_check_mark: | The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). | -| `startTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should start. | -| `endDay` | [components.EndDay](../../models/components/endday.md) | :heavy_check_mark: | The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). | -| `endTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should end. | \ No newline at end of file diff --git a/docs/models/components/retroexports.md b/docs/models/components/retroexports.md deleted file mode 100644 index 88484f23..00000000 --- a/docs/models/components/retroexports.md +++ /dev/null @@ -1,14 +0,0 @@ -# RetroExports - -## Example Usage - -```typescript -import { RetroExports } from "firehydrant-typescript-sdk/models/components"; - -let value: RetroExports = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/retrospectivesfieldentity.md b/docs/models/components/retrospectivesfieldentity.md new file mode 100644 index 00000000..dddb2fbc --- /dev/null +++ b/docs/models/components/retrospectivesfieldentity.md @@ -0,0 +1,21 @@ +# RetrospectivesFieldEntity + +## Example Usage + +```typescript +import { RetrospectivesFieldEntity } from "firehydrant/models/components"; + +let value: RetrospectivesFieldEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `label` | *string* | :heavy_minus_sign: | N/A | +| `type` | [components.RetrospectivesFieldEntityType](../../models/components/retrospectivesfieldentitytype.md) | :heavy_minus_sign: | N/A | +| `helpText` | *string* | :heavy_minus_sign: | N/A | +| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | +| `isRequired` | *boolean* | :heavy_minus_sign: | N/A | +| `schema` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/retrospectivesfieldentitytype.md b/docs/models/components/retrospectivesfieldentitytype.md new file mode 100644 index 00000000..9d5b8ee3 --- /dev/null +++ b/docs/models/components/retrospectivesfieldentitytype.md @@ -0,0 +1,15 @@ +# RetrospectivesFieldEntityType + +## Example Usage + +```typescript +import { RetrospectivesFieldEntityType } from "firehydrant/models/components"; + +let value: RetrospectivesFieldEntityType = "datetime"; +``` + +## Values + +```typescript +"text" | "single_select" | "multi_select" | "numeric" | "datetime" | "dynamic_input_group" | "markdown" | "markdown_text" +``` \ No newline at end of file diff --git a/docs/models/components/retrospectivesindextemplateentity.md b/docs/models/components/retrospectivesindextemplateentity.md new file mode 100644 index 00000000..f9c77ca2 --- /dev/null +++ b/docs/models/components/retrospectivesindextemplateentity.md @@ -0,0 +1,20 @@ +# RetrospectivesIndexTemplateEntity + +## Example Usage + +```typescript +import { RetrospectivesIndexTemplateEntity } from "firehydrant/models/components"; + +let value: RetrospectivesIndexTemplateEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `isDefault` | *boolean* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/retrospectivesindextemplateentitypaginated.md b/docs/models/components/retrospectivesindextemplateentitypaginated.md new file mode 100644 index 00000000..af74c29b --- /dev/null +++ b/docs/models/components/retrospectivesindextemplateentitypaginated.md @@ -0,0 +1,18 @@ +# RetrospectivesIndexTemplateEntityPaginated + +Retrospectives_IndexTemplateEntityPaginated model + +## Example Usage + +```typescript +import { RetrospectivesIndexTemplateEntityPaginated } from "firehydrant/models/components"; + +let value: RetrospectivesIndexTemplateEntityPaginated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `data` | [components.RetrospectivesIndexTemplateEntity](../../models/components/retrospectivesindextemplateentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/retrospectivestemplateentity.md b/docs/models/components/retrospectivestemplateentity.md new file mode 100644 index 00000000..4b6704dd --- /dev/null +++ b/docs/models/components/retrospectivestemplateentity.md @@ -0,0 +1,22 @@ +# RetrospectivesTemplateEntity + +Retrospectives_TemplateEntity model + +## Example Usage + +```typescript +import { RetrospectivesTemplateEntity } from "firehydrant/models/components"; + +let value: RetrospectivesTemplateEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `isDefault` | *boolean* | :heavy_minus_sign: | N/A | +| `sections` | [components.RetrospectivesTemplateEntityIncidentSectionEntity](../../models/components/retrospectivestemplateentityincidentsectionentity.md)[] | :heavy_minus_sign: | N/A | +| `fields` | [components.RetrospectivesFieldEntity](../../models/components/retrospectivesfieldentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/retrospectivestemplateentityincidentsectionentity.md b/docs/models/components/retrospectivestemplateentityincidentsectionentity.md new file mode 100644 index 00000000..bc2f034e --- /dev/null +++ b/docs/models/components/retrospectivestemplateentityincidentsectionentity.md @@ -0,0 +1,16 @@ +# RetrospectivesTemplateEntityIncidentSectionEntity + +## Example Usage + +```typescript +import { RetrospectivesTemplateEntityIncidentSectionEntity } from "firehydrant/models/components"; + +let value: RetrospectivesTemplateEntityIncidentSectionEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `elements` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/rule.md b/docs/models/components/rule.md deleted file mode 100644 index a19bdac1..00000000 --- a/docs/models/components/rule.md +++ /dev/null @@ -1,18 +0,0 @@ -# Rule - -## Example Usage - -```typescript -import { Rule } from "firehydrant-typescript-sdk/models/components"; - -let value: Rule = { - logic: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `logic` | *string* | :heavy_check_mark: | The JSON logic for the rule | -| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/rulematchingstrategy.md b/docs/models/components/rulematchingstrategy.md deleted file mode 100644 index 5f869b76..00000000 --- a/docs/models/components/rulematchingstrategy.md +++ /dev/null @@ -1,17 +0,0 @@ -# RuleMatchingStrategy - -Whether or not all rules must match, or if only one rule must match. - -## Example Usage - -```typescript -import { RuleMatchingStrategy } from "firehydrant-typescript-sdk/models/components"; - -let value: RuleMatchingStrategy = "any"; -``` - -## Values - -```typescript -"all" | "any" -``` \ No newline at end of file diff --git a/docs/models/components/rulesruleentity.md b/docs/models/components/rulesruleentity.md deleted file mode 100644 index 1b02b844..00000000 --- a/docs/models/components/rulesruleentity.md +++ /dev/null @@ -1,16 +0,0 @@ -# RulesRuleEntity - -## Example Usage - -```typescript -import { RulesRuleEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RulesRuleEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `logic` | [components.Logic](../../models/components/logic.md) | :heavy_minus_sign: | An unstructured object of key/value pairs describing the logic for applying the rule. | -| `userData` | [components.FHTypesGenericEntity](../../models/components/fhtypesgenericentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbookentity.md b/docs/models/components/runbookentity.md index aab712d4..c159c832 100644 --- a/docs/models/components/runbookentity.md +++ b/docs/models/components/runbookentity.md @@ -5,7 +5,7 @@ RunbookEntity model ## Example Usage ```typescript -import { RunbookEntity } from "firehydrant-typescript-sdk/models/components"; +import { RunbookEntity } from "firehydrant/models/components"; let value: RunbookEntity = {}; ``` @@ -22,13 +22,13 @@ let value: RunbookEntity = {}; | `runbookTemplateId` | *string* | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `updatedBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `steps` | [components.RunbookStepEntity](../../models/components/runbookstepentity.md) | :heavy_minus_sign: | N/A | -| `attachmentRule` | [components.RulesRuleEntity](../../models/components/rulesruleentity.md) | :heavy_minus_sign: | N/A | -| `votes` | [components.VotesEntity](../../models/components/votesentity.md) | :heavy_minus_sign: | VotesEntity model | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `steps` | [components.NullableRunbookStepEntity](../../models/components/nullablerunbookstepentity.md) | :heavy_minus_sign: | N/A | +| `attachmentRule` | [components.NullableRulesRuleEntity](../../models/components/nullablerulesruleentity.md) | :heavy_minus_sign: | N/A | +| `votes` | [components.NullableVotesEntity](../../models/components/nullablevotesentity.md) | :heavy_minus_sign: | N/A | | `isEditable` | *boolean* | :heavy_minus_sign: | N/A | -| `owner` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | -| `categories` | *string* | :heavy_minus_sign: | categories the runbook applies to | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | +| `categories` | *string*[] | :heavy_minus_sign: | categories the runbook applies to | | `autoAttachToRestrictedIncidents` | *boolean* | :heavy_minus_sign: | N/A | | `tutorial` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooks.md b/docs/models/components/runbooks.md index 3274ca95..5f83ecb9 100644 --- a/docs/models/components/runbooks.md +++ b/docs/models/components/runbooks.md @@ -5,7 +5,7 @@ A hash mapping runbook IDs to runbook names. ## Example Usage ```typescript -import { Runbooks } from "firehydrant-typescript-sdk/models/components"; +import { Runbooks } from "firehydrant/models/components"; let value: Runbooks = {}; ``` diff --git a/docs/models/components/runbooksactionconfigentity.md b/docs/models/components/runbooksactionconfigentity.md deleted file mode 100644 index 3e28829a..00000000 --- a/docs/models/components/runbooksactionconfigentity.md +++ /dev/null @@ -1,16 +0,0 @@ -# RunbooksActionConfigEntity - -## Example Usage - -```typescript -import { RunbooksActionConfigEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksActionConfigEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `elements` | [components.RunbooksElementEntity](../../models/components/runbookselemententity.md) | :heavy_minus_sign: | N/A | -| `documentationUrl` | *string* | :heavy_minus_sign: | Location of documentation for this action | \ No newline at end of file diff --git a/docs/models/components/runbooksactionsentity.md b/docs/models/components/runbooksactionsentity.md index d8f844f3..4af20c25 100644 --- a/docs/models/components/runbooksactionsentity.md +++ b/docs/models/components/runbooksactionsentity.md @@ -3,28 +3,28 @@ ## Example Usage ```typescript -import { RunbooksActionsEntity } from "firehydrant-typescript-sdk/models/components"; +import { RunbooksActionsEntity } from "firehydrant/models/components"; let value: RunbooksActionsEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `config` | [components.RunbooksActionConfigEntity](../../models/components/runbooksactionconfigentity.md) | :heavy_minus_sign: | N/A | -| `category` | *string* | :heavy_minus_sign: | N/A | -| `prerequisites` | [components.Prerequisites](../../models/components/prerequisites.md) | :heavy_minus_sign: | N/A | -| `integration` | [components.IntegrationsIntegrationEntity](../../models/components/integrationsintegrationentity.md) | :heavy_minus_sign: | Integrations_IntegrationEntity model | -| `supportedRunbookTypes` | *string*[] | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `automatable` | *boolean* | :heavy_minus_sign: | N/A | -| `rerunnable` | *boolean* | :heavy_minus_sign: | N/A | -| `repeatable` | *boolean* | :heavy_minus_sign: | N/A | -| `defaultLogic` | [components.DefaultLogic](../../models/components/defaultlogic.md) | :heavy_minus_sign: | N/A | -| `defaultRuleData` | [components.DefaultRuleData](../../models/components/defaultruledata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `config` | [components.NullableRunbooksActionConfigEntity](../../models/components/nullablerunbooksactionconfigentity.md) | :heavy_minus_sign: | N/A | +| `category` | *string* | :heavy_minus_sign: | N/A | +| `prerequisites` | [components.RunbooksActionsEntityPrerequisites](../../models/components/runbooksactionsentityprerequisites.md) | :heavy_minus_sign: | N/A | +| `integration` | [components.NullableIntegrationsIntegrationEntity](../../models/components/nullableintegrationsintegrationentity.md) | :heavy_minus_sign: | N/A | +| `supportedRunbookTypes` | *string*[] | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `automatable` | *boolean* | :heavy_minus_sign: | N/A | +| `rerunnable` | *boolean* | :heavy_minus_sign: | N/A | +| `repeatable` | *boolean* | :heavy_minus_sign: | N/A | +| `defaultLogic` | [components.RunbooksActionsEntityDefaultLogic](../../models/components/runbooksactionsentitydefaultlogic.md) | :heavy_minus_sign: | N/A | +| `defaultRuleData` | [components.RunbooksActionsEntityDefaultRuleData](../../models/components/runbooksactionsentitydefaultruledata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksactionsentitydefaultlogic.md b/docs/models/components/runbooksactionsentitydefaultlogic.md new file mode 100644 index 00000000..abf2da65 --- /dev/null +++ b/docs/models/components/runbooksactionsentitydefaultlogic.md @@ -0,0 +1,14 @@ +# RunbooksActionsEntityDefaultLogic + +## Example Usage + +```typescript +import { RunbooksActionsEntityDefaultLogic } from "firehydrant/models/components"; + +let value: RunbooksActionsEntityDefaultLogic = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/runbooksactionsentitydefaultruledata.md b/docs/models/components/runbooksactionsentitydefaultruledata.md new file mode 100644 index 00000000..1d879ced --- /dev/null +++ b/docs/models/components/runbooksactionsentitydefaultruledata.md @@ -0,0 +1,14 @@ +# RunbooksActionsEntityDefaultRuleData + +## Example Usage + +```typescript +import { RunbooksActionsEntityDefaultRuleData } from "firehydrant/models/components"; + +let value: RunbooksActionsEntityDefaultRuleData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/runbooksactionsentitypaginated.md b/docs/models/components/runbooksactionsentitypaginated.md index 8c40ad3b..48b0c2f1 100644 --- a/docs/models/components/runbooksactionsentitypaginated.md +++ b/docs/models/components/runbooksactionsentitypaginated.md @@ -5,14 +5,14 @@ Runbooks_ActionsEntityPaginated model ## Example Usage ```typescript -import { RunbooksActionsEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { RunbooksActionsEntityPaginated } from "firehydrant/models/components"; let value: RunbooksActionsEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `data` | [components.RunbooksActionsEntity](../../models/components/runbooksactionsentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.RunbooksActionsEntity](../../models/components/runbooksactionsentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksactionsentityprerequisites.md b/docs/models/components/runbooksactionsentityprerequisites.md new file mode 100644 index 00000000..79c383f9 --- /dev/null +++ b/docs/models/components/runbooksactionsentityprerequisites.md @@ -0,0 +1,14 @@ +# RunbooksActionsEntityPrerequisites + +## Example Usage + +```typescript +import { RunbooksActionsEntityPrerequisites } from "firehydrant/models/components"; + +let value: RunbooksActionsEntityPrerequisites = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/runbookselementdynamicselectentity.md b/docs/models/components/runbookselementdynamicselectentity.md deleted file mode 100644 index 2af3ec42..00000000 --- a/docs/models/components/runbookselementdynamicselectentity.md +++ /dev/null @@ -1,22 +0,0 @@ -# RunbooksElementDynamicSelectEntity - -## Example Usage - -```typescript -import { RunbooksElementDynamicSelectEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksElementDynamicSelectEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `label` | *string* | :heavy_minus_sign: | N/A | -| `placeholder` | *string* | :heavy_minus_sign: | N/A | -| `asyncUrl` | *string* | :heavy_minus_sign: | N/A | -| `required` | *boolean* | :heavy_minus_sign: | N/A | -| `clearable` | *boolean* | :heavy_minus_sign: | N/A | -| `isMulti` | *boolean* | :heavy_minus_sign: | N/A | -| `defaultValue` | [components.RunbooksElementDynamicSelectEntitySelectOptionEntity](../../models/components/runbookselementdynamicselectentityselectoptionentity.md) | :heavy_minus_sign: | N/A | -| `options` | [components.RunbooksElementDynamicSelectEntitySelectOptionEntity](../../models/components/runbookselementdynamicselectentityselectoptionentity.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbookselementdynamicselectentityselectoptionentity.md b/docs/models/components/runbookselementdynamicselectentityselectoptionentity.md index f15df400..2ce6afa1 100644 --- a/docs/models/components/runbookselementdynamicselectentityselectoptionentity.md +++ b/docs/models/components/runbookselementdynamicselectentityselectoptionentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { RunbooksElementDynamicSelectEntitySelectOptionEntity } from "firehydrant-typescript-sdk/models/components"; +import { RunbooksElementDynamicSelectEntitySelectOptionEntity } from "firehydrant/models/components"; let value: RunbooksElementDynamicSelectEntitySelectOptionEntity = {}; ``` diff --git a/docs/models/components/runbookselemententity.md b/docs/models/components/runbookselemententity.md deleted file mode 100644 index 9888572f..00000000 --- a/docs/models/components/runbookselemententity.md +++ /dev/null @@ -1,21 +0,0 @@ -# RunbooksElementEntity - -## Example Usage - -```typescript -import { RunbooksElementEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksElementEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `markdown` | [components.RunbooksElementMarkdownEntity](../../models/components/runbookselementmarkdownentity.md) | :heavy_minus_sign: | N/A | -| `textarea` | [components.RunbooksElementTextareaEntity](../../models/components/runbookselementtextareaentity.md) | :heavy_minus_sign: | N/A | -| `input` | [components.RunbooksElementInputEntity](../../models/components/runbookselementinputentity.md) | :heavy_minus_sign: | N/A | -| `plainText` | [components.RunbooksElementMarkdownEntity](../../models/components/runbookselementmarkdownentity.md) | :heavy_minus_sign: | N/A | -| `dynamicSelect` | [components.RunbooksElementDynamicSelectEntity](../../models/components/runbookselementdynamicselectentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbookselementinputentity.md b/docs/models/components/runbookselementinputentity.md deleted file mode 100644 index 01ad8320..00000000 --- a/docs/models/components/runbookselementinputentity.md +++ /dev/null @@ -1,18 +0,0 @@ -# RunbooksElementInputEntity - -## Example Usage - -```typescript -import { RunbooksElementInputEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksElementInputEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `label` | *string* | :heavy_minus_sign: | N/A | -| `placeholder` | *string* | :heavy_minus_sign: | N/A | -| `defaultValue` | *string* | :heavy_minus_sign: | N/A | -| `required` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbookselementmarkdownentity.md b/docs/models/components/runbookselementmarkdownentity.md deleted file mode 100644 index b101b1bc..00000000 --- a/docs/models/components/runbookselementmarkdownentity.md +++ /dev/null @@ -1,15 +0,0 @@ -# RunbooksElementMarkdownEntity - -## Example Usage - -```typescript -import { RunbooksElementMarkdownEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksElementMarkdownEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `text` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbookselementtextareaentity.md b/docs/models/components/runbookselementtextareaentity.md deleted file mode 100644 index 1ea4ebbf..00000000 --- a/docs/models/components/runbookselementtextareaentity.md +++ /dev/null @@ -1,17 +0,0 @@ -# RunbooksElementTextareaEntity - -## Example Usage - -```typescript -import { RunbooksElementTextareaEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksElementTextareaEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `label` | *string* | :heavy_minus_sign: | N/A | -| `placeholder` | *string* | :heavy_minus_sign: | N/A | -| `defaultValue` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionentity.md b/docs/models/components/runbooksexecutionentity.md index 8aa218e3..4e570bca 100644 --- a/docs/models/components/runbooksexecutionentity.md +++ b/docs/models/components/runbooksexecutionentity.md @@ -5,23 +5,23 @@ Runbooks_ExecutionEntity model ## Example Usage ```typescript -import { RunbooksExecutionEntity } from "firehydrant-typescript-sdk/models/components"; +import { RunbooksExecutionEntity } from "firehydrant/models/components"; let value: RunbooksExecutionEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `status` | *string* | :heavy_minus_sign: | N/A | -| `statusReason` | *string* | :heavy_minus_sign: | N/A | -| `statusReasonMessage` | *string* | :heavy_minus_sign: | N/A | -| `hasBeenRerun` | *boolean* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `createdBy` | *string* | :heavy_minus_sign: | N/A | -| `runbook` | [components.SlimRunbookEntity](../../models/components/slimrunbookentity.md) | :heavy_minus_sign: | N/A | -| `steps` | [components.RunbooksExecutionStepEntity](../../models/components/runbooksexecutionstepentity.md) | :heavy_minus_sign: | N/A | -| `executedFor` | [components.RunbooksExecutionEntityExecutedForEntity](../../models/components/runbooksexecutionentityexecutedforentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `statusReason` | *string* | :heavy_minus_sign: | N/A | +| `statusReasonMessage` | *string* | :heavy_minus_sign: | N/A | +| `hasBeenRerun` | *boolean* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `createdBy` | *string* | :heavy_minus_sign: | N/A | +| `runbook` | [components.NullableSlimRunbookEntity](../../models/components/nullableslimrunbookentity.md) | :heavy_minus_sign: | N/A | +| `steps` | [components.NullableRunbooksExecutionStepEntity](../../models/components/nullablerunbooksexecutionstepentity.md) | :heavy_minus_sign: | N/A | +| `executedFor` | [components.NullableRunbooksExecutionEntityExecutedForEntity](../../models/components/nullablerunbooksexecutionentityexecutedforentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionentityexecutedforentity.md b/docs/models/components/runbooksexecutionentityexecutedforentity.md deleted file mode 100644 index 512f3aff..00000000 --- a/docs/models/components/runbooksexecutionentityexecutedforentity.md +++ /dev/null @@ -1,17 +0,0 @@ -# RunbooksExecutionEntityExecutedForEntity - -## Example Usage - -```typescript -import { RunbooksExecutionEntityExecutedForEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksExecutionEntityExecutedForEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionentitypaginated.md b/docs/models/components/runbooksexecutionentitypaginated.md index cc20f048..8f92c5db 100644 --- a/docs/models/components/runbooksexecutionentitypaginated.md +++ b/docs/models/components/runbooksexecutionentitypaginated.md @@ -5,7 +5,7 @@ Runbooks_ExecutionEntityPaginated model ## Example Usage ```typescript -import { RunbooksExecutionEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { RunbooksExecutionEntityPaginated } from "firehydrant/models/components"; let value: RunbooksExecutionEntityPaginated = {}; ``` @@ -15,4 +15,4 @@ let value: RunbooksExecutionEntityPaginated = {}; | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `data` | [components.RunbooksExecutionEntity](../../models/components/runbooksexecutionentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionstepentity.md b/docs/models/components/runbooksexecutionstepentity.md deleted file mode 100644 index d1f50555..00000000 --- a/docs/models/components/runbooksexecutionstepentity.md +++ /dev/null @@ -1,32 +0,0 @@ -# RunbooksExecutionStepEntity - -## Example Usage - -```typescript -import { RunbooksExecutionStepEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksExecutionStepEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `actionSlug` | *string* | :heavy_minus_sign: | N/A | -| `actionType` | *string* | :heavy_minus_sign: | N/A | -| `integrationName` | *string* | :heavy_minus_sign: | N/A | -| `integrationSlug` | *string* | :heavy_minus_sign: | N/A | -| `automatic` | *boolean* | :heavy_minus_sign: | N/A | -| `config` | [components.RunbooksExecutionStepEntityConfig](../../models/components/runbooksexecutionstepentityconfig.md) | :heavy_minus_sign: | N/A | -| `stepElements` | [components.RunbooksExecutionStepEntityStepElements](../../models/components/runbooksexecutionstepentitystepelements.md)[] | :heavy_minus_sign: | N/A | -| `executable` | *boolean* | :heavy_minus_sign: | N/A | -| `repeats` | *boolean* | :heavy_minus_sign: | N/A | -| `repeatsDuration` | *string* | :heavy_minus_sign: | ISO8601 formatted duration string | -| `repeatsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `hasBeenRerun` | *boolean* | :heavy_minus_sign: | N/A | -| `hasBeenRetried` | *boolean* | :heavy_minus_sign: | N/A | -| `execution` | [components.RunbooksExecutionStepExecutionEntity](../../models/components/runbooksexecutionstepexecutionentity.md) | :heavy_minus_sign: | N/A | -| `repeatable` | *boolean* | :heavy_minus_sign: | N/A | -| `rule` | [components.RulesRuleEntity](../../models/components/rulesruleentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionstepentityconfig.md b/docs/models/components/runbooksexecutionstepentityconfig.md deleted file mode 100644 index 7c36787c..00000000 --- a/docs/models/components/runbooksexecutionstepentityconfig.md +++ /dev/null @@ -1,14 +0,0 @@ -# RunbooksExecutionStepEntityConfig - -## Example Usage - -```typescript -import { RunbooksExecutionStepEntityConfig } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksExecutionStepEntityConfig = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionstepentitystepelements.md b/docs/models/components/runbooksexecutionstepentitystepelements.md deleted file mode 100644 index 4ebeb493..00000000 --- a/docs/models/components/runbooksexecutionstepentitystepelements.md +++ /dev/null @@ -1,14 +0,0 @@ -# RunbooksExecutionStepEntityStepElements - -## Example Usage - -```typescript -import { RunbooksExecutionStepEntityStepElements } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksExecutionStepEntityStepElements = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionstepexecutionentity.md b/docs/models/components/runbooksexecutionstepexecutionentity.md deleted file mode 100644 index 62707994..00000000 --- a/docs/models/components/runbooksexecutionstepexecutionentity.md +++ /dev/null @@ -1,21 +0,0 @@ -# RunbooksExecutionStepExecutionEntity - -## Example Usage - -```typescript -import { RunbooksExecutionStepExecutionEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksExecutionStepExecutionEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `state` | [components.RunbooksExecutionStepExecutionEntityState](../../models/components/runbooksexecutionstepexecutionentitystate.md) | :heavy_minus_sign: | N/A | -| `data` | [components.RunbooksExecutionStepExecutionEntityData](../../models/components/runbooksexecutionstepexecutionentitydata.md) | :heavy_minus_sign: | N/A | -| `performedBy` | [components.ActorEntity](../../models/components/actorentity.md) | :heavy_minus_sign: | N/A | -| `performedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `scheduledFor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `error` | *string* | :heavy_minus_sign: | N/A | -| `webhookDelivery` | [components.RunbooksWebhookDeliveryEntity](../../models/components/runbookswebhookdeliveryentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionstepexecutionentitydata.md b/docs/models/components/runbooksexecutionstepexecutionentitydata.md deleted file mode 100644 index 2f21e1f0..00000000 --- a/docs/models/components/runbooksexecutionstepexecutionentitydata.md +++ /dev/null @@ -1,14 +0,0 @@ -# RunbooksExecutionStepExecutionEntityData - -## Example Usage - -```typescript -import { RunbooksExecutionStepExecutionEntityData } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksExecutionStepExecutionEntityData = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/runbooksexecutionstepexecutionentitystate.md b/docs/models/components/runbooksexecutionstepexecutionentitystate.md deleted file mode 100644 index f276dade..00000000 --- a/docs/models/components/runbooksexecutionstepexecutionentitystate.md +++ /dev/null @@ -1,15 +0,0 @@ -# RunbooksExecutionStepExecutionEntityState - -## Example Usage - -```typescript -import { RunbooksExecutionStepExecutionEntityState } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksExecutionStepExecutionEntityState = "dismissed"; -``` - -## Values - -```typescript -"initial" | "pending" | "scheduled" | "started" | "dismissed" | "completed" | "errored" -``` \ No newline at end of file diff --git a/docs/models/components/runbookstepentity.md b/docs/models/components/runbookstepentity.md deleted file mode 100644 index 0f3ce0eb..00000000 --- a/docs/models/components/runbookstepentity.md +++ /dev/null @@ -1,28 +0,0 @@ -# RunbookStepEntity - -## Example Usage - -```typescript -import { RunbookStepEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbookStepEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `actionId` | *string* | :heavy_minus_sign: | N/A | -| `stepId` | *string* | :heavy_minus_sign: | N/A | -| `config` | [components.Config](../../models/components/config.md) | :heavy_minus_sign: | An unstructured object of key/value pairs describing the config settings for the step. | -| `actionElements` | [components.ActionElements](../../models/components/actionelements.md)[] | :heavy_minus_sign: | A list of action elements | -| `stepElements` | [components.StepElements](../../models/components/stepelements.md)[] | :heavy_minus_sign: | A list of step elements | -| `automatic` | *boolean* | :heavy_minus_sign: | N/A | -| `delayDuration` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `action` | [components.RunbooksActionsEntity](../../models/components/runbooksactionsentity.md) | :heavy_minus_sign: | N/A | -| `reruns` | *boolean* | :heavy_minus_sign: | N/A | -| `repeats` | *boolean* | :heavy_minus_sign: | N/A | -| `repeatsDuration` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `votes` | [components.VotesEntity](../../models/components/votesentity.md) | :heavy_minus_sign: | VotesEntity model | -| `rule` | [components.RulesRuleEntity](../../models/components/rulesruleentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/runbookswebhookdeliveryentity.md b/docs/models/components/runbookswebhookdeliveryentity.md deleted file mode 100644 index dddfcc24..00000000 --- a/docs/models/components/runbookswebhookdeliveryentity.md +++ /dev/null @@ -1,16 +0,0 @@ -# RunbooksWebhookDeliveryEntity - -## Example Usage - -```typescript -import { RunbooksWebhookDeliveryEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: RunbooksWebhookDeliveryEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `headers` | *string* | :heavy_minus_sign: | N/A | -| `statusCode` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/savedsearchentity.md b/docs/models/components/savedsearchentity.md index b8bb5a02..ef168cc0 100644 --- a/docs/models/components/savedsearchentity.md +++ b/docs/models/components/savedsearchentity.md @@ -5,7 +5,7 @@ SavedSearchEntity model ## Example Usage ```typescript -import { SavedSearchEntity } from "firehydrant-typescript-sdk/models/components"; +import { SavedSearchEntity } from "firehydrant/models/components"; let value: SavedSearchEntity = {}; ``` diff --git a/docs/models/components/scheduledmaintenanceentity.md b/docs/models/components/scheduledmaintenanceentity.md index 4ff9ef8b..483072bc 100644 --- a/docs/models/components/scheduledmaintenanceentity.md +++ b/docs/models/components/scheduledmaintenanceentity.md @@ -5,7 +5,7 @@ ScheduledMaintenanceEntity model ## Example Usage ```typescript -import { ScheduledMaintenanceEntity } from "firehydrant-typescript-sdk/models/components"; +import { ScheduledMaintenanceEntity } from "firehydrant/models/components"; let value: ScheduledMaintenanceEntity = {}; ``` @@ -22,7 +22,7 @@ let value: ScheduledMaintenanceEntity = {}; | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `incident` | [components.IncidentEntity](../../models/components/incidententity.md) | :heavy_minus_sign: | IncidentEntity model | +| `incident` | [components.NullableIncidentEntity](../../models/components/nullableincidententity.md) | :heavy_minus_sign: | N/A | | `statusPages` | [components.ScheduledMaintenancesStatusPageEntity](../../models/components/scheduledmaintenancesstatuspageentity.md)[] | :heavy_minus_sign: | N/A | | `impacts` | [components.ScheduledMaintenancesImpactEntity](../../models/components/scheduledmaintenancesimpactentity.md)[] | :heavy_minus_sign: | N/A | | `labels` | [components.ScheduledMaintenanceEntityLabels](../../models/components/scheduledmaintenanceentitylabels.md) | :heavy_minus_sign: | An object of label key and values | \ No newline at end of file diff --git a/docs/models/components/scheduledmaintenanceentitylabels.md b/docs/models/components/scheduledmaintenanceentitylabels.md index ede6784f..1ac71135 100644 --- a/docs/models/components/scheduledmaintenanceentitylabels.md +++ b/docs/models/components/scheduledmaintenanceentitylabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { ScheduledMaintenanceEntityLabels } from "firehydrant-typescript-sdk/models/components"; +import { ScheduledMaintenanceEntityLabels } from "firehydrant/models/components"; let value: ScheduledMaintenanceEntityLabels = {}; ``` diff --git a/docs/models/components/scheduledmaintenancesimpactentity.md b/docs/models/components/scheduledmaintenancesimpactentity.md index 616cd544..c11b1919 100644 --- a/docs/models/components/scheduledmaintenancesimpactentity.md +++ b/docs/models/components/scheduledmaintenancesimpactentity.md @@ -3,16 +3,16 @@ ## Example Usage ```typescript -import { ScheduledMaintenancesImpactEntity } from "firehydrant-typescript-sdk/models/components"; +import { ScheduledMaintenancesImpactEntity } from "firehydrant/models/components"; let value: ScheduledMaintenancesImpactEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `impact` | [components.SuccinctEntity](../../models/components/succinctentity.md) | :heavy_minus_sign: | N/A | -| `condition` | [components.SeverityMatrixConditionEntity](../../models/components/severitymatrixconditionentity.md) | :heavy_minus_sign: | SeverityMatrix_ConditionEntity model | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `impact` | [components.NullableSuccinctEntity](../../models/components/nullablesuccinctentity.md) | :heavy_minus_sign: | N/A | +| `condition` | [components.NullableSeverityMatrixConditionEntity](../../models/components/nullableseveritymatrixconditionentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/scheduledmaintenancesstatuspageentity.md b/docs/models/components/scheduledmaintenancesstatuspageentity.md index fddef6eb..182b38f2 100644 --- a/docs/models/components/scheduledmaintenancesstatuspageentity.md +++ b/docs/models/components/scheduledmaintenancesstatuspageentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ScheduledMaintenancesStatusPageEntity } from "firehydrant-typescript-sdk/models/components"; +import { ScheduledMaintenancesStatusPageEntity } from "firehydrant/models/components"; let value: ScheduledMaintenancesStatusPageEntity = {}; ``` diff --git a/docs/models/components/scheduleentity.md b/docs/models/components/scheduleentity.md index 8bb55f2f..11cc5883 100644 --- a/docs/models/components/scheduleentity.md +++ b/docs/models/components/scheduleentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ScheduleEntity } from "firehydrant-typescript-sdk/models/components"; +import { ScheduleEntity } from "firehydrant/models/components"; let value: ScheduleEntity = {}; ``` diff --git a/docs/models/components/scheduleentitypaginated.md b/docs/models/components/scheduleentitypaginated.md index bf80a738..1c89178e 100644 --- a/docs/models/components/scheduleentitypaginated.md +++ b/docs/models/components/scheduleentitypaginated.md @@ -5,14 +5,14 @@ ScheduleEntityPaginated model ## Example Usage ```typescript -import { ScheduleEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { ScheduleEntityPaginated } from "firehydrant/models/components"; let value: ScheduleEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.ScheduleEntity](../../models/components/scheduleentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.ScheduleEntity](../../models/components/scheduleentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/security.md b/docs/models/components/security.md index e548fa84..7ea611bf 100644 --- a/docs/models/components/security.md +++ b/docs/models/components/security.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { Security } from "firehydrant-typescript-sdk/models/components"; +import { Security } from "firehydrant/models/components"; let value: Security = {}; ``` diff --git a/docs/models/components/servicechilddependencyentity.md b/docs/models/components/servicechilddependencyentity.md index eb89aa6e..3759c6ef 100644 --- a/docs/models/components/servicechilddependencyentity.md +++ b/docs/models/components/servicechilddependencyentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ServiceChildDependencyEntity } from "firehydrant-typescript-sdk/models/components"; +import { ServiceChildDependencyEntity } from "firehydrant/models/components"; let value: ServiceChildDependencyEntity = {}; ``` @@ -16,5 +16,5 @@ let value: ServiceChildDependencyEntity = {}; | `notes` | *string* | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `service` | [components.ServiceEntity](../../models/components/serviceentity.md) | :heavy_minus_sign: | ServiceEntity model | +| `service` | [components.NullableServiceEntity](../../models/components/nullableserviceentity.md) | :heavy_minus_sign: | N/A | | `type` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/servicedependencies.md b/docs/models/components/servicedependencies.md deleted file mode 100644 index f5de8522..00000000 --- a/docs/models/components/servicedependencies.md +++ /dev/null @@ -1,14 +0,0 @@ -# ServiceDependencies - -## Example Usage - -```typescript -import { ServiceDependencies } from "firehydrant-typescript-sdk/models/components"; - -let value: ServiceDependencies = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/servicedependency.md b/docs/models/components/servicedependency.md new file mode 100644 index 00000000..ae46e73b --- /dev/null +++ b/docs/models/components/servicedependency.md @@ -0,0 +1,14 @@ +# ServiceDependency + +## Example Usage + +```typescript +import { ServiceDependency } from "firehydrant/models/components"; + +let value: ServiceDependency = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/servicedependencyentity.md b/docs/models/components/servicedependencyentity.md index 9bdafdfa..fb3cf00c 100644 --- a/docs/models/components/servicedependencyentity.md +++ b/docs/models/components/servicedependencyentity.md @@ -5,7 +5,7 @@ ServiceDependencyEntity model ## Example Usage ```typescript -import { ServiceDependencyEntity } from "firehydrant-typescript-sdk/models/components"; +import { ServiceDependencyEntity } from "firehydrant/models/components"; let value: ServiceDependencyEntity = {}; ``` @@ -18,5 +18,5 @@ let value: ServiceDependencyEntity = {}; | `notes` | *string* | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `service` | [components.ServiceEntity](../../models/components/serviceentity.md) | :heavy_minus_sign: | ServiceEntity model | -| `connectedService` | [components.ServiceEntity](../../models/components/serviceentity.md) | :heavy_minus_sign: | ServiceEntity model | \ No newline at end of file +| `service` | [components.NullableServiceEntity](../../models/components/nullableserviceentity.md) | :heavy_minus_sign: | N/A | +| `connectedService` | [components.NullableServiceEntity](../../models/components/nullableserviceentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/serviceentity.md b/docs/models/components/serviceentity.md index f934f376..642097ce 100644 --- a/docs/models/components/serviceentity.md +++ b/docs/models/components/serviceentity.md @@ -5,36 +5,36 @@ ServiceEntity model ## Example Usage ```typescript -import { ServiceEntity } from "firehydrant-typescript-sdk/models/components"; +import { ServiceEntity } from "firehydrant/models/components"; let value: ServiceEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `serviceTier` | *number* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `allowedParams` | *string*[] | :heavy_minus_sign: | N/A | -| `labels` | [components.ServiceEntityLabels](../../models/components/serviceentitylabels.md) | :heavy_minus_sign: | An object of label key and values | -| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | -| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | -| `activeIncidents` | *string*[] | :heavy_minus_sign: | List of active incident guids | -| `checklists` | [components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)[] | :heavy_minus_sign: | List of checklists associated with a service | -| `completedChecks` | *number* | :heavy_minus_sign: | N/A | -| `externalResources` | [components.ExternalResourceEntity](../../models/components/externalresourceentity.md)[] | :heavy_minus_sign: | Information about known linkages to representations of services outside of FireHydrant. | -| `functionalities` | [components.FunctionalityEntity](../../models/components/functionalityentity.md)[] | :heavy_minus_sign: | List of functionalities attached to the service | -| `lastImport` | [components.ImportsImportableResourceEntity](../../models/components/importsimportableresourceentity.md) | :heavy_minus_sign: | N/A | -| `links` | [components.LinksEntity](../../models/components/linksentity.md)[] | :heavy_minus_sign: | List of links attached to this service. | -| `managedBy` | *string* | :heavy_minus_sign: | If set, this field indicates that the service is managed by an integration and thus cannot be set manually | -| `managedBySettings` | [components.ManagedBySettings](../../models/components/managedbysettings.md) | :heavy_minus_sign: | Indicates the settings of the catalog that manages this service | -| `owner` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | -| `serviceChecklistUpdatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `teams` | [components.TeamEntityLite](../../models/components/teamentitylite.md)[] | :heavy_minus_sign: | List of teams attached to the service | -| `updatedBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `serviceTier` | *number* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `allowedParams` | *string*[] | :heavy_minus_sign: | N/A | +| `labels` | [components.ServiceEntityLabels](../../models/components/serviceentitylabels.md) | :heavy_minus_sign: | An object of label key and values | +| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | +| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | +| `activeIncidents` | *string*[] | :heavy_minus_sign: | List of active incident guids | +| `checklists` | [components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)[] | :heavy_minus_sign: | List of checklists associated with a service | +| `completedChecks` | *number* | :heavy_minus_sign: | N/A | +| `externalResources` | [components.ExternalResourceEntity](../../models/components/externalresourceentity.md)[] | :heavy_minus_sign: | Information about known linkages to representations of services outside of FireHydrant. | +| `functionalities` | [components.FunctionalityEntity](../../models/components/functionalityentity.md)[] | :heavy_minus_sign: | List of functionalities attached to the service | +| `lastImport` | [components.NullableImportsImportableResourceEntity](../../models/components/nullableimportsimportableresourceentity.md) | :heavy_minus_sign: | N/A | +| `links` | [components.LinksEntity](../../models/components/linksentity.md)[] | :heavy_minus_sign: | List of links attached to this service. | +| `managedBy` | *string* | :heavy_minus_sign: | If set, this field indicates that the service is managed by an integration and thus cannot be set manually | +| `managedBySettings` | [components.ServiceEntityManagedBySettings](../../models/components/serviceentitymanagedbysettings.md) | :heavy_minus_sign: | Indicates the settings of the catalog that manages this service | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | +| `serviceChecklistUpdatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `teams` | [components.TeamEntityLite](../../models/components/teamentitylite.md)[] | :heavy_minus_sign: | List of teams attached to the service | +| `updatedBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/serviceentitychecklist.md b/docs/models/components/serviceentitychecklist.md index f7e3beea..803d15df 100644 --- a/docs/models/components/serviceentitychecklist.md +++ b/docs/models/components/serviceentitychecklist.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ServiceEntityChecklist } from "firehydrant-typescript-sdk/models/components"; +import { ServiceEntityChecklist } from "firehydrant/models/components"; let value: ServiceEntityChecklist = {}; ``` @@ -24,5 +24,5 @@ let value: ServiceEntityChecklist = {}; | `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | | `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | | `completedChecks` | *number* | :heavy_minus_sign: | N/A | -| `owner` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | | `serviceChecklistUpdatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/serviceentitychecklistlabels.md b/docs/models/components/serviceentitychecklistlabels.md index 98888122..b6c78579 100644 --- a/docs/models/components/serviceentitychecklistlabels.md +++ b/docs/models/components/serviceentitychecklistlabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { ServiceEntityChecklistLabels } from "firehydrant-typescript-sdk/models/components"; +import { ServiceEntityChecklistLabels } from "firehydrant/models/components"; let value: ServiceEntityChecklistLabels = {}; ``` diff --git a/docs/models/components/serviceentitylabels.md b/docs/models/components/serviceentitylabels.md index b1a20059..6869e388 100644 --- a/docs/models/components/serviceentitylabels.md +++ b/docs/models/components/serviceentitylabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { ServiceEntityLabels } from "firehydrant-typescript-sdk/models/components"; +import { ServiceEntityLabels } from "firehydrant/models/components"; let value: ServiceEntityLabels = {}; ``` diff --git a/docs/models/components/serviceentitylite.md b/docs/models/components/serviceentitylite.md index bc0f1bce..087e6ad2 100644 --- a/docs/models/components/serviceentitylite.md +++ b/docs/models/components/serviceentitylite.md @@ -5,7 +5,7 @@ ServiceEntityLite model ## Example Usage ```typescript -import { ServiceEntityLite } from "firehydrant-typescript-sdk/models/components"; +import { ServiceEntityLite } from "firehydrant/models/components"; let value: ServiceEntityLite = {}; ``` diff --git a/docs/models/components/serviceentitylitelabels.md b/docs/models/components/serviceentitylitelabels.md index c96fa825..ae18a15c 100644 --- a/docs/models/components/serviceentitylitelabels.md +++ b/docs/models/components/serviceentitylitelabels.md @@ -5,7 +5,7 @@ An object of label key and values ## Example Usage ```typescript -import { ServiceEntityLiteLabels } from "firehydrant-typescript-sdk/models/components"; +import { ServiceEntityLiteLabels } from "firehydrant/models/components"; let value: ServiceEntityLiteLabels = {}; ``` diff --git a/docs/models/components/serviceentitymanagedbysettings.md b/docs/models/components/serviceentitymanagedbysettings.md new file mode 100644 index 00000000..afa6981f --- /dev/null +++ b/docs/models/components/serviceentitymanagedbysettings.md @@ -0,0 +1,16 @@ +# ServiceEntityManagedBySettings + +Indicates the settings of the catalog that manages this service + +## Example Usage + +```typescript +import { ServiceEntityManagedBySettings } from "firehydrant/models/components"; + +let value: ServiceEntityManagedBySettings = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/serviceentitypaginated.md b/docs/models/components/serviceentitypaginated.md index c6325e41..202a2b40 100644 --- a/docs/models/components/serviceentitypaginated.md +++ b/docs/models/components/serviceentitypaginated.md @@ -5,14 +5,14 @@ ServiceEntityPaginated model ## Example Usage ```typescript -import { ServiceEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { ServiceEntityPaginated } from "firehydrant/models/components"; let value: ServiceEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.ServiceEntity](../../models/components/serviceentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.ServiceEntity](../../models/components/serviceentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/servicelinkentity.md b/docs/models/components/servicelinkentity.md index bc0a1643..7c164897 100644 --- a/docs/models/components/servicelinkentity.md +++ b/docs/models/components/servicelinkentity.md @@ -5,14 +5,14 @@ ServiceLinkEntity model ## Example Usage ```typescript -import { ServiceLinkEntity } from "firehydrant-typescript-sdk/models/components"; +import { ServiceLinkEntity } from "firehydrant/models/components"; let value: ServiceLinkEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `statusCode` | *number* | :heavy_minus_sign: | N/A | -| `service` | [components.ServiceEntity](../../models/components/serviceentity.md) | :heavy_minus_sign: | ServiceEntity model | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `statusCode` | *number* | :heavy_minus_sign: | N/A | +| `service` | [components.NullableServiceEntity](../../models/components/nullableserviceentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/serviceparentdependencyentity.md b/docs/models/components/serviceparentdependencyentity.md index 35e0a53d..3ebff205 100644 --- a/docs/models/components/serviceparentdependencyentity.md +++ b/docs/models/components/serviceparentdependencyentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ServiceParentDependencyEntity } from "firehydrant-typescript-sdk/models/components"; +import { ServiceParentDependencyEntity } from "firehydrant/models/components"; let value: ServiceParentDependencyEntity = {}; ``` @@ -16,5 +16,5 @@ let value: ServiceParentDependencyEntity = {}; | `notes` | *string* | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `service` | [components.ServiceEntity](../../models/components/serviceentity.md) | :heavy_minus_sign: | ServiceEntity model | +| `service` | [components.NullableServiceEntity](../../models/components/nullableserviceentity.md) | :heavy_minus_sign: | N/A | | `type` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/services.md b/docs/models/components/services.md deleted file mode 100644 index 182cef41..00000000 --- a/docs/models/components/services.md +++ /dev/null @@ -1,17 +0,0 @@ -# Services - -## Example Usage - -```typescript -import { Services } from "firehydrant-typescript-sdk/models/components"; - -let value: Services = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | ID of a service | \ No newline at end of file diff --git a/docs/models/components/servicetier.md b/docs/models/components/servicetier.md deleted file mode 100644 index 4320bf3b..00000000 --- a/docs/models/components/servicetier.md +++ /dev/null @@ -1,17 +0,0 @@ -# ServiceTier - -Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. - -## Example Usage - -```typescript -import { ServiceTier } from "firehydrant-typescript-sdk/models/components"; - -let value: ServiceTier = 4; -``` - -## Values - -```typescript -0 | 1 | 2 | 3 | 4 | 5 -``` \ No newline at end of file diff --git a/docs/models/components/servicewithalldependenciesentity.md b/docs/models/components/servicewithalldependenciesentity.md index 233476c2..f5d51022 100644 --- a/docs/models/components/servicewithalldependenciesentity.md +++ b/docs/models/components/servicewithalldependenciesentity.md @@ -5,7 +5,7 @@ ServiceWithAllDependenciesEntity model ## Example Usage ```typescript -import { ServiceWithAllDependenciesEntity } from "firehydrant-typescript-sdk/models/components"; +import { ServiceWithAllDependenciesEntity } from "firehydrant/models/components"; let value: ServiceWithAllDependenciesEntity = {}; ``` @@ -16,4 +16,4 @@ let value: ServiceWithAllDependenciesEntity = {}; | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `childServiceDependencies` | [components.ServiceChildDependencyEntity](../../models/components/servicechilddependencyentity.md)[] | :heavy_minus_sign: | Services that depend on this service | | `parentServiceDependencies` | [components.ServiceParentDependencyEntity](../../models/components/serviceparentdependencyentity.md)[] | :heavy_minus_sign: | Services that this service is dependent on | -| `serviceDependencies` | [components.ServiceDependencies](../../models/components/servicedependencies.md)[] | :heavy_minus_sign: | All dependencies. Can be one of: ServiceChildDependencyEntity, ServiceParentDependencyEntity | \ No newline at end of file +| `serviceDependencies` | [components.ServiceDependency](../../models/components/servicedependency.md)[] | :heavy_minus_sign: | All dependencies. Can be one of: ServiceChildDependencyEntity, ServiceParentDependencyEntity | \ No newline at end of file diff --git a/docs/models/components/severities.md b/docs/models/components/severities.md deleted file mode 100644 index c2fb4c40..00000000 --- a/docs/models/components/severities.md +++ /dev/null @@ -1,19 +0,0 @@ -# Severities - -## Example Usage - -```typescript -import { Severities } from "firehydrant-typescript-sdk/models/components"; - -let value: Severities = { - severitySlug: "", - remoteStatus: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `severitySlug` | *string* | :heavy_check_mark: | FireHydrant severity slug | -| `remoteStatus` | *string* | :heavy_check_mark: | Statuspage.io severity name | \ No newline at end of file diff --git a/docs/models/components/severityentity.md b/docs/models/components/severityentity.md index aca0908d..74c37eaf 100644 --- a/docs/models/components/severityentity.md +++ b/docs/models/components/severityentity.md @@ -5,7 +5,7 @@ SeverityEntity model ## Example Usage ```typescript -import { SeverityEntity } from "firehydrant-typescript-sdk/models/components"; +import { SeverityEntity } from "firehydrant/models/components"; let value: SeverityEntity = {}; ``` diff --git a/docs/models/components/severityentitypaginated.md b/docs/models/components/severityentitypaginated.md index 4c1b39e6..e67348dc 100644 --- a/docs/models/components/severityentitypaginated.md +++ b/docs/models/components/severityentitypaginated.md @@ -5,14 +5,14 @@ SeverityEntityPaginated model ## Example Usage ```typescript -import { SeverityEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { SeverityEntityPaginated } from "firehydrant/models/components"; let value: SeverityEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.SeverityEntity](../../models/components/severityentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.SeverityEntity](../../models/components/severityentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/severitymatrixconditionentity.md b/docs/models/components/severitymatrixconditionentity.md index 64a024ab..13655331 100644 --- a/docs/models/components/severitymatrixconditionentity.md +++ b/docs/models/components/severitymatrixconditionentity.md @@ -5,7 +5,7 @@ SeverityMatrix_ConditionEntity model ## Example Usage ```typescript -import { SeverityMatrixConditionEntity } from "firehydrant-typescript-sdk/models/components"; +import { SeverityMatrixConditionEntity } from "firehydrant/models/components"; let value: SeverityMatrixConditionEntity = {}; ``` diff --git a/docs/models/components/severitymatriximpactentity.md b/docs/models/components/severitymatriximpactentity.md index fd318993..af7afd80 100644 --- a/docs/models/components/severitymatriximpactentity.md +++ b/docs/models/components/severitymatriximpactentity.md @@ -5,7 +5,7 @@ SeverityMatrix_ImpactEntity model ## Example Usage ```typescript -import { SeverityMatrixImpactEntity } from "firehydrant-typescript-sdk/models/components"; +import { SeverityMatrixImpactEntity } from "firehydrant/models/components"; let value: SeverityMatrixImpactEntity = {}; ``` diff --git a/docs/models/components/severitymatrixitementity.md b/docs/models/components/severitymatrixitementity.md index 7c8bca4e..a4655512 100644 --- a/docs/models/components/severitymatrixitementity.md +++ b/docs/models/components/severitymatrixitementity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { SeverityMatrixItemEntity } from "firehydrant-typescript-sdk/models/components"; +import { SeverityMatrixItemEntity } from "firehydrant/models/components"; let value: SeverityMatrixItemEntity = {}; ``` diff --git a/docs/models/components/severitymatrixseveritymatrixentity.md b/docs/models/components/severitymatrixseveritymatrixentity.md index 64b42280..265ea5ae 100644 --- a/docs/models/components/severitymatrixseveritymatrixentity.md +++ b/docs/models/components/severitymatrixseveritymatrixentity.md @@ -5,7 +5,7 @@ SeverityMatrix_SeverityMatrixEntity model ## Example Usage ```typescript -import { SeverityMatrixSeverityMatrixEntity } from "firehydrant-typescript-sdk/models/components"; +import { SeverityMatrixSeverityMatrixEntity } from "firehydrant/models/components"; let value: SeverityMatrixSeverityMatrixEntity = {}; ``` diff --git a/docs/models/components/signal.md b/docs/models/components/signal.md new file mode 100644 index 00000000..e7bdc285 --- /dev/null +++ b/docs/models/components/signal.md @@ -0,0 +1,23 @@ +# Signal + +## Example Usage + +```typescript +import { Signal } from "firehydrant/models/components"; + +let value: Signal = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `organizationId` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `body` | *string* | :heavy_minus_sign: | N/A | +| `level` | *string* | :heavy_minus_sign: | N/A | +| `annotations` | [components.Annotations](../../models/components/annotations.md) | :heavy_minus_sign: | N/A | +| `tags` | *string*[] | :heavy_minus_sign: | N/A | +| `images` | [components.Image](../../models/components/image.md)[] | :heavy_minus_sign: | N/A | +| `links` | [components.DebugSignalsExpressionLink](../../models/components/debugsignalsexpressionlink.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/signals.md b/docs/models/components/signals.md deleted file mode 100644 index 61910390..00000000 --- a/docs/models/components/signals.md +++ /dev/null @@ -1,19 +0,0 @@ -# Signals - -## Example Usage - -```typescript -import { Signals } from "firehydrant-typescript-sdk/models/components"; - -let value: Signals = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `body` | *string* | :heavy_minus_sign: | N/A | -| `level` | *string* | :heavy_minus_sign: | N/A | -| `images` | [components.Images](../../models/components/images.md)[] | :heavy_minus_sign: | N/A | -| `links` | [components.PostV1SignalsDebuggerLinks](../../models/components/postv1signalsdebuggerlinks.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/signalsapiingestkeyentity.md b/docs/models/components/signalsapiingestkeyentity.md index 507f5543..2a1903b3 100644 --- a/docs/models/components/signalsapiingestkeyentity.md +++ b/docs/models/components/signalsapiingestkeyentity.md @@ -5,7 +5,7 @@ Signals_API_IngestKeyEntity model ## Example Usage ```typescript -import { SignalsAPIIngestKeyEntity } from "firehydrant-typescript-sdk/models/components"; +import { SignalsAPIIngestKeyEntity } from "firehydrant/models/components"; let value: SignalsAPIIngestKeyEntity = {}; ``` diff --git a/docs/models/components/signalsapiruleentity.md b/docs/models/components/signalsapiruleentity.md deleted file mode 100644 index a2f4623c..00000000 --- a/docs/models/components/signalsapiruleentity.md +++ /dev/null @@ -1,24 +0,0 @@ -# SignalsAPIRuleEntity - -## Example Usage - -```typescript -import { SignalsAPIRuleEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: SignalsAPIRuleEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `expression` | *string* | :heavy_minus_sign: | N/A | -| `teamId` | *string* | :heavy_minus_sign: | N/A | -| `target` | [components.SignalsAPITargetEntity](../../models/components/signalsapitargetentity.md) | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `incidentType` | [components.SuccinctEntity](../../models/components/succinctentity.md) | :heavy_minus_sign: | N/A | -| `notificationPriorityOverride` | [components.NotificationPriorityOverride](../../models/components/notificationpriorityoverride.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/signalsapitargetentity.md b/docs/models/components/signalsapitargetentity.md deleted file mode 100644 index 54e43fa7..00000000 --- a/docs/models/components/signalsapitargetentity.md +++ /dev/null @@ -1,18 +0,0 @@ -# SignalsAPITargetEntity - -## Example Usage - -```typescript -import { SignalsAPITargetEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: SignalsAPITargetEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `type` | *string* | :heavy_minus_sign: | N/A | -| `isPageable` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/signalsapitransposerlistentity.md b/docs/models/components/signalsapitransposerlistentity.md new file mode 100644 index 00000000..82edebd8 --- /dev/null +++ b/docs/models/components/signalsapitransposerlistentity.md @@ -0,0 +1,17 @@ +# SignalsAPITransposerListEntity + +Signals_API_TransposerListEntity model + +## Example Usage + +```typescript +import { SignalsAPITransposerListEntity } from "firehydrant/models/components"; + +let value: SignalsAPITransposerListEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `data` | [components.NullableSignalsAPITransposerEntity](../../models/components/nullablesignalsapitransposerentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/similarincidententitypaginated.md b/docs/models/components/similarincidententitypaginated.md new file mode 100644 index 00000000..46e46b9e --- /dev/null +++ b/docs/models/components/similarincidententitypaginated.md @@ -0,0 +1,18 @@ +# SimilarIncidentEntityPaginated + +SimilarIncidentEntityPaginated model + +## Example Usage + +```typescript +import { SimilarIncidentEntityPaginated } from "firehydrant/models/components"; + +let value: SimilarIncidentEntityPaginated = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `data` | [components.PublicApiv1SimilarIncidentEntity](../../models/components/publicapiv1similarincidententity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/slimrunbookentity.md b/docs/models/components/slimrunbookentity.md index 88b7582b..11ac5f82 100644 --- a/docs/models/components/slimrunbookentity.md +++ b/docs/models/components/slimrunbookentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { SlimRunbookEntity } from "firehydrant-typescript-sdk/models/components"; +import { SlimRunbookEntity } from "firehydrant/models/components"; let value: SlimRunbookEntity = {}; ``` @@ -19,6 +19,6 @@ let value: SlimRunbookEntity = {}; | `type` | *string* | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `attachmentRule` | [components.RulesRuleEntity](../../models/components/rulesruleentity.md) | :heavy_minus_sign: | N/A | -| `owner` | [components.TeamEntityLite](../../models/components/teamentitylite.md) | :heavy_minus_sign: | N/A | -| `categories` | *string* | :heavy_minus_sign: | categories the runbook applies to | \ No newline at end of file +| `attachmentRule` | [components.NullableRulesRuleEntity](../../models/components/nullablerulesruleentity.md) | :heavy_minus_sign: | N/A | +| `owner` | [components.NullableTeamEntityLite](../../models/components/nullableteamentitylite.md) | :heavy_minus_sign: | N/A | +| `categories` | *string*[] | :heavy_minus_sign: | categories the runbook applies to | \ No newline at end of file diff --git a/docs/models/components/startday.md b/docs/models/components/startday.md deleted file mode 100644 index 2bb4cf22..00000000 --- a/docs/models/components/startday.md +++ /dev/null @@ -1,17 +0,0 @@ -# StartDay - -The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - -## Example Usage - -```typescript -import { StartDay } from "firehydrant-typescript-sdk/models/components"; - -let value: StartDay = "thursday"; -``` - -## Values - -```typescript -"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" -``` \ No newline at end of file diff --git a/docs/models/components/state.md b/docs/models/components/state.md deleted file mode 100644 index 3f2f6432..00000000 --- a/docs/models/components/state.md +++ /dev/null @@ -1,15 +0,0 @@ -# State - -## Example Usage - -```typescript -import { State } from "firehydrant-typescript-sdk/models/components"; - -let value: State = "importing"; -``` - -## Values - -```typescript -"preprocessing" | "ready_for_import" | "importing" | "completed" -``` \ No newline at end of file diff --git a/docs/models/components/status.md b/docs/models/components/status.md deleted file mode 100644 index d2436eee..00000000 --- a/docs/models/components/status.md +++ /dev/null @@ -1,15 +0,0 @@ -# Status - -## Example Usage - -```typescript -import { Status } from "firehydrant-typescript-sdk/models/components"; - -let value: Status = "inactive"; -``` - -## Values - -```typescript -"active" | "inactive" -``` \ No newline at end of file diff --git a/docs/models/components/statuspageiocondition.md b/docs/models/components/statuspageiocondition.md index 1ffb4e7c..421a2b14 100644 --- a/docs/models/components/statuspageiocondition.md +++ b/docs/models/components/statuspageiocondition.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { StatuspageioCondition } from "firehydrant-typescript-sdk/models/components"; +import { StatuspageioCondition } from "firehydrant/models/components"; let value: StatuspageioCondition = "operational"; ``` diff --git a/docs/models/components/statuspages.md b/docs/models/components/statuspages.md deleted file mode 100644 index f320944d..00000000 --- a/docs/models/components/statuspages.md +++ /dev/null @@ -1,19 +0,0 @@ -# StatusPages - -## Example Usage - -```typescript -import { StatusPages } from "firehydrant-typescript-sdk/models/components"; - -let value: StatusPages = { - id: "", - integrationSlug: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `integrationSlug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/statusupdatetemplateentity.md b/docs/models/components/statusupdatetemplateentity.md index 76a5e98f..63d19fb0 100644 --- a/docs/models/components/statusupdatetemplateentity.md +++ b/docs/models/components/statusupdatetemplateentity.md @@ -5,7 +5,7 @@ StatusUpdateTemplateEntity model ## Example Usage ```typescript -import { StatusUpdateTemplateEntity } from "firehydrant-typescript-sdk/models/components"; +import { StatusUpdateTemplateEntity } from "firehydrant/models/components"; let value: StatusUpdateTemplateEntity = {}; ``` diff --git a/docs/models/components/stepelements.md b/docs/models/components/stepelements.md deleted file mode 100644 index b04823fb..00000000 --- a/docs/models/components/stepelements.md +++ /dev/null @@ -1,14 +0,0 @@ -# StepElements - -## Example Usage - -```typescript -import { StepElements } from "firehydrant-typescript-sdk/models/components"; - -let value: StepElements = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/steps.md b/docs/models/components/steps.md deleted file mode 100644 index 43c42f28..00000000 --- a/docs/models/components/steps.md +++ /dev/null @@ -1,20 +0,0 @@ -# Steps - -## Example Usage - -```typescript -import { Steps } from "firehydrant-typescript-sdk/models/components"; - -let value: Steps = { - name: "", - actionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | Name for step | -| `actionId` | *string* | :heavy_check_mark: | ID of action to use for this step. | -| `rule` | [components.Rule](../../models/components/rule.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/strategy.md b/docs/models/components/strategy.md deleted file mode 100644 index c8186506..00000000 --- a/docs/models/components/strategy.md +++ /dev/null @@ -1,22 +0,0 @@ -# Strategy - -An object that specifies how the schedule's on-call shifts should be generated. - -## Example Usage - -```typescript -import { Strategy } from "firehydrant-typescript-sdk/models/components"; - -let value: Strategy = { - type: "custom", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.PostV1TeamsTeamIdOnCallSchedulesType](../../models/components/postv1teamsteamidoncallschedulestype.md) | :heavy_check_mark: | The type of strategy. Must be one of "daily", "weekly", or "custom". | -| `handoffTime` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". | -| `handoffDay` | [components.HandoffDay](../../models/components/handoffday.md) | :heavy_minus_sign: | The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". | -| `shiftDuration` | *string* | :heavy_minus_sign: | An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". | \ No newline at end of file diff --git a/docs/models/components/strategyenum.md b/docs/models/components/strategyenum.md new file mode 100644 index 00000000..2a1336a5 --- /dev/null +++ b/docs/models/components/strategyenum.md @@ -0,0 +1,15 @@ +# StrategyEnum + +## Example Usage + +```typescript +import { StrategyEnum } from "firehydrant/models/components"; + +let value: StrategyEnum = "logic"; +``` + +## Values + +```typescript +"basic" | "logic" +``` \ No newline at end of file diff --git a/docs/models/components/succinctentity.md b/docs/models/components/succinctentity.md index f249934c..3c073d52 100644 --- a/docs/models/components/succinctentity.md +++ b/docs/models/components/succinctentity.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { SuccinctEntity } from "firehydrant-typescript-sdk/models/components"; +import { SuccinctEntity } from "firehydrant/models/components"; let value: SuccinctEntity = {}; ``` diff --git a/docs/models/components/tagentity.md b/docs/models/components/tagentity.md index ea749a9d..8bf8f57d 100644 --- a/docs/models/components/tagentity.md +++ b/docs/models/components/tagentity.md @@ -5,7 +5,7 @@ TagEntity model ## Example Usage ```typescript -import { TagEntity } from "firehydrant-typescript-sdk/models/components"; +import { TagEntity } from "firehydrant/models/components"; let value: TagEntity = {}; ``` diff --git a/docs/models/components/tagentitypaginated.md b/docs/models/components/tagentitypaginated.md index ce0b417e..6164f03d 100644 --- a/docs/models/components/tagentitypaginated.md +++ b/docs/models/components/tagentitypaginated.md @@ -5,14 +5,14 @@ TagEntityPaginated model ## Example Usage ```typescript -import { TagEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { TagEntityPaginated } from "firehydrant/models/components"; let value: TagEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.TagEntity](../../models/components/tagentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.TagEntity](../../models/components/tagentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/target.md b/docs/models/components/target.md deleted file mode 100644 index 21419751..00000000 --- a/docs/models/components/target.md +++ /dev/null @@ -1,25 +0,0 @@ -# Target - -The target that the email target will notify. This object must contain a `type` -field that specifies the type of target and an `id` field that specifies the ID of -the target. The `type` field must be one of "escalation_policy", "on_call_schedule", -"team", "user", or "slack_channel". - - -## Example Usage - -```typescript -import { Target } from "firehydrant-typescript-sdk/models/components"; - -let value: Target = { - type: "OnCallSchedule", - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `type` | [components.PostV1SignalsEmailTargetsType](../../models/components/postv1signalsemailtargetstype.md) | :heavy_check_mark: | The type of target that the inbound email will notify when matched. | -| `id` | *string* | :heavy_check_mark: | The ID of the target that the inbound email will notify when matched. | \ No newline at end of file diff --git a/docs/models/components/targets.md b/docs/models/components/targets.md deleted file mode 100644 index 705e374c..00000000 --- a/docs/models/components/targets.md +++ /dev/null @@ -1,19 +0,0 @@ -# Targets - -## Example Usage - -```typescript -import { Targets } from "firehydrant-typescript-sdk/models/components"; - -let value: Targets = { - type: "EntireTeam", - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `type` | [components.PostV1TeamsTeamIdEscalationPoliciesType](../../models/components/postv1teamsteamidescalationpoliciestype.md) | :heavy_check_mark: | The type of target that the step will notify. | -| `id` | *string* | :heavy_check_mark: | The ID of the target that the step will notify. | \ No newline at end of file diff --git a/docs/models/components/targettype.md b/docs/models/components/targettype.md deleted file mode 100644 index 90c537b1..00000000 --- a/docs/models/components/targettype.md +++ /dev/null @@ -1,17 +0,0 @@ -# TargetType - -The type of target that the rule will notify when matched. - -## Example Usage - -```typescript -import { TargetType } from "firehydrant-typescript-sdk/models/components"; - -let value: TargetType = "User"; -``` - -## Values - -```typescript -"EscalationPolicy" | "OnCallSchedule" | "User" | "Webhook" -``` \ No newline at end of file diff --git a/docs/models/components/taskentity.md b/docs/models/components/taskentity.md index 381cf7c7..5da2e6b6 100644 --- a/docs/models/components/taskentity.md +++ b/docs/models/components/taskentity.md @@ -5,7 +5,7 @@ TaskEntity model ## Example Usage ```typescript -import { TaskEntity } from "firehydrant-typescript-sdk/models/components"; +import { TaskEntity } from "firehydrant/models/components"; let value: TaskEntity = {}; ``` @@ -18,8 +18,8 @@ let value: TaskEntity = {}; | `title` | *string* | :heavy_minus_sign: | N/A | | `description` | *string* | :heavy_minus_sign: | N/A | | `state` | *string* | :heavy_minus_sign: | N/A | -| `assignee` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | +| `assignee` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `dueAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/taskentitypaginated.md b/docs/models/components/taskentitypaginated.md index ef44f9d2..9a510cc0 100644 --- a/docs/models/components/taskentitypaginated.md +++ b/docs/models/components/taskentitypaginated.md @@ -5,14 +5,14 @@ TaskEntityPaginated model ## Example Usage ```typescript -import { TaskEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { TaskEntityPaginated } from "firehydrant/models/components"; let value: TaskEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.TaskEntity](../../models/components/taskentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.TaskEntity](../../models/components/taskentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/tasklistentity.md b/docs/models/components/tasklistentity.md index 75d4a536..8a3e0580 100644 --- a/docs/models/components/tasklistentity.md +++ b/docs/models/components/tasklistentity.md @@ -5,19 +5,19 @@ TaskListEntity model ## Example Usage ```typescript -import { TaskListEntity } from "firehydrant-typescript-sdk/models/components"; +import { TaskListEntity } from "firehydrant/models/components"; let value: TaskListEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `taskListItems` | [components.TaskListItemEntity](../../models/components/tasklistitementity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `taskListItems` | [components.NullableTaskListItemEntity](../../models/components/nullabletasklistitementity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/tasklistitementity.md b/docs/models/components/tasklistitementity.md deleted file mode 100644 index 6413112a..00000000 --- a/docs/models/components/tasklistitementity.md +++ /dev/null @@ -1,16 +0,0 @@ -# TaskListItemEntity - -## Example Usage - -```typescript -import { TaskListItemEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: TaskListItemEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `summary` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/tasklistitems.md b/docs/models/components/tasklistitems.md deleted file mode 100644 index 8c856829..00000000 --- a/docs/models/components/tasklistitems.md +++ /dev/null @@ -1,18 +0,0 @@ -# TaskListItems - -## Example Usage - -```typescript -import { TaskListItems } from "firehydrant-typescript-sdk/models/components"; - -let value: TaskListItems = { - summary: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `summary` | *string* | :heavy_check_mark: | A summary of the task | -| `description` | *string* | :heavy_minus_sign: | A long-form description for the task if additional context is helpful | \ No newline at end of file diff --git a/docs/models/components/teamentity.md b/docs/models/components/teamentity.md index 8a9bc712..c8d3a6e5 100644 --- a/docs/models/components/teamentity.md +++ b/docs/models/components/teamentity.md @@ -5,31 +5,31 @@ TeamEntity model ## Example Usage ```typescript -import { TeamEntity } from "firehydrant-typescript-sdk/models/components"; +import { TeamEntity } from "firehydrant/models/components"; let value: TeamEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `signalsIcalUrl` | *string* | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `inSupportHours` | *boolean* | :heavy_minus_sign: | N/A | -| `slackChannel` | [components.IntegrationsSlackSlackChannelEntity](../../models/components/integrationsslackslackchannelentity.md) | :heavy_minus_sign: | N/A | -| `msTeamsChannel` | [components.IntegrationsMicrosoftTeamsV2ChannelEntity](../../models/components/integrationsmicrosoftteamsv2channelentity.md) | :heavy_minus_sign: | N/A | -| `memberships` | [components.MembershipEntity](../../models/components/membershipentity.md)[] | :heavy_minus_sign: | N/A | -| `ownedChecklistTemplates` | [components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)[] | :heavy_minus_sign: | N/A | -| `ownedFunctionalities` | [components.FunctionalityEntityLite](../../models/components/functionalityentitylite.md)[] | :heavy_minus_sign: | N/A | -| `ownedServices` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | -| `ownedRunbooks` | [components.SlimRunbookEntity](../../models/components/slimrunbookentity.md)[] | :heavy_minus_sign: | N/A | -| `respondingServices` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | -| `services` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | -| `functionalities` | [components.FunctionalityEntityLite](../../models/components/functionalityentitylite.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `signalsIcalUrl` | *string* | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `inSupportHours` | *boolean* | :heavy_minus_sign: | N/A | +| `slackChannel` | [components.NullableIntegrationsSlackSlackChannelEntity](../../models/components/nullableintegrationsslackslackchannelentity.md) | :heavy_minus_sign: | N/A | +| `msTeamsChannel` | [components.NullableIntegrationsMicrosoftTeamsV2ChannelEntity](../../models/components/nullableintegrationsmicrosoftteamsv2channelentity.md) | :heavy_minus_sign: | N/A | +| `memberships` | [components.MembershipEntity](../../models/components/membershipentity.md)[] | :heavy_minus_sign: | N/A | +| `ownedChecklistTemplates` | [components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)[] | :heavy_minus_sign: | N/A | +| `ownedFunctionalities` | [components.FunctionalityEntityLite](../../models/components/functionalityentitylite.md)[] | :heavy_minus_sign: | N/A | +| `ownedServices` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | +| `ownedRunbooks` | [components.SlimRunbookEntity](../../models/components/slimrunbookentity.md)[] | :heavy_minus_sign: | N/A | +| `respondingServices` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | +| `services` | [components.ServiceEntityLite](../../models/components/serviceentitylite.md)[] | :heavy_minus_sign: | N/A | +| `functionalities` | [components.FunctionalityEntityLite](../../models/components/functionalityentitylite.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/teamentitylite.md b/docs/models/components/teamentitylite.md index b31e96b7..0f4c5df7 100644 --- a/docs/models/components/teamentitylite.md +++ b/docs/models/components/teamentitylite.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { TeamEntityLite } from "firehydrant-typescript-sdk/models/components"; +import { TeamEntityLite } from "firehydrant/models/components"; let value: TeamEntityLite = {}; ``` @@ -19,5 +19,5 @@ let value: TeamEntityLite = {}; | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `signalsIcalUrl` | *string* | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | `inSupportHours` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/teamentitypaginated.md b/docs/models/components/teamentitypaginated.md index ad83be65..dd32593b 100644 --- a/docs/models/components/teamentitypaginated.md +++ b/docs/models/components/teamentitypaginated.md @@ -5,14 +5,14 @@ TeamEntityPaginated model ## Example Usage ```typescript -import { TeamEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { TeamEntityPaginated } from "firehydrant/models/components"; let value: TeamEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.TeamEntity](../../models/components/teamentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.TeamEntity](../../models/components/teamentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/teams.md b/docs/models/components/teams.md deleted file mode 100644 index 803f11bd..00000000 --- a/docs/models/components/teams.md +++ /dev/null @@ -1,17 +0,0 @@ -# Teams - -## Example Usage - -```typescript -import { Teams } from "firehydrant-typescript-sdk/models/components"; - -let value: Teams = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/template.md b/docs/models/components/template.md deleted file mode 100644 index a9f0b432..00000000 --- a/docs/models/components/template.md +++ /dev/null @@ -1,24 +0,0 @@ -# Template - -## Example Usage - -```typescript -import { Template } from "firehydrant-typescript-sdk/models/components"; - -let value: Template = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | -| `labels` | Record | :heavy_minus_sign: | A labels hash of keys and values | -| `severity` | *string* | :heavy_minus_sign: | N/A | -| `priority` | *string* | :heavy_minus_sign: | N/A | -| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | -| `runbookIds` | *string*[] | :heavy_minus_sign: | List of ids of Runbooks to attach to incidents created from this type | -| `privateIncident` | *boolean* | :heavy_minus_sign: | N/A | -| `teamIds` | *string*[] | :heavy_minus_sign: | List of ids of teams to be assigned to incidents | -| `impacts` | [components.PostV1IncidentTypesImpacts](../../models/components/postv1incidenttypesimpacts.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/ticketingfieldmapsmappablefieldentity.md b/docs/models/components/ticketingfieldmapsmappablefieldentity.md index 91bced7a..90292613 100644 --- a/docs/models/components/ticketingfieldmapsmappablefieldentity.md +++ b/docs/models/components/ticketingfieldmapsmappablefieldentity.md @@ -5,7 +5,7 @@ Ticketing_FieldMaps_MappableFieldEntity model ## Example Usage ```typescript -import { TicketingFieldMapsMappableFieldEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingFieldMapsMappableFieldEntity } from "firehydrant/models/components"; let value: TicketingFieldMapsMappableFieldEntity = {}; ``` @@ -17,5 +17,5 @@ let value: TicketingFieldMapsMappableFieldEntity = {}; | `value` | *string* | :heavy_minus_sign: | The ID of the field | | `label` | *string* | :heavy_minus_sign: | The human-readable name of the field | | `type` | *string* | :heavy_minus_sign: | The allowed type of the field | -| `allowedValues` | *string* | :heavy_minus_sign: | The allowed values of the field | +| `allowedValues` | *string*[] | :heavy_minus_sign: | The allowed values of the field | | `required` | *string* | :heavy_minus_sign: | If the field is required to be mapped | \ No newline at end of file diff --git a/docs/models/components/ticketingpriorityentity.md b/docs/models/components/ticketingpriorityentity.md index 50d548e6..df562024 100644 --- a/docs/models/components/ticketingpriorityentity.md +++ b/docs/models/components/ticketingpriorityentity.md @@ -5,7 +5,7 @@ Ticketing_PriorityEntity model ## Example Usage ```typescript -import { TicketingPriorityEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingPriorityEntity } from "firehydrant/models/components"; let value: TicketingPriorityEntity = {}; ``` diff --git a/docs/models/components/ticketingprojectconfigentity.md b/docs/models/components/ticketingprojectconfigentity.md index 78feea41..55e5d284 100644 --- a/docs/models/components/ticketingprojectconfigentity.md +++ b/docs/models/components/ticketingprojectconfigentity.md @@ -5,7 +5,7 @@ Ticketing_ProjectConfigEntity model ## Example Usage ```typescript -import { TicketingProjectConfigEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingProjectConfigEntity } from "firehydrant/models/components"; let value: TicketingProjectConfigEntity = {}; ``` diff --git a/docs/models/components/ticketingprojectconfigentitydetails.md b/docs/models/components/ticketingprojectconfigentitydetails.md index 43b9d706..3d83ad31 100644 --- a/docs/models/components/ticketingprojectconfigentitydetails.md +++ b/docs/models/components/ticketingprojectconfigentitydetails.md @@ -5,7 +5,7 @@ A config object containing details about the project config. Can be one of: Tick ## Example Usage ```typescript -import { TicketingProjectConfigEntityDetails } from "firehydrant-typescript-sdk/models/components"; +import { TicketingProjectConfigEntityDetails } from "firehydrant/models/components"; let value: TicketingProjectConfigEntityDetails = {}; ``` diff --git a/docs/models/components/ticketingprojectfieldmapbodyentity.md b/docs/models/components/ticketingprojectfieldmapbodyentity.md index 0371e7da..b0079f1c 100644 --- a/docs/models/components/ticketingprojectfieldmapbodyentity.md +++ b/docs/models/components/ticketingprojectfieldmapbodyentity.md @@ -3,18 +3,18 @@ ## Example Usage ```typescript -import { TicketingProjectFieldMapBodyEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingProjectFieldMapBodyEntity } from "firehydrant/models/components"; let value: TicketingProjectFieldMapBodyEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `strategy` | [components.TicketingProjectFieldMapBodyEntityStrategy](../../models/components/ticketingprojectfieldmapbodyentitystrategy.md) | :heavy_minus_sign: | N/A | -| `externalField` | *string* | :heavy_minus_sign: | N/A | -| `externalValue` | [components.TicketingProjectFieldMapExternalValueEntity](../../models/components/ticketingprojectfieldmapexternalvalueentity.md) | :heavy_minus_sign: | N/A | -| `userData` | [components.UserData](../../models/components/userdata.md) | :heavy_minus_sign: | N/A | -| `cases` | [components.TicketingProjectFieldMapCasesEntity](../../models/components/ticketingprojectfieldmapcasesentity.md)[] | :heavy_minus_sign: | N/A | -| `else` | [components.TicketingProjectFieldMapCasesElseEntity](../../models/components/ticketingprojectfieldmapcaseselseentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `strategy` | [components.StrategyEnum](../../models/components/strategyenum.md) | :heavy_minus_sign: | N/A | +| `externalField` | *string* | :heavy_minus_sign: | N/A | +| `externalValue` | [components.NullableTicketingProjectFieldMapExternalValueEntity](../../models/components/nullableticketingprojectfieldmapexternalvalueentity.md) | :heavy_minus_sign: | N/A | +| `userData` | [components.UserData](../../models/components/userdata.md) | :heavy_minus_sign: | N/A | +| `cases` | [components.TicketingProjectFieldMapCasesEntity](../../models/components/ticketingprojectfieldmapcasesentity.md)[] | :heavy_minus_sign: | N/A | +| `else` | [components.NullableTicketingProjectFieldMapCasesElseEntity](../../models/components/nullableticketingprojectfieldmapcaseselseentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ticketingprojectfieldmapbodyentitystrategy.md b/docs/models/components/ticketingprojectfieldmapbodyentitystrategy.md deleted file mode 100644 index f53114ac..00000000 --- a/docs/models/components/ticketingprojectfieldmapbodyentitystrategy.md +++ /dev/null @@ -1,15 +0,0 @@ -# TicketingProjectFieldMapBodyEntityStrategy - -## Example Usage - -```typescript -import { TicketingProjectFieldMapBodyEntityStrategy } from "firehydrant-typescript-sdk/models/components"; - -let value: TicketingProjectFieldMapBodyEntityStrategy = "basic"; -``` - -## Values - -```typescript -"basic" | "logic" -``` \ No newline at end of file diff --git a/docs/models/components/ticketingprojectfieldmapcaseselseentity.md b/docs/models/components/ticketingprojectfieldmapcaseselseentity.md deleted file mode 100644 index e4e4c6ad..00000000 --- a/docs/models/components/ticketingprojectfieldmapcaseselseentity.md +++ /dev/null @@ -1,15 +0,0 @@ -# TicketingProjectFieldMapCasesElseEntity - -## Example Usage - -```typescript -import { TicketingProjectFieldMapCasesElseEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: TicketingProjectFieldMapCasesElseEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `externalValue` | [components.TicketingProjectFieldMapExternalValueEntity](../../models/components/ticketingprojectfieldmapexternalvalueentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ticketingprojectfieldmapcasesentity.md b/docs/models/components/ticketingprojectfieldmapcasesentity.md index a761782e..70ea7dc7 100644 --- a/docs/models/components/ticketingprojectfieldmapcasesentity.md +++ b/docs/models/components/ticketingprojectfieldmapcasesentity.md @@ -3,14 +3,14 @@ ## Example Usage ```typescript -import { TicketingProjectFieldMapCasesEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingProjectFieldMapCasesEntity } from "firehydrant/models/components"; let value: TicketingProjectFieldMapCasesEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `logic` | [components.TicketingProjectFieldMapCasesEntityLogic](../../models/components/ticketingprojectfieldmapcasesentitylogic.md) | :heavy_minus_sign: | An unstructured object of key/value pairs describing the logic for applying the rule. | -| `externalValue` | [components.TicketingProjectFieldMapExternalValueEntity](../../models/components/ticketingprojectfieldmapexternalvalueentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `logic` | [components.TicketingProjectFieldMapCasesEntityLogic](../../models/components/ticketingprojectfieldmapcasesentitylogic.md) | :heavy_minus_sign: | An unstructured object of key/value pairs describing the logic for applying the rule. | +| `externalValue` | [components.NullableTicketingProjectFieldMapExternalValueEntity](../../models/components/nullableticketingprojectfieldmapexternalvalueentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ticketingprojectfieldmapcasesentitylogic.md b/docs/models/components/ticketingprojectfieldmapcasesentitylogic.md index e174977b..3f61fa87 100644 --- a/docs/models/components/ticketingprojectfieldmapcasesentitylogic.md +++ b/docs/models/components/ticketingprojectfieldmapcasesentitylogic.md @@ -5,7 +5,7 @@ An unstructured object of key/value pairs describing the logic for applying the ## Example Usage ```typescript -import { TicketingProjectFieldMapCasesEntityLogic } from "firehydrant-typescript-sdk/models/components"; +import { TicketingProjectFieldMapCasesEntityLogic } from "firehydrant/models/components"; let value: TicketingProjectFieldMapCasesEntityLogic = {}; ``` diff --git a/docs/models/components/ticketingprojectfieldmapentity.md b/docs/models/components/ticketingprojectfieldmapentity.md index 6f415ea0..2063d95c 100644 --- a/docs/models/components/ticketingprojectfieldmapentity.md +++ b/docs/models/components/ticketingprojectfieldmapentity.md @@ -5,7 +5,7 @@ Ticketing_ProjectFieldMapEntity model ## Example Usage ```typescript -import { TicketingProjectFieldMapEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingProjectFieldMapEntity } from "firehydrant/models/components"; let value: TicketingProjectFieldMapEntity = {}; ``` diff --git a/docs/models/components/ticketingprojectfieldmapexternalvalueentity.md b/docs/models/components/ticketingprojectfieldmapexternalvalueentity.md deleted file mode 100644 index 51e66fcf..00000000 --- a/docs/models/components/ticketingprojectfieldmapexternalvalueentity.md +++ /dev/null @@ -1,18 +0,0 @@ -# TicketingProjectFieldMapExternalValueEntity - -## Example Usage - -```typescript -import { TicketingProjectFieldMapExternalValueEntity } from "firehydrant-typescript-sdk/models/components"; - -let value: TicketingProjectFieldMapExternalValueEntity = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | [components.TicketingProjectFieldMapExternalValueEntityType](../../models/components/ticketingprojectfieldmapexternalvalueentitytype.md) | :heavy_minus_sign: | N/A | -| `value` | *string* | :heavy_minus_sign: | N/A | -| `attribute` | *string* | :heavy_minus_sign: | N/A | -| `presentation` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ticketingprojectfieldmapexternalvalueentitytype.md b/docs/models/components/ticketingprojectfieldmapexternalvalueentitytype.md deleted file mode 100644 index 73806e11..00000000 --- a/docs/models/components/ticketingprojectfieldmapexternalvalueentitytype.md +++ /dev/null @@ -1,15 +0,0 @@ -# TicketingProjectFieldMapExternalValueEntityType - -## Example Usage - -```typescript -import { TicketingProjectFieldMapExternalValueEntityType } from "firehydrant-typescript-sdk/models/components"; - -let value: TicketingProjectFieldMapExternalValueEntityType = "fh-type"; -``` - -## Values - -```typescript -"literal" | "fh-attribute" | "fh-type" -``` \ No newline at end of file diff --git a/docs/models/components/ticketingprojectinboundfieldmapentity.md b/docs/models/components/ticketingprojectinboundfieldmapentity.md new file mode 100644 index 00000000..26cec560 --- /dev/null +++ b/docs/models/components/ticketingprojectinboundfieldmapentity.md @@ -0,0 +1,23 @@ +# TicketingProjectInboundFieldMapEntity + +Ticketing_ProjectInboundFieldMapEntity model + +## Example Usage + +```typescript +import { TicketingProjectInboundFieldMapEntity } from "firehydrant/models/components"; + +let value: TicketingProjectInboundFieldMapEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `connectionId` | *string* | :heavy_minus_sign: | N/A | +| `connectionType` | *string* | :heavy_minus_sign: | N/A | +| `ticketingProjectId` | *string* | :heavy_minus_sign: | N/A | +| `externalFieldName` | *string* | :heavy_minus_sign: | N/A | +| `internalFieldName` | *string* | :heavy_minus_sign: | N/A | +| `ticketType` | [components.TicketType](../../models/components/tickettype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ticketingprojectinboundmappablefieldentity.md b/docs/models/components/ticketingprojectinboundmappablefieldentity.md new file mode 100644 index 00000000..819cf2bc --- /dev/null +++ b/docs/models/components/ticketingprojectinboundmappablefieldentity.md @@ -0,0 +1,18 @@ +# TicketingProjectInboundMappableFieldEntity + +Ticketing_ProjectInboundMappableFieldEntity model + +## Example Usage + +```typescript +import { TicketingProjectInboundMappableFieldEntity } from "firehydrant/models/components"; + +let value: TicketingProjectInboundMappableFieldEntity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `value` | *string* | :heavy_minus_sign: | The ID of the field | +| `label` | *string* | :heavy_minus_sign: | The human-readable name of the field | \ No newline at end of file diff --git a/docs/models/components/ticketingprojectsprojectlistitementity.md b/docs/models/components/ticketingprojectsprojectlistitementity.md index 75f59150..5f2d53f3 100644 --- a/docs/models/components/ticketingprojectsprojectlistitementity.md +++ b/docs/models/components/ticketingprojectsprojectlistitementity.md @@ -5,18 +5,18 @@ Ticketing_Projects_ProjectListItemEntity model ## Example Usage ```typescript -import { TicketingProjectsProjectListItemEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingProjectsProjectListItemEntity } from "firehydrant/models/components"; let value: TicketingProjectsProjectListItemEntity = {}; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `config` | [components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md) | :heavy_minus_sign: | Ticketing_ProjectConfigEntity model | -| `fieldMap` | [components.TicketingProjectFieldMapEntity](../../models/components/ticketingprojectfieldmapentity.md) | :heavy_minus_sign: | Ticketing_ProjectFieldMapEntity model | -| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `connectionSlug` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `config` | [components.NullableTicketingProjectConfigEntity](../../models/components/nullableticketingprojectconfigentity.md) | :heavy_minus_sign: | N/A | +| `fieldMap` | [components.NullableTicketingProjectFieldMapEntity](../../models/components/nullableticketingprojectfieldmapentity.md) | :heavy_minus_sign: | N/A | +| `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `connectionSlug` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ticketingticketentity.md b/docs/models/components/ticketingticketentity.md index 51fbc382..801f7626 100644 --- a/docs/models/components/ticketingticketentity.md +++ b/docs/models/components/ticketingticketentity.md @@ -5,7 +5,7 @@ Ticketing_TicketEntity model ## Example Usage ```typescript -import { TicketingTicketEntity } from "firehydrant-typescript-sdk/models/components"; +import { TicketingTicketEntity } from "firehydrant/models/components"; let value: TicketingTicketEntity = {}; ``` @@ -20,9 +20,9 @@ let value: TicketingTicketEntity = {}; | `state` | [components.TicketingTicketEntityState](../../models/components/ticketingticketentitystate.md) | :heavy_minus_sign: | N/A | | `type` | [components.TicketingTicketEntityType](../../models/components/ticketingticketentitytype.md) | :heavy_minus_sign: | N/A | | `assignees` | [components.AuthorEntity](../../models/components/authorentity.md)[] | :heavy_minus_sign: | N/A | -| `priority` | [components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md) | :heavy_minus_sign: | Ticketing_PriorityEntity model | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | -| `attachments` | [components.TicketingTicketEntityAttachments](../../models/components/ticketingticketentityattachments.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | +| `priority` | [components.NullableTicketingPriorityEntity](../../models/components/nullableticketingpriorityentity.md) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | +| `attachments` | [components.TicketingTicketEntityAttachment](../../models/components/ticketingticketentityattachment.md)[] | :heavy_minus_sign: | A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `tagList` | *string*[] | :heavy_minus_sign: | N/A | @@ -31,4 +31,4 @@ let value: TicketingTicketEntity = {}; | `incidentCurrentMilestone` | *string* | :heavy_minus_sign: | Milestone of incident that this ticket is related to | | `taskId` | *string* | :heavy_minus_sign: | ID of task that this ticket is related to | | `dueAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `link` | [components.AttachmentsLinkEntity](../../models/components/attachmentslinkentity.md) | :heavy_minus_sign: | Attachments_LinkEntity model | \ No newline at end of file +| `link` | [components.NullableAttachmentsLinkEntity](../../models/components/nullableattachmentslinkentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/ticketingticketentityattachment.md b/docs/models/components/ticketingticketentityattachment.md new file mode 100644 index 00000000..92b3d654 --- /dev/null +++ b/docs/models/components/ticketingticketentityattachment.md @@ -0,0 +1,14 @@ +# TicketingTicketEntityAttachment + +## Example Usage + +```typescript +import { TicketingTicketEntityAttachment } from "firehydrant/models/components"; + +let value: TicketingTicketEntityAttachment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/ticketingticketentityattachments.md b/docs/models/components/ticketingticketentityattachments.md deleted file mode 100644 index 8fe3a2ce..00000000 --- a/docs/models/components/ticketingticketentityattachments.md +++ /dev/null @@ -1,14 +0,0 @@ -# TicketingTicketEntityAttachments - -## Example Usage - -```typescript -import { TicketingTicketEntityAttachments } from "firehydrant-typescript-sdk/models/components"; - -let value: TicketingTicketEntityAttachments = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/ticketingticketentitystate.md b/docs/models/components/ticketingticketentitystate.md index 0e98ba04..ef114910 100644 --- a/docs/models/components/ticketingticketentitystate.md +++ b/docs/models/components/ticketingticketentitystate.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { TicketingTicketEntityState } from "firehydrant-typescript-sdk/models/components"; +import { TicketingTicketEntityState } from "firehydrant/models/components"; let value: TicketingTicketEntityState = "cancelled"; ``` diff --git a/docs/models/components/ticketingticketentitytype.md b/docs/models/components/ticketingticketentitytype.md index 81a26d4e..a6fd09c2 100644 --- a/docs/models/components/ticketingticketentitytype.md +++ b/docs/models/components/ticketingticketentitytype.md @@ -3,9 +3,9 @@ ## Example Usage ```typescript -import { TicketingTicketEntityType } from "firehydrant-typescript-sdk/models/components"; +import { TicketingTicketEntityType } from "firehydrant/models/components"; -let value: TicketingTicketEntityType = "task"; +let value: TicketingTicketEntityType = "follow_up"; ``` ## Values diff --git a/docs/models/components/tickettype.md b/docs/models/components/tickettype.md new file mode 100644 index 00000000..56ff6e64 --- /dev/null +++ b/docs/models/components/tickettype.md @@ -0,0 +1,15 @@ +# TicketType + +## Example Usage + +```typescript +import { TicketType } from "firehydrant/models/components"; + +let value: TicketType = "task"; +``` + +## Values + +```typescript +"incident" | "task" | "follow_up" +``` \ No newline at end of file diff --git a/docs/models/components/tier.md b/docs/models/components/tier.md index 5244ad1f..6493eb18 100644 --- a/docs/models/components/tier.md +++ b/docs/models/components/tier.md @@ -3,9 +3,9 @@ ## Example Usage ```typescript -import { Tier } from "firehydrant-typescript-sdk/models/components"; +import { Tier } from "firehydrant/models/components"; -let value: Tier = "enterprise"; +let value: Tier = "essentials"; ``` ## Values diff --git a/docs/models/components/type.md b/docs/models/components/type.md deleted file mode 100644 index 4ff9cc21..00000000 --- a/docs/models/components/type.md +++ /dev/null @@ -1,15 +0,0 @@ -# Type - -## Example Usage - -```typescript -import { Type } from "firehydrant-typescript-sdk/models/components"; - -let value: Type = "service"; -``` - -## Values - -```typescript -"environment" | "functionality" | "service" -``` \ No newline at end of file diff --git a/docs/models/components/updateawscloudtrailbatch.md b/docs/models/components/updateawscloudtrailbatch.md new file mode 100644 index 00000000..0be9c1ad --- /dev/null +++ b/docs/models/components/updateawscloudtrailbatch.md @@ -0,0 +1,20 @@ +# UpdateAwsCloudtrailBatch + +Update a CloudTrail batch with new information. + +## Example Usage + +```typescript +import { UpdateAwsCloudtrailBatch } from "firehydrant/models/components"; + +let value: UpdateAwsCloudtrailBatch = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `eventsCreated` | *number* | :heavy_minus_sign: | N/A | +| `status` | *string* | :heavy_minus_sign: | N/A | +| `error` | *string* | :heavy_minus_sign: | N/A | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateawsconnection.md b/docs/models/components/updateawsconnection.md new file mode 100644 index 00000000..bcc26529 --- /dev/null +++ b/docs/models/components/updateawsconnection.md @@ -0,0 +1,19 @@ +# UpdateAwsConnection + +Update the AWS connection with the provided data. + +## Example Usage + +```typescript +import { UpdateAwsConnection } from "firehydrant/models/components"; + +let value: UpdateAwsConnection = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `awsAccountId` | *string* | :heavy_minus_sign: | N/A | +| `targetArn` | *string* | :heavy_minus_sign: | N/A | +| `connectionStatus` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatechange.md b/docs/models/components/updatechange.md new file mode 100644 index 00000000..f85cca8d --- /dev/null +++ b/docs/models/components/updatechange.md @@ -0,0 +1,19 @@ +# UpdateChange + +Update a change entry + +## Example Usage + +```typescript +import { UpdateChange } from "firehydrant/models/components"; + +let value: UpdateChange = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatechangeevent.md b/docs/models/components/updatechangeevent.md new file mode 100644 index 00000000..98d19f54 --- /dev/null +++ b/docs/models/components/updatechangeevent.md @@ -0,0 +1,24 @@ +# UpdateChangeEvent + +Update a change event + +## Example Usage + +```typescript +import { UpdateChangeEvent } from "firehydrant/models/components"; + +let value: UpdateChangeEvent = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | N/A | +| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `environments` | *string*[] | :heavy_minus_sign: | An array of environment IDs (setting this will overwrite the current environments) | +| `services` | *string*[] | :heavy_minus_sign: | An array of service IDs (setting this will overwrite the current services) | +| `attachments` | [components.UpdateChangeEventAttachment](../../models/components/updatechangeeventattachment.md)[] | :heavy_minus_sign: | JSON objects representing attachments, see attachments documentation for the schema | \ No newline at end of file diff --git a/docs/models/components/updatechangeeventattachment.md b/docs/models/components/updatechangeeventattachment.md new file mode 100644 index 00000000..a105c0e1 --- /dev/null +++ b/docs/models/components/updatechangeeventattachment.md @@ -0,0 +1,17 @@ +# UpdateChangeEventAttachment + +## Example Usage + +```typescript +import { UpdateChangeEventAttachment } from "firehydrant/models/components"; + +let value: UpdateChangeEventAttachment = { + type: "link", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `type` | [components.UpdateChangeEventType](../../models/components/updatechangeeventtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatechangeeventtype.md b/docs/models/components/updatechangeeventtype.md new file mode 100644 index 00000000..9397828d --- /dev/null +++ b/docs/models/components/updatechangeeventtype.md @@ -0,0 +1,15 @@ +# UpdateChangeEventType + +## Example Usage + +```typescript +import { UpdateChangeEventType } from "firehydrant/models/components"; + +let value: UpdateChangeEventType = "link"; +``` + +## Values + +```typescript +"link" +``` \ No newline at end of file diff --git a/docs/models/components/updatechangeidentity.md b/docs/models/components/updatechangeidentity.md new file mode 100644 index 00000000..85074df1 --- /dev/null +++ b/docs/models/components/updatechangeidentity.md @@ -0,0 +1,21 @@ +# UpdateChangeIdentity + +Update an identity for the change entry + +## Example Usage + +```typescript +import { UpdateChangeIdentity } from "firehydrant/models/components"; + +let value: UpdateChangeIdentity = { + type: "", + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `type` | *string* | :heavy_check_mark: | N/A | +| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatechecklisttemplate.md b/docs/models/components/updatechecklisttemplate.md new file mode 100644 index 00000000..f712a30b --- /dev/null +++ b/docs/models/components/updatechecklisttemplate.md @@ -0,0 +1,22 @@ +# UpdateChecklistTemplate + +Update a checklist templates attributes + +## Example Usage + +```typescript +import { UpdateChecklistTemplate } from "firehydrant/models/components"; + +let value: UpdateChecklistTemplate = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `checks` | [components.UpdateChecklistTemplateCheck](../../models/components/updatechecklisttemplatecheck.md)[] | :heavy_minus_sign: | An array of checks for the checklist template | +| `teamId` | *string* | :heavy_minus_sign: | The ID of the Team that owns the checklist template | +| `connectedServices` | [components.UpdateChecklistTemplateConnectedService](../../models/components/updatechecklisttemplateconnectedservice.md)[] | :heavy_minus_sign: | Array of service IDs to attach checklist template to | +| `removeRemainingConnectedServices` | *boolean* | :heavy_minus_sign: | If set to true, any services tagged on the checklist that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the services | \ No newline at end of file diff --git a/docs/models/components/updatechecklisttemplatecheck.md b/docs/models/components/updatechecklisttemplatecheck.md new file mode 100644 index 00000000..a0392075 --- /dev/null +++ b/docs/models/components/updatechecklisttemplatecheck.md @@ -0,0 +1,19 @@ +# UpdateChecklistTemplateCheck + +## Example Usage + +```typescript +import { UpdateChecklistTemplateCheck } from "firehydrant/models/components"; + +let value: UpdateChecklistTemplateCheck = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `id` | *string* | :heavy_minus_sign: | Specify the check ID when updating an already existing check | +| `description` | *string* | :heavy_minus_sign: | The description of the check | +| `name` | *string* | :heavy_check_mark: | The name of the check | \ No newline at end of file diff --git a/docs/models/components/updatechecklisttemplateconnectedservice.md b/docs/models/components/updatechecklisttemplateconnectedservice.md new file mode 100644 index 00000000..57cf90e7 --- /dev/null +++ b/docs/models/components/updatechecklisttemplateconnectedservice.md @@ -0,0 +1,18 @@ +# UpdateChecklistTemplateConnectedService + +## Example Usage + +```typescript +import { UpdateChecklistTemplateConnectedService } from "firehydrant/models/components"; + +let value: UpdateChecklistTemplateConnectedService = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `remove` | *boolean* | :heavy_minus_sign: | Set to `true` to remove checklist from service | \ No newline at end of file diff --git a/docs/models/components/updatecomment.md b/docs/models/components/updatecomment.md new file mode 100644 index 00000000..94ccfbe9 --- /dev/null +++ b/docs/models/components/updatecomment.md @@ -0,0 +1,17 @@ +# UpdateComment + +ALPHA - Update a comment's attributes + +## Example Usage + +```typescript +import { UpdateComment } from "firehydrant/models/components"; + +let value: UpdateComment = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `body` | *string* | :heavy_minus_sign: | Text body of comment | \ No newline at end of file diff --git a/docs/models/components/updatecustomfielddefinition.md b/docs/models/components/updatecustomfielddefinition.md new file mode 100644 index 00000000..0dc0255f --- /dev/null +++ b/docs/models/components/updatecustomfielddefinition.md @@ -0,0 +1,21 @@ +# UpdateCustomFieldDefinition + +Update a single custom field definition + +## Example Usage + +```typescript +import { UpdateCustomFieldDefinition } from "firehydrant/models/components"; + +let value: UpdateCustomFieldDefinition = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `displayName` | *string* | :heavy_minus_sign: | N/A | +| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | +| `required` | *boolean* | :heavy_minus_sign: | N/A | +| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. | \ No newline at end of file diff --git a/docs/models/components/updateenvironment.md b/docs/models/components/updateenvironment.md new file mode 100644 index 00000000..f531c008 --- /dev/null +++ b/docs/models/components/updateenvironment.md @@ -0,0 +1,20 @@ +# UpdateEnvironment + +Update a environments attributes + +## Example Usage + +```typescript +import { UpdateEnvironment } from "firehydrant/models/components"; + +let value: UpdateEnvironment = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatefunctionality.md b/docs/models/components/updatefunctionality.md new file mode 100644 index 00000000..603d3f6c --- /dev/null +++ b/docs/models/components/updatefunctionality.md @@ -0,0 +1,30 @@ +# UpdateFunctionality + +Update a functionalities attributes + +## Example Usage + +```typescript +import { UpdateFunctionality } from "firehydrant/models/components"; + +let value: UpdateFunctionality = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `services` | [components.UpdateFunctionalityService](../../models/components/updatefunctionalityservice.md)[] | :heavy_minus_sign: | N/A | +| `links` | [components.UpdateFunctionalityLink](../../models/components/updatefunctionalitylink.md)[] | :heavy_minus_sign: | An array of links to associate with this functionality. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. | +| `owner` | [components.UpdateFunctionalityOwner](../../models/components/updatefunctionalityowner.md) | :heavy_minus_sign: | An object representing a Team that owns the functionality | +| `removeOwner` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team as an owner from a functionality, set this to 'true' | +| `teams` | [components.UpdateFunctionalityTeam](../../models/components/updatefunctionalityteam.md)[] | :heavy_minus_sign: | An array of teams to attach to this functionality. | +| `removeRemainingTeams` | *boolean* | :heavy_minus_sign: | If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams | +| `externalResources` | [components.UpdateFunctionalityExternalResource](../../models/components/updatefunctionalityexternalresource.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | +| `removeRemainingExternalResources` | *boolean* | :heavy_minus_sign: | If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources | +| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | +| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | +| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | +| `removeRemainingServices` | *boolean* | :heavy_minus_sign: | Set this to true if you want to remove all of the services that are not included in the services array from the functionality | \ No newline at end of file diff --git a/docs/models/components/updatefunctionalityexternalresource.md b/docs/models/components/updatefunctionalityexternalresource.md new file mode 100644 index 00000000..4f1f6553 --- /dev/null +++ b/docs/models/components/updatefunctionalityexternalresource.md @@ -0,0 +1,19 @@ +# UpdateFunctionalityExternalResource + +## Example Usage + +```typescript +import { UpdateFunctionalityExternalResource } from "firehydrant/models/components"; + +let value: UpdateFunctionalityExternalResource = { + remoteId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `remoteId` | *string* | :heavy_check_mark: | N/A | +| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. | +| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove an external resource from a service, set this to 'true'. | \ No newline at end of file diff --git a/docs/models/components/updatefunctionalitylink.md b/docs/models/components/updatefunctionalitylink.md new file mode 100644 index 00000000..c3c1a357 --- /dev/null +++ b/docs/models/components/updatefunctionalitylink.md @@ -0,0 +1,22 @@ +# UpdateFunctionalityLink + +## Example Usage + +```typescript +import { UpdateFunctionalityLink } from "firehydrant/models/components"; + +let value: UpdateFunctionalityLink = { + hrefUrl: "https://wavy-suv.info/", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `hrefUrl` | *string* | :heavy_check_mark: | URL | +| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | +| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | +| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a link, set this to 'true' | +| `id` | *string* | :heavy_minus_sign: | If updating an existing link, specify it's id. | \ No newline at end of file diff --git a/docs/models/components/updatefunctionalityowner.md b/docs/models/components/updatefunctionalityowner.md new file mode 100644 index 00000000..faaad3d9 --- /dev/null +++ b/docs/models/components/updatefunctionalityowner.md @@ -0,0 +1,19 @@ +# UpdateFunctionalityOwner + +An object representing a Team that owns the functionality + +## Example Usage + +```typescript +import { UpdateFunctionalityOwner } from "firehydrant/models/components"; + +let value: UpdateFunctionalityOwner = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatefunctionalityservice.md b/docs/models/components/updatefunctionalityservice.md new file mode 100644 index 00000000..1c7d1646 --- /dev/null +++ b/docs/models/components/updatefunctionalityservice.md @@ -0,0 +1,18 @@ +# UpdateFunctionalityService + +## Example Usage + +```typescript +import { UpdateFunctionalityService } from "firehydrant/models/components"; + +let value: UpdateFunctionalityService = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | ID of a service | +| `remove` | *boolean* | :heavy_minus_sign: | Set to true if you want to remove the given service from the functionality | \ No newline at end of file diff --git a/docs/models/components/updatefunctionalityteam.md b/docs/models/components/updatefunctionalityteam.md new file mode 100644 index 00000000..62bbc95c --- /dev/null +++ b/docs/models/components/updatefunctionalityteam.md @@ -0,0 +1,18 @@ +# UpdateFunctionalityTeam + +## Example Usage + +```typescript +import { UpdateFunctionalityTeam } from "firehydrant/models/components"; + +let value: UpdateFunctionalityTeam = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team from a functionality, set this to 'true' | \ No newline at end of file diff --git a/docs/models/components/updateincident.md b/docs/models/components/updateincident.md new file mode 100644 index 00000000..c4a87e50 --- /dev/null +++ b/docs/models/components/updateincident.md @@ -0,0 +1,26 @@ +# UpdateIncident + +Updates an incident with provided parameters + +## Example Usage + +```typescript +import { UpdateIncident } from "firehydrant/models/components"; + +let value: UpdateIncident = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | [components.UpdateIncidentLabels](../../models/components/updateincidentlabels.md) | :heavy_minus_sign: | Key:value pairs to track custom data for the incident | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `severity` | *string* | :heavy_minus_sign: | N/A | +| `severityConditionId` | *string* | :heavy_minus_sign: | N/A | +| `severityImpactId` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | \ No newline at end of file diff --git a/docs/models/components/updateincidentalertprimary.md b/docs/models/components/updateincidentalertprimary.md new file mode 100644 index 00000000..ea18ab4b --- /dev/null +++ b/docs/models/components/updateincidentalertprimary.md @@ -0,0 +1,19 @@ +# UpdateIncidentAlertPrimary + +Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. + +## Example Usage + +```typescript +import { UpdateIncidentAlertPrimary } from "firehydrant/models/components"; + +let value: UpdateIncidentAlertPrimary = { + primary: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `primary` | *boolean* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentchangeevent.md b/docs/models/components/updateincidentchangeevent.md new file mode 100644 index 00000000..21332827 --- /dev/null +++ b/docs/models/components/updateincidentchangeevent.md @@ -0,0 +1,18 @@ +# UpdateIncidentChangeEvent + +Update a change attached to an incident + +## Example Usage + +```typescript +import { UpdateIncidentChangeEvent } from "firehydrant/models/components"; + +let value: UpdateIncidentChangeEvent = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `type` | [components.UpdateIncidentChangeEventType](../../models/components/updateincidentchangeeventtype.md) | :heavy_minus_sign: | N/A | +| `why` | *string* | :heavy_minus_sign: | A short description about why this change event is related | \ No newline at end of file diff --git a/docs/models/components/updateincidentchangeeventtype.md b/docs/models/components/updateincidentchangeeventtype.md new file mode 100644 index 00000000..2a068356 --- /dev/null +++ b/docs/models/components/updateincidentchangeeventtype.md @@ -0,0 +1,15 @@ +# UpdateIncidentChangeEventType + +## Example Usage + +```typescript +import { UpdateIncidentChangeEventType } from "firehydrant/models/components"; + +let value: UpdateIncidentChangeEventType = "suspect"; +``` + +## Values + +```typescript +"caused" | "fixed" | "suspect" | "dismissed" +``` \ No newline at end of file diff --git a/docs/models/components/updateincidentchatmessage.md b/docs/models/components/updateincidentchatmessage.md new file mode 100644 index 00000000..46dd0fff --- /dev/null +++ b/docs/models/components/updateincidentchatmessage.md @@ -0,0 +1,19 @@ +# UpdateIncidentChatMessage + +Update an existing generic chat message on an incident. + +## Example Usage + +```typescript +import { UpdateIncidentChatMessage } from "firehydrant/models/components"; + +let value: UpdateIncidentChatMessage = { + body: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `body` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentimpactpatch.md b/docs/models/components/updateincidentimpactpatch.md new file mode 100644 index 00000000..f6c93650 --- /dev/null +++ b/docs/models/components/updateincidentimpactpatch.md @@ -0,0 +1,27 @@ +# UpdateIncidentImpactPatch + +Allows updating an incident's impacted infrastructure, with the option to +move the incident into a different milestone and provide a note to update +the incident timeline and any attached status pages. If this method is +requested with the PUT verb, impacts will be completely replaced with the +information in the request body, even if not provided (effectively clearing +all impacts). If this method is requested with the PATCH verb, the provided +impacts will be added or updated, but no impacts will be removed. + + +## Example Usage + +```typescript +import { UpdateIncidentImpactPatch } from "firehydrant/models/components"; + +let value: UpdateIncidentImpactPatch = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `note` | *string* | :heavy_minus_sign: | N/A | +| `milestone` | *string* | :heavy_minus_sign: | N/A | +| `impact` | [components.UpdateIncidentImpactPatchImpact](../../models/components/updateincidentimpactpatchimpact.md)[] | :heavy_minus_sign: | N/A | +| `statusPages` | [components.UpdateIncidentImpactPatchStatusPage](../../models/components/updateincidentimpactpatchstatuspage.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentimpactpatchimpact.md b/docs/models/components/updateincidentimpactpatchimpact.md new file mode 100644 index 00000000..36784a4c --- /dev/null +++ b/docs/models/components/updateincidentimpactpatchimpact.md @@ -0,0 +1,19 @@ +# UpdateIncidentImpactPatchImpact + +## Example Usage + +```typescript +import { UpdateIncidentImpactPatchImpact } from "firehydrant/models/components"; + +let value: UpdateIncidentImpactPatchImpact = { + id: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `conditionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentimpactpatchstatuspage.md b/docs/models/components/updateincidentimpactpatchstatuspage.md new file mode 100644 index 00000000..a8970411 --- /dev/null +++ b/docs/models/components/updateincidentimpactpatchstatuspage.md @@ -0,0 +1,19 @@ +# UpdateIncidentImpactPatchStatusPage + +## Example Usage + +```typescript +import { UpdateIncidentImpactPatchStatusPage } from "firehydrant/models/components"; + +let value: UpdateIncidentImpactPatchStatusPage = { + id: "", + integrationSlug: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `integrationSlug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentimpactput.md b/docs/models/components/updateincidentimpactput.md new file mode 100644 index 00000000..192de54f --- /dev/null +++ b/docs/models/components/updateincidentimpactput.md @@ -0,0 +1,27 @@ +# UpdateIncidentImpactPut + +Allows updating an incident's impacted infrastructure, with the option to +move the incident into a different milestone and provide a note to update +the incident timeline and any attached status pages. If this method is +requested with the PUT verb, impacts will be completely replaced with the +information in the request body, even if not provided (effectively clearing +all impacts). If this method is requested with the PATCH verb, the provided +impacts will be added or updated, but no impacts will be removed. + + +## Example Usage + +```typescript +import { UpdateIncidentImpactPut } from "firehydrant/models/components"; + +let value: UpdateIncidentImpactPut = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `note` | *string* | :heavy_minus_sign: | N/A | +| `milestone` | *string* | :heavy_minus_sign: | N/A | +| `impact` | [components.UpdateIncidentImpactPutImpact](../../models/components/updateincidentimpactputimpact.md)[] | :heavy_minus_sign: | N/A | +| `statusPages` | [components.UpdateIncidentImpactPutStatusPage](../../models/components/updateincidentimpactputstatuspage.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentimpactputimpact.md b/docs/models/components/updateincidentimpactputimpact.md new file mode 100644 index 00000000..775068b8 --- /dev/null +++ b/docs/models/components/updateincidentimpactputimpact.md @@ -0,0 +1,19 @@ +# UpdateIncidentImpactPutImpact + +## Example Usage + +```typescript +import { UpdateIncidentImpactPutImpact } from "firehydrant/models/components"; + +let value: UpdateIncidentImpactPutImpact = { + id: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `conditionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentimpactputstatuspage.md b/docs/models/components/updateincidentimpactputstatuspage.md new file mode 100644 index 00000000..1919df8b --- /dev/null +++ b/docs/models/components/updateincidentimpactputstatuspage.md @@ -0,0 +1,19 @@ +# UpdateIncidentImpactPutStatusPage + +## Example Usage + +```typescript +import { UpdateIncidentImpactPutStatusPage } from "firehydrant/models/components"; + +let value: UpdateIncidentImpactPutStatusPage = { + id: "", + integrationSlug: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `integrationSlug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentlabels.md b/docs/models/components/updateincidentlabels.md new file mode 100644 index 00000000..88cf8293 --- /dev/null +++ b/docs/models/components/updateincidentlabels.md @@ -0,0 +1,16 @@ +# UpdateIncidentLabels + +Key:value pairs to track custom data for the incident + +## Example Usage + +```typescript +import { UpdateIncidentLabels } from "firehydrant/models/components"; + +let value: UpdateIncidentLabels = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/updateincidentlink.md b/docs/models/components/updateincidentlink.md new file mode 100644 index 00000000..14945e82 --- /dev/null +++ b/docs/models/components/updateincidentlink.md @@ -0,0 +1,19 @@ +# UpdateIncidentLink + +Update the external incident link attributes + +## Example Usage + +```typescript +import { UpdateIncidentLink } from "firehydrant/models/components"; + +let value: UpdateIncidentLink = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `displayText` | *string* | :heavy_minus_sign: | N/A | +| `iconUrl` | *string* | :heavy_minus_sign: | N/A | +| `hrefUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentnote.md b/docs/models/components/updateincidentnote.md new file mode 100644 index 00000000..20b699f3 --- /dev/null +++ b/docs/models/components/updateincidentnote.md @@ -0,0 +1,19 @@ +# UpdateIncidentNote + +Updates the body of a note + +## Example Usage + +```typescript +import { UpdateIncidentNote } from "firehydrant/models/components"; + +let value: UpdateIncidentNote = { + body: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `body` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidentretrospective.md b/docs/models/components/updateincidentretrospective.md new file mode 100644 index 00000000..986e2e97 --- /dev/null +++ b/docs/models/components/updateincidentretrospective.md @@ -0,0 +1,17 @@ +# UpdateIncidentRetrospective + +Update a retrospective attached to an incident + +## Example Usage + +```typescript +import { UpdateIncidentRetrospective } from "firehydrant/models/components"; + +let value: UpdateIncidentRetrospective = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `isHidden` | *boolean* | :heavy_minus_sign: | To hide or unhide the retrospective. | \ No newline at end of file diff --git a/docs/models/components/updateincidentretrospectivefield.md b/docs/models/components/updateincidentretrospectivefield.md new file mode 100644 index 00000000..69931c6f --- /dev/null +++ b/docs/models/components/updateincidentretrospectivefield.md @@ -0,0 +1,20 @@ +# UpdateIncidentRetrospectiveField + +Update retrospective field value + +## Example Usage + +```typescript +import { UpdateIncidentRetrospectiveField } from "firehydrant/models/components"; + +let value: UpdateIncidentRetrospectiveField = { + value: 72658, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `dynamicInputFieldId` | *string* | :heavy_minus_sign: | The ID of the dynamic input field to update. | +| `value` | *number* | :heavy_check_mark: | The value to set for the field. | \ No newline at end of file diff --git a/docs/models/components/updateincidentrole.md b/docs/models/components/updateincidentrole.md new file mode 100644 index 00000000..f791a99b --- /dev/null +++ b/docs/models/components/updateincidentrole.md @@ -0,0 +1,19 @@ +# UpdateIncidentRole + +Update a single incident role from its ID + +## Example Usage + +```typescript +import { UpdateIncidentRole } from "firehydrant/models/components"; + +let value: UpdateIncidentRole = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidenttask.md b/docs/models/components/updateincidenttask.md new file mode 100644 index 00000000..7ec6c49d --- /dev/null +++ b/docs/models/components/updateincidenttask.md @@ -0,0 +1,21 @@ +# UpdateIncidentTask + +Update a task's attributes + +## Example Usage + +```typescript +import { UpdateIncidentTask } from "firehydrant/models/components"; + +let value: UpdateIncidentTask = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `title` | *string* | :heavy_minus_sign: | The title of the task. | +| `description` | *string* | :heavy_minus_sign: | A description of what the task is for. | +| `state` | *string* | :heavy_minus_sign: | The state of the task. One of: open, in_progress, cancelled, done | +| `assigneeId` | *string* | :heavy_minus_sign: | The ID of the user assigned to the task. | +| `dueAt` | *string* | :heavy_minus_sign: | The due date of the task. Relative values are supported such as '5m' | \ No newline at end of file diff --git a/docs/models/components/updateincidenttype.md b/docs/models/components/updateincidenttype.md new file mode 100644 index 00000000..a4835bab --- /dev/null +++ b/docs/models/components/updateincidenttype.md @@ -0,0 +1,21 @@ +# UpdateIncidentType + +Update a single incident type from its ID + +## Example Usage + +```typescript +import { UpdateIncidentType } from "firehydrant/models/components"; + +let value: UpdateIncidentType = { + name: "", + template: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `template` | [components.UpdateIncidentTypeTemplate](../../models/components/updateincidenttypetemplate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateincidenttypeimpact.md b/docs/models/components/updateincidenttypeimpact.md new file mode 100644 index 00000000..dce48956 --- /dev/null +++ b/docs/models/components/updateincidenttypeimpact.md @@ -0,0 +1,19 @@ +# UpdateIncidentTypeImpact + +## Example Usage + +```typescript +import { UpdateIncidentTypeImpact } from "firehydrant/models/components"; + +let value: UpdateIncidentTypeImpact = { + id: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *string* | :heavy_check_mark: | The id of impact | +| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/updateincidenttypetemplate.md b/docs/models/components/updateincidenttypetemplate.md new file mode 100644 index 00000000..60414d9d --- /dev/null +++ b/docs/models/components/updateincidenttypetemplate.md @@ -0,0 +1,24 @@ +# UpdateIncidentTypeTemplate + +## Example Usage + +```typescript +import { UpdateIncidentTypeTemplate } from "firehydrant/models/components"; + +let value: UpdateIncidentTypeTemplate = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `customerImpactSummary` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | A labels hash of keys and values | +| `severity` | *string* | :heavy_minus_sign: | N/A | +| `priority` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the incident | +| `runbookIds` | *string*[] | :heavy_minus_sign: | List of ids of Runbooks to attach to incidents created from this type | +| `privateIncident` | *boolean* | :heavy_minus_sign: | N/A | +| `teamIds` | *string*[] | :heavy_minus_sign: | List of ids of teams to be assigned to incidents | +| `impacts` | [components.UpdateIncidentTypeImpact](../../models/components/updateincidenttypeimpact.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/updatenunclink.md b/docs/models/components/updatenunclink.md new file mode 100644 index 00000000..6c10f847 --- /dev/null +++ b/docs/models/components/updatenunclink.md @@ -0,0 +1,19 @@ +# UpdateNuncLink + +Update a link to be displayed on a FireHydrant status page + +## Example Usage + +```typescript +import { UpdateNuncLink } from "firehydrant/models/components"; + +let value: UpdateNuncLink = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `displayText` | *string* | :heavy_minus_sign: | N/A | +| `iconUrl` | *string* | :heavy_minus_sign: | N/A | +| `hrefUrl` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateoncallshift.md b/docs/models/components/updateoncallshift.md new file mode 100644 index 00000000..05d71dd6 --- /dev/null +++ b/docs/models/components/updateoncallshift.md @@ -0,0 +1,20 @@ +# UpdateOnCallShift + +Update a Signals on-call shift by ID + +## Example Usage + +```typescript +import { UpdateOnCallShift } from "firehydrant/models/components"; + +let value: UpdateOnCallShift = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `startTime` | *string* | :heavy_minus_sign: | The start time of the shift in ISO8601 format. | +| `endTime` | *string* | :heavy_minus_sign: | The end time of the shift in ISO8601 format. | +| `userId` | *string* | :heavy_minus_sign: | The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. | +| `coverageRequest` | *string* | :heavy_minus_sign: | A description of why coverage is needed for this shift. If the shift is re-assigned, this will automatically be cleared unless provided again. | \ No newline at end of file diff --git a/docs/models/components/updatepostmortemfield.md b/docs/models/components/updatepostmortemfield.md new file mode 100644 index 00000000..b7b3ed2f --- /dev/null +++ b/docs/models/components/updatepostmortemfield.md @@ -0,0 +1,19 @@ +# UpdatePostMortemField + +Update a field value on a post mortem report + +## Example Usage + +```typescript +import { UpdatePostMortemField } from "firehydrant/models/components"; + +let value: UpdatePostMortemField = { + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `value` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatepostmortemquestions.md b/docs/models/components/updatepostmortemquestions.md new file mode 100644 index 00000000..44b42835 --- /dev/null +++ b/docs/models/components/updatepostmortemquestions.md @@ -0,0 +1,18 @@ +# UpdatePostMortemQuestions + +Update the questions configured to be provided and filled out on future retrospective reports. + +## Example Usage + +```typescript +import { UpdatePostMortemQuestions } from "firehydrant/models/components"; + +let value: UpdatePostMortemQuestions = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `makeSwaggerWork` | *string* | :heavy_minus_sign: | N/A | +| `questions` | [components.UpdatePostMortemQuestionsQuestion](../../models/components/updatepostmortemquestionsquestion.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatepostmortemquestionsquestion.md b/docs/models/components/updatepostmortemquestionsquestion.md new file mode 100644 index 00000000..06e8d3ac --- /dev/null +++ b/docs/models/components/updatepostmortemquestionsquestion.md @@ -0,0 +1,17 @@ +# UpdatePostMortemQuestionsQuestion + +## Example Usage + +```typescript +import { UpdatePostMortemQuestionsQuestion } from "firehydrant/models/components"; + +let value: UpdatePostMortemQuestionsQuestion = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `id` | *string* | :heavy_minus_sign: | ID of a question | +| `title` | *string* | :heavy_minus_sign: | title of a question | +| `tooltip` | *string* | :heavy_minus_sign: | tooltip of a question | \ No newline at end of file diff --git a/docs/models/components/updatepostmortemreason.md b/docs/models/components/updatepostmortemreason.md new file mode 100644 index 00000000..a7f60cd4 --- /dev/null +++ b/docs/models/components/updatepostmortemreason.md @@ -0,0 +1,17 @@ +# UpdatePostMortemReason + +Update a contributing factor + +## Example Usage + +```typescript +import { UpdatePostMortemReason } from "firehydrant/models/components"; + +let value: UpdatePostMortemReason = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `summary` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatepostmortemreport.md b/docs/models/components/updatepostmortemreport.md new file mode 100644 index 00000000..ac26053b --- /dev/null +++ b/docs/models/components/updatepostmortemreport.md @@ -0,0 +1,20 @@ +# UpdatePostMortemReport + +Update a report + +## Example Usage + +```typescript +import { UpdatePostMortemReport } from "firehydrant/models/components"; + +let value: UpdatePostMortemReport = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `additionalDetails` | *string* | :heavy_minus_sign: | N/A | +| `questions` | [components.UpdatePostMortemReportQuestion](../../models/components/updatepostmortemreportquestion.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatepostmortemreportquestion.md b/docs/models/components/updatepostmortemreportquestion.md new file mode 100644 index 00000000..c0c796cd --- /dev/null +++ b/docs/models/components/updatepostmortemreportquestion.md @@ -0,0 +1,16 @@ +# UpdatePostMortemReportQuestion + +## Example Usage + +```typescript +import { UpdatePostMortemReportQuestion } from "firehydrant/models/components"; + +let value: UpdatePostMortemReportQuestion = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | ID of a question | +| `body` | *string* | :heavy_minus_sign: | Answer to question | \ No newline at end of file diff --git a/docs/models/components/updatepriority.md b/docs/models/components/updatepriority.md new file mode 100644 index 00000000..d4b3ec48 --- /dev/null +++ b/docs/models/components/updatepriority.md @@ -0,0 +1,19 @@ +# UpdatePriority + +Update a specific priority + +## Example Usage + +```typescript +import { UpdatePriority } from "firehydrant/models/components"; + +let value: UpdatePriority = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `default` | *boolean* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updaterunbook.md b/docs/models/components/updaterunbook.md new file mode 100644 index 00000000..79c4d829 --- /dev/null +++ b/docs/models/components/updaterunbook.md @@ -0,0 +1,29 @@ +# UpdateRunbook + +Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything +about a runbook, including but not limited to the steps, environments, attachment rules, and severities. + + +## Example Usage + +```typescript +import { UpdateRunbook } from "firehydrant/models/components"; + +let value: UpdateRunbook = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `tutorial` | *boolean* | :heavy_minus_sign: | Whether or not this runbook is a tutorial runbook | +| `owner` | [components.UpdateRunbookOwner](../../models/components/updaterunbookowner.md) | :heavy_minus_sign: | An object representing a Team that owns the runbook | +| `severities` | [components.UpdateRunbookSeverity](../../models/components/updaterunbookseverity.md)[] | :heavy_minus_sign: | N/A | +| `services` | [components.UpdateRunbookService](../../models/components/updaterunbookservice.md)[] | :heavy_minus_sign: | N/A | +| `environments` | [components.Environment](../../models/components/environment.md)[] | :heavy_minus_sign: | N/A | +| `attachmentRule` | [components.UpdateRunbookAttachmentRule](../../models/components/updaterunbookattachmentrule.md) | :heavy_minus_sign: | N/A | +| `steps` | [components.UpdateRunbookStep](../../models/components/updaterunbookstep.md)[] | :heavy_minus_sign: | N/A | +| `autoAttachToRestrictedIncidents` | *boolean* | :heavy_minus_sign: | Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. | \ No newline at end of file diff --git a/docs/models/components/updaterunbookattachmentrule.md b/docs/models/components/updaterunbookattachmentrule.md new file mode 100644 index 00000000..715d34ac --- /dev/null +++ b/docs/models/components/updaterunbookattachmentrule.md @@ -0,0 +1,18 @@ +# UpdateRunbookAttachmentRule + +## Example Usage + +```typescript +import { UpdateRunbookAttachmentRule } from "firehydrant/models/components"; + +let value: UpdateRunbookAttachmentRule = { + logic: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `logic` | *string* | :heavy_check_mark: | The JSON logic for the attaching the runbook | +| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/updaterunbookexecutionstep.md b/docs/models/components/updaterunbookexecutionstep.md new file mode 100644 index 00000000..74ea0f54 --- /dev/null +++ b/docs/models/components/updaterunbookexecutionstep.md @@ -0,0 +1,22 @@ +# UpdateRunbookExecutionStep + +Updates a runbook step execution, especially for changing the state of a step execution. + +## Example Usage + +```typescript +import { UpdateRunbookExecutionStep } from "firehydrant/models/components"; + +let value: UpdateRunbookExecutionStep = { + state: "Louisiana", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `state` | *string* | :heavy_check_mark: | N/A | +| `scheduleFor` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `data` | Record | :heavy_minus_sign: | Data for execution of this step | +| `repeatsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updaterunbookowner.md b/docs/models/components/updaterunbookowner.md new file mode 100644 index 00000000..1b708ae3 --- /dev/null +++ b/docs/models/components/updaterunbookowner.md @@ -0,0 +1,17 @@ +# UpdateRunbookOwner + +An object representing a Team that owns the runbook + +## Example Usage + +```typescript +import { UpdateRunbookOwner } from "firehydrant/models/components"; + +let value: UpdateRunbookOwner = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updaterunbookrule.md b/docs/models/components/updaterunbookrule.md new file mode 100644 index 00000000..60400431 --- /dev/null +++ b/docs/models/components/updaterunbookrule.md @@ -0,0 +1,18 @@ +# UpdateRunbookRule + +## Example Usage + +```typescript +import { UpdateRunbookRule } from "firehydrant/models/components"; + +let value: UpdateRunbookRule = { + logic: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `logic` | *string* | :heavy_check_mark: | The JSON logic for the rule | +| `userData` | *string* | :heavy_minus_sign: | The user data for the rule | \ No newline at end of file diff --git a/docs/models/components/updaterunbookservice.md b/docs/models/components/updaterunbookservice.md new file mode 100644 index 00000000..f8db6a49 --- /dev/null +++ b/docs/models/components/updaterunbookservice.md @@ -0,0 +1,15 @@ +# UpdateRunbookService + +## Example Usage + +```typescript +import { UpdateRunbookService } from "firehydrant/models/components"; + +let value: UpdateRunbookService = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updaterunbookseverity.md b/docs/models/components/updaterunbookseverity.md new file mode 100644 index 00000000..ceeb93a3 --- /dev/null +++ b/docs/models/components/updaterunbookseverity.md @@ -0,0 +1,15 @@ +# UpdateRunbookSeverity + +## Example Usage + +```typescript +import { UpdateRunbookSeverity } from "firehydrant/models/components"; + +let value: UpdateRunbookSeverity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updaterunbookstep.md b/docs/models/components/updaterunbookstep.md new file mode 100644 index 00000000..ad589b7b --- /dev/null +++ b/docs/models/components/updaterunbookstep.md @@ -0,0 +1,21 @@ +# UpdateRunbookStep + +## Example Usage + +```typescript +import { UpdateRunbookStep } from "firehydrant/models/components"; + +let value: UpdateRunbookStep = { + name: "", + actionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `stepId` | *string* | :heavy_minus_sign: | ID of step to be updated | +| `name` | *string* | :heavy_check_mark: | Name for step | +| `actionId` | *string* | :heavy_check_mark: | ID of action to use for this step. | +| `rule` | [components.UpdateRunbookRule](../../models/components/updaterunbookrule.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatesavedsearch.md b/docs/models/components/updatesavedsearch.md new file mode 100644 index 00000000..f4eefa8c --- /dev/null +++ b/docs/models/components/updatesavedsearch.md @@ -0,0 +1,19 @@ +# UpdateSavedSearch + +Update a specific saved search + +## Example Usage + +```typescript +import { UpdateSavedSearch } from "firehydrant/models/components"; + +let value: UpdateSavedSearch = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `isPrivate` | *boolean* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `filterValues` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatescheduledmaintenance.md b/docs/models/components/updatescheduledmaintenance.md new file mode 100644 index 00000000..84249da3 --- /dev/null +++ b/docs/models/components/updatescheduledmaintenance.md @@ -0,0 +1,24 @@ +# UpdateScheduledMaintenance + +Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. + +## Example Usage + +```typescript +import { UpdateScheduledMaintenance } from "firehydrant/models/components"; + +let value: UpdateScheduledMaintenance = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `startsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for the start time of the scheduled maintenance | +| `endsAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | ISO8601 timestamp for the end time of the scheduled maintenance | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `labels` | Record | :heavy_minus_sign: | A json object of label keys and values | +| `statusPages` | [components.UpdateScheduledMaintenanceStatusPage](../../models/components/updatescheduledmaintenancestatuspage.md)[] | :heavy_minus_sign: | An array of status pages to display this maintenance on | +| `impacts` | [components.UpdateScheduledMaintenanceImpact](../../models/components/updatescheduledmaintenanceimpact.md)[] | :heavy_minus_sign: | An array of impact/condition combinations | \ No newline at end of file diff --git a/docs/models/components/updatescheduledmaintenanceimpact.md b/docs/models/components/updatescheduledmaintenanceimpact.md new file mode 100644 index 00000000..fcd86972 --- /dev/null +++ b/docs/models/components/updatescheduledmaintenanceimpact.md @@ -0,0 +1,21 @@ +# UpdateScheduledMaintenanceImpact + +## Example Usage + +```typescript +import { UpdateScheduledMaintenanceImpact } from "firehydrant/models/components"; + +let value: UpdateScheduledMaintenanceImpact = { + type: "", + id: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `type` | *string* | :heavy_check_mark: | The type of impact | +| `id` | *string* | :heavy_check_mark: | The id of impact | +| `conditionId` | *string* | :heavy_check_mark: | The id of the condition | \ No newline at end of file diff --git a/docs/models/components/updatescheduledmaintenancestatuspage.md b/docs/models/components/updatescheduledmaintenancestatuspage.md new file mode 100644 index 00000000..53035c4a --- /dev/null +++ b/docs/models/components/updatescheduledmaintenancestatuspage.md @@ -0,0 +1,18 @@ +# UpdateScheduledMaintenanceStatusPage + +## Example Usage + +```typescript +import { UpdateScheduledMaintenanceStatusPage } from "firehydrant/models/components"; + +let value: UpdateScheduledMaintenanceStatusPage = { + connectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `integrationSlug` | *string* | :heavy_minus_sign: | The slug identifying the type of status page | +| `connectionId` | *string* | :heavy_check_mark: | The UUID of the status page to display this maintenance on | \ No newline at end of file diff --git a/docs/models/components/updatescimgroup.md b/docs/models/components/updatescimgroup.md new file mode 100644 index 00000000..1daf2bd2 --- /dev/null +++ b/docs/models/components/updatescimgroup.md @@ -0,0 +1,25 @@ +# UpdateScimGroup + +SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. + +## Example Usage + +```typescript +import { UpdateScimGroup } from "firehydrant/models/components"; + +let value: UpdateScimGroup = { + displayName: "Eldon.Parisian45", + members: [ + { + value: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | The name of the team being updated | +| `members` | [components.UpdateScimGroupMember](../../models/components/updatescimgroupmember.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatescimgroupmember.md b/docs/models/components/updatescimgroupmember.md new file mode 100644 index 00000000..4091e4e0 --- /dev/null +++ b/docs/models/components/updatescimgroupmember.md @@ -0,0 +1,17 @@ +# UpdateScimGroupMember + +## Example Usage + +```typescript +import { UpdateScimGroupMember } from "firehydrant/models/components"; + +let value: UpdateScimGroupMember = { + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `value` | *string* | :heavy_check_mark: | String that represents the user's UUID to assign to the team | \ No newline at end of file diff --git a/docs/models/components/updatescimuser.md b/docs/models/components/updatescimuser.md new file mode 100644 index 00000000..7e91641e --- /dev/null +++ b/docs/models/components/updatescimuser.md @@ -0,0 +1,21 @@ +# UpdateScimUser + +PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. + +## Example Usage + +```typescript +import { UpdateScimUser } from "firehydrant/models/components"; + +let value: UpdateScimUser = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `userName` | *string* | :heavy_minus_sign: | A service provider's unique identifier for the user | +| `name` | [components.UpdateScimUserName](../../models/components/updatescimusername.md) | :heavy_minus_sign: | The components of the user's name | +| `emails` | [components.UpdateScimUserEmail](../../models/components/updatescimuseremail.md)[] | :heavy_minus_sign: | Email addresses for the User | +| `roles` | [components.UpdateScimUserRoles](../../models/components/updatescimuserroles.md) | :heavy_minus_sign: | Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. | +| `active` | *boolean* | :heavy_minus_sign: | Boolean that represents whether user is active | \ No newline at end of file diff --git a/docs/models/components/updatescimuseremail.md b/docs/models/components/updatescimuseremail.md new file mode 100644 index 00000000..fbbf68cb --- /dev/null +++ b/docs/models/components/updatescimuseremail.md @@ -0,0 +1,18 @@ +# UpdateScimUserEmail + +## Example Usage + +```typescript +import { UpdateScimUserEmail } from "firehydrant/models/components"; + +let value: UpdateScimUserEmail = { + value: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `value` | *string* | :heavy_check_mark: | String that represents an email address for the User | +| `primary` | *boolean* | :heavy_minus_sign: | Boolean which signifies if an email is intended as the primary email for the User | \ No newline at end of file diff --git a/docs/models/components/updatescimusername.md b/docs/models/components/updatescimusername.md new file mode 100644 index 00000000..775c5274 --- /dev/null +++ b/docs/models/components/updatescimusername.md @@ -0,0 +1,21 @@ +# UpdateScimUserName + +The components of the user's name + +## Example Usage + +```typescript +import { UpdateScimUserName } from "firehydrant/models/components"; + +let value: UpdateScimUserName = { + givenName: "", + familyName: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `givenName` | *string* | :heavy_check_mark: | The family name of the User, or last name in most Western languages | +| `familyName` | *string* | :heavy_check_mark: | The given name of the User, or first name in most Western languages | \ No newline at end of file diff --git a/docs/models/components/updatescimuserroles.md b/docs/models/components/updatescimuserroles.md new file mode 100644 index 00000000..229053a0 --- /dev/null +++ b/docs/models/components/updatescimuserroles.md @@ -0,0 +1,16 @@ +# UpdateScimUserRoles + +Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. + +## Example Usage + +```typescript +import { UpdateScimUserRoles } from "firehydrant/models/components"; + +let value: UpdateScimUserRoles = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/updateservice.md b/docs/models/components/updateservice.md new file mode 100644 index 00000000..b9846c79 --- /dev/null +++ b/docs/models/components/updateservice.md @@ -0,0 +1,35 @@ +# UpdateService + +Update a services attributes, you may also add or remove functionalities from the service as well. +Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. + + +## Example Usage + +```typescript +import { UpdateService } from "firehydrant/models/components"; + +let value: UpdateService = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `alertOnAdd` | *boolean* | :heavy_minus_sign: | N/A | +| `autoAddRespondingTeam` | *boolean* | :heavy_minus_sign: | N/A | +| `checklists` | [components.Checklist](../../models/components/checklist.md)[] | :heavy_minus_sign: | Array of checklist IDs to attach to the service | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `externalResources` | [components.UpdateServiceExternalResource](../../models/components/updateserviceexternalresource.md)[] | :heavy_minus_sign: | An array of external resources to attach to this service. | +| `functionalities` | [components.UpdateServiceFunctionality](../../models/components/updateservicefunctionality.md)[] | :heavy_minus_sign: | An array of functionalities | +| `labels` | Record | :heavy_minus_sign: | A hash of label keys and values | +| `links` | [components.UpdateServiceLink](../../models/components/updateservicelink.md)[] | :heavy_minus_sign: | An array of links to associate with this service. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `owner` | [components.UpdateServiceOwner](../../models/components/updateserviceowner.md) | :heavy_minus_sign: | An object representing a Team that owns the service | +| `removeOwner` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team as an owner from a service, set this to 'true' | +| `removeRemainingChecklists` | *boolean* | :heavy_minus_sign: | If set to true, any checklists tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the checklists | +| `removeRemainingExternalResources` | *boolean* | :heavy_minus_sign: | If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources | +| `removeRemainingFunctionalities` | *boolean* | :heavy_minus_sign: | If set to true, any functionalities tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the functionalities | +| `removeRemainingTeams` | *boolean* | :heavy_minus_sign: | If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams | +| `serviceTier` | [components.UpdateServiceServiceTier](../../models/components/updateserviceservicetier.md) | :heavy_minus_sign: | Integer representing service tier | +| `teams` | [components.UpdateServiceTeam](../../models/components/updateserviceteam.md)[] | :heavy_minus_sign: | An array of teams to attach to this service. | \ No newline at end of file diff --git a/docs/models/components/updateservicedependency.md b/docs/models/components/updateservicedependency.md new file mode 100644 index 00000000..f08bbe58 --- /dev/null +++ b/docs/models/components/updateservicedependency.md @@ -0,0 +1,17 @@ +# UpdateServiceDependency + +Update the notes of the service dependency + +## Example Usage + +```typescript +import { UpdateServiceDependency } from "firehydrant/models/components"; + +let value: UpdateServiceDependency = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `notes` | *string* | :heavy_minus_sign: | A note to describe the service dependency relationship | \ No newline at end of file diff --git a/docs/models/components/updateserviceexternalresource.md b/docs/models/components/updateserviceexternalresource.md new file mode 100644 index 00000000..6f6b78da --- /dev/null +++ b/docs/models/components/updateserviceexternalresource.md @@ -0,0 +1,19 @@ +# UpdateServiceExternalResource + +## Example Usage + +```typescript +import { UpdateServiceExternalResource } from "firehydrant/models/components"; + +let value: UpdateServiceExternalResource = { + remoteId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `remoteId` | *string* | :heavy_check_mark: | N/A | +| `connectionType` | *string* | :heavy_minus_sign: | The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. | +| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove an external resource from a service, set this to 'true'. | \ No newline at end of file diff --git a/docs/models/components/updateservicefunctionality.md b/docs/models/components/updateservicefunctionality.md new file mode 100644 index 00000000..145b7aaa --- /dev/null +++ b/docs/models/components/updateservicefunctionality.md @@ -0,0 +1,17 @@ +# UpdateServiceFunctionality + +## Example Usage + +```typescript +import { UpdateServiceFunctionality } from "firehydrant/models/components"; + +let value: UpdateServiceFunctionality = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | If you are trying to reuse a functionality, you may set the ID to attach it to the service | +| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a functionality from a service, set this to 'true' | +| `summary` | *string* | :heavy_minus_sign: | If you are trying to create a new functionality and attach it to this service, set the summary key | \ No newline at end of file diff --git a/docs/models/components/updateservicelink.md b/docs/models/components/updateservicelink.md new file mode 100644 index 00000000..64c2df05 --- /dev/null +++ b/docs/models/components/updateservicelink.md @@ -0,0 +1,22 @@ +# UpdateServiceLink + +## Example Usage + +```typescript +import { UpdateServiceLink } from "firehydrant/models/components"; + +let value: UpdateServiceLink = { + hrefUrl: "https://petty-hawk.org", + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `hrefUrl` | *string* | :heavy_check_mark: | URL | +| `name` | *string* | :heavy_check_mark: | Short name used to display and identify this link | +| `iconUrl` | *string* | :heavy_minus_sign: | An optional URL to an icon representing this link | +| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a link, set this to 'true' | +| `id` | *string* | :heavy_minus_sign: | If updating an existing link, specify it's id. | \ No newline at end of file diff --git a/docs/models/components/updateserviceowner.md b/docs/models/components/updateserviceowner.md new file mode 100644 index 00000000..2e111d6c --- /dev/null +++ b/docs/models/components/updateserviceowner.md @@ -0,0 +1,19 @@ +# UpdateServiceOwner + +An object representing a Team that owns the service + +## Example Usage + +```typescript +import { UpdateServiceOwner } from "firehydrant/models/components"; + +let value: UpdateServiceOwner = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateserviceservicetier.md b/docs/models/components/updateserviceservicetier.md new file mode 100644 index 00000000..da4498ad --- /dev/null +++ b/docs/models/components/updateserviceservicetier.md @@ -0,0 +1,17 @@ +# UpdateServiceServiceTier + +Integer representing service tier + +## Example Usage + +```typescript +import { UpdateServiceServiceTier } from "firehydrant/models/components"; + +let value: UpdateServiceServiceTier = 5; +``` + +## Values + +```typescript +0 | 1 | 2 | 3 | 4 | 5 +``` \ No newline at end of file diff --git a/docs/models/components/updateserviceteam.md b/docs/models/components/updateserviceteam.md new file mode 100644 index 00000000..bd9abaa7 --- /dev/null +++ b/docs/models/components/updateserviceteam.md @@ -0,0 +1,18 @@ +# UpdateServiceTeam + +## Example Usage + +```typescript +import { UpdateServiceTeam } from "firehydrant/models/components"; + +let value: UpdateServiceTeam = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `remove` | *boolean* | :heavy_minus_sign: | If you are trying to remove a team from a service, set this to 'true' | \ No newline at end of file diff --git a/docs/models/components/updateseverity.md b/docs/models/components/updateseverity.md new file mode 100644 index 00000000..057f7b57 --- /dev/null +++ b/docs/models/components/updateseverity.md @@ -0,0 +1,20 @@ +# UpdateSeverity + +Update a specific severity + +## Example Usage + +```typescript +import { UpdateSeverity } from "firehydrant/models/components"; + +let value: UpdateSeverity = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | +| `color` | [components.UpdateSeverityColor](../../models/components/updateseveritycolor.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateseveritycolor.md b/docs/models/components/updateseveritycolor.md new file mode 100644 index 00000000..890006dd --- /dev/null +++ b/docs/models/components/updateseveritycolor.md @@ -0,0 +1,15 @@ +# UpdateSeverityColor + +## Example Usage + +```typescript +import { UpdateSeverityColor } from "firehydrant/models/components"; + +let value: UpdateSeverityColor = "teal"; +``` + +## Values + +```typescript +"red" | "orange" | "yellow" | "blue" | "teal" | "grey" +``` \ No newline at end of file diff --git a/docs/models/components/updateseveritymatrix.md b/docs/models/components/updateseveritymatrix.md new file mode 100644 index 00000000..9049118f --- /dev/null +++ b/docs/models/components/updateseveritymatrix.md @@ -0,0 +1,26 @@ +# UpdateSeverityMatrix + +Update available severities and impacts in your organization's severity matrix. + +## Example Usage + +```typescript +import { UpdateSeverityMatrix } from "firehydrant/models/components"; + +let value: UpdateSeverityMatrix = { + data: [ + { + severity: "", + impactId: "", + conditionId: "", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `data` | [components.UpdateSeverityMatrixData](../../models/components/updateseveritymatrixdata.md)[] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateseveritymatrixcondition.md b/docs/models/components/updateseveritymatrixcondition.md new file mode 100644 index 00000000..1fc2559c --- /dev/null +++ b/docs/models/components/updateseveritymatrixcondition.md @@ -0,0 +1,18 @@ +# UpdateSeverityMatrixCondition + +Update a severity matrix condition + +## Example Usage + +```typescript +import { UpdateSeverityMatrixCondition } from "firehydrant/models/components"; + +let value: UpdateSeverityMatrixCondition = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition | \ No newline at end of file diff --git a/docs/models/components/updateseveritymatrixdata.md b/docs/models/components/updateseveritymatrixdata.md new file mode 100644 index 00000000..f7350246 --- /dev/null +++ b/docs/models/components/updateseveritymatrixdata.md @@ -0,0 +1,21 @@ +# UpdateSeverityMatrixData + +## Example Usage + +```typescript +import { UpdateSeverityMatrixData } from "firehydrant/models/components"; + +let value: UpdateSeverityMatrixData = { + severity: "", + impactId: "", + conditionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `severity` | *string* | :heavy_check_mark: | Slug of a severity | +| `impactId` | *string* | :heavy_check_mark: | Impact id | +| `conditionId` | *string* | :heavy_check_mark: | Condition id | \ No newline at end of file diff --git a/docs/models/components/updateseveritymatriximpact.md b/docs/models/components/updateseveritymatriximpact.md new file mode 100644 index 00000000..1f498a62 --- /dev/null +++ b/docs/models/components/updateseveritymatriximpact.md @@ -0,0 +1,18 @@ +# UpdateSeverityMatrixImpact + +Update a severity matrix impact + +## Example Usage + +```typescript +import { UpdateSeverityMatrixImpact } from "firehydrant/models/components"; + +let value: UpdateSeverityMatrixImpact = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatesignalsemailtarget.md b/docs/models/components/updatesignalsemailtarget.md new file mode 100644 index 00000000..397ec2a3 --- /dev/null +++ b/docs/models/components/updatesignalsemailtarget.md @@ -0,0 +1,25 @@ +# UpdateSignalsEmailTarget + +Update a Signals email target by ID + +## Example Usage + +```typescript +import { UpdateSignalsEmailTarget } from "firehydrant/models/components"; + +let value: UpdateSignalsEmailTarget = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The email target's name. | +| `slug` | *string* | :heavy_minus_sign: | The email address that will be listening to events. | +| `description` | *string* | :heavy_minus_sign: | A detailed description of the email target. | +| `target` | [components.UpdateSignalsEmailTargetTarget](../../models/components/updatesignalsemailtargettarget.md) | :heavy_minus_sign: | The target that the email target will notify. This object must contain a `type`
field that specifies the type of target and an `id` field that specifies the ID of
the target. The `type` field must be one of "escalation_policy", "on_call_schedule",
"team", "user", or "slack_channel".
| +| `allowedSenders` | *string*[] | :heavy_minus_sign: | A list of email addresses that are allowed to send events to the target. Must be exact match. | +| `statusCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the status of an incoming email that is sent to the target. | +| `levelCel` | *string* | :heavy_minus_sign: | The CEL expression that defines the level of an incoming email that is sent to the target. | +| `rules` | *string*[] | :heavy_minus_sign: | A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. | +| `ruleMatchingStrategy` | [components.UpdateSignalsEmailTargetRuleMatchingStrategy](../../models/components/updatesignalsemailtargetrulematchingstrategy.md) | :heavy_minus_sign: | Whether or not all rules must match, or if only one rule must match. | \ No newline at end of file diff --git a/docs/models/components/updatesignalsemailtargetrulematchingstrategy.md b/docs/models/components/updatesignalsemailtargetrulematchingstrategy.md new file mode 100644 index 00000000..fe5c215a --- /dev/null +++ b/docs/models/components/updatesignalsemailtargetrulematchingstrategy.md @@ -0,0 +1,17 @@ +# UpdateSignalsEmailTargetRuleMatchingStrategy + +Whether or not all rules must match, or if only one rule must match. + +## Example Usage + +```typescript +import { UpdateSignalsEmailTargetRuleMatchingStrategy } from "firehydrant/models/components"; + +let value: UpdateSignalsEmailTargetRuleMatchingStrategy = "all"; +``` + +## Values + +```typescript +"all" | "any" +``` \ No newline at end of file diff --git a/docs/models/components/updatesignalsemailtargettarget.md b/docs/models/components/updatesignalsemailtargettarget.md new file mode 100644 index 00000000..90cc01a0 --- /dev/null +++ b/docs/models/components/updatesignalsemailtargettarget.md @@ -0,0 +1,25 @@ +# UpdateSignalsEmailTargetTarget + +The target that the email target will notify. This object must contain a `type` +field that specifies the type of target and an `id` field that specifies the ID of +the target. The `type` field must be one of "escalation_policy", "on_call_schedule", +"team", "user", or "slack_channel". + + +## Example Usage + +```typescript +import { UpdateSignalsEmailTargetTarget } from "firehydrant/models/components"; + +let value: UpdateSignalsEmailTargetTarget = { + type: "Webhook", + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `type` | [components.UpdateSignalsEmailTargetType](../../models/components/updatesignalsemailtargettype.md) | :heavy_check_mark: | The type of target that the inbound email will notify when matched. | +| `id` | *string* | :heavy_check_mark: | The ID of the target that the inbound email will notify when matched. | \ No newline at end of file diff --git a/docs/models/components/updatesignalsemailtargettype.md b/docs/models/components/updatesignalsemailtargettype.md new file mode 100644 index 00000000..c8860ba0 --- /dev/null +++ b/docs/models/components/updatesignalsemailtargettype.md @@ -0,0 +1,17 @@ +# UpdateSignalsEmailTargetType + +The type of target that the inbound email will notify when matched. + +## Example Usage + +```typescript +import { UpdateSignalsEmailTargetType } from "firehydrant/models/components"; + +let value: UpdateSignalsEmailTargetType = "EntireTeam"; +``` + +## Values + +```typescript +"Team" | "EntireTeam" | "EscalationPolicy" | "OnCallSchedule" | "User" | "SlackChannel" | "Webhook" +``` \ No newline at end of file diff --git a/docs/models/components/updatesignalswebhooktarget.md b/docs/models/components/updatesignalswebhooktarget.md new file mode 100644 index 00000000..9b36abc1 --- /dev/null +++ b/docs/models/components/updatesignalswebhooktarget.md @@ -0,0 +1,20 @@ +# UpdateSignalsWebhookTarget + +Update a Signals webhook target by ID + +## Example Usage + +```typescript +import { UpdateSignalsWebhookTarget } from "firehydrant/models/components"; + +let value: UpdateSignalsWebhookTarget = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The webhook target's name. | +| `description` | *string* | :heavy_minus_sign: | An optional detailed description of the webhook target. | +| `url` | *string* | :heavy_minus_sign: | The URL that the webhook target will notify. | +| `signingKey` | *string* | :heavy_minus_sign: | An optional secret we will provide in the `FH-Signature` header
when sending a payload to the webhook target. This key will not be
shown in any response once configured.
| \ No newline at end of file diff --git a/docs/models/components/updatestatuspageconnection.md b/docs/models/components/updatestatuspageconnection.md new file mode 100644 index 00000000..2420461a --- /dev/null +++ b/docs/models/components/updatestatuspageconnection.md @@ -0,0 +1,20 @@ +# UpdateStatuspageConnection + +Update the given Statuspage integration connection. + +## Example Usage + +```typescript +import { UpdateStatuspageConnection } from "firehydrant/models/components"; + +let value: UpdateStatuspageConnection = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `pageId` | *string* | :heavy_minus_sign: | N/A | +| `severities` | [components.UpdateStatuspageConnectionSeverity](../../models/components/updatestatuspageconnectionseverity.md)[] | :heavy_minus_sign: | N/A | +| `conditions` | [components.Condition](../../models/components/condition.md)[] | :heavy_minus_sign: | N/A | +| `milestoneMappings` | [components.MilestoneMapping](../../models/components/milestonemapping.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatestatuspageconnectionseverity.md b/docs/models/components/updatestatuspageconnectionseverity.md new file mode 100644 index 00000000..23803d55 --- /dev/null +++ b/docs/models/components/updatestatuspageconnectionseverity.md @@ -0,0 +1,19 @@ +# UpdateStatuspageConnectionSeverity + +## Example Usage + +```typescript +import { UpdateStatuspageConnectionSeverity } from "firehydrant/models/components"; + +let value: UpdateStatuspageConnectionSeverity = { + severitySlug: "", + remoteStatus: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `severitySlug` | *string* | :heavy_check_mark: | FireHydrant severity slug | +| `remoteStatus` | *string* | :heavy_check_mark: | Statuspage.io severity name | \ No newline at end of file diff --git a/docs/models/components/updatestatuspageconnectionstatus.md b/docs/models/components/updatestatuspageconnectionstatus.md new file mode 100644 index 00000000..69ced6be --- /dev/null +++ b/docs/models/components/updatestatuspageconnectionstatus.md @@ -0,0 +1,17 @@ +# UpdateStatuspageConnectionStatus + +Statuspage.io status + +## Example Usage + +```typescript +import { UpdateStatuspageConnectionStatus } from "firehydrant/models/components"; + +let value: UpdateStatuspageConnectionStatus = "investigating"; +``` + +## Values + +```typescript +"investigating" | "identified" | "monitoring" | "resolved" +``` \ No newline at end of file diff --git a/docs/models/components/updatestatusupdatetemplate.md b/docs/models/components/updatestatusupdatetemplate.md new file mode 100644 index 00000000..fcfb3e13 --- /dev/null +++ b/docs/models/components/updatestatusupdatetemplate.md @@ -0,0 +1,18 @@ +# UpdateStatusUpdateTemplate + +Update a single status update template + +## Example Usage + +```typescript +import { UpdateStatusUpdateTemplate } from "firehydrant/models/components"; + +let value: UpdateStatusUpdateTemplate = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `body` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatetasklist.md b/docs/models/components/updatetasklist.md new file mode 100644 index 00000000..077c865d --- /dev/null +++ b/docs/models/components/updatetasklist.md @@ -0,0 +1,19 @@ +# UpdateTaskList + +Updates a task list's attributes and task list items + +## Example Usage + +```typescript +import { UpdateTaskList } from "firehydrant/models/components"; + +let value: UpdateTaskList = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `taskListItems` | [components.UpdateTaskListTaskListItem](../../models/components/updatetasklisttasklistitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatetasklisttasklistitem.md b/docs/models/components/updatetasklisttasklistitem.md new file mode 100644 index 00000000..49b09e30 --- /dev/null +++ b/docs/models/components/updatetasklisttasklistitem.md @@ -0,0 +1,18 @@ +# UpdateTaskListTaskListItem + +## Example Usage + +```typescript +import { UpdateTaskListTaskListItem } from "firehydrant/models/components"; + +let value: UpdateTaskListTaskListItem = { + summary: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `summary` | *string* | :heavy_check_mark: | A summary of the task | +| `description` | *string* | :heavy_minus_sign: | A long-form description for the task if additional context is helpful | \ No newline at end of file diff --git a/docs/models/components/updateteam.md b/docs/models/components/updateteam.md new file mode 100644 index 00000000..8fed5da3 --- /dev/null +++ b/docs/models/components/updateteam.md @@ -0,0 +1,23 @@ +# UpdateTeam + +Update a single team from its ID + +## Example Usage + +```typescript +import { UpdateTeam } from "firehydrant/models/components"; + +let value: UpdateTeam = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `slackChannelId` | *string* | :heavy_minus_sign: | The Slack channel ID associated with this team. This may be the reference in FireHydrant's system (i.e. UUID) or the ID value from Slack (e.g. C1234567890).
| +| `msTeamsChannel` | [components.UpdateTeamMsTeamsChannel](../../models/components/updateteammsteamschannel.md) | :heavy_minus_sign: | MS Teams channel identity for channel associated with this team | +| `memberships` | [components.UpdateTeamMembership](../../models/components/updateteammembership.md)[] | :heavy_minus_sign: | N/A | +| `inviteEmails` | *string*[] | :heavy_minus_sign: | A list of email addresses to invite to join the organization and automatically add to this team. If an email already has a pending invitation, the team will be added to their existing invitation. | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicy.md b/docs/models/components/updateteamescalationpolicy.md new file mode 100644 index 00000000..88ee8e6a --- /dev/null +++ b/docs/models/components/updateteamescalationpolicy.md @@ -0,0 +1,24 @@ +# UpdateTeamEscalationPolicy + +Update a Signals escalation policy by ID + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicy } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicy = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | The escalation policy's name. | +| `description` | *string* | :heavy_minus_sign: | A detailed description of the escalation policy. | +| `repetitions` | *number* | :heavy_minus_sign: | The number of times that the escalation policy should repeat before an alert is dropped. | +| `default` | *boolean* | :heavy_minus_sign: | Whether this escalation policy should be the default for the team. | +| `stepStrategy` | *string* | :heavy_minus_sign: | The strategy for handling steps in the escalation policy. Can be "static" or "dynamic_by_priority". | +| `steps` | [components.UpdateTeamEscalationPolicyStep](../../models/components/updateteamescalationpolicystep.md)[] | :heavy_minus_sign: | A list of steps that define how an alert should escalate through the policy. | +| `handoffStep` | [components.UpdateTeamEscalationPolicyHandoffStep](../../models/components/updateteamescalationpolicyhandoffstep.md) | :heavy_minus_sign: | A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. | +| `prioritizedSettings` | [components.UpdateTeamEscalationPolicyPrioritizedSettings](../../models/components/updateteamescalationpolicyprioritizedsettings.md) | :heavy_minus_sign: | Priority-specific settings for dynamic escalation policies | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicydistributiontype.md b/docs/models/components/updateteamescalationpolicydistributiontype.md new file mode 100644 index 00000000..22677d07 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicydistributiontype.md @@ -0,0 +1,17 @@ +# UpdateTeamEscalationPolicyDistributionType + +The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyDistributionType } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyDistributionType = "round_robin_by_alert"; +``` + +## Values + +```typescript +"unspecified" | "round_robin_by_alert" | "round_robin_by_escalation_policy" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicyhandoffstep.md b/docs/models/components/updateteamescalationpolicyhandoffstep.md new file mode 100644 index 00000000..04dbed89 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicyhandoffstep.md @@ -0,0 +1,21 @@ +# UpdateTeamEscalationPolicyHandoffStep + +A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyHandoffStep } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyHandoffStep = { + targetType: "Team", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `targetType` | [components.UpdateTeamEscalationPolicyTargetType](../../models/components/updateteamescalationpolicytargettype.md) | :heavy_check_mark: | The type of target to which the policy will hand off. | +| `targetId` | *string* | :heavy_check_mark: | The ID of the target to which the policy will hand off. | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicyhigh.md b/docs/models/components/updateteamescalationpolicyhigh.md new file mode 100644 index 00000000..f8072d40 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicyhigh.md @@ -0,0 +1,18 @@ +# UpdateTeamEscalationPolicyHigh + +Settings for HIGH priority alerts + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyHigh } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyHigh = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `repetitions` | *number* | :heavy_minus_sign: | Number of repetitions for HIGH priority alerts | +| `handoffStep` | [components.UpdateTeamEscalationPolicyHighHandoffStep](../../models/components/updateteamescalationpolicyhighhandoffstep.md) | :heavy_minus_sign: | Handoff step for HIGH priority alerts | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicyhighhandoffstep.md b/docs/models/components/updateteamescalationpolicyhighhandoffstep.md new file mode 100644 index 00000000..c5bbae6c --- /dev/null +++ b/docs/models/components/updateteamescalationpolicyhighhandoffstep.md @@ -0,0 +1,21 @@ +# UpdateTeamEscalationPolicyHighHandoffStep + +Handoff step for HIGH priority alerts + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyHighHandoffStep } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyHighHandoffStep = { + targetType: "EscalationPolicy", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `targetType` | [components.UpdateTeamEscalationPolicyHighTargetType](../../models/components/updateteamescalationpolicyhightargettype.md) | :heavy_check_mark: | N/A | +| `targetId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicyhightargettype.md b/docs/models/components/updateteamescalationpolicyhightargettype.md new file mode 100644 index 00000000..411259f3 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicyhightargettype.md @@ -0,0 +1,15 @@ +# UpdateTeamEscalationPolicyHighTargetType + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyHighTargetType } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyHighTargetType = "EscalationPolicy"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicylow.md b/docs/models/components/updateteamescalationpolicylow.md new file mode 100644 index 00000000..50669f50 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicylow.md @@ -0,0 +1,18 @@ +# UpdateTeamEscalationPolicyLow + +Settings for LOW priority alerts + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyLow } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyLow = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `repetitions` | *number* | :heavy_minus_sign: | Number of repetitions for LOW priority alerts | +| `handoffStep` | [components.UpdateTeamEscalationPolicyLowHandoffStep](../../models/components/updateteamescalationpolicylowhandoffstep.md) | :heavy_minus_sign: | Handoff step for LOW priority alerts | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicylowhandoffstep.md b/docs/models/components/updateteamescalationpolicylowhandoffstep.md new file mode 100644 index 00000000..c405c428 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicylowhandoffstep.md @@ -0,0 +1,21 @@ +# UpdateTeamEscalationPolicyLowHandoffStep + +Handoff step for LOW priority alerts + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyLowHandoffStep } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyLowHandoffStep = { + targetType: "EscalationPolicy", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `targetType` | [components.UpdateTeamEscalationPolicyLowTargetType](../../models/components/updateteamescalationpolicylowtargettype.md) | :heavy_check_mark: | N/A | +| `targetId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicylowtargettype.md b/docs/models/components/updateteamescalationpolicylowtargettype.md new file mode 100644 index 00000000..c8b3fba5 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicylowtargettype.md @@ -0,0 +1,15 @@ +# UpdateTeamEscalationPolicyLowTargetType + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyLowTargetType } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyLowTargetType = "EscalationPolicy"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicymedium.md b/docs/models/components/updateteamescalationpolicymedium.md new file mode 100644 index 00000000..b513c223 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicymedium.md @@ -0,0 +1,18 @@ +# UpdateTeamEscalationPolicyMedium + +Settings for MEDIUM priority alerts + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyMedium } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyMedium = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `repetitions` | *number* | :heavy_minus_sign: | Number of repetitions for MEDIUM priority alerts | +| `handoffStep` | [components.UpdateTeamEscalationPolicyMediumHandoffStep](../../models/components/updateteamescalationpolicymediumhandoffstep.md) | :heavy_minus_sign: | Handoff step for MEDIUM priority alerts | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicymediumhandoffstep.md b/docs/models/components/updateteamescalationpolicymediumhandoffstep.md new file mode 100644 index 00000000..25681fba --- /dev/null +++ b/docs/models/components/updateteamescalationpolicymediumhandoffstep.md @@ -0,0 +1,21 @@ +# UpdateTeamEscalationPolicyMediumHandoffStep + +Handoff step for MEDIUM priority alerts + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyMediumHandoffStep } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyMediumHandoffStep = { + targetType: "EscalationPolicy", + targetId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `targetType` | [components.UpdateTeamEscalationPolicyMediumTargetType](../../models/components/updateteamescalationpolicymediumtargettype.md) | :heavy_check_mark: | N/A | +| `targetId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicymediumtargettype.md b/docs/models/components/updateteamescalationpolicymediumtargettype.md new file mode 100644 index 00000000..e6fba69f --- /dev/null +++ b/docs/models/components/updateteamescalationpolicymediumtargettype.md @@ -0,0 +1,15 @@ +# UpdateTeamEscalationPolicyMediumTargetType + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyMediumTargetType } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyMediumTargetType = "EscalationPolicy"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicyprioritizedsettings.md b/docs/models/components/updateteamescalationpolicyprioritizedsettings.md new file mode 100644 index 00000000..c9ee6b93 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicyprioritizedsettings.md @@ -0,0 +1,19 @@ +# UpdateTeamEscalationPolicyPrioritizedSettings + +Priority-specific settings for dynamic escalation policies + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyPrioritizedSettings } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyPrioritizedSettings = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `high` | [components.UpdateTeamEscalationPolicyHigh](../../models/components/updateteamescalationpolicyhigh.md) | :heavy_minus_sign: | Settings for HIGH priority alerts | +| `medium` | [components.UpdateTeamEscalationPolicyMedium](../../models/components/updateteamescalationpolicymedium.md) | :heavy_minus_sign: | Settings for MEDIUM priority alerts | +| `low` | [components.UpdateTeamEscalationPolicyLow](../../models/components/updateteamescalationpolicylow.md) | :heavy_minus_sign: | Settings for LOW priority alerts | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicystep.md b/docs/models/components/updateteamescalationpolicystep.md new file mode 100644 index 00000000..096cbafa --- /dev/null +++ b/docs/models/components/updateteamescalationpolicystep.md @@ -0,0 +1,20 @@ +# UpdateTeamEscalationPolicyStep + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyStep } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyStep = { + timeout: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `targets` | [components.UpdateTeamEscalationPolicyTarget](../../models/components/updateteamescalationpolicytarget.md)[] | :heavy_minus_sign: | A list of targets that the step will notify. You can specify up to 15 targets per step. | +| `timeout` | *string* | :heavy_check_mark: | An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. | +| `distributionType` | [components.UpdateTeamEscalationPolicyDistributionType](../../models/components/updateteamescalationpolicydistributiontype.md) | :heavy_minus_sign: | The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. | +| `priorities` | *string*[] | :heavy_minus_sign: | A list of priorities (HIGH, MEDIUM, LOW) to which the step applies when using a dynamic escalation policy. | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicytarget.md b/docs/models/components/updateteamescalationpolicytarget.md new file mode 100644 index 00000000..ce4250f2 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicytarget.md @@ -0,0 +1,19 @@ +# UpdateTeamEscalationPolicyTarget + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyTarget } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyTarget = { + type: "User", + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `type` | [components.UpdateTeamEscalationPolicyType](../../models/components/updateteamescalationpolicytype.md) | :heavy_check_mark: | The type of target that the step will notify. | +| `id` | *string* | :heavy_check_mark: | The ID of the target that the step will notify. | \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicytargettype.md b/docs/models/components/updateteamescalationpolicytargettype.md new file mode 100644 index 00000000..2c6a79ee --- /dev/null +++ b/docs/models/components/updateteamescalationpolicytargettype.md @@ -0,0 +1,17 @@ +# UpdateTeamEscalationPolicyTargetType + +The type of target to which the policy will hand off. + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyTargetType } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyTargetType = "EscalationPolicy"; +``` + +## Values + +```typescript +"EscalationPolicy" | "Team" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamescalationpolicytype.md b/docs/models/components/updateteamescalationpolicytype.md new file mode 100644 index 00000000..151716b0 --- /dev/null +++ b/docs/models/components/updateteamescalationpolicytype.md @@ -0,0 +1,17 @@ +# UpdateTeamEscalationPolicyType + +The type of target that the step will notify. + +## Example Usage + +```typescript +import { UpdateTeamEscalationPolicyType } from "firehydrant/models/components"; + +let value: UpdateTeamEscalationPolicyType = "EntireTeam"; +``` + +## Values + +```typescript +"OnCallSchedule" | "User" | "SlackChannel" | "EntireTeam" | "Webhook" +``` \ No newline at end of file diff --git a/docs/models/components/updateteammembership.md b/docs/models/components/updateteammembership.md new file mode 100644 index 00000000..bd73bec1 --- /dev/null +++ b/docs/models/components/updateteammembership.md @@ -0,0 +1,17 @@ +# UpdateTeamMembership + +## Example Usage + +```typescript +import { UpdateTeamMembership } from "firehydrant/models/components"; + +let value: UpdateTeamMembership = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `userId` | *string* | :heavy_minus_sign: | N/A | +| `scheduleId` | *string* | :heavy_minus_sign: | N/A | +| `incidentRoleId` | *string* | :heavy_minus_sign: | An incident role ID that this user will automatically assigned if this team is assigned to an incident | \ No newline at end of file diff --git a/docs/models/components/updateteammsteamschannel.md b/docs/models/components/updateteammsteamschannel.md new file mode 100644 index 00000000..57744dbb --- /dev/null +++ b/docs/models/components/updateteammsteamschannel.md @@ -0,0 +1,21 @@ +# UpdateTeamMsTeamsChannel + +MS Teams channel identity for channel associated with this team + +## Example Usage + +```typescript +import { UpdateTeamMsTeamsChannel } from "firehydrant/models/components"; + +let value: UpdateTeamMsTeamsChannel = { + channelId: "", + msTeamId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `channelId` | *string* | :heavy_check_mark: | N/A | +| `msTeamId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/updateteamoncallschedule.md b/docs/models/components/updateteamoncallschedule.md new file mode 100644 index 00000000..4172a56d --- /dev/null +++ b/docs/models/components/updateteamoncallschedule.md @@ -0,0 +1,26 @@ +# UpdateTeamOnCallSchedule + +Update a Signals on-call schedule by ID + +## Example Usage + +```typescript +import { UpdateTeamOnCallSchedule } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallSchedule = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | The on-call schedule's name. | +| `description` | *string* | :heavy_minus_sign: | A detailed description of the on-call schedule. | +| `timeZone` | *string* | :heavy_minus_sign: | The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. | +| `slackUserGroupId` | *string* | :heavy_minus_sign: | The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. | +| `members` | [components.UpdateTeamOnCallScheduleMember](../../models/components/updateteamoncallschedulemember.md)[] | :heavy_minus_sign: | An ordered list of objects that specify members of the on-call schedule's rotation. | +| `strategy` | [components.UpdateTeamOnCallScheduleStrategy](../../models/components/updateteamoncallschedulestrategy.md) | :heavy_minus_sign: | An object that specifies how the schedule's on-call shifts should be generated. | +| `restrictions` | [components.UpdateTeamOnCallScheduleRestriction](../../models/components/updateteamoncallschedulerestriction.md)[] | :heavy_minus_sign: | A list of objects that restrict the schedule to speccific on-call periods. | +| `effectiveAt` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when the updated schedule should take effect. This
value must be provided if editing an attribute that would affect how the schedule's
shifts are generated, such as the time zone, members, strategy, or restrictions.
| +| `color` | *string* | :heavy_minus_sign: | A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. | +| `memberIds` | *string*[] | :heavy_minus_sign: | This parameter is deprecated; use `members` instead. | \ No newline at end of file diff --git a/docs/models/components/updateteamoncallscheduleendday.md b/docs/models/components/updateteamoncallscheduleendday.md new file mode 100644 index 00000000..f32c3097 --- /dev/null +++ b/docs/models/components/updateteamoncallscheduleendday.md @@ -0,0 +1,17 @@ +# UpdateTeamOnCallScheduleEndDay + +The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + +## Example Usage + +```typescript +import { UpdateTeamOnCallScheduleEndDay } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallScheduleEndDay = "sunday"; +``` + +## Values + +```typescript +"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamoncallschedulehandoffday.md b/docs/models/components/updateteamoncallschedulehandoffday.md new file mode 100644 index 00000000..1ab779eb --- /dev/null +++ b/docs/models/components/updateteamoncallschedulehandoffday.md @@ -0,0 +1,17 @@ +# UpdateTeamOnCallScheduleHandoffDay + +The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + +## Example Usage + +```typescript +import { UpdateTeamOnCallScheduleHandoffDay } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallScheduleHandoffDay = "monday"; +``` + +## Values + +```typescript +"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamoncallschedulemember.md b/docs/models/components/updateteamoncallschedulemember.md new file mode 100644 index 00000000..3058485e --- /dev/null +++ b/docs/models/components/updateteamoncallschedulemember.md @@ -0,0 +1,15 @@ +# UpdateTeamOnCallScheduleMember + +## Example Usage + +```typescript +import { UpdateTeamOnCallScheduleMember } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallScheduleMember = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `userId` | *string* | :heavy_minus_sign: | The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule
multiple times to construct more complex rotations, and you can specify a `null` user ID to create
unassigned slots in the rotation.
| \ No newline at end of file diff --git a/docs/models/components/updateteamoncallschedulerestriction.md b/docs/models/components/updateteamoncallschedulerestriction.md new file mode 100644 index 00000000..38912983 --- /dev/null +++ b/docs/models/components/updateteamoncallschedulerestriction.md @@ -0,0 +1,23 @@ +# UpdateTeamOnCallScheduleRestriction + +## Example Usage + +```typescript +import { UpdateTeamOnCallScheduleRestriction } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallScheduleRestriction = { + startDay: "saturday", + startTime: "", + endDay: "friday", + endTime: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `startDay` | [components.UpdateTeamOnCallScheduleStartDay](../../models/components/updateteamoncallschedulestartday.md) | :heavy_check_mark: | The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). | +| `startTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should start. | +| `endDay` | [components.UpdateTeamOnCallScheduleEndDay](../../models/components/updateteamoncallscheduleendday.md) | :heavy_check_mark: | The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). | +| `endTime` | *string* | :heavy_check_mark: | An ISO8601 time string specifying when the restriction should end. | \ No newline at end of file diff --git a/docs/models/components/updateteamoncallschedulestartday.md b/docs/models/components/updateteamoncallschedulestartday.md new file mode 100644 index 00000000..8e14ad0b --- /dev/null +++ b/docs/models/components/updateteamoncallschedulestartday.md @@ -0,0 +1,17 @@ +# UpdateTeamOnCallScheduleStartDay + +The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + +## Example Usage + +```typescript +import { UpdateTeamOnCallScheduleStartDay } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallScheduleStartDay = "thursday"; +``` + +## Values + +```typescript +"monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamoncallschedulestrategy.md b/docs/models/components/updateteamoncallschedulestrategy.md new file mode 100644 index 00000000..4a4a81c8 --- /dev/null +++ b/docs/models/components/updateteamoncallschedulestrategy.md @@ -0,0 +1,22 @@ +# UpdateTeamOnCallScheduleStrategy + +An object that specifies how the schedule's on-call shifts should be generated. + +## Example Usage + +```typescript +import { UpdateTeamOnCallScheduleStrategy } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallScheduleStrategy = { + type: "daily", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [components.UpdateTeamOnCallScheduleType](../../models/components/updateteamoncallscheduletype.md) | :heavy_check_mark: | The type of strategy. Must be one of "daily", "weekly", or "custom". | +| `handoffTime` | *string* | :heavy_minus_sign: | An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". | +| `handoffDay` | [components.UpdateTeamOnCallScheduleHandoffDay](../../models/components/updateteamoncallschedulehandoffday.md) | :heavy_minus_sign: | The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". | +| `shiftDuration` | *string* | :heavy_minus_sign: | An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". | \ No newline at end of file diff --git a/docs/models/components/updateteamoncallscheduletype.md b/docs/models/components/updateteamoncallscheduletype.md new file mode 100644 index 00000000..15826c53 --- /dev/null +++ b/docs/models/components/updateteamoncallscheduletype.md @@ -0,0 +1,17 @@ +# UpdateTeamOnCallScheduleType + +The type of strategy. Must be one of "daily", "weekly", or "custom". + +## Example Usage + +```typescript +import { UpdateTeamOnCallScheduleType } from "firehydrant/models/components"; + +let value: UpdateTeamOnCallScheduleType = "daily"; +``` + +## Values + +```typescript +"daily" | "weekly" | "custom" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamsignalrule.md b/docs/models/components/updateteamsignalrule.md new file mode 100644 index 00000000..1b561f1b --- /dev/null +++ b/docs/models/components/updateteamsignalrule.md @@ -0,0 +1,24 @@ +# UpdateTeamSignalRule + +Update a Signals rule by ID + +## Example Usage + +```typescript +import { UpdateTeamSignalRule } from "firehydrant/models/components"; + +let value: UpdateTeamSignalRule = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | The rule's name. | +| `expression` | *string* | :heavy_minus_sign: | The CEL expression that defines the rule. | +| `targetType` | [components.UpdateTeamSignalRuleTargetType](../../models/components/updateteamsignalruletargettype.md) | :heavy_minus_sign: | The type of target that the rule will notify when matched. | +| `targetId` | *string* | :heavy_minus_sign: | The ID of the target that the rule will notify when matched. | +| `incidentTypeId` | *string* | :heavy_minus_sign: | The ID of an incident type that should be used when an alert is promoted to an incident | +| `notificationPriorityOverride` | [components.UpdateTeamSignalRuleNotificationPriorityOverride](../../models/components/updateteamsignalrulenotificationpriorityoverride.md) | :heavy_minus_sign: | A notification priority that will be set on the resulting alert (default: HIGH) | +| `createIncidentConditionWhen` | [components.UpdateTeamSignalRuleCreateIncidentConditionWhen](../../models/components/updateteamsignalrulecreateincidentconditionwhen.md) | :heavy_minus_sign: | Determines when an incident should be created when this rule is matched | +| `deduplicationExpiry` | *string* | :heavy_minus_sign: | The amount of time alerts created from this rule will be deduplicated | \ No newline at end of file diff --git a/docs/models/components/updateteamsignalrulecreateincidentconditionwhen.md b/docs/models/components/updateteamsignalrulecreateincidentconditionwhen.md new file mode 100644 index 00000000..762f3798 --- /dev/null +++ b/docs/models/components/updateteamsignalrulecreateincidentconditionwhen.md @@ -0,0 +1,17 @@ +# UpdateTeamSignalRuleCreateIncidentConditionWhen + +Determines when an incident should be created when this rule is matched + +## Example Usage + +```typescript +import { UpdateTeamSignalRuleCreateIncidentConditionWhen } from "firehydrant/models/components"; + +let value: UpdateTeamSignalRuleCreateIncidentConditionWhen = "WHEN_UNSPECIFIED"; +``` + +## Values + +```typescript +"WHEN_UNSPECIFIED" | "WHEN_ALWAYS" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamsignalrulenotificationpriorityoverride.md b/docs/models/components/updateteamsignalrulenotificationpriorityoverride.md new file mode 100644 index 00000000..da3dff07 --- /dev/null +++ b/docs/models/components/updateteamsignalrulenotificationpriorityoverride.md @@ -0,0 +1,17 @@ +# UpdateTeamSignalRuleNotificationPriorityOverride + +A notification priority that will be set on the resulting alert (default: HIGH) + +## Example Usage + +```typescript +import { UpdateTeamSignalRuleNotificationPriorityOverride } from "firehydrant/models/components"; + +let value: UpdateTeamSignalRuleNotificationPriorityOverride = "LOW"; +``` + +## Values + +```typescript +"HIGH" | "MEDIUM" | "LOW" | "" +``` \ No newline at end of file diff --git a/docs/models/components/updateteamsignalruletargettype.md b/docs/models/components/updateteamsignalruletargettype.md new file mode 100644 index 00000000..e0bab613 --- /dev/null +++ b/docs/models/components/updateteamsignalruletargettype.md @@ -0,0 +1,17 @@ +# UpdateTeamSignalRuleTargetType + +The type of target that the rule will notify when matched. + +## Example Usage + +```typescript +import { UpdateTeamSignalRuleTargetType } from "firehydrant/models/components"; + +let value: UpdateTeamSignalRuleTargetType = "SlackChannel"; +``` + +## Values + +```typescript +"EscalationPolicy" | "OnCallSchedule" | "User" | "Webhook" | "SlackChannel" +``` \ No newline at end of file diff --git a/docs/models/components/updateticket.md b/docs/models/components/updateticket.md new file mode 100644 index 00000000..24066ad2 --- /dev/null +++ b/docs/models/components/updateticket.md @@ -0,0 +1,22 @@ +# UpdateTicket + +Update a ticket's attributes + +## Example Usage + +```typescript +import { UpdateTicket } from "firehydrant/models/components"; + +let value: UpdateTicket = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `summary` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `state` | *string* | :heavy_minus_sign: | N/A | +| `type` | *string* | :heavy_minus_sign: | N/A | +| `priorityId` | *string* | :heavy_minus_sign: | N/A | +| `tagList` | *string*[] | :heavy_minus_sign: | List of tags for the ticket | \ No newline at end of file diff --git a/docs/models/components/updateticketingpriority.md b/docs/models/components/updateticketingpriority.md new file mode 100644 index 00000000..96aa7a3d --- /dev/null +++ b/docs/models/components/updateticketingpriority.md @@ -0,0 +1,18 @@ +# UpdateTicketingPriority + +Update a single ticketing priority's attributes + +## Example Usage + +```typescript +import { UpdateTicketingPriority } from "firehydrant/models/components"; + +let value: UpdateTicketingPriority = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, this priority will shift that priority and all priorities down the list. | \ No newline at end of file diff --git a/docs/models/components/updatevote.md b/docs/models/components/updatevote.md new file mode 100644 index 00000000..ec207e2b --- /dev/null +++ b/docs/models/components/updatevote.md @@ -0,0 +1,19 @@ +# UpdateVote + +Upvote or downvote an object + +## Example Usage + +```typescript +import { UpdateVote } from "firehydrant/models/components"; + +let value: UpdateVote = { + direction: "down", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `direction` | [components.Direction](../../models/components/direction.md) | :heavy_check_mark: | The direction you would like to vote, or if you dig it | \ No newline at end of file diff --git a/docs/models/components/updatewebhook.md b/docs/models/components/updatewebhook.md new file mode 100644 index 00000000..ed54b5d7 --- /dev/null +++ b/docs/models/components/updatewebhook.md @@ -0,0 +1,18 @@ +# UpdateWebhook + +Update a specific webhook + +## Example Usage + +```typescript +import { UpdateWebhook } from "firehydrant/models/components"; + +let value: UpdateWebhook = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `url` | *string* | :heavy_minus_sign: | N/A | +| `state` | [components.UpdateWebhookState](../../models/components/updatewebhookstate.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/updatewebhookstate.md b/docs/models/components/updatewebhookstate.md new file mode 100644 index 00000000..a00f55a4 --- /dev/null +++ b/docs/models/components/updatewebhookstate.md @@ -0,0 +1,15 @@ +# UpdateWebhookState + +## Example Usage + +```typescript +import { UpdateWebhookState } from "firehydrant/models/components"; + +let value: UpdateWebhookState = "active"; +``` + +## Values + +```typescript +"active" | "inactive" +``` \ No newline at end of file diff --git a/docs/models/components/userdata.md b/docs/models/components/userdata.md index a298f0cc..2f3f9fd5 100644 --- a/docs/models/components/userdata.md +++ b/docs/models/components/userdata.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { UserData } from "firehydrant-typescript-sdk/models/components"; +import { UserData } from "firehydrant/models/components"; let value: UserData = {}; ``` diff --git a/docs/models/components/userentity.md b/docs/models/components/userentity.md index e3b4480f..b6a01d2c 100644 --- a/docs/models/components/userentity.md +++ b/docs/models/components/userentity.md @@ -5,7 +5,7 @@ UserEntity model ## Example Usage ```typescript -import { UserEntity } from "firehydrant-typescript-sdk/models/components"; +import { UserEntity } from "firehydrant/models/components"; let value: UserEntity = {}; ``` diff --git a/docs/models/components/userentitypaginated.md b/docs/models/components/userentitypaginated.md index 514a7305..b9e56280 100644 --- a/docs/models/components/userentitypaginated.md +++ b/docs/models/components/userentitypaginated.md @@ -5,14 +5,14 @@ UserEntityPaginated model ## Example Usage ```typescript -import { UserEntityPaginated } from "firehydrant-typescript-sdk/models/components"; +import { UserEntityPaginated } from "firehydrant/models/components"; let value: UserEntityPaginated = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `data` | [components.UserEntity](../../models/components/userentity.md)[] | :heavy_minus_sign: | N/A | -| `pagination` | [components.PaginationEntity](../../models/components/paginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `data` | [components.UserEntity](../../models/components/userentity.md)[] | :heavy_minus_sign: | N/A | +| `pagination` | [components.NullablePaginationEntity](../../models/components/nullablepaginationentity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/versions.md b/docs/models/components/versions.md index 4b5ac409..4bd77cc5 100644 --- a/docs/models/components/versions.md +++ b/docs/models/components/versions.md @@ -5,7 +5,7 @@ An object with keys that designate a specific version or size of the attachment ## Example Usage ```typescript -import { Versions } from "firehydrant-typescript-sdk/models/components"; +import { Versions } from "firehydrant/models/components"; let value: Versions = {}; ``` diff --git a/docs/models/components/versionsurls.md b/docs/models/components/versionsurls.md index b982b1bd..ff613370 100644 --- a/docs/models/components/versionsurls.md +++ b/docs/models/components/versionsurls.md @@ -5,7 +5,7 @@ An object with keys that can have different versions of an image ## Example Usage ```typescript -import { VersionsUrls } from "firehydrant-typescript-sdk/models/components"; +import { VersionsUrls } from "firehydrant/models/components"; let value: VersionsUrls = {}; ``` diff --git a/docs/models/components/visibility.md b/docs/models/components/visibility.md deleted file mode 100644 index 7755c272..00000000 --- a/docs/models/components/visibility.md +++ /dev/null @@ -1,15 +0,0 @@ -# Visibility - -## Example Usage - -```typescript -import { Visibility } from "firehydrant-typescript-sdk/models/components"; - -let value: Visibility = "open_to_public"; -``` - -## Values - -```typescript -"private_to_org" | "open_to_public" | "internal_status_page" -``` \ No newline at end of file diff --git a/docs/models/components/votedirection.md b/docs/models/components/votedirection.md index 0fc380d8..a5c6dbd0 100644 --- a/docs/models/components/votedirection.md +++ b/docs/models/components/votedirection.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { VoteDirection } from "firehydrant-typescript-sdk/models/components"; +import { VoteDirection } from "firehydrant/models/components"; let value: VoteDirection = "down"; ``` diff --git a/docs/models/components/votesentity.md b/docs/models/components/votesentity.md index 7be04cc3..ffbcf955 100644 --- a/docs/models/components/votesentity.md +++ b/docs/models/components/votesentity.md @@ -5,7 +5,7 @@ VotesEntity model ## Example Usage ```typescript -import { VotesEntity } from "firehydrant-typescript-sdk/models/components"; +import { VotesEntity } from "firehydrant/models/components"; let value: VotesEntity = {}; ``` diff --git a/docs/models/components/webhooksentitieswebhookentity.md b/docs/models/components/webhooksentitieswebhookentity.md index 010d9ecb..479f1df1 100644 --- a/docs/models/components/webhooksentitieswebhookentity.md +++ b/docs/models/components/webhooksentitieswebhookentity.md @@ -5,7 +5,7 @@ Webhooks_Entities_WebhookEntity model ## Example Usage ```typescript -import { WebhooksEntitiesWebhookEntity } from "firehydrant-typescript-sdk/models/components"; +import { WebhooksEntitiesWebhookEntity } from "firehydrant/models/components"; let value: WebhooksEntitiesWebhookEntity = {}; ``` @@ -17,7 +17,7 @@ let value: WebhooksEntitiesWebhookEntity = {}; | `id` | *string* | :heavy_minus_sign: | N/A | | `url` | *string* | :heavy_minus_sign: | N/A | | `state` | *string* | :heavy_minus_sign: | N/A | -| `createdBy` | [components.AuthorEntity](../../models/components/authorentity.md) | :heavy_minus_sign: | N/A | +| `createdBy` | [components.NullableAuthorEntity](../../models/components/nullableauthorentity.md) | :heavy_minus_sign: | N/A | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `updatedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | | `subscriptions` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/badrequest.md b/docs/models/errors/badrequest.md deleted file mode 100644 index e9cf8132..00000000 --- a/docs/models/errors/badrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# BadRequest - -A collection of codes that generally means the end user got something wrong in making the request - -## Example Usage - -```typescript -import { BadRequest } from "firehydrant-typescript-sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `message` | *string* | :heavy_minus_sign: | N/A | -| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/errorentity.md b/docs/models/errors/errorentity.md index 0a033b7b..a80d287a 100644 --- a/docs/models/errors/errorentity.md +++ b/docs/models/errors/errorentity.md @@ -5,7 +5,7 @@ ErrorEntity model ## Example Usage ```typescript -import { ErrorEntity } from "firehydrant-typescript-sdk/models/errors"; +import { ErrorEntity } from "firehydrant/models/errors"; // No examples available for this model ``` diff --git a/docs/models/errors/internalservererror.md b/docs/models/errors/internalservererror.md deleted file mode 100644 index 495f1bc1..00000000 --- a/docs/models/errors/internalservererror.md +++ /dev/null @@ -1,18 +0,0 @@ -# InternalServerError - -A collection of status codes that generally mean the server failed in an unexpected way - -## Example Usage - -```typescript -import { InternalServerError } from "firehydrant-typescript-sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `message` | *string* | :heavy_minus_sign: | N/A | -| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/meta.md b/docs/models/errors/meta.md index 27ff3ba7..b0849d61 100644 --- a/docs/models/errors/meta.md +++ b/docs/models/errors/meta.md @@ -5,7 +5,7 @@ An object with additional error metadata ## Example Usage ```typescript -import { Meta } from "firehydrant-typescript-sdk/models/errors"; +import { Meta } from "firehydrant/models/errors"; let value: Meta = {}; ``` diff --git a/docs/models/errors/notfound.md b/docs/models/errors/notfound.md deleted file mode 100644 index f9fa9f31..00000000 --- a/docs/models/errors/notfound.md +++ /dev/null @@ -1,18 +0,0 @@ -# NotFound - -Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing - -## Example Usage - -```typescript -import { NotFound } from "firehydrant-typescript-sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `message` | *string* | :heavy_minus_sign: | N/A | -| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/ratelimited.md b/docs/models/errors/ratelimited.md deleted file mode 100644 index c2c3a897..00000000 --- a/docs/models/errors/ratelimited.md +++ /dev/null @@ -1,18 +0,0 @@ -# RateLimited - -Status codes relating to the client being rate limited by the server - -## Example Usage - -```typescript -import { RateLimited } from "firehydrant-typescript-sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `message` | *string* | :heavy_minus_sign: | N/A | -| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/timeout.md b/docs/models/errors/timeout.md deleted file mode 100644 index 62b980ec..00000000 --- a/docs/models/errors/timeout.md +++ /dev/null @@ -1,18 +0,0 @@ -# Timeout - -Timeouts occurred with the request - -## Example Usage - -```typescript -import { Timeout } from "firehydrant-typescript-sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `message` | *string* | :heavy_minus_sign: | N/A | -| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/unauthorized.md b/docs/models/errors/unauthorized.md deleted file mode 100644 index caa3b7ab..00000000 --- a/docs/models/errors/unauthorized.md +++ /dev/null @@ -1,18 +0,0 @@ -# Unauthorized - -A collection of codes that generally means the client was not authenticated correctly for the request they want to make - -## Example Usage - -```typescript -import { Unauthorized } from "firehydrant-typescript-sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `message` | *string* | :heavy_minus_sign: | N/A | -| `additionalProperties` | Record | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/archiveaudiencerequest.md b/docs/models/operations/archiveaudiencerequest.md new file mode 100644 index 00000000..fb100815 --- /dev/null +++ b/docs/models/operations/archiveaudiencerequest.md @@ -0,0 +1,17 @@ +# ArchiveAudienceRequest + +## Example Usage + +```typescript +import { ArchiveAudienceRequest } from "firehydrant/models/operations"; + +let value: ArchiveAudienceRequest = { + audienceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `audienceId` | *string* | :heavy_check_mark: | Unique identifier of the audience | \ No newline at end of file diff --git a/docs/models/operations/archiveincidentrequest.md b/docs/models/operations/archiveincidentrequest.md deleted file mode 100644 index 70810eb9..00000000 --- a/docs/models/operations/archiveincidentrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ArchiveIncidentRequest - -## Example Usage - -```typescript -import { ArchiveIncidentRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ArchiveIncidentRequest = { - incidentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/archiveincidenttyperequest.md b/docs/models/operations/archiveincidenttyperequest.md deleted file mode 100644 index 9444192d..00000000 --- a/docs/models/operations/archiveincidenttyperequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ArchiveIncidentTypeRequest - -## Example Usage - -```typescript -import { ArchiveIncidentTypeRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ArchiveIncidentTypeRequest = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/archiveteamrequest.md b/docs/models/operations/archiveteamrequest.md deleted file mode 100644 index 9955ff43..00000000 --- a/docs/models/operations/archiveteamrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ArchiveTeamRequest - -## Example Usage - -```typescript -import { ArchiveTeamRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ArchiveTeamRequest = { - teamId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `teamId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/auditabletype.md b/docs/models/operations/auditabletype.md index 39c61cec..62438767 100644 --- a/docs/models/operations/auditabletype.md +++ b/docs/models/operations/auditabletype.md @@ -5,7 +5,7 @@ A query to filter audits by type ## Example Usage ```typescript -import { AuditableType } from "firehydrant-typescript-sdk/models/operations"; +import { AuditableType } from "firehydrant/models/operations"; let value: AuditableType = "Runbooks::Step"; ``` diff --git a/docs/models/operations/bucket.md b/docs/models/operations/bucket.md index 52cebee0..c7ab5999 100644 --- a/docs/models/operations/bucket.md +++ b/docs/models/operations/bucket.md @@ -5,7 +5,7 @@ String that determines how records are grouped ## Example Usage ```typescript -import { Bucket } from "firehydrant-typescript-sdk/models/operations"; +import { Bucket } from "firehydrant/models/operations"; let value: Bucket = "day"; ``` diff --git a/docs/models/operations/bucketsize.md b/docs/models/operations/bucketsize.md index 86416b83..396ef5d5 100644 --- a/docs/models/operations/bucketsize.md +++ b/docs/models/operations/bucketsize.md @@ -3,9 +3,9 @@ ## Example Usage ```typescript -import { BucketSize } from "firehydrant-typescript-sdk/models/operations"; +import { BucketSize } from "firehydrant/models/operations"; -let value: BucketSize = "all_time"; +let value: BucketSize = "day"; ``` ## Values diff --git a/docs/models/operations/bulkupdateincidentmilestonesrequest.md b/docs/models/operations/bulkupdateincidentmilestonesrequest.md new file mode 100644 index 00000000..e82e8fc7 --- /dev/null +++ b/docs/models/operations/bulkupdateincidentmilestonesrequest.md @@ -0,0 +1,26 @@ +# BulkUpdateIncidentMilestonesRequest + +## Example Usage + +```typescript +import { BulkUpdateIncidentMilestonesRequest } from "firehydrant/models/operations"; + +let value: BulkUpdateIncidentMilestonesRequest = { + incidentId: "", + bulkUpdateIncidentMilestones: { + milestones: [ + { + type: "", + occurredAt: new Date("2025-05-26T07:56:38.373Z"), + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `bulkUpdateIncidentMilestones` | [components.BulkUpdateIncidentMilestones](../../models/components/bulkupdateincidentmilestones.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/by.md b/docs/models/operations/by.md index d6efec16..5cdbf9af 100644 --- a/docs/models/operations/by.md +++ b/docs/models/operations/by.md @@ -3,9 +3,9 @@ ## Example Usage ```typescript -import { By } from "firehydrant-typescript-sdk/models/operations"; +import { By } from "firehydrant/models/operations"; -let value: By = "priority"; +let value: By = "total"; ``` ## Values diff --git a/docs/models/operations/closeincidentrequest.md b/docs/models/operations/closeincidentrequest.md index 99704140..ef29cbd3 100644 --- a/docs/models/operations/closeincidentrequest.md +++ b/docs/models/operations/closeincidentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { CloseIncidentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CloseIncidentRequest } from "firehydrant/models/operations"; let value: CloseIncidentRequest = { incidentId: "", diff --git a/docs/models/operations/convertincidenttaskrequest.md b/docs/models/operations/convertincidenttaskrequest.md new file mode 100644 index 00000000..504c14e8 --- /dev/null +++ b/docs/models/operations/convertincidenttaskrequest.md @@ -0,0 +1,21 @@ +# ConvertIncidentTaskRequest + +## Example Usage + +```typescript +import { ConvertIncidentTaskRequest } from "firehydrant/models/operations"; + +let value: ConvertIncidentTaskRequest = { + taskId: "", + incidentId: "", + convertIncidentTask: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `taskId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `convertIncidentTask` | [components.ConvertIncidentTask](../../models/components/convertincidenttask.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/convertincidenttasktofollowuprequest.md b/docs/models/operations/convertincidenttasktofollowuprequest.md deleted file mode 100644 index 36358c0d..00000000 --- a/docs/models/operations/convertincidenttasktofollowuprequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# ConvertIncidentTaskToFollowupRequest - -## Example Usage - -```typescript -import { ConvertIncidentTaskToFollowupRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ConvertIncidentTaskToFollowupRequest = { - taskId: "", - incidentId: "", - postV1IncidentsIncidentIdTasksTaskIdConvert: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `taskId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdTasksTaskIdConvert` | [components.PostV1IncidentsIncidentIdTasksTaskIdConvert](../../models/components/postv1incidentsincidentidtaskstaskidconvert.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createaudiencerequest.md b/docs/models/operations/createaudiencerequest.md new file mode 100644 index 00000000..433935c9 --- /dev/null +++ b/docs/models/operations/createaudiencerequest.md @@ -0,0 +1,29 @@ +# CreateAudienceRequest + +## Example Usage + +```typescript +import { CreateAudienceRequest } from "firehydrant/models/operations"; + +let value: CreateAudienceRequest = { + name: "", + description: "abaft fleck thigh", + detailsQuestion: [ + "", + ], + detailsPrompt: [ + "", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | Name of the audience (max 255 characters) | +| `description` | *string* | :heavy_check_mark: | Description of the audience (max 4000 characters) | +| `default` | *boolean* | :heavy_minus_sign: | Whether this is the default audience | +| `detailsQuestion` | *string*[] | :heavy_check_mark: | The incident detail question (max 255 characters) | +| `detailsPrompt` | *string*[] | :heavy_check_mark: | The prompt to display when collecting this detail | +| `detailsSlug` | *string*[] | :heavy_minus_sign: | Optional unique identifier for this detail | \ No newline at end of file diff --git a/docs/models/operations/createchangeidentityrequest.md b/docs/models/operations/createchangeidentityrequest.md index 8b5c9243..cf901a02 100644 --- a/docs/models/operations/createchangeidentityrequest.md +++ b/docs/models/operations/createchangeidentityrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateChangeIdentityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateChangeIdentityRequest } from "firehydrant/models/operations"; let value: CreateChangeIdentityRequest = { changeId: "", - postV1ChangesChangeIdIdentities: { + createChangeIdentity: { type: "", value: "", }, @@ -16,7 +16,7 @@ let value: CreateChangeIdentityRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `changeId` | *string* | :heavy_check_mark: | N/A | -| `postV1ChangesChangeIdIdentities` | [components.PostV1ChangesChangeIdIdentities](../../models/components/postv1changeschangeididentities.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `changeId` | *string* | :heavy_check_mark: | N/A | +| `createChangeIdentity` | [components.CreateChangeIdentity](../../models/components/createchangeidentity.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createcommentreactionrequest.md b/docs/models/operations/createcommentreactionrequest.md new file mode 100644 index 00000000..adcdd4b8 --- /dev/null +++ b/docs/models/operations/createcommentreactionrequest.md @@ -0,0 +1,23 @@ +# CreateCommentReactionRequest + +## Example Usage + +```typescript +import { CreateCommentReactionRequest } from "firehydrant/models/operations"; + +let value: CreateCommentReactionRequest = { + conversationId: "", + commentId: "", + createCommentReaction: { + reaction: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `conversationId` | *string* | :heavy_check_mark: | N/A | +| `commentId` | *string* | :heavy_check_mark: | N/A | +| `createCommentReaction` | [components.CreateCommentReaction](../../models/components/createcommentreaction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createcommentrequest.md b/docs/models/operations/createcommentrequest.md new file mode 100644 index 00000000..eedfec2b --- /dev/null +++ b/docs/models/operations/createcommentrequest.md @@ -0,0 +1,21 @@ +# CreateCommentRequest + +## Example Usage + +```typescript +import { CreateCommentRequest } from "firehydrant/models/operations"; + +let value: CreateCommentRequest = { + conversationId: "", + createComment: { + body: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `conversationId` | *string* | :heavy_check_mark: | N/A | +| `createComment` | [components.CreateComment](../../models/components/createcomment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createconnectionrequest.md b/docs/models/operations/createconnectionrequest.md new file mode 100644 index 00000000..095070ed --- /dev/null +++ b/docs/models/operations/createconnectionrequest.md @@ -0,0 +1,17 @@ +# CreateConnectionRequest + +## Example Usage + +```typescript +import { CreateConnectionRequest } from "firehydrant/models/operations"; + +let value: CreateConnectionRequest = { + slug: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createconversationcommentreactionrequest.md b/docs/models/operations/createconversationcommentreactionrequest.md deleted file mode 100644 index 3d07ee31..00000000 --- a/docs/models/operations/createconversationcommentreactionrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# CreateConversationCommentReactionRequest - -## Example Usage - -```typescript -import { CreateConversationCommentReactionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateConversationCommentReactionRequest = { - conversationId: "", - commentId: "", - postV1ConversationsConversationIdCommentsCommentIdReactions: { - reaction: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `conversationId` | *string* | :heavy_check_mark: | N/A | -| `commentId` | *string* | :heavy_check_mark: | N/A | -| `postV1ConversationsConversationIdCommentsCommentIdReactions` | [components.PostV1ConversationsConversationIdCommentsCommentIdReactions](../../models/components/postv1conversationsconversationidcommentscommentidreactions.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createconversationcommentrequest.md b/docs/models/operations/createconversationcommentrequest.md deleted file mode 100644 index e0c8ba0c..00000000 --- a/docs/models/operations/createconversationcommentrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateConversationCommentRequest - -## Example Usage - -```typescript -import { CreateConversationCommentRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateConversationCommentRequest = { - conversationId: "", - postV1ConversationsConversationIdComments: { - body: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `conversationId` | *string* | :heavy_check_mark: | N/A | -| `postV1ConversationsConversationIdComments` | [components.PostV1ConversationsConversationIdComments](../../models/components/postv1conversationsconversationidcomments.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createemailsubscriberrequest.md b/docs/models/operations/createemailsubscriberrequest.md new file mode 100644 index 00000000..807cbb8e --- /dev/null +++ b/docs/models/operations/createemailsubscriberrequest.md @@ -0,0 +1,21 @@ +# CreateEmailSubscriberRequest + +## Example Usage + +```typescript +import { CreateEmailSubscriberRequest } from "firehydrant/models/operations"; + +let value: CreateEmailSubscriberRequest = { + nuncConnectionId: "", + requestBody: { + emails: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.CreateEmailSubscriberRequestBody](../../models/operations/createemailsubscriberrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createemailsubscriberrequestbody.md b/docs/models/operations/createemailsubscriberrequestbody.md new file mode 100644 index 00000000..d758ee68 --- /dev/null +++ b/docs/models/operations/createemailsubscriberrequestbody.md @@ -0,0 +1,17 @@ +# CreateEmailSubscriberRequestBody + +## Example Usage + +```typescript +import { CreateEmailSubscriberRequestBody } from "firehydrant/models/operations"; + +let value: CreateEmailSubscriberRequestBody = { + emails: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `emails` | *string* | :heavy_check_mark: | A comma-separated list of emails to subscribe. | \ No newline at end of file diff --git a/docs/models/operations/createinboundfieldmaprequest.md b/docs/models/operations/createinboundfieldmaprequest.md new file mode 100644 index 00000000..77f724ca --- /dev/null +++ b/docs/models/operations/createinboundfieldmaprequest.md @@ -0,0 +1,17 @@ +# CreateInboundFieldMapRequest + +## Example Usage + +```typescript +import { CreateInboundFieldMapRequest } from "firehydrant/models/operations"; + +let value: CreateInboundFieldMapRequest = { + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentalertrequest.md b/docs/models/operations/createincidentalertrequest.md new file mode 100644 index 00000000..19049d34 --- /dev/null +++ b/docs/models/operations/createincidentalertrequest.md @@ -0,0 +1,21 @@ +# CreateIncidentAlertRequest + +## Example Usage + +```typescript +import { CreateIncidentAlertRequest } from "firehydrant/models/operations"; + +let value: CreateIncidentAlertRequest = { + incidentId: "", + requestBody: [ + "", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | *string*[] | :heavy_check_mark: | Array of alert IDs to be assigned to the incident | \ No newline at end of file diff --git a/docs/models/operations/createincidentalertsrequest.md b/docs/models/operations/createincidentalertsrequest.md deleted file mode 100644 index 56a172de..00000000 --- a/docs/models/operations/createincidentalertsrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateIncidentAlertsRequest - -## Example Usage - -```typescript -import { CreateIncidentAlertsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateIncidentAlertsRequest = { - incidentId: "", - requestBody: [ - "", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | *string*[] | :heavy_check_mark: | Array of alert IDs to be assigned to the incident | \ No newline at end of file diff --git a/docs/models/operations/createincidentattachmentfile.md b/docs/models/operations/createincidentattachmentfile.md new file mode 100644 index 00000000..492a367b --- /dev/null +++ b/docs/models/operations/createincidentattachmentfile.md @@ -0,0 +1,16 @@ +# CreateIncidentAttachmentFile + +## Example Usage + +```typescript +import { CreateIncidentAttachmentFile } from "firehydrant/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `fileName` | *string* | :heavy_check_mark: | N/A | +| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentattachmentrequest.md b/docs/models/operations/createincidentattachmentrequest.md index 6f8e45a6..467e834c 100644 --- a/docs/models/operations/createincidentattachmentrequest.md +++ b/docs/models/operations/createincidentattachmentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { CreateIncidentAttachmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentAttachmentRequest } from "firehydrant/models/operations"; // No examples available for this model ``` diff --git a/docs/models/operations/createincidentattachmentrequestbody.md b/docs/models/operations/createincidentattachmentrequestbody.md index 42cae1d7..fa09dfef 100644 --- a/docs/models/operations/createincidentattachmentrequestbody.md +++ b/docs/models/operations/createincidentattachmentrequestbody.md @@ -3,16 +3,16 @@ ## Example Usage ```typescript -import { CreateIncidentAttachmentRequestBody } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentAttachmentRequestBody } from "firehydrant/models/operations"; // No examples available for this model ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [operations.FileT](../../models/operations/filet.md) | :heavy_check_mark: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | -| `voteDirection` | [operations.VoteDirection](../../models/operations/votedirection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [operations.CreateIncidentAttachmentFile](../../models/operations/createincidentattachmentfile.md) | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `occurredAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | N/A | +| `voteDirection` | [operations.VoteDirection](../../models/operations/votedirection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentchangeeventrequest.md b/docs/models/operations/createincidentchangeeventrequest.md new file mode 100644 index 00000000..e6fa1d42 --- /dev/null +++ b/docs/models/operations/createincidentchangeeventrequest.md @@ -0,0 +1,22 @@ +# CreateIncidentChangeEventRequest + +## Example Usage + +```typescript +import { CreateIncidentChangeEventRequest } from "firehydrant/models/operations"; + +let value: CreateIncidentChangeEventRequest = { + incidentId: "", + createIncidentChangeEvent: { + changeEventId: "", + type: "dismissed", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentChangeEvent` | [components.CreateIncidentChangeEvent](../../models/components/createincidentchangeevent.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentchatmessagerequest.md b/docs/models/operations/createincidentchatmessagerequest.md new file mode 100644 index 00000000..94df7fc1 --- /dev/null +++ b/docs/models/operations/createincidentchatmessagerequest.md @@ -0,0 +1,21 @@ +# CreateIncidentChatMessageRequest + +## Example Usage + +```typescript +import { CreateIncidentChatMessageRequest } from "firehydrant/models/operations"; + +let value: CreateIncidentChatMessageRequest = { + incidentId: "", + createIncidentChatMessage: { + body: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentChatMessage` | [components.CreateIncidentChatMessage](../../models/components/createincidentchatmessage.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentgenericchatmessagerequest.md b/docs/models/operations/createincidentgenericchatmessagerequest.md deleted file mode 100644 index 2edb6ef1..00000000 --- a/docs/models/operations/createincidentgenericchatmessagerequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateIncidentGenericChatMessageRequest - -## Example Usage - -```typescript -import { CreateIncidentGenericChatMessageRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateIncidentGenericChatMessageRequest = { - incidentId: "", - postV1IncidentsIncidentIdGenericChatMessages: { - body: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdGenericChatMessages` | [components.PostV1IncidentsIncidentIdGenericChatMessages](../../models/components/postv1incidentsincidentidgenericchatmessages.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentimpactpathparamtype.md b/docs/models/operations/createincidentimpactpathparamtype.md deleted file mode 100644 index 472e558e..00000000 --- a/docs/models/operations/createincidentimpactpathparamtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# CreateIncidentImpactPathParamType - -## Example Usage - -```typescript -import { CreateIncidentImpactPathParamType } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateIncidentImpactPathParamType = "services"; -``` - -## Values - -```typescript -"environments" | "functionalities" | "services" | "customers" -``` \ No newline at end of file diff --git a/docs/models/operations/createincidentimpactrequest.md b/docs/models/operations/createincidentimpactrequest.md index 5a0d5ebe..c520ba00 100644 --- a/docs/models/operations/createincidentimpactrequest.md +++ b/docs/models/operations/createincidentimpactrequest.md @@ -3,12 +3,12 @@ ## Example Usage ```typescript -import { CreateIncidentImpactRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentImpactRequest } from "firehydrant/models/operations"; let value: CreateIncidentImpactRequest = { incidentId: "", - type: "customers", - postV1IncidentsIncidentIdImpactType: { + type: "services", + createIncidentImpact: { id: "", }, }; @@ -16,8 +16,8 @@ let value: CreateIncidentImpactRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `type` | [operations.CreateIncidentImpactPathParamType](../../models/operations/createincidentimpactpathparamtype.md) | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdImpactType` | [components.PostV1IncidentsIncidentIdImpactType](../../models/components/postv1incidentsincidentidimpacttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `type` | [operations.CreateIncidentImpactType](../../models/operations/createincidentimpacttype.md) | :heavy_check_mark: | N/A | +| `createIncidentImpact` | [components.CreateIncidentImpact](../../models/components/createincidentimpact.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentimpacttype.md b/docs/models/operations/createincidentimpacttype.md new file mode 100644 index 00000000..8f64ef31 --- /dev/null +++ b/docs/models/operations/createincidentimpacttype.md @@ -0,0 +1,15 @@ +# CreateIncidentImpactType + +## Example Usage + +```typescript +import { CreateIncidentImpactType } from "firehydrant/models/operations"; + +let value: CreateIncidentImpactType = "customers"; +``` + +## Values + +```typescript +"environments" | "functionalities" | "services" | "customers" +``` \ No newline at end of file diff --git a/docs/models/operations/createincidentlinkrequest.md b/docs/models/operations/createincidentlinkrequest.md index 9cc554bd..8a50ebc4 100644 --- a/docs/models/operations/createincidentlinkrequest.md +++ b/docs/models/operations/createincidentlinkrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateIncidentLinkRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentLinkRequest } from "firehydrant/models/operations"; let value: CreateIncidentLinkRequest = { incidentId: "", - postV1IncidentsIncidentIdLinks: { + createIncidentLink: { href: "", }, }; @@ -15,7 +15,7 @@ let value: CreateIncidentLinkRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdLinks` | [components.PostV1IncidentsIncidentIdLinks](../../models/components/postv1incidentsincidentidlinks.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentLink` | [components.CreateIncidentLink](../../models/components/createincidentlink.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentnoterequest.md b/docs/models/operations/createincidentnoterequest.md index 419ee6a6..3668e4c4 100644 --- a/docs/models/operations/createincidentnoterequest.md +++ b/docs/models/operations/createincidentnoterequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateIncidentNoteRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentNoteRequest } from "firehydrant/models/operations"; let value: CreateIncidentNoteRequest = { incidentId: "", - postV1IncidentsIncidentIdNotes: { + createIncidentNote: { body: "", }, }; @@ -15,7 +15,7 @@ let value: CreateIncidentNoteRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdNotes` | [components.PostV1IncidentsIncidentIdNotes](../../models/components/postv1incidentsincidentidnotes.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentNote` | [components.CreateIncidentNote](../../models/components/createincidentnote.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentrelatedchangerequest.md b/docs/models/operations/createincidentrelatedchangerequest.md deleted file mode 100644 index f252491d..00000000 --- a/docs/models/operations/createincidentrelatedchangerequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# CreateIncidentRelatedChangeRequest - -## Example Usage - -```typescript -import { CreateIncidentRelatedChangeRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateIncidentRelatedChangeRequest = { - incidentId: "", - postV1IncidentsIncidentIdRelatedChangeEvents: { - changeEventId: "", - type: "suspect", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdRelatedChangeEvents` | [components.PostV1IncidentsIncidentIdRelatedChangeEvents](../../models/components/postv1incidentsincidentidrelatedchangeevents.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentretrospectivedynamicinputrequest.md b/docs/models/operations/createincidentretrospectivedynamicinputrequest.md new file mode 100644 index 00000000..4c3c8a5f --- /dev/null +++ b/docs/models/operations/createincidentretrospectivedynamicinputrequest.md @@ -0,0 +1,21 @@ +# CreateIncidentRetrospectiveDynamicInputRequest + +## Example Usage + +```typescript +import { CreateIncidentRetrospectiveDynamicInputRequest } from "firehydrant/models/operations"; + +let value: CreateIncidentRetrospectiveDynamicInputRequest = { + retrospectiveId: "", + fieldId: "", + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `retrospectiveId` | *string* | :heavy_check_mark: | N/A | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentretrospectivefieldrequest.md b/docs/models/operations/createincidentretrospectivefieldrequest.md new file mode 100644 index 00000000..e32018b9 --- /dev/null +++ b/docs/models/operations/createincidentretrospectivefieldrequest.md @@ -0,0 +1,24 @@ +# CreateIncidentRetrospectiveFieldRequest + +## Example Usage + +```typescript +import { CreateIncidentRetrospectiveFieldRequest } from "firehydrant/models/operations"; + +let value: CreateIncidentRetrospectiveFieldRequest = { + retrospectiveId: "", + incidentId: "", + requestBody: { + label: "", + type: "multi_select", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `retrospectiveId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.CreateIncidentRetrospectiveFieldRequestBody](../../models/operations/createincidentretrospectivefieldrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentretrospectivefieldrequestbody.md b/docs/models/operations/createincidentretrospectivefieldrequestbody.md new file mode 100644 index 00000000..1acdf301 --- /dev/null +++ b/docs/models/operations/createincidentretrospectivefieldrequestbody.md @@ -0,0 +1,23 @@ +# CreateIncidentRetrospectiveFieldRequestBody + +## Example Usage + +```typescript +import { CreateIncidentRetrospectiveFieldRequestBody } from "firehydrant/models/operations"; + +let value: CreateIncidentRetrospectiveFieldRequestBody = { + label: "", + type: "single_select", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `label` | *string* | :heavy_check_mark: | N/A | +| `type` | [operations.CreateIncidentRetrospectiveFieldType](../../models/operations/createincidentretrospectivefieldtype.md) | :heavy_check_mark: | N/A | +| `helpText` | *string* | :heavy_minus_sign: | N/A | +| `permissibleValues` | *string*[] | :heavy_minus_sign: | N/A | +| `isRequired` | *boolean* | :heavy_minus_sign: | N/A | +| `schema` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentretrospectivefieldtype.md b/docs/models/operations/createincidentretrospectivefieldtype.md new file mode 100644 index 00000000..94e4c24e --- /dev/null +++ b/docs/models/operations/createincidentretrospectivefieldtype.md @@ -0,0 +1,15 @@ +# CreateIncidentRetrospectiveFieldType + +## Example Usage + +```typescript +import { CreateIncidentRetrospectiveFieldType } from "firehydrant/models/operations"; + +let value: CreateIncidentRetrospectiveFieldType = "text"; +``` + +## Values + +```typescript +"text" | "single_select" | "multi_select" | "numeric" | "datetime" | "dynamic_input_group" | "markdown" | "markdown_text" +``` \ No newline at end of file diff --git a/docs/models/operations/createincidentretrospectiverequest.md b/docs/models/operations/createincidentretrospectiverequest.md new file mode 100644 index 00000000..86023757 --- /dev/null +++ b/docs/models/operations/createincidentretrospectiverequest.md @@ -0,0 +1,21 @@ +# CreateIncidentRetrospectiveRequest + +## Example Usage + +```typescript +import { CreateIncidentRetrospectiveRequest } from "firehydrant/models/operations"; + +let value: CreateIncidentRetrospectiveRequest = { + incidentId: "", + requestBody: { + retrospectiveTemplateId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.CreateIncidentRetrospectiveRequestBody](../../models/operations/createincidentretrospectiverequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentretrospectiverequestbody.md b/docs/models/operations/createincidentretrospectiverequestbody.md new file mode 100644 index 00000000..214b51f7 --- /dev/null +++ b/docs/models/operations/createincidentretrospectiverequestbody.md @@ -0,0 +1,17 @@ +# CreateIncidentRetrospectiveRequestBody + +## Example Usage + +```typescript +import { CreateIncidentRetrospectiveRequestBody } from "firehydrant/models/operations"; + +let value: CreateIncidentRetrospectiveRequestBody = { + retrospectiveTemplateId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `retrospectiveTemplateId` | *string* | :heavy_check_mark: | The id of the retrospective template to apply. | \ No newline at end of file diff --git a/docs/models/operations/createincidentroleassignmentrequest.md b/docs/models/operations/createincidentroleassignmentrequest.md index 048ce445..185554de 100644 --- a/docs/models/operations/createincidentroleassignmentrequest.md +++ b/docs/models/operations/createincidentroleassignmentrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateIncidentRoleAssignmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentRoleAssignmentRequest } from "firehydrant/models/operations"; let value: CreateIncidentRoleAssignmentRequest = { incidentId: "", - postV1IncidentsIncidentIdRoleAssignments: { + createIncidentRoleAssignment: { userId: "", incidentRoleId: "", }, @@ -16,7 +16,7 @@ let value: CreateIncidentRoleAssignmentRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdRoleAssignments` | [components.PostV1IncidentsIncidentIdRoleAssignments](../../models/components/postv1incidentsincidentidroleassignments.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentRoleAssignment` | [components.CreateIncidentRoleAssignment](../../models/components/createincidentroleassignment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentstatuspagerequest.md b/docs/models/operations/createincidentstatuspagerequest.md index 69193028..73caed07 100644 --- a/docs/models/operations/createincidentstatuspagerequest.md +++ b/docs/models/operations/createincidentstatuspagerequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateIncidentStatusPageRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentStatusPageRequest } from "firehydrant/models/operations"; let value: CreateIncidentStatusPageRequest = { incidentId: "", - postV1IncidentsIncidentIdStatusPages: { + createIncidentStatusPage: { integrationSlug: "", integrationId: "", }, @@ -16,7 +16,7 @@ let value: CreateIncidentStatusPageRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdStatusPages` | [components.PostV1IncidentsIncidentIdStatusPages](../../models/components/postv1incidentsincidentidstatuspages.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentStatusPage` | [components.CreateIncidentStatusPage](../../models/components/createincidentstatuspage.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidenttasklistrequest.md b/docs/models/operations/createincidenttasklistrequest.md index f90eaa75..0f71abf4 100644 --- a/docs/models/operations/createincidenttasklistrequest.md +++ b/docs/models/operations/createincidenttasklistrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateIncidentTaskListRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentTaskListRequest } from "firehydrant/models/operations"; let value: CreateIncidentTaskListRequest = { incidentId: "", - postV1IncidentsIncidentIdTaskLists: { + createIncidentTaskList: { taskListId: "", }, }; @@ -15,7 +15,7 @@ let value: CreateIncidentTaskListRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdTaskLists` | [components.PostV1IncidentsIncidentIdTaskLists](../../models/components/postv1incidentsincidentidtasklists.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentTaskList` | [components.CreateIncidentTaskList](../../models/components/createincidenttasklist.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidenttaskrequest.md b/docs/models/operations/createincidenttaskrequest.md index a6cde048..014d5468 100644 --- a/docs/models/operations/createincidenttaskrequest.md +++ b/docs/models/operations/createincidenttaskrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateIncidentTaskRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentTaskRequest } from "firehydrant/models/operations"; let value: CreateIncidentTaskRequest = { incidentId: "", - postV1IncidentsIncidentIdTasks: { + createIncidentTask: { title: "", }, }; @@ -15,7 +15,7 @@ let value: CreateIncidentTaskRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdTasks` | [components.PostV1IncidentsIncidentIdTasks](../../models/components/postv1incidentsincidentidtasks.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentTask` | [components.CreateIncidentTask](../../models/components/createincidenttask.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createincidentteamassignmentrequest.md b/docs/models/operations/createincidentteamassignmentrequest.md index 6e93b4fe..65aab689 100644 --- a/docs/models/operations/createincidentteamassignmentrequest.md +++ b/docs/models/operations/createincidentteamassignmentrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateIncidentTeamAssignmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateIncidentTeamAssignmentRequest } from "firehydrant/models/operations"; let value: CreateIncidentTeamAssignmentRequest = { incidentId: "", - postV1IncidentsIncidentIdTeamAssignments: { + createIncidentTeamAssignment: { teamId: "", }, }; @@ -15,7 +15,7 @@ let value: CreateIncidentTeamAssignmentRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `postV1IncidentsIncidentIdTeamAssignments` | [components.PostV1IncidentsIncidentIdTeamAssignments](../../models/components/postv1incidentsincidentidteamassignments.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `createIncidentTeamAssignment` | [components.CreateIncidentTeamAssignment](../../models/components/createincidentteamassignment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createintegrationconnectionrequest.md b/docs/models/operations/createintegrationconnectionrequest.md deleted file mode 100644 index e1064442..00000000 --- a/docs/models/operations/createintegrationconnectionrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateIntegrationConnectionRequest - -## Example Usage - -```typescript -import { CreateIntegrationConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateIntegrationConnectionRequest = { - slug: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `slug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createlifecyclemeasurementdefinitionrequest.md b/docs/models/operations/createlifecyclemeasurementdefinitionrequest.md new file mode 100644 index 00000000..549bceae --- /dev/null +++ b/docs/models/operations/createlifecyclemeasurementdefinitionrequest.md @@ -0,0 +1,23 @@ +# CreateLifecycleMeasurementDefinitionRequest + +## Example Usage + +```typescript +import { CreateLifecycleMeasurementDefinitionRequest } from "firehydrant/models/operations"; + +let value: CreateLifecycleMeasurementDefinitionRequest = { + name: "", + startsAtMilestoneId: "", + endsAtMilestoneId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `startsAtMilestoneId` | *string* | :heavy_check_mark: | N/A | +| `endsAtMilestoneId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createlifecyclemilestoneautoassigntimestamponcreate.md b/docs/models/operations/createlifecyclemilestoneautoassigntimestamponcreate.md new file mode 100644 index 00000000..703e4063 --- /dev/null +++ b/docs/models/operations/createlifecyclemilestoneautoassigntimestamponcreate.md @@ -0,0 +1,18 @@ +# CreateLifecycleMilestoneAutoAssignTimestampOnCreate + +The setting for auto-assigning the milestone's timestamp during incident declaration + +## Example Usage + +```typescript +import { CreateLifecycleMilestoneAutoAssignTimestampOnCreate } from "firehydrant/models/operations"; + +let value: CreateLifecycleMilestoneAutoAssignTimestampOnCreate = + "never_set_on_create"; +``` + +## Values + +```typescript +"always_set_on_create" | "only_set_on_manual_create" | "never_set_on_create" +``` \ No newline at end of file diff --git a/docs/models/operations/createlifecyclemilestonerequest.md b/docs/models/operations/createlifecyclemilestonerequest.md new file mode 100644 index 00000000..3af5347d --- /dev/null +++ b/docs/models/operations/createlifecyclemilestonerequest.md @@ -0,0 +1,25 @@ +# CreateLifecycleMilestoneRequest + +## Example Usage + +```typescript +import { CreateLifecycleMilestoneRequest } from "firehydrant/models/operations"; + +let value: CreateLifecycleMilestoneRequest = { + name: "", + description: "during treble baggy absent", + phaseId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_check_mark: | The name of the milestone | +| `description` | *string* | :heavy_check_mark: | A long-form description of the milestone's purpose | +| `slug` | *string* | :heavy_minus_sign: | A unique identifier for the milestone. If not provided, one will be generated from the name. | +| `phaseId` | *string* | :heavy_check_mark: | The ID of the phase to which the milestone should belong | +| `position` | *number* | :heavy_minus_sign: | The position of the milestone within the phase. If not provided, the milestone will be added as the last milestone in the phase. | +| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | The ID of a later milestone that cannot be started until this milestone has a timestamp populated | +| `autoAssignTimestampOnCreate` | [operations.CreateLifecycleMilestoneAutoAssignTimestampOnCreate](../../models/operations/createlifecyclemilestoneautoassigntimestamponcreate.md) | :heavy_minus_sign: | The setting for auto-assigning the milestone's timestamp during incident declaration | \ No newline at end of file diff --git a/docs/models/operations/createlifecyclemilestonerequestbody.md b/docs/models/operations/createlifecyclemilestonerequestbody.md deleted file mode 100644 index 03d7280b..00000000 --- a/docs/models/operations/createlifecyclemilestonerequestbody.md +++ /dev/null @@ -1,24 +0,0 @@ -# CreateLifecycleMilestoneRequestBody - -## Example Usage - -```typescript -import { CreateLifecycleMilestoneRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateLifecycleMilestoneRequestBody = { - name: "", - description: "geez justly pfft oh delete", - phaseId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The name of the milestone | -| `description` | *string* | :heavy_check_mark: | A long-form description of the milestone's purpose | -| `slug` | *string* | :heavy_minus_sign: | A unique identifier for the milestone. If not provided, one will be generated from the name. | -| `phaseId` | *string* | :heavy_check_mark: | The ID of the phase to which the milestone should belong | -| `position` | *number* | :heavy_minus_sign: | The position of the milestone within the phase. If not provided, the milestone will be added as the last milestone in the phase. | -| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | The ID of a later milestone that cannot be started until this milestone has a timestamp populated | \ No newline at end of file diff --git a/docs/models/operations/createmeasurementdefinitionrequestbody.md b/docs/models/operations/createmeasurementdefinitionrequestbody.md deleted file mode 100644 index 0e4a7b83..00000000 --- a/docs/models/operations/createmeasurementdefinitionrequestbody.md +++ /dev/null @@ -1,23 +0,0 @@ -# CreateMeasurementDefinitionRequestBody - -## Example Usage - -```typescript -import { CreateMeasurementDefinitionRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateMeasurementDefinitionRequestBody = { - name: "", - startsAtMilestoneId: "", - endsAtMilestoneId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `name` | *string* | :heavy_check_mark: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `startsAtMilestoneId` | *string* | :heavy_check_mark: | N/A | -| `endsAtMilestoneId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createnunccomponentgrouprequest.md b/docs/models/operations/createnunccomponentgrouprequest.md new file mode 100644 index 00000000..e38c53e2 --- /dev/null +++ b/docs/models/operations/createnunccomponentgrouprequest.md @@ -0,0 +1,21 @@ +# CreateNuncComponentGroupRequest + +## Example Usage + +```typescript +import { CreateNuncComponentGroupRequest } from "firehydrant/models/operations"; + +let value: CreateNuncComponentGroupRequest = { + nuncConnectionId: "", + requestBody: { + name: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.CreateNuncComponentGroupRequestBody](../../models/operations/createnunccomponentgrouprequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createnunccomponentgrouprequestbody.md b/docs/models/operations/createnunccomponentgrouprequestbody.md new file mode 100644 index 00000000..7eb05cba --- /dev/null +++ b/docs/models/operations/createnunccomponentgrouprequestbody.md @@ -0,0 +1,19 @@ +# CreateNuncComponentGroupRequestBody + +## Example Usage + +```typescript +import { CreateNuncComponentGroupRequestBody } from "firehydrant/models/operations"; + +let value: CreateNuncComponentGroupRequestBody = { + name: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_check_mark: | N/A | +| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createnuncconnectionrequest.md b/docs/models/operations/createnuncconnectionrequest.md new file mode 100644 index 00000000..7cdd1183 --- /dev/null +++ b/docs/models/operations/createnuncconnectionrequest.md @@ -0,0 +1,45 @@ +# CreateNuncConnectionRequest + +## Example Usage + +```typescript +import { CreateNuncConnectionRequest } from "firehydrant/models/operations"; + +let value: CreateNuncConnectionRequest = { + domain: "gloomy-igloo.info", + conditionsNuncCondition: [ + "", + ], + conditionsConditionId: [ + "", + ], + componentsInfrastructureType: [ + "", + ], + componentsInfrastructureId: [ + "", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `companyName` | *string* | :heavy_minus_sign: | N/A | +| `companyWebsite` | *string* | :heavy_minus_sign: | N/A | +| `companyTosUrl` | *string* | :heavy_minus_sign: | N/A | +| `greetingTitle` | *string* | :heavy_minus_sign: | N/A | +| `greetingBody` | *string* | :heavy_minus_sign: | N/A | +| `operationalMessage` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `conditionsNuncCondition` | *string*[] | :heavy_check_mark: | Status page condition to map your severity matrix condition to | +| `conditionsConditionId` | *string*[] | :heavy_check_mark: | Severity matrix condition id | +| `componentsInfrastructureType` | *string*[] | :heavy_check_mark: | N/A | +| `componentsInfrastructureId` | *string*[] | :heavy_check_mark: | N/A | +| `primaryColor` | *string* | :heavy_minus_sign: | N/A | +| `secondaryColor` | *string* | :heavy_minus_sign: | N/A | +| `exposedFields` | *string*[] | :heavy_minus_sign: | N/A | +| `enableHistogram` | *boolean* | :heavy_minus_sign: | N/A | +| `uiVersion` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createnunclinkrequest.md b/docs/models/operations/createnunclinkrequest.md new file mode 100644 index 00000000..d4ac5ca9 --- /dev/null +++ b/docs/models/operations/createnunclinkrequest.md @@ -0,0 +1,17 @@ +# CreateNuncLinkRequest + +## Example Usage + +```typescript +import { CreateNuncLinkRequest } from "firehydrant/models/operations"; + +let value: CreateNuncLinkRequest = { + nuncConnectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createoncallshiftrequest.md b/docs/models/operations/createoncallshiftrequest.md new file mode 100644 index 00000000..df1c24fd --- /dev/null +++ b/docs/models/operations/createoncallshiftrequest.md @@ -0,0 +1,24 @@ +# CreateOnCallShiftRequest + +## Example Usage + +```typescript +import { CreateOnCallShiftRequest } from "firehydrant/models/operations"; + +let value: CreateOnCallShiftRequest = { + teamId: "", + scheduleId: "", + createOnCallShift: { + startTime: "", + endTime: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `scheduleId` | *string* | :heavy_check_mark: | N/A | +| `createOnCallShift` | [components.CreateOnCallShift](../../models/components/createoncallshift.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createpostmortemreasonrequest.md b/docs/models/operations/createpostmortemreasonrequest.md new file mode 100644 index 00000000..8f2f098f --- /dev/null +++ b/docs/models/operations/createpostmortemreasonrequest.md @@ -0,0 +1,21 @@ +# CreatePostMortemReasonRequest + +## Example Usage + +```typescript +import { CreatePostMortemReasonRequest } from "firehydrant/models/operations"; + +let value: CreatePostMortemReasonRequest = { + reportId: "", + createPostMortemReason: { + summary: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `createPostMortemReason` | [components.CreatePostMortemReason](../../models/components/createpostmortemreason.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createretrospectivereportreasonrequest.md b/docs/models/operations/createretrospectivereportreasonrequest.md deleted file mode 100644 index 267561ec..00000000 --- a/docs/models/operations/createretrospectivereportreasonrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateRetrospectiveReportReasonRequest - -## Example Usage - -```typescript -import { CreateRetrospectiveReportReasonRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateRetrospectiveReportReasonRequest = { - reportId: "", - postV1PostMortemsReportsReportIdReasons: { - summary: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `postV1PostMortemsReportsReportIdReasons` | [components.PostV1PostMortemsReportsReportIdReasons](../../models/components/postv1postmortemsreportsreportidreasons.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createretrospectivetemplatefieldstype.md b/docs/models/operations/createretrospectivetemplatefieldstype.md new file mode 100644 index 00000000..9e8965b3 --- /dev/null +++ b/docs/models/operations/createretrospectivetemplatefieldstype.md @@ -0,0 +1,15 @@ +# CreateRetrospectiveTemplateFieldsType + +## Example Usage + +```typescript +import { CreateRetrospectiveTemplateFieldsType } from "firehydrant/models/operations"; + +let value: CreateRetrospectiveTemplateFieldsType = "numeric"; +``` + +## Values + +```typescript +"text" | "single_select" | "multi_select" | "numeric" | "datetime" | "dynamic_input_group" | "markdown" | "markdown_text" +``` \ No newline at end of file diff --git a/docs/models/operations/createretrospectivetemplaterequest.md b/docs/models/operations/createretrospectivetemplaterequest.md new file mode 100644 index 00000000..7227b776 --- /dev/null +++ b/docs/models/operations/createretrospectivetemplaterequest.md @@ -0,0 +1,41 @@ +# CreateRetrospectiveTemplateRequest + +## Example Usage + +```typescript +import { CreateRetrospectiveTemplateRequest } from "firehydrant/models/operations"; + +let value: CreateRetrospectiveTemplateRequest = { + name: "", + description: + "yowza inside behind yum gift where gloat save reassuringly because", + sectionsSlug: [ + "details", + ], + sectionsElements: [ + "", + ], + fieldsLabel: [ + "", + ], + fieldsType: [ + "text", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | N/A | +| `description` | *string* | :heavy_check_mark: | N/A | +| `isDefault` | *boolean* | :heavy_minus_sign: | N/A | +| `sectionsSlug` | [operations.SectionsSlug](../../models/operations/sectionsslug.md)[] | :heavy_check_mark: | N/A | +| `sectionsElements` | *string*[] | :heavy_check_mark: | N/A | +| `fieldsLabel` | *string*[] | :heavy_check_mark: | N/A | +| `fieldsType` | [operations.CreateRetrospectiveTemplateFieldsType](../../models/operations/createretrospectivetemplatefieldstype.md)[] | :heavy_check_mark: | N/A | +| `fieldsHelpText` | *string*[] | :heavy_minus_sign: | N/A | +| `fieldsPermissibleValues` | *string*[] | :heavy_minus_sign: | N/A | +| `fieldsIsRequired` | *boolean*[] | :heavy_minus_sign: | N/A | +| `fieldsSchema` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createsavedsearchrequest.md b/docs/models/operations/createsavedsearchrequest.md index 20bf52df..1d85f77f 100644 --- a/docs/models/operations/createsavedsearchrequest.md +++ b/docs/models/operations/createsavedsearchrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { CreateSavedSearchRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateSavedSearchRequest } from "firehydrant/models/operations"; let value: CreateSavedSearchRequest = { - resourceType: "analytics", - postV1SavedSearchesResourceType: { + resourceType: "ticket_tasks", + createSavedSearch: { name: "", filterValues: { "key": "", @@ -18,7 +18,7 @@ let value: CreateSavedSearchRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `resourceType` | [operations.PathParamResourceType](../../models/operations/pathparamresourcetype.md) | :heavy_check_mark: | N/A | -| `postV1SavedSearchesResourceType` | [components.PostV1SavedSearchesResourceType](../../models/components/postv1savedsearchesresourcetype.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `resourceType` | [operations.CreateSavedSearchResourceType](../../models/operations/createsavedsearchresourcetype.md) | :heavy_check_mark: | N/A | +| `createSavedSearch` | [components.CreateSavedSearch](../../models/components/createsavedsearch.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createsavedsearchresourcetype.md b/docs/models/operations/createsavedsearchresourcetype.md new file mode 100644 index 00000000..33fe9fb0 --- /dev/null +++ b/docs/models/operations/createsavedsearchresourcetype.md @@ -0,0 +1,15 @@ +# CreateSavedSearchResourceType + +## Example Usage + +```typescript +import { CreateSavedSearchResourceType } from "firehydrant/models/operations"; + +let value: CreateSavedSearchResourceType = "analytics"; +``` + +## Values + +```typescript +"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" +``` \ No newline at end of file diff --git a/docs/models/operations/createservicechecklistresponserequest.md b/docs/models/operations/createservicechecklistresponserequest.md index 4d71cab5..f67a3491 100644 --- a/docs/models/operations/createservicechecklistresponserequest.md +++ b/docs/models/operations/createservicechecklistresponserequest.md @@ -3,12 +3,12 @@ ## Example Usage ```typescript -import { CreateServiceChecklistResponseRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateServiceChecklistResponseRequest } from "firehydrant/models/operations"; let value: CreateServiceChecklistResponseRequest = { serviceId: "", checklistId: "", - postV1ServicesServiceIdChecklistResponseChecklistId: { + createServiceChecklistResponse: { checkId: "", status: false, }, @@ -17,8 +17,8 @@ let value: CreateServiceChecklistResponseRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `serviceId` | *string* | :heavy_check_mark: | N/A | -| `checklistId` | *string* | :heavy_check_mark: | N/A | -| `postV1ServicesServiceIdChecklistResponseChecklistId` | [components.PostV1ServicesServiceIdChecklistResponseChecklistId](../../models/components/postv1servicesserviceidchecklistresponsechecklistid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `serviceId` | *string* | :heavy_check_mark: | N/A | +| `checklistId` | *string* | :heavy_check_mark: | N/A | +| `createServiceChecklistResponse` | [components.CreateServiceChecklistResponse](../../models/components/createservicechecklistresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createslackemojiactionrequest.md b/docs/models/operations/createslackemojiactionrequest.md index e524e949..510d3e4d 100644 --- a/docs/models/operations/createslackemojiactionrequest.md +++ b/docs/models/operations/createslackemojiactionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { CreateSlackEmojiActionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateSlackEmojiActionRequest } from "firehydrant/models/operations"; let value: CreateSlackEmojiActionRequest = { connectionId: "", diff --git a/docs/models/operations/createslackemojiactionrequestbody.md b/docs/models/operations/createslackemojiactionrequestbody.md index 9208105d..237db3ab 100644 --- a/docs/models/operations/createslackemojiactionrequestbody.md +++ b/docs/models/operations/createslackemojiactionrequestbody.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { CreateSlackEmojiActionRequestBody } from "firehydrant-typescript-sdk/models/operations"; +import { CreateSlackEmojiActionRequestBody } from "firehydrant/models/operations"; let value: CreateSlackEmojiActionRequestBody = { emojiName: "", diff --git a/docs/models/operations/createstatuspagecomponentgrouprequest.md b/docs/models/operations/createstatuspagecomponentgrouprequest.md deleted file mode 100644 index cdbc5f51..00000000 --- a/docs/models/operations/createstatuspagecomponentgrouprequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateStatusPageComponentGroupRequest - -## Example Usage - -```typescript -import { CreateStatusPageComponentGroupRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateStatusPageComponentGroupRequest = { - nuncConnectionId: "", - requestBody: { - name: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [operations.CreateStatusPageComponentGroupRequestBody](../../models/operations/createstatuspagecomponentgrouprequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createstatuspagecomponentgrouprequestbody.md b/docs/models/operations/createstatuspagecomponentgrouprequestbody.md deleted file mode 100644 index cf1ceefd..00000000 --- a/docs/models/operations/createstatuspagecomponentgrouprequestbody.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateStatusPageComponentGroupRequestBody - -## Example Usage - -```typescript -import { CreateStatusPageComponentGroupRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateStatusPageComponentGroupRequestBody = { - name: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_check_mark: | N/A | -| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createstatuspagelinkrequest.md b/docs/models/operations/createstatuspagelinkrequest.md deleted file mode 100644 index f116b8e4..00000000 --- a/docs/models/operations/createstatuspagelinkrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateStatusPageLinkRequest - -## Example Usage - -```typescript -import { CreateStatusPageLinkRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateStatusPageLinkRequest = { - nuncConnectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createstatuspagerequestbody.md b/docs/models/operations/createstatuspagerequestbody.md deleted file mode 100644 index 048e5ea6..00000000 --- a/docs/models/operations/createstatuspagerequestbody.md +++ /dev/null @@ -1,45 +0,0 @@ -# CreateStatusPageRequestBody - -## Example Usage - -```typescript -import { CreateStatusPageRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateStatusPageRequestBody = { - domain: "radiant-dividend.com", - conditionsNuncCondition: [ - "", - ], - conditionsConditionId: [ - "", - ], - componentsInfrastructureType: [ - "", - ], - componentsInfrastructureId: [ - "", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `domain` | *string* | :heavy_check_mark: | N/A | -| `companyName` | *string* | :heavy_minus_sign: | N/A | -| `companyWebsite` | *string* | :heavy_minus_sign: | N/A | -| `companyTosUrl` | *string* | :heavy_minus_sign: | N/A | -| `greetingTitle` | *string* | :heavy_minus_sign: | N/A | -| `greetingBody` | *string* | :heavy_minus_sign: | N/A | -| `operationalMessage` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `conditionsNuncCondition` | *string*[] | :heavy_check_mark: | Status page condition to map your severity matrix condition to | -| `conditionsConditionId` | *string*[] | :heavy_check_mark: | Severity matrix condition id | -| `componentsInfrastructureType` | *string*[] | :heavy_check_mark: | N/A | -| `componentsInfrastructureId` | *string*[] | :heavy_check_mark: | N/A | -| `primaryColor` | *string* | :heavy_minus_sign: | N/A | -| `secondaryColor` | *string* | :heavy_minus_sign: | N/A | -| `exposedFields` | *string*[] | :heavy_minus_sign: | N/A | -| `enableHistogram` | *boolean* | :heavy_minus_sign: | N/A | -| `uiVersion` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createstatuspagesubscribersrequest.md b/docs/models/operations/createstatuspagesubscribersrequest.md deleted file mode 100644 index a499ca64..00000000 --- a/docs/models/operations/createstatuspagesubscribersrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CreateStatusPageSubscribersRequest - -## Example Usage - -```typescript -import { CreateStatusPageSubscribersRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateStatusPageSubscribersRequest = { - nuncConnectionId: "", - requestBody: { - emails: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [operations.CreateStatusPageSubscribersRequestBody](../../models/operations/createstatuspagesubscribersrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createstatuspagesubscribersrequestbody.md b/docs/models/operations/createstatuspagesubscribersrequestbody.md deleted file mode 100644 index 458e61d1..00000000 --- a/docs/models/operations/createstatuspagesubscribersrequestbody.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateStatusPageSubscribersRequestBody - -## Example Usage - -```typescript -import { CreateStatusPageSubscribersRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateStatusPageSubscribersRequestBody = { - emails: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `emails` | *string* | :heavy_check_mark: | A comma-separated list of emails to subscribe. | \ No newline at end of file diff --git a/docs/models/operations/createteamescalationpolicyrequest.md b/docs/models/operations/createteamescalationpolicyrequest.md index 6617d5a3..5a530cb1 100644 --- a/docs/models/operations/createteamescalationpolicyrequest.md +++ b/docs/models/operations/createteamescalationpolicyrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { CreateTeamEscalationPolicyRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateTeamEscalationPolicyRequest } from "firehydrant/models/operations"; let value: CreateTeamEscalationPolicyRequest = { teamId: "", - postV1TeamsTeamIdEscalationPolicies: { + createTeamEscalationPolicy: { name: "", steps: [ { targets: [ { - type: "SlackChannel", + type: "User", id: "", }, ], @@ -26,7 +26,7 @@ let value: CreateTeamEscalationPolicyRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `postV1TeamsTeamIdEscalationPolicies` | [components.PostV1TeamsTeamIdEscalationPolicies](../../models/components/postv1teamsteamidescalationpolicies.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `createTeamEscalationPolicy` | [components.CreateTeamEscalationPolicy](../../models/components/createteamescalationpolicy.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createteamoncallschedulerequest.md b/docs/models/operations/createteamoncallschedulerequest.md index c7834721..b32d1bd2 100644 --- a/docs/models/operations/createteamoncallschedulerequest.md +++ b/docs/models/operations/createteamoncallschedulerequest.md @@ -3,13 +3,13 @@ ## Example Usage ```typescript -import { CreateTeamOnCallScheduleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateTeamOnCallScheduleRequest } from "firehydrant/models/operations"; let value: CreateTeamOnCallScheduleRequest = { teamId: "", - postV1TeamsTeamIdOnCallSchedules: { + createTeamOnCallSchedule: { name: "", - timeZone: "America/Yakutat", + timeZone: "Europe/Bratislava", strategy: { type: "daily", }, @@ -19,7 +19,7 @@ let value: CreateTeamOnCallScheduleRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `postV1TeamsTeamIdOnCallSchedules` | [components.PostV1TeamsTeamIdOnCallSchedules](../../models/components/postv1teamsteamidoncallschedules.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `createTeamOnCallSchedule` | [components.CreateTeamOnCallSchedule](../../models/components/createteamoncallschedule.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createteamoncallscheduleshiftrequest.md b/docs/models/operations/createteamoncallscheduleshiftrequest.md deleted file mode 100644 index 0c43c5bd..00000000 --- a/docs/models/operations/createteamoncallscheduleshiftrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# CreateTeamOnCallScheduleShiftRequest - -## Example Usage - -```typescript -import { CreateTeamOnCallScheduleShiftRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateTeamOnCallScheduleShiftRequest = { - teamId: "", - scheduleId: "", - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: { - startTime: "", - endTime: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `scheduleId` | *string* | :heavy_check_mark: | N/A | -| `postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts` | [components.PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts](../../models/components/postv1teamsteamidoncallschedulesscheduleidshifts.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createteamsignalrulerequest.md b/docs/models/operations/createteamsignalrulerequest.md index 2bf16a59..29bab80a 100644 --- a/docs/models/operations/createteamsignalrulerequest.md +++ b/docs/models/operations/createteamsignalrulerequest.md @@ -3,14 +3,14 @@ ## Example Usage ```typescript -import { CreateTeamSignalRuleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { CreateTeamSignalRuleRequest } from "firehydrant/models/operations"; let value: CreateTeamSignalRuleRequest = { teamId: "", - postV1TeamsTeamIdSignalRules: { + createTeamSignalRule: { name: "", expression: "", - targetType: "User", + targetType: "Webhook", targetId: "", }, }; @@ -18,7 +18,7 @@ let value: CreateTeamSignalRuleRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `postV1TeamsTeamIdSignalRules` | [components.PostV1TeamsTeamIdSignalRules](../../models/components/postv1teamsteamidsignalrules.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `createTeamSignalRule` | [components.CreateTeamSignalRule](../../models/components/createteamsignalrule.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createticketingfieldmaprequest.md b/docs/models/operations/createticketingfieldmaprequest.md new file mode 100644 index 00000000..b7be6750 --- /dev/null +++ b/docs/models/operations/createticketingfieldmaprequest.md @@ -0,0 +1,17 @@ +# CreateTicketingFieldMapRequest + +## Example Usage + +```typescript +import { CreateTicketingFieldMapRequest } from "firehydrant/models/operations"; + +let value: CreateTicketingFieldMapRequest = { + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createticketingprojectconfigrequest.md b/docs/models/operations/createticketingprojectconfigrequest.md new file mode 100644 index 00000000..f8726943 --- /dev/null +++ b/docs/models/operations/createticketingprojectconfigrequest.md @@ -0,0 +1,17 @@ +# CreateTicketingProjectConfigRequest + +## Example Usage + +```typescript +import { CreateTicketingProjectConfigRequest } from "firehydrant/models/operations"; + +let value: CreateTicketingProjectConfigRequest = { + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createticketingprojectconfigurationrequest.md b/docs/models/operations/createticketingprojectconfigurationrequest.md deleted file mode 100644 index dda56a41..00000000 --- a/docs/models/operations/createticketingprojectconfigurationrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateTicketingProjectConfigurationRequest - -## Example Usage - -```typescript -import { CreateTicketingProjectConfigurationRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateTicketingProjectConfigurationRequest = { - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/createticketingprojectfieldmaprequest.md b/docs/models/operations/createticketingprojectfieldmaprequest.md deleted file mode 100644 index e765f82d..00000000 --- a/docs/models/operations/createticketingprojectfieldmaprequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateTicketingProjectFieldMapRequest - -## Example Usage - -```typescript -import { CreateTicketingProjectFieldMapRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: CreateTicketingProjectFieldMapRequest = { - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletechangeeventrequest.md b/docs/models/operations/deletechangeeventrequest.md index ec6aca9f..bb0c554d 100644 --- a/docs/models/operations/deletechangeeventrequest.md +++ b/docs/models/operations/deletechangeeventrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteChangeEventRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteChangeEventRequest } from "firehydrant/models/operations"; let value: DeleteChangeEventRequest = { changeEventId: "", diff --git a/docs/models/operations/deletechangeidentityrequest.md b/docs/models/operations/deletechangeidentityrequest.md index 9b7111e6..265c4437 100644 --- a/docs/models/operations/deletechangeidentityrequest.md +++ b/docs/models/operations/deletechangeidentityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteChangeIdentityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteChangeIdentityRequest } from "firehydrant/models/operations"; let value: DeleteChangeIdentityRequest = { identityId: "", diff --git a/docs/models/operations/deletechangerequest.md b/docs/models/operations/deletechangerequest.md index ce69cdba..b0be0e22 100644 --- a/docs/models/operations/deletechangerequest.md +++ b/docs/models/operations/deletechangerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteChangeRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteChangeRequest } from "firehydrant/models/operations"; let value: DeleteChangeRequest = { changeId: "", diff --git a/docs/models/operations/deletechecklisttemplaterequest.md b/docs/models/operations/deletechecklisttemplaterequest.md index 6b9ca150..8d892ccf 100644 --- a/docs/models/operations/deletechecklisttemplaterequest.md +++ b/docs/models/operations/deletechecklisttemplaterequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteChecklistTemplateRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteChecklistTemplateRequest } from "firehydrant/models/operations"; let value: DeleteChecklistTemplateRequest = { id: "", diff --git a/docs/models/operations/deletecommentreactionrequest.md b/docs/models/operations/deletecommentreactionrequest.md new file mode 100644 index 00000000..bdd4d043 --- /dev/null +++ b/docs/models/operations/deletecommentreactionrequest.md @@ -0,0 +1,21 @@ +# DeleteCommentReactionRequest + +## Example Usage + +```typescript +import { DeleteCommentReactionRequest } from "firehydrant/models/operations"; + +let value: DeleteCommentReactionRequest = { + reactionId: "", + conversationId: "", + commentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `reactionId` | *string* | :heavy_check_mark: | N/A | +| `conversationId` | *string* | :heavy_check_mark: | N/A | +| `commentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletecommentrequest.md b/docs/models/operations/deletecommentrequest.md new file mode 100644 index 00000000..dc65fcb4 --- /dev/null +++ b/docs/models/operations/deletecommentrequest.md @@ -0,0 +1,19 @@ +# DeleteCommentRequest + +## Example Usage + +```typescript +import { DeleteCommentRequest } from "firehydrant/models/operations"; + +let value: DeleteCommentRequest = { + commentId: "", + conversationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `commentId` | *string* | :heavy_check_mark: | N/A | +| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteconversationcommentreactionrequest.md b/docs/models/operations/deleteconversationcommentreactionrequest.md deleted file mode 100644 index 78126d49..00000000 --- a/docs/models/operations/deleteconversationcommentreactionrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# DeleteConversationCommentReactionRequest - -## Example Usage - -```typescript -import { DeleteConversationCommentReactionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteConversationCommentReactionRequest = { - reactionId: "", - conversationId: "", - commentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `reactionId` | *string* | :heavy_check_mark: | N/A | -| `conversationId` | *string* | :heavy_check_mark: | N/A | -| `commentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteconversationcommentrequest.md b/docs/models/operations/deleteconversationcommentrequest.md deleted file mode 100644 index c6b21ea0..00000000 --- a/docs/models/operations/deleteconversationcommentrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteConversationCommentRequest - -## Example Usage - -```typescript -import { DeleteConversationCommentRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteConversationCommentRequest = { - commentId: "", - conversationId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `commentId` | *string* | :heavy_check_mark: | N/A | -| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletecustomfielddefinitionrequest.md b/docs/models/operations/deletecustomfielddefinitionrequest.md index c43e99fc..710f1a56 100644 --- a/docs/models/operations/deletecustomfielddefinitionrequest.md +++ b/docs/models/operations/deletecustomfielddefinitionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteCustomFieldDefinitionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteCustomFieldDefinitionRequest } from "firehydrant/models/operations"; let value: DeleteCustomFieldDefinitionRequest = { fieldId: "", diff --git a/docs/models/operations/deleteemailsubscriberrequest.md b/docs/models/operations/deleteemailsubscriberrequest.md new file mode 100644 index 00000000..d448a8bd --- /dev/null +++ b/docs/models/operations/deleteemailsubscriberrequest.md @@ -0,0 +1,19 @@ +# DeleteEmailSubscriberRequest + +## Example Usage + +```typescript +import { DeleteEmailSubscriberRequest } from "firehydrant/models/operations"; + +let value: DeleteEmailSubscriberRequest = { + nuncConnectionId: "", + subscriberIds: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `subscriberIds` | *string* | :heavy_check_mark: | A list of subscriber IDs to unsubscribe. | \ No newline at end of file diff --git a/docs/models/operations/deleteenvironmentrequest.md b/docs/models/operations/deleteenvironmentrequest.md index a8b9ef53..07693aec 100644 --- a/docs/models/operations/deleteenvironmentrequest.md +++ b/docs/models/operations/deleteenvironmentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteEnvironmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteEnvironmentRequest } from "firehydrant/models/operations"; let value: DeleteEnvironmentRequest = { environmentId: "", diff --git a/docs/models/operations/deletefunctionalityrequest.md b/docs/models/operations/deletefunctionalityrequest.md index e08bc06d..4a6dacee 100644 --- a/docs/models/operations/deletefunctionalityrequest.md +++ b/docs/models/operations/deletefunctionalityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteFunctionalityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteFunctionalityRequest } from "firehydrant/models/operations"; let value: DeleteFunctionalityRequest = { functionalityId: "", diff --git a/docs/models/operations/deleteinboundfieldmaprequest.md b/docs/models/operations/deleteinboundfieldmaprequest.md new file mode 100644 index 00000000..afc8beb6 --- /dev/null +++ b/docs/models/operations/deleteinboundfieldmaprequest.md @@ -0,0 +1,19 @@ +# DeleteInboundFieldMapRequest + +## Example Usage + +```typescript +import { DeleteInboundFieldMapRequest } from "firehydrant/models/operations"; + +let value: DeleteInboundFieldMapRequest = { + mapId: "", + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `mapId` | *string* | :heavy_check_mark: | N/A | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteincidentalertrequest.md b/docs/models/operations/deleteincidentalertrequest.md index f07486ab..655192f3 100644 --- a/docs/models/operations/deleteincidentalertrequest.md +++ b/docs/models/operations/deleteincidentalertrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentAlertRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentAlertRequest } from "firehydrant/models/operations"; let value: DeleteIncidentAlertRequest = { incidentAlertId: "", diff --git a/docs/models/operations/deleteincidentchatmessagerequest.md b/docs/models/operations/deleteincidentchatmessagerequest.md index cd0aa0a1..a528805f 100644 --- a/docs/models/operations/deleteincidentchatmessagerequest.md +++ b/docs/models/operations/deleteincidentchatmessagerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentChatMessageRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentChatMessageRequest } from "firehydrant/models/operations"; let value: DeleteIncidentChatMessageRequest = { messageId: "", diff --git a/docs/models/operations/deleteincidenteventrequest.md b/docs/models/operations/deleteincidenteventrequest.md index e5dbb707..a5434e01 100644 --- a/docs/models/operations/deleteincidenteventrequest.md +++ b/docs/models/operations/deleteincidenteventrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentEventRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentEventRequest } from "firehydrant/models/operations"; let value: DeleteIncidentEventRequest = { incidentId: "", diff --git a/docs/models/operations/deleteincidentimpactpathparamtype.md b/docs/models/operations/deleteincidentimpactpathparamtype.md deleted file mode 100644 index 43b0d783..00000000 --- a/docs/models/operations/deleteincidentimpactpathparamtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeleteIncidentImpactPathParamType - -## Example Usage - -```typescript -import { DeleteIncidentImpactPathParamType } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteIncidentImpactPathParamType = "customers"; -``` - -## Values - -```typescript -"environments" | "functionalities" | "services" | "customers" -``` \ No newline at end of file diff --git a/docs/models/operations/deleteincidentimpactrequest.md b/docs/models/operations/deleteincidentimpactrequest.md index 6a6a5aea..6391f0b1 100644 --- a/docs/models/operations/deleteincidentimpactrequest.md +++ b/docs/models/operations/deleteincidentimpactrequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { DeleteIncidentImpactRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentImpactRequest } from "firehydrant/models/operations"; let value: DeleteIncidentImpactRequest = { incidentId: "", - type: "customers", + type: "environments", id: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `type` | [operations.DeleteIncidentImpactPathParamType](../../models/operations/deleteincidentimpactpathparamtype.md) | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `type` | [operations.DeleteIncidentImpactType](../../models/operations/deleteincidentimpacttype.md) | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteincidentimpacttype.md b/docs/models/operations/deleteincidentimpacttype.md new file mode 100644 index 00000000..346da51b --- /dev/null +++ b/docs/models/operations/deleteincidentimpacttype.md @@ -0,0 +1,15 @@ +# DeleteIncidentImpactType + +## Example Usage + +```typescript +import { DeleteIncidentImpactType } from "firehydrant/models/operations"; + +let value: DeleteIncidentImpactType = "environments"; +``` + +## Values + +```typescript +"environments" | "functionalities" | "services" | "customers" +``` \ No newline at end of file diff --git a/docs/models/operations/deleteincidentlinkrequest.md b/docs/models/operations/deleteincidentlinkrequest.md index 814d303d..7d2ca3a9 100644 --- a/docs/models/operations/deleteincidentlinkrequest.md +++ b/docs/models/operations/deleteincidentlinkrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentLinkRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentLinkRequest } from "firehydrant/models/operations"; let value: DeleteIncidentLinkRequest = { linkId: "", diff --git a/docs/models/operations/deleteincidentrequest.md b/docs/models/operations/deleteincidentrequest.md new file mode 100644 index 00000000..b9c19991 --- /dev/null +++ b/docs/models/operations/deleteincidentrequest.md @@ -0,0 +1,17 @@ +# DeleteIncidentRequest + +## Example Usage + +```typescript +import { DeleteIncidentRequest } from "firehydrant/models/operations"; + +let value: DeleteIncidentRequest = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteincidentretrospectivedynamicinputrequest.md b/docs/models/operations/deleteincidentretrospectivedynamicinputrequest.md new file mode 100644 index 00000000..38a7e37a --- /dev/null +++ b/docs/models/operations/deleteincidentretrospectivedynamicinputrequest.md @@ -0,0 +1,23 @@ +# DeleteIncidentRetrospectiveDynamicInputRequest + +## Example Usage + +```typescript +import { DeleteIncidentRetrospectiveDynamicInputRequest } from "firehydrant/models/operations"; + +let value: DeleteIncidentRetrospectiveDynamicInputRequest = { + retrospectiveId: "", + fieldId: "", + dynamicInputFieldId: "", + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `retrospectiveId` | *string* | :heavy_check_mark: | N/A | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `dynamicInputFieldId` | *string* | :heavy_check_mark: | The ID of the dynamic input field to delete. | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteincidentroleassignmentrequest.md b/docs/models/operations/deleteincidentroleassignmentrequest.md index d366c27d..3bc8c39f 100644 --- a/docs/models/operations/deleteincidentroleassignmentrequest.md +++ b/docs/models/operations/deleteincidentroleassignmentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentRoleAssignmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentRoleAssignmentRequest } from "firehydrant/models/operations"; let value: DeleteIncidentRoleAssignmentRequest = { incidentId: "", diff --git a/docs/models/operations/deleteincidentrolerequest.md b/docs/models/operations/deleteincidentrolerequest.md index 521da881..2aaf3bc7 100644 --- a/docs/models/operations/deleteincidentrolerequest.md +++ b/docs/models/operations/deleteincidentrolerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentRoleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentRoleRequest } from "firehydrant/models/operations"; let value: DeleteIncidentRoleRequest = { incidentRoleId: "", diff --git a/docs/models/operations/deleteincidentstatuspagerequest.md b/docs/models/operations/deleteincidentstatuspagerequest.md index e1104db8..d853ddfc 100644 --- a/docs/models/operations/deleteincidentstatuspagerequest.md +++ b/docs/models/operations/deleteincidentstatuspagerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentStatusPageRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentStatusPageRequest } from "firehydrant/models/operations"; let value: DeleteIncidentStatusPageRequest = { statusPageId: "", diff --git a/docs/models/operations/deleteincidenttaskrequest.md b/docs/models/operations/deleteincidenttaskrequest.md index fb16d315..6ec301d6 100644 --- a/docs/models/operations/deleteincidenttaskrequest.md +++ b/docs/models/operations/deleteincidenttaskrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentTaskRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentTaskRequest } from "firehydrant/models/operations"; let value: DeleteIncidentTaskRequest = { taskId: "", diff --git a/docs/models/operations/deleteincidentteamassignmentrequest.md b/docs/models/operations/deleteincidentteamassignmentrequest.md index ec873467..e6ab7ee9 100644 --- a/docs/models/operations/deleteincidentteamassignmentrequest.md +++ b/docs/models/operations/deleteincidentteamassignmentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentTeamAssignmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentTeamAssignmentRequest } from "firehydrant/models/operations"; let value: DeleteIncidentTeamAssignmentRequest = { incidentId: "", diff --git a/docs/models/operations/deleteincidentteamassignmentrequestbody.md b/docs/models/operations/deleteincidentteamassignmentrequestbody.md index efe18158..a55c8cc0 100644 --- a/docs/models/operations/deleteincidentteamassignmentrequestbody.md +++ b/docs/models/operations/deleteincidentteamassignmentrequestbody.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteIncidentTeamAssignmentRequestBody } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteIncidentTeamAssignmentRequestBody } from "firehydrant/models/operations"; let value: DeleteIncidentTeamAssignmentRequestBody = {}; ``` diff --git a/docs/models/operations/deleteincidenttranscriptrequest.md b/docs/models/operations/deleteincidenttranscriptrequest.md deleted file mode 100644 index 3acb2094..00000000 --- a/docs/models/operations/deleteincidenttranscriptrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteIncidentTranscriptRequest - -## Example Usage - -```typescript -import { DeleteIncidentTranscriptRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteIncidentTranscriptRequest = { - transcriptId: "", - incidentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `transcriptId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteincidenttyperequest.md b/docs/models/operations/deleteincidenttyperequest.md new file mode 100644 index 00000000..0b7f8b0f --- /dev/null +++ b/docs/models/operations/deleteincidenttyperequest.md @@ -0,0 +1,17 @@ +# DeleteIncidentTypeRequest + +## Example Usage + +```typescript +import { DeleteIncidentTypeRequest } from "firehydrant/models/operations"; + +let value: DeleteIncidentTypeRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletelifecyclemeasurementdefinitionrequest.md b/docs/models/operations/deletelifecyclemeasurementdefinitionrequest.md new file mode 100644 index 00000000..1cdb7d2e --- /dev/null +++ b/docs/models/operations/deletelifecyclemeasurementdefinitionrequest.md @@ -0,0 +1,17 @@ +# DeleteLifecycleMeasurementDefinitionRequest + +## Example Usage + +```typescript +import { DeleteLifecycleMeasurementDefinitionRequest } from "firehydrant/models/operations"; + +let value: DeleteLifecycleMeasurementDefinitionRequest = { + measurementDefinitionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `measurementDefinitionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletelifecyclemilestonerequest.md b/docs/models/operations/deletelifecyclemilestonerequest.md index e9ad8b57..ec49569d 100644 --- a/docs/models/operations/deletelifecyclemilestonerequest.md +++ b/docs/models/operations/deletelifecyclemilestonerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteLifecycleMilestoneRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteLifecycleMilestoneRequest } from "firehydrant/models/operations"; let value: DeleteLifecycleMilestoneRequest = { milestoneId: "", diff --git a/docs/models/operations/deletemeasurementdefinitionrequest.md b/docs/models/operations/deletemeasurementdefinitionrequest.md deleted file mode 100644 index d6679d6f..00000000 --- a/docs/models/operations/deletemeasurementdefinitionrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# DeleteMeasurementDefinitionRequest - -## Example Usage - -```typescript -import { DeleteMeasurementDefinitionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteMeasurementDefinitionRequest = { - measurementDefinitionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `measurementDefinitionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletenunccomponentgrouprequest.md b/docs/models/operations/deletenunccomponentgrouprequest.md new file mode 100644 index 00000000..22f74813 --- /dev/null +++ b/docs/models/operations/deletenunccomponentgrouprequest.md @@ -0,0 +1,19 @@ +# DeleteNuncComponentGroupRequest + +## Example Usage + +```typescript +import { DeleteNuncComponentGroupRequest } from "firehydrant/models/operations"; + +let value: DeleteNuncComponentGroupRequest = { + nuncConnectionId: "", + groupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `groupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletenuncconnectionrequest.md b/docs/models/operations/deletenuncconnectionrequest.md new file mode 100644 index 00000000..cf0b86ed --- /dev/null +++ b/docs/models/operations/deletenuncconnectionrequest.md @@ -0,0 +1,17 @@ +# DeleteNuncConnectionRequest + +## Example Usage + +```typescript +import { DeleteNuncConnectionRequest } from "firehydrant/models/operations"; + +let value: DeleteNuncConnectionRequest = { + nuncConnectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletenuncimagerequest.md b/docs/models/operations/deletenuncimagerequest.md new file mode 100644 index 00000000..6793c575 --- /dev/null +++ b/docs/models/operations/deletenuncimagerequest.md @@ -0,0 +1,19 @@ +# DeleteNuncImageRequest + +## Example Usage + +```typescript +import { DeleteNuncImageRequest } from "firehydrant/models/operations"; + +let value: DeleteNuncImageRequest = { + nuncConnectionId: "", + type: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletenunclinkrequest.md b/docs/models/operations/deletenunclinkrequest.md new file mode 100644 index 00000000..b31bb53c --- /dev/null +++ b/docs/models/operations/deletenunclinkrequest.md @@ -0,0 +1,19 @@ +# DeleteNuncLinkRequest + +## Example Usage + +```typescript +import { DeleteNuncLinkRequest } from "firehydrant/models/operations"; + +let value: DeleteNuncLinkRequest = { + nuncConnectionId: "", + linkId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `linkId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletenuncsubscriptionrequest.md b/docs/models/operations/deletenuncsubscriptionrequest.md index 690b5cd6..c48e0df6 100644 --- a/docs/models/operations/deletenuncsubscriptionrequest.md +++ b/docs/models/operations/deletenuncsubscriptionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteNuncSubscriptionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteNuncSubscriptionRequest } from "firehydrant/models/operations"; let value: DeleteNuncSubscriptionRequest = { unsubscribeToken: "", diff --git a/docs/models/operations/deleteoncallshiftrequest.md b/docs/models/operations/deleteoncallshiftrequest.md new file mode 100644 index 00000000..6a12e5b8 --- /dev/null +++ b/docs/models/operations/deleteoncallshiftrequest.md @@ -0,0 +1,21 @@ +# DeleteOnCallShiftRequest + +## Example Usage + +```typescript +import { DeleteOnCallShiftRequest } from "firehydrant/models/operations"; + +let value: DeleteOnCallShiftRequest = { + id: "", + teamId: "", + scheduleId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `scheduleId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletepostmortemreasonrequest.md b/docs/models/operations/deletepostmortemreasonrequest.md new file mode 100644 index 00000000..8879afdb --- /dev/null +++ b/docs/models/operations/deletepostmortemreasonrequest.md @@ -0,0 +1,19 @@ +# DeletePostMortemReasonRequest + +## Example Usage + +```typescript +import { DeletePostMortemReasonRequest } from "firehydrant/models/operations"; + +let value: DeletePostMortemReasonRequest = { + reportId: "", + reasonId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `reasonId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletepriorityrequest.md b/docs/models/operations/deletepriorityrequest.md index 5b3fc782..fff2ad62 100644 --- a/docs/models/operations/deletepriorityrequest.md +++ b/docs/models/operations/deletepriorityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeletePriorityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeletePriorityRequest } from "firehydrant/models/operations"; let value: DeletePriorityRequest = { prioritySlug: "", diff --git a/docs/models/operations/deleteretrospectivereasonrequest.md b/docs/models/operations/deleteretrospectivereasonrequest.md deleted file mode 100644 index 0cb0863c..00000000 --- a/docs/models/operations/deleteretrospectivereasonrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteRetrospectiveReasonRequest - -## Example Usage - -```typescript -import { DeleteRetrospectiveReasonRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteRetrospectiveReasonRequest = { - reportId: "", - reasonId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `reasonId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteretrospectivetemplaterequest.md b/docs/models/operations/deleteretrospectivetemplaterequest.md new file mode 100644 index 00000000..0b5ae01f --- /dev/null +++ b/docs/models/operations/deleteretrospectivetemplaterequest.md @@ -0,0 +1,17 @@ +# DeleteRetrospectiveTemplateRequest + +## Example Usage + +```typescript +import { DeleteRetrospectiveTemplateRequest } from "firehydrant/models/operations"; + +let value: DeleteRetrospectiveTemplateRequest = { + retrospectiveTemplateId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `retrospectiveTemplateId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleterunbookexecutionrequest.md b/docs/models/operations/deleterunbookexecutionrequest.md index ea42dab5..3aedfdd7 100644 --- a/docs/models/operations/deleterunbookexecutionrequest.md +++ b/docs/models/operations/deleterunbookexecutionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteRunbookExecutionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteRunbookExecutionRequest } from "firehydrant/models/operations"; let value: DeleteRunbookExecutionRequest = { executionId: "", diff --git a/docs/models/operations/deleterunbookrequest.md b/docs/models/operations/deleterunbookrequest.md index f70998e1..99d01a30 100644 --- a/docs/models/operations/deleterunbookrequest.md +++ b/docs/models/operations/deleterunbookrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteRunbookRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteRunbookRequest } from "firehydrant/models/operations"; let value: DeleteRunbookRequest = { runbookId: "", diff --git a/docs/models/operations/deletesavedsearchpathparamresourcetype.md b/docs/models/operations/deletesavedsearchpathparamresourcetype.md deleted file mode 100644 index 575a67ac..00000000 --- a/docs/models/operations/deletesavedsearchpathparamresourcetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# DeleteSavedSearchPathParamResourceType - -## Example Usage - -```typescript -import { DeleteSavedSearchPathParamResourceType } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteSavedSearchPathParamResourceType = "analytics"; -``` - -## Values - -```typescript -"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" -``` \ No newline at end of file diff --git a/docs/models/operations/deletesavedsearchrequest.md b/docs/models/operations/deletesavedsearchrequest.md index f6e9c159..35360f86 100644 --- a/docs/models/operations/deletesavedsearchrequest.md +++ b/docs/models/operations/deletesavedsearchrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { DeleteSavedSearchRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteSavedSearchRequest } from "firehydrant/models/operations"; let value: DeleteSavedSearchRequest = { - resourceType: "incidents", + resourceType: "ticket_follow_ups", savedSearchId: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `resourceType` | [operations.DeleteSavedSearchPathParamResourceType](../../models/operations/deletesavedsearchpathparamresourcetype.md) | :heavy_check_mark: | N/A | -| `savedSearchId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `resourceType` | [operations.DeleteSavedSearchResourceType](../../models/operations/deletesavedsearchresourcetype.md) | :heavy_check_mark: | N/A | +| `savedSearchId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletesavedsearchresourcetype.md b/docs/models/operations/deletesavedsearchresourcetype.md new file mode 100644 index 00000000..f777ca3d --- /dev/null +++ b/docs/models/operations/deletesavedsearchresourcetype.md @@ -0,0 +1,15 @@ +# DeleteSavedSearchResourceType + +## Example Usage + +```typescript +import { DeleteSavedSearchResourceType } from "firehydrant/models/operations"; + +let value: DeleteSavedSearchResourceType = "incidents"; +``` + +## Values + +```typescript +"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" +``` \ No newline at end of file diff --git a/docs/models/operations/deletescheduledmaintenancerequest.md b/docs/models/operations/deletescheduledmaintenancerequest.md index d4389aba..b9420a04 100644 --- a/docs/models/operations/deletescheduledmaintenancerequest.md +++ b/docs/models/operations/deletescheduledmaintenancerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteScheduledMaintenanceRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteScheduledMaintenanceRequest } from "firehydrant/models/operations"; let value: DeleteScheduledMaintenanceRequest = { scheduledMaintenanceId: "", diff --git a/docs/models/operations/deletescimgrouprequest.md b/docs/models/operations/deletescimgrouprequest.md index b4b2fcf0..f1210830 100644 --- a/docs/models/operations/deletescimgrouprequest.md +++ b/docs/models/operations/deletescimgrouprequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteScimGroupRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteScimGroupRequest } from "firehydrant/models/operations"; let value: DeleteScimGroupRequest = { id: "", diff --git a/docs/models/operations/deletescimuserrequest.md b/docs/models/operations/deletescimuserrequest.md index 86c21e69..486be330 100644 --- a/docs/models/operations/deletescimuserrequest.md +++ b/docs/models/operations/deletescimuserrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteScimUserRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteScimUserRequest } from "firehydrant/models/operations"; let value: DeleteScimUserRequest = { id: "", diff --git a/docs/models/operations/deleteservicedependencyrequest.md b/docs/models/operations/deleteservicedependencyrequest.md index 524b02e2..ad1e2285 100644 --- a/docs/models/operations/deleteservicedependencyrequest.md +++ b/docs/models/operations/deleteservicedependencyrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteServiceDependencyRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteServiceDependencyRequest } from "firehydrant/models/operations"; let value: DeleteServiceDependencyRequest = { serviceDependencyId: "", diff --git a/docs/models/operations/deleteservicelinkrequest.md b/docs/models/operations/deleteservicelinkrequest.md index bb4970ca..604bd6fa 100644 --- a/docs/models/operations/deleteservicelinkrequest.md +++ b/docs/models/operations/deleteservicelinkrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteServiceLinkRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteServiceLinkRequest } from "firehydrant/models/operations"; let value: DeleteServiceLinkRequest = { serviceId: "", diff --git a/docs/models/operations/deleteservicerequest.md b/docs/models/operations/deleteservicerequest.md index 2ca4f8b4..39a4eb8e 100644 --- a/docs/models/operations/deleteservicerequest.md +++ b/docs/models/operations/deleteservicerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteServiceRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteServiceRequest } from "firehydrant/models/operations"; let value: DeleteServiceRequest = { serviceId: "", diff --git a/docs/models/operations/deleteseveritymatrixconditionrequest.md b/docs/models/operations/deleteseveritymatrixconditionrequest.md index 26fe60bb..2bc4e52e 100644 --- a/docs/models/operations/deleteseveritymatrixconditionrequest.md +++ b/docs/models/operations/deleteseveritymatrixconditionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteSeverityMatrixConditionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteSeverityMatrixConditionRequest } from "firehydrant/models/operations"; let value: DeleteSeverityMatrixConditionRequest = { conditionId: "", diff --git a/docs/models/operations/deleteseveritymatriximpactrequest.md b/docs/models/operations/deleteseveritymatriximpactrequest.md index 9a65931b..9357621d 100644 --- a/docs/models/operations/deleteseveritymatriximpactrequest.md +++ b/docs/models/operations/deleteseveritymatriximpactrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteSeverityMatrixImpactRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteSeverityMatrixImpactRequest } from "firehydrant/models/operations"; let value: DeleteSeverityMatrixImpactRequest = { impactId: "", diff --git a/docs/models/operations/deleteseverityrequest.md b/docs/models/operations/deleteseverityrequest.md index 48bf2dd6..bf37251f 100644 --- a/docs/models/operations/deleteseverityrequest.md +++ b/docs/models/operations/deleteseverityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteSeverityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteSeverityRequest } from "firehydrant/models/operations"; let value: DeleteSeverityRequest = { severitySlug: "", diff --git a/docs/models/operations/deletesignalemailtargetrequest.md b/docs/models/operations/deletesignalemailtargetrequest.md deleted file mode 100644 index fa4ac5a2..00000000 --- a/docs/models/operations/deletesignalemailtargetrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# DeleteSignalEmailTargetRequest - -## Example Usage - -```typescript -import { DeleteSignalEmailTargetRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteSignalEmailTargetRequest = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletesignalsemailtargetrequest.md b/docs/models/operations/deletesignalsemailtargetrequest.md new file mode 100644 index 00000000..e1b77f47 --- /dev/null +++ b/docs/models/operations/deletesignalsemailtargetrequest.md @@ -0,0 +1,17 @@ +# DeleteSignalsEmailTargetRequest + +## Example Usage + +```typescript +import { DeleteSignalsEmailTargetRequest } from "firehydrant/models/operations"; + +let value: DeleteSignalsEmailTargetRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletesignalswebhooktargetrequest.md b/docs/models/operations/deletesignalswebhooktargetrequest.md index 7890b742..82be806e 100644 --- a/docs/models/operations/deletesignalswebhooktargetrequest.md +++ b/docs/models/operations/deletesignalswebhooktargetrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteSignalsWebhookTargetRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteSignalsWebhookTargetRequest } from "firehydrant/models/operations"; let value: DeleteSignalsWebhookTargetRequest = { id: "", diff --git a/docs/models/operations/deleteslackemojiactionrequest.md b/docs/models/operations/deleteslackemojiactionrequest.md index 4ffb9c56..72810180 100644 --- a/docs/models/operations/deleteslackemojiactionrequest.md +++ b/docs/models/operations/deleteslackemojiactionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteSlackEmojiActionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteSlackEmojiActionRequest } from "firehydrant/models/operations"; let value: DeleteSlackEmojiActionRequest = { connectionId: "", diff --git a/docs/models/operations/deletestatuspagecomponentgrouprequest.md b/docs/models/operations/deletestatuspagecomponentgrouprequest.md deleted file mode 100644 index 268f8393..00000000 --- a/docs/models/operations/deletestatuspagecomponentgrouprequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteStatusPageComponentGroupRequest - -## Example Usage - -```typescript -import { DeleteStatusPageComponentGroupRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteStatusPageComponentGroupRequest = { - nuncConnectionId: "", - groupId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `groupId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletestatuspageconnectionrequest.md b/docs/models/operations/deletestatuspageconnectionrequest.md index 306f01c2..4820d1c5 100644 --- a/docs/models/operations/deletestatuspageconnectionrequest.md +++ b/docs/models/operations/deletestatuspageconnectionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteStatuspageConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteStatuspageConnectionRequest } from "firehydrant/models/operations"; let value: DeleteStatuspageConnectionRequest = { connectionId: "", diff --git a/docs/models/operations/deletestatuspageimagerequest.md b/docs/models/operations/deletestatuspageimagerequest.md deleted file mode 100644 index d7d118b2..00000000 --- a/docs/models/operations/deletestatuspageimagerequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteStatusPageImageRequest - -## Example Usage - -```typescript -import { DeleteStatusPageImageRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteStatusPageImageRequest = { - nuncConnectionId: "", - type: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `type` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletestatuspagelinkrequest.md b/docs/models/operations/deletestatuspagelinkrequest.md deleted file mode 100644 index 2635f831..00000000 --- a/docs/models/operations/deletestatuspagelinkrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteStatusPageLinkRequest - -## Example Usage - -```typescript -import { DeleteStatusPageLinkRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteStatusPageLinkRequest = { - nuncConnectionId: "", - linkId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `linkId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletestatuspagerequest.md b/docs/models/operations/deletestatuspagerequest.md deleted file mode 100644 index ca1803a3..00000000 --- a/docs/models/operations/deletestatuspagerequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# DeleteStatusPageRequest - -## Example Usage - -```typescript -import { DeleteStatusPageRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteStatusPageRequest = { - nuncConnectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletestatuspagesubscribersrequest.md b/docs/models/operations/deletestatuspagesubscribersrequest.md deleted file mode 100644 index 3b76f32b..00000000 --- a/docs/models/operations/deletestatuspagesubscribersrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteStatusPageSubscribersRequest - -## Example Usage - -```typescript -import { DeleteStatusPageSubscribersRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteStatusPageSubscribersRequest = { - nuncConnectionId: "", - subscriberIds: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `subscriberIds` | *string* | :heavy_check_mark: | A list of subscriber IDs to unsubscribe. | \ No newline at end of file diff --git a/docs/models/operations/deletestatusupdatetemplaterequest.md b/docs/models/operations/deletestatusupdatetemplaterequest.md index cc3c6f20..b4bccc6f 100644 --- a/docs/models/operations/deletestatusupdatetemplaterequest.md +++ b/docs/models/operations/deletestatusupdatetemplaterequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteStatusUpdateTemplateRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteStatusUpdateTemplateRequest } from "firehydrant/models/operations"; let value: DeleteStatusUpdateTemplateRequest = { statusUpdateTemplateId: "", diff --git a/docs/models/operations/deletetasklistrequest.md b/docs/models/operations/deletetasklistrequest.md index ec0ab705..f1dfac74 100644 --- a/docs/models/operations/deletetasklistrequest.md +++ b/docs/models/operations/deletetasklistrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteTaskListRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteTaskListRequest } from "firehydrant/models/operations"; let value: DeleteTaskListRequest = { taskListId: "", diff --git a/docs/models/operations/deleteteamescalationpolicyrequest.md b/docs/models/operations/deleteteamescalationpolicyrequest.md index 4ff88731..30d7d929 100644 --- a/docs/models/operations/deleteteamescalationpolicyrequest.md +++ b/docs/models/operations/deleteteamescalationpolicyrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteTeamEscalationPolicyRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteTeamEscalationPolicyRequest } from "firehydrant/models/operations"; let value: DeleteTeamEscalationPolicyRequest = { teamId: "", diff --git a/docs/models/operations/deleteteamoncallschedulerequest.md b/docs/models/operations/deleteteamoncallschedulerequest.md index fa80352c..2214b856 100644 --- a/docs/models/operations/deleteteamoncallschedulerequest.md +++ b/docs/models/operations/deleteteamoncallschedulerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteTeamOnCallScheduleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteTeamOnCallScheduleRequest } from "firehydrant/models/operations"; let value: DeleteTeamOnCallScheduleRequest = { teamId: "", diff --git a/docs/models/operations/deleteteamrequest.md b/docs/models/operations/deleteteamrequest.md new file mode 100644 index 00000000..5f1fb473 --- /dev/null +++ b/docs/models/operations/deleteteamrequest.md @@ -0,0 +1,17 @@ +# DeleteTeamRequest + +## Example Usage + +```typescript +import { DeleteTeamRequest } from "firehydrant/models/operations"; + +let value: DeleteTeamRequest = { + teamId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `teamId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteteamscheduleshiftrequest.md b/docs/models/operations/deleteteamscheduleshiftrequest.md deleted file mode 100644 index e15537ea..00000000 --- a/docs/models/operations/deleteteamscheduleshiftrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# DeleteTeamScheduleShiftRequest - -## Example Usage - -```typescript -import { DeleteTeamScheduleShiftRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteTeamScheduleShiftRequest = { - id: "", - teamId: "", - scheduleId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `scheduleId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteteamsignalrulerequest.md b/docs/models/operations/deleteteamsignalrulerequest.md index 85672f7f..fe2d6c0a 100644 --- a/docs/models/operations/deleteteamsignalrulerequest.md +++ b/docs/models/operations/deleteteamsignalrulerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteTeamSignalRuleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteTeamSignalRuleRequest } from "firehydrant/models/operations"; let value: DeleteTeamSignalRuleRequest = { teamId: "", diff --git a/docs/models/operations/deleteticketingfieldmaprequest.md b/docs/models/operations/deleteticketingfieldmaprequest.md new file mode 100644 index 00000000..c18e1bf5 --- /dev/null +++ b/docs/models/operations/deleteticketingfieldmaprequest.md @@ -0,0 +1,19 @@ +# DeleteTicketingFieldMapRequest + +## Example Usage + +```typescript +import { DeleteTicketingFieldMapRequest } from "firehydrant/models/operations"; + +let value: DeleteTicketingFieldMapRequest = { + mapId: "", + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `mapId` | *string* | :heavy_check_mark: | N/A | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteticketingpriorityrequest.md b/docs/models/operations/deleteticketingpriorityrequest.md index 6eb49cce..240650a3 100644 --- a/docs/models/operations/deleteticketingpriorityrequest.md +++ b/docs/models/operations/deleteticketingpriorityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteTicketingPriorityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteTicketingPriorityRequest } from "firehydrant/models/operations"; let value: DeleteTicketingPriorityRequest = { id: "", diff --git a/docs/models/operations/deleteticketingprojectconfigrequest.md b/docs/models/operations/deleteticketingprojectconfigrequest.md index 14398d1e..212aa758 100644 --- a/docs/models/operations/deleteticketingprojectconfigrequest.md +++ b/docs/models/operations/deleteticketingprojectconfigrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteTicketingProjectConfigRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteTicketingProjectConfigRequest } from "firehydrant/models/operations"; let value: DeleteTicketingProjectConfigRequest = { ticketingProjectId: "", diff --git a/docs/models/operations/deleteticketingprojectfieldmaprequest.md b/docs/models/operations/deleteticketingprojectfieldmaprequest.md deleted file mode 100644 index 879d7f79..00000000 --- a/docs/models/operations/deleteticketingprojectfieldmaprequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# DeleteTicketingProjectFieldMapRequest - -## Example Usage - -```typescript -import { DeleteTicketingProjectFieldMapRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: DeleteTicketingProjectFieldMapRequest = { - mapId: "", - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `mapId` | *string* | :heavy_check_mark: | N/A | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deleteticketrequest.md b/docs/models/operations/deleteticketrequest.md index ced5437a..fbb2053e 100644 --- a/docs/models/operations/deleteticketrequest.md +++ b/docs/models/operations/deleteticketrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteTicketRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteTicketRequest } from "firehydrant/models/operations"; let value: DeleteTicketRequest = { ticketId: "", diff --git a/docs/models/operations/deletetranscriptentryrequest.md b/docs/models/operations/deletetranscriptentryrequest.md new file mode 100644 index 00000000..fe5d629b --- /dev/null +++ b/docs/models/operations/deletetranscriptentryrequest.md @@ -0,0 +1,19 @@ +# DeleteTranscriptEntryRequest + +## Example Usage + +```typescript +import { DeleteTranscriptEntryRequest } from "firehydrant/models/operations"; + +let value: DeleteTranscriptEntryRequest = { + transcriptId: "", + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `transcriptId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/deletewebhookrequest.md b/docs/models/operations/deletewebhookrequest.md index e5a36c4b..3a228324 100644 --- a/docs/models/operations/deletewebhookrequest.md +++ b/docs/models/operations/deletewebhookrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { DeleteWebhookRequest } from "firehydrant-typescript-sdk/models/operations"; +import { DeleteWebhookRequest } from "firehydrant/models/operations"; let value: DeleteWebhookRequest = { webhookId: "", diff --git a/docs/models/operations/direction.md b/docs/models/operations/direction.md index 904a18bc..719aa42f 100644 --- a/docs/models/operations/direction.md +++ b/docs/models/operations/direction.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { Direction } from "firehydrant-typescript-sdk/models/operations"; +import { Direction } from "firehydrant/models/operations"; let value: Direction = "down"; ``` diff --git a/docs/models/operations/exactlevel.md b/docs/models/operations/exactlevel.md index c917610f..c0b8169f 100644 --- a/docs/models/operations/exactlevel.md +++ b/docs/models/operations/exactlevel.md @@ -5,9 +5,9 @@ Returns log entries of all levels equal to the provided level ## Example Usage ```typescript -import { ExactLevel } from "firehydrant-typescript-sdk/models/operations"; +import { ExactLevel } from "firehydrant/models/operations"; -let value: ExactLevel = "unknown"; +let value: ExactLevel = "error"; ``` ## Values diff --git a/docs/models/operations/exportincidentretrospectivesrequest.md b/docs/models/operations/exportincidentretrospectivesrequest.md new file mode 100644 index 00000000..ef8637cc --- /dev/null +++ b/docs/models/operations/exportincidentretrospectivesrequest.md @@ -0,0 +1,21 @@ +# ExportIncidentRetrospectivesRequest + +## Example Usage + +```typescript +import { ExportIncidentRetrospectivesRequest } from "firehydrant/models/operations"; + +let value: ExportIncidentRetrospectivesRequest = { + incidentId: "", + requestBody: { + integrationSlug: "google_docs", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.ExportIncidentRetrospectivesRequestBody](../../models/operations/exportincidentretrospectivesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/exportincidentretrospectivesrequestbody.md b/docs/models/operations/exportincidentretrospectivesrequestbody.md new file mode 100644 index 00000000..35e1602c --- /dev/null +++ b/docs/models/operations/exportincidentretrospectivesrequestbody.md @@ -0,0 +1,18 @@ +# ExportIncidentRetrospectivesRequestBody + +## Example Usage + +```typescript +import { ExportIncidentRetrospectivesRequestBody } from "firehydrant/models/operations"; + +let value: ExportIncidentRetrospectivesRequestBody = { + integrationSlug: "google_docs", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `integrationSlug` | [operations.IntegrationSlug](../../models/operations/integrationslug.md) | :heavy_check_mark: | The name of the integration to export the retrospective to. | +| `parentPageId` | *string* | :heavy_minus_sign: | The ID of the parent page to export the retrospective to. | \ No newline at end of file diff --git a/docs/models/operations/filet.md b/docs/models/operations/filet.md deleted file mode 100644 index 5cb7d4d4..00000000 --- a/docs/models/operations/filet.md +++ /dev/null @@ -1,16 +0,0 @@ -# FileT - -## Example Usage - -```typescript -import { FileT } from "firehydrant-typescript-sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `fileName` | *string* | :heavy_check_mark: | N/A | -| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/generateaudiencesummaryrequest.md b/docs/models/operations/generateaudiencesummaryrequest.md new file mode 100644 index 00000000..216097a0 --- /dev/null +++ b/docs/models/operations/generateaudiencesummaryrequest.md @@ -0,0 +1,20 @@ +# GenerateAudienceSummaryRequest + +## Example Usage + +```typescript +import { GenerateAudienceSummaryRequest } from "firehydrant/models/operations"; + +let value: GenerateAudienceSummaryRequest = { + audienceId: "", + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `audienceId` | *string* | :heavy_check_mark: | Unique identifier of the audience | +| `incidentId` | *string* | :heavy_check_mark: | Unique identifier of the incident to summarize | +| `requestBody` | [operations.GenerateAudienceSummaryRequestBody](../../models/operations/generateaudiencesummaryrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/generateaudiencesummaryrequestbody.md b/docs/models/operations/generateaudiencesummaryrequestbody.md new file mode 100644 index 00000000..641f368d --- /dev/null +++ b/docs/models/operations/generateaudiencesummaryrequestbody.md @@ -0,0 +1,15 @@ +# GenerateAudienceSummaryRequestBody + +## Example Usage + +```typescript +import { GenerateAudienceSummaryRequestBody } from "firehydrant/models/operations"; + +let value: GenerateAudienceSummaryRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `forceRegenerate` | *boolean* | :heavy_minus_sign: | Whether to force regeneration of the summary | \ No newline at end of file diff --git a/docs/models/operations/getaiincidentsummaryvotestatusrequest.md b/docs/models/operations/getaiincidentsummaryvotestatusrequest.md new file mode 100644 index 00000000..818fef69 --- /dev/null +++ b/docs/models/operations/getaiincidentsummaryvotestatusrequest.md @@ -0,0 +1,19 @@ +# GetAiIncidentSummaryVoteStatusRequest + +## Example Usage + +```typescript +import { GetAiIncidentSummaryVoteStatusRequest } from "firehydrant/models/operations"; + +let value: GetAiIncidentSummaryVoteStatusRequest = { + incidentId: "", + generatedSummaryId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `generatedSummaryId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getalertrequest.md b/docs/models/operations/getalertrequest.md index 4ee46285..43c13f2b 100644 --- a/docs/models/operations/getalertrequest.md +++ b/docs/models/operations/getalertrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetAlertRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetAlertRequest } from "firehydrant/models/operations"; let value: GetAlertRequest = { alertId: "", diff --git a/docs/models/operations/getaudiencerequest.md b/docs/models/operations/getaudiencerequest.md new file mode 100644 index 00000000..5fe8a6d1 --- /dev/null +++ b/docs/models/operations/getaudiencerequest.md @@ -0,0 +1,17 @@ +# GetAudienceRequest + +## Example Usage + +```typescript +import { GetAudienceRequest } from "firehydrant/models/operations"; + +let value: GetAudienceRequest = { + audienceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `audienceId` | *string* | :heavy_check_mark: | Unique identifier of the audience | \ No newline at end of file diff --git a/docs/models/operations/getaudiencesummaryrequest.md b/docs/models/operations/getaudiencesummaryrequest.md new file mode 100644 index 00000000..1fad37dc --- /dev/null +++ b/docs/models/operations/getaudiencesummaryrequest.md @@ -0,0 +1,19 @@ +# GetAudienceSummaryRequest + +## Example Usage + +```typescript +import { GetAudienceSummaryRequest } from "firehydrant/models/operations"; + +let value: GetAudienceSummaryRequest = { + audienceId: "", + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `audienceId` | *string* | :heavy_check_mark: | Unique identifier of the audience | +| `incidentId` | *string* | :heavy_check_mark: | Unique identifier of the incident to summarize | \ No newline at end of file diff --git a/docs/models/operations/getawscloudtrailbatcheventsrequest.md b/docs/models/operations/getawscloudtrailbatcheventsrequest.md deleted file mode 100644 index e826dca0..00000000 --- a/docs/models/operations/getawscloudtrailbatcheventsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetAwsCloudtrailBatchEventsRequest - -## Example Usage - -```typescript -import { GetAwsCloudtrailBatchEventsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetAwsCloudtrailBatchEventsRequest = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getawscloudtrailbatchrequest.md b/docs/models/operations/getawscloudtrailbatchrequest.md index 16738271..e91ce7d8 100644 --- a/docs/models/operations/getawscloudtrailbatchrequest.md +++ b/docs/models/operations/getawscloudtrailbatchrequest.md @@ -1,11 +1,11 @@ -# GetAwsCloudTrailBatchRequest +# GetAwsCloudtrailBatchRequest ## Example Usage ```typescript -import { GetAwsCloudTrailBatchRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetAwsCloudtrailBatchRequest } from "firehydrant/models/operations"; -let value: GetAwsCloudTrailBatchRequest = { +let value: GetAwsCloudtrailBatchRequest = { id: "", }; ``` diff --git a/docs/models/operations/getawsconnectionrequest.md b/docs/models/operations/getawsconnectionrequest.md index 1a7572be..6286b397 100644 --- a/docs/models/operations/getawsconnectionrequest.md +++ b/docs/models/operations/getawsconnectionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetAwsConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetAwsConnectionRequest } from "firehydrant/models/operations"; let value: GetAwsConnectionRequest = { id: "", diff --git a/docs/models/operations/getchangeeventrequest.md b/docs/models/operations/getchangeeventrequest.md index 3e0c4e42..b1c352d7 100644 --- a/docs/models/operations/getchangeeventrequest.md +++ b/docs/models/operations/getchangeeventrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetChangeEventRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetChangeEventRequest } from "firehydrant/models/operations"; let value: GetChangeEventRequest = { changeEventId: "", diff --git a/docs/models/operations/getchecklisttemplaterequest.md b/docs/models/operations/getchecklisttemplaterequest.md index 29a97388..709b4f50 100644 --- a/docs/models/operations/getchecklisttemplaterequest.md +++ b/docs/models/operations/getchecklisttemplaterequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetChecklistTemplateRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetChecklistTemplateRequest } from "firehydrant/models/operations"; let value: GetChecklistTemplateRequest = { id: "", diff --git a/docs/models/operations/getcommentrequest.md b/docs/models/operations/getcommentrequest.md new file mode 100644 index 00000000..f56c9042 --- /dev/null +++ b/docs/models/operations/getcommentrequest.md @@ -0,0 +1,19 @@ +# GetCommentRequest + +## Example Usage + +```typescript +import { GetCommentRequest } from "firehydrant/models/operations"; + +let value: GetCommentRequest = { + commentId: "", + conversationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `commentId` | *string* | :heavy_check_mark: | N/A | +| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getconferencebridgetranslationrequest.md b/docs/models/operations/getconferencebridgetranslationrequest.md new file mode 100644 index 00000000..ab6438c7 --- /dev/null +++ b/docs/models/operations/getconferencebridgetranslationrequest.md @@ -0,0 +1,21 @@ +# GetConferenceBridgeTranslationRequest + +## Example Usage + +```typescript +import { GetConferenceBridgeTranslationRequest } from "firehydrant/models/operations"; + +let value: GetConferenceBridgeTranslationRequest = { + id: "", + languageCode: "", + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `id` | *string* | :heavy_check_mark: | The ID of the conference bridge | +| `languageCode` | *string* | :heavy_check_mark: | The language code of the translation | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getconfigurationoptionsrequest.md b/docs/models/operations/getconfigurationoptionsrequest.md new file mode 100644 index 00000000..c831eebe --- /dev/null +++ b/docs/models/operations/getconfigurationoptionsrequest.md @@ -0,0 +1,17 @@ +# GetConfigurationOptionsRequest + +## Example Usage + +```typescript +import { GetConfigurationOptionsRequest } from "firehydrant/models/operations"; + +let value: GetConfigurationOptionsRequest = { + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getconversationcommentrequest.md b/docs/models/operations/getconversationcommentrequest.md deleted file mode 100644 index 930d509a..00000000 --- a/docs/models/operations/getconversationcommentrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetConversationCommentRequest - -## Example Usage - -```typescript -import { GetConversationCommentRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetConversationCommentRequest = { - commentId: "", - conversationId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `commentId` | *string* | :heavy_check_mark: | N/A | -| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getcustomfieldselectoptionsrequest.md b/docs/models/operations/getcustomfieldselectoptionsrequest.md deleted file mode 100644 index b047dcae..00000000 --- a/docs/models/operations/getcustomfieldselectoptionsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetCustomFieldSelectOptionsRequest - -## Example Usage - -```typescript -import { GetCustomFieldSelectOptionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetCustomFieldSelectOptionsRequest = { - fieldId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `fieldId` | *string* | :heavy_check_mark: | N/A | -| `query` | *string* | :heavy_minus_sign: | Text string of a query for filtering values. | -| `allVersions` | *boolean* | :heavy_minus_sign: | If true, return all versions of the custom field definition. | \ No newline at end of file diff --git a/docs/models/operations/getenvironmentrequest.md b/docs/models/operations/getenvironmentrequest.md index abdde110..2a4ac54d 100644 --- a/docs/models/operations/getenvironmentrequest.md +++ b/docs/models/operations/getenvironmentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetEnvironmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetEnvironmentRequest } from "firehydrant/models/operations"; let value: GetEnvironmentRequest = { environmentId: "", diff --git a/docs/models/operations/getformconfigurationrequest.md b/docs/models/operations/getformconfigurationrequest.md index a88ad33c..25834011 100644 --- a/docs/models/operations/getformconfigurationrequest.md +++ b/docs/models/operations/getformconfigurationrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetFormConfigurationRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetFormConfigurationRequest } from "firehydrant/models/operations"; let value: GetFormConfigurationRequest = { slug: "", diff --git a/docs/models/operations/getfunctionalityrequest.md b/docs/models/operations/getfunctionalityrequest.md index 0ab2b436..424abd3d 100644 --- a/docs/models/operations/getfunctionalityrequest.md +++ b/docs/models/operations/getfunctionalityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetFunctionalityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetFunctionalityRequest } from "firehydrant/models/operations"; let value: GetFunctionalityRequest = { functionalityId: "", diff --git a/docs/models/operations/getfunctionalityservicesrequest.md b/docs/models/operations/getfunctionalityservicesrequest.md deleted file mode 100644 index 96901501..00000000 --- a/docs/models/operations/getfunctionalityservicesrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetFunctionalityServicesRequest - -## Example Usage - -```typescript -import { GetFunctionalityServicesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetFunctionalityServicesRequest = { - functionalityId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `functionalityId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getinboundfieldmaprequest.md b/docs/models/operations/getinboundfieldmaprequest.md new file mode 100644 index 00000000..cdb46f90 --- /dev/null +++ b/docs/models/operations/getinboundfieldmaprequest.md @@ -0,0 +1,19 @@ +# GetInboundFieldMapRequest + +## Example Usage + +```typescript +import { GetInboundFieldMapRequest } from "firehydrant/models/operations"; + +let value: GetInboundFieldMapRequest = { + mapId: "", + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `mapId` | *string* | :heavy_check_mark: | N/A | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getincidentaisummaryvotestatusrequest.md b/docs/models/operations/getincidentaisummaryvotestatusrequest.md deleted file mode 100644 index 8a8db0c7..00000000 --- a/docs/models/operations/getincidentaisummaryvotestatusrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetIncidentAiSummaryVoteStatusRequest - -## Example Usage - -```typescript -import { GetIncidentAiSummaryVoteStatusRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetIncidentAiSummaryVoteStatusRequest = { - incidentId: "", - generatedSummaryId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `generatedSummaryId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getincidentchannelrequest.md b/docs/models/operations/getincidentchannelrequest.md index a5197fe5..e112aca9 100644 --- a/docs/models/operations/getincidentchannelrequest.md +++ b/docs/models/operations/getincidentchannelrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIncidentChannelRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIncidentChannelRequest } from "firehydrant/models/operations"; let value: GetIncidentChannelRequest = { incidentId: "", diff --git a/docs/models/operations/getincidenteventrequest.md b/docs/models/operations/getincidenteventrequest.md index a524c90e..1efe005e 100644 --- a/docs/models/operations/getincidenteventrequest.md +++ b/docs/models/operations/getincidenteventrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIncidentEventRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIncidentEventRequest } from "firehydrant/models/operations"; let value: GetIncidentEventRequest = { incidentId: "", diff --git a/docs/models/operations/getincidenteventvotestatusrequest.md b/docs/models/operations/getincidenteventvotestatusrequest.md deleted file mode 100644 index 2bf3e81e..00000000 --- a/docs/models/operations/getincidenteventvotestatusrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetIncidentEventVoteStatusRequest - -## Example Usage - -```typescript -import { GetIncidentEventVoteStatusRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetIncidentEventVoteStatusRequest = { - incidentId: "", - eventId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `eventId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getincidentrelationshipsrequest.md b/docs/models/operations/getincidentrelationshipsrequest.md index dfb224bf..8d3ecafd 100644 --- a/docs/models/operations/getincidentrelationshipsrequest.md +++ b/docs/models/operations/getincidentrelationshipsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIncidentRelationshipsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIncidentRelationshipsRequest } from "firehydrant/models/operations"; let value: GetIncidentRelationshipsRequest = { incidentId: "", diff --git a/docs/models/operations/getincidentrequest.md b/docs/models/operations/getincidentrequest.md index a8be8e25..acd70783 100644 --- a/docs/models/operations/getincidentrequest.md +++ b/docs/models/operations/getincidentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIncidentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIncidentRequest } from "firehydrant/models/operations"; let value: GetIncidentRequest = { incidentId: "", diff --git a/docs/models/operations/getincidentretrospectivefieldrequest.md b/docs/models/operations/getincidentretrospectivefieldrequest.md new file mode 100644 index 00000000..b98cea2f --- /dev/null +++ b/docs/models/operations/getincidentretrospectivefieldrequest.md @@ -0,0 +1,21 @@ +# GetIncidentRetrospectiveFieldRequest + +## Example Usage + +```typescript +import { GetIncidentRetrospectiveFieldRequest } from "firehydrant/models/operations"; + +let value: GetIncidentRetrospectiveFieldRequest = { + retrospectiveId: "", + fieldId: "", + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `retrospectiveId` | *string* | :heavy_check_mark: | N/A | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getincidentrolerequest.md b/docs/models/operations/getincidentrolerequest.md index 37037a52..f389a5ea 100644 --- a/docs/models/operations/getincidentrolerequest.md +++ b/docs/models/operations/getincidentrolerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIncidentRoleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIncidentRoleRequest } from "firehydrant/models/operations"; let value: GetIncidentRoleRequest = { incidentRoleId: "", diff --git a/docs/models/operations/getincidenttaskrequest.md b/docs/models/operations/getincidenttaskrequest.md index dd4341d0..6ebf148d 100644 --- a/docs/models/operations/getincidenttaskrequest.md +++ b/docs/models/operations/getincidenttaskrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIncidentTaskRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIncidentTaskRequest } from "firehydrant/models/operations"; let value: GetIncidentTaskRequest = { taskId: "", diff --git a/docs/models/operations/getincidenttranscriptrequest.md b/docs/models/operations/getincidenttranscriptrequest.md deleted file mode 100644 index 5f04bf01..00000000 --- a/docs/models/operations/getincidenttranscriptrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# GetIncidentTranscriptRequest - -## Example Usage - -```typescript -import { GetIncidentTranscriptRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetIncidentTranscriptRequest = { - incidentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `after` | *string* | :heavy_minus_sign: | The ID of the transcript entry to start after. | -| `before` | *string* | :heavy_minus_sign: | The ID of the transcript entry to start before. | -| `sort` | [operations.QueryParamSort](../../models/operations/queryparamsort.md) | :heavy_minus_sign: | The order to sort the transcript entries. | -| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getincidenttyperequest.md b/docs/models/operations/getincidenttyperequest.md index a98cbab2..e4241cca 100644 --- a/docs/models/operations/getincidenttyperequest.md +++ b/docs/models/operations/getincidenttyperequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIncidentTypeRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIncidentTypeRequest } from "firehydrant/models/operations"; let value: GetIncidentTypeRequest = { id: "", diff --git a/docs/models/operations/getincidentuserrequest.md b/docs/models/operations/getincidentuserrequest.md new file mode 100644 index 00000000..de062bc0 --- /dev/null +++ b/docs/models/operations/getincidentuserrequest.md @@ -0,0 +1,19 @@ +# GetIncidentUserRequest + +## Example Usage + +```typescript +import { GetIncidentUserRequest } from "firehydrant/models/operations"; + +let value: GetIncidentUserRequest = { + incidentId: "", + userId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getincidentuserrolerequest.md b/docs/models/operations/getincidentuserrolerequest.md deleted file mode 100644 index 849fd1db..00000000 --- a/docs/models/operations/getincidentuserrolerequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetIncidentUserRoleRequest - -## Example Usage - -```typescript -import { GetIncidentUserRoleRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetIncidentUserRoleRequest = { - incidentId: "", - userId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `userId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getinfrastructuremetricsrequest.md b/docs/models/operations/getinfrastructuremetricsrequest.md deleted file mode 100644 index 0aa7a191..00000000 --- a/docs/models/operations/getinfrastructuremetricsrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetInfrastructureMetricsRequest - -## Example Usage - -```typescript -import { GetInfrastructureMetricsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetInfrastructureMetricsRequest = { - infraType: "customers", - infraId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `infraType` | [operations.PathParamInfraType](../../models/operations/pathparaminfratype.md) | :heavy_check_mark: | N/A | -| `infraId` | *string* | :heavy_check_mark: | Component UUID | -| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from; defaults to 30 days ago | -| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from, defaults to today | \ No newline at end of file diff --git a/docs/models/operations/getintegrationfieldmapavailablefieldsrequest.md b/docs/models/operations/getintegrationfieldmapavailablefieldsrequest.md deleted file mode 100644 index 67ab4f26..00000000 --- a/docs/models/operations/getintegrationfieldmapavailablefieldsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetIntegrationFieldMapAvailableFieldsRequest - -## Example Usage - -```typescript -import { GetIntegrationFieldMapAvailableFieldsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetIntegrationFieldMapAvailableFieldsRequest = { - fieldMapId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `fieldMapId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getintegrationrequest.md b/docs/models/operations/getintegrationrequest.md index f8b9d9a9..e615b7b0 100644 --- a/docs/models/operations/getintegrationrequest.md +++ b/docs/models/operations/getintegrationrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetIntegrationRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetIntegrationRequest } from "firehydrant/models/operations"; let value: GetIntegrationRequest = { integrationId: "", diff --git a/docs/models/operations/getintegrationstatusrequest.md b/docs/models/operations/getintegrationstatusrequest.md deleted file mode 100644 index 4f5b57d2..00000000 --- a/docs/models/operations/getintegrationstatusrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetIntegrationStatusRequest - -## Example Usage - -```typescript -import { GetIntegrationStatusRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetIntegrationStatusRequest = { - slug: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `slug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getlifecyclemeasurementdefinitionrequest.md b/docs/models/operations/getlifecyclemeasurementdefinitionrequest.md new file mode 100644 index 00000000..64bdac5e --- /dev/null +++ b/docs/models/operations/getlifecyclemeasurementdefinitionrequest.md @@ -0,0 +1,17 @@ +# GetLifecycleMeasurementDefinitionRequest + +## Example Usage + +```typescript +import { GetLifecycleMeasurementDefinitionRequest } from "firehydrant/models/operations"; + +let value: GetLifecycleMeasurementDefinitionRequest = { + measurementDefinitionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `measurementDefinitionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getmeantimereportrequest.md b/docs/models/operations/getmeantimereportrequest.md index 10d1bf57..07272655 100644 --- a/docs/models/operations/getmeantimereportrequest.md +++ b/docs/models/operations/getmeantimereportrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetMeanTimeReportRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetMeanTimeReportRequest } from "firehydrant/models/operations"; let value: GetMeanTimeReportRequest = {}; ``` diff --git a/docs/models/operations/getmeasurementdefinitionrequest.md b/docs/models/operations/getmeasurementdefinitionrequest.md deleted file mode 100644 index 7d1e7cea..00000000 --- a/docs/models/operations/getmeasurementdefinitionrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetMeasurementDefinitionRequest - -## Example Usage - -```typescript -import { GetMeasurementDefinitionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetMeasurementDefinitionRequest = { - measurementDefinitionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `measurementDefinitionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getmemberdefaultaudiencerequest.md b/docs/models/operations/getmemberdefaultaudiencerequest.md new file mode 100644 index 00000000..226b6f56 --- /dev/null +++ b/docs/models/operations/getmemberdefaultaudiencerequest.md @@ -0,0 +1,17 @@ +# GetMemberDefaultAudienceRequest + +## Example Usage + +```typescript +import { GetMemberDefaultAudienceRequest } from "firehydrant/models/operations"; + +let value: GetMemberDefaultAudienceRequest = { + memberId: 206230, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `memberId` | *number* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getnuncconnectionrequest.md b/docs/models/operations/getnuncconnectionrequest.md new file mode 100644 index 00000000..e0974aee --- /dev/null +++ b/docs/models/operations/getnuncconnectionrequest.md @@ -0,0 +1,17 @@ +# GetNuncConnectionRequest + +## Example Usage + +```typescript +import { GetNuncConnectionRequest } from "firehydrant/models/operations"; + +let value: GetNuncConnectionRequest = { + nuncConnectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getoncallshiftrequest.md b/docs/models/operations/getoncallshiftrequest.md new file mode 100644 index 00000000..01ab85da --- /dev/null +++ b/docs/models/operations/getoncallshiftrequest.md @@ -0,0 +1,21 @@ +# GetOnCallShiftRequest + +## Example Usage + +```typescript +import { GetOnCallShiftRequest } from "firehydrant/models/operations"; + +let value: GetOnCallShiftRequest = { + id: "", + teamId: "", + scheduleId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `scheduleId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getoptionsforfieldrequest.md b/docs/models/operations/getoptionsforfieldrequest.md new file mode 100644 index 00000000..69cfb2e8 --- /dev/null +++ b/docs/models/operations/getoptionsforfieldrequest.md @@ -0,0 +1,19 @@ +# GetOptionsForFieldRequest + +## Example Usage + +```typescript +import { GetOptionsForFieldRequest } from "firehydrant/models/operations"; + +let value: GetOptionsForFieldRequest = { + fieldId: "", + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getpostmortemquestionrequest.md b/docs/models/operations/getpostmortemquestionrequest.md new file mode 100644 index 00000000..470c02f4 --- /dev/null +++ b/docs/models/operations/getpostmortemquestionrequest.md @@ -0,0 +1,17 @@ +# GetPostMortemQuestionRequest + +## Example Usage + +```typescript +import { GetPostMortemQuestionRequest } from "firehydrant/models/operations"; + +let value: GetPostMortemQuestionRequest = { + questionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `questionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getpostmortemreportrequest.md b/docs/models/operations/getpostmortemreportrequest.md index 13c04fe8..e6dba93a 100644 --- a/docs/models/operations/getpostmortemreportrequest.md +++ b/docs/models/operations/getpostmortemreportrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetPostMortemReportRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetPostMortemReportRequest } from "firehydrant/models/operations"; let value: GetPostMortemReportRequest = { reportId: "", diff --git a/docs/models/operations/getpriorityrequest.md b/docs/models/operations/getpriorityrequest.md index fab025bb..6de8ecf3 100644 --- a/docs/models/operations/getpriorityrequest.md +++ b/docs/models/operations/getpriorityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetPriorityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetPriorityRequest } from "firehydrant/models/operations"; let value: GetPriorityRequest = { prioritySlug: "", diff --git a/docs/models/operations/getretrospectivequestionrequest.md b/docs/models/operations/getretrospectivequestionrequest.md deleted file mode 100644 index 86dac141..00000000 --- a/docs/models/operations/getretrospectivequestionrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRetrospectiveQuestionRequest - -## Example Usage - -```typescript -import { GetRetrospectiveQuestionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetRetrospectiveQuestionRequest = { - questionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `questionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getretrospectivetemplaterequest.md b/docs/models/operations/getretrospectivetemplaterequest.md new file mode 100644 index 00000000..a00e48bb --- /dev/null +++ b/docs/models/operations/getretrospectivetemplaterequest.md @@ -0,0 +1,17 @@ +# GetRetrospectiveTemplateRequest + +## Example Usage + +```typescript +import { GetRetrospectiveTemplateRequest } from "firehydrant/models/operations"; + +let value: GetRetrospectiveTemplateRequest = { + retrospectiveTemplateId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `retrospectiveTemplateId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getrunbookactionfieldoptionsrequest.md b/docs/models/operations/getrunbookactionfieldoptionsrequest.md new file mode 100644 index 00000000..f92ab855 --- /dev/null +++ b/docs/models/operations/getrunbookactionfieldoptionsrequest.md @@ -0,0 +1,24 @@ +# GetRunbookActionFieldOptionsRequest + +## Example Usage + +```typescript +import { GetRunbookActionFieldOptionsRequest } from "firehydrant/models/operations"; + +let value: GetRunbookActionFieldOptionsRequest = { + integrationSlug: "", + actionSlug: "", + field: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `integrationSlug` | *string* | :heavy_check_mark: | N/A | +| `actionSlug` | *string* | :heavy_check_mark: | N/A | +| `field` | *string* | :heavy_check_mark: | N/A | +| `query` | *string* | :heavy_minus_sign: | Text string of a query for filtering values. | +| `scope` | *string* | :heavy_minus_sign: | Generic params used to add specificity (eg an id of some kind) to the select options request | +| `perPage` | *number* | :heavy_minus_sign: | Maximum number of items to return. | \ No newline at end of file diff --git a/docs/models/operations/getrunbookexecutionrequest.md b/docs/models/operations/getrunbookexecutionrequest.md index 6fc323c6..9e0c8200 100644 --- a/docs/models/operations/getrunbookexecutionrequest.md +++ b/docs/models/operations/getrunbookexecutionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetRunbookExecutionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetRunbookExecutionRequest } from "firehydrant/models/operations"; let value: GetRunbookExecutionRequest = { executionId: "", diff --git a/docs/models/operations/getrunbookexecutionstepscriptrequest.md b/docs/models/operations/getrunbookexecutionstepscriptrequest.md index 38fc1309..f81d99b6 100644 --- a/docs/models/operations/getrunbookexecutionstepscriptrequest.md +++ b/docs/models/operations/getrunbookexecutionstepscriptrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetRunbookExecutionStepScriptRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetRunbookExecutionStepScriptRequest } from "firehydrant/models/operations"; let value: GetRunbookExecutionStepScriptRequest = { executionId: "", diff --git a/docs/models/operations/getrunbookexecutionvotestatusrequest.md b/docs/models/operations/getrunbookexecutionvotestatusrequest.md deleted file mode 100644 index dee5043a..00000000 --- a/docs/models/operations/getrunbookexecutionvotestatusrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetRunbookExecutionVoteStatusRequest - -## Example Usage - -```typescript -import { GetRunbookExecutionVoteStatusRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetRunbookExecutionVoteStatusRequest = { - executionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `executionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getrunbookrequest.md b/docs/models/operations/getrunbookrequest.md index 73523172..71d31a63 100644 --- a/docs/models/operations/getrunbookrequest.md +++ b/docs/models/operations/getrunbookrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetRunbookRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetRunbookRequest } from "firehydrant/models/operations"; let value: GetRunbookRequest = { runbookId: "", diff --git a/docs/models/operations/getrunbookselectoptionsrequest.md b/docs/models/operations/getrunbookselectoptionsrequest.md deleted file mode 100644 index 87ff297f..00000000 --- a/docs/models/operations/getrunbookselectoptionsrequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetRunbookSelectOptionsRequest - -## Example Usage - -```typescript -import { GetRunbookSelectOptionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetRunbookSelectOptionsRequest = { - integrationSlug: "", - actionSlug: "", - field: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `integrationSlug` | *string* | :heavy_check_mark: | N/A | -| `actionSlug` | *string* | :heavy_check_mark: | N/A | -| `field` | *string* | :heavy_check_mark: | N/A | -| `query` | *string* | :heavy_minus_sign: | Text string of a query for filtering values. | -| `scope` | *string* | :heavy_minus_sign: | Generic params used to add specificity (eg an id of some kind) to the select options request | -| `perPage` | *number* | :heavy_minus_sign: | Maximum number of items to return. | \ No newline at end of file diff --git a/docs/models/operations/getrunbookstepvotestatusrequest.md b/docs/models/operations/getrunbookstepvotestatusrequest.md deleted file mode 100644 index f847e72e..00000000 --- a/docs/models/operations/getrunbookstepvotestatusrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetRunbookStepVoteStatusRequest - -## Example Usage - -```typescript -import { GetRunbookStepVoteStatusRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetRunbookStepVoteStatusRequest = { - executionId: "", - stepId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `executionId` | *string* | :heavy_check_mark: | N/A | -| `stepId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsavedsearchpathparamresourcetype.md b/docs/models/operations/getsavedsearchpathparamresourcetype.md deleted file mode 100644 index b5dd821a..00000000 --- a/docs/models/operations/getsavedsearchpathparamresourcetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetSavedSearchPathParamResourceType - -## Example Usage - -```typescript -import { GetSavedSearchPathParamResourceType } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSavedSearchPathParamResourceType = "alerts"; -``` - -## Values - -```typescript -"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" -``` \ No newline at end of file diff --git a/docs/models/operations/getsavedsearchrequest.md b/docs/models/operations/getsavedsearchrequest.md index 3e4599ba..4f055f9a 100644 --- a/docs/models/operations/getsavedsearchrequest.md +++ b/docs/models/operations/getsavedsearchrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { GetSavedSearchRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetSavedSearchRequest } from "firehydrant/models/operations"; let value: GetSavedSearchRequest = { - resourceType: "incidents", + resourceType: "ticket_follow_ups", savedSearchId: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `resourceType` | [operations.GetSavedSearchPathParamResourceType](../../models/operations/getsavedsearchpathparamresourcetype.md) | :heavy_check_mark: | N/A | -| `savedSearchId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `resourceType` | [operations.GetSavedSearchResourceType](../../models/operations/getsavedsearchresourcetype.md) | :heavy_check_mark: | N/A | +| `savedSearchId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsavedsearchresourcetype.md b/docs/models/operations/getsavedsearchresourcetype.md new file mode 100644 index 00000000..90b3f29d --- /dev/null +++ b/docs/models/operations/getsavedsearchresourcetype.md @@ -0,0 +1,15 @@ +# GetSavedSearchResourceType + +## Example Usage + +```typescript +import { GetSavedSearchResourceType } from "firehydrant/models/operations"; + +let value: GetSavedSearchResourceType = "alerts"; +``` + +## Values + +```typescript +"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" +``` \ No newline at end of file diff --git a/docs/models/operations/getscheduledmaintenancerequest.md b/docs/models/operations/getscheduledmaintenancerequest.md index ef405fff..7f2b02a6 100644 --- a/docs/models/operations/getscheduledmaintenancerequest.md +++ b/docs/models/operations/getscheduledmaintenancerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetScheduledMaintenanceRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetScheduledMaintenanceRequest } from "firehydrant/models/operations"; let value: GetScheduledMaintenanceRequest = { scheduledMaintenanceId: "", diff --git a/docs/models/operations/getscimgrouprequest.md b/docs/models/operations/getscimgrouprequest.md index 76c93e0f..6f054c7d 100644 --- a/docs/models/operations/getscimgrouprequest.md +++ b/docs/models/operations/getscimgrouprequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetScimGroupRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetScimGroupRequest } from "firehydrant/models/operations"; let value: GetScimGroupRequest = { id: "", diff --git a/docs/models/operations/getscimgroupsrequest.md b/docs/models/operations/getscimgroupsrequest.md deleted file mode 100644 index 7386259e..00000000 --- a/docs/models/operations/getscimgroupsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetScimGroupsRequest - -## Example Usage - -```typescript -import { GetScimGroupsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetScimGroupsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `startIndex` | *number* | :heavy_minus_sign: | N/A | -| `count` | *number* | :heavy_minus_sign: | N/A | -| `filter` | *string* | :heavy_minus_sign: | This is a string used to query groups by displayName.
Proper example syntax for this would be `?filter=displayName eq "My Team Name"`.
Currently we only support the `eq` operator | \ No newline at end of file diff --git a/docs/models/operations/getscimuserrequest.md b/docs/models/operations/getscimuserrequest.md index 9454eab1..49c4c729 100644 --- a/docs/models/operations/getscimuserrequest.md +++ b/docs/models/operations/getscimuserrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetScimUserRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetScimUserRequest } from "firehydrant/models/operations"; let value: GetScimUserRequest = { id: "", diff --git a/docs/models/operations/getscimusersrequest.md b/docs/models/operations/getscimusersrequest.md deleted file mode 100644 index f30f18b7..00000000 --- a/docs/models/operations/getscimusersrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetScimUsersRequest - -## Example Usage - -```typescript -import { GetScimUsersRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetScimUsersRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `filter` | *string* | :heavy_minus_sign: | This is a string used to query users by either userName or email.
Proper example syntax for this would be `?filter=userName eq john` or `?filter=userName eq "john@firehydrant.com"`.
Currently we only support the `eq` operator | -| `startIndex` | *number* | :heavy_minus_sign: | This is an integer which represents a pagination offset | -| `count` | *number* | :heavy_minus_sign: | This is an integer which represents the number of items per page in the response | \ No newline at end of file diff --git a/docs/models/operations/getservicedependenciesrequest.md b/docs/models/operations/getservicedependenciesrequest.md index 5962ee94..ab071524 100644 --- a/docs/models/operations/getservicedependenciesrequest.md +++ b/docs/models/operations/getservicedependenciesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetServiceDependenciesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetServiceDependenciesRequest } from "firehydrant/models/operations"; let value: GetServiceDependenciesRequest = { serviceId: "", diff --git a/docs/models/operations/getservicedependencyrequest.md b/docs/models/operations/getservicedependencyrequest.md index 526b3cb9..2908421f 100644 --- a/docs/models/operations/getservicedependencyrequest.md +++ b/docs/models/operations/getservicedependencyrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetServiceDependencyRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetServiceDependencyRequest } from "firehydrant/models/operations"; let value: GetServiceDependencyRequest = { serviceDependencyId: "", diff --git a/docs/models/operations/getservicerequest.md b/docs/models/operations/getservicerequest.md index be8513ed..a1b37ad4 100644 --- a/docs/models/operations/getservicerequest.md +++ b/docs/models/operations/getservicerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetServiceRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetServiceRequest } from "firehydrant/models/operations"; let value: GetServiceRequest = { serviceId: "", diff --git a/docs/models/operations/getseveritymatrixconditionrequest.md b/docs/models/operations/getseveritymatrixconditionrequest.md index 1c92a4df..0d3d0eb9 100644 --- a/docs/models/operations/getseveritymatrixconditionrequest.md +++ b/docs/models/operations/getseveritymatrixconditionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetSeverityMatrixConditionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetSeverityMatrixConditionRequest } from "firehydrant/models/operations"; let value: GetSeverityMatrixConditionRequest = { conditionId: "", diff --git a/docs/models/operations/getseverityrequest.md b/docs/models/operations/getseverityrequest.md index bfe69828..cd3d4996 100644 --- a/docs/models/operations/getseverityrequest.md +++ b/docs/models/operations/getseverityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetSeverityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetSeverityRequest } from "firehydrant/models/operations"; let value: GetSeverityRequest = { severitySlug: "", diff --git a/docs/models/operations/getsignalemailtargetrequest.md b/docs/models/operations/getsignalemailtargetrequest.md deleted file mode 100644 index 4a250a6c..00000000 --- a/docs/models/operations/getsignalemailtargetrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSignalEmailTargetRequest - -## Example Usage - -```typescript -import { GetSignalEmailTargetRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalEmailTargetRequest = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsignalgroupedmetricsqueryparamsortdirection.md b/docs/models/operations/getsignalgroupedmetricsqueryparamsortdirection.md deleted file mode 100644 index 776aa2c3..00000000 --- a/docs/models/operations/getsignalgroupedmetricsqueryparamsortdirection.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSignalGroupedMetricsQueryParamSortDirection - -String that determines how records are sorted - -## Example Usage - -```typescript -import { GetSignalGroupedMetricsQueryParamSortDirection } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalGroupedMetricsQueryParamSortDirection = "asc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/getsignalgroupedmetricsrequest.md b/docs/models/operations/getsignalgroupedmetricsrequest.md deleted file mode 100644 index 14fb3161..00000000 --- a/docs/models/operations/getsignalgroupedmetricsrequest.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetSignalGroupedMetricsRequest - -## Example Usage - -```typescript -import { GetSignalGroupedMetricsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalGroupedMetricsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `signalRules` | *string* | :heavy_minus_sign: | A comma separated list of signal rule IDs | -| `teams` | *string* | :heavy_minus_sign: | A comma separated list of team IDs | -| `environments` | *string* | :heavy_minus_sign: | A comma separated list of environment IDs | -| `services` | *string* | :heavy_minus_sign: | A comma separated list of service IDs | -| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | -| `users` | *string* | :heavy_minus_sign: | A comma separated list of user IDs | -| `groupBy` | [operations.GroupBy](../../models/operations/groupby.md) | :heavy_minus_sign: | String that determines how records are grouped | -| `sortBy` | [operations.SortBy](../../models/operations/sortby.md) | :heavy_minus_sign: | String that determines how records are sorted | -| `sortDirection` | [operations.GetSignalGroupedMetricsQueryParamSortDirection](../../models/operations/getsignalgroupedmetricsqueryparamsortdirection.md) | :heavy_minus_sign: | String that determines how records are sorted | -| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start date to return metrics from | -| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end date to return metrics from | \ No newline at end of file diff --git a/docs/models/operations/getsignalingesturlrequest.md b/docs/models/operations/getsignalingesturlrequest.md deleted file mode 100644 index 5c5c4adc..00000000 --- a/docs/models/operations/getsignalingesturlrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSignalIngestUrlRequest - -## Example Usage - -```typescript -import { GetSignalIngestUrlRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalIngestUrlRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_minus_sign: | Team ID to send signals to directly | -| `escalationPolicyId` | *string* | :heavy_minus_sign: | Escalation policy ID to send signals to directly. `team_id` is required if this is provided. | -| `onCallScheduleId` | *string* | :heavy_minus_sign: | On-call schedule ID to send signals to directly. `team_id` is required if this is provided. | -| `userId` | *string* | :heavy_minus_sign: | User ID to send signals to directly | \ No newline at end of file diff --git a/docs/models/operations/getsignalsanalyticstimeseriesqueryparamgroupby.md b/docs/models/operations/getsignalsanalyticstimeseriesqueryparamgroupby.md deleted file mode 100644 index 8c5894a9..00000000 --- a/docs/models/operations/getsignalsanalyticstimeseriesqueryparamgroupby.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSignalsAnalyticsTimeseriesQueryParamGroupBy - -String that determines how records are grouped - -## Example Usage - -```typescript -import { GetSignalsAnalyticsTimeseriesQueryParamGroupBy } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalsAnalyticsTimeseriesQueryParamGroupBy = "tags"; -``` - -## Values - -```typescript -"signal_rules" | "teams" | "services" | "environments" | "tags" -``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsanalyticstimeseriesqueryparamsortby.md b/docs/models/operations/getsignalsanalyticstimeseriesqueryparamsortby.md deleted file mode 100644 index 3d4b0f13..00000000 --- a/docs/models/operations/getsignalsanalyticstimeseriesqueryparamsortby.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetSignalsAnalyticsTimeseriesQueryParamSortBy - -String that determines how records are sorted - -## Example Usage - -```typescript -import { GetSignalsAnalyticsTimeseriesQueryParamSortBy } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalsAnalyticsTimeseriesQueryParamSortBy = - "total_opened_alerts"; -``` - -## Values - -```typescript -"total_opened_alerts" | "total_acked_alerts" | "total_incidents" | "acked_percentage" | "incidents_percentage" -``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsanalyticstimeseriesqueryparamsortdirection.md b/docs/models/operations/getsignalsanalyticstimeseriesqueryparamsortdirection.md deleted file mode 100644 index 825bdadb..00000000 --- a/docs/models/operations/getsignalsanalyticstimeseriesqueryparamsortdirection.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSignalsAnalyticsTimeseriesQueryParamSortDirection - -String that determines how records are sorted - -## Example Usage - -```typescript -import { GetSignalsAnalyticsTimeseriesQueryParamSortDirection } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalsAnalyticsTimeseriesQueryParamSortDirection = "desc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsanalyticstimeseriesrequest.md b/docs/models/operations/getsignalsanalyticstimeseriesrequest.md deleted file mode 100644 index 7dae1d7e..00000000 --- a/docs/models/operations/getsignalsanalyticstimeseriesrequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# GetSignalsAnalyticsTimeseriesRequest - -## Example Usage - -```typescript -import { GetSignalsAnalyticsTimeseriesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalsAnalyticsTimeseriesRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `bucket` | [operations.Bucket](../../models/operations/bucket.md) | :heavy_minus_sign: | String that determines how records are grouped | -| `signalRules` | *string* | :heavy_minus_sign: | A comma separated list of signal rule IDs | -| `teams` | *string* | :heavy_minus_sign: | A comma separated list of team IDs | -| `environments` | *string* | :heavy_minus_sign: | A comma separated list of environment IDs | -| `services` | *string* | :heavy_minus_sign: | A comma separated list of service IDs | -| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | -| `users` | *string* | :heavy_minus_sign: | A comma separated list of user IDs | -| `groupBy` | [operations.GetSignalsAnalyticsTimeseriesQueryParamGroupBy](../../models/operations/getsignalsanalyticstimeseriesqueryparamgroupby.md) | :heavy_minus_sign: | String that determines how records are grouped | -| `sortBy` | [operations.GetSignalsAnalyticsTimeseriesQueryParamSortBy](../../models/operations/getsignalsanalyticstimeseriesqueryparamsortby.md) | :heavy_minus_sign: | String that determines how records are sorted | -| `sortDirection` | [operations.GetSignalsAnalyticsTimeseriesQueryParamSortDirection](../../models/operations/getsignalsanalyticstimeseriesqueryparamsortdirection.md) | :heavy_minus_sign: | String that determines how records are sorted | -| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start date to return metrics from | -| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end date to return metrics from | \ No newline at end of file diff --git a/docs/models/operations/getsignalsemailtargetrequest.md b/docs/models/operations/getsignalsemailtargetrequest.md new file mode 100644 index 00000000..629e428c --- /dev/null +++ b/docs/models/operations/getsignalsemailtargetrequest.md @@ -0,0 +1,17 @@ +# GetSignalsEmailTargetRequest + +## Example Usage + +```typescript +import { GetSignalsEmailTargetRequest } from "firehydrant/models/operations"; + +let value: GetSignalsEmailTargetRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getsignalsgroupedmetricsgroupby.md b/docs/models/operations/getsignalsgroupedmetricsgroupby.md new file mode 100644 index 00000000..5d4d3808 --- /dev/null +++ b/docs/models/operations/getsignalsgroupedmetricsgroupby.md @@ -0,0 +1,17 @@ +# GetSignalsGroupedMetricsGroupBy + +String that determines how records are grouped + +## Example Usage + +```typescript +import { GetSignalsGroupedMetricsGroupBy } from "firehydrant/models/operations"; + +let value: GetSignalsGroupedMetricsGroupBy = "tags"; +``` + +## Values + +```typescript +"signal_rules" | "teams" | "services" | "environments" | "tags" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsgroupedmetricsrequest.md b/docs/models/operations/getsignalsgroupedmetricsrequest.md new file mode 100644 index 00000000..e74c5a40 --- /dev/null +++ b/docs/models/operations/getsignalsgroupedmetricsrequest.md @@ -0,0 +1,25 @@ +# GetSignalsGroupedMetricsRequest + +## Example Usage + +```typescript +import { GetSignalsGroupedMetricsRequest } from "firehydrant/models/operations"; + +let value: GetSignalsGroupedMetricsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `signalRules` | *string* | :heavy_minus_sign: | A comma separated list of signal rule IDs | +| `teams` | *string* | :heavy_minus_sign: | A comma separated list of team IDs | +| `environments` | *string* | :heavy_minus_sign: | A comma separated list of environment IDs | +| `services` | *string* | :heavy_minus_sign: | A comma separated list of service IDs | +| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | +| `users` | *string* | :heavy_minus_sign: | A comma separated list of user IDs | +| `groupBy` | [operations.GetSignalsGroupedMetricsGroupBy](../../models/operations/getsignalsgroupedmetricsgroupby.md) | :heavy_minus_sign: | String that determines how records are grouped | +| `sortBy` | [operations.GetSignalsGroupedMetricsSortBy](../../models/operations/getsignalsgroupedmetricssortby.md) | :heavy_minus_sign: | String that determines how records are sorted | +| `sortDirection` | [operations.GetSignalsGroupedMetricsSortDirection](../../models/operations/getsignalsgroupedmetricssortdirection.md) | :heavy_minus_sign: | String that determines how records are sorted | +| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start date to return metrics from | +| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end date to return metrics from | \ No newline at end of file diff --git a/docs/models/operations/getsignalsgroupedmetricssortby.md b/docs/models/operations/getsignalsgroupedmetricssortby.md new file mode 100644 index 00000000..c7dc54c7 --- /dev/null +++ b/docs/models/operations/getsignalsgroupedmetricssortby.md @@ -0,0 +1,17 @@ +# GetSignalsGroupedMetricsSortBy + +String that determines how records are sorted + +## Example Usage + +```typescript +import { GetSignalsGroupedMetricsSortBy } from "firehydrant/models/operations"; + +let value: GetSignalsGroupedMetricsSortBy = "total_acked_alerts"; +``` + +## Values + +```typescript +"total_opened_alerts" | "total_acked_alerts" | "total_incidents" | "acked_percentage" | "incidents_percentage" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsgroupedmetricssortdirection.md b/docs/models/operations/getsignalsgroupedmetricssortdirection.md new file mode 100644 index 00000000..d5cfdca1 --- /dev/null +++ b/docs/models/operations/getsignalsgroupedmetricssortdirection.md @@ -0,0 +1,17 @@ +# GetSignalsGroupedMetricsSortDirection + +String that determines how records are sorted + +## Example Usage + +```typescript +import { GetSignalsGroupedMetricsSortDirection } from "firehydrant/models/operations"; + +let value: GetSignalsGroupedMetricsSortDirection = "asc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsingesturlrequest.md b/docs/models/operations/getsignalsingesturlrequest.md new file mode 100644 index 00000000..ba2c82a1 --- /dev/null +++ b/docs/models/operations/getsignalsingesturlrequest.md @@ -0,0 +1,18 @@ +# GetSignalsIngestUrlRequest + +## Example Usage + +```typescript +import { GetSignalsIngestUrlRequest } from "firehydrant/models/operations"; + +let value: GetSignalsIngestUrlRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_minus_sign: | Team ID to send signals to directly | +| `escalationPolicyId` | *string* | :heavy_minus_sign: | Escalation policy ID to send signals to directly. `team_id` is required if this is provided. | +| `onCallScheduleId` | *string* | :heavy_minus_sign: | On-call schedule ID to send signals to directly. `team_id` is required if this is provided. | +| `userId` | *string* | :heavy_minus_sign: | User ID to send signals to directly | \ No newline at end of file diff --git a/docs/models/operations/getsignalsmttxanalyticsgroupby.md b/docs/models/operations/getsignalsmttxanalyticsgroupby.md new file mode 100644 index 00000000..ac37b476 --- /dev/null +++ b/docs/models/operations/getsignalsmttxanalyticsgroupby.md @@ -0,0 +1,17 @@ +# GetSignalsMttxAnalyticsGroupBy + +String that determines how records are grouped + +## Example Usage + +```typescript +import { GetSignalsMttxAnalyticsGroupBy } from "firehydrant/models/operations"; + +let value: GetSignalsMttxAnalyticsGroupBy = "services"; +``` + +## Values + +```typescript +"signal_rules" | "teams" | "services" | "environments" | "tags" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsmttxanalyticsqueryparamsortdirection.md b/docs/models/operations/getsignalsmttxanalyticsqueryparamsortdirection.md deleted file mode 100644 index fb567dc5..00000000 --- a/docs/models/operations/getsignalsmttxanalyticsqueryparamsortdirection.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSignalsMttxAnalyticsQueryParamSortDirection - -String that determines how records are sorted - -## Example Usage - -```typescript -import { GetSignalsMttxAnalyticsQueryParamSortDirection } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSignalsMttxAnalyticsQueryParamSortDirection = "desc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsmttxanalyticsrequest.md b/docs/models/operations/getsignalsmttxanalyticsrequest.md index f8896d90..44b85762 100644 --- a/docs/models/operations/getsignalsmttxanalyticsrequest.md +++ b/docs/models/operations/getsignalsmttxanalyticsrequest.md @@ -3,23 +3,23 @@ ## Example Usage ```typescript -import { GetSignalsMttxAnalyticsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetSignalsMttxAnalyticsRequest } from "firehydrant/models/operations"; let value: GetSignalsMttxAnalyticsRequest = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `signalRules` | *string* | :heavy_minus_sign: | A comma separated list of signal rule IDs | -| `teams` | *string* | :heavy_minus_sign: | A comma separated list of team IDs | -| `environments` | *string* | :heavy_minus_sign: | A comma separated list of environment IDs | -| `services` | *string* | :heavy_minus_sign: | A comma separated list of service IDs | -| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | -| `users` | *string* | :heavy_minus_sign: | A comma separated list of user IDs | -| `groupBy` | [operations.QueryParamGroupBy](../../models/operations/queryparamgroupby.md) | :heavy_minus_sign: | String that determines how records are grouped | -| `sortBy` | [operations.QueryParamSortBy](../../models/operations/queryparamsortby.md) | :heavy_minus_sign: | String that determines how records are sorted | -| `sortDirection` | [operations.GetSignalsMttxAnalyticsQueryParamSortDirection](../../models/operations/getsignalsmttxanalyticsqueryparamsortdirection.md) | :heavy_minus_sign: | String that determines how records are sorted | -| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start date to return metrics from | -| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end date to return metrics from | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `signalRules` | *string* | :heavy_minus_sign: | A comma separated list of signal rule IDs | +| `teams` | *string* | :heavy_minus_sign: | A comma separated list of team IDs | +| `environments` | *string* | :heavy_minus_sign: | A comma separated list of environment IDs | +| `services` | *string* | :heavy_minus_sign: | A comma separated list of service IDs | +| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | +| `users` | *string* | :heavy_minus_sign: | A comma separated list of user IDs | +| `groupBy` | [operations.GetSignalsMttxAnalyticsGroupBy](../../models/operations/getsignalsmttxanalyticsgroupby.md) | :heavy_minus_sign: | String that determines how records are grouped | +| `sortBy` | [operations.GetSignalsMttxAnalyticsSortBy](../../models/operations/getsignalsmttxanalyticssortby.md) | :heavy_minus_sign: | String that determines how records are sorted | +| `sortDirection` | [operations.GetSignalsMttxAnalyticsSortDirection](../../models/operations/getsignalsmttxanalyticssortdirection.md) | :heavy_minus_sign: | String that determines how records are sorted | +| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start date to return metrics from | +| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end date to return metrics from | \ No newline at end of file diff --git a/docs/models/operations/getsignalsmttxanalyticssortby.md b/docs/models/operations/getsignalsmttxanalyticssortby.md new file mode 100644 index 00000000..d44bf5fa --- /dev/null +++ b/docs/models/operations/getsignalsmttxanalyticssortby.md @@ -0,0 +1,17 @@ +# GetSignalsMttxAnalyticsSortBy + +String that determines how records are sorted + +## Example Usage + +```typescript +import { GetSignalsMttxAnalyticsSortBy } from "firehydrant/models/operations"; + +let value: GetSignalsMttxAnalyticsSortBy = "incidents_percentage"; +``` + +## Values + +```typescript +"total_opened_alerts" | "total_acked_alerts" | "total_incidents" | "acked_percentage" | "incidents_percentage" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalsmttxanalyticssortdirection.md b/docs/models/operations/getsignalsmttxanalyticssortdirection.md new file mode 100644 index 00000000..48d863eb --- /dev/null +++ b/docs/models/operations/getsignalsmttxanalyticssortdirection.md @@ -0,0 +1,17 @@ +# GetSignalsMttxAnalyticsSortDirection + +String that determines how records are sorted + +## Example Usage + +```typescript +import { GetSignalsMttxAnalyticsSortDirection } from "firehydrant/models/operations"; + +let value: GetSignalsMttxAnalyticsSortDirection = "asc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalstimeseriesanalyticsgroupby.md b/docs/models/operations/getsignalstimeseriesanalyticsgroupby.md new file mode 100644 index 00000000..f9dc2859 --- /dev/null +++ b/docs/models/operations/getsignalstimeseriesanalyticsgroupby.md @@ -0,0 +1,17 @@ +# GetSignalsTimeseriesAnalyticsGroupBy + +String that determines how records are grouped + +## Example Usage + +```typescript +import { GetSignalsTimeseriesAnalyticsGroupBy } from "firehydrant/models/operations"; + +let value: GetSignalsTimeseriesAnalyticsGroupBy = "signal_rules"; +``` + +## Values + +```typescript +"signal_rules" | "teams" | "services" | "environments" | "tags" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalstimeseriesanalyticsrequest.md b/docs/models/operations/getsignalstimeseriesanalyticsrequest.md new file mode 100644 index 00000000..ae51955d --- /dev/null +++ b/docs/models/operations/getsignalstimeseriesanalyticsrequest.md @@ -0,0 +1,26 @@ +# GetSignalsTimeseriesAnalyticsRequest + +## Example Usage + +```typescript +import { GetSignalsTimeseriesAnalyticsRequest } from "firehydrant/models/operations"; + +let value: GetSignalsTimeseriesAnalyticsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `bucket` | [operations.Bucket](../../models/operations/bucket.md) | :heavy_minus_sign: | String that determines how records are grouped | +| `signalRules` | *string* | :heavy_minus_sign: | A comma separated list of signal rule IDs | +| `teams` | *string* | :heavy_minus_sign: | A comma separated list of team IDs | +| `environments` | *string* | :heavy_minus_sign: | A comma separated list of environment IDs | +| `services` | *string* | :heavy_minus_sign: | A comma separated list of service IDs | +| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | +| `users` | *string* | :heavy_minus_sign: | A comma separated list of user IDs | +| `groupBy` | [operations.GetSignalsTimeseriesAnalyticsGroupBy](../../models/operations/getsignalstimeseriesanalyticsgroupby.md) | :heavy_minus_sign: | String that determines how records are grouped | +| `sortBy` | [operations.GetSignalsTimeseriesAnalyticsSortBy](../../models/operations/getsignalstimeseriesanalyticssortby.md) | :heavy_minus_sign: | String that determines how records are sorted | +| `sortDirection` | [operations.GetSignalsTimeseriesAnalyticsSortDirection](../../models/operations/getsignalstimeseriesanalyticssortdirection.md) | :heavy_minus_sign: | String that determines how records are sorted | +| `startDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The start date to return metrics from | +| `endDate` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | The end date to return metrics from | \ No newline at end of file diff --git a/docs/models/operations/getsignalstimeseriesanalyticssortby.md b/docs/models/operations/getsignalstimeseriesanalyticssortby.md new file mode 100644 index 00000000..6a5c15bb --- /dev/null +++ b/docs/models/operations/getsignalstimeseriesanalyticssortby.md @@ -0,0 +1,17 @@ +# GetSignalsTimeseriesAnalyticsSortBy + +String that determines how records are sorted + +## Example Usage + +```typescript +import { GetSignalsTimeseriesAnalyticsSortBy } from "firehydrant/models/operations"; + +let value: GetSignalsTimeseriesAnalyticsSortBy = "acked_percentage"; +``` + +## Values + +```typescript +"total_opened_alerts" | "total_acked_alerts" | "total_incidents" | "acked_percentage" | "incidents_percentage" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalstimeseriesanalyticssortdirection.md b/docs/models/operations/getsignalstimeseriesanalyticssortdirection.md new file mode 100644 index 00000000..307392ac --- /dev/null +++ b/docs/models/operations/getsignalstimeseriesanalyticssortdirection.md @@ -0,0 +1,17 @@ +# GetSignalsTimeseriesAnalyticsSortDirection + +String that determines how records are sorted + +## Example Usage + +```typescript +import { GetSignalsTimeseriesAnalyticsSortDirection } from "firehydrant/models/operations"; + +let value: GetSignalsTimeseriesAnalyticsSortDirection = "asc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/getsignalswebhooktargetrequest.md b/docs/models/operations/getsignalswebhooktargetrequest.md index df3d50cb..7c0c3676 100644 --- a/docs/models/operations/getsignalswebhooktargetrequest.md +++ b/docs/models/operations/getsignalswebhooktargetrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetSignalsWebhookTargetRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetSignalsWebhookTargetRequest } from "firehydrant/models/operations"; let value: GetSignalsWebhookTargetRequest = { id: "", diff --git a/docs/models/operations/getsimilarincidentsrequest.md b/docs/models/operations/getsimilarincidentsrequest.md deleted file mode 100644 index 295229ce..00000000 --- a/docs/models/operations/getsimilarincidentsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetSimilarIncidentsRequest - -## Example Usage - -```typescript -import { GetSimilarIncidentsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSimilarIncidentsRequest = { - incidentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `threshold` | *number* | :heavy_minus_sign: | N/A | -| `limit` | *number* | :heavy_minus_sign: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getslackemojiactionrequest.md b/docs/models/operations/getslackemojiactionrequest.md index de36c8f7..8ef65ac4 100644 --- a/docs/models/operations/getslackemojiactionrequest.md +++ b/docs/models/operations/getslackemojiactionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetSlackEmojiActionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetSlackEmojiActionRequest } from "firehydrant/models/operations"; let value: GetSlackEmojiActionRequest = { connectionId: "", diff --git a/docs/models/operations/getslackworkspacesrequest.md b/docs/models/operations/getslackworkspacesrequest.md deleted file mode 100644 index 6202f8da..00000000 --- a/docs/models/operations/getslackworkspacesrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetSlackWorkspacesRequest - -## Example Usage - -```typescript -import { GetSlackWorkspacesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetSlackWorkspacesRequest = { - connectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `connectionId` | *string* | :heavy_check_mark: | Connection UUID | \ No newline at end of file diff --git a/docs/models/operations/getstatuspageconnectionrequest.md b/docs/models/operations/getstatuspageconnectionrequest.md index 6972d866..ffe2c6ad 100644 --- a/docs/models/operations/getstatuspageconnectionrequest.md +++ b/docs/models/operations/getstatuspageconnectionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetStatuspageConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetStatuspageConnectionRequest } from "firehydrant/models/operations"; let value: GetStatuspageConnectionRequest = { connectionId: "", diff --git a/docs/models/operations/getstatuspagerequest.md b/docs/models/operations/getstatuspagerequest.md deleted file mode 100644 index 34d57eeb..00000000 --- a/docs/models/operations/getstatuspagerequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetStatusPageRequest - -## Example Usage - -```typescript -import { GetStatusPageRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetStatusPageRequest = { - nuncConnectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getstatusupdatetemplaterequest.md b/docs/models/operations/getstatusupdatetemplaterequest.md index c55115c8..1b87b153 100644 --- a/docs/models/operations/getstatusupdatetemplaterequest.md +++ b/docs/models/operations/getstatusupdatetemplaterequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetStatusUpdateTemplateRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetStatusUpdateTemplateRequest } from "firehydrant/models/operations"; let value: GetStatusUpdateTemplateRequest = { statusUpdateTemplateId: "", diff --git a/docs/models/operations/gettasklistrequest.md b/docs/models/operations/gettasklistrequest.md index 8a0da008..b512bbcd 100644 --- a/docs/models/operations/gettasklistrequest.md +++ b/docs/models/operations/gettasklistrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTaskListRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTaskListRequest } from "firehydrant/models/operations"; let value: GetTaskListRequest = { taskListId: "", diff --git a/docs/models/operations/getteamescalationpolicyrequest.md b/docs/models/operations/getteamescalationpolicyrequest.md index 19470f5e..28812271 100644 --- a/docs/models/operations/getteamescalationpolicyrequest.md +++ b/docs/models/operations/getteamescalationpolicyrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTeamEscalationPolicyRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTeamEscalationPolicyRequest } from "firehydrant/models/operations"; let value: GetTeamEscalationPolicyRequest = { teamId: "", diff --git a/docs/models/operations/getteamoncallschedulerequest.md b/docs/models/operations/getteamoncallschedulerequest.md index 1c4e294a..d42a4b31 100644 --- a/docs/models/operations/getteamoncallschedulerequest.md +++ b/docs/models/operations/getteamoncallschedulerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTeamOnCallScheduleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTeamOnCallScheduleRequest } from "firehydrant/models/operations"; let value: GetTeamOnCallScheduleRequest = { teamId: "", diff --git a/docs/models/operations/getteamrequest.md b/docs/models/operations/getteamrequest.md index 92adb7f1..20c9150e 100644 --- a/docs/models/operations/getteamrequest.md +++ b/docs/models/operations/getteamrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTeamRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTeamRequest } from "firehydrant/models/operations"; let value: GetTeamRequest = { teamId: "", diff --git a/docs/models/operations/getteamscheduleshiftrequest.md b/docs/models/operations/getteamscheduleshiftrequest.md deleted file mode 100644 index 972691f2..00000000 --- a/docs/models/operations/getteamscheduleshiftrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# GetTeamScheduleShiftRequest - -## Example Usage - -```typescript -import { GetTeamScheduleShiftRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetTeamScheduleShiftRequest = { - id: "", - teamId: "", - scheduleId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `scheduleId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getteamsignalrulerequest.md b/docs/models/operations/getteamsignalrulerequest.md index 9c528c5d..fd9a25ff 100644 --- a/docs/models/operations/getteamsignalrulerequest.md +++ b/docs/models/operations/getteamsignalrulerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTeamSignalRuleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTeamSignalRuleRequest } from "firehydrant/models/operations"; let value: GetTeamSignalRuleRequest = { teamId: "", diff --git a/docs/models/operations/getticketingfieldmaprequest.md b/docs/models/operations/getticketingfieldmaprequest.md new file mode 100644 index 00000000..f69f6500 --- /dev/null +++ b/docs/models/operations/getticketingfieldmaprequest.md @@ -0,0 +1,19 @@ +# GetTicketingFieldMapRequest + +## Example Usage + +```typescript +import { GetTicketingFieldMapRequest } from "firehydrant/models/operations"; + +let value: GetTicketingFieldMapRequest = { + mapId: "", + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `mapId` | *string* | :heavy_check_mark: | N/A | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getticketingpriorityrequest.md b/docs/models/operations/getticketingpriorityrequest.md index 5d1d984e..5ae26d8a 100644 --- a/docs/models/operations/getticketingpriorityrequest.md +++ b/docs/models/operations/getticketingpriorityrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTicketingPriorityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTicketingPriorityRequest } from "firehydrant/models/operations"; let value: GetTicketingPriorityRequest = { id: "", diff --git a/docs/models/operations/getticketingprojectavailablefieldsrequest.md b/docs/models/operations/getticketingprojectavailablefieldsrequest.md deleted file mode 100644 index a4e112f5..00000000 --- a/docs/models/operations/getticketingprojectavailablefieldsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTicketingProjectAvailableFieldsRequest - -## Example Usage - -```typescript -import { GetTicketingProjectAvailableFieldsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetTicketingProjectAvailableFieldsRequest = { - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getticketingprojectconfigrequest.md b/docs/models/operations/getticketingprojectconfigrequest.md index b71bb54a..547d32c8 100644 --- a/docs/models/operations/getticketingprojectconfigrequest.md +++ b/docs/models/operations/getticketingprojectconfigrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTicketingProjectConfigRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTicketingProjectConfigRequest } from "firehydrant/models/operations"; let value: GetTicketingProjectConfigRequest = { ticketingProjectId: "", diff --git a/docs/models/operations/getticketingprojectconfigurationoptionsrequest.md b/docs/models/operations/getticketingprojectconfigurationoptionsrequest.md deleted file mode 100644 index 4cd15f6f..00000000 --- a/docs/models/operations/getticketingprojectconfigurationoptionsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetTicketingProjectConfigurationOptionsRequest - -## Example Usage - -```typescript -import { GetTicketingProjectConfigurationOptionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetTicketingProjectConfigurationOptionsRequest = { - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getticketingprojectfieldmaprequest.md b/docs/models/operations/getticketingprojectfieldmaprequest.md deleted file mode 100644 index d90042e2..00000000 --- a/docs/models/operations/getticketingprojectfieldmaprequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetTicketingProjectFieldMapRequest - -## Example Usage - -```typescript -import { GetTicketingProjectFieldMapRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetTicketingProjectFieldMapRequest = { - mapId: "", - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `mapId` | *string* | :heavy_check_mark: | N/A | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getticketingprojectfieldoptionsrequest.md b/docs/models/operations/getticketingprojectfieldoptionsrequest.md deleted file mode 100644 index da204877..00000000 --- a/docs/models/operations/getticketingprojectfieldoptionsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetTicketingProjectFieldOptionsRequest - -## Example Usage - -```typescript -import { GetTicketingProjectFieldOptionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: GetTicketingProjectFieldOptionsRequest = { - fieldId: "", - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `fieldId` | *string* | :heavy_check_mark: | N/A | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getticketingprojectrequest.md b/docs/models/operations/getticketingprojectrequest.md index 9d2e8fcd..c291f39e 100644 --- a/docs/models/operations/getticketingprojectrequest.md +++ b/docs/models/operations/getticketingprojectrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTicketingProjectRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTicketingProjectRequest } from "firehydrant/models/operations"; let value: GetTicketingProjectRequest = { ticketingProjectId: "", diff --git a/docs/models/operations/getticketrequest.md b/docs/models/operations/getticketrequest.md index 5200e923..71cbe997 100644 --- a/docs/models/operations/getticketrequest.md +++ b/docs/models/operations/getticketrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetTicketRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetTicketRequest } from "firehydrant/models/operations"; let value: GetTicketRequest = { ticketId: "", diff --git a/docs/models/operations/getuserrequest.md b/docs/models/operations/getuserrequest.md index 68b77871..d568dfd3 100644 --- a/docs/models/operations/getuserrequest.md +++ b/docs/models/operations/getuserrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetUserRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetUserRequest } from "firehydrant/models/operations"; let value: GetUserRequest = { id: "", diff --git a/docs/models/operations/getvotestatusrequest.md b/docs/models/operations/getvotestatusrequest.md new file mode 100644 index 00000000..0e2ecb54 --- /dev/null +++ b/docs/models/operations/getvotestatusrequest.md @@ -0,0 +1,19 @@ +# GetVoteStatusRequest + +## Example Usage + +```typescript +import { GetVoteStatusRequest } from "firehydrant/models/operations"; + +let value: GetVoteStatusRequest = { + incidentId: "", + eventId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `eventId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getwebhookrequest.md b/docs/models/operations/getwebhookrequest.md index 1df7c264..ad8f1b2f 100644 --- a/docs/models/operations/getwebhookrequest.md +++ b/docs/models/operations/getwebhookrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { GetWebhookRequest } from "firehydrant-typescript-sdk/models/operations"; +import { GetWebhookRequest } from "firehydrant/models/operations"; let value: GetWebhookRequest = { webhookId: "", diff --git a/docs/models/operations/getzendeskcustomersupportissuerequest.md b/docs/models/operations/getzendeskcustomersupportissuerequest.md new file mode 100644 index 00000000..7c6fae15 --- /dev/null +++ b/docs/models/operations/getzendeskcustomersupportissuerequest.md @@ -0,0 +1,18 @@ +# GetZendeskCustomerSupportIssueRequest + +## Example Usage + +```typescript +import { GetZendeskCustomerSupportIssueRequest } from "firehydrant/models/operations"; + +let value: GetZendeskCustomerSupportIssueRequest = { + ticketId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `ticketId` | *string* | :heavy_check_mark: | Zendesk ticket ID | +| `include` | *string* | :heavy_minus_sign: | Use to include attached_incidents | \ No newline at end of file diff --git a/docs/models/operations/groupby.md b/docs/models/operations/groupby.md deleted file mode 100644 index e819e941..00000000 --- a/docs/models/operations/groupby.md +++ /dev/null @@ -1,17 +0,0 @@ -# GroupBy - -String that determines how records are grouped - -## Example Usage - -```typescript -import { GroupBy } from "firehydrant-typescript-sdk/models/operations"; - -let value: GroupBy = "signal_rules"; -``` - -## Values - -```typescript -"signal_rules" | "teams" | "services" | "environments" | "tags" -``` \ No newline at end of file diff --git a/docs/models/operations/infratype.md b/docs/models/operations/infratype.md deleted file mode 100644 index c12a1190..00000000 --- a/docs/models/operations/infratype.md +++ /dev/null @@ -1,15 +0,0 @@ -# InfraType - -## Example Usage - -```typescript -import { InfraType } from "firehydrant-typescript-sdk/models/operations"; - -let value: InfraType = "customers"; -``` - -## Values - -```typescript -"environments" | "functionalities" | "services" | "customers" -``` \ No newline at end of file diff --git a/docs/models/operations/ingestcatalogdatarequest.md b/docs/models/operations/ingestcatalogdatarequest.md index b323856e..c94ecc07 100644 --- a/docs/models/operations/ingestcatalogdatarequest.md +++ b/docs/models/operations/ingestcatalogdatarequest.md @@ -3,12 +3,12 @@ ## Example Usage ```typescript -import { IngestCatalogDataRequest } from "firehydrant-typescript-sdk/models/operations"; +import { IngestCatalogDataRequest } from "firehydrant/models/operations"; let value: IngestCatalogDataRequest = { catalogId: "", - postV1CatalogsCatalogIdIngest: { - encoding: "application/json", + ingestCatalogData: { + encoding: "text/yaml", data: "", }, }; @@ -16,7 +16,7 @@ let value: IngestCatalogDataRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `catalogId` | *string* | :heavy_check_mark: | N/A | -| `postV1CatalogsCatalogIdIngest` | [components.PostV1CatalogsCatalogIdIngest](../../models/components/postv1catalogscatalogidingest.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `catalogId` | *string* | :heavy_check_mark: | N/A | +| `ingestCatalogData` | [components.IngestCatalogData](../../models/components/ingestcatalogdata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/integrationslug.md b/docs/models/operations/integrationslug.md new file mode 100644 index 00000000..74b5432e --- /dev/null +++ b/docs/models/operations/integrationslug.md @@ -0,0 +1,17 @@ +# IntegrationSlug + +The name of the integration to export the retrospective to. + +## Example Usage + +```typescript +import { IntegrationSlug } from "firehydrant/models/operations"; + +let value: IntegrationSlug = "confluence_cloud"; +``` + +## Values + +```typescript +"confluence_cloud" | "google_docs" +``` \ No newline at end of file diff --git a/docs/models/operations/listalertprocessinglogsrequest.md b/docs/models/operations/listalertprocessinglogsrequest.md deleted file mode 100644 index c390bdc1..00000000 --- a/docs/models/operations/listalertprocessinglogsrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# ListAlertProcessingLogsRequest - -## Example Usage - -```typescript -import { ListAlertProcessingLogsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListAlertProcessingLogsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | -| `integrationSlug` | *string* | :heavy_minus_sign: | Scopes returned log entries to a specific integration ID | -| `connectionId` | *string* | :heavy_minus_sign: | Scopes returned log entries to a specific connection ID | -| `ofLevel` | [operations.OfLevel](../../models/operations/oflevel.md) | :heavy_minus_sign: | Returns logs of all levels equal to or above the provided level | -| `exactLevel` | [operations.ExactLevel](../../models/operations/exactlevel.md) | :heavy_minus_sign: | Returns log entries of all levels equal to the provided level | \ No newline at end of file diff --git a/docs/models/operations/listalertsrequest.md b/docs/models/operations/listalertsrequest.md index de20176a..9e48da78 100644 --- a/docs/models/operations/listalertsrequest.md +++ b/docs/models/operations/listalertsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListAlertsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListAlertsRequest } from "firehydrant/models/operations"; let value: ListAlertsRequest = {}; ``` @@ -22,5 +22,5 @@ let value: ListAlertsRequest = {}; | `functionalities` | *string* | :heavy_minus_sign: | A comma separated list of functionality IDs. This currently only works for Signals alerts. | | `services` | *string* | :heavy_minus_sign: | A comma separated list of service IDs. This currently only works for Signals alerts. | | `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags. This currently only works for Signals alerts. | -| `tagMatchStrategy` | [operations.TagMatchStrategy](../../models/operations/tagmatchstrategy.md) | :heavy_minus_sign: | The strategy to match tags. `any` will return alerts that have at least one of the supplied tags, `match_all` will return only alerts that have all of the supplied tags, and `exclude` will only return alerts that have none of the supplied tags. This currently only works for Signals alerts. | -| `statuses` | *string* | :heavy_minus_sign: | A comma separated list of statuses to filter by. Valid statuses are: opened, acknowledged, resolved, ignored, or expired | \ No newline at end of file +| `tagMatchStrategy` | [operations.ListAlertsTagMatchStrategy](../../models/operations/listalertstagmatchstrategy.md) | :heavy_minus_sign: | The strategy to match tags. `any` will return alerts that have at least one of the supplied tags, `match_all` will return only alerts that have all of the supplied tags, and `exclude` will only return alerts that have none of the supplied tags. This currently only works for Signals alerts. | +| `statuses` | *string* | :heavy_minus_sign: | A comma separated list of statuses to filter by. Valid statuses are: opened, acknowledged, resolved, ignored, expired, or linked | \ No newline at end of file diff --git a/docs/models/operations/listalertstagmatchstrategy.md b/docs/models/operations/listalertstagmatchstrategy.md new file mode 100644 index 00000000..e9598242 --- /dev/null +++ b/docs/models/operations/listalertstagmatchstrategy.md @@ -0,0 +1,17 @@ +# ListAlertsTagMatchStrategy + +The strategy to match tags. `any` will return alerts that have at least one of the supplied tags, `match_all` will return only alerts that have all of the supplied tags, and `exclude` will only return alerts that have none of the supplied tags. This currently only works for Signals alerts. + +## Example Usage + +```typescript +import { ListAlertsTagMatchStrategy } from "firehydrant/models/operations"; + +let value: ListAlertsTagMatchStrategy = "any"; +``` + +## Values + +```typescript +"any" | "match_all" | "exclude" +``` \ No newline at end of file diff --git a/docs/models/operations/listaudiencesrequest.md b/docs/models/operations/listaudiencesrequest.md new file mode 100644 index 00000000..6055add1 --- /dev/null +++ b/docs/models/operations/listaudiencesrequest.md @@ -0,0 +1,15 @@ +# ListAudiencesRequest + +## Example Usage + +```typescript +import { ListAudiencesRequest } from "firehydrant/models/operations"; + +let value: ListAudiencesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `includeArchived` | *boolean* | :heavy_minus_sign: | Include archived (discarded) audiences | \ No newline at end of file diff --git a/docs/models/operations/listaudiencesummariesrequest.md b/docs/models/operations/listaudiencesummariesrequest.md new file mode 100644 index 00000000..ad07aeac --- /dev/null +++ b/docs/models/operations/listaudiencesummariesrequest.md @@ -0,0 +1,17 @@ +# ListAudienceSummariesRequest + +## Example Usage + +```typescript +import { ListAudienceSummariesRequest } from "firehydrant/models/operations"; + +let value: ListAudienceSummariesRequest = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | Unique identifier of the incident to summarize | \ No newline at end of file diff --git a/docs/models/operations/listauthedprovidersrequest.md b/docs/models/operations/listauthedprovidersrequest.md new file mode 100644 index 00000000..ef49e614 --- /dev/null +++ b/docs/models/operations/listauthedprovidersrequest.md @@ -0,0 +1,20 @@ +# ListAuthedProvidersRequest + +## Example Usage + +```typescript +import { ListAuthedProvidersRequest } from "firehydrant/models/operations"; + +let value: ListAuthedProvidersRequest = { + integrationSlug: "", + connectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `integrationSlug` | *string* | :heavy_check_mark: | Integration slug | +| `connectionId` | *string* | :heavy_check_mark: | Connection ID | +| `query` | *string* | :heavy_minus_sign: | Query for users by name | \ No newline at end of file diff --git a/docs/models/operations/listavailableinboundfieldmapsrequest.md b/docs/models/operations/listavailableinboundfieldmapsrequest.md new file mode 100644 index 00000000..9fbb7916 --- /dev/null +++ b/docs/models/operations/listavailableinboundfieldmapsrequest.md @@ -0,0 +1,17 @@ +# ListAvailableInboundFieldMapsRequest + +## Example Usage + +```typescript +import { ListAvailableInboundFieldMapsRequest } from "firehydrant/models/operations"; + +let value: ListAvailableInboundFieldMapsRequest = { + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listavailableticketingfieldmapsrequest.md b/docs/models/operations/listavailableticketingfieldmapsrequest.md new file mode 100644 index 00000000..0684226b --- /dev/null +++ b/docs/models/operations/listavailableticketingfieldmapsrequest.md @@ -0,0 +1,17 @@ +# ListAvailableTicketingFieldMapsRequest + +## Example Usage + +```typescript +import { ListAvailableTicketingFieldMapsRequest } from "firehydrant/models/operations"; + +let value: ListAvailableTicketingFieldMapsRequest = { + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listawscloudtrailbatchesrequest.md b/docs/models/operations/listawscloudtrailbatchesrequest.md index c33de3b0..5bb67daa 100644 --- a/docs/models/operations/listawscloudtrailbatchesrequest.md +++ b/docs/models/operations/listawscloudtrailbatchesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListAwsCloudtrailBatchesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListAwsCloudtrailBatchesRequest } from "firehydrant/models/operations"; let value: ListAwsCloudtrailBatchesRequest = {}; ``` diff --git a/docs/models/operations/listawscloudtrailbatcheventsrequest.md b/docs/models/operations/listawscloudtrailbatcheventsrequest.md new file mode 100644 index 00000000..2431937a --- /dev/null +++ b/docs/models/operations/listawscloudtrailbatcheventsrequest.md @@ -0,0 +1,17 @@ +# ListAwsCloudtrailBatchEventsRequest + +## Example Usage + +```typescript +import { ListAwsCloudtrailBatchEventsRequest } from "firehydrant/models/operations"; + +let value: ListAwsCloudtrailBatchEventsRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listawsconnectionsrequest.md b/docs/models/operations/listawsconnectionsrequest.md index 40fbb36d..3eeb1da9 100644 --- a/docs/models/operations/listawsconnectionsrequest.md +++ b/docs/models/operations/listawsconnectionsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListAwsConnectionsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListAwsConnectionsRequest } from "firehydrant/models/operations"; let value: ListAwsConnectionsRequest = {}; ``` diff --git a/docs/models/operations/listcallroutesrequest.md b/docs/models/operations/listcallroutesrequest.md new file mode 100644 index 00000000..8b528bcf --- /dev/null +++ b/docs/models/operations/listcallroutesrequest.md @@ -0,0 +1,16 @@ +# ListCallRoutesRequest + +## Example Usage + +```typescript +import { ListCallRoutesRequest } from "firehydrant/models/operations"; + +let value: ListCallRoutesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listchangeeventsrequest.md b/docs/models/operations/listchangeeventsrequest.md index ed52e05e..ca2a8d66 100644 --- a/docs/models/operations/listchangeeventsrequest.md +++ b/docs/models/operations/listchangeeventsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListChangeEventsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListChangeEventsRequest } from "firehydrant/models/operations"; let value: ListChangeEventsRequest = {}; ``` diff --git a/docs/models/operations/listchangeidentitiesrequest.md b/docs/models/operations/listchangeidentitiesrequest.md index 9bad1a93..8052d11e 100644 --- a/docs/models/operations/listchangeidentitiesrequest.md +++ b/docs/models/operations/listchangeidentitiesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListChangeIdentitiesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListChangeIdentitiesRequest } from "firehydrant/models/operations"; let value: ListChangeIdentitiesRequest = { changeId: "", diff --git a/docs/models/operations/listchangesrequest.md b/docs/models/operations/listchangesrequest.md index be762d4d..f2e8f3cf 100644 --- a/docs/models/operations/listchangesrequest.md +++ b/docs/models/operations/listchangesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListChangesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListChangesRequest } from "firehydrant/models/operations"; let value: ListChangesRequest = {}; ``` diff --git a/docs/models/operations/listchangetypesrequest.md b/docs/models/operations/listchangetypesrequest.md index d7ea8d51..4cdecdd2 100644 --- a/docs/models/operations/listchangetypesrequest.md +++ b/docs/models/operations/listchangetypesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListChangeTypesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListChangeTypesRequest } from "firehydrant/models/operations"; let value: ListChangeTypesRequest = {}; ``` diff --git a/docs/models/operations/listchecklisttemplatesrequest.md b/docs/models/operations/listchecklisttemplatesrequest.md index 87a40266..961306b8 100644 --- a/docs/models/operations/listchecklisttemplatesrequest.md +++ b/docs/models/operations/listchecklisttemplatesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListChecklistTemplatesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListChecklistTemplatesRequest } from "firehydrant/models/operations"; let value: ListChecklistTemplatesRequest = {}; ``` diff --git a/docs/models/operations/listcommentreactionsrequest.md b/docs/models/operations/listcommentreactionsrequest.md new file mode 100644 index 00000000..6062ead4 --- /dev/null +++ b/docs/models/operations/listcommentreactionsrequest.md @@ -0,0 +1,19 @@ +# ListCommentReactionsRequest + +## Example Usage + +```typescript +import { ListCommentReactionsRequest } from "firehydrant/models/operations"; + +let value: ListCommentReactionsRequest = { + conversationId: "", + commentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `conversationId` | *string* | :heavy_check_mark: | N/A | +| `commentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listcommentsrequest.md b/docs/models/operations/listcommentsrequest.md new file mode 100644 index 00000000..312c0e2a --- /dev/null +++ b/docs/models/operations/listcommentsrequest.md @@ -0,0 +1,20 @@ +# ListCommentsRequest + +## Example Usage + +```typescript +import { ListCommentsRequest } from "firehydrant/models/operations"; + +let value: ListCommentsRequest = { + conversationId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `before` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | An ISO8601 timestamp that allows filtering for comments posted before the provided time. | +| `after` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | An ISO8601 timestamp that allows filtering for comments posted after the provided time. | +| `sort` | [operations.ListCommentsSort](../../models/operations/listcommentssort.md) | :heavy_minus_sign: | Allows sorting comments by the time they were posted, ascending or descending. | +| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listcommentssort.md b/docs/models/operations/listcommentssort.md new file mode 100644 index 00000000..23fba599 --- /dev/null +++ b/docs/models/operations/listcommentssort.md @@ -0,0 +1,17 @@ +# ListCommentsSort + +Allows sorting comments by the time they were posted, ascending or descending. + +## Example Usage + +```typescript +import { ListCommentsSort } from "firehydrant/models/operations"; + +let value: ListCommentsSort = "asc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/listconfluencespacesrequest.md b/docs/models/operations/listconfluencespacesrequest.md deleted file mode 100644 index d80dd3ea..00000000 --- a/docs/models/operations/listconfluencespacesrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# ListConfluenceSpacesRequest - -## Example Usage - -```typescript -import { ListConfluenceSpacesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListConfluenceSpacesRequest = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `keyword` | *string* | :heavy_minus_sign: | Space Key | \ No newline at end of file diff --git a/docs/models/operations/listconnectionsrequest.md b/docs/models/operations/listconnectionsrequest.md new file mode 100644 index 00000000..1de4d45d --- /dev/null +++ b/docs/models/operations/listconnectionsrequest.md @@ -0,0 +1,15 @@ +# ListConnectionsRequest + +## Example Usage + +```typescript +import { ListConnectionsRequest } from "firehydrant/models/operations"; + +let value: ListConnectionsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `integrationSlug` | *string* | :heavy_minus_sign: | Only return installed integrations with the supplied slugs (types). | \ No newline at end of file diff --git a/docs/models/operations/listconnectionstatusesbyslugandidrequest.md b/docs/models/operations/listconnectionstatusesbyslugandidrequest.md new file mode 100644 index 00000000..71f3e492 --- /dev/null +++ b/docs/models/operations/listconnectionstatusesbyslugandidrequest.md @@ -0,0 +1,19 @@ +# ListConnectionStatusesBySlugAndIdRequest + +## Example Usage + +```typescript +import { ListConnectionStatusesBySlugAndIdRequest } from "firehydrant/models/operations"; + +let value: ListConnectionStatusesBySlugAndIdRequest = { + slug: "", + byConnectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `byConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listconnectionstatusesbyslugrequest.md b/docs/models/operations/listconnectionstatusesbyslugrequest.md new file mode 100644 index 00000000..03978d7c --- /dev/null +++ b/docs/models/operations/listconnectionstatusesbyslugrequest.md @@ -0,0 +1,17 @@ +# ListConnectionStatusesBySlugRequest + +## Example Usage + +```typescript +import { ListConnectionStatusesBySlugRequest } from "firehydrant/models/operations"; + +let value: ListConnectionStatusesBySlugRequest = { + slug: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listconversationcommentreactionsrequest.md b/docs/models/operations/listconversationcommentreactionsrequest.md deleted file mode 100644 index 5ee17b08..00000000 --- a/docs/models/operations/listconversationcommentreactionsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListConversationCommentReactionsRequest - -## Example Usage - -```typescript -import { ListConversationCommentReactionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListConversationCommentReactionsRequest = { - conversationId: "", - commentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `conversationId` | *string* | :heavy_check_mark: | N/A | -| `commentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listconversationcommentsrequest.md b/docs/models/operations/listconversationcommentsrequest.md deleted file mode 100644 index 4e7572c3..00000000 --- a/docs/models/operations/listconversationcommentsrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# ListConversationCommentsRequest - -## Example Usage - -```typescript -import { ListConversationCommentsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListConversationCommentsRequest = { - conversationId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `before` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | An ISO8601 timestamp that allows filtering for comments posted before the provided time. | -| `after` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | An ISO8601 timestamp that allows filtering for comments posted after the provided time. | -| `sort` | [operations.Sort](../../models/operations/sort.md) | :heavy_minus_sign: | Allows sorting comments by the time they were posted, ascending or descending. | -| `conversationId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listcustomfieldselectoptionsrequest.md b/docs/models/operations/listcustomfieldselectoptionsrequest.md new file mode 100644 index 00000000..59e37e69 --- /dev/null +++ b/docs/models/operations/listcustomfieldselectoptionsrequest.md @@ -0,0 +1,19 @@ +# ListCustomFieldSelectOptionsRequest + +## Example Usage + +```typescript +import { ListCustomFieldSelectOptionsRequest } from "firehydrant/models/operations"; + +let value: ListCustomFieldSelectOptionsRequest = { + fieldId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `query` | *string* | :heavy_minus_sign: | Text string of a query for filtering values. | +| `allVersions` | *boolean* | :heavy_minus_sign: | If true, return all versions of the custom field definition. | \ No newline at end of file diff --git a/docs/models/operations/listemailsubscribersrequest.md b/docs/models/operations/listemailsubscribersrequest.md new file mode 100644 index 00000000..101c0088 --- /dev/null +++ b/docs/models/operations/listemailsubscribersrequest.md @@ -0,0 +1,17 @@ +# ListEmailSubscribersRequest + +## Example Usage + +```typescript +import { ListEmailSubscribersRequest } from "firehydrant/models/operations"; + +let value: ListEmailSubscribersRequest = { + nuncConnectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listentitlementsrequest.md b/docs/models/operations/listentitlementsrequest.md index 7cd3fdb9..8fbfe93e 100644 --- a/docs/models/operations/listentitlementsrequest.md +++ b/docs/models/operations/listentitlementsrequest.md @@ -3,14 +3,14 @@ ## Example Usage ```typescript -import { ListEntitlementsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListEntitlementsRequest } from "firehydrant/models/operations"; let value: ListEntitlementsRequest = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | Name of Entitlement | -| `type` | [operations.Type](../../models/operations/type.md) | :heavy_minus_sign: | Type of Entitlement | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of Entitlement | +| `type` | [operations.ListEntitlementsType](../../models/operations/listentitlementstype.md) | :heavy_minus_sign: | Type of Entitlement | \ No newline at end of file diff --git a/docs/models/operations/listentitlementstype.md b/docs/models/operations/listentitlementstype.md new file mode 100644 index 00000000..7881fa77 --- /dev/null +++ b/docs/models/operations/listentitlementstype.md @@ -0,0 +1,17 @@ +# ListEntitlementsType + +Type of Entitlement + +## Example Usage + +```typescript +import { ListEntitlementsType } from "firehydrant/models/operations"; + +let value: ListEntitlementsType = "access"; +``` + +## Values + +```typescript +"quota" | "access" +``` \ No newline at end of file diff --git a/docs/models/operations/listenvironmentsrequest.md b/docs/models/operations/listenvironmentsrequest.md index 19729226..4bd9bea4 100644 --- a/docs/models/operations/listenvironmentsrequest.md +++ b/docs/models/operations/listenvironmentsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListEnvironmentsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListEnvironmentsRequest } from "firehydrant/models/operations"; let value: ListEnvironmentsRequest = {}; ``` diff --git a/docs/models/operations/listfieldmapavailablefieldsrequest.md b/docs/models/operations/listfieldmapavailablefieldsrequest.md new file mode 100644 index 00000000..1fa0a7ff --- /dev/null +++ b/docs/models/operations/listfieldmapavailablefieldsrequest.md @@ -0,0 +1,17 @@ +# ListFieldMapAvailableFieldsRequest + +## Example Usage + +```typescript +import { ListFieldMapAvailableFieldsRequest } from "firehydrant/models/operations"; + +let value: ListFieldMapAvailableFieldsRequest = { + fieldMapId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `fieldMapId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listfunctionalitiesrequest.md b/docs/models/operations/listfunctionalitiesrequest.md index 122f41ba..66666bb3 100644 --- a/docs/models/operations/listfunctionalitiesrequest.md +++ b/docs/models/operations/listfunctionalitiesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListFunctionalitiesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListFunctionalitiesRequest } from "firehydrant/models/operations"; let value: ListFunctionalitiesRequest = {}; ``` diff --git a/docs/models/operations/listfunctionalityservicesrequest.md b/docs/models/operations/listfunctionalityservicesrequest.md new file mode 100644 index 00000000..e130a23f --- /dev/null +++ b/docs/models/operations/listfunctionalityservicesrequest.md @@ -0,0 +1,17 @@ +# ListFunctionalityServicesRequest + +## Example Usage + +```typescript +import { ListFunctionalityServicesRequest } from "firehydrant/models/operations"; + +let value: ListFunctionalityServicesRequest = { + functionalityId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `functionalityId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listinboundfieldmapsrequest.md b/docs/models/operations/listinboundfieldmapsrequest.md new file mode 100644 index 00000000..2c52e202 --- /dev/null +++ b/docs/models/operations/listinboundfieldmapsrequest.md @@ -0,0 +1,20 @@ +# ListInboundFieldMapsRequest + +## Example Usage + +```typescript +import { ListInboundFieldMapsRequest } from "firehydrant/models/operations"; + +let value: ListInboundFieldMapsRequest = { + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `ticketType` | [operations.TicketType](../../models/operations/tickettype.md) | :heavy_minus_sign: | Filter by ticket type. Values: incident, follow_up | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentalertsrequest.md b/docs/models/operations/listincidentalertsrequest.md index 2caf71e8..ea609a0d 100644 --- a/docs/models/operations/listincidentalertsrequest.md +++ b/docs/models/operations/listincidentalertsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentAlertsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentAlertsRequest } from "firehydrant/models/operations"; let value: ListIncidentAlertsRequest = { incidentId: "", diff --git a/docs/models/operations/listincidentattachmentsrequest.md b/docs/models/operations/listincidentattachmentsrequest.md index 484158f5..6cab55d1 100644 --- a/docs/models/operations/listincidentattachmentsrequest.md +++ b/docs/models/operations/listincidentattachmentsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentAttachmentsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentAttachmentsRequest } from "firehydrant/models/operations"; let value: ListIncidentAttachmentsRequest = { incidentId: "", diff --git a/docs/models/operations/listincidentchangeeventsrequest.md b/docs/models/operations/listincidentchangeeventsrequest.md new file mode 100644 index 00000000..56f01c91 --- /dev/null +++ b/docs/models/operations/listincidentchangeeventsrequest.md @@ -0,0 +1,20 @@ +# ListIncidentChangeEventsRequest + +## Example Usage + +```typescript +import { ListIncidentChangeEventsRequest } from "firehydrant/models/operations"; + +let value: ListIncidentChangeEventsRequest = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `type` | [operations.ListIncidentChangeEventsType](../../models/operations/listincidentchangeeventstype.md) | :heavy_minus_sign: | The type of the relation to the incident | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentchangeeventstype.md b/docs/models/operations/listincidentchangeeventstype.md new file mode 100644 index 00000000..4e2107f4 --- /dev/null +++ b/docs/models/operations/listincidentchangeeventstype.md @@ -0,0 +1,17 @@ +# ListIncidentChangeEventsType + +The type of the relation to the incident + +## Example Usage + +```typescript +import { ListIncidentChangeEventsType } from "firehydrant/models/operations"; + +let value: ListIncidentChangeEventsType = "caused"; +``` + +## Values + +```typescript +"caused" | "fixed" | "suspect" | "dismissed" +``` \ No newline at end of file diff --git a/docs/models/operations/listincidentconferencebridgesrequest.md b/docs/models/operations/listincidentconferencebridgesrequest.md new file mode 100644 index 00000000..43cfc914 --- /dev/null +++ b/docs/models/operations/listincidentconferencebridgesrequest.md @@ -0,0 +1,17 @@ +# ListIncidentConferenceBridgesRequest + +## Example Usage + +```typescript +import { ListIncidentConferenceBridgesRequest } from "firehydrant/models/operations"; + +let value: ListIncidentConferenceBridgesRequest = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidenteventsrequest.md b/docs/models/operations/listincidenteventsrequest.md index fd6a2b0d..5f051c70 100644 --- a/docs/models/operations/listincidenteventsrequest.md +++ b/docs/models/operations/listincidenteventsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentEventsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentEventsRequest } from "firehydrant/models/operations"; let value: ListIncidentEventsRequest = { incidentId: "", @@ -12,9 +12,9 @@ let value: ListIncidentEventsRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `types` | *string* | :heavy_minus_sign: | A comma separated list of types of events to filter by | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `types` | *string* | :heavy_minus_sign: | A comma separated list of types of events to filter by. Possible values are:
- `add_task_list`: Task list was added
- `alert_event`: Someone was paged or took action on a linked alert
- `alert_linked`: An alert was linked to the incident
- `bulk_milestone_update`: When a milestone change occurs with no other changes
- `bulk_update`: When an incident note/update is posted or when impacted components are updated. If other changes occur together with either of these changes (e.g., milestone change), they are all bundled together into a bulk_update
- `change_type`: Updates to associated change events
- `chat_message`: Any chat message event in a linked chat app like Slack or MS Teams
- `children_changed`: When adding or updating child related incidents
- `external_link`: When an external link is added or updated
- `general_update`: Currently only describes Runbook stoppage events
- `generic_chat_message`: When an event or message is manually added to the timeline via the web UI or API
- `incident_attachment`: When attachments or files are added to the timeline
- `generic_resource_change`: Any changes to individual fields within the incident, including custom fields
- `incident_restriction`: When an incident is converted to private
- `incident_status`: Only used when an incident starts and changes to an `active` state
- `note`: When a message is posted to a status page directly and not via `/fh update`
- `role_update`: Any updates to assigned roles
- `runbook_attachment`: Any updates to a runbook
- `runbook_step_execution_update`: Any Runbook step events
- `task_update`: Task update events
- `team_assignment`: Team assignment events
- `ticket_update`: Updates to incident and follow-up tickets | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentimpactrequest.md b/docs/models/operations/listincidentimpactrequest.md deleted file mode 100644 index 96394ad2..00000000 --- a/docs/models/operations/listincidentimpactrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListIncidentImpactRequest - -## Example Usage - -```typescript -import { ListIncidentImpactRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListIncidentImpactRequest = { - incidentId: "", - type: "functionalities", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `type` | [operations.PathParamType](../../models/operations/pathparamtype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentimpactsrequest.md b/docs/models/operations/listincidentimpactsrequest.md new file mode 100644 index 00000000..042c6c15 --- /dev/null +++ b/docs/models/operations/listincidentimpactsrequest.md @@ -0,0 +1,19 @@ +# ListIncidentImpactsRequest + +## Example Usage + +```typescript +import { ListIncidentImpactsRequest } from "firehydrant/models/operations"; + +let value: ListIncidentImpactsRequest = { + incidentId: "", + type: "customers", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `type` | [operations.ListIncidentImpactsType](../../models/operations/listincidentimpactstype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentimpactstype.md b/docs/models/operations/listincidentimpactstype.md new file mode 100644 index 00000000..90c4154d --- /dev/null +++ b/docs/models/operations/listincidentimpactstype.md @@ -0,0 +1,15 @@ +# ListIncidentImpactsType + +## Example Usage + +```typescript +import { ListIncidentImpactsType } from "firehydrant/models/operations"; + +let value: ListIncidentImpactsType = "customers"; +``` + +## Values + +```typescript +"environments" | "functionalities" | "services" | "customers" +``` \ No newline at end of file diff --git a/docs/models/operations/listincidentlinksrequest.md b/docs/models/operations/listincidentlinksrequest.md index 8503079b..a05a4834 100644 --- a/docs/models/operations/listincidentlinksrequest.md +++ b/docs/models/operations/listincidentlinksrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentLinksRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentLinksRequest } from "firehydrant/models/operations"; let value: ListIncidentLinksRequest = { incidentId: "", diff --git a/docs/models/operations/listincidentmetricsrequest.md b/docs/models/operations/listincidentmetricsrequest.md index db112902..23ef584d 100644 --- a/docs/models/operations/listincidentmetricsrequest.md +++ b/docs/models/operations/listincidentmetricsrequest.md @@ -3,20 +3,20 @@ ## Example Usage ```typescript -import { ListIncidentMetricsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentMetricsRequest } from "firehydrant/models/operations"; let value: ListIncidentMetricsRequest = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from | -| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from | -| `bucketSize` | [operations.BucketSize](../../models/operations/bucketsize.md) | :heavy_minus_sign: | N/A | -| `by` | [operations.By](../../models/operations/by.md) | :heavy_minus_sign: | N/A | -| `sortField` | [operations.SortField](../../models/operations/sortfield.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [operations.SortDirection](../../models/operations/sortdirection.md) | :heavy_minus_sign: | N/A | -| `sortLimit` | *number* | :heavy_minus_sign: | N/A | -| `conditions` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from | +| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from | +| `bucketSize` | [operations.BucketSize](../../models/operations/bucketsize.md) | :heavy_minus_sign: | N/A | +| `by` | [operations.By](../../models/operations/by.md) | :heavy_minus_sign: | N/A | +| `sortField` | [operations.ListIncidentMetricsSortField](../../models/operations/listincidentmetricssortfield.md) | :heavy_minus_sign: | N/A | +| `sortDirection` | [operations.ListIncidentMetricsSortDirection](../../models/operations/listincidentmetricssortdirection.md) | :heavy_minus_sign: | N/A | +| `sortLimit` | *number* | :heavy_minus_sign: | N/A | +| `conditions` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentmetricssortdirection.md b/docs/models/operations/listincidentmetricssortdirection.md new file mode 100644 index 00000000..58eceb7e --- /dev/null +++ b/docs/models/operations/listincidentmetricssortdirection.md @@ -0,0 +1,15 @@ +# ListIncidentMetricsSortDirection + +## Example Usage + +```typescript +import { ListIncidentMetricsSortDirection } from "firehydrant/models/operations"; + +let value: ListIncidentMetricsSortDirection = "asc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/listincidentmetricssortfield.md b/docs/models/operations/listincidentmetricssortfield.md new file mode 100644 index 00000000..d351165a --- /dev/null +++ b/docs/models/operations/listincidentmetricssortfield.md @@ -0,0 +1,15 @@ +# ListIncidentMetricsSortField + +## Example Usage + +```typescript +import { ListIncidentMetricsSortField } from "firehydrant/models/operations"; + +let value: ListIncidentMetricsSortField = "mttm"; +``` + +## Values + +```typescript +"mttd" | "mtta" | "mttm" | "mttr" | "count" | "total_time" +``` \ No newline at end of file diff --git a/docs/models/operations/listincidentmilestonesrequest.md b/docs/models/operations/listincidentmilestonesrequest.md index 2d7e4aea..3a072e9d 100644 --- a/docs/models/operations/listincidentmilestonesrequest.md +++ b/docs/models/operations/listincidentmilestonesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentMilestonesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentMilestonesRequest } from "firehydrant/models/operations"; let value: ListIncidentMilestonesRequest = { incidentId: "", diff --git a/docs/models/operations/listincidentrelatedchangesrequest.md b/docs/models/operations/listincidentrelatedchangesrequest.md deleted file mode 100644 index cc07ca0c..00000000 --- a/docs/models/operations/listincidentrelatedchangesrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# ListIncidentRelatedChangesRequest - -## Example Usage - -```typescript -import { ListIncidentRelatedChangesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListIncidentRelatedChangesRequest = { - incidentId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | -| `type` | [operations.QueryParamType](../../models/operations/queryparamtype.md) | :heavy_minus_sign: | The type of the relation to the incident | -| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentretrospectivesrequest.md b/docs/models/operations/listincidentretrospectivesrequest.md new file mode 100644 index 00000000..be16d185 --- /dev/null +++ b/docs/models/operations/listincidentretrospectivesrequest.md @@ -0,0 +1,20 @@ +# ListIncidentRetrospectivesRequest + +## Example Usage + +```typescript +import { ListIncidentRetrospectivesRequest } from "firehydrant/models/operations"; + +let value: ListIncidentRetrospectivesRequest = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `isHidden` | *boolean* | :heavy_minus_sign: | Filter by hidden status. | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listincidentroleassignmentsrequest.md b/docs/models/operations/listincidentroleassignmentsrequest.md index db219959..92b519e4 100644 --- a/docs/models/operations/listincidentroleassignmentsrequest.md +++ b/docs/models/operations/listincidentroleassignmentsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentRoleAssignmentsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentRoleAssignmentsRequest } from "firehydrant/models/operations"; let value: ListIncidentRoleAssignmentsRequest = { incidentId: "", diff --git a/docs/models/operations/listincidentrolesrequest.md b/docs/models/operations/listincidentrolesrequest.md index f5e21559..64400621 100644 --- a/docs/models/operations/listincidentrolesrequest.md +++ b/docs/models/operations/listincidentrolesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentRolesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentRolesRequest } from "firehydrant/models/operations"; let value: ListIncidentRolesRequest = {}; ``` diff --git a/docs/models/operations/listincidentsrequest.md b/docs/models/operations/listincidentsrequest.md index 58a6c18e..1a38149c 100644 --- a/docs/models/operations/listincidentsrequest.md +++ b/docs/models/operations/listincidentsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentsRequest } from "firehydrant/models/operations"; let value: ListIncidentsRequest = {}; ``` @@ -26,6 +26,8 @@ let value: ListIncidentsRequest = {}; | `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | Filters for incidents that started on or before this date | | `resolvedAtOrAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were resolved at or after this time. Combine this with the `current_milestones` parameter if you wish to omit incidents that were re-opened and are still active. | | `resolvedAtOrBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were resolved at or before this time. Combine this with the `current_milestones` parameter if you wish to omit incidents that were re-opened and are still active. | +| `closedAtOrAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were closed at or after this time | +| `closedAtOrBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were closed at or before this time | | `createdAtOrAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were created at or after this time | | `createdAtOrBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were created at or before this time | | `query` | *string* | :heavy_minus_sign: | A text query for an incident that searches on name, summary, and desciption | @@ -37,8 +39,9 @@ let value: ListIncidentsRequest = {}; | `severityNotSet` | *boolean* | :heavy_minus_sign: | Flag for including incidents where severity has not been set | | `currentMilestones` | *string* | :heavy_minus_sign: | A comma separated list of current milestones | | `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | -| `tagMatchStrategy` | [operations.QueryParamTagMatchStrategy](../../models/operations/queryparamtagmatchstrategy.md) | :heavy_minus_sign: | A matching strategy for the tags provided | +| `tagMatchStrategy` | [operations.ListIncidentsTagMatchStrategy](../../models/operations/listincidentstagmatchstrategy.md) | :heavy_minus_sign: | A matching strategy for the tags provided | | `archived` | *boolean* | :heavy_minus_sign: | Return archived incidents | | `updatedAfter` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were updated after this date | | `updatedBefore` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filters for incidents that were updated before this date | -| `incidentTypeId` | *string* | :heavy_minus_sign: | A comma separated list of incident type IDs | \ No newline at end of file +| `incidentTypeId` | *string* | :heavy_minus_sign: | A comma separated list of incident type IDs | +| `retrospectiveTemplate` | *string* | :heavy_minus_sign: | A comma separated list of retrospective template IDs | \ No newline at end of file diff --git a/docs/models/operations/listincidentstagmatchstrategy.md b/docs/models/operations/listincidentstagmatchstrategy.md new file mode 100644 index 00000000..42ba987e --- /dev/null +++ b/docs/models/operations/listincidentstagmatchstrategy.md @@ -0,0 +1,17 @@ +# ListIncidentsTagMatchStrategy + +A matching strategy for the tags provided + +## Example Usage + +```typescript +import { ListIncidentsTagMatchStrategy } from "firehydrant/models/operations"; + +let value: ListIncidentsTagMatchStrategy = "any"; +``` + +## Values + +```typescript +"any" | "match_all" | "exclude" +``` \ No newline at end of file diff --git a/docs/models/operations/listincidentstatuspagesrequest.md b/docs/models/operations/listincidentstatuspagesrequest.md index 5c94b974..d635b691 100644 --- a/docs/models/operations/listincidentstatuspagesrequest.md +++ b/docs/models/operations/listincidentstatuspagesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentStatusPagesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentStatusPagesRequest } from "firehydrant/models/operations"; let value: ListIncidentStatusPagesRequest = { incidentId: "", diff --git a/docs/models/operations/listincidenttagsrequest.md b/docs/models/operations/listincidenttagsrequest.md index d4fedfab..1e7f01c9 100644 --- a/docs/models/operations/listincidenttagsrequest.md +++ b/docs/models/operations/listincidenttagsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentTagsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentTagsRequest } from "firehydrant/models/operations"; let value: ListIncidentTagsRequest = {}; ``` diff --git a/docs/models/operations/listincidenttasksrequest.md b/docs/models/operations/listincidenttasksrequest.md index cafce330..859b9a01 100644 --- a/docs/models/operations/listincidenttasksrequest.md +++ b/docs/models/operations/listincidenttasksrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentTasksRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentTasksRequest } from "firehydrant/models/operations"; let value: ListIncidentTasksRequest = { incidentId: "", diff --git a/docs/models/operations/listincidenttypesrequest.md b/docs/models/operations/listincidenttypesrequest.md index 434277b6..7de4b7fa 100644 --- a/docs/models/operations/listincidenttypesrequest.md +++ b/docs/models/operations/listincidenttypesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListIncidentTypesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListIncidentTypesRequest } from "firehydrant/models/operations"; let value: ListIncidentTypesRequest = {}; ``` diff --git a/docs/models/operations/listinfrastructuremetricsinfratype.md b/docs/models/operations/listinfrastructuremetricsinfratype.md new file mode 100644 index 00000000..12da587f --- /dev/null +++ b/docs/models/operations/listinfrastructuremetricsinfratype.md @@ -0,0 +1,15 @@ +# ListInfrastructureMetricsInfraType + +## Example Usage + +```typescript +import { ListInfrastructureMetricsInfraType } from "firehydrant/models/operations"; + +let value: ListInfrastructureMetricsInfraType = "environments"; +``` + +## Values + +```typescript +"environments" | "functionalities" | "services" | "customers" +``` \ No newline at end of file diff --git a/docs/models/operations/listinfrastructuremetricsrequest.md b/docs/models/operations/listinfrastructuremetricsrequest.md index c2e93c64..bfea2c6e 100644 --- a/docs/models/operations/listinfrastructuremetricsrequest.md +++ b/docs/models/operations/listinfrastructuremetricsrequest.md @@ -3,17 +3,19 @@ ## Example Usage ```typescript -import { ListInfrastructureMetricsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListInfrastructureMetricsRequest } from "firehydrant/models/operations"; let value: ListInfrastructureMetricsRequest = { - infraType: "functionalities", + infraType: "environments", + infraId: "", }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `infraType` | [operations.InfraType](../../models/operations/infratype.md) | :heavy_check_mark: | N/A | -| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from; defaults to 30 days ago | -| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from, defaults to today | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `infraType` | [operations.ListInfrastructureMetricsInfraType](../../models/operations/listinfrastructuremetricsinfratype.md) | :heavy_check_mark: | N/A | +| `infraId` | *string* | :heavy_check_mark: | Component UUID | +| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from; defaults to 30 days ago | +| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from, defaults to today | \ No newline at end of file diff --git a/docs/models/operations/listinfrastructuresrequest.md b/docs/models/operations/listinfrastructuresrequest.md index 909bedec..3adb934f 100644 --- a/docs/models/operations/listinfrastructuresrequest.md +++ b/docs/models/operations/listinfrastructuresrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListInfrastructuresRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListInfrastructuresRequest } from "firehydrant/models/operations"; let value: ListInfrastructuresRequest = {}; ``` diff --git a/docs/models/operations/listinfrastructuretypemetricsinfratype.md b/docs/models/operations/listinfrastructuretypemetricsinfratype.md new file mode 100644 index 00000000..909a2924 --- /dev/null +++ b/docs/models/operations/listinfrastructuretypemetricsinfratype.md @@ -0,0 +1,15 @@ +# ListInfrastructureTypeMetricsInfraType + +## Example Usage + +```typescript +import { ListInfrastructureTypeMetricsInfraType } from "firehydrant/models/operations"; + +let value: ListInfrastructureTypeMetricsInfraType = "services"; +``` + +## Values + +```typescript +"environments" | "functionalities" | "services" | "customers" +``` \ No newline at end of file diff --git a/docs/models/operations/listinfrastructuretypemetricsrequest.md b/docs/models/operations/listinfrastructuretypemetricsrequest.md new file mode 100644 index 00000000..450e8387 --- /dev/null +++ b/docs/models/operations/listinfrastructuretypemetricsrequest.md @@ -0,0 +1,19 @@ +# ListInfrastructureTypeMetricsRequest + +## Example Usage + +```typescript +import { ListInfrastructureTypeMetricsRequest } from "firehydrant/models/operations"; + +let value: ListInfrastructureTypeMetricsRequest = { + infraType: "services", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `infraType` | [operations.ListInfrastructureTypeMetricsInfraType](../../models/operations/listinfrastructuretypemetricsinfratype.md) | :heavy_check_mark: | N/A | +| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from; defaults to 30 days ago | +| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from, defaults to today | \ No newline at end of file diff --git a/docs/models/operations/listintegrationconnectionsrequest.md b/docs/models/operations/listintegrationconnectionsrequest.md deleted file mode 100644 index 82da41a9..00000000 --- a/docs/models/operations/listintegrationconnectionsrequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListIntegrationConnectionsRequest - -## Example Usage - -```typescript -import { ListIntegrationConnectionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListIntegrationConnectionsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `integrationSlug` | *string* | :heavy_minus_sign: | Only return installed integrations with the supplied slugs (types). | \ No newline at end of file diff --git a/docs/models/operations/listlifecyclemeasurementdefinitionsrequest.md b/docs/models/operations/listlifecyclemeasurementdefinitionsrequest.md new file mode 100644 index 00000000..856a6f7b --- /dev/null +++ b/docs/models/operations/listlifecyclemeasurementdefinitionsrequest.md @@ -0,0 +1,16 @@ +# ListLifecycleMeasurementDefinitionsRequest + +## Example Usage + +```typescript +import { ListLifecycleMeasurementDefinitionsRequest } from "firehydrant/models/operations"; + +let value: ListLifecycleMeasurementDefinitionsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listmeasurementdefinitionsrequest.md b/docs/models/operations/listmeasurementdefinitionsrequest.md deleted file mode 100644 index 5f131d79..00000000 --- a/docs/models/operations/listmeasurementdefinitionsrequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# ListMeasurementDefinitionsRequest - -## Example Usage - -```typescript -import { ListMeasurementDefinitionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListMeasurementDefinitionsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listorganizationoncallschedulesrequest.md b/docs/models/operations/listorganizationoncallschedulesrequest.md new file mode 100644 index 00000000..ee55e512 --- /dev/null +++ b/docs/models/operations/listorganizationoncallschedulesrequest.md @@ -0,0 +1,15 @@ +# ListOrganizationOnCallSchedulesRequest + +## Example Usage + +```typescript +import { ListOrganizationOnCallSchedulesRequest } from "firehydrant/models/operations"; + +let value: ListOrganizationOnCallSchedulesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_minus_sign: | An optional comma separated list of team IDs to filter currently on-call users by | \ No newline at end of file diff --git a/docs/models/operations/listpostmortemquestionsrequest.md b/docs/models/operations/listpostmortemquestionsrequest.md new file mode 100644 index 00000000..b91314dc --- /dev/null +++ b/docs/models/operations/listpostmortemquestionsrequest.md @@ -0,0 +1,16 @@ +# ListPostMortemQuestionsRequest + +## Example Usage + +```typescript +import { ListPostMortemQuestionsRequest } from "firehydrant/models/operations"; + +let value: ListPostMortemQuestionsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listpostmortemreasonsrequest.md b/docs/models/operations/listpostmortemreasonsrequest.md new file mode 100644 index 00000000..7f0bf1ca --- /dev/null +++ b/docs/models/operations/listpostmortemreasonsrequest.md @@ -0,0 +1,19 @@ +# ListPostMortemReasonsRequest + +## Example Usage + +```typescript +import { ListPostMortemReasonsRequest } from "firehydrant/models/operations"; + +let value: ListPostMortemReasonsRequest = { + reportId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listpostmortemreportsrequest.md b/docs/models/operations/listpostmortemreportsrequest.md new file mode 100644 index 00000000..e0dd9d5c --- /dev/null +++ b/docs/models/operations/listpostmortemreportsrequest.md @@ -0,0 +1,18 @@ +# ListPostMortemReportsRequest + +## Example Usage + +```typescript +import { ListPostMortemReportsRequest } from "firehydrant/models/operations"; + +let value: ListPostMortemReportsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `incidentId` | *string* | :heavy_minus_sign: | Filter the reports by an incident ID | +| `updatedSince` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter for reports updated after the given ISO8601 timestamp | \ No newline at end of file diff --git a/docs/models/operations/listprioritiesrequest.md b/docs/models/operations/listprioritiesrequest.md index 6f7423b9..94d3ae76 100644 --- a/docs/models/operations/listprioritiesrequest.md +++ b/docs/models/operations/listprioritiesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListPrioritiesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListPrioritiesRequest } from "firehydrant/models/operations"; let value: ListPrioritiesRequest = {}; ``` diff --git a/docs/models/operations/listprocessinglogentriesrequest.md b/docs/models/operations/listprocessinglogentriesrequest.md new file mode 100644 index 00000000..50b7765d --- /dev/null +++ b/docs/models/operations/listprocessinglogentriesrequest.md @@ -0,0 +1,20 @@ +# ListProcessingLogEntriesRequest + +## Example Usage + +```typescript +import { ListProcessingLogEntriesRequest } from "firehydrant/models/operations"; + +let value: ListProcessingLogEntriesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `integrationSlug` | *string* | :heavy_minus_sign: | Scopes returned log entries to a specific integration ID | +| `connectionId` | *string* | :heavy_minus_sign: | Scopes returned log entries to a specific connection ID | +| `ofLevel` | [operations.OfLevel](../../models/operations/oflevel.md) | :heavy_minus_sign: | Returns logs of all levels equal to or above the provided level | +| `exactLevel` | [operations.ExactLevel](../../models/operations/exactlevel.md) | :heavy_minus_sign: | Returns log entries of all levels equal to the provided level | \ No newline at end of file diff --git a/docs/models/operations/listretrospectivemetricsrequest.md b/docs/models/operations/listretrospectivemetricsrequest.md index b986a99d..b12bfc16 100644 --- a/docs/models/operations/listretrospectivemetricsrequest.md +++ b/docs/models/operations/listretrospectivemetricsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListRetrospectiveMetricsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListRetrospectiveMetricsRequest } from "firehydrant/models/operations"; let value: ListRetrospectiveMetricsRequest = {}; ``` diff --git a/docs/models/operations/listretrospectivequestionsrequest.md b/docs/models/operations/listretrospectivequestionsrequest.md deleted file mode 100644 index 4f9ff355..00000000 --- a/docs/models/operations/listretrospectivequestionsrequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# ListRetrospectiveQuestionsRequest - -## Example Usage - -```typescript -import { ListRetrospectiveQuestionsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListRetrospectiveQuestionsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listretrospectivereportreasonsrequest.md b/docs/models/operations/listretrospectivereportreasonsrequest.md deleted file mode 100644 index 081ba649..00000000 --- a/docs/models/operations/listretrospectivereportreasonsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListRetrospectiveReportReasonsRequest - -## Example Usage - -```typescript -import { ListRetrospectiveReportReasonsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListRetrospectiveReportReasonsRequest = { - reportId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listretrospectivereportsrequest.md b/docs/models/operations/listretrospectivereportsrequest.md deleted file mode 100644 index 6d69fcbe..00000000 --- a/docs/models/operations/listretrospectivereportsrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# ListRetrospectiveReportsRequest - -## Example Usage - -```typescript -import { ListRetrospectiveReportsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListRetrospectiveReportsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | -| `incidentId` | *string* | :heavy_minus_sign: | Filter the reports by an incident ID | -| `updatedSince` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter for reports updated after the given ISO8601 timestamp | \ No newline at end of file diff --git a/docs/models/operations/listretrospectivesrequest.md b/docs/models/operations/listretrospectivesrequest.md new file mode 100644 index 00000000..f6a88b21 --- /dev/null +++ b/docs/models/operations/listretrospectivesrequest.md @@ -0,0 +1,18 @@ +# ListRetrospectivesRequest + +## Example Usage + +```typescript +import { ListRetrospectivesRequest } from "firehydrant/models/operations"; + +let value: ListRetrospectivesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `incidentId` | *string* | :heavy_minus_sign: | Filter the reports by an incident ID | +| `updatedSince` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter for reports updated after the given ISO8601 timestamp | \ No newline at end of file diff --git a/docs/models/operations/listretrospectivetemplatesrequest.md b/docs/models/operations/listretrospectivetemplatesrequest.md new file mode 100644 index 00000000..335dfddd --- /dev/null +++ b/docs/models/operations/listretrospectivetemplatesrequest.md @@ -0,0 +1,17 @@ +# ListRetrospectiveTemplatesRequest + +## Example Usage + +```typescript +import { ListRetrospectiveTemplatesRequest } from "firehydrant/models/operations"; + +let value: ListRetrospectiveTemplatesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `forIncident` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listrunbookactionsrequest.md b/docs/models/operations/listrunbookactionsrequest.md index 277588a6..a1391ed2 100644 --- a/docs/models/operations/listrunbookactionsrequest.md +++ b/docs/models/operations/listrunbookactionsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListRunbookActionsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListRunbookActionsRequest } from "firehydrant/models/operations"; let value: ListRunbookActionsRequest = {}; ``` diff --git a/docs/models/operations/listrunbookauditsrequest.md b/docs/models/operations/listrunbookauditsrequest.md index 82f5260d..b0429fc0 100644 --- a/docs/models/operations/listrunbookauditsrequest.md +++ b/docs/models/operations/listrunbookauditsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListRunbookAuditsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListRunbookAuditsRequest } from "firehydrant/models/operations"; let value: ListRunbookAuditsRequest = {}; ``` diff --git a/docs/models/operations/listrunbookexecutionsrequest.md b/docs/models/operations/listrunbookexecutionsrequest.md index bfb70238..f7305d06 100644 --- a/docs/models/operations/listrunbookexecutionsrequest.md +++ b/docs/models/operations/listrunbookexecutionsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListRunbookExecutionsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListRunbookExecutionsRequest } from "firehydrant/models/operations"; let value: ListRunbookExecutionsRequest = {}; ``` diff --git a/docs/models/operations/listrunbooksqueryparamsort.md b/docs/models/operations/listrunbooksqueryparamsort.md deleted file mode 100644 index e58e3947..00000000 --- a/docs/models/operations/listrunbooksqueryparamsort.md +++ /dev/null @@ -1,17 +0,0 @@ -# ListRunbooksQueryParamSort - -Sort runbooks by their updated date. Accepts 'asc', 'desc' - -## Example Usage - -```typescript -import { ListRunbooksQueryParamSort } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListRunbooksQueryParamSort = "desc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/listrunbooksrequest.md b/docs/models/operations/listrunbooksrequest.md index ebbf561b..623aa774 100644 --- a/docs/models/operations/listrunbooksrequest.md +++ b/docs/models/operations/listrunbooksrequest.md @@ -3,17 +3,19 @@ ## Example Usage ```typescript -import { ListRunbooksRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListRunbooksRequest } from "firehydrant/models/operations"; let value: ListRunbooksRequest = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | -| `name` | *string* | :heavy_minus_sign: | A query to search runbooks by their name | -| `owners` | *string* | :heavy_minus_sign: | A query to search runbooks by their owners | -| `sort` | [operations.ListRunbooksQueryParamSort](../../models/operations/listrunbooksqueryparamsort.md) | :heavy_minus_sign: | Sort runbooks by their updated date. Accepts 'asc', 'desc' | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `name` | *string* | :heavy_minus_sign: | A query to search runbooks by their name | +| `owners` | *string* | :heavy_minus_sign: | A query to search runbooks by their owners | +| `sort` | [operations.ListRunbooksSort](../../models/operations/listrunbookssort.md) | :heavy_minus_sign: | Sort runbooks by their updated date. Accepts 'asc', 'desc'. This parameter is deprecated in favor of 'order_by' and 'order_direction'. | +| `orderBy` | [operations.OrderBy](../../models/operations/orderby.md) | :heavy_minus_sign: | Sort runbooks by their updated date or name. Accepts 'updated_at', 'name', and 'created_at'. | +| `orderDirection` | [operations.OrderDirection](../../models/operations/orderdirection.md) | :heavy_minus_sign: | Allows assigning a direction to how the specified `order_by` parameter is sorted. This parameter must be paired with `order_by` and does nothing on its own. | \ No newline at end of file diff --git a/docs/models/operations/listrunbookssort.md b/docs/models/operations/listrunbookssort.md new file mode 100644 index 00000000..dab71e23 --- /dev/null +++ b/docs/models/operations/listrunbookssort.md @@ -0,0 +1,17 @@ +# ListRunbooksSort + +Sort runbooks by their updated date. Accepts 'asc', 'desc'. This parameter is deprecated in favor of 'order_by' and 'order_direction'. + +## Example Usage + +```typescript +import { ListRunbooksSort } from "firehydrant/models/operations"; + +let value: ListRunbooksSort = "desc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/listsavedsearchesrequest.md b/docs/models/operations/listsavedsearchesrequest.md index 0dd0675b..0802d241 100644 --- a/docs/models/operations/listsavedsearchesrequest.md +++ b/docs/models/operations/listsavedsearchesrequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { ListSavedSearchesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListSavedSearchesRequest } from "firehydrant/models/operations"; let value: ListSavedSearchesRequest = { - resourceType: "incidents", + resourceType: "impact_analytics", }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `resourceType` | [operations.ResourceType](../../models/operations/resourcetype.md) | :heavy_check_mark: | N/A | -| `userId` | *string* | :heavy_minus_sign: | The user ID used to filter saved searches. | -| `query` | *string* | :heavy_minus_sign: | Filter saved searches with a query on their name | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `resourceType` | [operations.ListSavedSearchesResourceType](../../models/operations/listsavedsearchesresourcetype.md) | :heavy_check_mark: | N/A | +| `userId` | *string* | :heavy_minus_sign: | The user ID used to filter saved searches. | +| `query` | *string* | :heavy_minus_sign: | Filter saved searches with a query on their name | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listsavedsearchesresourcetype.md b/docs/models/operations/listsavedsearchesresourcetype.md new file mode 100644 index 00000000..b9b1ecb8 --- /dev/null +++ b/docs/models/operations/listsavedsearchesresourcetype.md @@ -0,0 +1,15 @@ +# ListSavedSearchesResourceType + +## Example Usage + +```typescript +import { ListSavedSearchesResourceType } from "firehydrant/models/operations"; + +let value: ListSavedSearchesResourceType = "alerts"; +``` + +## Values + +```typescript +"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" +``` \ No newline at end of file diff --git a/docs/models/operations/listscheduledmaintenancesrequest.md b/docs/models/operations/listscheduledmaintenancesrequest.md index 3dbe4679..f7be381e 100644 --- a/docs/models/operations/listscheduledmaintenancesrequest.md +++ b/docs/models/operations/listscheduledmaintenancesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListScheduledMaintenancesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListScheduledMaintenancesRequest } from "firehydrant/models/operations"; let value: ListScheduledMaintenancesRequest = {}; ``` diff --git a/docs/models/operations/listschedulesrequest.md b/docs/models/operations/listschedulesrequest.md index 4df62a8a..c53909c6 100644 --- a/docs/models/operations/listschedulesrequest.md +++ b/docs/models/operations/listschedulesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListSchedulesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListSchedulesRequest } from "firehydrant/models/operations"; let value: ListSchedulesRequest = {}; ``` diff --git a/docs/models/operations/listscimgroupsrequest.md b/docs/models/operations/listscimgroupsrequest.md new file mode 100644 index 00000000..59c8bc12 --- /dev/null +++ b/docs/models/operations/listscimgroupsrequest.md @@ -0,0 +1,17 @@ +# ListScimGroupsRequest + +## Example Usage + +```typescript +import { ListScimGroupsRequest } from "firehydrant/models/operations"; + +let value: ListScimGroupsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `startIndex` | *number* | :heavy_minus_sign: | N/A | +| `count` | *number* | :heavy_minus_sign: | N/A | +| `filter` | *string* | :heavy_minus_sign: | This is a string used to query groups by displayName.
Proper example syntax for this would be `?filter=displayName eq "My Team Name"`.
Currently we only support the `eq` operator | \ No newline at end of file diff --git a/docs/models/operations/listscimusersrequest.md b/docs/models/operations/listscimusersrequest.md new file mode 100644 index 00000000..756f9dda --- /dev/null +++ b/docs/models/operations/listscimusersrequest.md @@ -0,0 +1,17 @@ +# ListScimUsersRequest + +## Example Usage + +```typescript +import { ListScimUsersRequest } from "firehydrant/models/operations"; + +let value: ListScimUsersRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `filter` | *string* | :heavy_minus_sign: | This is a string used to query users by either userName or email.
Proper example syntax for this would be `?filter=userName eq john` or `?filter=userName eq "john@firehydrant.com"`.
Currently we only support the `eq` operator | +| `startIndex` | *number* | :heavy_minus_sign: | This is an integer which represents a pagination offset | +| `count` | *number* | :heavy_minus_sign: | This is an integer which represents the number of items per page in the response | \ No newline at end of file diff --git a/docs/models/operations/listserviceavailabledownstreamdependenciesrequest.md b/docs/models/operations/listserviceavailabledownstreamdependenciesrequest.md index 7c0373ec..eebea13b 100644 --- a/docs/models/operations/listserviceavailabledownstreamdependenciesrequest.md +++ b/docs/models/operations/listserviceavailabledownstreamdependenciesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListServiceAvailableDownstreamDependenciesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListServiceAvailableDownstreamDependenciesRequest } from "firehydrant/models/operations"; let value: ListServiceAvailableDownstreamDependenciesRequest = { serviceId: "", diff --git a/docs/models/operations/listserviceavailableupstreamdependenciesrequest.md b/docs/models/operations/listserviceavailableupstreamdependenciesrequest.md index 9ee7fcc0..f7c2edb1 100644 --- a/docs/models/operations/listserviceavailableupstreamdependenciesrequest.md +++ b/docs/models/operations/listserviceavailableupstreamdependenciesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListServiceAvailableUpstreamDependenciesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListServiceAvailableUpstreamDependenciesRequest } from "firehydrant/models/operations"; let value: ListServiceAvailableUpstreamDependenciesRequest = { serviceId: "", diff --git a/docs/models/operations/listservicesrequest.md b/docs/models/operations/listservicesrequest.md index a7c4bf9a..ff469c42 100644 --- a/docs/models/operations/listservicesrequest.md +++ b/docs/models/operations/listservicesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListServicesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListServicesRequest } from "firehydrant/models/operations"; let value: ListServicesRequest = {}; ``` diff --git a/docs/models/operations/listseveritiesrequest.md b/docs/models/operations/listseveritiesrequest.md index 3cb9b42c..95d2b4c7 100644 --- a/docs/models/operations/listseveritiesrequest.md +++ b/docs/models/operations/listseveritiesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListSeveritiesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListSeveritiesRequest } from "firehydrant/models/operations"; let value: ListSeveritiesRequest = {}; ``` diff --git a/docs/models/operations/listseveritymatrixconditionsrequest.md b/docs/models/operations/listseveritymatrixconditionsrequest.md index 79129e29..d7998f95 100644 --- a/docs/models/operations/listseveritymatrixconditionsrequest.md +++ b/docs/models/operations/listseveritymatrixconditionsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListSeverityMatrixConditionsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListSeverityMatrixConditionsRequest } from "firehydrant/models/operations"; let value: ListSeverityMatrixConditionsRequest = {}; ``` diff --git a/docs/models/operations/listseveritymatriximpactsrequest.md b/docs/models/operations/listseveritymatriximpactsrequest.md index 90602731..aef0d0ed 100644 --- a/docs/models/operations/listseveritymatriximpactsrequest.md +++ b/docs/models/operations/listseveritymatriximpactsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListSeverityMatrixImpactsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListSeverityMatrixImpactsRequest } from "firehydrant/models/operations"; let value: ListSeverityMatrixImpactsRequest = {}; ``` diff --git a/docs/models/operations/listsignalemailtargetsrequest.md b/docs/models/operations/listsignalemailtargetsrequest.md deleted file mode 100644 index e138c849..00000000 --- a/docs/models/operations/listsignalemailtargetsrequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListSignalEmailTargetsRequest - -## Example Usage - -```typescript -import { ListSignalEmailTargetsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListSignalEmailTargetsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `query` | *string* | :heavy_minus_sign: | A query string to search the list of targets by. | \ No newline at end of file diff --git a/docs/models/operations/listsignaleventsourcesrequest.md b/docs/models/operations/listsignaleventsourcesrequest.md deleted file mode 100644 index 80752b72..00000000 --- a/docs/models/operations/listsignaleventsourcesrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# ListSignalEventSourcesRequest - -## Example Usage - -```typescript -import { ListSignalEventSourcesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListSignalEventSourcesRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_minus_sign: | Team ID to send signals to directly | -| `escalationPolicyId` | *string* | :heavy_minus_sign: | Escalation policy ID to send signals to directly. `team_id` is required if this is provided. | -| `onCallScheduleId` | *string* | :heavy_minus_sign: | On-call schedule ID to send signals to directly. `team_id` is required if this is provided. | -| `userId` | *string* | :heavy_minus_sign: | User ID to send signals to directly | \ No newline at end of file diff --git a/docs/models/operations/listsignalsemailtargetsrequest.md b/docs/models/operations/listsignalsemailtargetsrequest.md new file mode 100644 index 00000000..ebc6bdb0 --- /dev/null +++ b/docs/models/operations/listsignalsemailtargetsrequest.md @@ -0,0 +1,15 @@ +# ListSignalsEmailTargetsRequest + +## Example Usage + +```typescript +import { ListSignalsEmailTargetsRequest } from "firehydrant/models/operations"; + +let value: ListSignalsEmailTargetsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `query` | *string* | :heavy_minus_sign: | A query string to search the list of targets by. | \ No newline at end of file diff --git a/docs/models/operations/listsignalseventsourcesrequest.md b/docs/models/operations/listsignalseventsourcesrequest.md new file mode 100644 index 00000000..fe8bf335 --- /dev/null +++ b/docs/models/operations/listsignalseventsourcesrequest.md @@ -0,0 +1,18 @@ +# ListSignalsEventSourcesRequest + +## Example Usage + +```typescript +import { ListSignalsEventSourcesRequest } from "firehydrant/models/operations"; + +let value: ListSignalsEventSourcesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_minus_sign: | Team ID to send signals to directly | +| `escalationPolicyId` | *string* | :heavy_minus_sign: | Escalation policy ID to send signals to directly. `team_id` is required if this is provided. | +| `onCallScheduleId` | *string* | :heavy_minus_sign: | On-call schedule ID to send signals to directly. `team_id` is required if this is provided. | +| `userId` | *string* | :heavy_minus_sign: | User ID to send signals to directly | \ No newline at end of file diff --git a/docs/models/operations/listsignalsoncallrequest.md b/docs/models/operations/listsignalsoncallrequest.md deleted file mode 100644 index 7d517db8..00000000 --- a/docs/models/operations/listsignalsoncallrequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListSignalsOnCallRequest - -## Example Usage - -```typescript -import { ListSignalsOnCallRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListSignalsOnCallRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_minus_sign: | An optional comma separated list of team IDs to filter currently on-call users by | \ No newline at end of file diff --git a/docs/models/operations/listsignalswebhooktargetsrequest.md b/docs/models/operations/listsignalswebhooktargetsrequest.md new file mode 100644 index 00000000..e5d909fd --- /dev/null +++ b/docs/models/operations/listsignalswebhooktargetsrequest.md @@ -0,0 +1,17 @@ +# ListSignalsWebhookTargetsRequest + +## Example Usage + +```typescript +import { ListSignalsWebhookTargetsRequest } from "firehydrant/models/operations"; + +let value: ListSignalsWebhookTargetsRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `query` | *string* | :heavy_minus_sign: | A query string for searching through the list of webhook targets. | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listsignalwebhooktargetsrequest.md b/docs/models/operations/listsignalwebhooktargetsrequest.md deleted file mode 100644 index 6bcbf4b2..00000000 --- a/docs/models/operations/listsignalwebhooktargetsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ListSignalWebhookTargetsRequest - -## Example Usage - -```typescript -import { ListSignalWebhookTargetsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListSignalWebhookTargetsRequest = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `query` | *string* | :heavy_minus_sign: | A query string for searching through the list of webhook targets. | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listsimilarincidentsrequest.md b/docs/models/operations/listsimilarincidentsrequest.md new file mode 100644 index 00000000..472c3ea6 --- /dev/null +++ b/docs/models/operations/listsimilarincidentsrequest.md @@ -0,0 +1,19 @@ +# ListSimilarIncidentsRequest + +## Example Usage + +```typescript +import { ListSimilarIncidentsRequest } from "firehydrant/models/operations"; + +let value: ListSimilarIncidentsRequest = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `threshold` | *number* | :heavy_minus_sign: | N/A | +| `limit` | *number* | :heavy_minus_sign: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listslackemojiactionsrequest.md b/docs/models/operations/listslackemojiactionsrequest.md index 329076e3..71d2cc25 100644 --- a/docs/models/operations/listslackemojiactionsrequest.md +++ b/docs/models/operations/listslackemojiactionsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListSlackEmojiActionsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListSlackEmojiActionsRequest } from "firehydrant/models/operations"; let value: ListSlackEmojiActionsRequest = { connectionId: "", diff --git a/docs/models/operations/listslackworkspacesrequest.md b/docs/models/operations/listslackworkspacesrequest.md new file mode 100644 index 00000000..ef372a7a --- /dev/null +++ b/docs/models/operations/listslackworkspacesrequest.md @@ -0,0 +1,17 @@ +# ListSlackWorkspacesRequest + +## Example Usage + +```typescript +import { ListSlackWorkspacesRequest } from "firehydrant/models/operations"; + +let value: ListSlackWorkspacesRequest = { + connectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connectionId` | *string* | :heavy_check_mark: | Connection UUID | \ No newline at end of file diff --git a/docs/models/operations/liststatuspageconnectionpagesrequest.md b/docs/models/operations/liststatuspageconnectionpagesrequest.md new file mode 100644 index 00000000..fd7dd865 --- /dev/null +++ b/docs/models/operations/liststatuspageconnectionpagesrequest.md @@ -0,0 +1,17 @@ +# ListStatuspageConnectionPagesRequest + +## Example Usage + +```typescript +import { ListStatuspageConnectionPagesRequest } from "firehydrant/models/operations"; + +let value: ListStatuspageConnectionPagesRequest = { + connectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connectionId` | *string* | :heavy_check_mark: | Connection UUID | \ No newline at end of file diff --git a/docs/models/operations/liststatuspageconnectionsrequest.md b/docs/models/operations/liststatuspageconnectionsrequest.md index 25585cf5..1cf6223f 100644 --- a/docs/models/operations/liststatuspageconnectionsrequest.md +++ b/docs/models/operations/liststatuspageconnectionsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListStatuspageConnectionsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListStatuspageConnectionsRequest } from "firehydrant/models/operations"; let value: ListStatuspageConnectionsRequest = {}; ``` diff --git a/docs/models/operations/liststatuspagepagesrequest.md b/docs/models/operations/liststatuspagepagesrequest.md deleted file mode 100644 index 9f7bb66a..00000000 --- a/docs/models/operations/liststatuspagepagesrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ListStatuspagePagesRequest - -## Example Usage - -```typescript -import { ListStatuspagePagesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListStatuspagePagesRequest = { - connectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `connectionId` | *string* | :heavy_check_mark: | Connection UUID | \ No newline at end of file diff --git a/docs/models/operations/liststatuspagesubscribersrequest.md b/docs/models/operations/liststatuspagesubscribersrequest.md deleted file mode 100644 index 8d2c3ac6..00000000 --- a/docs/models/operations/liststatuspagesubscribersrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# ListStatusPageSubscribersRequest - -## Example Usage - -```typescript -import { ListStatusPageSubscribersRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListStatusPageSubscribersRequest = { - nuncConnectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/liststatusupdatetemplatesrequest.md b/docs/models/operations/liststatusupdatetemplatesrequest.md index f3300a8f..f33cb7a1 100644 --- a/docs/models/operations/liststatusupdatetemplatesrequest.md +++ b/docs/models/operations/liststatusupdatetemplatesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListStatusUpdateTemplatesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListStatusUpdateTemplatesRequest } from "firehydrant/models/operations"; let value: ListStatusUpdateTemplatesRequest = {}; ``` diff --git a/docs/models/operations/listtasklistsrequest.md b/docs/models/operations/listtasklistsrequest.md index 3c49f3ff..58c90224 100644 --- a/docs/models/operations/listtasklistsrequest.md +++ b/docs/models/operations/listtasklistsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListTaskListsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTaskListsRequest } from "firehydrant/models/operations"; let value: ListTaskListsRequest = {}; ``` diff --git a/docs/models/operations/listteamescalationpoliciesrequest.md b/docs/models/operations/listteamescalationpoliciesrequest.md index 2d9ba031..9d0289c8 100644 --- a/docs/models/operations/listteamescalationpoliciesrequest.md +++ b/docs/models/operations/listteamescalationpoliciesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListTeamEscalationPoliciesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTeamEscalationPoliciesRequest } from "firehydrant/models/operations"; let value: ListTeamEscalationPoliciesRequest = { teamId: "", diff --git a/docs/models/operations/listteamoncallschedulesrequest.md b/docs/models/operations/listteamoncallschedulesrequest.md index 8d39b6d7..76993fd2 100644 --- a/docs/models/operations/listteamoncallschedulesrequest.md +++ b/docs/models/operations/listteamoncallschedulesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListTeamOnCallSchedulesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTeamOnCallSchedulesRequest } from "firehydrant/models/operations"; let value: ListTeamOnCallSchedulesRequest = { teamId: "", diff --git a/docs/models/operations/listteamsignalrulesrequest.md b/docs/models/operations/listteamsignalrulesrequest.md index 6fbdb32c..e915fa1b 100644 --- a/docs/models/operations/listteamsignalrulesrequest.md +++ b/docs/models/operations/listteamsignalrulesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListTeamSignalRulesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTeamSignalRulesRequest } from "firehydrant/models/operations"; let value: ListTeamSignalRulesRequest = { teamId: "", diff --git a/docs/models/operations/listteamsrequest.md b/docs/models/operations/listteamsrequest.md index bb288e73..97655d93 100644 --- a/docs/models/operations/listteamsrequest.md +++ b/docs/models/operations/listteamsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListTeamsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTeamsRequest } from "firehydrant/models/operations"; let value: ListTeamsRequest = {}; ``` diff --git a/docs/models/operations/listticketingprojectsrequest.md b/docs/models/operations/listticketingprojectsrequest.md index 92934ba5..13d60025 100644 --- a/docs/models/operations/listticketingprojectsrequest.md +++ b/docs/models/operations/listticketingprojectsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListTicketingProjectsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTicketingProjectsRequest } from "firehydrant/models/operations"; let value: ListTicketingProjectsRequest = {}; ``` diff --git a/docs/models/operations/listticketsqueryparamtagmatchstrategy.md b/docs/models/operations/listticketsqueryparamtagmatchstrategy.md deleted file mode 100644 index 42581899..00000000 --- a/docs/models/operations/listticketsqueryparamtagmatchstrategy.md +++ /dev/null @@ -1,17 +0,0 @@ -# ListTicketsQueryParamTagMatchStrategy - -A matching strategy for the tags provided - -## Example Usage - -```typescript -import { ListTicketsQueryParamTagMatchStrategy } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListTicketsQueryParamTagMatchStrategy = "exclude"; -``` - -## Values - -```typescript -"any" | "match_all" | "exclude" -``` \ No newline at end of file diff --git a/docs/models/operations/listticketsrequest.md b/docs/models/operations/listticketsrequest.md index cbc7143e..f300571e 100644 --- a/docs/models/operations/listticketsrequest.md +++ b/docs/models/operations/listticketsrequest.md @@ -3,18 +3,18 @@ ## Example Usage ```typescript -import { ListTicketsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTicketsRequest } from "firehydrant/models/operations"; let value: ListTicketsRequest = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | -| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | -| `tagMatchStrategy` | [operations.ListTicketsQueryParamTagMatchStrategy](../../models/operations/listticketsqueryparamtagmatchstrategy.md) | :heavy_minus_sign: | A matching strategy for the tags provided | -| `assignedUser` | *string* | :heavy_minus_sign: | Filter tickets assigned to this user id | -| `state` | [operations.State](../../models/operations/state.md) | :heavy_minus_sign: | Filter tickets by state | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | +| `tags` | *string* | :heavy_minus_sign: | A comma separated list of tags | +| `tagMatchStrategy` | [operations.ListTicketsTagMatchStrategy](../../models/operations/listticketstagmatchstrategy.md) | :heavy_minus_sign: | A matching strategy for the tags provided | +| `assignedUser` | *string* | :heavy_minus_sign: | Filter tickets assigned to this user id | +| `state` | [operations.State](../../models/operations/state.md) | :heavy_minus_sign: | Filter tickets by state | \ No newline at end of file diff --git a/docs/models/operations/listticketstagmatchstrategy.md b/docs/models/operations/listticketstagmatchstrategy.md new file mode 100644 index 00000000..a972dc01 --- /dev/null +++ b/docs/models/operations/listticketstagmatchstrategy.md @@ -0,0 +1,17 @@ +# ListTicketsTagMatchStrategy + +A matching strategy for the tags provided + +## Example Usage + +```typescript +import { ListTicketsTagMatchStrategy } from "firehydrant/models/operations"; + +let value: ListTicketsTagMatchStrategy = "any"; +``` + +## Values + +```typescript +"any" | "match_all" | "exclude" +``` \ No newline at end of file diff --git a/docs/models/operations/listtickettagsrequest.md b/docs/models/operations/listtickettagsrequest.md index c937a8c2..a90438b8 100644 --- a/docs/models/operations/listtickettagsrequest.md +++ b/docs/models/operations/listtickettagsrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListTicketTagsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListTicketTagsRequest } from "firehydrant/models/operations"; let value: ListTicketTagsRequest = {}; ``` diff --git a/docs/models/operations/listtranscriptentriesrequest.md b/docs/models/operations/listtranscriptentriesrequest.md new file mode 100644 index 00000000..0df4b527 --- /dev/null +++ b/docs/models/operations/listtranscriptentriesrequest.md @@ -0,0 +1,20 @@ +# ListTranscriptEntriesRequest + +## Example Usage + +```typescript +import { ListTranscriptEntriesRequest } from "firehydrant/models/operations"; + +let value: ListTranscriptEntriesRequest = { + incidentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `after` | *string* | :heavy_minus_sign: | The ID of the transcript entry to start after. | +| `before` | *string* | :heavy_minus_sign: | The ID of the transcript entry to start before. | +| `sort` | [operations.ListTranscriptEntriesSort](../../models/operations/listtranscriptentriessort.md) | :heavy_minus_sign: | The order to sort the transcript entries. | +| `incidentId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listtranscriptentriessort.md b/docs/models/operations/listtranscriptentriessort.md new file mode 100644 index 00000000..570f52d8 --- /dev/null +++ b/docs/models/operations/listtranscriptentriessort.md @@ -0,0 +1,17 @@ +# ListTranscriptEntriesSort + +The order to sort the transcript entries. + +## Example Usage + +```typescript +import { ListTranscriptEntriesSort } from "firehydrant/models/operations"; + +let value: ListTranscriptEntriesSort = "asc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/listuserinvolvementmetricsrequest.md b/docs/models/operations/listuserinvolvementmetricsrequest.md index fd35f8d6..1db5cab3 100644 --- a/docs/models/operations/listuserinvolvementmetricsrequest.md +++ b/docs/models/operations/listuserinvolvementmetricsrequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { ListUserInvolvementMetricsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListUserInvolvementMetricsRequest } from "firehydrant/models/operations"; let value: ListUserInvolvementMetricsRequest = {}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from | -| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from | -| `bucketSize` | *string* | :heavy_minus_sign: | N/A | -| `by` | *string* | :heavy_minus_sign: | N/A | -| `sortField` | [operations.QueryParamSortField](../../models/operations/queryparamsortfield.md) | :heavy_minus_sign: | N/A | -| `sortDirection` | [operations.QueryParamSortDirection](../../models/operations/queryparamsortdirection.md) | :heavy_minus_sign: | N/A | -| `sortLimit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `startDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The start date to return metrics from | +| `endDate` | [RFCDate](../../types/rfcdate.md) | :heavy_minus_sign: | The end date to return metrics from | +| `bucketSize` | *string* | :heavy_minus_sign: | N/A | +| `by` | *string* | :heavy_minus_sign: | N/A | +| `sortField` | [operations.ListUserInvolvementMetricsSortField](../../models/operations/listuserinvolvementmetricssortfield.md) | :heavy_minus_sign: | N/A | +| `sortDirection` | [operations.ListUserInvolvementMetricsSortDirection](../../models/operations/listuserinvolvementmetricssortdirection.md) | :heavy_minus_sign: | N/A | +| `sortLimit` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listuserinvolvementmetricssortdirection.md b/docs/models/operations/listuserinvolvementmetricssortdirection.md new file mode 100644 index 00000000..76e28998 --- /dev/null +++ b/docs/models/operations/listuserinvolvementmetricssortdirection.md @@ -0,0 +1,15 @@ +# ListUserInvolvementMetricsSortDirection + +## Example Usage + +```typescript +import { ListUserInvolvementMetricsSortDirection } from "firehydrant/models/operations"; + +let value: ListUserInvolvementMetricsSortDirection = "desc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/listuserinvolvementmetricssortfield.md b/docs/models/operations/listuserinvolvementmetricssortfield.md new file mode 100644 index 00000000..49be328b --- /dev/null +++ b/docs/models/operations/listuserinvolvementmetricssortfield.md @@ -0,0 +1,15 @@ +# ListUserInvolvementMetricsSortField + +## Example Usage + +```typescript +import { ListUserInvolvementMetricsSortField } from "firehydrant/models/operations"; + +let value: ListUserInvolvementMetricsSortField = "incident_count"; +``` + +## Values + +```typescript +"user_count" | "incident_count" | "time_spent" +``` \ No newline at end of file diff --git a/docs/models/operations/listuserownedservicesrequest.md b/docs/models/operations/listuserownedservicesrequest.md new file mode 100644 index 00000000..e654fe74 --- /dev/null +++ b/docs/models/operations/listuserownedservicesrequest.md @@ -0,0 +1,19 @@ +# ListUserOwnedServicesRequest + +## Example Usage + +```typescript +import { ListUserOwnedServicesRequest } from "firehydrant/models/operations"; + +let value: ListUserOwnedServicesRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listuserservicesrequest.md b/docs/models/operations/listuserservicesrequest.md deleted file mode 100644 index e0f6bae0..00000000 --- a/docs/models/operations/listuserservicesrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListUserServicesRequest - -## Example Usage - -```typescript -import { ListUserServicesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ListUserServicesRequest = { - id: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `page` | *number* | :heavy_minus_sign: | N/A | -| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/listusersrequest.md b/docs/models/operations/listusersrequest.md index 7ba890d8..219c29cf 100644 --- a/docs/models/operations/listusersrequest.md +++ b/docs/models/operations/listusersrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListUsersRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListUsersRequest } from "firehydrant/models/operations"; let value: ListUsersRequest = {}; ``` diff --git a/docs/models/operations/listwebhookdeliveriesrequest.md b/docs/models/operations/listwebhookdeliveriesrequest.md index e6b90099..b940afe5 100644 --- a/docs/models/operations/listwebhookdeliveriesrequest.md +++ b/docs/models/operations/listwebhookdeliveriesrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListWebhookDeliveriesRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListWebhookDeliveriesRequest } from "firehydrant/models/operations"; let value: ListWebhookDeliveriesRequest = { webhookId: "", diff --git a/docs/models/operations/listwebhooksrequest.md b/docs/models/operations/listwebhooksrequest.md index 6d6622cb..bbd91181 100644 --- a/docs/models/operations/listwebhooksrequest.md +++ b/docs/models/operations/listwebhooksrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ListWebhooksRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ListWebhooksRequest } from "firehydrant/models/operations"; let value: ListWebhooksRequest = {}; ``` diff --git a/docs/models/operations/oflevel.md b/docs/models/operations/oflevel.md index c2460952..6d903405 100644 --- a/docs/models/operations/oflevel.md +++ b/docs/models/operations/oflevel.md @@ -5,9 +5,9 @@ Returns logs of all levels equal to or above the provided level ## Example Usage ```typescript -import { OfLevel } from "firehydrant-typescript-sdk/models/operations"; +import { OfLevel } from "firehydrant/models/operations"; -let value: OfLevel = "debug"; +let value: OfLevel = "unknown"; ``` ## Values diff --git a/docs/models/operations/orderby.md b/docs/models/operations/orderby.md new file mode 100644 index 00000000..eb841d51 --- /dev/null +++ b/docs/models/operations/orderby.md @@ -0,0 +1,17 @@ +# OrderBy + +Sort runbooks by their updated date or name. Accepts 'updated_at', 'name', and 'created_at'. + +## Example Usage + +```typescript +import { OrderBy } from "firehydrant/models/operations"; + +let value: OrderBy = "name"; +``` + +## Values + +```typescript +"updated_at" | "name" | "created_at" +``` \ No newline at end of file diff --git a/docs/models/operations/orderdirection.md b/docs/models/operations/orderdirection.md new file mode 100644 index 00000000..ca02ddeb --- /dev/null +++ b/docs/models/operations/orderdirection.md @@ -0,0 +1,17 @@ +# OrderDirection + +Allows assigning a direction to how the specified `order_by` parameter is sorted. This parameter must be paired with `order_by` and does nothing on its own. + +## Example Usage + +```typescript +import { OrderDirection } from "firehydrant/models/operations"; + +let value: OrderDirection = "asc"; +``` + +## Values + +```typescript +"asc" | "desc" +``` \ No newline at end of file diff --git a/docs/models/operations/partialupdateincidentimpactsrequest.md b/docs/models/operations/partialupdateincidentimpactsrequest.md deleted file mode 100644 index 6c195eeb..00000000 --- a/docs/models/operations/partialupdateincidentimpactsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# PartialUpdateIncidentImpactsRequest - -## Example Usage - -```typescript -import { PartialUpdateIncidentImpactsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: PartialUpdateIncidentImpactsRequest = { - incidentId: "", - patchV1IncidentsIncidentIdImpact: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentIdImpact` | [components.PatchV1IncidentsIncidentIdImpact](../../models/components/patchv1incidentsincidentidimpact.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/patchscimuserrequest.md b/docs/models/operations/patchscimuserrequest.md new file mode 100644 index 00000000..14bb604a --- /dev/null +++ b/docs/models/operations/patchscimuserrequest.md @@ -0,0 +1,26 @@ +# PatchScimUserRequest + +## Example Usage + +```typescript +import { PatchScimUserRequest } from "firehydrant/models/operations"; + +let value: PatchScimUserRequest = { + id: "", + patchScimUser: { + operations: [ + { + op: "", + path: "/opt/sbin", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `patchScimUser` | [components.PatchScimUser](../../models/components/patchscimuser.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/pathparaminfratype.md b/docs/models/operations/pathparaminfratype.md deleted file mode 100644 index ed51848b..00000000 --- a/docs/models/operations/pathparaminfratype.md +++ /dev/null @@ -1,15 +0,0 @@ -# PathParamInfraType - -## Example Usage - -```typescript -import { PathParamInfraType } from "firehydrant-typescript-sdk/models/operations"; - -let value: PathParamInfraType = "environments"; -``` - -## Values - -```typescript -"environments" | "functionalities" | "services" | "customers" -``` \ No newline at end of file diff --git a/docs/models/operations/pathparamresourcetype.md b/docs/models/operations/pathparamresourcetype.md deleted file mode 100644 index 2f19ce4f..00000000 --- a/docs/models/operations/pathparamresourcetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# PathParamResourceType - -## Example Usage - -```typescript -import { PathParamResourceType } from "firehydrant-typescript-sdk/models/operations"; - -let value: PathParamResourceType = "incident_events"; -``` - -## Values - -```typescript -"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" -``` \ No newline at end of file diff --git a/docs/models/operations/pathparamtype.md b/docs/models/operations/pathparamtype.md deleted file mode 100644 index a2f69da7..00000000 --- a/docs/models/operations/pathparamtype.md +++ /dev/null @@ -1,15 +0,0 @@ -# PathParamType - -## Example Usage - -```typescript -import { PathParamType } from "firehydrant-typescript-sdk/models/operations"; - -let value: PathParamType = "services"; -``` - -## Values - -```typescript -"environments" | "functionalities" | "services" | "customers" -``` \ No newline at end of file diff --git a/docs/models/operations/publishpostmortemreportrequest.md b/docs/models/operations/publishpostmortemreportrequest.md new file mode 100644 index 00000000..45479eb6 --- /dev/null +++ b/docs/models/operations/publishpostmortemreportrequest.md @@ -0,0 +1,19 @@ +# PublishPostMortemReportRequest + +## Example Usage + +```typescript +import { PublishPostMortemReportRequest } from "firehydrant/models/operations"; + +let value: PublishPostMortemReportRequest = { + reportId: "", + publishPostMortemReport: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `publishPostMortemReport` | [components.PublishPostMortemReport](../../models/components/publishpostmortemreport.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/publishretrospectivereportrequest.md b/docs/models/operations/publishretrospectivereportrequest.md deleted file mode 100644 index 43a44648..00000000 --- a/docs/models/operations/publishretrospectivereportrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# PublishRetrospectiveReportRequest - -## Example Usage - -```typescript -import { PublishRetrospectiveReportRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: PublishRetrospectiveReportRequest = { - reportId: "", - postV1PostMortemsReportsReportIdPublish: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `postV1PostMortemsReportsReportIdPublish` | [components.PostV1PostMortemsReportsReportIdPublish](../../models/components/postv1postmortemsreportsreportidpublish.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/queryparamgroupby.md b/docs/models/operations/queryparamgroupby.md deleted file mode 100644 index bd482e98..00000000 --- a/docs/models/operations/queryparamgroupby.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryParamGroupBy - -String that determines how records are grouped - -## Example Usage - -```typescript -import { QueryParamGroupBy } from "firehydrant-typescript-sdk/models/operations"; - -let value: QueryParamGroupBy = "teams"; -``` - -## Values - -```typescript -"signal_rules" | "teams" | "services" | "environments" | "tags" -``` \ No newline at end of file diff --git a/docs/models/operations/queryparamsort.md b/docs/models/operations/queryparamsort.md deleted file mode 100644 index db87594b..00000000 --- a/docs/models/operations/queryparamsort.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryParamSort - -The order to sort the transcript entries. - -## Example Usage - -```typescript -import { QueryParamSort } from "firehydrant-typescript-sdk/models/operations"; - -let value: QueryParamSort = "desc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/queryparamsortby.md b/docs/models/operations/queryparamsortby.md deleted file mode 100644 index 3d8303f9..00000000 --- a/docs/models/operations/queryparamsortby.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryParamSortBy - -String that determines how records are sorted - -## Example Usage - -```typescript -import { QueryParamSortBy } from "firehydrant-typescript-sdk/models/operations"; - -let value: QueryParamSortBy = "incidents_percentage"; -``` - -## Values - -```typescript -"total_opened_alerts" | "total_acked_alerts" | "total_incidents" | "acked_percentage" | "incidents_percentage" -``` \ No newline at end of file diff --git a/docs/models/operations/queryparamsortdirection.md b/docs/models/operations/queryparamsortdirection.md deleted file mode 100644 index c6e6129c..00000000 --- a/docs/models/operations/queryparamsortdirection.md +++ /dev/null @@ -1,15 +0,0 @@ -# QueryParamSortDirection - -## Example Usage - -```typescript -import { QueryParamSortDirection } from "firehydrant-typescript-sdk/models/operations"; - -let value: QueryParamSortDirection = "desc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/queryparamsortfield.md b/docs/models/operations/queryparamsortfield.md deleted file mode 100644 index 30ec962e..00000000 --- a/docs/models/operations/queryparamsortfield.md +++ /dev/null @@ -1,15 +0,0 @@ -# QueryParamSortField - -## Example Usage - -```typescript -import { QueryParamSortField } from "firehydrant-typescript-sdk/models/operations"; - -let value: QueryParamSortField = "time_spent"; -``` - -## Values - -```typescript -"user_count" | "incident_count" | "time_spent" -``` \ No newline at end of file diff --git a/docs/models/operations/queryparamtagmatchstrategy.md b/docs/models/operations/queryparamtagmatchstrategy.md deleted file mode 100644 index 038a9629..00000000 --- a/docs/models/operations/queryparamtagmatchstrategy.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryParamTagMatchStrategy - -A matching strategy for the tags provided - -## Example Usage - -```typescript -import { QueryParamTagMatchStrategy } from "firehydrant-typescript-sdk/models/operations"; - -let value: QueryParamTagMatchStrategy = "match_all"; -``` - -## Values - -```typescript -"any" | "match_all" | "exclude" -``` \ No newline at end of file diff --git a/docs/models/operations/queryparamtype.md b/docs/models/operations/queryparamtype.md deleted file mode 100644 index 24af6e50..00000000 --- a/docs/models/operations/queryparamtype.md +++ /dev/null @@ -1,17 +0,0 @@ -# QueryParamType - -The type of the relation to the incident - -## Example Usage - -```typescript -import { QueryParamType } from "firehydrant-typescript-sdk/models/operations"; - -let value: QueryParamType = "fixed"; -``` - -## Values - -```typescript -"caused" | "fixed" | "suspect" | "dismissed" -``` \ No newline at end of file diff --git a/docs/models/operations/refreshcatalogrequest.md b/docs/models/operations/refreshcatalogrequest.md index 91467cec..c14ff859 100644 --- a/docs/models/operations/refreshcatalogrequest.md +++ b/docs/models/operations/refreshcatalogrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { RefreshCatalogRequest } from "firehydrant-typescript-sdk/models/operations"; +import { RefreshCatalogRequest } from "firehydrant/models/operations"; let value: RefreshCatalogRequest = { catalogId: "", diff --git a/docs/models/operations/refreshconnectionrequest.md b/docs/models/operations/refreshconnectionrequest.md new file mode 100644 index 00000000..cfb48dd3 --- /dev/null +++ b/docs/models/operations/refreshconnectionrequest.md @@ -0,0 +1,19 @@ +# RefreshConnectionRequest + +## Example Usage + +```typescript +import { RefreshConnectionRequest } from "firehydrant/models/operations"; + +let value: RefreshConnectionRequest = { + slug: "", + connectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `connectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/refreshintegrationconnectionrequest.md b/docs/models/operations/refreshintegrationconnectionrequest.md deleted file mode 100644 index c058fc6b..00000000 --- a/docs/models/operations/refreshintegrationconnectionrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# RefreshIntegrationConnectionRequest - -## Example Usage - -```typescript -import { RefreshIntegrationConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: RefreshIntegrationConnectionRequest = { - slug: "", - connectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `slug` | *string* | :heavy_check_mark: | N/A | -| `connectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/reorderpostmortemreasonsrequest.md b/docs/models/operations/reorderpostmortemreasonsrequest.md new file mode 100644 index 00000000..a9fb4a42 --- /dev/null +++ b/docs/models/operations/reorderpostmortemreasonsrequest.md @@ -0,0 +1,22 @@ +# ReorderPostMortemReasonsRequest + +## Example Usage + +```typescript +import { ReorderPostMortemReasonsRequest } from "firehydrant/models/operations"; + +let value: ReorderPostMortemReasonsRequest = { + reportId: "", + reorderPostMortemReasons: { + oldPosition: 934086, + newPosition: 666715, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `reorderPostMortemReasons` | [components.ReorderPostMortemReasons](../../models/components/reorderpostmortemreasons.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/replacescimuserrequest.md b/docs/models/operations/replacescimuserrequest.md deleted file mode 100644 index a2261eab..00000000 --- a/docs/models/operations/replacescimuserrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# ReplaceScimUserRequest - -## Example Usage - -```typescript -import { ReplaceScimUserRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: ReplaceScimUserRequest = { - id: "", - putV1ScimV2UsersId: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `putV1ScimV2UsersId` | [components.PutV1ScimV2UsersId](../../models/components/putv1scimv2usersid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/resolveincidentrequest.md b/docs/models/operations/resolveincidentrequest.md index 229bd284..57743849 100644 --- a/docs/models/operations/resolveincidentrequest.md +++ b/docs/models/operations/resolveincidentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ResolveIncidentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { ResolveIncidentRequest } from "firehydrant/models/operations"; let value: ResolveIncidentRequest = { incidentId: "", diff --git a/docs/models/operations/resolveincidentrequestbody.md b/docs/models/operations/resolveincidentrequestbody.md index 13cd90ca..beca668a 100644 --- a/docs/models/operations/resolveincidentrequestbody.md +++ b/docs/models/operations/resolveincidentrequestbody.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { ResolveIncidentRequestBody } from "firehydrant-typescript-sdk/models/operations"; +import { ResolveIncidentRequestBody } from "firehydrant/models/operations"; let value: ResolveIncidentRequestBody = {}; ``` diff --git a/docs/models/operations/resourcetype.md b/docs/models/operations/resourcetype.md deleted file mode 100644 index c28a9c4b..00000000 --- a/docs/models/operations/resourcetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# ResourceType - -## Example Usage - -```typescript -import { ResourceType } from "firehydrant-typescript-sdk/models/operations"; - -let value: ResourceType = "impact_analytics"; -``` - -## Values - -```typescript -"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" -``` \ No newline at end of file diff --git a/docs/models/operations/restoreaudiencerequest.md b/docs/models/operations/restoreaudiencerequest.md new file mode 100644 index 00000000..c0bc956c --- /dev/null +++ b/docs/models/operations/restoreaudiencerequest.md @@ -0,0 +1,17 @@ +# RestoreAudienceRequest + +## Example Usage + +```typescript +import { RestoreAudienceRequest } from "firehydrant/models/operations"; + +let value: RestoreAudienceRequest = { + audienceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `audienceId` | *string* | :heavy_check_mark: | Unique identifier of the audience | \ No newline at end of file diff --git a/docs/models/operations/searchconfluencespacesrequest.md b/docs/models/operations/searchconfluencespacesrequest.md new file mode 100644 index 00000000..a067463d --- /dev/null +++ b/docs/models/operations/searchconfluencespacesrequest.md @@ -0,0 +1,18 @@ +# SearchConfluenceSpacesRequest + +## Example Usage + +```typescript +import { SearchConfluenceSpacesRequest } from "firehydrant/models/operations"; + +let value: SearchConfluenceSpacesRequest = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `keyword` | *string* | :heavy_minus_sign: | Space Key | \ No newline at end of file diff --git a/docs/models/operations/searchzendeskticketsrequest.md b/docs/models/operations/searchzendeskticketsrequest.md index 0a3f6a5c..4a0a0056 100644 --- a/docs/models/operations/searchzendeskticketsrequest.md +++ b/docs/models/operations/searchzendeskticketsrequest.md @@ -3,16 +3,19 @@ ## Example Usage ```typescript -import { SearchZendeskTicketsRequest } from "firehydrant-typescript-sdk/models/operations"; +import { SearchZendeskTicketsRequest } from "firehydrant/models/operations"; let value: SearchZendeskTicketsRequest = { - ticketId: "", + connectionId: "", + query: "", }; ``` ## Fields -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `ticketId` | *string* | :heavy_check_mark: | Zendesk ticket ID | -| `include` | *string* | :heavy_minus_sign: | Use to include attached_incidents | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connectionId` | *string* | :heavy_check_mark: | N/A | +| `query` | *string* | :heavy_check_mark: | N/A | +| `page` | *number* | :heavy_minus_sign: | N/A | +| `perPage` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/sectionsslug.md b/docs/models/operations/sectionsslug.md new file mode 100644 index 00000000..c11188b3 --- /dev/null +++ b/docs/models/operations/sectionsslug.md @@ -0,0 +1,15 @@ +# SectionsSlug + +## Example Usage + +```typescript +import { SectionsSlug } from "firehydrant/models/operations"; + +let value: SectionsSlug = "timeline"; +``` + +## Values + +```typescript +"timeline" | "key_data" | "details" | "resources" | "actions" +``` \ No newline at end of file diff --git a/docs/models/operations/setincidentalertasprimaryrequest.md b/docs/models/operations/setincidentalertasprimaryrequest.md deleted file mode 100644 index 4f38df5d..00000000 --- a/docs/models/operations/setincidentalertasprimaryrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# SetIncidentAlertAsPrimaryRequest - -## Example Usage - -```typescript -import { SetIncidentAlertAsPrimaryRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: SetIncidentAlertAsPrimaryRequest = { - incidentAlertId: "", - incidentId: "", - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: { - primary: false, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `incidentAlertId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary` | [components.PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary](../../models/components/patchv1incidentsincidentidalertsincidentalertidprimary.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/setmemberdefaultaudiencerequest.md b/docs/models/operations/setmemberdefaultaudiencerequest.md new file mode 100644 index 00000000..833d8474 --- /dev/null +++ b/docs/models/operations/setmemberdefaultaudiencerequest.md @@ -0,0 +1,21 @@ +# SetMemberDefaultAudienceRequest + +## Example Usage + +```typescript +import { SetMemberDefaultAudienceRequest } from "firehydrant/models/operations"; + +let value: SetMemberDefaultAudienceRequest = { + memberId: 697060, + requestBody: { + audienceId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `memberId` | *number* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.SetMemberDefaultAudienceRequestBody](../../models/operations/setmemberdefaultaudiencerequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/setmemberdefaultaudiencerequestbody.md b/docs/models/operations/setmemberdefaultaudiencerequestbody.md new file mode 100644 index 00000000..e03d0bf1 --- /dev/null +++ b/docs/models/operations/setmemberdefaultaudiencerequestbody.md @@ -0,0 +1,17 @@ +# SetMemberDefaultAudienceRequestBody + +## Example Usage + +```typescript +import { SetMemberDefaultAudienceRequestBody } from "firehydrant/models/operations"; + +let value: SetMemberDefaultAudienceRequestBody = { + audienceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `audienceId` | *string* | :heavy_check_mark: | ID of the audience to set as default | \ No newline at end of file diff --git a/docs/models/operations/shareincidentretrospectivesrequest.md b/docs/models/operations/shareincidentretrospectivesrequest.md new file mode 100644 index 00000000..5f3762ba --- /dev/null +++ b/docs/models/operations/shareincidentretrospectivesrequest.md @@ -0,0 +1,23 @@ +# ShareIncidentRetrospectivesRequest + +## Example Usage + +```typescript +import { ShareIncidentRetrospectivesRequest } from "firehydrant/models/operations"; + +let value: ShareIncidentRetrospectivesRequest = { + incidentId: "", + requestBody: { + retrospectiveIds: [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.ShareIncidentRetrospectivesRequestBody](../../models/operations/shareincidentretrospectivesrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/shareincidentretrospectivesrequestbody.md b/docs/models/operations/shareincidentretrospectivesrequestbody.md new file mode 100644 index 00000000..73d16ec1 --- /dev/null +++ b/docs/models/operations/shareincidentretrospectivesrequestbody.md @@ -0,0 +1,21 @@ +# ShareIncidentRetrospectivesRequestBody + +## Example Usage + +```typescript +import { ShareIncidentRetrospectivesRequestBody } from "firehydrant/models/operations"; + +let value: ShareIncidentRetrospectivesRequestBody = { + retrospectiveIds: [ + "", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `userIds` | *string*[] | :heavy_minus_sign: | An array of user IDs with whom to share the report | +| `teamIds` | *string*[] | :heavy_minus_sign: | An array of team IDs with whom to share the report | +| `retrospectiveIds` | *string*[] | :heavy_check_mark: | An array of retrospective IDs to share | \ No newline at end of file diff --git a/docs/models/operations/sort.md b/docs/models/operations/sort.md deleted file mode 100644 index c2e126c0..00000000 --- a/docs/models/operations/sort.md +++ /dev/null @@ -1,17 +0,0 @@ -# Sort - -Allows sorting comments by the time they were posted, ascending or descending. - -## Example Usage - -```typescript -import { Sort } from "firehydrant-typescript-sdk/models/operations"; - -let value: Sort = "asc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/sortby.md b/docs/models/operations/sortby.md deleted file mode 100644 index d57bbd2b..00000000 --- a/docs/models/operations/sortby.md +++ /dev/null @@ -1,17 +0,0 @@ -# SortBy - -String that determines how records are sorted - -## Example Usage - -```typescript -import { SortBy } from "firehydrant-typescript-sdk/models/operations"; - -let value: SortBy = "total_opened_alerts"; -``` - -## Values - -```typescript -"total_opened_alerts" | "total_acked_alerts" | "total_incidents" | "acked_percentage" | "incidents_percentage" -``` \ No newline at end of file diff --git a/docs/models/operations/sortdirection.md b/docs/models/operations/sortdirection.md deleted file mode 100644 index 38bb6f52..00000000 --- a/docs/models/operations/sortdirection.md +++ /dev/null @@ -1,15 +0,0 @@ -# SortDirection - -## Example Usage - -```typescript -import { SortDirection } from "firehydrant-typescript-sdk/models/operations"; - -let value: SortDirection = "desc"; -``` - -## Values - -```typescript -"asc" | "desc" -``` \ No newline at end of file diff --git a/docs/models/operations/sortfield.md b/docs/models/operations/sortfield.md deleted file mode 100644 index 7cfe00e5..00000000 --- a/docs/models/operations/sortfield.md +++ /dev/null @@ -1,15 +0,0 @@ -# SortField - -## Example Usage - -```typescript -import { SortField } from "firehydrant-typescript-sdk/models/operations"; - -let value: SortField = "mttm"; -``` - -## Values - -```typescript -"mttd" | "mtta" | "mttm" | "mttr" | "count" | "total_time" -``` \ No newline at end of file diff --git a/docs/models/operations/state.md b/docs/models/operations/state.md index c3d54eff..29234244 100644 --- a/docs/models/operations/state.md +++ b/docs/models/operations/state.md @@ -5,9 +5,9 @@ Filter tickets by state ## Example Usage ```typescript -import { State } from "firehydrant-typescript-sdk/models/operations"; +import { State } from "firehydrant/models/operations"; -let value: State = "in_progress"; +let value: State = "open"; ``` ## Values diff --git a/docs/models/operations/status.md b/docs/models/operations/status.md index 3397af39..b98ab910 100644 --- a/docs/models/operations/status.md +++ b/docs/models/operations/status.md @@ -5,9 +5,9 @@ Filter on status of the role assignment ## Example Usage ```typescript -import { Status } from "firehydrant-typescript-sdk/models/operations"; +import { Status } from "firehydrant/models/operations"; -let value: Status = "active"; +let value: Status = "inactive"; ``` ## Values diff --git a/docs/models/operations/tagmatchstrategy.md b/docs/models/operations/tagmatchstrategy.md deleted file mode 100644 index 33528902..00000000 --- a/docs/models/operations/tagmatchstrategy.md +++ /dev/null @@ -1,17 +0,0 @@ -# TagMatchStrategy - -The strategy to match tags. `any` will return alerts that have at least one of the supplied tags, `match_all` will return only alerts that have all of the supplied tags, and `exclude` will only return alerts that have none of the supplied tags. This currently only works for Signals alerts. - -## Example Usage - -```typescript -import { TagMatchStrategy } from "firehydrant-typescript-sdk/models/operations"; - -let value: TagMatchStrategy = "any"; -``` - -## Values - -```typescript -"any" | "match_all" | "exclude" -``` \ No newline at end of file diff --git a/docs/models/operations/tickettype.md b/docs/models/operations/tickettype.md new file mode 100644 index 00000000..07a8874e --- /dev/null +++ b/docs/models/operations/tickettype.md @@ -0,0 +1,17 @@ +# TicketType + +Filter by ticket type. Values: incident, follow_up + +## Example Usage + +```typescript +import { TicketType } from "firehydrant/models/operations"; + +let value: TicketType = "incident"; +``` + +## Values + +```typescript +"incident" | "follow_up" +``` \ No newline at end of file diff --git a/docs/models/operations/type.md b/docs/models/operations/type.md deleted file mode 100644 index 3cc54e02..00000000 --- a/docs/models/operations/type.md +++ /dev/null @@ -1,17 +0,0 @@ -# Type - -Type of Entitlement - -## Example Usage - -```typescript -import { Type } from "firehydrant-typescript-sdk/models/operations"; - -let value: Type = "quota"; -``` - -## Values - -```typescript -"quota" | "access" -``` \ No newline at end of file diff --git a/docs/models/operations/unarchiveincidentrequest.md b/docs/models/operations/unarchiveincidentrequest.md index 12bdd574..0edbc45d 100644 --- a/docs/models/operations/unarchiveincidentrequest.md +++ b/docs/models/operations/unarchiveincidentrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { UnarchiveIncidentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UnarchiveIncidentRequest } from "firehydrant/models/operations"; let value: UnarchiveIncidentRequest = { incidentId: "", diff --git a/docs/models/operations/updateaipreferencesrequest.md b/docs/models/operations/updateaipreferencesrequest.md new file mode 100644 index 00000000..458bbaf8 --- /dev/null +++ b/docs/models/operations/updateaipreferencesrequest.md @@ -0,0 +1,22 @@ +# UpdateAiPreferencesRequest + +## Example Usage + +```typescript +import { UpdateAiPreferencesRequest } from "firehydrant/models/operations"; + +let value: UpdateAiPreferencesRequest = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `ai` | *boolean* | :heavy_minus_sign: | Whether to enable AI features | +| `summaries` | *boolean* | :heavy_minus_sign: | Whether to enable incident summaries | +| `description` | *boolean* | :heavy_minus_sign: | Whether to enable incident descriptions | +| `impact` | *boolean* | :heavy_minus_sign: | Whether to enable incident impact | +| `updates` | *boolean* | :heavy_minus_sign: | Whether to enable incident updates | +| `retros` | *boolean* | :heavy_minus_sign: | Whether to enable incident retrospectives | +| `followups` | *boolean* | :heavy_minus_sign: | Whether to enable incident followups | +| `similarIncidents` | *boolean* | :heavy_minus_sign: | Whether to enable similar incidents | \ No newline at end of file diff --git a/docs/models/operations/updateaipreferencesrequestbody.md b/docs/models/operations/updateaipreferencesrequestbody.md deleted file mode 100644 index ebeded2a..00000000 --- a/docs/models/operations/updateaipreferencesrequestbody.md +++ /dev/null @@ -1,22 +0,0 @@ -# UpdateAiPreferencesRequestBody - -## Example Usage - -```typescript -import { UpdateAiPreferencesRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateAiPreferencesRequestBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `ai` | *boolean* | :heavy_minus_sign: | Whether to enable AI features | -| `summaries` | *boolean* | :heavy_minus_sign: | Whether to enable incident summaries | -| `description` | *boolean* | :heavy_minus_sign: | Whether to enable incident descriptions | -| `impact` | *boolean* | :heavy_minus_sign: | Whether to enable incident impact | -| `updates` | *boolean* | :heavy_minus_sign: | Whether to enable incident updates | -| `retros` | *boolean* | :heavy_minus_sign: | Whether to enable incident retrospectives | -| `followups` | *boolean* | :heavy_minus_sign: | Whether to enable incident followups | -| `similarIncidents` | *boolean* | :heavy_minus_sign: | Whether to enable similar incidents | \ No newline at end of file diff --git a/docs/models/operations/updateaudiencerequest.md b/docs/models/operations/updateaudiencerequest.md new file mode 100644 index 00000000..8fe6e543 --- /dev/null +++ b/docs/models/operations/updateaudiencerequest.md @@ -0,0 +1,18 @@ +# UpdateAudienceRequest + +## Example Usage + +```typescript +import { UpdateAudienceRequest } from "firehydrant/models/operations"; + +let value: UpdateAudienceRequest = { + audienceId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `audienceId` | *string* | :heavy_check_mark: | Unique identifier of the audience | +| `requestBody` | [operations.UpdateAudienceRequestBody](../../models/operations/updateaudiencerequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateaudiencerequestbody.md b/docs/models/operations/updateaudiencerequestbody.md new file mode 100644 index 00000000..936ab344 --- /dev/null +++ b/docs/models/operations/updateaudiencerequestbody.md @@ -0,0 +1,22 @@ +# UpdateAudienceRequestBody + +## Example Usage + +```typescript +import { UpdateAudienceRequestBody } from "firehydrant/models/operations"; + +let value: UpdateAudienceRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of the audience (max 255 characters) | +| `description` | *string* | :heavy_minus_sign: | Description of the audience (max 4000 characters) | +| `default` | *boolean* | :heavy_minus_sign: | Whether this is the default audience | +| `active` | *boolean* | :heavy_minus_sign: | Whether the audience is active or discarded | +| `detailsQuestion` | *string*[] | :heavy_minus_sign: | The incident detail question (max 255 characters) | +| `detailsPrompt` | *string*[] | :heavy_minus_sign: | The prompt to display when collecting this detail | +| `detailsSlug` | *string*[] | :heavy_minus_sign: | Optional unique identifier for this detail | +| `detailsPosition` | *number*[] | :heavy_minus_sign: | Position of the question in the list (1-based indexing) | \ No newline at end of file diff --git a/docs/models/operations/updateauthedproviderrequest.md b/docs/models/operations/updateauthedproviderrequest.md new file mode 100644 index 00000000..a6babe90 --- /dev/null +++ b/docs/models/operations/updateauthedproviderrequest.md @@ -0,0 +1,22 @@ +# UpdateAuthedProviderRequest + +## Example Usage + +```typescript +import { UpdateAuthedProviderRequest } from "firehydrant/models/operations"; + +let value: UpdateAuthedProviderRequest = { + integrationSlug: "", + connectionId: "", + authedProviderId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `integrationSlug` | *string* | :heavy_check_mark: | Integration slug | +| `connectionId` | *string* | :heavy_check_mark: | Connection ID | +| `authedProviderId` | *string* | :heavy_check_mark: | Authed provider ID | +| `requestBody` | [operations.UpdateAuthedProviderRequestBody](../../models/operations/updateauthedproviderrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateauthedproviderrequestbody.md b/docs/models/operations/updateauthedproviderrequestbody.md new file mode 100644 index 00000000..89d17e17 --- /dev/null +++ b/docs/models/operations/updateauthedproviderrequestbody.md @@ -0,0 +1,15 @@ +# UpdateAuthedProviderRequestBody + +## Example Usage + +```typescript +import { UpdateAuthedProviderRequestBody } from "firehydrant/models/operations"; + +let value: UpdateAuthedProviderRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `integrationDefault` | *boolean* | :heavy_minus_sign: | Set as the default integration for the account | \ No newline at end of file diff --git a/docs/models/operations/updateawscloudtrailbatchrequest.md b/docs/models/operations/updateawscloudtrailbatchrequest.md index 9cd16476..c2bc7bbf 100644 --- a/docs/models/operations/updateawscloudtrailbatchrequest.md +++ b/docs/models/operations/updateawscloudtrailbatchrequest.md @@ -1,19 +1,19 @@ -# UpdateAwsCloudTrailBatchRequest +# UpdateAwsCloudtrailBatchRequest ## Example Usage ```typescript -import { UpdateAwsCloudTrailBatchRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateAwsCloudtrailBatchRequest } from "firehydrant/models/operations"; -let value: UpdateAwsCloudTrailBatchRequest = { +let value: UpdateAwsCloudtrailBatchRequest = { id: "", - patchV1IntegrationsAwsCloudtrailBatchesId: {}, + updateAwsCloudtrailBatch: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1IntegrationsAwsCloudtrailBatchesId` | [components.PatchV1IntegrationsAwsCloudtrailBatchesId](../../models/components/patchv1integrationsawscloudtrailbatchesid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateAwsCloudtrailBatch` | [components.UpdateAwsCloudtrailBatch](../../models/components/updateawscloudtrailbatch.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateawsconnectionrequest.md b/docs/models/operations/updateawsconnectionrequest.md index 5b77fad5..eb661fd8 100644 --- a/docs/models/operations/updateawsconnectionrequest.md +++ b/docs/models/operations/updateawsconnectionrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateAwsConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateAwsConnectionRequest } from "firehydrant/models/operations"; let value: UpdateAwsConnectionRequest = { id: "", - patchV1IntegrationsAwsConnectionsId: {}, + updateAwsConnection: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1IntegrationsAwsConnectionsId` | [components.PatchV1IntegrationsAwsConnectionsId](../../models/components/patchv1integrationsawsconnectionsid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateAwsConnection` | [components.UpdateAwsConnection](../../models/components/updateawsconnection.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatechangeeventrequest.md b/docs/models/operations/updatechangeeventrequest.md index fbc99d8f..337b9e90 100644 --- a/docs/models/operations/updatechangeeventrequest.md +++ b/docs/models/operations/updatechangeeventrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateChangeEventRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateChangeEventRequest } from "firehydrant/models/operations"; let value: UpdateChangeEventRequest = { changeEventId: "", - patchV1ChangesEventsChangeEventId: {}, + updateChangeEvent: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `changeEventId` | *string* | :heavy_check_mark: | N/A | -| `patchV1ChangesEventsChangeEventId` | [components.PatchV1ChangesEventsChangeEventId](../../models/components/patchv1changeseventschangeeventid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `changeEventId` | *string* | :heavy_check_mark: | N/A | +| `updateChangeEvent` | [components.UpdateChangeEvent](../../models/components/updatechangeevent.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatechangeidentityrequest.md b/docs/models/operations/updatechangeidentityrequest.md index 66a7a0ef..5ab3ebb6 100644 --- a/docs/models/operations/updatechangeidentityrequest.md +++ b/docs/models/operations/updatechangeidentityrequest.md @@ -3,12 +3,12 @@ ## Example Usage ```typescript -import { UpdateChangeIdentityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateChangeIdentityRequest } from "firehydrant/models/operations"; let value: UpdateChangeIdentityRequest = { identityId: "", changeId: "", - patchV1ChangesChangeIdIdentitiesIdentityId: { + updateChangeIdentity: { type: "", value: "", }, @@ -17,8 +17,8 @@ let value: UpdateChangeIdentityRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `identityId` | *string* | :heavy_check_mark: | N/A | -| `changeId` | *string* | :heavy_check_mark: | N/A | -| `patchV1ChangesChangeIdIdentitiesIdentityId` | [components.PatchV1ChangesChangeIdIdentitiesIdentityId](../../models/components/patchv1changeschangeididentitiesidentityid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `identityId` | *string* | :heavy_check_mark: | N/A | +| `changeId` | *string* | :heavy_check_mark: | N/A | +| `updateChangeIdentity` | [components.UpdateChangeIdentity](../../models/components/updatechangeidentity.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatechangerequest.md b/docs/models/operations/updatechangerequest.md index 178404f4..8b965703 100644 --- a/docs/models/operations/updatechangerequest.md +++ b/docs/models/operations/updatechangerequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateChangeRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateChangeRequest } from "firehydrant/models/operations"; let value: UpdateChangeRequest = { changeId: "", - patchV1ChangesChangeId: {}, + updateChange: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `changeId` | *string* | :heavy_check_mark: | N/A | -| `patchV1ChangesChangeId` | [components.PatchV1ChangesChangeId](../../models/components/patchv1changeschangeid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `changeId` | *string* | :heavy_check_mark: | N/A | +| `updateChange` | [components.UpdateChange](../../models/components/updatechange.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatechecklisttemplaterequest.md b/docs/models/operations/updatechecklisttemplaterequest.md index 16bdff43..660c1852 100644 --- a/docs/models/operations/updatechecklisttemplaterequest.md +++ b/docs/models/operations/updatechecklisttemplaterequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateChecklistTemplateRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateChecklistTemplateRequest } from "firehydrant/models/operations"; let value: UpdateChecklistTemplateRequest = { id: "", - patchV1ChecklistTemplatesId: {}, + updateChecklistTemplate: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1ChecklistTemplatesId` | [components.PatchV1ChecklistTemplatesId](../../models/components/patchv1checklisttemplatesid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateChecklistTemplate` | [components.UpdateChecklistTemplate](../../models/components/updatechecklisttemplate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatecommentrequest.md b/docs/models/operations/updatecommentrequest.md new file mode 100644 index 00000000..a77aa939 --- /dev/null +++ b/docs/models/operations/updatecommentrequest.md @@ -0,0 +1,21 @@ +# UpdateCommentRequest + +## Example Usage + +```typescript +import { UpdateCommentRequest } from "firehydrant/models/operations"; + +let value: UpdateCommentRequest = { + commentId: "", + conversationId: "", + updateComment: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `commentId` | *string* | :heavy_check_mark: | N/A | +| `conversationId` | *string* | :heavy_check_mark: | N/A | +| `updateComment` | [components.UpdateComment](../../models/components/updatecomment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateconnectionrequest.md b/docs/models/operations/updateconnectionrequest.md new file mode 100644 index 00000000..ea84bdd9 --- /dev/null +++ b/docs/models/operations/updateconnectionrequest.md @@ -0,0 +1,19 @@ +# UpdateConnectionRequest + +## Example Usage + +```typescript +import { UpdateConnectionRequest } from "firehydrant/models/operations"; + +let value: UpdateConnectionRequest = { + slug: "", + connectionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `connectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateconversationcommentrequest.md b/docs/models/operations/updateconversationcommentrequest.md deleted file mode 100644 index 835ff1a5..00000000 --- a/docs/models/operations/updateconversationcommentrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdateConversationCommentRequest - -## Example Usage - -```typescript -import { UpdateConversationCommentRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateConversationCommentRequest = { - commentId: "", - conversationId: "", - patchV1ConversationsConversationIdCommentsCommentId: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `commentId` | *string* | :heavy_check_mark: | N/A | -| `conversationId` | *string* | :heavy_check_mark: | N/A | -| `patchV1ConversationsConversationIdCommentsCommentId` | [components.PatchV1ConversationsConversationIdCommentsCommentId](../../models/components/patchv1conversationsconversationidcommentscommentid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatecustomfielddefinitionrequest.md b/docs/models/operations/updatecustomfielddefinitionrequest.md index 69ad51e8..dfe75d43 100644 --- a/docs/models/operations/updatecustomfielddefinitionrequest.md +++ b/docs/models/operations/updatecustomfielddefinitionrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateCustomFieldDefinitionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateCustomFieldDefinitionRequest } from "firehydrant/models/operations"; let value: UpdateCustomFieldDefinitionRequest = { fieldId: "", - patchV1CustomFieldsDefinitionsFieldId: {}, + updateCustomFieldDefinition: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `fieldId` | *string* | :heavy_check_mark: | N/A | -| `patchV1CustomFieldsDefinitionsFieldId` | [components.PatchV1CustomFieldsDefinitionsFieldId](../../models/components/patchv1customfieldsdefinitionsfieldid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `updateCustomFieldDefinition` | [components.UpdateCustomFieldDefinition](../../models/components/updatecustomfielddefinition.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateenvironmentrequest.md b/docs/models/operations/updateenvironmentrequest.md index d52aa417..dc900468 100644 --- a/docs/models/operations/updateenvironmentrequest.md +++ b/docs/models/operations/updateenvironmentrequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { UpdateEnvironmentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateEnvironmentRequest } from "firehydrant/models/operations"; let value: UpdateEnvironmentRequest = { environmentId: "", - patchV1EnvironmentsEnvironmentId: { + updateEnvironment: { name: "", }, }; @@ -15,7 +15,7 @@ let value: UpdateEnvironmentRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `environmentId` | *string* | :heavy_check_mark: | Environment UUID | -| `patchV1EnvironmentsEnvironmentId` | [components.PatchV1EnvironmentsEnvironmentId](../../models/components/patchv1environmentsenvironmentid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `environmentId` | *string* | :heavy_check_mark: | Environment UUID | +| `updateEnvironment` | [components.UpdateEnvironment](../../models/components/updateenvironment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatefieldmaprequest.md b/docs/models/operations/updatefieldmaprequest.md new file mode 100644 index 00000000..09a98968 --- /dev/null +++ b/docs/models/operations/updatefieldmaprequest.md @@ -0,0 +1,17 @@ +# UpdateFieldMapRequest + +## Example Usage + +```typescript +import { UpdateFieldMapRequest } from "firehydrant/models/operations"; + +let value: UpdateFieldMapRequest = { + fieldMapId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `fieldMapId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatefunctionalityrequest.md b/docs/models/operations/updatefunctionalityrequest.md index 8a744888..f69734b0 100644 --- a/docs/models/operations/updatefunctionalityrequest.md +++ b/docs/models/operations/updatefunctionalityrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateFunctionalityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateFunctionalityRequest } from "firehydrant/models/operations"; let value: UpdateFunctionalityRequest = { functionalityId: "", - patchV1FunctionalitiesFunctionalityId: {}, + updateFunctionality: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `functionalityId` | *string* | :heavy_check_mark: | N/A | -| `patchV1FunctionalitiesFunctionalityId` | [components.PatchV1FunctionalitiesFunctionalityId](../../models/components/patchv1functionalitiesfunctionalityid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `functionalityId` | *string* | :heavy_check_mark: | N/A | +| `updateFunctionality` | [components.UpdateFunctionality](../../models/components/updatefunctionality.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateinboundfieldmaprequest.md b/docs/models/operations/updateinboundfieldmaprequest.md new file mode 100644 index 00000000..f7d5c376 --- /dev/null +++ b/docs/models/operations/updateinboundfieldmaprequest.md @@ -0,0 +1,19 @@ +# UpdateInboundFieldMapRequest + +## Example Usage + +```typescript +import { UpdateInboundFieldMapRequest } from "firehydrant/models/operations"; + +let value: UpdateInboundFieldMapRequest = { + mapId: "", + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `mapId` | *string* | :heavy_check_mark: | N/A | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentalertprimaryrequest.md b/docs/models/operations/updateincidentalertprimaryrequest.md new file mode 100644 index 00000000..b30729d4 --- /dev/null +++ b/docs/models/operations/updateincidentalertprimaryrequest.md @@ -0,0 +1,23 @@ +# UpdateIncidentAlertPrimaryRequest + +## Example Usage + +```typescript +import { UpdateIncidentAlertPrimaryRequest } from "firehydrant/models/operations"; + +let value: UpdateIncidentAlertPrimaryRequest = { + incidentAlertId: "", + incidentId: "", + updateIncidentAlertPrimary: { + primary: false, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `incidentAlertId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentAlertPrimary` | [components.UpdateIncidentAlertPrimary](../../models/components/updateincidentalertprimary.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentchangeeventrequest.md b/docs/models/operations/updateincidentchangeeventrequest.md new file mode 100644 index 00000000..d2abba16 --- /dev/null +++ b/docs/models/operations/updateincidentchangeeventrequest.md @@ -0,0 +1,21 @@ +# UpdateIncidentChangeEventRequest + +## Example Usage + +```typescript +import { UpdateIncidentChangeEventRequest } from "firehydrant/models/operations"; + +let value: UpdateIncidentChangeEventRequest = { + relatedChangeEventId: "", + incidentId: "", + updateIncidentChangeEvent: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `relatedChangeEventId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentChangeEvent` | [components.UpdateIncidentChangeEvent](../../models/components/updateincidentchangeevent.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentchatmessagerequest.md b/docs/models/operations/updateincidentchatmessagerequest.md index 981438fd..49f7cb3c 100644 --- a/docs/models/operations/updateincidentchatmessagerequest.md +++ b/docs/models/operations/updateincidentchatmessagerequest.md @@ -3,12 +3,12 @@ ## Example Usage ```typescript -import { UpdateIncidentChatMessageRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentChatMessageRequest } from "firehydrant/models/operations"; let value: UpdateIncidentChatMessageRequest = { messageId: "", incidentId: "", - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: { + updateIncidentChatMessage: { body: "", }, }; @@ -16,8 +16,8 @@ let value: UpdateIncidentChatMessageRequest = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `messageId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentIdGenericChatMessagesMessageId` | [components.PatchV1IncidentsIncidentIdGenericChatMessagesMessageId](../../models/components/patchv1incidentsincidentidgenericchatmessagesmessageid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `messageId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentChatMessage` | [components.UpdateIncidentChatMessage](../../models/components/updateincidentchatmessage.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidenteventrequest.md b/docs/models/operations/updateincidenteventrequest.md index d9006136..9f0e513b 100644 --- a/docs/models/operations/updateincidenteventrequest.md +++ b/docs/models/operations/updateincidenteventrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { UpdateIncidentEventRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentEventRequest } from "firehydrant/models/operations"; let value: UpdateIncidentEventRequest = { incidentId: "", diff --git a/docs/models/operations/updateincidenteventvotesrequest.md b/docs/models/operations/updateincidenteventvotesrequest.md deleted file mode 100644 index 122e82df..00000000 --- a/docs/models/operations/updateincidenteventvotesrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# UpdateIncidentEventVotesRequest - -## Example Usage - -```typescript -import { UpdateIncidentEventVotesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateIncidentEventVotesRequest = { - incidentId: "", - eventId: "", - patchV1IncidentsIncidentIdEventsEventIdVotes: { - direction: "up", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `eventId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentIdEventsEventIdVotes` | [components.PatchV1IncidentsIncidentIdEventsEventIdVotes](../../models/components/patchv1incidentsincidentideventseventidvotes.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentimpactpatchrequest.md b/docs/models/operations/updateincidentimpactpatchrequest.md new file mode 100644 index 00000000..cc9a0842 --- /dev/null +++ b/docs/models/operations/updateincidentimpactpatchrequest.md @@ -0,0 +1,19 @@ +# UpdateIncidentImpactPatchRequest + +## Example Usage + +```typescript +import { UpdateIncidentImpactPatchRequest } from "firehydrant/models/operations"; + +let value: UpdateIncidentImpactPatchRequest = { + incidentId: "", + updateIncidentImpactPatch: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentImpactPatch` | [components.UpdateIncidentImpactPatch](../../models/components/updateincidentimpactpatch.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentimpactputrequest.md b/docs/models/operations/updateincidentimpactputrequest.md new file mode 100644 index 00000000..3610ef62 --- /dev/null +++ b/docs/models/operations/updateincidentimpactputrequest.md @@ -0,0 +1,19 @@ +# UpdateIncidentImpactPutRequest + +## Example Usage + +```typescript +import { UpdateIncidentImpactPutRequest } from "firehydrant/models/operations"; + +let value: UpdateIncidentImpactPutRequest = { + incidentId: "", + updateIncidentImpactPut: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentImpactPut` | [components.UpdateIncidentImpactPut](../../models/components/updateincidentimpactput.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentimpactsrequest.md b/docs/models/operations/updateincidentimpactsrequest.md deleted file mode 100644 index f2cf9dbf..00000000 --- a/docs/models/operations/updateincidentimpactsrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateIncidentImpactsRequest - -## Example Usage - -```typescript -import { UpdateIncidentImpactsRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateIncidentImpactsRequest = { - incidentId: "", - putV1IncidentsIncidentIdImpact: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `putV1IncidentsIncidentIdImpact` | [components.PutV1IncidentsIncidentIdImpact](../../models/components/putv1incidentsincidentidimpact.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentlinkrequest.md b/docs/models/operations/updateincidentlinkrequest.md index 37506f04..d1ae8e9a 100644 --- a/docs/models/operations/updateincidentlinkrequest.md +++ b/docs/models/operations/updateincidentlinkrequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { UpdateIncidentLinkRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentLinkRequest } from "firehydrant/models/operations"; let value: UpdateIncidentLinkRequest = { linkId: "", incidentId: "", - putV1IncidentsIncidentIdLinksLinkId: {}, + updateIncidentLink: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `linkId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `putV1IncidentsIncidentIdLinksLinkId` | [components.PutV1IncidentsIncidentIdLinksLinkId](../../models/components/putv1incidentsincidentidlinkslinkid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `linkId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentLink` | [components.UpdateIncidentLink](../../models/components/updateincidentlink.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentmilestonesbulkrequest.md b/docs/models/operations/updateincidentmilestonesbulkrequest.md deleted file mode 100644 index 6e247d52..00000000 --- a/docs/models/operations/updateincidentmilestonesbulkrequest.md +++ /dev/null @@ -1,26 +0,0 @@ -# UpdateIncidentMilestonesBulkRequest - -## Example Usage - -```typescript -import { UpdateIncidentMilestonesBulkRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateIncidentMilestonesBulkRequest = { - incidentId: "", - putV1IncidentsIncidentIdMilestonesBulkUpdate: { - milestones: [ - { - type: "", - occurredAt: new Date("2023-01-13T20:07:38.173Z"), - }, - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `putV1IncidentsIncidentIdMilestonesBulkUpdate` | [components.PutV1IncidentsIncidentIdMilestonesBulkUpdate](../../models/components/putv1incidentsincidentidmilestonesbulkupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentnoterequest.md b/docs/models/operations/updateincidentnoterequest.md index ba257dac..183cf423 100644 --- a/docs/models/operations/updateincidentnoterequest.md +++ b/docs/models/operations/updateincidentnoterequest.md @@ -3,12 +3,12 @@ ## Example Usage ```typescript -import { UpdateIncidentNoteRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentNoteRequest } from "firehydrant/models/operations"; let value: UpdateIncidentNoteRequest = { noteId: "", incidentId: "", - patchV1IncidentsIncidentIdNotesNoteId: { + updateIncidentNote: { body: "", }, }; @@ -16,8 +16,8 @@ let value: UpdateIncidentNoteRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `noteId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentIdNotesNoteId` | [components.PatchV1IncidentsIncidentIdNotesNoteId](../../models/components/patchv1incidentsincidentidnotesnoteid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `noteId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentNote` | [components.UpdateIncidentNote](../../models/components/updateincidentnote.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentrelatedchangeeventrequest.md b/docs/models/operations/updateincidentrelatedchangeeventrequest.md deleted file mode 100644 index 51174620..00000000 --- a/docs/models/operations/updateincidentrelatedchangeeventrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdateIncidentRelatedChangeEventRequest - -## Example Usage - -```typescript -import { UpdateIncidentRelatedChangeEventRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateIncidentRelatedChangeEventRequest = { - relatedChangeEventId: "", - incidentId: "", - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `relatedChangeEventId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId` | [components.PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId](../../models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentrequest.md b/docs/models/operations/updateincidentrequest.md index d39a9f02..e054bd6c 100644 --- a/docs/models/operations/updateincidentrequest.md +++ b/docs/models/operations/updateincidentrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateIncidentRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentRequest } from "firehydrant/models/operations"; let value: UpdateIncidentRequest = { incidentId: "", - patchV1IncidentsIncidentId: {}, + updateIncident: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentId` | [components.PatchV1IncidentsIncidentId](../../models/components/patchv1incidentsincidentid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncident` | [components.UpdateIncident](../../models/components/updateincident.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentretrospectivefieldrequest.md b/docs/models/operations/updateincidentretrospectivefieldrequest.md new file mode 100644 index 00000000..61746934 --- /dev/null +++ b/docs/models/operations/updateincidentretrospectivefieldrequest.md @@ -0,0 +1,25 @@ +# UpdateIncidentRetrospectiveFieldRequest + +## Example Usage + +```typescript +import { UpdateIncidentRetrospectiveFieldRequest } from "firehydrant/models/operations"; + +let value: UpdateIncidentRetrospectiveFieldRequest = { + retrospectiveId: "", + fieldId: "", + incidentId: "", + updateIncidentRetrospectiveField: { + value: 890734, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `retrospectiveId` | *string* | :heavy_check_mark: | N/A | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentRetrospectiveField` | [components.UpdateIncidentRetrospectiveField](../../models/components/updateincidentretrospectivefield.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentretrospectiverequest.md b/docs/models/operations/updateincidentretrospectiverequest.md new file mode 100644 index 00000000..039b1a7e --- /dev/null +++ b/docs/models/operations/updateincidentretrospectiverequest.md @@ -0,0 +1,21 @@ +# UpdateIncidentRetrospectiveRequest + +## Example Usage + +```typescript +import { UpdateIncidentRetrospectiveRequest } from "firehydrant/models/operations"; + +let value: UpdateIncidentRetrospectiveRequest = { + retrospectiveId: "", + incidentId: "", + updateIncidentRetrospective: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `retrospectiveId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentRetrospective` | [components.UpdateIncidentRetrospective](../../models/components/updateincidentretrospective.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidentrolerequest.md b/docs/models/operations/updateincidentrolerequest.md index acc40068..548080e8 100644 --- a/docs/models/operations/updateincidentrolerequest.md +++ b/docs/models/operations/updateincidentrolerequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateIncidentRoleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentRoleRequest } from "firehydrant/models/operations"; let value: UpdateIncidentRoleRequest = { incidentRoleId: "", - patchV1IncidentRolesIncidentRoleId: {}, + updateIncidentRole: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `incidentRoleId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentRolesIncidentRoleId` | [components.PatchV1IncidentRolesIncidentRoleId](../../models/components/patchv1incidentrolesincidentroleid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `incidentRoleId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentRole` | [components.UpdateIncidentRole](../../models/components/updateincidentrole.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidenttaskrequest.md b/docs/models/operations/updateincidenttaskrequest.md index fab42157..1d178e15 100644 --- a/docs/models/operations/updateincidenttaskrequest.md +++ b/docs/models/operations/updateincidenttaskrequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { UpdateIncidentTaskRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentTaskRequest } from "firehydrant/models/operations"; let value: UpdateIncidentTaskRequest = { taskId: "", incidentId: "", - patchV1IncidentsIncidentIdTasksTaskId: {}, + updateIncidentTask: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `taskId` | *string* | :heavy_check_mark: | N/A | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentsIncidentIdTasksTaskId` | [components.PatchV1IncidentsIncidentIdTasksTaskId](../../models/components/patchv1incidentsincidentidtaskstaskid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `taskId` | *string* | :heavy_check_mark: | N/A | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentTask` | [components.UpdateIncidentTask](../../models/components/updateincidenttask.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateincidenttyperequest.md b/docs/models/operations/updateincidenttyperequest.md index c9f993ce..e87bb11e 100644 --- a/docs/models/operations/updateincidenttyperequest.md +++ b/docs/models/operations/updateincidenttyperequest.md @@ -3,11 +3,11 @@ ## Example Usage ```typescript -import { UpdateIncidentTypeRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateIncidentTypeRequest } from "firehydrant/models/operations"; let value: UpdateIncidentTypeRequest = { id: "", - patchV1IncidentTypesId: { + updateIncidentType: { name: "", template: {}, }, @@ -16,7 +16,7 @@ let value: UpdateIncidentTypeRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1IncidentTypesId` | [components.PatchV1IncidentTypesId](../../models/components/patchv1incidenttypesid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateIncidentType` | [components.UpdateIncidentType](../../models/components/updateincidenttype.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateintegrationconnectionrequest.md b/docs/models/operations/updateintegrationconnectionrequest.md deleted file mode 100644 index b0c9f59d..00000000 --- a/docs/models/operations/updateintegrationconnectionrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateIntegrationConnectionRequest - -## Example Usage - -```typescript -import { UpdateIntegrationConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateIntegrationConnectionRequest = { - slug: "", - connectionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `slug` | *string* | :heavy_check_mark: | N/A | -| `connectionId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateintegrationfieldmaprequest.md b/docs/models/operations/updateintegrationfieldmaprequest.md deleted file mode 100644 index 30ae01c1..00000000 --- a/docs/models/operations/updateintegrationfieldmaprequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# UpdateIntegrationFieldMapRequest - -## Example Usage - -```typescript -import { UpdateIntegrationFieldMapRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateIntegrationFieldMapRequest = { - fieldMapId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `fieldMapId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatelifecyclemeasurementdefinitionrequest.md b/docs/models/operations/updatelifecyclemeasurementdefinitionrequest.md new file mode 100644 index 00000000..165d9f47 --- /dev/null +++ b/docs/models/operations/updatelifecyclemeasurementdefinitionrequest.md @@ -0,0 +1,18 @@ +# UpdateLifecycleMeasurementDefinitionRequest + +## Example Usage + +```typescript +import { UpdateLifecycleMeasurementDefinitionRequest } from "firehydrant/models/operations"; + +let value: UpdateLifecycleMeasurementDefinitionRequest = { + measurementDefinitionId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `measurementDefinitionId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.UpdateLifecycleMeasurementDefinitionRequestBody](../../models/operations/updatelifecyclemeasurementdefinitionrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatelifecyclemeasurementdefinitionrequestbody.md b/docs/models/operations/updatelifecyclemeasurementdefinitionrequestbody.md new file mode 100644 index 00000000..f4526cc9 --- /dev/null +++ b/docs/models/operations/updatelifecyclemeasurementdefinitionrequestbody.md @@ -0,0 +1,19 @@ +# UpdateLifecycleMeasurementDefinitionRequestBody + +## Example Usage + +```typescript +import { UpdateLifecycleMeasurementDefinitionRequestBody } from "firehydrant/models/operations"; + +let value: UpdateLifecycleMeasurementDefinitionRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `slug` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `startsAtMilestoneId` | *string* | :heavy_minus_sign: | N/A | +| `endsAtMilestoneId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatelifecyclemilestoneautoassigntimestamponcreate.md b/docs/models/operations/updatelifecyclemilestoneautoassigntimestamponcreate.md new file mode 100644 index 00000000..a0610cca --- /dev/null +++ b/docs/models/operations/updatelifecyclemilestoneautoassigntimestamponcreate.md @@ -0,0 +1,18 @@ +# UpdateLifecycleMilestoneAutoAssignTimestampOnCreate + +The setting for auto-assigning the milestone's timestamp during incident declaration + +## Example Usage + +```typescript +import { UpdateLifecycleMilestoneAutoAssignTimestampOnCreate } from "firehydrant/models/operations"; + +let value: UpdateLifecycleMilestoneAutoAssignTimestampOnCreate = + "only_set_on_manual_create"; +``` + +## Values + +```typescript +"always_set_on_create" | "only_set_on_manual_create" | "never_set_on_create" +``` \ No newline at end of file diff --git a/docs/models/operations/updatelifecyclemilestonerequest.md b/docs/models/operations/updatelifecyclemilestonerequest.md index dce27352..a9e8f6c8 100644 --- a/docs/models/operations/updatelifecyclemilestonerequest.md +++ b/docs/models/operations/updatelifecyclemilestonerequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { UpdateLifecycleMilestoneRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateLifecycleMilestoneRequest } from "firehydrant/models/operations"; let value: UpdateLifecycleMilestoneRequest = { milestoneId: "", diff --git a/docs/models/operations/updatelifecyclemilestonerequestbody.md b/docs/models/operations/updatelifecyclemilestonerequestbody.md index a9cd2ff3..fadee0eb 100644 --- a/docs/models/operations/updatelifecyclemilestonerequestbody.md +++ b/docs/models/operations/updatelifecyclemilestonerequestbody.md @@ -3,17 +3,18 @@ ## Example Usage ```typescript -import { UpdateLifecycleMilestoneRequestBody } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateLifecycleMilestoneRequestBody } from "firehydrant/models/operations"; let value: UpdateLifecycleMilestoneRequestBody = {}; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | The name of the milestone | -| `description` | *string* | :heavy_minus_sign: | A long-form description of the milestone's purpose | -| `slug` | *string* | :heavy_minus_sign: | A unique identifier for the milestone. If not provided, one will be generated from the name. | -| `position` | *number* | :heavy_minus_sign: | The position of the milestone within the phase. If not provided, the milestone will be added as the last milestone in the phase. | -| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | The ID of a later milestone that cannot be started until this milestone has a timestamp populated | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *string* | :heavy_minus_sign: | The name of the milestone | +| `description` | *string* | :heavy_minus_sign: | A long-form description of the milestone's purpose | +| `slug` | *string* | :heavy_minus_sign: | A unique identifier for the milestone. If not provided, one will be generated from the name. | +| `position` | *number* | :heavy_minus_sign: | The position of the milestone within the phase. If not provided, the milestone will be added as the last milestone in the phase. | +| `requiredAtMilestoneId` | *string* | :heavy_minus_sign: | The ID of a later milestone that cannot be started until this milestone has a timestamp populated | +| `autoAssignTimestampOnCreate` | [operations.UpdateLifecycleMilestoneAutoAssignTimestampOnCreate](../../models/operations/updatelifecyclemilestoneautoassigntimestamponcreate.md) | :heavy_minus_sign: | The setting for auto-assigning the milestone's timestamp during incident declaration | \ No newline at end of file diff --git a/docs/models/operations/updatemeasurementdefinitionrequest.md b/docs/models/operations/updatemeasurementdefinitionrequest.md deleted file mode 100644 index 563aeef5..00000000 --- a/docs/models/operations/updatemeasurementdefinitionrequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# UpdateMeasurementDefinitionRequest - -## Example Usage - -```typescript -import { UpdateMeasurementDefinitionRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateMeasurementDefinitionRequest = { - measurementDefinitionId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `measurementDefinitionId` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [operations.UpdateMeasurementDefinitionRequestBody](../../models/operations/updatemeasurementdefinitionrequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatemeasurementdefinitionrequestbody.md b/docs/models/operations/updatemeasurementdefinitionrequestbody.md deleted file mode 100644 index 51e49fed..00000000 --- a/docs/models/operations/updatemeasurementdefinitionrequestbody.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateMeasurementDefinitionRequestBody - -## Example Usage - -```typescript -import { UpdateMeasurementDefinitionRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateMeasurementDefinitionRequestBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `slug` | *string* | :heavy_minus_sign: | N/A | -| `description` | *string* | :heavy_minus_sign: | N/A | -| `startsAtMilestoneId` | *string* | :heavy_minus_sign: | N/A | -| `endsAtMilestoneId` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenunccomponentgrouprequest.md b/docs/models/operations/updatenunccomponentgrouprequest.md new file mode 100644 index 00000000..1aa28537 --- /dev/null +++ b/docs/models/operations/updatenunccomponentgrouprequest.md @@ -0,0 +1,20 @@ +# UpdateNuncComponentGroupRequest + +## Example Usage + +```typescript +import { UpdateNuncComponentGroupRequest } from "firehydrant/models/operations"; + +let value: UpdateNuncComponentGroupRequest = { + nuncConnectionId: "", + groupId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `groupId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.UpdateNuncComponentGroupRequestBody](../../models/operations/updatenunccomponentgrouprequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenunccomponentgrouprequestbody.md b/docs/models/operations/updatenunccomponentgrouprequestbody.md new file mode 100644 index 00000000..958381f5 --- /dev/null +++ b/docs/models/operations/updatenunccomponentgrouprequestbody.md @@ -0,0 +1,17 @@ +# UpdateNuncComponentGroupRequestBody + +## Example Usage + +```typescript +import { UpdateNuncComponentGroupRequestBody } from "firehydrant/models/operations"; + +let value: UpdateNuncComponentGroupRequestBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | +| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenuncconnectionrequest.md b/docs/models/operations/updatenuncconnectionrequest.md new file mode 100644 index 00000000..1e3f8ca3 --- /dev/null +++ b/docs/models/operations/updatenuncconnectionrequest.md @@ -0,0 +1,32 @@ +# UpdateNuncConnectionRequest + +## Example Usage + +```typescript +import { UpdateNuncConnectionRequest } from "firehydrant/models/operations"; + +let value: UpdateNuncConnectionRequest = { + nuncConnectionId: "", + requestBody: { + conditionsNuncCondition: [ + "", + ], + conditionsConditionId: [ + "", + ], + componentsInfrastructureType: [ + "", + ], + componentsInfrastructureId: [ + "", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.UpdateNuncConnectionRequestBody](../../models/operations/updatenuncconnectionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenuncconnectionrequestbody.md b/docs/models/operations/updatenuncconnectionrequestbody.md new file mode 100644 index 00000000..e95de84d --- /dev/null +++ b/docs/models/operations/updatenuncconnectionrequestbody.md @@ -0,0 +1,43 @@ +# UpdateNuncConnectionRequestBody + +## Example Usage + +```typescript +import { UpdateNuncConnectionRequestBody } from "firehydrant/models/operations"; + +let value: UpdateNuncConnectionRequestBody = { + conditionsNuncCondition: [ + "", + ], + conditionsConditionId: [ + "", + ], + componentsInfrastructureType: [ + "", + ], + componentsInfrastructureId: [ + "", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `companyName` | *string* | :heavy_minus_sign: | N/A | +| `companyWebsite` | *string* | :heavy_minus_sign: | N/A | +| `companyTosUrl` | *string* | :heavy_minus_sign: | N/A | +| `greetingTitle` | *string* | :heavy_minus_sign: | N/A | +| `greetingBody` | *string* | :heavy_minus_sign: | N/A | +| `operationalMessage` | *string* | :heavy_minus_sign: | N/A | +| `title` | *string* | :heavy_minus_sign: | N/A | +| `conditionsNuncCondition` | *string*[] | :heavy_check_mark: | Status page condition to map your severity matrix condition to | +| `conditionsConditionId` | *string*[] | :heavy_check_mark: | Severity matrix condition id | +| `componentsInfrastructureType` | *string*[] | :heavy_check_mark: | N/A | +| `componentsInfrastructureId` | *string*[] | :heavy_check_mark: | N/A | +| `primaryColor` | *string* | :heavy_minus_sign: | N/A | +| `secondaryColor` | *string* | :heavy_minus_sign: | N/A | +| `exposedFields` | *string*[] | :heavy_minus_sign: | N/A | +| `enableHistogram` | *boolean* | :heavy_minus_sign: | N/A | +| `uiVersion` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenuncimagefile.md b/docs/models/operations/updatenuncimagefile.md new file mode 100644 index 00000000..c56cb60b --- /dev/null +++ b/docs/models/operations/updatenuncimagefile.md @@ -0,0 +1,16 @@ +# UpdateNuncImageFile + +## Example Usage + +```typescript +import { UpdateNuncImageFile } from "firehydrant/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `fileName` | *string* | :heavy_check_mark: | N/A | +| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenuncimagerequest.md b/docs/models/operations/updatenuncimagerequest.md new file mode 100644 index 00000000..ef30d51f --- /dev/null +++ b/docs/models/operations/updatenuncimagerequest.md @@ -0,0 +1,17 @@ +# UpdateNuncImageRequest + +## Example Usage + +```typescript +import { UpdateNuncImageRequest } from "firehydrant/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `type` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.UpdateNuncImageRequestBody](../../models/operations/updatenuncimagerequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenuncimagerequestbody.md b/docs/models/operations/updatenuncimagerequestbody.md new file mode 100644 index 00000000..80f1ccac --- /dev/null +++ b/docs/models/operations/updatenuncimagerequestbody.md @@ -0,0 +1,15 @@ +# UpdateNuncImageRequestBody + +## Example Usage + +```typescript +import { UpdateNuncImageRequestBody } from "firehydrant/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [operations.UpdateNuncImageFile](../../models/operations/updatenuncimagefile.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatenunclinkrequest.md b/docs/models/operations/updatenunclinkrequest.md new file mode 100644 index 00000000..3f3c03a4 --- /dev/null +++ b/docs/models/operations/updatenunclinkrequest.md @@ -0,0 +1,21 @@ +# UpdateNuncLinkRequest + +## Example Usage + +```typescript +import { UpdateNuncLinkRequest } from "firehydrant/models/operations"; + +let value: UpdateNuncLinkRequest = { + nuncConnectionId: "", + linkId: "", + updateNuncLink: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | +| `linkId` | *string* | :heavy_check_mark: | N/A | +| `updateNuncLink` | [components.UpdateNuncLink](../../models/components/updatenunclink.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateoncallshiftrequest.md b/docs/models/operations/updateoncallshiftrequest.md new file mode 100644 index 00000000..7cc48120 --- /dev/null +++ b/docs/models/operations/updateoncallshiftrequest.md @@ -0,0 +1,23 @@ +# UpdateOnCallShiftRequest + +## Example Usage + +```typescript +import { UpdateOnCallShiftRequest } from "firehydrant/models/operations"; + +let value: UpdateOnCallShiftRequest = { + id: "", + teamId: "", + scheduleId: "", + updateOnCallShift: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `scheduleId` | *string* | :heavy_check_mark: | N/A | +| `updateOnCallShift` | [components.UpdateOnCallShift](../../models/components/updateoncallshift.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatepostmortemfieldrequest.md b/docs/models/operations/updatepostmortemfieldrequest.md new file mode 100644 index 00000000..d3039e07 --- /dev/null +++ b/docs/models/operations/updatepostmortemfieldrequest.md @@ -0,0 +1,23 @@ +# UpdatePostMortemFieldRequest + +## Example Usage + +```typescript +import { UpdatePostMortemFieldRequest } from "firehydrant/models/operations"; + +let value: UpdatePostMortemFieldRequest = { + fieldId: "", + reportId: "", + updatePostMortemField: { + value: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `fieldId` | *string* | :heavy_check_mark: | N/A | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `updatePostMortemField` | [components.UpdatePostMortemField](../../models/components/updatepostmortemfield.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatepostmortemreasonrequest.md b/docs/models/operations/updatepostmortemreasonrequest.md new file mode 100644 index 00000000..9db631fd --- /dev/null +++ b/docs/models/operations/updatepostmortemreasonrequest.md @@ -0,0 +1,21 @@ +# UpdatePostMortemReasonRequest + +## Example Usage + +```typescript +import { UpdatePostMortemReasonRequest } from "firehydrant/models/operations"; + +let value: UpdatePostMortemReasonRequest = { + reportId: "", + reasonId: "", + updatePostMortemReason: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `reasonId` | *string* | :heavy_check_mark: | N/A | +| `updatePostMortemReason` | [components.UpdatePostMortemReason](../../models/components/updatepostmortemreason.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatepostmortemreportrequest.md b/docs/models/operations/updatepostmortemreportrequest.md index 56eb5371..f30de255 100644 --- a/docs/models/operations/updatepostmortemreportrequest.md +++ b/docs/models/operations/updatepostmortemreportrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdatePostMortemReportRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdatePostMortemReportRequest } from "firehydrant/models/operations"; let value: UpdatePostMortemReportRequest = { reportId: "", - patchV1PostMortemsReportsReportId: {}, + updatePostMortemReport: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `patchV1PostMortemsReportsReportId` | [components.PatchV1PostMortemsReportsReportId](../../models/components/patchv1postmortemsreportsreportid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `reportId` | *string* | :heavy_check_mark: | N/A | +| `updatePostMortemReport` | [components.UpdatePostMortemReport](../../models/components/updatepostmortemreport.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatepriorityrequest.md b/docs/models/operations/updatepriorityrequest.md index 6be4c508..3447c82c 100644 --- a/docs/models/operations/updatepriorityrequest.md +++ b/docs/models/operations/updatepriorityrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdatePriorityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdatePriorityRequest } from "firehydrant/models/operations"; let value: UpdatePriorityRequest = { prioritySlug: "", - patchV1PrioritiesPrioritySlug: {}, + updatePriority: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `prioritySlug` | *string* | :heavy_check_mark: | N/A | -| `patchV1PrioritiesPrioritySlug` | [components.PatchV1PrioritiesPrioritySlug](../../models/components/patchv1prioritiespriorityslug.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `prioritySlug` | *string* | :heavy_check_mark: | N/A | +| `updatePriority` | [components.UpdatePriority](../../models/components/updatepriority.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateretrospectivefieldrequest.md b/docs/models/operations/updateretrospectivefieldrequest.md deleted file mode 100644 index 2fc60ae6..00000000 --- a/docs/models/operations/updateretrospectivefieldrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# UpdateRetrospectiveFieldRequest - -## Example Usage - -```typescript -import { UpdateRetrospectiveFieldRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateRetrospectiveFieldRequest = { - fieldId: "", - reportId: "", - patchV1PostMortemsReportsReportIdFieldsFieldId: { - value: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `fieldId` | *string* | :heavy_check_mark: | N/A | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `patchV1PostMortemsReportsReportIdFieldsFieldId` | [components.PatchV1PostMortemsReportsReportIdFieldsFieldId](../../models/components/patchv1postmortemsreportsreportidfieldsfieldid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateretrospectivereasonrequest.md b/docs/models/operations/updateretrospectivereasonrequest.md deleted file mode 100644 index fd8d491a..00000000 --- a/docs/models/operations/updateretrospectivereasonrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdateRetrospectiveReasonRequest - -## Example Usage - -```typescript -import { UpdateRetrospectiveReasonRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateRetrospectiveReasonRequest = { - reportId: "", - reasonId: "", - patchV1PostMortemsReportsReportIdReasonsReasonId: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `reasonId` | *string* | :heavy_check_mark: | N/A | -| `patchV1PostMortemsReportsReportIdReasonsReasonId` | [components.PatchV1PostMortemsReportsReportIdReasonsReasonId](../../models/components/patchv1postmortemsreportsreportidreasonsreasonid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateretrospectivereportreasonorderrequest.md b/docs/models/operations/updateretrospectivereportreasonorderrequest.md deleted file mode 100644 index c22a4e8d..00000000 --- a/docs/models/operations/updateretrospectivereportreasonorderrequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# UpdateRetrospectiveReportReasonOrderRequest - -## Example Usage - -```typescript -import { UpdateRetrospectiveReportReasonOrderRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateRetrospectiveReportReasonOrderRequest = { - reportId: "", - putV1PostMortemsReportsReportIdReasonsOrder: { - oldPosition: 730856, - newPosition: 253941, - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `reportId` | *string* | :heavy_check_mark: | N/A | -| `putV1PostMortemsReportsReportIdReasonsOrder` | [components.PutV1PostMortemsReportsReportIdReasonsOrder](../../models/components/putv1postmortemsreportsreportidreasonsorder.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateretrospectivetemplatefieldstype.md b/docs/models/operations/updateretrospectivetemplatefieldstype.md new file mode 100644 index 00000000..7769042a --- /dev/null +++ b/docs/models/operations/updateretrospectivetemplatefieldstype.md @@ -0,0 +1,15 @@ +# UpdateRetrospectiveTemplateFieldsType + +## Example Usage + +```typescript +import { UpdateRetrospectiveTemplateFieldsType } from "firehydrant/models/operations"; + +let value: UpdateRetrospectiveTemplateFieldsType = "markdown"; +``` + +## Values + +```typescript +"text" | "single_select" | "multi_select" | "numeric" | "datetime" | "dynamic_input_group" | "markdown" | "markdown_text" +``` \ No newline at end of file diff --git a/docs/models/operations/updateretrospectivetemplaterequest.md b/docs/models/operations/updateretrospectivetemplaterequest.md new file mode 100644 index 00000000..71af5fc0 --- /dev/null +++ b/docs/models/operations/updateretrospectivetemplaterequest.md @@ -0,0 +1,32 @@ +# UpdateRetrospectiveTemplateRequest + +## Example Usage + +```typescript +import { UpdateRetrospectiveTemplateRequest } from "firehydrant/models/operations"; + +let value: UpdateRetrospectiveTemplateRequest = { + retrospectiveTemplateId: "", + requestBody: { + sectionsSlug: [ + "", + ], + sectionsElements: [ + "", + ], + fieldsLabel: [ + "", + ], + fieldsType: [ + "dynamic_input_group", + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `retrospectiveTemplateId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.UpdateRetrospectiveTemplateRequestBody](../../models/operations/updateretrospectivetemplaterequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateretrospectivetemplaterequestbody.md b/docs/models/operations/updateretrospectivetemplaterequestbody.md new file mode 100644 index 00000000..643814b2 --- /dev/null +++ b/docs/models/operations/updateretrospectivetemplaterequestbody.md @@ -0,0 +1,39 @@ +# UpdateRetrospectiveTemplateRequestBody + +## Example Usage + +```typescript +import { UpdateRetrospectiveTemplateRequestBody } from "firehydrant/models/operations"; + +let value: UpdateRetrospectiveTemplateRequestBody = { + sectionsSlug: [ + "", + ], + sectionsElements: [ + "", + ], + fieldsLabel: [ + "", + ], + fieldsType: [ + "numeric", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | N/A | +| `description` | *string* | :heavy_minus_sign: | N/A | +| `isDefault` | *boolean* | :heavy_minus_sign: | N/A | +| `sectionsSlug` | *string*[] | :heavy_check_mark: | N/A | +| `sectionsElements` | *string*[] | :heavy_check_mark: | N/A | +| `fieldsId` | *string*[] | :heavy_minus_sign: | N/A | +| `fieldsLabel` | *string*[] | :heavy_check_mark: | N/A | +| `fieldsType` | [operations.UpdateRetrospectiveTemplateFieldsType](../../models/operations/updateretrospectivetemplatefieldstype.md)[] | :heavy_check_mark: | N/A | +| `fieldsHelpText` | *string*[] | :heavy_minus_sign: | N/A | +| `fieldsPermissibleValues` | *string*[] | :heavy_minus_sign: | N/A | +| `fieldsIsRequired` | *boolean*[] | :heavy_minus_sign: | N/A | +| `fieldsSchema` | *string*[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updaterunbookexecutionsteprequest.md b/docs/models/operations/updaterunbookexecutionsteprequest.md index 1d1033e0..528b83ba 100644 --- a/docs/models/operations/updaterunbookexecutionsteprequest.md +++ b/docs/models/operations/updaterunbookexecutionsteprequest.md @@ -3,21 +3,21 @@ ## Example Usage ```typescript -import { UpdateRunbookExecutionStepRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateRunbookExecutionStepRequest } from "firehydrant/models/operations"; let value: UpdateRunbookExecutionStepRequest = { executionId: "", stepId: "", - putV1RunbooksExecutionsExecutionIdStepsStepId: { - state: "Alaska", + updateRunbookExecutionStep: { + state: "Wisconsin", }, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `executionId` | *string* | :heavy_check_mark: | N/A | -| `stepId` | *string* | :heavy_check_mark: | N/A | -| `putV1RunbooksExecutionsExecutionIdStepsStepId` | [components.PutV1RunbooksExecutionsExecutionIdStepsStepId](../../models/components/putv1runbooksexecutionsexecutionidstepsstepid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `executionId` | *string* | :heavy_check_mark: | N/A | +| `stepId` | *string* | :heavy_check_mark: | N/A | +| `updateRunbookExecutionStep` | [components.UpdateRunbookExecutionStep](../../models/components/updaterunbookexecutionstep.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updaterunbookexecutionstepscriptrequest.md b/docs/models/operations/updaterunbookexecutionstepscriptrequest.md new file mode 100644 index 00000000..6aff6701 --- /dev/null +++ b/docs/models/operations/updaterunbookexecutionstepscriptrequest.md @@ -0,0 +1,21 @@ +# UpdateRunbookExecutionStepScriptRequest + +## Example Usage + +```typescript +import { UpdateRunbookExecutionStepScriptRequest } from "firehydrant/models/operations"; + +let value: UpdateRunbookExecutionStepScriptRequest = { + executionId: "", + stepId: "", + state: "Maine", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `executionId` | *string* | :heavy_check_mark: | N/A | +| `stepId` | *string* | :heavy_check_mark: | N/A | +| `state` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updaterunbookexecutionstepscriptstaterequest.md b/docs/models/operations/updaterunbookexecutionstepscriptstaterequest.md deleted file mode 100644 index 9c23bdd4..00000000 --- a/docs/models/operations/updaterunbookexecutionstepscriptstaterequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdateRunbookExecutionStepScriptStateRequest - -## Example Usage - -```typescript -import { UpdateRunbookExecutionStepScriptStateRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateRunbookExecutionStepScriptStateRequest = { - executionId: "", - stepId: "", - state: "Hawaii", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `executionId` | *string* | :heavy_check_mark: | N/A | -| `stepId` | *string* | :heavy_check_mark: | N/A | -| `state` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updaterunbookexecutionstepvotesrequest.md b/docs/models/operations/updaterunbookexecutionstepvotesrequest.md deleted file mode 100644 index f96b0cb1..00000000 --- a/docs/models/operations/updaterunbookexecutionstepvotesrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# UpdateRunbookExecutionStepVotesRequest - -## Example Usage - -```typescript -import { UpdateRunbookExecutionStepVotesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateRunbookExecutionStepVotesRequest = { - executionId: "", - stepId: "", - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: { - direction: "down", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `executionId` | *string* | :heavy_check_mark: | N/A | -| `stepId` | *string* | :heavy_check_mark: | N/A | -| `patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes` | [components.PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes](../../models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotes.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updaterunbookexecutionvotesrequest.md b/docs/models/operations/updaterunbookexecutionvotesrequest.md deleted file mode 100644 index 74a7f1f1..00000000 --- a/docs/models/operations/updaterunbookexecutionvotesrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdateRunbookExecutionVotesRequest - -## Example Usage - -```typescript -import { UpdateRunbookExecutionVotesRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateRunbookExecutionVotesRequest = { - executionId: "", - patchV1RunbooksExecutionsExecutionIdVotes: { - direction: "down", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `executionId` | *string* | :heavy_check_mark: | N/A | -| `patchV1RunbooksExecutionsExecutionIdVotes` | [components.PatchV1RunbooksExecutionsExecutionIdVotes](../../models/components/patchv1runbooksexecutionsexecutionidvotes.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updaterunbookrequest.md b/docs/models/operations/updaterunbookrequest.md index 9dbadd6c..1afbfdfc 100644 --- a/docs/models/operations/updaterunbookrequest.md +++ b/docs/models/operations/updaterunbookrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateRunbookRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateRunbookRequest } from "firehydrant/models/operations"; let value: UpdateRunbookRequest = { runbookId: "", - putV1RunbooksRunbookId: {}, + updateRunbook: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `runbookId` | *string* | :heavy_check_mark: | N/A | -| `putV1RunbooksRunbookId` | [components.PutV1RunbooksRunbookId](../../models/components/putv1runbooksrunbookid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `runbookId` | *string* | :heavy_check_mark: | N/A | +| `updateRunbook` | [components.UpdateRunbook](../../models/components/updaterunbook.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatesavedsearchpathparamresourcetype.md b/docs/models/operations/updatesavedsearchpathparamresourcetype.md deleted file mode 100644 index 51ce780e..00000000 --- a/docs/models/operations/updatesavedsearchpathparamresourcetype.md +++ /dev/null @@ -1,15 +0,0 @@ -# UpdateSavedSearchPathParamResourceType - -## Example Usage - -```typescript -import { UpdateSavedSearchPathParamResourceType } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateSavedSearchPathParamResourceType = "alerts"; -``` - -## Values - -```typescript -"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" -``` \ No newline at end of file diff --git a/docs/models/operations/updatesavedsearchrequest.md b/docs/models/operations/updatesavedsearchrequest.md index c8d27360..b1104eb2 100644 --- a/docs/models/operations/updatesavedsearchrequest.md +++ b/docs/models/operations/updatesavedsearchrequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { UpdateSavedSearchRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateSavedSearchRequest } from "firehydrant/models/operations"; let value: UpdateSavedSearchRequest = { - resourceType: "alerts", + resourceType: "impact_analytics", savedSearchId: "", - patchV1SavedSearchesResourceTypeSavedSearchId: {}, + updateSavedSearch: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `resourceType` | [operations.UpdateSavedSearchPathParamResourceType](../../models/operations/updatesavedsearchpathparamresourcetype.md) | :heavy_check_mark: | N/A | -| `savedSearchId` | *string* | :heavy_check_mark: | N/A | -| `patchV1SavedSearchesResourceTypeSavedSearchId` | [components.PatchV1SavedSearchesResourceTypeSavedSearchId](../../models/components/patchv1savedsearchesresourcetypesavedsearchid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `resourceType` | [operations.UpdateSavedSearchResourceType](../../models/operations/updatesavedsearchresourcetype.md) | :heavy_check_mark: | N/A | +| `savedSearchId` | *string* | :heavy_check_mark: | N/A | +| `updateSavedSearch` | [components.UpdateSavedSearch](../../models/components/updatesavedsearch.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatesavedsearchresourcetype.md b/docs/models/operations/updatesavedsearchresourcetype.md new file mode 100644 index 00000000..8205e569 --- /dev/null +++ b/docs/models/operations/updatesavedsearchresourcetype.md @@ -0,0 +1,15 @@ +# UpdateSavedSearchResourceType + +## Example Usage + +```typescript +import { UpdateSavedSearchResourceType } from "firehydrant/models/operations"; + +let value: UpdateSavedSearchResourceType = "ticket_follow_ups"; +``` + +## Values + +```typescript +"change_events" | "incidents" | "services" | "scheduled_maintenances" | "ticket_tasks" | "ticket_follow_ups" | "analytics" | "impact_analytics" | "alerts" | "incident_events" +``` \ No newline at end of file diff --git a/docs/models/operations/updatescheduledmaintenancerequest.md b/docs/models/operations/updatescheduledmaintenancerequest.md index 09fa2a4b..d19ee856 100644 --- a/docs/models/operations/updatescheduledmaintenancerequest.md +++ b/docs/models/operations/updatescheduledmaintenancerequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateScheduledMaintenanceRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateScheduledMaintenanceRequest } from "firehydrant/models/operations"; let value: UpdateScheduledMaintenanceRequest = { scheduledMaintenanceId: "", - patchV1ScheduledMaintenancesScheduledMaintenanceId: {}, + updateScheduledMaintenance: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `scheduledMaintenanceId` | *string* | :heavy_check_mark: | N/A | -| `patchV1ScheduledMaintenancesScheduledMaintenanceId` | [components.PatchV1ScheduledMaintenancesScheduledMaintenanceId](../../models/components/patchv1scheduledmaintenancesscheduledmaintenanceid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `scheduledMaintenanceId` | *string* | :heavy_check_mark: | N/A | +| `updateScheduledMaintenance` | [components.UpdateScheduledMaintenance](../../models/components/updatescheduledmaintenance.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatescimgrouprequest.md b/docs/models/operations/updatescimgrouprequest.md index 89b4bf5c..0f5130d9 100644 --- a/docs/models/operations/updatescimgrouprequest.md +++ b/docs/models/operations/updatescimgrouprequest.md @@ -3,12 +3,12 @@ ## Example Usage ```typescript -import { UpdateScimGroupRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateScimGroupRequest } from "firehydrant/models/operations"; let value: UpdateScimGroupRequest = { id: "", - putV1ScimV2GroupsId: { - displayName: "Salvador.Larson", + updateScimGroup: { + displayName: "Garrett_Klein", members: [ { value: "", @@ -20,7 +20,7 @@ let value: UpdateScimGroupRequest = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `putV1ScimV2GroupsId` | [components.PutV1ScimV2GroupsId](../../models/components/putv1scimv2groupsid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateScimGroup` | [components.UpdateScimGroup](../../models/components/updatescimgroup.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatescimuserrequest.md b/docs/models/operations/updatescimuserrequest.md index a1dc2f41..f83768dd 100644 --- a/docs/models/operations/updatescimuserrequest.md +++ b/docs/models/operations/updatescimuserrequest.md @@ -3,24 +3,17 @@ ## Example Usage ```typescript -import { UpdateScimUserRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateScimUserRequest } from "firehydrant/models/operations"; let value: UpdateScimUserRequest = { id: "", - patchV1ScimV2UsersId: { - operations: [ - { - op: "", - path: "/sbin", - }, - ], - }, + updateScimUser: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1ScimV2UsersId` | [components.PatchV1ScimV2UsersId](../../models/components/patchv1scimv2usersid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateScimUser` | [components.UpdateScimUser](../../models/components/updatescimuser.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateservicedependencyrequest.md b/docs/models/operations/updateservicedependencyrequest.md index 0f0dda4a..53fc722e 100644 --- a/docs/models/operations/updateservicedependencyrequest.md +++ b/docs/models/operations/updateservicedependencyrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateServiceDependencyRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateServiceDependencyRequest } from "firehydrant/models/operations"; let value: UpdateServiceDependencyRequest = { serviceDependencyId: "", - patchV1ServiceDependenciesServiceDependencyId: {}, + updateServiceDependency: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | -| `serviceDependencyId` | *string* | :heavy_check_mark: | N/A | -| `patchV1ServiceDependenciesServiceDependencyId` | [components.PatchV1ServiceDependenciesServiceDependencyId](../../models/components/patchv1servicedependenciesservicedependencyid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `serviceDependencyId` | *string* | :heavy_check_mark: | N/A | +| `updateServiceDependency` | [components.UpdateServiceDependency](../../models/components/updateservicedependency.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateservicerequest.md b/docs/models/operations/updateservicerequest.md index 26dbd142..64a871b6 100644 --- a/docs/models/operations/updateservicerequest.md +++ b/docs/models/operations/updateservicerequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateServiceRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateServiceRequest } from "firehydrant/models/operations"; let value: UpdateServiceRequest = { serviceId: "", - patchV1ServicesServiceId: {}, + updateService: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `serviceId` | *string* | :heavy_check_mark: | N/A | -| `patchV1ServicesServiceId` | [components.PatchV1ServicesServiceId](../../models/components/patchv1servicesserviceid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `serviceId` | *string* | :heavy_check_mark: | N/A | +| `updateService` | [components.UpdateService](../../models/components/updateservice.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateseveritymatrixconditionrequest.md b/docs/models/operations/updateseveritymatrixconditionrequest.md index 71dd4431..4073cf14 100644 --- a/docs/models/operations/updateseveritymatrixconditionrequest.md +++ b/docs/models/operations/updateseveritymatrixconditionrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateSeverityMatrixConditionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateSeverityMatrixConditionRequest } from "firehydrant/models/operations"; let value: UpdateSeverityMatrixConditionRequest = { conditionId: "", - patchV1SeverityMatrixConditionsConditionId: {}, + updateSeverityMatrixCondition: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| `conditionId` | *string* | :heavy_check_mark: | N/A | -| `patchV1SeverityMatrixConditionsConditionId` | [components.PatchV1SeverityMatrixConditionsConditionId](../../models/components/patchv1severitymatrixconditionsconditionid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `conditionId` | *string* | :heavy_check_mark: | N/A | +| `updateSeverityMatrixCondition` | [components.UpdateSeverityMatrixCondition](../../models/components/updateseveritymatrixcondition.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateseveritymatriximpactrequest.md b/docs/models/operations/updateseveritymatriximpactrequest.md index 2f2c5094..19bf4066 100644 --- a/docs/models/operations/updateseveritymatriximpactrequest.md +++ b/docs/models/operations/updateseveritymatriximpactrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateSeverityMatrixImpactRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateSeverityMatrixImpactRequest } from "firehydrant/models/operations"; let value: UpdateSeverityMatrixImpactRequest = { impactId: "", - patchV1SeverityMatrixImpactsImpactId: {}, + updateSeverityMatrixImpact: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `impactId` | *string* | :heavy_check_mark: | N/A | -| `patchV1SeverityMatrixImpactsImpactId` | [components.PatchV1SeverityMatrixImpactsImpactId](../../models/components/patchv1severitymatriximpactsimpactid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `impactId` | *string* | :heavy_check_mark: | N/A | +| `updateSeverityMatrixImpact` | [components.UpdateSeverityMatrixImpact](../../models/components/updateseveritymatriximpact.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateseverityrequest.md b/docs/models/operations/updateseverityrequest.md index 4684fbbb..17ae1a11 100644 --- a/docs/models/operations/updateseverityrequest.md +++ b/docs/models/operations/updateseverityrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateSeverityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateSeverityRequest } from "firehydrant/models/operations"; let value: UpdateSeverityRequest = { severitySlug: "", - patchV1SeveritiesSeveritySlug: {}, + updateSeverity: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `severitySlug` | *string* | :heavy_check_mark: | N/A | -| `patchV1SeveritiesSeveritySlug` | [components.PatchV1SeveritiesSeveritySlug](../../models/components/patchv1severitiesseverityslug.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `severitySlug` | *string* | :heavy_check_mark: | N/A | +| `updateSeverity` | [components.UpdateSeverity](../../models/components/updateseverity.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatesignalemailtargetrequest.md b/docs/models/operations/updatesignalemailtargetrequest.md deleted file mode 100644 index 0fe76ac9..00000000 --- a/docs/models/operations/updatesignalemailtargetrequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateSignalEmailTargetRequest - -## Example Usage - -```typescript -import { UpdateSignalEmailTargetRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateSignalEmailTargetRequest = { - id: "", - patchV1SignalsEmailTargetsId: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1SignalsEmailTargetsId` | [components.PatchV1SignalsEmailTargetsId](../../models/components/patchv1signalsemailtargetsid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatesignalsemailtargetrequest.md b/docs/models/operations/updatesignalsemailtargetrequest.md new file mode 100644 index 00000000..c5128521 --- /dev/null +++ b/docs/models/operations/updatesignalsemailtargetrequest.md @@ -0,0 +1,19 @@ +# UpdateSignalsEmailTargetRequest + +## Example Usage + +```typescript +import { UpdateSignalsEmailTargetRequest } from "firehydrant/models/operations"; + +let value: UpdateSignalsEmailTargetRequest = { + id: "", + updateSignalsEmailTarget: {}, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateSignalsEmailTarget` | [components.UpdateSignalsEmailTarget](../../models/components/updatesignalsemailtarget.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatesignalswebhooktargetrequest.md b/docs/models/operations/updatesignalswebhooktargetrequest.md index b6b414fc..3e2da893 100644 --- a/docs/models/operations/updatesignalswebhooktargetrequest.md +++ b/docs/models/operations/updatesignalswebhooktargetrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateSignalsWebhookTargetRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateSignalsWebhookTargetRequest } from "firehydrant/models/operations"; let value: UpdateSignalsWebhookTargetRequest = { id: "", - patchV1SignalsWebhookTargetsId: {}, + updateSignalsWebhookTarget: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1SignalsWebhookTargetsId` | [components.PatchV1SignalsWebhookTargetsId](../../models/components/patchv1signalswebhooktargetsid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateSignalsWebhookTarget` | [components.UpdateSignalsWebhookTarget](../../models/components/updatesignalswebhooktarget.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateslackemojiactionrequest.md b/docs/models/operations/updateslackemojiactionrequest.md index 8f91d2fd..41fb2a1b 100644 --- a/docs/models/operations/updateslackemojiactionrequest.md +++ b/docs/models/operations/updateslackemojiactionrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { UpdateSlackEmojiActionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateSlackEmojiActionRequest } from "firehydrant/models/operations"; let value: UpdateSlackEmojiActionRequest = { connectionId: "", diff --git a/docs/models/operations/updateslackemojiactionrequestbody.md b/docs/models/operations/updateslackemojiactionrequestbody.md index d864c7d1..31926177 100644 --- a/docs/models/operations/updateslackemojiactionrequestbody.md +++ b/docs/models/operations/updateslackemojiactionrequestbody.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { UpdateSlackEmojiActionRequestBody } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateSlackEmojiActionRequestBody } from "firehydrant/models/operations"; let value: UpdateSlackEmojiActionRequestBody = {}; ``` diff --git a/docs/models/operations/updatestatuspagecomponentgrouprequest.md b/docs/models/operations/updatestatuspagecomponentgrouprequest.md deleted file mode 100644 index 3dad6653..00000000 --- a/docs/models/operations/updatestatuspagecomponentgrouprequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# UpdateStatusPageComponentGroupRequest - -## Example Usage - -```typescript -import { UpdateStatusPageComponentGroupRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateStatusPageComponentGroupRequest = { - nuncConnectionId: "", - groupId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `groupId` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [operations.UpdateStatusPageComponentGroupRequestBody](../../models/operations/updatestatuspagecomponentgrouprequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspagecomponentgrouprequestbody.md b/docs/models/operations/updatestatuspagecomponentgrouprequestbody.md deleted file mode 100644 index 49870454..00000000 --- a/docs/models/operations/updatestatuspagecomponentgrouprequestbody.md +++ /dev/null @@ -1,17 +0,0 @@ -# UpdateStatusPageComponentGroupRequestBody - -## Example Usage - -```typescript -import { UpdateStatusPageComponentGroupRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateStatusPageComponentGroupRequestBody = {}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *string* | :heavy_minus_sign: | N/A | -| `componentGroupId` | *string* | :heavy_minus_sign: | N/A | -| `position` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspageconnectionrequest.md b/docs/models/operations/updatestatuspageconnectionrequest.md index ab2d2ac3..e0327ed4 100644 --- a/docs/models/operations/updatestatuspageconnectionrequest.md +++ b/docs/models/operations/updatestatuspageconnectionrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateStatuspageConnectionRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateStatuspageConnectionRequest } from "firehydrant/models/operations"; let value: UpdateStatuspageConnectionRequest = { connectionId: "", - patchV1IntegrationsStatuspageConnectionsConnectionId: {}, + updateStatuspageConnection: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `connectionId` | *string* | :heavy_check_mark: | Connection UUID | -| `patchV1IntegrationsStatuspageConnectionsConnectionId` | [components.PatchV1IntegrationsStatuspageConnectionsConnectionId](../../models/components/patchv1integrationsstatuspageconnectionsconnectionid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `connectionId` | *string* | :heavy_check_mark: | Connection UUID | +| `updateStatuspageConnection` | [components.UpdateStatuspageConnection](../../models/components/updatestatuspageconnection.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspageimagefile.md b/docs/models/operations/updatestatuspageimagefile.md deleted file mode 100644 index 35841ef6..00000000 --- a/docs/models/operations/updatestatuspageimagefile.md +++ /dev/null @@ -1,16 +0,0 @@ -# UpdateStatusPageImageFile - -## Example Usage - -```typescript -import { UpdateStatusPageImageFile } from "firehydrant-typescript-sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `fileName` | *string* | :heavy_check_mark: | N/A | -| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspageimagerequest.md b/docs/models/operations/updatestatuspageimagerequest.md deleted file mode 100644 index 58c6ea71..00000000 --- a/docs/models/operations/updatestatuspageimagerequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# UpdateStatusPageImageRequest - -## Example Usage - -```typescript -import { UpdateStatusPageImageRequest } from "firehydrant-typescript-sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `type` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [operations.UpdateStatusPageImageRequestBody](../../models/operations/updatestatuspageimagerequestbody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspageimagerequestbody.md b/docs/models/operations/updatestatuspageimagerequestbody.md deleted file mode 100644 index cbe927ee..00000000 --- a/docs/models/operations/updatestatuspageimagerequestbody.md +++ /dev/null @@ -1,15 +0,0 @@ -# UpdateStatusPageImageRequestBody - -## Example Usage - -```typescript -import { UpdateStatusPageImageRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [operations.UpdateStatusPageImageFile](../../models/operations/updatestatuspageimagefile.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspagelinkrequest.md b/docs/models/operations/updatestatuspagelinkrequest.md deleted file mode 100644 index 2e46df54..00000000 --- a/docs/models/operations/updatestatuspagelinkrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# UpdateStatusPageLinkRequest - -## Example Usage - -```typescript -import { UpdateStatusPageLinkRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateStatusPageLinkRequest = { - nuncConnectionId: "", - linkId: "", - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `linkId` | *string* | :heavy_check_mark: | N/A | -| `patchV1NuncConnectionsNuncConnectionIdLinksLinkId` | [components.PatchV1NuncConnectionsNuncConnectionIdLinksLinkId](../../models/components/patchv1nuncconnectionsnuncconnectionidlinkslinkid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspagerequest.md b/docs/models/operations/updatestatuspagerequest.md deleted file mode 100644 index 14027dc6..00000000 --- a/docs/models/operations/updatestatuspagerequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# UpdateStatusPageRequest - -## Example Usage - -```typescript -import { UpdateStatusPageRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateStatusPageRequest = { - nuncConnectionId: "", - requestBody: { - conditionsNuncCondition: [ - "", - ], - conditionsConditionId: [ - "", - ], - componentsInfrastructureType: [ - "", - ], - componentsInfrastructureId: [ - "", - ], - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `nuncConnectionId` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [operations.UpdateStatusPageRequestBody](../../models/operations/updatestatuspagerequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatuspagerequestbody.md b/docs/models/operations/updatestatuspagerequestbody.md deleted file mode 100644 index ef12fd13..00000000 --- a/docs/models/operations/updatestatuspagerequestbody.md +++ /dev/null @@ -1,43 +0,0 @@ -# UpdateStatusPageRequestBody - -## Example Usage - -```typescript -import { UpdateStatusPageRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateStatusPageRequestBody = { - conditionsNuncCondition: [ - "", - ], - conditionsConditionId: [ - "", - ], - componentsInfrastructureType: [ - "", - ], - componentsInfrastructureId: [ - "", - ], -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `companyName` | *string* | :heavy_minus_sign: | N/A | -| `companyWebsite` | *string* | :heavy_minus_sign: | N/A | -| `companyTosUrl` | *string* | :heavy_minus_sign: | N/A | -| `greetingTitle` | *string* | :heavy_minus_sign: | N/A | -| `greetingBody` | *string* | :heavy_minus_sign: | N/A | -| `operationalMessage` | *string* | :heavy_minus_sign: | N/A | -| `title` | *string* | :heavy_minus_sign: | N/A | -| `conditionsNuncCondition` | *string*[] | :heavy_check_mark: | Status page condition to map your severity matrix condition to | -| `conditionsConditionId` | *string*[] | :heavy_check_mark: | Severity matrix condition id | -| `componentsInfrastructureType` | *string*[] | :heavy_check_mark: | N/A | -| `componentsInfrastructureId` | *string*[] | :heavy_check_mark: | N/A | -| `primaryColor` | *string* | :heavy_minus_sign: | N/A | -| `secondaryColor` | *string* | :heavy_minus_sign: | N/A | -| `exposedFields` | *string*[] | :heavy_minus_sign: | N/A | -| `enableHistogram` | *boolean* | :heavy_minus_sign: | N/A | -| `uiVersion` | *number* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatestatusupdatetemplaterequest.md b/docs/models/operations/updatestatusupdatetemplaterequest.md index 1c71a252..29481257 100644 --- a/docs/models/operations/updatestatusupdatetemplaterequest.md +++ b/docs/models/operations/updatestatusupdatetemplaterequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateStatusUpdateTemplateRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateStatusUpdateTemplateRequest } from "firehydrant/models/operations"; let value: UpdateStatusUpdateTemplateRequest = { statusUpdateTemplateId: "", - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: {}, + updateStatusUpdateTemplate: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `statusUpdateTemplateId` | *string* | :heavy_check_mark: | N/A | -| `patchV1StatusUpdateTemplatesStatusUpdateTemplateId` | [components.PatchV1StatusUpdateTemplatesStatusUpdateTemplateId](../../models/components/patchv1statusupdatetemplatesstatusupdatetemplateid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `statusUpdateTemplateId` | *string* | :heavy_check_mark: | N/A | +| `updateStatusUpdateTemplate` | [components.UpdateStatusUpdateTemplate](../../models/components/updatestatusupdatetemplate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatetasklistrequest.md b/docs/models/operations/updatetasklistrequest.md index 72505140..ec9a5592 100644 --- a/docs/models/operations/updatetasklistrequest.md +++ b/docs/models/operations/updatetasklistrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateTaskListRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTaskListRequest } from "firehydrant/models/operations"; let value: UpdateTaskListRequest = { taskListId: "", - patchV1TaskListsTaskListId: {}, + updateTaskList: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `taskListId` | *string* | :heavy_check_mark: | N/A | -| `patchV1TaskListsTaskListId` | [components.PatchV1TaskListsTaskListId](../../models/components/patchv1taskliststasklistid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `taskListId` | *string* | :heavy_check_mark: | N/A | +| `updateTaskList` | [components.UpdateTaskList](../../models/components/updatetasklist.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateteamescalationpolicyrequest.md b/docs/models/operations/updateteamescalationpolicyrequest.md index a8907ce1..13e814c1 100644 --- a/docs/models/operations/updateteamescalationpolicyrequest.md +++ b/docs/models/operations/updateteamescalationpolicyrequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { UpdateTeamEscalationPolicyRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTeamEscalationPolicyRequest } from "firehydrant/models/operations"; let value: UpdateTeamEscalationPolicyRequest = { teamId: "", id: "", - patchV1TeamsTeamIdEscalationPoliciesId: {}, + updateTeamEscalationPolicy: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1TeamsTeamIdEscalationPoliciesId` | [components.PatchV1TeamsTeamIdEscalationPoliciesId](../../models/components/patchv1teamsteamidescalationpoliciesid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateTeamEscalationPolicy` | [components.UpdateTeamEscalationPolicy](../../models/components/updateteamescalationpolicy.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateteamoncallschedulerequest.md b/docs/models/operations/updateteamoncallschedulerequest.md index f0168e12..4013b12a 100644 --- a/docs/models/operations/updateteamoncallschedulerequest.md +++ b/docs/models/operations/updateteamoncallschedulerequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { UpdateTeamOnCallScheduleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTeamOnCallScheduleRequest } from "firehydrant/models/operations"; let value: UpdateTeamOnCallScheduleRequest = { teamId: "", scheduleId: "", - patchV1TeamsTeamIdOnCallSchedulesScheduleId: {}, + updateTeamOnCallSchedule: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `scheduleId` | *string* | :heavy_check_mark: | N/A | -| `patchV1TeamsTeamIdOnCallSchedulesScheduleId` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleId](../../models/components/patchv1teamsteamidoncallschedulesscheduleid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `scheduleId` | *string* | :heavy_check_mark: | N/A | +| `updateTeamOnCallSchedule` | [components.UpdateTeamOnCallSchedule](../../models/components/updateteamoncallschedule.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateteamrequest.md b/docs/models/operations/updateteamrequest.md index 43bc7ccd..4cf7fd58 100644 --- a/docs/models/operations/updateteamrequest.md +++ b/docs/models/operations/updateteamrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateTeamRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTeamRequest } from "firehydrant/models/operations"; let value: UpdateTeamRequest = { teamId: "", - patchV1TeamsTeamId: {}, + updateTeam: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `patchV1TeamsTeamId` | [components.PatchV1TeamsTeamId](../../models/components/patchv1teamsteamid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `updateTeam` | [components.UpdateTeam](../../models/components/updateteam.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateteamscheduleshiftrequest.md b/docs/models/operations/updateteamscheduleshiftrequest.md deleted file mode 100644 index 2c22981b..00000000 --- a/docs/models/operations/updateteamscheduleshiftrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# UpdateTeamScheduleShiftRequest - -## Example Usage - -```typescript -import { UpdateTeamScheduleShiftRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateTeamScheduleShiftRequest = { - id: "", - teamId: "", - scheduleId: "", - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: {}, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| `id` | *string* | :heavy_check_mark: | N/A | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `scheduleId` | *string* | :heavy_check_mark: | N/A | -| `patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId` | [components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId](../../models/components/patchv1teamsteamidoncallschedulesscheduleidshiftsid.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateteamsignalrulerequest.md b/docs/models/operations/updateteamsignalrulerequest.md index 5b21f7b2..b926f64d 100644 --- a/docs/models/operations/updateteamsignalrulerequest.md +++ b/docs/models/operations/updateteamsignalrulerequest.md @@ -3,19 +3,19 @@ ## Example Usage ```typescript -import { UpdateTeamSignalRuleRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTeamSignalRuleRequest } from "firehydrant/models/operations"; let value: UpdateTeamSignalRuleRequest = { teamId: "", id: "", - patchV1TeamsTeamIdSignalRulesId: {}, + updateTeamSignalRule: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `teamId` | *string* | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1TeamsTeamIdSignalRulesId` | [components.PatchV1TeamsTeamIdSignalRulesId](../../models/components/patchv1teamsteamidsignalrulesid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `teamId` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateTeamSignalRule` | [components.UpdateTeamSignalRule](../../models/components/updateteamsignalrule.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateticketingfieldmaprequest.md b/docs/models/operations/updateticketingfieldmaprequest.md new file mode 100644 index 00000000..cc20e034 --- /dev/null +++ b/docs/models/operations/updateticketingfieldmaprequest.md @@ -0,0 +1,19 @@ +# UpdateTicketingFieldMapRequest + +## Example Usage + +```typescript +import { UpdateTicketingFieldMapRequest } from "firehydrant/models/operations"; + +let value: UpdateTicketingFieldMapRequest = { + mapId: "", + ticketingProjectId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `mapId` | *string* | :heavy_check_mark: | N/A | +| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateticketingpriorityrequest.md b/docs/models/operations/updateticketingpriorityrequest.md index 96d8f7ac..d001a666 100644 --- a/docs/models/operations/updateticketingpriorityrequest.md +++ b/docs/models/operations/updateticketingpriorityrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateTicketingPriorityRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTicketingPriorityRequest } from "firehydrant/models/operations"; let value: UpdateTicketingPriorityRequest = { id: "", - patchV1TicketingPrioritiesId: {}, + updateTicketingPriority: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `patchV1TicketingPrioritiesId` | [components.PatchV1TicketingPrioritiesId](../../models/components/patchv1ticketingprioritiesid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `updateTicketingPriority` | [components.UpdateTicketingPriority](../../models/components/updateticketingpriority.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateticketingprojectconfigrequest.md b/docs/models/operations/updateticketingprojectconfigrequest.md index f7ed43a8..d68c8f7d 100644 --- a/docs/models/operations/updateticketingprojectconfigrequest.md +++ b/docs/models/operations/updateticketingprojectconfigrequest.md @@ -3,7 +3,7 @@ ## Example Usage ```typescript -import { UpdateTicketingProjectConfigRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTicketingProjectConfigRequest } from "firehydrant/models/operations"; let value: UpdateTicketingProjectConfigRequest = { ticketingProjectId: "", diff --git a/docs/models/operations/updateticketingprojectfieldmaprequest.md b/docs/models/operations/updateticketingprojectfieldmaprequest.md deleted file mode 100644 index 933137b3..00000000 --- a/docs/models/operations/updateticketingprojectfieldmaprequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# UpdateTicketingProjectFieldMapRequest - -## Example Usage - -```typescript -import { UpdateTicketingProjectFieldMapRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: UpdateTicketingProjectFieldMapRequest = { - mapId: "", - ticketingProjectId: "", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `mapId` | *string* | :heavy_check_mark: | N/A | -| `ticketingProjectId` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updateticketrequest.md b/docs/models/operations/updateticketrequest.md index 7e255b9b..496ea5cd 100644 --- a/docs/models/operations/updateticketrequest.md +++ b/docs/models/operations/updateticketrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateTicketRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateTicketRequest } from "firehydrant/models/operations"; let value: UpdateTicketRequest = { ticketId: "", - patchV1TicketingTicketsTicketId: {}, + updateTicket: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `ticketId` | *string* | :heavy_check_mark: | N/A | -| `patchV1TicketingTicketsTicketId` | [components.PatchV1TicketingTicketsTicketId](../../models/components/patchv1ticketingticketsticketid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `ticketId` | *string* | :heavy_check_mark: | N/A | +| `updateTicket` | [components.UpdateTicket](../../models/components/updateticket.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatetranscriptattributionrequest.md b/docs/models/operations/updatetranscriptattributionrequest.md new file mode 100644 index 00000000..ea27826e --- /dev/null +++ b/docs/models/operations/updatetranscriptattributionrequest.md @@ -0,0 +1,21 @@ +# UpdateTranscriptAttributionRequest + +## Example Usage + +```typescript +import { UpdateTranscriptAttributionRequest } from "firehydrant/models/operations"; + +let value: UpdateTranscriptAttributionRequest = { + incidentId: "", + requestBody: { + toUserId: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.UpdateTranscriptAttributionRequestBody](../../models/operations/updatetranscriptattributionrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatetranscriptattributionrequestbody.md b/docs/models/operations/updatetranscriptattributionrequestbody.md new file mode 100644 index 00000000..b73beaf4 --- /dev/null +++ b/docs/models/operations/updatetranscriptattributionrequestbody.md @@ -0,0 +1,21 @@ +# UpdateTranscriptAttributionRequestBody + +## Example Usage + +```typescript +import { UpdateTranscriptAttributionRequestBody } from "firehydrant/models/operations"; + +let value: UpdateTranscriptAttributionRequestBody = { + toUserId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `fromSpeaker` | *string* | :heavy_minus_sign: | The speaker to attribute the transcript to. | +| `fromUserId` | *string* | :heavy_minus_sign: | The user to attribute the transcript to. | +| `toUserId` | *string* | :heavy_check_mark: | The ID of the user to attribute the transcript to. | +| `transcriptId` | *string* | :heavy_minus_sign: | The ID of the specific transcript entry to change attribution for. | +| `conferenceBridgeId` | *string* | :heavy_minus_sign: | The ID of the conference bridge to attribute the transcript to. | \ No newline at end of file diff --git a/docs/models/operations/updatevoterequest.md b/docs/models/operations/updatevoterequest.md new file mode 100644 index 00000000..9475ee7d --- /dev/null +++ b/docs/models/operations/updatevoterequest.md @@ -0,0 +1,23 @@ +# UpdateVoteRequest + +## Example Usage + +```typescript +import { UpdateVoteRequest } from "firehydrant/models/operations"; + +let value: UpdateVoteRequest = { + incidentId: "", + eventId: "", + updateVote: { + direction: "dig", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `eventId` | *string* | :heavy_check_mark: | N/A | +| `updateVote` | [components.UpdateVote](../../models/components/updatevote.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/updatewebhookrequest.md b/docs/models/operations/updatewebhookrequest.md index 55f13df2..06f22041 100644 --- a/docs/models/operations/updatewebhookrequest.md +++ b/docs/models/operations/updatewebhookrequest.md @@ -3,17 +3,17 @@ ## Example Usage ```typescript -import { UpdateWebhookRequest } from "firehydrant-typescript-sdk/models/operations"; +import { UpdateWebhookRequest } from "firehydrant/models/operations"; let value: UpdateWebhookRequest = { webhookId: "", - patchV1WebhooksWebhookId: {}, + updateWebhook: {}, }; ``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `webhookId` | *string* | :heavy_check_mark: | N/A | -| `patchV1WebhooksWebhookId` | [components.PatchV1WebhooksWebhookId](../../models/components/patchv1webhookswebhookid.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `webhookId` | *string* | :heavy_check_mark: | N/A | +| `updateWebhook` | [components.UpdateWebhook](../../models/components/updatewebhook.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/voteaiincidentsummaryrequest.md b/docs/models/operations/voteaiincidentsummaryrequest.md new file mode 100644 index 00000000..ae737813 --- /dev/null +++ b/docs/models/operations/voteaiincidentsummaryrequest.md @@ -0,0 +1,23 @@ +# VoteAiIncidentSummaryRequest + +## Example Usage + +```typescript +import { VoteAiIncidentSummaryRequest } from "firehydrant/models/operations"; + +let value: VoteAiIncidentSummaryRequest = { + incidentId: "", + generatedSummaryId: "", + requestBody: { + direction: "down", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `incidentId` | *string* | :heavy_check_mark: | N/A | +| `generatedSummaryId` | *string* | :heavy_check_mark: | N/A | +| `requestBody` | [operations.VoteAiIncidentSummaryRequestBody](../../models/operations/voteaiincidentsummaryrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/voteaiincidentsummaryrequestbody.md b/docs/models/operations/voteaiincidentsummaryrequestbody.md new file mode 100644 index 00000000..cfed77e6 --- /dev/null +++ b/docs/models/operations/voteaiincidentsummaryrequestbody.md @@ -0,0 +1,17 @@ +# VoteAiIncidentSummaryRequestBody + +## Example Usage + +```typescript +import { VoteAiIncidentSummaryRequestBody } from "firehydrant/models/operations"; + +let value: VoteAiIncidentSummaryRequestBody = { + direction: "up", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `direction` | [operations.Direction](../../models/operations/direction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/votedirection.md b/docs/models/operations/votedirection.md index e3e58ac9..c3e55e4d 100644 --- a/docs/models/operations/votedirection.md +++ b/docs/models/operations/votedirection.md @@ -3,9 +3,9 @@ ## Example Usage ```typescript -import { VoteDirection } from "firehydrant-typescript-sdk/models/operations"; +import { VoteDirection } from "firehydrant/models/operations"; -let value: VoteDirection = "up"; +let value: VoteDirection = "down"; ``` ## Values diff --git a/docs/models/operations/voteonincidentsummaryrequest.md b/docs/models/operations/voteonincidentsummaryrequest.md deleted file mode 100644 index 82add951..00000000 --- a/docs/models/operations/voteonincidentsummaryrequest.md +++ /dev/null @@ -1,23 +0,0 @@ -# VoteOnIncidentSummaryRequest - -## Example Usage - -```typescript -import { VoteOnIncidentSummaryRequest } from "firehydrant-typescript-sdk/models/operations"; - -let value: VoteOnIncidentSummaryRequest = { - incidentId: "", - generatedSummaryId: "", - requestBody: { - direction: "down", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `incidentId` | *string* | :heavy_check_mark: | N/A | -| `generatedSummaryId` | *string* | :heavy_check_mark: | N/A | -| `requestBody` | [operations.VoteOnIncidentSummaryRequestBody](../../models/operations/voteonincidentsummaryrequestbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/voteonincidentsummaryrequestbody.md b/docs/models/operations/voteonincidentsummaryrequestbody.md deleted file mode 100644 index e982b9f0..00000000 --- a/docs/models/operations/voteonincidentsummaryrequestbody.md +++ /dev/null @@ -1,17 +0,0 @@ -# VoteOnIncidentSummaryRequestBody - -## Example Usage - -```typescript -import { VoteOnIncidentSummaryRequestBody } from "firehydrant-typescript-sdk/models/operations"; - -let value: VoteOnIncidentSummaryRequestBody = { - direction: "down", -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `direction` | [operations.Direction](../../models/operations/direction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/accountsettings/README.md b/docs/sdks/accountsettings/README.md index 1a5657cc..90c2e7fd 100644 --- a/docs/sdks/accountsettings/README.md +++ b/docs/sdks/accountsettings/README.md @@ -3,110 +3,32 @@ ## Overview +Operations related to Account Settings + ### Available Operations +* [ping](#ping) - Check API connectivity +* [listEntitlements](#listentitlements) - List entitlements +* [pingNoauth](#pingnoauth) - Check API connectivity +* [getBootstrap](#getbootstrap) - Get initial application configuration * [getAiPreferences](#getaipreferences) - Get AI preferences * [updateAiPreferences](#updateaipreferences) - Update AI preferences -* [voteOnIncidentSummary](#voteonincidentsummary) - Vote on an AI-generated incident summary -* [getBootstrap](#getbootstrap) - Get initial application configuration and settings -* [listEntitlements](#listentitlements) - List entitlements -* [ping](#ping) - Check API connectivity -* [getSavedSearch](#getsavedsearch) - Get a saved search -* [deleteSavedSearch](#deletesavedsearch) - Delete a saved search -* [updateSavedSearch](#updatesavedsearch) - Update a saved search - -## getAiPreferences - -Retrieves the current AI preferences - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.accountSettings.getAiPreferences(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsGetAiPreferences } from "firehydrant-typescript-sdk/funcs/accountSettingsGetAiPreferences.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await accountSettingsGetAiPreferences(firehydrantTypescriptSDK); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.AIEntitiesPreferencesEntity](../../models/components/aientitiespreferencesentity.md)\>** - -### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## updateAiPreferences +## ping -Updates the AI preferences +Simple endpoint to verify your API connection is working ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings.updateAiPreferences(); + const result = await firehydrant.accountSettings.ping(); // Handle the result console.log(result); @@ -120,17 +42,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsUpdateAiPreferences } from "firehydrant-typescript-sdk/funcs/accountSettingsUpdateAiPreferences.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { accountSettingsPing } from "firehydrant/funcs/accountSettingsPing.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await accountSettingsUpdateAiPreferences(firehydrantTypescriptSDK); + const res = await accountSettingsPing(firehydrant); if (!res.ok) { throw res.error; @@ -149,205 +71,35 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateAiPreferencesRequestBody](../../models/operations/updateaipreferencesrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.AIEntitiesPreferencesEntity](../../models/components/aientitiespreferencesentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## voteOnIncidentSummary - -Vote on an AI-generated incident summary - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.accountSettings.voteOnIncidentSummary({ - incidentId: "", - generatedSummaryId: "", - requestBody: { - direction: "down", - }, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsVoteOnIncidentSummary } from "firehydrant-typescript-sdk/funcs/accountSettingsVoteOnIncidentSummary.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await accountSettingsVoteOnIncidentSummary(firehydrantTypescriptSDK, { - incidentId: "", - generatedSummaryId: "", - requestBody: { - direction: "down", - }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.VoteOnIncidentSummaryRequest](../../models/operations/voteonincidentsummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## getBootstrap - -Get initial application configuration and settings - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.accountSettings.getBootstrap(); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsGetBootstrap } from "firehydrant-typescript-sdk/funcs/accountSettingsGetBootstrap.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await accountSettingsGetBootstrap(firehydrantTypescriptSDK); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** +**Promise\<[components.PongEntity](../../models/components/pongentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## listEntitlements -Retrieve all entitlements +List the organization's entitlements ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings.listEntitlements({}); + const result = await firehydrant.accountSettings.listEntitlements({}); // Handle the result console.log(result); @@ -361,17 +113,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsListEntitlements } from "firehydrant-typescript-sdk/funcs/accountSettingsListEntitlements.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { accountSettingsListEntitlements } from "firehydrant/funcs/accountSettingsListEntitlements.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await accountSettingsListEntitlements(firehydrantTypescriptSDK, {}); + const res = await accountSettingsListEntitlements(firehydrant, {}); if (!res.ok) { throw res.error; @@ -401,31 +153,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## ping +## pingNoauth Simple endpoint to verify your API connection is working ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings.ping(); + const result = await firehydrant.accountSettings.pingNoauth(); // Handle the result console.log(result); @@ -439,17 +185,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsPing } from "firehydrant-typescript-sdk/funcs/accountSettingsPing.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { accountSettingsPingNoauth } from "firehydrant/funcs/accountSettingsPingNoauth.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await accountSettingsPing(firehydrantTypescriptSDK); + const res = await accountSettingsPingNoauth(firehydrant); if (!res.ok) { throw res.error; @@ -478,34 +224,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getSavedSearch +## getBootstrap -Retrieve a specific save search +Get initial application configuration ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings.getSavedSearch({ - resourceType: "impact_analytics", - savedSearchId: "", - }); + const result = await firehydrant.accountSettings.getBootstrap(); // Handle the result console.log(result); @@ -519,20 +256,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsGetSavedSearch } from "firehydrant-typescript-sdk/funcs/accountSettingsGetSavedSearch.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { accountSettingsGetBootstrap } from "firehydrant/funcs/accountSettingsGetBootstrap.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await accountSettingsGetSavedSearch(firehydrantTypescriptSDK, { - resourceType: "impact_analytics", - savedSearchId: "", - }); + const res = await accountSettingsGetBootstrap(firehydrant); if (!res.ok) { throw res.error; @@ -551,47 +285,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSavedSearchRequest](../../models/operations/getsavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.SavedSearchEntity](../../models/components/savedsearchentity.md)\>** +**Promise\<[components.PublicApiv1BootstrapEntity](../../models/components/publicapiv1bootstrapentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteSavedSearch +## getAiPreferences -Delete a specific saved search +Retrieves the current AI preferences ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.accountSettings.deleteSavedSearch({ - resourceType: "scheduled_maintenances", - savedSearchId: "", - }); - + const result = await firehydrant.accountSettings.getAiPreferences(); + // Handle the result + console.log(result); } run(); @@ -602,20 +327,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsDeleteSavedSearch } from "firehydrant-typescript-sdk/funcs/accountSettingsDeleteSavedSearch.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { accountSettingsGetAiPreferences } from "firehydrant/funcs/accountSettingsGetAiPreferences.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await accountSettingsDeleteSavedSearch(firehydrantTypescriptSDK, { - resourceType: "scheduled_maintenances", - savedSearchId: "", - }); + const res = await accountSettingsGetAiPreferences(firehydrant); if (!res.ok) { throw res.error; @@ -623,7 +345,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -633,46 +356,35 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteSavedSearchRequest](../../models/operations/deletesavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.AIEntitiesPreferencesEntity](../../models/components/aientitiespreferencesentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateSavedSearch +## updateAiPreferences -Update a specific saved search +Updates the AI preferences ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.accountSettings.updateSavedSearch({ - resourceType: "ticket_tasks", - savedSearchId: "", - patchV1SavedSearchesResourceTypeSavedSearchId: {}, - }); + const result = await firehydrant.accountSettings.updateAiPreferences(); // Handle the result console.log(result); @@ -686,21 +398,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { accountSettingsUpdateSavedSearch } from "firehydrant-typescript-sdk/funcs/accountSettingsUpdateSavedSearch.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { accountSettingsUpdateAiPreferences } from "firehydrant/funcs/accountSettingsUpdateAiPreferences.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await accountSettingsUpdateSavedSearch(firehydrantTypescriptSDK, { - resourceType: "ticket_tasks", - savedSearchId: "", - patchV1SavedSearchesResourceTypeSavedSearchId: {}, - }); + const res = await accountSettingsUpdateAiPreferences(firehydrant); if (!res.ok) { throw res.error; @@ -719,23 +427,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateSavedSearchRequest](../../models/operations/updatesavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateAiPreferencesRequest](../../models/operations/updateaipreferencesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.SavedSearchEntity](../../models/components/savedsearchentity.md)\>** +**Promise\<[components.AIEntitiesPreferencesEntity](../../models/components/aientitiespreferencesentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/alerts/README.md b/docs/sdks/alerts/README.md index 1aada79a..383b9872 100644 --- a/docs/sdks/alerts/README.md +++ b/docs/sdks/alerts/README.md @@ -7,27 +7,31 @@ Operations related to Alerts ### Available Operations -* [list](#list) - List alerts -* [get](#get) - Get an alert -* [listForIncident](#listforincident) - List alerts for an incident -* [create](#create) - Attach alerts to an incident -* [listProcessingLogs](#listprocessinglogs) - List alert processing log entries +* [listIncidentAlerts](#listincidentalerts) - List alerts for an incident +* [createIncidentAlert](#createincidentalert) - Attach an alert to an incident +* [updateIncidentAlertPrimary](#updateincidentalertprimary) - Set an alert as primary for an incident +* [deleteIncidentAlert](#deleteincidentalert) - Remove an alert from an incident +* [listAlerts](#listalerts) - List alerts +* [getAlert](#getalert) - Get an alert +* [listProcessingLogEntries](#listprocessinglogentries) - List alert processing log entries -## list +## listIncidentAlerts -Retrieve all alerts from third parties +List alerts that have been attached to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.alerts.list({}); + const result = await firehydrant.alerts.listIncidentAlerts({ + incidentId: "", + }); // Handle the result console.log(result); @@ -41,17 +45,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { alertsList } from "firehydrant-typescript-sdk/funcs/alertsList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { alertsListIncidentAlerts } from "firehydrant/funcs/alertsListIncidentAlerts.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await alertsList(firehydrantTypescriptSDK, {}); + const res = await alertsListIncidentAlerts(firehydrant, { + incidentId: "", + }); if (!res.ok) { throw res.error; @@ -70,47 +76,45 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAlertsRequest](../../models/operations/listalertsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentAlertsRequest](../../models/operations/listincidentalertsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.AlertsAlertEntityPaginated](../../models/components/alertsalertentitypaginated.md)\>** +**Promise\<[components.IncidentsAlertEntityPaginated](../../models/components/incidentsalertentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## createIncidentAlert -Retrieve a single alert +Add an alert to an incident. FireHydrant needs to have ingested the alert from a third party system in order to attach it to the incident. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.alerts.get({ - alertId: "", + await firehydrant.alerts.createIncidentAlert({ + incidentId: "", + requestBody: [ + "", + "", + "", + ], }); - // Handle the result - console.log(result); + } run(); @@ -121,18 +125,23 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { alertsGet } from "firehydrant-typescript-sdk/funcs/alertsGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { alertsCreateIncidentAlert } from "firehydrant/funcs/alertsCreateIncidentAlert.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await alertsGet(firehydrantTypescriptSDK, { - alertId: "", + const res = await alertsCreateIncidentAlert(firehydrant, { + incidentId: "", + requestBody: [ + "", + "", + "", + ], }); if (!res.ok) { @@ -141,8 +150,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -152,43 +160,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAlertRequest](../../models/operations/getalertrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentAlertRequest](../../models/operations/createincidentalertrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.AlertsAlertEntity](../../models/components/alertsalertentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listForIncident +## updateIncidentAlertPrimary -List alerts that have been attached to an incident +Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.alerts.listForIncident({ + const result = await firehydrant.alerts.updateIncidentAlertPrimary({ + incidentAlertId: "", incidentId: "", + updateIncidentAlertPrimary: { + primary: false, + }, }); // Handle the result @@ -203,18 +209,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { alertsListForIncident } from "firehydrant-typescript-sdk/funcs/alertsListForIncident.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { alertsUpdateIncidentAlertPrimary } from "firehydrant/funcs/alertsUpdateIncidentAlertPrimary.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await alertsListForIncident(firehydrantTypescriptSDK, { + const res = await alertsUpdateIncidentAlertPrimary(firehydrant, { + incidentAlertId: "", incidentId: "", + updateIncidentAlertPrimary: { + primary: false, + }, }); if (!res.ok) { @@ -234,46 +244,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentAlertsRequest](../../models/operations/listincidentalertsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentAlertPrimaryRequest](../../models/operations/updateincidentalertprimaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsAlertEntityPaginated](../../models/components/incidentsalertentitypaginated.md)\>** +**Promise\<[components.IncidentsAlertEntity](../../models/components/incidentsalertentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## deleteIncidentAlert -Add an alert to an incident. FireHydrant needs to have ingested the alert from a third party system in order to attach it to the incident. +Remove an alert from an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.alerts.create({ + await firehydrant.alerts.deleteIncidentAlert({ + incidentAlertId: "", incidentId: "", - requestBody: [ - "", - ], }); @@ -287,21 +289,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { alertsCreate } from "firehydrant-typescript-sdk/funcs/alertsCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { alertsDeleteIncidentAlert } from "firehydrant/funcs/alertsDeleteIncidentAlert.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await alertsCreate(firehydrantTypescriptSDK, { + const res = await alertsDeleteIncidentAlert(firehydrant, { + incidentAlertId: "", incidentId: "", - requestBody: [ - "", - ], }); if (!res.ok) { @@ -320,7 +320,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentAlertsRequest](../../models/operations/createincidentalertsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentAlertRequest](../../models/operations/deleteincidentalertrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -331,31 +331,173 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listAlerts + +Retrieve all alerts from third parties + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.alerts.listAlerts({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { alertsListAlerts } from "firehydrant/funcs/alertsListAlerts.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await alertsListAlerts(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAlertsRequest](../../models/operations/listalertsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AlertsAlertEntityPaginated](../../models/components/alertsalertentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getAlert + +Retrieve a single alert + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.alerts.getAlert({ + alertId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { alertsGetAlert } from "firehydrant/funcs/alertsGetAlert.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await alertsGetAlert(firehydrant, { + alertId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAlertRequest](../../models/operations/getalertrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AlertsAlertEntity](../../models/components/alertsalertentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listProcessingLogs +## listProcessingLogEntries Processing Log Entries for a specific alert ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.alerts.listProcessingLogs({}); + const result = await firehydrant.alerts.listProcessingLogEntries({}); // Handle the result console.log(result); @@ -369,17 +511,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { alertsListProcessingLogs } from "firehydrant-typescript-sdk/funcs/alertsListProcessingLogs.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { alertsListProcessingLogEntries } from "firehydrant/funcs/alertsListProcessingLogEntries.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await alertsListProcessingLogs(firehydrantTypescriptSDK, {}); + const res = await alertsListProcessingLogEntries(firehydrant, {}); if (!res.ok) { throw res.error; @@ -398,7 +540,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAlertProcessingLogsRequest](../../models/operations/listalertprocessinglogsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListProcessingLogEntriesRequest](../../models/operations/listprocessinglogentriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -409,12 +551,6 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/audiences/README.md b/docs/sdks/audiences/README.md new file mode 100644 index 00000000..8842feb7 --- /dev/null +++ b/docs/sdks/audiences/README.md @@ -0,0 +1,876 @@ +# Audiences +(*audiences*) + +## Overview + +Operations related to Audiences + +### Available Operations + +* [listAudiences](#listaudiences) - List audiences +* [createAudience](#createaudience) - Create audience +* [getAudience](#getaudience) - Get audience +* [archiveAudience](#archiveaudience) - Archive audience +* [updateAudience](#updateaudience) - Update audience +* [restoreAudience](#restoreaudience) - Restore audience +* [getMemberDefaultAudience](#getmemberdefaultaudience) - Get default audience +* [setMemberDefaultAudience](#setmemberdefaultaudience) - Set default audience +* [getAudienceSummary](#getaudiencesummary) - Get latest summary +* [generateAudienceSummary](#generateaudiencesummary) - Generate summary +* [listAudienceSummaries](#listaudiencesummaries) - List audience summaries + +## listAudiences + +List all audiences + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.listAudiences({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesListAudiences } from "firehydrant/funcs/audiencesListAudiences.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesListAudiences(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAudiencesRequest](../../models/operations/listaudiencesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createAudience + +Create a new audience + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.createAudience({ + name: "", + description: "sandy closely closely suddenly whose rear", + detailsQuestion: [ + "", + ], + detailsPrompt: [ + "", + ], + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesCreateAudience } from "firehydrant/funcs/audiencesCreateAudience.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesCreateAudience(firehydrant, { + name: "", + description: "sandy closely closely suddenly whose rear", + detailsQuestion: [ + "", + ], + detailsPrompt: [ + "", + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateAudienceRequest](../../models/operations/createaudiencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getAudience + +Get audience details + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.getAudience({ + audienceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesGetAudience } from "firehydrant/funcs/audiencesGetAudience.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesGetAudience(firehydrant, { + audienceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAudienceRequest](../../models/operations/getaudiencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## archiveAudience + +Archive an audience + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.archiveAudience({ + audienceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesArchiveAudience } from "firehydrant/funcs/audiencesArchiveAudience.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesArchiveAudience(firehydrant, { + audienceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ArchiveAudienceRequest](../../models/operations/archiveaudiencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateAudience + +Update an existing audience + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.updateAudience({ + audienceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesUpdateAudience } from "firehydrant/funcs/audiencesUpdateAudience.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesUpdateAudience(firehydrant, { + audienceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateAudienceRequest](../../models/operations/updateaudiencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## restoreAudience + +Restore a previously archived audience + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.restoreAudience({ + audienceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesRestoreAudience } from "firehydrant/funcs/audiencesRestoreAudience.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesRestoreAudience(firehydrant, { + audienceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RestoreAudienceRequest](../../models/operations/restoreaudiencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getMemberDefaultAudience + +Get member's default audience + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.getMemberDefaultAudience({ + memberId: 518189, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesGetMemberDefaultAudience } from "firehydrant/funcs/audiencesGetMemberDefaultAudience.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesGetMemberDefaultAudience(firehydrant, { + memberId: 518189, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetMemberDefaultAudienceRequest](../../models/operations/getmemberdefaultaudiencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## setMemberDefaultAudience + +Set member's default audience + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.setMemberDefaultAudience({ + memberId: 191738, + requestBody: { + audienceId: "", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesSetMemberDefaultAudience } from "firehydrant/funcs/audiencesSetMemberDefaultAudience.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesSetMemberDefaultAudience(firehydrant, { + memberId: 191738, + requestBody: { + audienceId: "", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SetMemberDefaultAudienceRequest](../../models/operations/setmemberdefaultaudiencerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceEntity](../../models/components/audiencesentitiesaudienceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getAudienceSummary + +Get the latest audience-specific summary for an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.getAudienceSummary({ + audienceId: "", + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesGetAudienceSummary } from "firehydrant/funcs/audiencesGetAudienceSummary.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesGetAudienceSummary(firehydrant, { + audienceId: "", + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAudienceSummaryRequest](../../models/operations/getaudiencesummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AIEntitiesIncidentSummaryEntity](../../models/components/aientitiesincidentsummaryentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## generateAudienceSummary + +Generate a new audience-specific summary for an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.generateAudienceSummary({ + audienceId: "", + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesGenerateAudienceSummary } from "firehydrant/funcs/audiencesGenerateAudienceSummary.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesGenerateAudienceSummary(firehydrant, { + audienceId: "", + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GenerateAudienceSummaryRequest](../../models/operations/generateaudiencesummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AIEntitiesIncidentSummaryEntity](../../models/components/aientitiesincidentsummaryentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listAudienceSummaries + +List all audience summaries for an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.audiences.listAudienceSummaries({ + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { audiencesListAudienceSummaries } from "firehydrant/funcs/audiencesListAudienceSummaries.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await audiencesListAudienceSummaries(firehydrant, { + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAudienceSummariesRequest](../../models/operations/listaudiencesummariesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.AudiencesEntitiesAudienceSummariesEntity](../../models/components/audiencesentitiesaudiencesummariesentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/aws/README.md b/docs/sdks/aws/README.md deleted file mode 100644 index 2378311e..00000000 --- a/docs/sdks/aws/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# Aws -(*integrations.aws*) - -## Overview - -### Available Operations - -* [getCloudTrailBatch](#getcloudtrailbatch) - Get an AWS CloudTrail batch -* [updateConnection](#updateconnection) - Update an AWS connection - -## getCloudTrailBatch - -Retrieve a single CloudTrail batch. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.integrations.aws.getCloudTrailBatch({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsAwsGetCloudTrailBatch } from "firehydrant-typescript-sdk/funcs/integrationsAwsGetCloudTrailBatch.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsAwsGetCloudTrailBatch(firehydrantTypescriptSDK, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAwsCloudTrailBatchRequest](../../models/operations/getawscloudtrailbatchrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.IntegrationsAwsCloudtrailBatchEntity](../../models/components/integrationsawscloudtrailbatchentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## updateConnection - -Update the AWS connection with the provided data. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.integrations.aws.updateConnection({ - id: "", - patchV1IntegrationsAwsConnectionsId: {}, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsAwsUpdateConnection } from "firehydrant-typescript-sdk/funcs/integrationsAwsUpdateConnection.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsAwsUpdateConnection(firehydrantTypescriptSDK, { - id: "", - patchV1IntegrationsAwsConnectionsId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateAwsConnectionRequest](../../models/operations/updateawsconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.IntegrationsAwsConnectionEntity](../../models/components/integrationsawsconnectionentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/awscloudtrailbatchevents/README.md b/docs/sdks/awscloudtrailbatchevents/README.md deleted file mode 100644 index 1e469351..00000000 --- a/docs/sdks/awscloudtrailbatchevents/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# AwsCloudtrailBatchEvents -(*awsCloudtrailBatchEvents*) - -## Overview - -### Available Operations - -* [list](#list) - List events for an AWS CloudTrail batch - -## list - -List events for an AWS CloudTrail batch - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.awsCloudtrailBatchEvents.list({ - id: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { awsCloudtrailBatchEventsList } from "firehydrant-typescript-sdk/funcs/awsCloudtrailBatchEventsList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await awsCloudtrailBatchEventsList(firehydrantTypescriptSDK, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAwsCloudtrailBatchEventsRequest](../../models/operations/getawscloudtrailbatcheventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/awsconnections/README.md b/docs/sdks/awsconnections/README.md deleted file mode 100644 index 2d7de960..00000000 --- a/docs/sdks/awsconnections/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# AwsConnections -(*awsConnections*) - -## Overview - -### Available Operations - -* [list](#list) - List AWS integration connections -* [get](#get) - Get an AWS connection - -## list - -Lists the available and configured AWS integration connections for the authenticated organization. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.awsConnections.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { awsConnectionsList } from "firehydrant-typescript-sdk/funcs/awsConnectionsList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await awsConnectionsList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAwsConnectionsRequest](../../models/operations/listawsconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.IntegrationsAwsConnectionEntityPaginated](../../models/components/integrationsawsconnectionentitypaginated.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## get - -Retrieves the information about the AWS connection. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.awsConnections.get({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { awsConnectionsGet } from "firehydrant-typescript-sdk/funcs/awsConnectionsGet.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await awsConnectionsGet(firehydrantTypescriptSDK, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetAwsConnectionRequest](../../models/operations/getawsconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.IntegrationsAwsConnectionEntity](../../models/components/integrationsawsconnectionentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/callroutes/README.md b/docs/sdks/callroutes/README.md new file mode 100644 index 00000000..82e4e534 --- /dev/null +++ b/docs/sdks/callroutes/README.md @@ -0,0 +1,80 @@ +# CallRoutes +(*callRoutes*) + +## Overview + +Operations about Call Routes + +### Available Operations + +* [listCallRoutes](#listcallroutes) - List call routes + +## listCallRoutes + +List call routes for the organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.callRoutes.listCallRoutes({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { callRoutesListCallRoutes } from "firehydrant/funcs/callRoutesListCallRoutes.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await callRoutesListCallRoutes(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCallRoutesRequest](../../models/operations/listcallroutesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/catalogentries/README.md b/docs/sdks/catalogentries/README.md new file mode 100644 index 00000000..f78a8025 --- /dev/null +++ b/docs/sdks/catalogentries/README.md @@ -0,0 +1,2338 @@ +# CatalogEntries +(*catalogEntries*) + +## Overview + +Operations related to Catalog Entries + +### Available Operations + +* [listEnvironments](#listenvironments) - List environments +* [createEnvironment](#createenvironment) - Create an environment +* [getEnvironment](#getenvironment) - Get an environment +* [deleteEnvironment](#deleteenvironment) - Archive an environment +* [updateEnvironment](#updateenvironment) - Update an environment +* [listServices](#listservices) - List services +* [createService](#createservice) - Create a service +* [createServiceLinks](#createservicelinks) - Create multiple services linked to external services +* [getService](#getservice) - Get a service +* [deleteService](#deleteservice) - Delete a service +* [updateService](#updateservice) - Update a service +* [getServiceDependencies](#getservicedependencies) - List dependencies for a service +* [listServiceAvailableUpstreamDependencies](#listserviceavailableupstreamdependencies) - List available upstream service dependencies +* [listServiceAvailableDownstreamDependencies](#listserviceavailabledownstreamdependencies) - List available downstream service dependencies +* [deleteServiceLink](#deleteservicelink) - Delete a service link +* [createServiceChecklistResponse](#createservicechecklistresponse) - Record a response for a checklist item +* [createServiceDependency](#createservicedependency) - Create a service dependency +* [getServiceDependency](#getservicedependency) - Get a service dependency +* [deleteServiceDependency](#deleteservicedependency) - Delete a service dependency +* [updateServiceDependency](#updateservicedependency) - Update a service dependency +* [listFunctionalities](#listfunctionalities) - List functionalities +* [createFunctionality](#createfunctionality) - Create a functionality +* [getFunctionality](#getfunctionality) - Get a functionality +* [deleteFunctionality](#deletefunctionality) - Archive a functionality +* [updateFunctionality](#updatefunctionality) - Update a functionality +* [listFunctionalityServices](#listfunctionalityservices) - List services for a functionality +* [listUserOwnedServices](#listuserownedservices) - List services owned by a user's teams +* [listInfrastructures](#listinfrastructures) - Lists functionality, service and environment objects +* [refreshCatalog](#refreshcatalog) - Refresh a service catalog +* [ingestCatalogData](#ingestcatalogdata) - Ingest service catalog data + +## listEnvironments + +List all of the environments that have been added to the organiation + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listEnvironments({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListEnvironments } from "firehydrant/funcs/catalogEntriesListEnvironments.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListEnvironments(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListEnvironmentsRequest](../../models/operations/listenvironmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EnvironmentEntryEntityPaginated](../../models/components/environmententryentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createEnvironment + +Creates an environment for the organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.createEnvironment({ + name: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesCreateEnvironment } from "firehydrant/funcs/catalogEntriesCreateEnvironment.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesCreateEnvironment(firehydrant, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateEnvironment](../../models/components/createenvironment.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getEnvironment + +Retrieves a single environment by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.getEnvironment({ + environmentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesGetEnvironment } from "firehydrant/funcs/catalogEntriesGetEnvironment.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesGetEnvironment(firehydrant, { + environmentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetEnvironmentRequest](../../models/operations/getenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteEnvironment + +Archive an environment + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.deleteEnvironment({ + environmentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesDeleteEnvironment } from "firehydrant/funcs/catalogEntriesDeleteEnvironment.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesDeleteEnvironment(firehydrant, { + environmentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteEnvironmentRequest](../../models/operations/deleteenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateEnvironment + +Update a environments attributes + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.updateEnvironment({ + environmentId: "", + updateEnvironment: { + name: "", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesUpdateEnvironment } from "firehydrant/funcs/catalogEntriesUpdateEnvironment.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesUpdateEnvironment(firehydrant, { + environmentId: "", + updateEnvironment: { + name: "", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateEnvironmentRequest](../../models/operations/updateenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listServices + +List all of the services that have been added to the organization. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listServices({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListServices } from "firehydrant/funcs/catalogEntriesListServices.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListServices(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListServicesRequest](../../models/operations/listservicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceEntityPaginated](../../models/components/serviceentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createService + +Creates a service for the organization, you may also create or attach functionalities to the service on create. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.createService({ + name: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesCreateService } from "firehydrant/funcs/catalogEntriesCreateService.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesCreateService(firehydrant, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateService](../../models/components/createservice.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createServiceLinks + +Creates a service with the appropriate integration for each external service ID passed + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.createServiceLinks({ + externalServiceIds: "", + connectionId: "", + integration: "victorops", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesCreateServiceLinks } from "firehydrant/funcs/catalogEntriesCreateServiceLinks.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesCreateServiceLinks(firehydrant, { + externalServiceIds: "", + connectionId: "", + integration: "victorops", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateServiceLinks](../../models/components/createservicelinks.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceLinkEntity[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getService + +Retrieves a single service by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.getService({ + serviceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesGetService } from "firehydrant/funcs/catalogEntriesGetService.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesGetService(firehydrant, { + serviceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetServiceRequest](../../models/operations/getservicerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteService + +Deletes the service from FireHydrant. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.deleteService({ + serviceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesDeleteService } from "firehydrant/funcs/catalogEntriesDeleteService.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesDeleteService(firehydrant, { + serviceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteServiceRequest](../../models/operations/deleteservicerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateService + +Update a services attributes, you may also add or remove functionalities from the service as well. +Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. + + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.updateService({ + serviceId: "", + updateService: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesUpdateService } from "firehydrant/funcs/catalogEntriesUpdateService.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesUpdateService(firehydrant, { + serviceId: "", + updateService: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateServiceRequest](../../models/operations/updateservicerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getServiceDependencies + +Retrieves a service's dependencies + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.getServiceDependencies({ + serviceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesGetServiceDependencies } from "firehydrant/funcs/catalogEntriesGetServiceDependencies.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesGetServiceDependencies(firehydrant, { + serviceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetServiceDependenciesRequest](../../models/operations/getservicedependenciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceWithAllDependenciesEntity](../../models/components/servicewithalldependenciesentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listServiceAvailableUpstreamDependencies + +Retrieves all services that are available to be upstream dependencies + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listServiceAvailableUpstreamDependencies({ + serviceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListServiceAvailableUpstreamDependencies } from "firehydrant/funcs/catalogEntriesListServiceAvailableUpstreamDependencies.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListServiceAvailableUpstreamDependencies(firehydrant, { + serviceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListServiceAvailableUpstreamDependenciesRequest](../../models/operations/listserviceavailableupstreamdependenciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceEntityLite](../../models/components/serviceentitylite.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listServiceAvailableDownstreamDependencies + +Retrieves all services that are available to be downstream dependencies + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listServiceAvailableDownstreamDependencies({ + serviceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListServiceAvailableDownstreamDependencies } from "firehydrant/funcs/catalogEntriesListServiceAvailableDownstreamDependencies.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListServiceAvailableDownstreamDependencies(firehydrant, { + serviceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListServiceAvailableDownstreamDependenciesRequest](../../models/operations/listserviceavailabledownstreamdependenciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceEntityLite](../../models/components/serviceentitylite.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteServiceLink + +Deletes a service link from FireHydrant. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.catalogEntries.deleteServiceLink({ + serviceId: "", + remoteId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesDeleteServiceLink } from "firehydrant/funcs/catalogEntriesDeleteServiceLink.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesDeleteServiceLink(firehydrant, { + serviceId: "", + remoteId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteServiceLinkRequest](../../models/operations/deleteservicelinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createServiceChecklistResponse + +Creates a response for a checklist item + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.catalogEntries.createServiceChecklistResponse({ + serviceId: "", + checklistId: "", + createServiceChecklistResponse: { + checkId: "", + status: true, + }, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesCreateServiceChecklistResponse } from "firehydrant/funcs/catalogEntriesCreateServiceChecklistResponse.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesCreateServiceChecklistResponse(firehydrant, { + serviceId: "", + checklistId: "", + createServiceChecklistResponse: { + checkId: "", + status: true, + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateServiceChecklistResponseRequest](../../models/operations/createservicechecklistresponserequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createServiceDependency + +Creates a service dependency relationship between two services + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.createServiceDependency({ + serviceId: "", + connectedServiceId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesCreateServiceDependency } from "firehydrant/funcs/catalogEntriesCreateServiceDependency.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesCreateServiceDependency(firehydrant, { + serviceId: "", + connectedServiceId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateServiceDependency](../../models/components/createservicedependency.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getServiceDependency + +Retrieves a single service dependency by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.getServiceDependency({ + serviceDependencyId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesGetServiceDependency } from "firehydrant/funcs/catalogEntriesGetServiceDependency.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesGetServiceDependency(firehydrant, { + serviceDependencyId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetServiceDependencyRequest](../../models/operations/getservicedependencyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteServiceDependency + +Deletes a single service dependency + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.deleteServiceDependency({ + serviceDependencyId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesDeleteServiceDependency } from "firehydrant/funcs/catalogEntriesDeleteServiceDependency.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesDeleteServiceDependency(firehydrant, { + serviceDependencyId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteServiceDependencyRequest](../../models/operations/deleteservicedependencyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateServiceDependency + +Update the notes of the service dependency + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.updateServiceDependency({ + serviceDependencyId: "", + updateServiceDependency: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesUpdateServiceDependency } from "firehydrant/funcs/catalogEntriesUpdateServiceDependency.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesUpdateServiceDependency(firehydrant, { + serviceDependencyId: "", + updateServiceDependency: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateServiceDependencyRequest](../../models/operations/updateservicedependencyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listFunctionalities + +List all of the functionalities that have been added to the organiation + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listFunctionalities({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListFunctionalities } from "firehydrant/funcs/catalogEntriesListFunctionalities.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListFunctionalities(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListFunctionalitiesRequest](../../models/operations/listfunctionalitiesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.FunctionalityEntityPaginated](../../models/components/functionalityentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createFunctionality + +Creates a functionality for the organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.createFunctionality({ + name: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesCreateFunctionality } from "firehydrant/funcs/catalogEntriesCreateFunctionality.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesCreateFunctionality(firehydrant, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateFunctionality](../../models/components/createfunctionality.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getFunctionality + +Retrieves a single functionality by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.getFunctionality({ + functionalityId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesGetFunctionality } from "firehydrant/funcs/catalogEntriesGetFunctionality.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesGetFunctionality(firehydrant, { + functionalityId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetFunctionalityRequest](../../models/operations/getfunctionalityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteFunctionality + +Archive a functionality + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.deleteFunctionality({ + functionalityId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesDeleteFunctionality } from "firehydrant/funcs/catalogEntriesDeleteFunctionality.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesDeleteFunctionality(firehydrant, { + functionalityId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteFunctionalityRequest](../../models/operations/deletefunctionalityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateFunctionality + +Update a functionalities attributes + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.updateFunctionality({ + functionalityId: "", + updateFunctionality: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesUpdateFunctionality } from "firehydrant/funcs/catalogEntriesUpdateFunctionality.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesUpdateFunctionality(firehydrant, { + functionalityId: "", + updateFunctionality: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateFunctionalityRequest](../../models/operations/updatefunctionalityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listFunctionalityServices + +List services for a functionality + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listFunctionalityServices({ + functionalityId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListFunctionalityServices } from "firehydrant/funcs/catalogEntriesListFunctionalityServices.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListFunctionalityServices(firehydrant, { + functionalityId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListFunctionalityServicesRequest](../../models/operations/listfunctionalityservicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.FunctionalityWithAllServicesEntity](../../models/components/functionalitywithallservicesentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listUserOwnedServices + +Retrieves a list of services owned by the teams a user is on + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listUserOwnedServices({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListUserOwnedServices } from "firehydrant/funcs/catalogEntriesListUserOwnedServices.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListUserOwnedServices(firehydrant, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListUserOwnedServicesRequest](../../models/operations/listuserownedservicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TeamEntityPaginated[]](../../models/.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listInfrastructures + +Lists functionality, service and environment objects + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.listInfrastructures({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesListInfrastructures } from "firehydrant/funcs/catalogEntriesListInfrastructures.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesListInfrastructures(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListInfrastructuresRequest](../../models/operations/listinfrastructuresrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.InfrastructureSearchEntity](../../models/components/infrastructuresearchentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## refreshCatalog + +Schedules an async task to re-import catalog info and update catalog data accordingly. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.catalogEntries.refreshCatalog({ + catalogId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesRefreshCatalog } from "firehydrant/funcs/catalogEntriesRefreshCatalog.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesRefreshCatalog(firehydrant, { + catalogId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshCatalogRequest](../../models/operations/refreshcatalogrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## ingestCatalogData + +Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.catalogEntries.ingestCatalogData({ + catalogId: "", + ingestCatalogData: { + encoding: "application/x-yaml", + data: "", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { catalogEntriesIngestCatalogData } from "firehydrant/funcs/catalogEntriesIngestCatalogData.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await catalogEntriesIngestCatalogData(firehydrant, { + catalogId: "", + ingestCatalogData: { + encoding: "application/x-yaml", + data: "", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.IngestCatalogDataRequest](../../models/operations/ingestcatalogdatarequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ImportsImportEntity](../../models/components/importsimportentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/catalogs/README.md b/docs/sdks/catalogs/README.md deleted file mode 100644 index 76864326..00000000 --- a/docs/sdks/catalogs/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# Catalogs -(*services.catalogs*) - -## Overview - -### Available Operations - -* [ingest](#ingest) - Ingest service catalog data -* [refresh](#refresh) - Refresh a service catalog - -## ingest - -Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.catalogs.ingest({ - catalogId: "", - postV1CatalogsCatalogIdIngest: { - encoding: "application/json", - data: "", - }, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesCatalogsIngest } from "firehydrant-typescript-sdk/funcs/servicesCatalogsIngest.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesCatalogsIngest(firehydrantTypescriptSDK, { - catalogId: "", - postV1CatalogsCatalogIdIngest: { - encoding: "application/json", - data: "", - }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.IngestCatalogDataRequest](../../models/operations/ingestcatalogdatarequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ImportsImportEntity](../../models/components/importsimportentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## refresh - -Schedules an async task to re-import catalog info and update catalog data accordingly. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.services.catalogs.refresh({ - catalogId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesCatalogsRefresh } from "firehydrant-typescript-sdk/funcs/servicesCatalogsRefresh.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesCatalogsRefresh(firehydrantTypescriptSDK, { - catalogId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RefreshCatalogRequest](../../models/operations/refreshcatalogrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/changes/README.md b/docs/sdks/changes/README.md index 9299dc2c..506cfc59 100644 --- a/docs/sdks/changes/README.md +++ b/docs/sdks/changes/README.md @@ -7,116 +7,36 @@ Operations related to Changes ### Available Operations -* [listTypes](#listtypes) - List change types -* [list](#list) - List changes -* [create](#create) - Create a change -* [listEvents](#listevents) - List change events -* [createEvent](#createevent) - Create a change event -* [getEvent](#getevent) - Get a change event -* [deleteEvent](#deleteevent) - Delete a change event -* [updateEvent](#updateevent) - Update a change event -* [delete](#delete) - Archive a change -* [update](#update) - Update a change -* [listIdentities](#listidentities) - List identities for a change -* [createIdentity](#createidentity) - Create an identity for a change -* [deleteIdentity](#deleteidentity) - Delete an identity from a change -* [updateIdentity](#updateidentity) - Update an identity for a change -* [get](#get) - Get a scheduled maintenance event -* [updateScheduledMaintenance](#updatescheduledmaintenance) - Update a scheduled maintenance event - -## listTypes - -Lists all change types +* [listChanges](#listchanges) - List changes +* [createChange](#createchange) - Create a new change entry +* [deleteChange](#deletechange) - Archive a change entry +* [updateChange](#updatechange) - Update a change entry +* [listChangeIdentities](#listchangeidentities) - List identities for a change entry +* [createChangeIdentity](#createchangeidentity) - Create an identity for a change entry +* [deleteChangeIdentity](#deletechangeidentity) - Delete an identity from a change entry +* [updateChangeIdentity](#updatechangeidentity) - Update an identity for a change entry +* [listChangeEvents](#listchangeevents) - List change events +* [createChangeEvent](#createchangeevent) - Create a change event +* [getChangeEvent](#getchangeevent) - Get a change event +* [deleteChangeEvent](#deletechangeevent) - Delete a change event +* [updateChangeEvent](#updatechangeevent) - Update a change event +* [listChangeTypes](#listchangetypes) - List change types + +## listChanges + +List changes for the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.listTypes({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesListTypes } from "firehydrant-typescript-sdk/funcs/changesListTypes.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await changesListTypes(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListChangeTypesRequest](../../models/operations/listchangetypesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ChangeTypeEntityPaginated](../../models/components/changetypeentitypaginated.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## list - -Lists all changes - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.changes.list({}); + await firehydrant.changes.listChanges({}); } @@ -129,17 +49,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesList } from "firehydrant-typescript-sdk/funcs/changesList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesListChanges } from "firehydrant/funcs/changesListChanges.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesList(firehydrantTypescriptSDK, {}); + const res = await changesListChanges(firehydrant, {}); if (!res.ok) { throw res.error; @@ -168,31 +88,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## createChange Create a new change entry ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.create({}); + const result = await firehydrant.changes.createChange({}); // Handle the result console.log(result); @@ -206,17 +120,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesCreate } from "firehydrant-typescript-sdk/funcs/changesCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesCreateChange } from "firehydrant/funcs/changesCreateChange.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesCreate(firehydrantTypescriptSDK, {}); + const res = await changesCreateChange(firehydrant, {}); if (!res.ok) { throw res.error; @@ -235,7 +149,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Changes](../../models/components/postv1changes.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateChange](../../models/components/createchange.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -246,35 +160,30 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## listEvents +## deleteChange -List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it +Archive a change entry ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.listEvents({}); + await firehydrant.changes.deleteChange({ + changeId: "", + }); + - // Handle the result - console.log(result); } run(); @@ -285,17 +194,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesListEvents } from "firehydrant-typescript-sdk/funcs/changesListEvents.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesDeleteChange } from "firehydrant/funcs/changesDeleteChange.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesListEvents(firehydrantTypescriptSDK, {}); + const res = await changesDeleteChange(firehydrant, { + changeId: "", + }); if (!res.ok) { throw res.error; @@ -303,8 +214,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -314,43 +224,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListChangeEventsRequest](../../models/operations/listchangeeventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteChangeRequest](../../models/operations/deletechangerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChangeEventSlimEntityPaginated](../../models/components/changeeventslimentitypaginated.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createEvent +## updateChange -Create a change event +Update a change entry ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.createEvent({ - summary: "", + const result = await firehydrant.changes.updateChange({ + changeId: "", + updateChange: {}, }); // Handle the result @@ -365,18 +270,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesCreateEvent } from "firehydrant-typescript-sdk/funcs/changesCreateEvent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesUpdateChange } from "firehydrant/funcs/changesUpdateChange.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesCreateEvent(firehydrantTypescriptSDK, { - summary: "", + const res = await changesUpdateChange(firehydrant, { + changeId: "", + updateChange: {}, }); if (!res.ok) { @@ -396,43 +302,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.ChangesEvents](../../models/components/changesevents.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateChangeRequest](../../models/operations/updatechangerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChangeEventEntity](../../models/components/changeevententity.md)\>** +**Promise\<[components.ChangeEntity](../../models/components/changeentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getEvent +## listChangeIdentities -Retrieve a change event +Retrieve all identities for the change entry ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.getEvent({ - changeEventId: "", + const result = await firehydrant.changes.listChangeIdentities({ + changeId: "", }); // Handle the result @@ -447,18 +347,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesGetEvent } from "firehydrant-typescript-sdk/funcs/changesGetEvent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesListChangeIdentities } from "firehydrant/funcs/changesListChangeIdentities.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesGetEvent(firehydrantTypescriptSDK, { - changeEventId: "", + const res = await changesListChangeIdentities(firehydrant, { + changeId: "", }); if (!res.ok) { @@ -478,124 +378,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetChangeEventRequest](../../models/operations/getchangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ChangeEventEntity](../../models/components/changeevententity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## deleteEvent - -Delete a change event - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.changes.deleteEvent({ - changeEventId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesDeleteEvent } from "firehydrant-typescript-sdk/funcs/changesDeleteEvent.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await changesDeleteEvent(firehydrantTypescriptSDK, { - changeEventId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteChangeEventRequest](../../models/operations/deletechangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListChangeIdentitiesRequest](../../models/operations/listchangeidentitiesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.ChangeIdentityEntityPaginated](../../models/components/changeidentityentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateEvent +## createChangeIdentity -Update a change event +Create an identity for the change entry ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.updateEvent({ - changeEventId: "", - patchV1ChangesEventsChangeEventId: {}, + const result = await firehydrant.changes.createChangeIdentity({ + changeId: "", + createChangeIdentity: { + type: "", + value: "", + }, }); // Handle the result @@ -610,19 +427,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesUpdateEvent } from "firehydrant-typescript-sdk/funcs/changesUpdateEvent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesCreateChangeIdentity } from "firehydrant/funcs/changesCreateChangeIdentity.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesUpdateEvent(firehydrantTypescriptSDK, { - changeEventId: "", - patchV1ChangesEventsChangeEventId: {}, + const res = await changesCreateChangeIdentity(firehydrant, { + changeId: "", + createChangeIdentity: { + type: "", + value: "", + }, }); if (!res.ok) { @@ -642,42 +462,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateChangeEventRequest](../../models/operations/updatechangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateChangeIdentityRequest](../../models/operations/createchangeidentityrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChangeEventEntity](../../models/components/changeevententity.md)\>** +**Promise\<[components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## delete +## deleteChangeIdentity -Archive a change entry +Delete an identity from the change entry ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.changes.delete({ + await firehydrant.changes.deleteChangeIdentity({ + identityId: "", changeId: "", }); @@ -692,17 +508,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesDelete } from "firehydrant-typescript-sdk/funcs/changesDelete.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesDeleteChangeIdentity } from "firehydrant/funcs/changesDeleteChangeIdentity.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesDelete(firehydrantTypescriptSDK, { + const res = await changesDeleteChangeIdentity(firehydrant, { + identityId: "", changeId: "", }); @@ -722,7 +539,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteChangeRequest](../../models/operations/deletechangerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteChangeIdentityRequest](../../models/operations/deletechangeidentityrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -733,33 +550,32 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## update +## updateChangeIdentity -Update a change entry +Update an identity for the change entry ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.update({ + const result = await firehydrant.changes.updateChangeIdentity({ + identityId: "", changeId: "", - patchV1ChangesChangeId: {}, + updateChangeIdentity: { + type: "", + value: "", + }, }); // Handle the result @@ -774,19 +590,23 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesUpdate } from "firehydrant-typescript-sdk/funcs/changesUpdate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesUpdateChangeIdentity } from "firehydrant/funcs/changesUpdateChangeIdentity.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesUpdate(firehydrantTypescriptSDK, { + const res = await changesUpdateChangeIdentity(firehydrant, { + identityId: "", changeId: "", - patchV1ChangesChangeId: {}, + updateChangeIdentity: { + type: "", + value: "", + }, }); if (!res.ok) { @@ -806,44 +626,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateChangeRequest](../../models/operations/updatechangerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateChangeIdentityRequest](../../models/operations/updatechangeidentityrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChangeEntity](../../models/components/changeentity.md)\>** +**Promise\<[components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## listIdentities +## listChangeEvents -Retrieve all identities for the change +List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.listIdentities({ - changeId: "", - }); + const result = await firehydrant.changes.listChangeEvents({}); // Handle the result console.log(result); @@ -857,19 +670,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesListIdentities } from "firehydrant-typescript-sdk/funcs/changesListIdentities.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesListChangeEvents } from "firehydrant/funcs/changesListChangeEvents.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesListIdentities(firehydrantTypescriptSDK, { - changeId: "", - }); + const res = await changesListChangeEvents(firehydrant, {}); if (!res.ok) { throw res.error; @@ -888,47 +699,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListChangeIdentitiesRequest](../../models/operations/listchangeidentitiesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListChangeEventsRequest](../../models/operations/listchangeeventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChangeIdentityEntityPaginated](../../models/components/changeidentityentitypaginated.md)\>** +**Promise\<[components.ChangeEventSlimEntityPaginated](../../models/components/changeeventslimentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createIdentity +## createChangeEvent -Create an identity for this change +Create a change event ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.createIdentity({ - changeId: "", - postV1ChangesChangeIdIdentities: { - type: "", - value: "", - }, + const result = await firehydrant.changes.createChangeEvent({ + summary: "", }); // Handle the result @@ -943,22 +744,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesCreateIdentity } from "firehydrant-typescript-sdk/funcs/changesCreateIdentity.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesCreateChangeEvent } from "firehydrant/funcs/changesCreateChangeEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesCreateIdentity(firehydrantTypescriptSDK, { - changeId: "", - postV1ChangesChangeIdIdentities: { - type: "", - value: "", - }, + const res = await changesCreateChangeEvent(firehydrant, { + summary: "", }); if (!res.ok) { @@ -978,48 +775,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateChangeIdentityRequest](../../models/operations/createchangeidentityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateChangeEvent](../../models/components/createchangeevent.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)\>** +**Promise\<[components.ChangeEventEntity](../../models/components/changeevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteIdentity +## getChangeEvent -Delete an identity +Retrieve a change event ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.changes.deleteIdentity({ - identityId: "", - changeId: "", + const result = await firehydrant.changes.getChangeEvent({ + changeEventId: "", }); - + // Handle the result + console.log(result); } run(); @@ -1030,19 +820,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesDeleteIdentity } from "firehydrant-typescript-sdk/funcs/changesDeleteIdentity.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesGetChangeEvent } from "firehydrant/funcs/changesGetChangeEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesDeleteIdentity(firehydrantTypescriptSDK, { - identityId: "", - changeId: "", + const res = await changesGetChangeEvent(firehydrant, { + changeEventId: "", }); if (!res.ok) { @@ -1051,7 +840,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1061,53 +851,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteChangeIdentityRequest](../../models/operations/deletechangeidentityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetChangeEventRequest](../../models/operations/getchangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.ChangeEventEntity](../../models/components/changeevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateIdentity +## deleteChangeEvent -Update an identity +Delete a change event ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.updateIdentity({ - identityId: "", - changeId: "", - patchV1ChangesChangeIdIdentitiesIdentityId: { - type: "", - value: "", - }, + await firehydrant.changes.deleteChangeEvent({ + changeEventId: "", }); - // Handle the result - console.log(result); + } run(); @@ -1118,23 +895,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesUpdateIdentity } from "firehydrant-typescript-sdk/funcs/changesUpdateIdentity.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesDeleteChangeEvent } from "firehydrant/funcs/changesDeleteChangeEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesUpdateIdentity(firehydrantTypescriptSDK, { - identityId: "", - changeId: "", - patchV1ChangesChangeIdIdentitiesIdentityId: { - type: "", - value: "", - }, + const res = await changesDeleteChangeEvent(firehydrant, { + changeEventId: "", }); if (!res.ok) { @@ -1143,8 +915,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1154,44 +925,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateChangeIdentityRequest](../../models/operations/updatechangeidentityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteChangeEventRequest](../../models/operations/deletechangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChangeIdentityEntity](../../models/components/changeidentityentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## updateChangeEvent -Fetch the details of a scheduled maintenance event. +Update a change event ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.get({ - scheduledMaintenanceId: "", + const result = await firehydrant.changes.updateChangeEvent({ + changeEventId: "", + updateChangeEvent: {}, }); // Handle the result @@ -1206,18 +971,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesGet } from "firehydrant-typescript-sdk/funcs/changesGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesUpdateChangeEvent } from "firehydrant/funcs/changesUpdateChangeEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesGet(firehydrantTypescriptSDK, { - scheduledMaintenanceId: "", + const res = await changesUpdateChangeEvent(firehydrant, { + changeEventId: "", + updateChangeEvent: {}, }); if (!res.ok) { @@ -1237,45 +1003,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetScheduledMaintenanceRequest](../../models/operations/getscheduledmaintenancerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateChangeEventRequest](../../models/operations/updatechangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** +**Promise\<[components.ChangeEventEntity](../../models/components/changeevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateScheduledMaintenance +## listChangeTypes -Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. +List change types for the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.changes.updateScheduledMaintenance({ - scheduledMaintenanceId: "", - patchV1ScheduledMaintenancesScheduledMaintenanceId: {}, - }); + const result = await firehydrant.changes.listChangeTypes({}); // Handle the result console.log(result); @@ -1289,20 +1046,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { changesUpdateScheduledMaintenance } from "firehydrant-typescript-sdk/funcs/changesUpdateScheduledMaintenance.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { changesListChangeTypes } from "firehydrant/funcs/changesListChangeTypes.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await changesUpdateScheduledMaintenance(firehydrantTypescriptSDK, { - scheduledMaintenanceId: "", - patchV1ScheduledMaintenancesScheduledMaintenanceId: {}, - }); + const res = await changesListChangeTypes(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1321,23 +1075,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateScheduledMaintenanceRequest](../../models/operations/updatescheduledmaintenancerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListChangeTypesRequest](../../models/operations/listchangetypesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** +**Promise\<[components.ChangeTypeEntityPaginated](../../models/components/changetypeentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/checklisttemplates/README.md b/docs/sdks/checklisttemplates/README.md deleted file mode 100644 index 8f23cc27..00000000 --- a/docs/sdks/checklisttemplates/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# ChecklistTemplates -(*checklistTemplates*) - -## Overview - -### Available Operations - -* [get](#get) - Get a checklist template - -## get - -Retrieves a single checklist template by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.checklistTemplates.get({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { checklistTemplatesGet } from "firehydrant-typescript-sdk/funcs/checklistTemplatesGet.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await checklistTemplatesGet(firehydrantTypescriptSDK, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetChecklistTemplateRequest](../../models/operations/getchecklisttemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/communication/README.md b/docs/sdks/communication/README.md index 29b7a293..239b219d 100644 --- a/docs/sdks/communication/README.md +++ b/docs/sdks/communication/README.md @@ -7,26 +7,27 @@ Operations related to Communication ### Available Operations -* [listTemplates](#listtemplates) - List status update templates -* [getTemplate](#gettemplate) - Get a status update template +* [listStatusUpdateTemplates](#liststatusupdatetemplates) - List status update templates +* [createStatusUpdateTemplate](#createstatusupdatetemplate) - Create a status update template +* [getStatusUpdateTemplate](#getstatusupdatetemplate) - Get a status update template * [deleteStatusUpdateTemplate](#deletestatusupdatetemplate) - Delete a status update template -* [updateTemplate](#updatetemplate) - Update a status update template +* [updateStatusUpdateTemplate](#updatestatusupdatetemplate) - Update a status update template -## listTemplates +## listStatusUpdateTemplates List all status update templates for your organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.communication.listTemplates({}); + const result = await firehydrant.communication.listStatusUpdateTemplates({}); // Handle the result console.log(result); @@ -40,17 +41,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { communicationListTemplates } from "firehydrant-typescript-sdk/funcs/communicationListTemplates.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { communicationListStatusUpdateTemplates } from "firehydrant/funcs/communicationListStatusUpdateTemplates.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await communicationListTemplates(firehydrantTypescriptSDK, {}); + const res = await communicationListStatusUpdateTemplates(firehydrant, {}); if (!res.ok) { throw res.error; @@ -80,31 +81,103 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getTemplate +## createStatusUpdateTemplate + +Create a status update template for your organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.communication.createStatusUpdateTemplate({ + name: "", + body: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { communicationCreateStatusUpdateTemplate } from "firehydrant/funcs/communicationCreateStatusUpdateTemplate.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await communicationCreateStatusUpdateTemplate(firehydrant, { + name: "", + body: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateStatusUpdateTemplate](../../models/components/createstatusupdatetemplate.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.StatusUpdateTemplateEntity](../../models/components/statusupdatetemplateentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getStatusUpdateTemplate Get a single status update template by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.communication.getTemplate({ + const result = await firehydrant.communication.getStatusUpdateTemplate({ statusUpdateTemplateId: "", }); @@ -120,17 +193,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { communicationGetTemplate } from "firehydrant-typescript-sdk/funcs/communicationGetTemplate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { communicationGetStatusUpdateTemplate } from "firehydrant/funcs/communicationGetStatusUpdateTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await communicationGetTemplate(firehydrantTypescriptSDK, { + const res = await communicationGetStatusUpdateTemplate(firehydrant, { statusUpdateTemplateId: "", }); @@ -162,15 +235,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## deleteStatusUpdateTemplate @@ -179,14 +246,14 @@ Delete a single status update template ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.communication.deleteStatusUpdateTemplate({ + const result = await firehydrant.communication.deleteStatusUpdateTemplate({ statusUpdateTemplateId: "", }); @@ -202,17 +269,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { communicationDeleteStatusUpdateTemplate } from "firehydrant-typescript-sdk/funcs/communicationDeleteStatusUpdateTemplate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { communicationDeleteStatusUpdateTemplate } from "firehydrant/funcs/communicationDeleteStatusUpdateTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await communicationDeleteStatusUpdateTemplate(firehydrantTypescriptSDK, { + const res = await communicationDeleteStatusUpdateTemplate(firehydrant, { statusUpdateTemplateId: "", }); @@ -244,33 +311,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateTemplate +## updateStatusUpdateTemplate Update a single status update template ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.communication.updateTemplate({ + const result = await firehydrant.communication.updateStatusUpdateTemplate({ statusUpdateTemplateId: "", - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: {}, + updateStatusUpdateTemplate: {}, }); // Handle the result @@ -285,19 +346,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { communicationUpdateTemplate } from "firehydrant-typescript-sdk/funcs/communicationUpdateTemplate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { communicationUpdateStatusUpdateTemplate } from "firehydrant/funcs/communicationUpdateStatusUpdateTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await communicationUpdateTemplate(firehydrantTypescriptSDK, { + const res = await communicationUpdateStatusUpdateTemplate(firehydrant, { statusUpdateTemplateId: "", - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: {}, + updateStatusUpdateTemplate: {}, }); if (!res.ok) { @@ -328,12 +389,6 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/confluence/README.md b/docs/sdks/confluence/README.md deleted file mode 100644 index e0ebda15..00000000 --- a/docs/sdks/confluence/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# Confluence -(*confluence*) - -## Overview - -### Available Operations - -* [listSpaces](#listspaces) - List Confluence spaces - -## listSpaces - -Lists available space keys for the Confluence integration connection. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.confluence.listSpaces({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { confluenceListSpaces } from "firehydrant-typescript-sdk/funcs/confluenceListSpaces.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await confluenceListSpaces(firehydrantTypescriptSDK, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListConfluenceSpacesRequest](../../models/operations/listconfluencespacesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.IntegrationsConfluenceCloudSpaceKeyEntity](../../models/components/integrationsconfluencecloudspacekeyentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 4a828e8b..19a91132 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -7,31 +7,197 @@ Operations related to Conversations ### Available Operations -* [listComments](#listcomments) - List comments for a conversation -* [createComment](#createcomment) - Create a comment for a conversation -* [getComment](#getcomment) - Get a conversation comment -* [deleteComment](#deletecomment) - Delete a conversation comment -* [updateComment](#updatecomment) - Update a conversation comment +* [getVoteStatus](#getvotestatus) - Get votes +* [updateVote](#updatevote) - Update votes +* [deleteCommentReaction](#deletecommentreaction) - Delete a reaction from a conversation comment * [listCommentReactions](#listcommentreactions) - List reactions for a conversation comment * [createCommentReaction](#createcommentreaction) - Create a reaction for a conversation comment -* [deleteCommentReaction](#deletecommentreaction) - Delete a reaction from a conversation comment +* [getComment](#getcomment) - Get a conversation comment +* [deleteComment](#deletecomment) - Archive a conversation comment +* [updateComment](#updatecomment) - Update a conversation comment +* [listComments](#listcomments) - List comments for a conversation +* [createComment](#createcomment) - Create a conversation comment -## listComments +## getVoteStatus -ALPHA - List all of the comments that have been added to the organization +Get an object's current vote counts + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.conversations.getVoteStatus({ + incidentId: "", + eventId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsGetVoteStatus } from "firehydrant/funcs/conversationsGetVoteStatus.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await conversationsGetVoteStatus(firehydrant, { + incidentId: "", + eventId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetVoteStatusRequest](../../models/operations/getvotestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateVote + +Upvote or downvote an object + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.conversations.updateVote({ + incidentId: "", + eventId: "", + updateVote: { + direction: "dig", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsUpdateVote } from "firehydrant/funcs/conversationsUpdateVote.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await conversationsUpdateVote(firehydrant, { + incidentId: "", + eventId: "", + updateVote: { + direction: "dig", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateVoteRequest](../../models/operations/updatevoterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteCommentReaction + +ALPHA - Archive a reaction ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.listComments({ + await firehydrant.conversations.deleteCommentReaction({ + reactionId: "", conversationId: "", + commentId: "", }); @@ -45,18 +211,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsListComments } from "firehydrant-typescript-sdk/funcs/conversationsListComments.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsDeleteCommentReaction } from "firehydrant/funcs/conversationsDeleteCommentReaction.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsListComments(firehydrantTypescriptSDK, { + const res = await conversationsDeleteCommentReaction(firehydrant, { + reactionId: "", conversationId: "", + commentId: "", }); if (!res.ok) { @@ -75,7 +243,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListConversationCommentsRequest](../../models/operations/listconversationcommentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteCommentReactionRequest](../../models/operations/deletecommentreactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -86,35 +254,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createComment +## listCommentReactions -ALPHA - Creates a comment for a project +ALPHA - List all of the reactions that have been added to a comment ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.createComment({ + await firehydrant.conversations.listCommentReactions({ conversationId: "", - postV1ConversationsConversationIdComments: { - body: "", - }, + commentId: "", }); @@ -128,21 +288,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsCreateComment } from "firehydrant-typescript-sdk/funcs/conversationsCreateComment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsListCommentReactions } from "firehydrant/funcs/conversationsListCommentReactions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsCreateComment(firehydrantTypescriptSDK, { + const res = await conversationsListCommentReactions(firehydrant, { conversationId: "", - postV1ConversationsConversationIdComments: { - body: "", - }, + commentId: "", }); if (!res.ok) { @@ -161,7 +319,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateConversationCommentRequest](../../models/operations/createconversationcommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListCommentReactionsRequest](../../models/operations/listcommentreactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -172,33 +330,30 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getComment +## createCommentReaction -ALPHA - Retrieves a single comment by ID +ALPHA - Create a reaction on a comment ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.getComment({ - commentId: "", + await firehydrant.conversations.createCommentReaction({ conversationId: "", + commentId: "", + createCommentReaction: { + reaction: "", + }, }); @@ -212,19 +367,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsGetComment } from "firehydrant-typescript-sdk/funcs/conversationsGetComment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsCreateCommentReaction } from "firehydrant/funcs/conversationsCreateCommentReaction.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsGetComment(firehydrantTypescriptSDK, { - commentId: "", + const res = await conversationsCreateCommentReaction(firehydrant, { conversationId: "", + commentId: "", + createCommentReaction: { + reaction: "", + }, }); if (!res.ok) { @@ -243,7 +401,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetConversationCommentRequest](../../models/operations/getconversationcommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateCommentReactionRequest](../../models/operations/createcommentreactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -254,31 +412,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteComment +## getComment -ALPHA - Archive a comment +ALPHA - Retrieves a single comment by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.deleteComment({ + await firehydrant.conversations.getComment({ commentId: "", conversationId: "", }); @@ -294,17 +446,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsDeleteComment } from "firehydrant-typescript-sdk/funcs/conversationsDeleteComment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsGetComment } from "firehydrant/funcs/conversationsGetComment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsDeleteComment(firehydrantTypescriptSDK, { + const res = await conversationsGetComment(firehydrant, { commentId: "", conversationId: "", }); @@ -325,7 +477,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteConversationCommentRequest](../../models/operations/deleteconversationcommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetCommentRequest](../../models/operations/getcommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -336,34 +488,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateComment +## deleteComment -ALPHA - Update a comment's attributes +ALPHA - Archive a comment ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.updateComment({ + await firehydrant.conversations.deleteComment({ commentId: "", conversationId: "", - patchV1ConversationsConversationIdCommentsCommentId: {}, }); @@ -377,20 +522,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsUpdateComment } from "firehydrant-typescript-sdk/funcs/conversationsUpdateComment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsDeleteComment } from "firehydrant/funcs/conversationsDeleteComment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsUpdateComment(firehydrantTypescriptSDK, { + const res = await conversationsDeleteComment(firehydrant, { commentId: "", conversationId: "", - patchV1ConversationsConversationIdCommentsCommentId: {}, }); if (!res.ok) { @@ -409,7 +553,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateConversationCommentRequest](../../models/operations/updateconversationcommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteCommentRequest](../../models/operations/deletecommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -420,33 +564,28 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listCommentReactions +## updateComment -ALPHA - List all of the reactions that have been added to a comment +ALPHA - Update a comment's attributes ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.listCommentReactions({ - conversationId: "", + await firehydrant.conversations.updateComment({ commentId: "", + conversationId: "", + updateComment: {}, }); @@ -460,19 +599,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsListCommentReactions } from "firehydrant-typescript-sdk/funcs/conversationsListCommentReactions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsUpdateComment } from "firehydrant/funcs/conversationsUpdateComment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsListCommentReactions(firehydrantTypescriptSDK, { - conversationId: "", + const res = await conversationsUpdateComment(firehydrant, { commentId: "", + conversationId: "", + updateComment: {}, }); if (!res.ok) { @@ -491,7 +631,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListConversationCommentReactionsRequest](../../models/operations/listconversationcommentreactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateCommentRequest](../../models/operations/updatecommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -502,36 +642,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createCommentReaction +## listComments -ALPHA - Create a reaction on a comment +ALPHA - List all of the comments that have been added to the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.createCommentReaction({ + await firehydrant.conversations.listComments({ conversationId: "", - commentId: "", - postV1ConversationsConversationIdCommentsCommentIdReactions: { - reaction: "", - }, }); @@ -545,22 +675,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsCreateCommentReaction } from "firehydrant-typescript-sdk/funcs/conversationsCreateCommentReaction.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsListComments } from "firehydrant/funcs/conversationsListComments.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsCreateCommentReaction(firehydrantTypescriptSDK, { + const res = await conversationsListComments(firehydrant, { conversationId: "", - commentId: "", - postV1ConversationsConversationIdCommentsCommentIdReactions: { - reaction: "", - }, }); if (!res.ok) { @@ -579,7 +705,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateConversationCommentReactionRequest](../../models/operations/createconversationcommentreactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListCommentsRequest](../../models/operations/listcommentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -590,34 +716,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteCommentReaction +## createComment -ALPHA - Archive a reaction +ALPHA - Creates a comment for a project ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.conversations.deleteCommentReaction({ - reactionId: "", + await firehydrant.conversations.createComment({ conversationId: "", - commentId: "", + createComment: { + body: "", + }, }); @@ -631,20 +752,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { conversationsDeleteCommentReaction } from "firehydrant-typescript-sdk/funcs/conversationsDeleteCommentReaction.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { conversationsCreateComment } from "firehydrant/funcs/conversationsCreateComment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await conversationsDeleteCommentReaction(firehydrantTypescriptSDK, { - reactionId: "", + const res = await conversationsCreateComment(firehydrant, { conversationId: "", - commentId: "", + createComment: { + body: "", + }, }); if (!res.ok) { @@ -663,7 +785,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteConversationCommentReactionRequest](../../models/operations/deleteconversationcommentreactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateCommentRequest](../../models/operations/createcommentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -674,12 +796,6 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/environments/README.md b/docs/sdks/environments/README.md deleted file mode 100644 index 976111e5..00000000 --- a/docs/sdks/environments/README.md +++ /dev/null @@ -1,426 +0,0 @@ -# Environments -(*environments*) - -## Overview - -Operations related to Environments - -### Available Operations - -* [list](#list) - List environments -* [create](#create) - Create an environment -* [get](#get) - Get an environment -* [delete](#delete) - Archive an environment -* [update](#update) - Update an environment - -## list - -List all of the environments that have been added to the organiation - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.environments.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { environmentsList } from "firehydrant-typescript-sdk/funcs/environmentsList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await environmentsList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListEnvironmentsRequest](../../models/operations/listenvironmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.EnvironmentEntryEntityPaginated](../../models/components/environmententryentitypaginated.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## create - -Creates an environment for the organization - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.environments.create({ - name: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { environmentsCreate } from "firehydrant-typescript-sdk/funcs/environmentsCreate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await environmentsCreate(firehydrantTypescriptSDK, { - name: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Environments](../../models/components/postv1environments.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## get - -Retrieves a single environment by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.environments.get({ - environmentId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { environmentsGet } from "firehydrant-typescript-sdk/funcs/environmentsGet.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await environmentsGet(firehydrantTypescriptSDK, { - environmentId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetEnvironmentRequest](../../models/operations/getenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## delete - -Archive an environment - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.environments.delete({ - environmentId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { environmentsDelete } from "firehydrant-typescript-sdk/funcs/environmentsDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await environmentsDelete(firehydrantTypescriptSDK, { - environmentId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteEnvironmentRequest](../../models/operations/deleteenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## update - -Update a environments attributes - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.environments.update({ - environmentId: "", - patchV1EnvironmentsEnvironmentId: { - name: "", - }, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { environmentsUpdate } from "firehydrant-typescript-sdk/funcs/environmentsUpdate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await environmentsUpdate(firehydrantTypescriptSDK, { - environmentId: "", - patchV1EnvironmentsEnvironmentId: { - name: "", - }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateEnvironmentRequest](../../models/operations/updateenvironmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.EnvironmentEntryEntity](../../models/components/environmententryentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/executions/README.md b/docs/sdks/executions/README.md deleted file mode 100644 index 212d1038..00000000 --- a/docs/sdks/executions/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# Executions -(*runbooks.executions*) - -## Overview - -### Available Operations - -* [delete](#delete) - Terminate a runbook execution - -## delete - -Terminates a runbook execution, preventing any further steps from being executed - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.runbooks.executions.delete({ - executionId: "", - reason: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksExecutionsDelete } from "firehydrant-typescript-sdk/funcs/runbooksExecutionsDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await runbooksExecutionsDelete(firehydrantTypescriptSDK, { - executionId: "", - reason: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteRunbookExecutionRequest](../../models/operations/deleterunbookexecutionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/firehydrant/README.md b/docs/sdks/firehydrant/README.md new file mode 100644 index 00000000..1087b3c0 --- /dev/null +++ b/docs/sdks/firehydrant/README.md @@ -0,0 +1,103 @@ +# Firehydrant SDK + +## Overview + +FireHydrant API: The FireHydrant API is based around REST. It uses Bearer token authentication and returns JSON responses. You can use the FireHydrant API to configure integrations, define incidents, and set up webhooks--anything you can do on the FireHydrant UI. + +* [Dig into our API endpoints](https://developers.firehydrant.io/docs/api) +* [View your bot users](https://app.firehydrant.io/organizations/bots) + +## Base API endpoint + +[https://api.firehydrant.io/v1](https://api.firehydrant.io/v1) + +## Current version + +v1 + +## Authentication + +All requests to the FireHydrant API require an `Authorization` header with the value set to `Bearer {token}`. FireHydrant supports bot tokens to act on behalf of a computer instead of a user's account. This prevents integrations from breaking when people leave your organization or their token is revoked. See the Bot tokens section (below) for more information on this. + +An example of a header to authenticate against FireHydrant would look like: + +``` +Authorization: Bearer fhb-thisismytoken +``` + +## Bot tokens + +To access the FireHydrant API, you must authenticate with a bot token. (You must have owner permissions on your organization to see bot tokens.) Bot users allow you to interact with the FireHydrant API by using token-based authentication. To create bot tokens, log in to your organization and refer to the **Bot users** [page](https://app.firehydrant.io/organizations/bots). + +Bot tokens enable you to create a bot that has no ties to any user. Normally, all actions associated with an API token are associated with the user who created it. Bot tokens attribute all actions to the bot user itself. This way, all data associated with the token actions can be performed against the FireHydrant API without a user. + +Every request to the API is authenticated unless specified otherwise. + +### Rate Limiting + +Currently, requests made with bot tokens are rate limited on a per-account level. If your account has multiple bot token then the rate limit is shared across all of them. As of February 7th, 2023, the rate limit is at least 50 requests per account every 10 seconds, or 300 requests per minute. + +Rate limited responses will be served with a `429` status code and a JSON body of: + +```json +{"error": "rate limit exceeded"} +``` +and headers of: +``` +"RateLimit-Limit" -> the maximum number of requests in the rate limit pool +"Retry-After" -> the number of seconds to wait before trying again +``` + +## How lists are returned + +API lists are returned as arrays. A paginated entity in FireHydrant will return two top-level keys in the response object: a data key and a pagination key. + +### Paginated requests + +The `data` key is returned as an array. Each item in the array includes all of the entity data specified in the API endpoint. (The per-page default for the array is 20 items.) + +Pagination is the second key (`pagination`) returned in the overall response body. It includes medtadata around the current page, total count of items, and options to go to the next and previous page. All of the specifications returned in the pagination object are available as URL parameters. So if you want to specify, for example, going to the second page of a response, you can send a request to the same endpoint but pass the URL parameter **page=2**. + +For example, you might request **https://api.firehydrant.io/v1/environments/** to retrieve environments data. The JSON returned contains the above-mentioned data section and pagination section. The data section includes various details about an incident, such as the environment name, description, and when it was created. + +``` +{ + "data": [ + { + "id": "f8125cf4-b3a7-4f88-b5ab-57a60b9ed89b", + "name": "Production - GCP", + "description": "", + "created_at": "2021-02-17T20:02:10.679Z" + }, + { + "id": "a69f1f58-af77-4708-802d-7e73c0bf261c", + "name": "Staging", + "description": "", + "created_at": "2021-04-16T13:41:59.418Z" + } + ], + "pagination": { + "count": 2, + "page": 1, + "items": 2, + "pages": 1, + "last": 1, + "prev": null, + "next": null + } +} +``` + +To request the second page, you'd request the same endpoint with the additional query parameter of `page` in the URL: + +``` +GET https://api.firehydrant.io/v1/environments?page=2 +``` + +If you need to modify the number of records coming back from FireHydrant, you can use the `per_page` parameter (max is 200): + +``` +GET https://api.firehydrant.io/v1/environments?per_page=50 +``` + +### Available Operations diff --git a/docs/sdks/firehydranttypescriptsdk/README.md b/docs/sdks/firehydranttypescriptsdk/README.md deleted file mode 100644 index 52df2c0a..00000000 --- a/docs/sdks/firehydranttypescriptsdk/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# FirehydrantTypescriptSDK - -## Overview - -### Available Operations diff --git a/docs/sdks/firehydranttypescriptsdksignalsteams/README.md b/docs/sdks/firehydranttypescriptsdksignalsteams/README.md deleted file mode 100644 index 2d142fd8..00000000 --- a/docs/sdks/firehydranttypescriptsdksignalsteams/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# FirehydrantTypescriptSDKSignalsTeams -(*signals.teams*) - -## Overview - -### Available Operations - -* [getEscalationPolicy](#getescalationpolicy) - Get an escalation policy for a team - -## getEscalationPolicy - -Get a Signals escalation policy by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.signals.teams.getEscalationPolicy({ - teamId: "", - id: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsTeamsGetEscalationPolicy } from "firehydrant-typescript-sdk/funcs/signalsTeamsGetEscalationPolicy.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await signalsTeamsGetEscalationPolicy(firehydrantTypescriptSDK, { - teamId: "", - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTeamEscalationPolicyRequest](../../models/operations/getteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/firehydranttypescriptsdkslack/README.md b/docs/sdks/firehydranttypescriptsdkslack/README.md deleted file mode 100644 index 4c160b4d..00000000 --- a/docs/sdks/firehydranttypescriptsdkslack/README.md +++ /dev/null @@ -1,254 +0,0 @@ -# FirehydrantTypescriptSDKSlack -(*integrations.slack*) - -## Overview - -### Available Operations - -* [getEmojiAction](#getemojiaction) - Get a Slack emoji action -* [deleteEmojiAction](#deleteemojiaction) - Delete a Slack emoji action -* [listWorkspaces](#listworkspaces) - List Slack workspaces for a connection - -## getEmojiAction - -Retrieves a slack emoji action - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.integrations.slack.getEmojiAction({ - connectionId: "", - emojiActionId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsSlackGetEmojiAction } from "firehydrant-typescript-sdk/funcs/integrationsSlackGetEmojiAction.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsSlackGetEmojiAction(firehydrantTypescriptSDK, { - connectionId: "", - emojiActionId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSlackEmojiActionRequest](../../models/operations/getslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## deleteEmojiAction - -Deletes a slack emoji action - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.integrations.slack.deleteEmojiAction({ - connectionId: "", - emojiActionId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsSlackDeleteEmojiAction } from "firehydrant-typescript-sdk/funcs/integrationsSlackDeleteEmojiAction.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsSlackDeleteEmojiAction(firehydrantTypescriptSDK, { - connectionId: "", - emojiActionId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteSlackEmojiActionRequest](../../models/operations/deleteslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listWorkspaces - -List Slack workspaces for a connection - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.integrations.slack.listWorkspaces({ - connectionId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsSlackListWorkspaces } from "firehydrant-typescript-sdk/funcs/integrationsSlackListWorkspaces.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsSlackListWorkspaces(firehydrantTypescriptSDK, { - connectionId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSlackWorkspacesRequest](../../models/operations/getslackworkspacesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/firehydranttypescriptsdkstatuspage/README.md b/docs/sdks/firehydranttypescriptsdkstatuspage/README.md deleted file mode 100644 index 93629aa7..00000000 --- a/docs/sdks/firehydranttypescriptsdkstatuspage/README.md +++ /dev/null @@ -1,167 +0,0 @@ -# FirehydrantTypescriptSDKStatuspage -(*integrations.statuspage*) - -## Overview - -### Available Operations - -* [listConnections](#listconnections) - List Statuspage connections -* [listPages](#listpages) - List StatusPage pages for a connection - -## listConnections - -Lists the available and configured Statuspage integrations connections for the authenticated organization. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.integrations.statuspage.listConnections({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsStatuspageListConnections } from "firehydrant-typescript-sdk/funcs/integrationsStatuspageListConnections.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsStatuspageListConnections(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListStatuspageConnectionsRequest](../../models/operations/liststatuspageconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.IntegrationsStatuspageConnectionEntityPaginated](../../models/components/integrationsstatuspageconnectionentitypaginated.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listPages - -List StatusPage pages for a connection - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.integrations.statuspage.listPages({ - connectionId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsStatuspageListPages } from "firehydrant-typescript-sdk/funcs/integrationsStatuspageListPages.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsStatuspageListPages(firehydrantTypescriptSDK, { - connectionId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListStatuspagePagesRequest](../../models/operations/liststatuspagepagesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/firehydranttypescriptsdkticketing/README.md b/docs/sdks/firehydranttypescriptsdkticketing/README.md deleted file mode 100644 index db67c696..00000000 --- a/docs/sdks/firehydranttypescriptsdkticketing/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# FirehydrantTypescriptSDKTicketing -(*integrations.ticketing*) - -## Overview - -### Available Operations - -* [getProject](#getproject) - Get a ticketing project -* [listTags](#listtags) - List ticket tags - -## getProject - -Retrieve a single ticketing project by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.integrations.ticketing.getProject({ - ticketingProjectId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsTicketingGetProject } from "firehydrant-typescript-sdk/funcs/integrationsTicketingGetProject.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsTicketingGetProject(firehydrantTypescriptSDK, { - ticketingProjectId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketingProjectRequest](../../models/operations/getticketingprojectrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TicketingProjectsProjectListItemEntity](../../models/components/ticketingprojectsprojectlistitementity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listTags - -List all of the ticket tags in the organization - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.integrations.ticketing.listTags({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsTicketingListTags } from "firehydrant-typescript-sdk/funcs/integrationsTicketingListTags.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await integrationsTicketingListTags(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTicketTagsRequest](../../models/operations/listtickettagsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TagEntityPaginated](../../models/components/tagentitypaginated.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/functionalities/README.md b/docs/sdks/functionalities/README.md deleted file mode 100644 index 117e075e..00000000 --- a/docs/sdks/functionalities/README.md +++ /dev/null @@ -1,503 +0,0 @@ -# Functionalities -(*functionalities*) - -## Overview - -Operations related to Functionalities - -### Available Operations - -* [list](#list) - List functionalities -* [create](#create) - Create a functionality -* [get](#get) - Get a functionality -* [delete](#delete) - Archive a functionality -* [update](#update) - Update a functionality -* [listServices](#listservices) - List services for a functionality - -## list - -List all of the functionalities that have been added to the organiation - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.functionalities.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { functionalitiesList } from "firehydrant-typescript-sdk/funcs/functionalitiesList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await functionalitiesList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListFunctionalitiesRequest](../../models/operations/listfunctionalitiesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.FunctionalityEntityPaginated](../../models/components/functionalityentitypaginated.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## create - -Creates a functionality for the organization - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.functionalities.create({ - name: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { functionalitiesCreate } from "firehydrant-typescript-sdk/funcs/functionalitiesCreate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await functionalitiesCreate(firehydrantTypescriptSDK, { - name: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Functionalities](../../models/components/postv1functionalities.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## get - -Retrieves a single functionality by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.functionalities.get({ - functionalityId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { functionalitiesGet } from "firehydrant-typescript-sdk/funcs/functionalitiesGet.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await functionalitiesGet(firehydrantTypescriptSDK, { - functionalityId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetFunctionalityRequest](../../models/operations/getfunctionalityrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## delete - -Archive a functionality - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.functionalities.delete({ - functionalityId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { functionalitiesDelete } from "firehydrant-typescript-sdk/funcs/functionalitiesDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await functionalitiesDelete(firehydrantTypescriptSDK, { - functionalityId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteFunctionalityRequest](../../models/operations/deletefunctionalityrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## update - -Update a functionalities attributes - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.functionalities.update({ - functionalityId: "", - patchV1FunctionalitiesFunctionalityId: {}, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { functionalitiesUpdate } from "firehydrant-typescript-sdk/funcs/functionalitiesUpdate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await functionalitiesUpdate(firehydrantTypescriptSDK, { - functionalityId: "", - patchV1FunctionalitiesFunctionalityId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateFunctionalityRequest](../../models/operations/updatefunctionalityrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.FunctionalityEntity](../../models/components/functionalityentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listServices - -List services for a functionality - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.functionalities.listServices({ - functionalityId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { functionalitiesListServices } from "firehydrant-typescript-sdk/funcs/functionalitiesListServices.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await functionalitiesListServices(firehydrantTypescriptSDK, { - functionalityId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetFunctionalityServicesRequest](../../models/operations/getfunctionalityservicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/incidents/README.md b/docs/sdks/incidents/README.md index dfd71763..b63ad418 100644 --- a/docs/sdks/incidents/README.md +++ b/docs/sdks/incidents/README.md @@ -7,79 +7,81 @@ Operations related to Incidents ### Available Operations -* [getAiSummaryVoteStatus](#getaisummaryvotestatus) - Get the vote status for an AI-generated incident summary -* [list](#list) - List incidents -* [create](#create) - Create an incident -* [get](#get) - Get an incident -* [archive](#archive) - Archive an incident -* [update](#update) - Update an incident -* [deleteAlert](#deletealert) - Delete an alert from an incident -* [setAlertAsPrimary](#setalertasprimary) - Set an alert as primary for an incident -* [listAttachments](#listattachments) - List attachments for an incident -* [createAttachment](#createattachment) - Create an attachment for an incident -* [getChannel](#getchannel) - Get chat channel information for an incident -* [close](#close) - Close an incident -* [listEvents](#listevents) - List events for an incident -* [getEvent](#getevent) - Get an incident event -* [deleteEvent](#deleteevent) - Delete an incident event -* [updateEvent](#updateevent) - Update an incident event -* [updateEventVotes](#updateeventvotes) - Update votes for an incident event -* [getEventVoteStatus](#geteventvotestatus) - Get vote counts for an incident event -* [createGenericChatMessage](#creategenericchatmessage) - Create a chat message for an incident -* [deleteChatMessage](#deletechatmessage) - Delete a chat message from an incident -* [updateChatMessage](#updatechatmessage) - Update a chat message in an incident -* [updateImpacts](#updateimpacts) - Replace all impacts for an incident -* [partialUpdateImpacts](#partialupdateimpacts) - Update impacts for an incident -* [listImpact](#listimpact) - List impacted infrastructure for an incident -* [createImpact](#createimpact) - Add impacted infrastructure to an incident -* [deleteImpact](#deleteimpact) - Remove impacted infrastructure from an incident -* [listLinks](#listlinks) - List links for an incident -* [createLink](#createlink) - Create a link for an incident -* [updateLink](#updatelink) - Update an external link for an incident -* [deleteLink](#deletelink) - Delete an external link from an incident -* [listMilestones](#listmilestones) - List milestones for an incident -* [updateMilestonesBulk](#updatemilestonesbulk) - Bulk update milestone timestamps for an incident -* [createNote](#createnote) - Create a note for an incident -* [updateNote](#updatenote) - Update a note for an incident -* [listRelatedChangeEvents](#listrelatedchangeevents) - List related changes for an incident -* [createRelatedChange](#createrelatedchange) - Add a related change to an incident -* [updateRelatedChangeEvent](#updaterelatedchangeevent) - Update a related change event for an incident -* [getRelationships](#getrelationships) - List incident relationships -* [resolve](#resolve) - Resolve an incident -* [listRoleAssignments](#listroleassignments) - List role assignments for an incident -* [createRoleAssignment](#createroleassignment) - Create a role assignment for an incident -* [deleteRoleAssignment](#deleteroleassignment) - Delete a role assignment from an incident -* [listSimilar](#listsimilar) - List similar incidents -* [listStatusPages](#liststatuspages) - List status pages for an incident -* [addStatusPage](#addstatuspage) - Add a status page to an incident -* [createTaskList](#createtasklist) - Add tasks from a task list to an incident -* [createTeamAssignment](#createteamassignment) - Assign a team to an incident -* [deleteTeamAssignment](#deleteteamassignment) - Remove a team assignment from an incident -* [getTranscript](#gettranscript) - List transcript messages for an incident -* [deleteTranscript](#deletetranscript) - Delete a transcript from an incident -* [unarchive](#unarchive) - Unarchive an incident -* [getUserRole](#getuserrole) - Get a user's role in an incident - -## getAiSummaryVoteStatus - -Get the vote status for an AI-generated incident summary +* [listIncidents](#listincidents) - List incidents +* [createIncident](#createincident) - Create an incident +* [getIncidentChannel](#getincidentchannel) - Get chat channel information for an incident +* [closeIncident](#closeincident) - Close an incident +* [resolveIncident](#resolveincident) - Resolve an incident +* [getIncident](#getincident) - Get an incident +* [deleteIncident](#deleteincident) - Archive an incident +* [updateIncident](#updateincident) - Update an incident +* [unarchiveIncident](#unarchiveincident) - Unarchive an incident +* [bulkUpdateIncidentMilestones](#bulkupdateincidentmilestones) - Update milestone times +* [listIncidentMilestones](#listincidentmilestones) - List incident milestones +* [listIncidentChangeEvents](#listincidentchangeevents) - List related changes on an incident +* [createIncidentChangeEvent](#createincidentchangeevent) - Add a related change to an incident +* [updateIncidentChangeEvent](#updateincidentchangeevent) - Update a change attached to an incident +* [listIncidentStatusPages](#listincidentstatuspages) - List status pages for an incident +* [createIncidentStatusPage](#createincidentstatuspage) - Add a status page to an incident +* [listIncidentLinks](#listincidentlinks) - List links on an incident +* [createIncidentLink](#createincidentlink) - Add a link to an incident +* [updateIncidentLink](#updateincidentlink) - Update the external incident link +* [deleteIncidentLink](#deleteincidentlink) - Remove a link from an incident +* [updateTranscriptAttribution](#updatetranscriptattribution) - Update the attribution of a transcript +* [listTranscriptEntries](#listtranscriptentries) - Lists all of the messages in the incident's transcript +* [deleteTranscriptEntry](#deletetranscriptentry) - Delete a transcript from an incident +* [listIncidentConferenceBridges](#listincidentconferencebridges) - Retrieve all conference bridges for an incident +* [getConferenceBridgeTranslation](#getconferencebridgetranslation) - Retrieve the translations for a specific conference bridge +* [listSimilarIncidents](#listsimilarincidents) - List similar incidents +* [listIncidentAttachments](#listincidentattachments) - List attachments for an incident +* [createIncidentAttachment](#createincidentattachment) - Add an attachment to the incident timeline +* [listIncidentEvents](#listincidentevents) - List events for an incident +* [getIncidentEvent](#getincidentevent) - Get an incident event +* [deleteIncidentEvent](#deleteincidentevent) - Delete an incident event +* [updateIncidentEvent](#updateincidentevent) - Update an incident event +* [updateIncidentImpactPut](#updateincidentimpactput) - Update impacts for an incident +* [updateIncidentImpactPatch](#updateincidentimpactpatch) - Update impacts for an incident +* [listIncidentImpacts](#listincidentimpacts) - List impacted infrastructure for an incident +* [createIncidentImpact](#createincidentimpact) - Add impacted infrastructure to an incident +* [deleteIncidentImpact](#deleteincidentimpact) - Remove impacted infrastructure from an incident +* [createIncidentNote](#createincidentnote) - Add a note to an incident +* [updateIncidentNote](#updateincidentnote) - Update a note +* [createIncidentChatMessage](#createincidentchatmessage) - Add a chat message to an incident +* [deleteIncidentChatMessage](#deleteincidentchatmessage) - Delete a chat message from an incident +* [updateIncidentChatMessage](#updateincidentchatmessage) - Update a chat message on an incident +* [listIncidentRoleAssignments](#listincidentroleassignments) - List incident assignees +* [createIncidentRoleAssignment](#createincidentroleassignment) - Assign a user to an incident +* [deleteIncidentRoleAssignment](#deleteincidentroleassignment) - Unassign a user from an incident +* [createIncidentTeamAssignment](#createincidentteamassignment) - Assign a team to an incident +* [deleteIncidentTeamAssignment](#deleteincidentteamassignment) - Unassign a team from an incident +* [getIncidentUser](#getincidentuser) - Get the current user's incident role +* [getIncidentRelationships](#getincidentrelationships) - List incident relationships +* [listScheduledMaintenances](#listscheduledmaintenances) - List scheduled maintenance events +* [createScheduledMaintenance](#createscheduledmaintenance) - Create a scheduled maintenance event +* [getScheduledMaintenance](#getscheduledmaintenance) - Get a scheduled maintenance event +* [deleteScheduledMaintenance](#deletescheduledmaintenance) - Delete a scheduled maintenance event +* [updateScheduledMaintenance](#updatescheduledmaintenance) - Update a scheduled maintenance event +* [getAiIncidentSummaryVoteStatus](#getaiincidentsummaryvotestatus) - Get the current user's vote status for an AI-generated incident summary +* [voteAiIncidentSummary](#voteaiincidentsummary) - Vote on an AI-generated incident summary + +## listIncidents + +List all of the incidents in the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.getAiSummaryVoteStatus({ - incidentId: "", - generatedSummaryId: "", - }); - + const result = await firehydrant.incidents.listIncidents({}); + // Handle the result + console.log(result); } run(); @@ -90,20 +92,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGetAiSummaryVoteStatus } from "firehydrant-typescript-sdk/funcs/incidentsGetAiSummaryVoteStatus.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidents } from "firehydrant/funcs/incidentsListIncidents.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGetAiSummaryVoteStatus(firehydrantTypescriptSDK, { - incidentId: "", - generatedSummaryId: "", - }); + const res = await incidentsListIncidents(firehydrant, {}); if (!res.ok) { throw res.error; @@ -111,7 +110,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -121,42 +121,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentAiSummaryVoteStatusRequest](../../models/operations/getincidentaisummaryvotestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentsRequest](../../models/operations/listincidentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IncidentEntityPaginated](../../models/components/incidententitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## list +## createIncident -List all of the incidents in the organization +Create a new incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.list({}); + const result = await firehydrant.incidents.createIncident({ + name: "", + }); // Handle the result console.log(result); @@ -170,17 +166,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsList } from "firehydrant-typescript-sdk/funcs/incidentsList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncident } from "firehydrant/funcs/incidentsCreateIncident.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsList(firehydrantTypescriptSDK, {}); + const res = await incidentsCreateIncident(firehydrant, { + name: "", + }); if (!res.ok) { throw res.error; @@ -199,43 +197,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentsRequest](../../models/operations/listincidentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateIncident](../../models/components/createincident.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEntityPaginated](../../models/components/incidententitypaginated.md)\>** +**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## getIncidentChannel -Create a new incident +Gives chat channel information for the specified incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.create({ - name: "", + const result = await firehydrant.incidents.getIncidentChannel({ + incidentId: "", }); // Handle the result @@ -250,18 +242,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreate } from "firehydrant-typescript-sdk/funcs/incidentsCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetIncidentChannel } from "firehydrant/funcs/incidentsGetIncidentChannel.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreate(firehydrantTypescriptSDK, { - name: "", + const res = await incidentsGetIncidentChannel(firehydrant, { + incidentId: "", }); if (!res.ok) { @@ -281,42 +273,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Incidents](../../models/components/postv1incidents.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentChannelRequest](../../models/operations/getincidentchannelrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** +**Promise\<[components.IncidentsChannelEntity](../../models/components/incidentschannelentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## closeIncident -Retrieve a single incident from its ID +Closes an incident and optionally close all children ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.get({ + const result = await firehydrant.incidents.closeIncident({ incidentId: "", }); @@ -332,17 +318,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGet } from "firehydrant-typescript-sdk/funcs/incidentsGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCloseIncident } from "firehydrant/funcs/incidentsCloseIncident.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGet(firehydrantTypescriptSDK, { + const res = await incidentsCloseIncident(firehydrant, { incidentId: "", }); @@ -363,7 +349,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentRequest](../../models/operations/getincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CloseIncidentRequest](../../models/operations/closeincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -374,31 +360,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## archive +## resolveIncident -Archives an incident which will hide it from lists and metrics +Resolves a currently active incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.archive({ + const result = await firehydrant.incidents.resolveIncident({ incidentId: "", }); @@ -414,17 +394,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsArchive } from "firehydrant-typescript-sdk/funcs/incidentsArchive.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsResolveIncident } from "firehydrant/funcs/incidentsResolveIncident.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsArchive(firehydrantTypescriptSDK, { + const res = await incidentsResolveIncident(firehydrant, { incidentId: "", }); @@ -445,7 +425,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ArchiveIncidentRequest](../../models/operations/archiveincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ResolveIncidentRequest](../../models/operations/resolveincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -456,33 +436,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## update +## getIncident -Updates an incident with provided parameters +Retrieve a single incident from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.update({ + const result = await firehydrant.incidents.getIncident({ incidentId: "", - patchV1IncidentsIncidentId: {}, }); // Handle the result @@ -497,19 +470,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdate } from "firehydrant-typescript-sdk/funcs/incidentsUpdate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetIncident } from "firehydrant/funcs/incidentsGetIncident.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdate(firehydrantTypescriptSDK, { + const res = await incidentsGetIncident(firehydrant, { incidentId: "", - patchV1IncidentsIncidentId: {}, }); if (!res.ok) { @@ -529,7 +501,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentRequest](../../models/operations/updateincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentRequest](../../models/operations/getincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -540,36 +512,30 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteAlert +## deleteIncident -Remove an alert from an incident +Archives an incident which will hide it from lists and metrics ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.deleteAlert({ - incidentAlertId: "", + const result = await firehydrant.incidents.deleteIncident({ incidentId: "", }); - + // Handle the result + console.log(result); } run(); @@ -580,18 +546,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteAlert } from "firehydrant-typescript-sdk/funcs/incidentsDeleteAlert.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteIncident } from "firehydrant/funcs/incidentsDeleteIncident.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteAlert(firehydrantTypescriptSDK, { - incidentAlertId: "", + const res = await incidentsDeleteIncident(firehydrant, { incidentId: "", }); @@ -601,7 +566,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -611,47 +577,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentAlertRequest](../../models/operations/deleteincidentalertrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentRequest](../../models/operations/deleteincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## setAlertAsPrimary +## updateIncident -Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. +Updates an incident with provided parameters ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.setAlertAsPrimary({ - incidentAlertId: "", + const result = await firehydrant.incidents.updateIncident({ incidentId: "", - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: { - primary: true, - }, + updateIncident: {}, }); // Handle the result @@ -666,22 +623,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsSetAlertAsPrimary } from "firehydrant-typescript-sdk/funcs/incidentsSetAlertAsPrimary.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncident } from "firehydrant/funcs/incidentsUpdateIncident.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsSetAlertAsPrimary(firehydrantTypescriptSDK, { - incidentAlertId: "", + const res = await incidentsUpdateIncident(firehydrant, { incidentId: "", - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: { - primary: true, - }, + updateIncident: {}, }); if (!res.ok) { @@ -701,46 +655,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SetIncidentAlertAsPrimaryRequest](../../models/operations/setincidentalertasprimaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentRequest](../../models/operations/updateincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsAlertEntity](../../models/components/incidentsalertentity.md)\>** +**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listAttachments +## unarchiveIncident -List attachments for an incident +Unarchive an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.listAttachments({ + const result = await firehydrant.incidents.unarchiveIncident({ incidentId: "", }); - + // Handle the result + console.log(result); } run(); @@ -751,17 +700,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListAttachments } from "firehydrant-typescript-sdk/funcs/incidentsListAttachments.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUnarchiveIncident } from "firehydrant/funcs/incidentsUnarchiveIncident.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListAttachments(firehydrantTypescriptSDK, { + const res = await incidentsUnarchiveIncident(firehydrant, { incidentId: "", }); @@ -771,7 +720,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -781,46 +731,58 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentAttachmentsRequest](../../models/operations/listincidentattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UnarchiveIncidentRequest](../../models/operations/unarchiveincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createAttachment +## bulkUpdateIncidentMilestones + +Update milestone times in bulk for a given incident. All milestone +times for an incident must occur in chronological order +corresponding to the configured order of milestones. If the result +of this request would cause any milestone(s) to appear out of place, +a 422 response will instead be returned. This includes milestones +not explicitly submitted or updated in this request. -Allows adding image attachments to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; -import { openAsBlob } from "node:fs"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createAttachment({ + const result = await firehydrant.incidents.bulkUpdateIncidentMilestones({ incidentId: "", - requestBody: { - file: await openAsBlob("example.file"), + bulkUpdateIncidentMilestones: { + milestones: [ + { + type: "", + occurredAt: new Date("2025-04-19T18:24:04.583Z"), + }, + { + type: "", + occurredAt: new Date("2024-09-22T18:15:43.263Z"), + }, + { + type: "", + occurredAt: new Date("2023-08-29T06:50:58.826Z"), + }, + ], }, }); @@ -836,21 +798,33 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateAttachment } from "firehydrant-typescript-sdk/funcs/incidentsCreateAttachment.js"; -import { openAsBlob } from "node:fs"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsBulkUpdateIncidentMilestones } from "firehydrant/funcs/incidentsBulkUpdateIncidentMilestones.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateAttachment(firehydrantTypescriptSDK, { + const res = await incidentsBulkUpdateIncidentMilestones(firehydrant, { incidentId: "", - requestBody: { - file: await openAsBlob("example.file"), + bulkUpdateIncidentMilestones: { + milestones: [ + { + type: "", + occurredAt: new Date("2025-04-19T18:24:04.583Z"), + }, + { + type: "", + occurredAt: new Date("2024-09-22T18:15:43.263Z"), + }, + { + type: "", + occurredAt: new Date("2023-08-29T06:50:58.826Z"), + }, + ], }, }); @@ -871,42 +845,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentAttachmentRequest](../../models/operations/createincidentattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.BulkUpdateIncidentMilestonesRequest](../../models/operations/bulkupdateincidentmilestonesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentAttachmentEntity](../../models/components/incidentattachmententity.md)\>** +**Promise\<[components.IncidentsMilestoneEntityPaginated](../../models/components/incidentsmilestoneentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getChannel +## listIncidentMilestones -Gives chat channel information for the specified incident +List times and durations for each milestone on an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.getChannel({ + const result = await firehydrant.incidents.listIncidentMilestones({ incidentId: "", }); @@ -922,17 +890,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGetChannel } from "firehydrant-typescript-sdk/funcs/incidentsGetChannel.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentMilestones } from "firehydrant/funcs/incidentsListIncidentMilestones.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGetChannel(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentMilestones(firehydrant, { incidentId: "", }); @@ -953,42 +921,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentChannelRequest](../../models/operations/getincidentchannelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentMilestonesRequest](../../models/operations/listincidentmilestonesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsChannelEntity](../../models/components/incidentschannelentity.md)\>** +**Promise\<[components.IncidentsMilestoneEntityPaginated](../../models/components/incidentsmilestoneentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## close +## listIncidentChangeEvents -Closes an incident and optionally close all children +List related changes that have been attached to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.close({ + const result = await firehydrant.incidents.listIncidentChangeEvents({ incidentId: "", }); @@ -1004,17 +966,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsClose } from "firehydrant-typescript-sdk/funcs/incidentsClose.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentChangeEvents } from "firehydrant/funcs/incidentsListIncidentChangeEvents.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsClose(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentChangeEvents(firehydrant, { incidentId: "", }); @@ -1035,43 +997,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CloseIncidentRequest](../../models/operations/closeincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentChangeEventsRequest](../../models/operations/listincidentchangeeventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** +**Promise\<[components.IncidentsRelatedChangeEventEntityPaginated](../../models/components/incidentsrelatedchangeevententitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listEvents +## createIncidentChangeEvent -List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type. +Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.listEvents({ + const result = await firehydrant.incidents.createIncidentChangeEvent({ incidentId: "", + createIncidentChangeEvent: { + changeEventId: "", + type: "caused", + }, }); // Handle the result @@ -1086,18 +1046,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListEvents } from "firehydrant-typescript-sdk/funcs/incidentsListEvents.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentChangeEvent } from "firehydrant/funcs/incidentsCreateIncidentChangeEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListEvents(firehydrantTypescriptSDK, { + const res = await incidentsCreateIncidentChangeEvent(firehydrant, { incidentId: "", + createIncidentChangeEvent: { + changeEventId: "", + type: "caused", + }, }); if (!res.ok) { @@ -1117,44 +1081,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentEventsRequest](../../models/operations/listincidenteventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentChangeEventRequest](../../models/operations/createincidentchangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEventEntityPaginated](../../models/components/incidentevententitypaginated.md)\>** +**Promise\<[components.IncidentsRelatedChangeEventEntity](../../models/components/incidentsrelatedchangeevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## getEvent +## updateIncidentChangeEvent -Retrieve a single event for an incident +Update a change attached to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.getEvent({ + const result = await firehydrant.incidents.updateIncidentChangeEvent({ + relatedChangeEventId: "", incidentId: "", - eventId: "", + updateIncidentChangeEvent: {}, }); // Handle the result @@ -1169,19 +1129,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGetEvent } from "firehydrant-typescript-sdk/funcs/incidentsGetEvent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncidentChangeEvent } from "firehydrant/funcs/incidentsUpdateIncidentChangeEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGetEvent(firehydrantTypescriptSDK, { + const res = await incidentsUpdateIncidentChangeEvent(firehydrant, { + relatedChangeEventId: "", incidentId: "", - eventId: "", + updateIncidentChangeEvent: {}, }); if (!res.ok) { @@ -1201,44 +1162,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentEventRequest](../../models/operations/getincidenteventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentChangeEventRequest](../../models/operations/updateincidentchangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEventEntity](../../models/components/incidentevententity.md)\>** +**Promise\<[components.IncidentsRelatedChangeEventEntity](../../models/components/incidentsrelatedchangeevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400, 409 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteEvent +## listIncidentStatusPages -Delete a single event for an incident +List status pages that are attached to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.deleteEvent({ + const result = await firehydrant.incidents.listIncidentStatusPages({ incidentId: "", - eventId: "", }); // Handle the result @@ -1253,19 +1208,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteEvent } from "firehydrant-typescript-sdk/funcs/incidentsDeleteEvent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentStatusPages } from "firehydrant/funcs/incidentsListIncidentStatusPages.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteEvent(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentStatusPages(firehydrant, { incidentId: "", - eventId: "", }); if (!res.ok) { @@ -1285,44 +1239,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentEventRequest](../../models/operations/deleteincidenteventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentStatusPagesRequest](../../models/operations/listincidentstatuspagesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEventEntity](../../models/components/incidentevententity.md)\>** +**Promise\<[components.IncidentsStatusPageEntityPaginated](../../models/components/incidentsstatuspageentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateEvent +## createIncidentStatusPage -Update a single event for an incident +Add a status page to an incident. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.updateEvent({ + const result = await firehydrant.incidents.createIncidentStatusPage({ incidentId: "", - eventId: "", + createIncidentStatusPage: { + integrationSlug: "", + integrationId: "", + }, }); // Handle the result @@ -1337,19 +1288,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateEvent } from "firehydrant-typescript-sdk/funcs/incidentsUpdateEvent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentStatusPage } from "firehydrant/funcs/incidentsCreateIncidentStatusPage.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateEvent(firehydrantTypescriptSDK, { + const res = await incidentsCreateIncidentStatusPage(firehydrant, { incidentId: "", - eventId: "", + createIncidentStatusPage: { + integrationSlug: "", + integrationId: "", + }, }); if (!res.ok) { @@ -1369,47 +1323,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentEventRequest](../../models/operations/updateincidenteventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentStatusPageRequest](../../models/operations/createincidentstatuspagerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEventEntity](../../models/components/incidentevententity.md)\>** +**Promise\<[components.IncidentsStatusPageEntity](../../models/components/incidentsstatuspageentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateEventVotes +## listIncidentLinks -Allows for upvoting or downvoting an event +List all the editable, external incident links attached to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.updateEventVotes({ + const result = await firehydrant.incidents.listIncidentLinks({ incidentId: "", - eventId: "", - patchV1IncidentsIncidentIdEventsEventIdVotes: { - direction: "up", - }, }); // Handle the result @@ -1424,22 +1368,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateEventVotes } from "firehydrant-typescript-sdk/funcs/incidentsUpdateEventVotes.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentLinks } from "firehydrant/funcs/incidentsListIncidentLinks.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateEventVotes(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentLinks(firehydrant, { incidentId: "", - eventId: "", - patchV1IncidentsIncidentIdEventsEventIdVotes: { - direction: "up", - }, }); if (!res.ok) { @@ -1459,44 +1399,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentEventVotesRequest](../../models/operations/updateincidenteventvotesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentLinksRequest](../../models/operations/listincidentlinksrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** +**Promise\<[components.AttachmentsLinkEntityPaginated](../../models/components/attachmentslinkentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getEventVoteStatus +## createIncidentLink -Returns the current vote counts for an object +Allows adding adhoc links to an incident as an attachment ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.getEventVoteStatus({ + const result = await firehydrant.incidents.createIncidentLink({ incidentId: "", - eventId: "", + createIncidentLink: { + href: "", + }, }); // Handle the result @@ -1511,19 +1447,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGetEventVoteStatus } from "firehydrant-typescript-sdk/funcs/incidentsGetEventVoteStatus.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentLink } from "firehydrant/funcs/incidentsCreateIncidentLink.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGetEventVoteStatus(firehydrantTypescriptSDK, { + const res = await incidentsCreateIncidentLink(firehydrant, { incidentId: "", - eventId: "", + createIncidentLink: { + href: "", + }, }); if (!res.ok) { @@ -1543,50 +1481,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentEventVoteStatusRequest](../../models/operations/getincidenteventvotestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentLinkRequest](../../models/operations/createincidentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** +**Promise\<[components.AttachmentsLinkEntity](../../models/components/attachmentslinkentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createGenericChatMessage +## updateIncidentLink -Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. +Update the external incident link attributes ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createGenericChatMessage({ + await firehydrant.incidents.updateIncidentLink({ + linkId: "", incidentId: "", - postV1IncidentsIncidentIdGenericChatMessages: { - body: "", - }, + updateIncidentLink: {}, }); - // Handle the result - console.log(result); + } run(); @@ -1597,21 +1527,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateGenericChatMessage } from "firehydrant-typescript-sdk/funcs/incidentsCreateGenericChatMessage.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncidentLink } from "firehydrant/funcs/incidentsUpdateIncidentLink.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateGenericChatMessage(firehydrantTypescriptSDK, { + const res = await incidentsUpdateIncidentLink(firehydrant, { + linkId: "", incidentId: "", - postV1IncidentsIncidentIdGenericChatMessages: { - body: "", - }, + updateIncidentLink: {}, }); if (!res.ok) { @@ -1620,8 +1549,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1631,48 +1559,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentGenericChatMessageRequest](../../models/operations/createincidentgenericchatmessagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentLinkRequest](../../models/operations/updateincidentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.EventGenericChatMessageEntity](../../models/components/eventgenericchatmessageentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteChatMessage +## deleteIncidentLink -Delete an existing generic chat message on an incident. +Remove a link from an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.deleteChatMessage({ - messageId: "", + await firehydrant.incidents.deleteIncidentLink({ + linkId: "", incidentId: "", }); - // Handle the result - console.log(result); + } run(); @@ -1683,18 +1604,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteChatMessage } from "firehydrant-typescript-sdk/funcs/incidentsDeleteChatMessage.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteIncidentLink } from "firehydrant/funcs/incidentsDeleteIncidentLink.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteChatMessage(firehydrantTypescriptSDK, { - messageId: "", + const res = await incidentsDeleteIncidentLink(firehydrant, { + linkId: "", incidentId: "", }); @@ -1704,8 +1625,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1715,51 +1635,43 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentChatMessageRequest](../../models/operations/deleteincidentchatmessagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentLinkRequest](../../models/operations/deleteincidentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.EventGenericChatMessageEntity](../../models/components/eventgenericchatmessageentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateChatMessage +## updateTranscriptAttribution -Update an existing generic chat message on an incident. +Update the attribution of a transcript ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.updateChatMessage({ - messageId: "", + await firehydrant.incidents.updateTranscriptAttribution({ incidentId: "", - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: { - body: "", + requestBody: { + toUserId: "", }, }); - // Handle the result - console.log(result); + } run(); @@ -1770,21 +1682,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateChatMessage } from "firehydrant-typescript-sdk/funcs/incidentsUpdateChatMessage.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateTranscriptAttribution } from "firehydrant/funcs/incidentsUpdateTranscriptAttribution.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateChatMessage(firehydrantTypescriptSDK, { - messageId: "", + const res = await incidentsUpdateTranscriptAttribution(firehydrant, { incidentId: "", - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: { - body: "", + requestBody: { + toUserId: "", }, }); @@ -1794,8 +1705,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1805,51 +1715,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentChatMessageRequest](../../models/operations/updateincidentchatmessagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateTranscriptAttributionRequest](../../models/operations/updatetranscriptattributionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.EventGenericChatMessageEntity](../../models/components/eventgenericchatmessageentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## updateImpacts +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -Allows updating an incident's impacted infrastructure, with the option to -move the incident into a different milestone and provide a note to update -the incident timeline and any attached status pages. If this method is -requested with the PUT verb, impacts will be completely replaced with the -information in the request body, even if not provided (effectively clearing -all impacts). If this method is requested with the PATCH verb, the provided -impacts will be added or updated, but no impacts will be removed. +## listTranscriptEntries +Retrieve the transcript for a specific incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.updateImpacts({ + const result = await firehydrant.incidents.listTranscriptEntries({ incidentId: "", - putV1IncidentsIncidentIdImpact: {}, }); // Handle the result @@ -1864,19 +1760,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateImpacts } from "firehydrant-typescript-sdk/funcs/incidentsUpdateImpacts.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListTranscriptEntries } from "firehydrant/funcs/incidentsListTranscriptEntries.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateImpacts(firehydrantTypescriptSDK, { + const res = await incidentsListTranscriptEntries(firehydrant, { incidentId: "", - putV1IncidentsIncidentIdImpact: {}, }); if (!res.ok) { @@ -1896,51 +1791,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentImpactsRequest](../../models/operations/updateincidentimpactsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListTranscriptEntriesRequest](../../models/operations/listtranscriptentriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** +**Promise\<[components.PublicApiv1IncidentsTranscriptEntity](../../models/components/publicapiv1incidentstranscriptentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## partialUpdateImpacts - -Allows updating an incident's impacted infrastructure, with the option to -move the incident into a different milestone and provide a note to update -the incident timeline and any attached status pages. If this method is -requested with the PUT verb, impacts will be completely replaced with the -information in the request body, even if not provided (effectively clearing -all impacts). If this method is requested with the PATCH verb, the provided -impacts will be added or updated, but no impacts will be removed. +## deleteTranscriptEntry +Delete a transcript from an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.partialUpdateImpacts({ + const result = await firehydrant.incidents.deleteTranscriptEntry({ + transcriptId: "", incidentId: "", - patchV1IncidentsIncidentIdImpact: {}, }); // Handle the result @@ -1955,19 +1837,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsPartialUpdateImpacts } from "firehydrant-typescript-sdk/funcs/incidentsPartialUpdateImpacts.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteTranscriptEntry } from "firehydrant/funcs/incidentsDeleteTranscriptEntry.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsPartialUpdateImpacts(firehydrantTypescriptSDK, { + const res = await incidentsDeleteTranscriptEntry(firehydrant, { + transcriptId: "", incidentId: "", - patchV1IncidentsIncidentIdImpact: {}, }); if (!res.ok) { @@ -1987,44 +1869,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.PartialUpdateIncidentImpactsRequest](../../models/operations/partialupdateincidentimpactsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteTranscriptEntryRequest](../../models/operations/deletetranscriptentryrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** +**Promise\<[components.PublicApiv1IncidentsTranscriptEntity](../../models/components/publicapiv1incidentstranscriptentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listImpact +## listIncidentConferenceBridges -List impacted infrastructure on an incident by specifying type +Retrieve all conference bridges for an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.listImpact({ + const result = await firehydrant.incidents.listIncidentConferenceBridges({ incidentId: "", - type: "environments", }); // Handle the result @@ -2039,19 +1914,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListImpact } from "firehydrant-typescript-sdk/funcs/incidentsListImpact.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentConferenceBridges } from "firehydrant/funcs/incidentsListIncidentConferenceBridges.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListImpact(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentConferenceBridges(firehydrant, { incidentId: "", - type: "environments", }); if (!res.ok) { @@ -2071,47 +1945,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentImpactRequest](../../models/operations/listincidentimpactrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentConferenceBridgesRequest](../../models/operations/listincidentconferencebridgesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentImpactEntityPaginated](../../models/components/incidentimpactentitypaginated.md)\>** +**Promise\<[components.IncidentsConferenceBridgeEntity](../../models/components/incidentsconferencebridgeentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createImpact +## getConferenceBridgeTranslation -Add impacted infrastructure to an incident +Retrieve the translations for a specific conference bridge ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createImpact({ + const result = await firehydrant.incidents.getConferenceBridgeTranslation({ + id: "", + languageCode: "", incidentId: "", - type: "customers", - postV1IncidentsIncidentIdImpactType: { - id: "", - }, }); // Handle the result @@ -2126,22 +1992,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateImpact } from "firehydrant-typescript-sdk/funcs/incidentsCreateImpact.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetConferenceBridgeTranslation } from "firehydrant/funcs/incidentsGetConferenceBridgeTranslation.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateImpact(firehydrantTypescriptSDK, { + const res = await incidentsGetConferenceBridgeTranslation(firehydrant, { + id: "", + languageCode: "", incidentId: "", - type: "customers", - postV1IncidentsIncidentIdImpactType: { - id: "", - }, }); if (!res.ok) { @@ -2161,49 +2025,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentImpactRequest](../../models/operations/createincidentimpactrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetConferenceBridgeTranslationRequest](../../models/operations/getconferencebridgetranslationrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentImpactEntity](../../models/components/incidentimpactentity.md)\>** +**Promise\<[components.IncidentsConferenceBridgeEntity](../../models/components/incidentsconferencebridgeentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteImpact +## listSimilarIncidents -Remove impacted infrastructure on an incident +Retrieve a list of similar incidents ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.deleteImpact({ + const result = await firehydrant.incidents.listSimilarIncidents({ incidentId: "", - type: "environments", - id: "", }); - + // Handle the result + console.log(result); } run(); @@ -2214,20 +2070,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteImpact } from "firehydrant-typescript-sdk/funcs/incidentsDeleteImpact.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListSimilarIncidents } from "firehydrant/funcs/incidentsListSimilarIncidents.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteImpact(firehydrantTypescriptSDK, { + const res = await incidentsListSimilarIncidents(firehydrant, { incidentId: "", - type: "environments", - id: "", }); if (!res.ok) { @@ -2236,7 +2090,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -2246,43 +2101,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentImpactRequest](../../models/operations/deleteincidentimpactrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSimilarIncidentsRequest](../../models/operations/listsimilarincidentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.SimilarIncidentEntityPaginated](../../models/components/similarincidententitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listLinks +## listIncidentAttachments -List all the editable, external incident links attached to an incident +List attachments for an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.listLinks({ + const result = await firehydrant.incidents.listIncidentAttachments({ incidentId: "", }); @@ -2298,17 +2146,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListLinks } from "firehydrant-typescript-sdk/funcs/incidentsListLinks.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentAttachments } from "firehydrant/funcs/incidentsListIncidentAttachments.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListLinks(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentAttachments(firehydrant, { incidentId: "", }); @@ -2329,45 +2177,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentLinksRequest](../../models/operations/listincidentlinksrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentAttachmentsRequest](../../models/operations/listincidentattachmentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.AttachmentsLinkEntityPaginated](../../models/components/attachmentslinkentitypaginated.md)\>** +**Promise\<[components.AttachmentsTypedAttachmentEntityPaginated](../../models/components/attachmentstypedattachmententitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createLink +## createIncidentAttachment -Allows adding adhoc links to an incident as an attachment +Allows adding image attachments to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; +import { openAsBlob } from "node:fs"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createLink({ + const result = await firehydrant.incidents.createIncidentAttachment({ incidentId: "", - postV1IncidentsIncidentIdLinks: { - href: "", + requestBody: { + file: await openAsBlob("example.file"), }, }); @@ -2383,20 +2226,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateLink } from "firehydrant-typescript-sdk/funcs/incidentsCreateLink.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentAttachment } from "firehydrant/funcs/incidentsCreateIncidentAttachment.js"; +import { openAsBlob } from "node:fs"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateLink(firehydrantTypescriptSDK, { + const res = await incidentsCreateIncidentAttachment(firehydrant, { incidentId: "", - postV1IncidentsIncidentIdLinks: { - href: "", + requestBody: { + file: await openAsBlob("example.file"), }, }); @@ -2417,48 +2261,118 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentLinkRequest](../../models/operations/createincidentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentAttachmentRequest](../../models/operations/createincidentattachmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.AttachmentsLinkEntity](../../models/components/attachmentslinkentity.md)\>** +**Promise\<[components.IncidentAttachmentEntity](../../models/components/incidentattachmententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateLink +## listIncidentEvents -Updates the external incident link attributes +List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.updateLink({ - linkId: "", + const result = await firehydrant.incidents.listIncidentEvents({ + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentEvents } from "firehydrant/funcs/incidentsListIncidentEvents.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentsListIncidentEvents(firehydrant, { incidentId: "", - putV1IncidentsIncidentIdLinksLinkId: {}, }); + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListIncidentEventsRequest](../../models/operations/listincidenteventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentEventEntityPaginated](../../models/components/incidentevententitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getIncidentEvent + +Retrieve a single event for an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.incidents.getIncidentEvent({ + incidentId: "", + eventId: "", + }); + // Handle the result + console.log(result); } run(); @@ -2469,20 +2383,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateLink } from "firehydrant-typescript-sdk/funcs/incidentsUpdateLink.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetIncidentEvent } from "firehydrant/funcs/incidentsGetIncidentEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateLink(firehydrantTypescriptSDK, { - linkId: "", + const res = await incidentsGetIncidentEvent(firehydrant, { incidentId: "", - putV1IncidentsIncidentIdLinksLinkId: {}, + eventId: "", }); if (!res.ok) { @@ -2491,7 +2404,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -2501,47 +2415,120 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentLinkRequest](../../models/operations/updateincidentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentEventRequest](../../models/operations/getincidenteventrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IncidentEventEntity](../../models/components/incidentevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteLink +## deleteIncidentEvent -Deletes the external incident link +Delete an event for an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.deleteLink({ - linkId: "", + const result = await firehydrant.incidents.deleteIncidentEvent({ + incidentId: "", + eventId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteIncidentEvent } from "firehydrant/funcs/incidentsDeleteIncidentEvent.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentsDeleteIncidentEvent(firehydrant, { incidentId: "", + eventId: "", }); + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteIncidentEventRequest](../../models/operations/deleteincidenteventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentEventEntity](../../models/components/incidentevententity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateIncidentEvent + +Update a single event for an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.incidents.updateIncidentEvent({ + incidentId: "", + eventId: "", + }); + // Handle the result + console.log(result); } run(); @@ -2552,19 +2539,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteLink } from "firehydrant-typescript-sdk/funcs/incidentsDeleteLink.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncidentEvent } from "firehydrant/funcs/incidentsUpdateIncidentEvent.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteLink(firehydrantTypescriptSDK, { - linkId: "", + const res = await incidentsUpdateIncidentEvent(firehydrant, { incidentId: "", + eventId: "", }); if (!res.ok) { @@ -2573,7 +2560,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -2583,43 +2571,45 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentLinkRequest](../../models/operations/deleteincidentlinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentEventRequest](../../models/operations/updateincidenteventrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IncidentEventEntity](../../models/components/incidentevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listMilestones +## updateIncidentImpactPut + +Allows updating an incident's impacted infrastructure, with the option to +move the incident into a different milestone and provide a note to update +the incident timeline and any attached status pages. If this method is +requested with the PUT verb, impacts will be completely replaced with the +information in the request body, even if not provided (effectively clearing +all impacts). If this method is requested with the PATCH verb, the provided +impacts will be added or updated, but no impacts will be removed. -List times and durations for each milestone on an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.listMilestones({ + const result = await firehydrant.incidents.updateIncidentImpactPut({ incidentId: "", + updateIncidentImpactPut: {}, }); // Handle the result @@ -2634,18 +2624,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListMilestones } from "firehydrant-typescript-sdk/funcs/incidentsListMilestones.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncidentImpactPut } from "firehydrant/funcs/incidentsUpdateIncidentImpactPut.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListMilestones(firehydrantTypescriptSDK, { + const res = await incidentsUpdateIncidentImpactPut(firehydrant, { incidentId: "", + updateIncidentImpactPut: {}, }); if (!res.ok) { @@ -2665,57 +2656,45 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentMilestonesRequest](../../models/operations/listincidentmilestonesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentImpactPutRequest](../../models/operations/updateincidentimpactputrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsMilestoneEntityPaginated](../../models/components/incidentsmilestoneentitypaginated.md)\>** +**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateMilestonesBulk +## updateIncidentImpactPatch -Update milestone times in bulk for a given incident. All milestone -times for an incident must occur in chronological order -corresponding to the configured order of milestones. If the result -of this request would cause any milestone(s) to appear out of place, -a 422 response will instead be returned. This includes milestones -not explicitly submitted or updated in this request. +Allows updating an incident's impacted infrastructure, with the option to +move the incident into a different milestone and provide a note to update +the incident timeline and any attached status pages. If this method is +requested with the PUT verb, impacts will be completely replaced with the +information in the request body, even if not provided (effectively clearing +all impacts). If this method is requested with the PATCH verb, the provided +impacts will be added or updated, but no impacts will be removed. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.updateMilestonesBulk({ + const result = await firehydrant.incidents.updateIncidentImpactPatch({ incidentId: "", - putV1IncidentsIncidentIdMilestonesBulkUpdate: { - milestones: [ - { - type: "", - occurredAt: new Date("2022-04-23T20:54:26.363Z"), - }, - ], - }, + updateIncidentImpactPatch: {}, }); // Handle the result @@ -2730,26 +2709,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateMilestonesBulk } from "firehydrant-typescript-sdk/funcs/incidentsUpdateMilestonesBulk.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncidentImpactPatch } from "firehydrant/funcs/incidentsUpdateIncidentImpactPatch.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateMilestonesBulk(firehydrantTypescriptSDK, { + const res = await incidentsUpdateIncidentImpactPatch(firehydrant, { incidentId: "", - putV1IncidentsIncidentIdMilestonesBulkUpdate: { - milestones: [ - { - type: "", - occurredAt: new Date("2022-04-23T20:54:26.363Z"), - }, - ], - }, + updateIncidentImpactPatch: {}, }); if (!res.ok) { @@ -2769,46 +2741,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentMilestonesBulkRequest](../../models/operations/updateincidentmilestonesbulkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentImpactPatchRequest](../../models/operations/updateincidentimpactpatchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsMilestoneEntityPaginated](../../models/components/incidentsmilestoneentitypaginated.md)\>** +**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createNote +## listIncidentImpacts -Create a new note on for an incident. The visibility field on a note determines where it gets posted. +List impacted infrastructure on an incident by specifying type ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createNote({ + const result = await firehydrant.incidents.listIncidentImpacts({ incidentId: "", - postV1IncidentsIncidentIdNotes: { - body: "", - }, + type: "environments", }); // Handle the result @@ -2823,21 +2787,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateNote } from "firehydrant-typescript-sdk/funcs/incidentsCreateNote.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentImpacts } from "firehydrant/funcs/incidentsListIncidentImpacts.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateNote(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentImpacts(firehydrant, { incidentId: "", - postV1IncidentsIncidentIdNotes: { - body: "", - }, + type: "environments", }); if (!res.ok) { @@ -2857,46 +2819,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentNoteRequest](../../models/operations/createincidentnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentImpactsRequest](../../models/operations/listincidentimpactsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.EventNoteEntity](../../models/components/eventnoteentity.md)\>** +**Promise\<[components.IncidentImpactEntityPaginated](../../models/components/incidentimpactentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateNote +## createIncidentImpact -Updates the body of a note +Add impacted infrastructure to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.updateNote({ - noteId: "", + const result = await firehydrant.incidents.createIncidentImpact({ incidentId: "", - patchV1IncidentsIncidentIdNotesNoteId: { - body: "", + type: "functionalities", + createIncidentImpact: { + id: "", }, }); @@ -2912,21 +2868,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateNote } from "firehydrant-typescript-sdk/funcs/incidentsUpdateNote.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentImpact } from "firehydrant/funcs/incidentsCreateIncidentImpact.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateNote(firehydrantTypescriptSDK, { - noteId: "", + const res = await incidentsCreateIncidentImpact(firehydrant, { incidentId: "", - patchV1IncidentsIncidentIdNotesNoteId: { - body: "", + type: "functionalities", + createIncidentImpact: { + id: "", }, }); @@ -2947,43 +2903,120 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentNoteRequest](../../models/operations/updateincidentnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentImpactRequest](../../models/operations/createincidentimpactrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.EventNoteEntity](../../models/components/eventnoteentity.md)\>** +**Promise\<[components.IncidentImpactEntity](../../models/components/incidentimpactentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## listRelatedChangeEvents +## deleteIncidentImpact -List related changes that have been attached to an incident +Remove impacted infrastructure from an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.incidents.deleteIncidentImpact({ + incidentId: "", + type: "services", + id: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteIncidentImpact } from "firehydrant/funcs/incidentsDeleteIncidentImpact.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentsDeleteIncidentImpact(firehydrant, { + incidentId: "", + type: "services", + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteIncidentImpactRequest](../../models/operations/deleteincidentimpactrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createIncidentNote + +Create a new note on for an incident. The visibility field on a note determines where it gets posted. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.listRelatedChangeEvents({ + const result = await firehydrant.incidents.createIncidentNote({ incidentId: "", + createIncidentNote: { + body: "", + }, }); // Handle the result @@ -2998,18 +3031,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListRelatedChangeEvents } from "firehydrant-typescript-sdk/funcs/incidentsListRelatedChangeEvents.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentNote } from "firehydrant/funcs/incidentsCreateIncidentNote.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListRelatedChangeEvents(firehydrantTypescriptSDK, { + const res = await incidentsCreateIncidentNote(firehydrant, { incidentId: "", + createIncidentNote: { + body: "", + }, }); if (!res.ok) { @@ -3029,46 +3065,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentRelatedChangesRequest](../../models/operations/listincidentrelatedchangesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentNoteRequest](../../models/operations/createincidentnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsRelatedChangeEventEntityPaginated](../../models/components/incidentsrelatedchangeevententitypaginated.md)\>** +**Promise\<[components.EventNoteEntity](../../models/components/eventnoteentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createRelatedChange +## updateIncidentNote -Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. +Updates the body of a note ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createRelatedChange({ + const result = await firehydrant.incidents.updateIncidentNote({ + noteId: "", incidentId: "", - postV1IncidentsIncidentIdRelatedChangeEvents: { - changeEventId: "", - type: "dismissed", + updateIncidentNote: { + body: "", }, }); @@ -3084,21 +3114,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateRelatedChange } from "firehydrant-typescript-sdk/funcs/incidentsCreateRelatedChange.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncidentNote } from "firehydrant/funcs/incidentsUpdateIncidentNote.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateRelatedChange(firehydrantTypescriptSDK, { + const res = await incidentsUpdateIncidentNote(firehydrant, { + noteId: "", incidentId: "", - postV1IncidentsIncidentIdRelatedChangeEvents: { - changeEventId: "", - type: "dismissed", + updateIncidentNote: { + body: "", }, }); @@ -3119,46 +3149,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentRelatedChangeRequest](../../models/operations/createincidentrelatedchangerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentNoteRequest](../../models/operations/updateincidentnoterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsRelatedChangeEventEntity](../../models/components/incidentsrelatedchangeevententity.md)\>** +**Promise\<[components.EventNoteEntity](../../models/components/eventnoteentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400, 409 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateRelatedChangeEvent +## createIncidentChatMessage -Update a change attached to an incident +Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.updateRelatedChangeEvent({ - relatedChangeEventId: "", + const result = await firehydrant.incidents.createIncidentChatMessage({ incidentId: "", - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: {}, + createIncidentChatMessage: { + body: "", + }, }); // Handle the result @@ -3173,20 +3197,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUpdateRelatedChangeEvent } from "firehydrant-typescript-sdk/funcs/incidentsUpdateRelatedChangeEvent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentChatMessage } from "firehydrant/funcs/incidentsCreateIncidentChatMessage.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUpdateRelatedChangeEvent(firehydrantTypescriptSDK, { - relatedChangeEventId: "", + const res = await incidentsCreateIncidentChatMessage(firehydrant, { incidentId: "", - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: {}, + createIncidentChatMessage: { + body: "", + }, }); if (!res.ok) { @@ -3206,43 +3231,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentRelatedChangeEventRequest](../../models/operations/updateincidentrelatedchangeeventrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentChatMessageRequest](../../models/operations/createincidentchatmessagerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsRelatedChangeEventEntity](../../models/components/incidentsrelatedchangeevententity.md)\>** +**Promise\<[components.EventGenericChatMessageEntity](../../models/components/eventgenericchatmessageentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400, 409 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getRelationships +## deleteIncidentChatMessage -List any parent/child relationships for an incident +Delete an existing generic chat message on an incident. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.getRelationships({ + const result = await firehydrant.incidents.deleteIncidentChatMessage({ + messageId: "", incidentId: "", }); @@ -3258,17 +3277,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGetRelationships } from "firehydrant-typescript-sdk/funcs/incidentsGetRelationships.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteIncidentChatMessage } from "firehydrant/funcs/incidentsDeleteIncidentChatMessage.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGetRelationships(firehydrantTypescriptSDK, { + const res = await incidentsDeleteIncidentChatMessage(firehydrant, { + messageId: "", incidentId: "", }); @@ -3289,43 +3309,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentRelationshipsRequest](../../models/operations/getincidentrelationshipsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentChatMessageRequest](../../models/operations/deleteincidentchatmessagerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsRelationshipsEntity](../../models/components/incidentsrelationshipsentity.md)\>** +**Promise\<[components.EventGenericChatMessageEntity](../../models/components/eventgenericchatmessageentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## resolve +## updateIncidentChatMessage -Resolves a currently active incident +Update an existing generic chat message on an incident. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.resolve({ + const result = await firehydrant.incidents.updateIncidentChatMessage({ + messageId: "", incidentId: "", + updateIncidentChatMessage: { + body: "", + }, }); // Handle the result @@ -3340,18 +3358,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsResolve } from "firehydrant-typescript-sdk/funcs/incidentsResolve.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateIncidentChatMessage } from "firehydrant/funcs/incidentsUpdateIncidentChatMessage.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsResolve(firehydrantTypescriptSDK, { + const res = await incidentsUpdateIncidentChatMessage(firehydrant, { + messageId: "", incidentId: "", + updateIncidentChatMessage: { + body: "", + }, }); if (!res.ok) { @@ -3371,42 +3393,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ResolveIncidentRequest](../../models/operations/resolveincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentChatMessageRequest](../../models/operations/updateincidentchatmessagerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** +**Promise\<[components.EventGenericChatMessageEntity](../../models/components/eventgenericchatmessageentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listRoleAssignments +## listIncidentRoleAssignments Retrieve a list of all of the current role assignments for the incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.listRoleAssignments({ + const result = await firehydrant.incidents.listIncidentRoleAssignments({ incidentId: "", }); @@ -3422,17 +3438,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListRoleAssignments } from "firehydrant-typescript-sdk/funcs/incidentsListRoleAssignments.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListIncidentRoleAssignments } from "firehydrant/funcs/incidentsListIncidentRoleAssignments.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListRoleAssignments(firehydrantTypescriptSDK, { + const res = await incidentsListIncidentRoleAssignments(firehydrant, { incidentId: "", }); @@ -3464,33 +3480,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createRoleAssignment +## createIncidentRoleAssignment Assign a role to a user for this incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createRoleAssignment({ + const result = await firehydrant.incidents.createIncidentRoleAssignment({ incidentId: "", - postV1IncidentsIncidentIdRoleAssignments: { + createIncidentRoleAssignment: { userId: "", incidentRoleId: "", }, @@ -3508,19 +3518,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateRoleAssignment } from "firehydrant-typescript-sdk/funcs/incidentsCreateRoleAssignment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentRoleAssignment } from "firehydrant/funcs/incidentsCreateIncidentRoleAssignment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateRoleAssignment(firehydrantTypescriptSDK, { + const res = await incidentsCreateIncidentRoleAssignment(firehydrant, { incidentId: "", - postV1IncidentsIncidentIdRoleAssignments: { + createIncidentRoleAssignment: { userId: "", incidentRoleId: "", }, @@ -3554,31 +3564,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteRoleAssignment +## deleteIncidentRoleAssignment Unassign a role from a user ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.deleteRoleAssignment({ + const result = await firehydrant.incidents.deleteIncidentRoleAssignment({ incidentId: "", roleAssignmentId: "", }); @@ -3595,17 +3599,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteRoleAssignment } from "firehydrant-typescript-sdk/funcs/incidentsDeleteRoleAssignment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteIncidentRoleAssignment } from "firehydrant/funcs/incidentsDeleteIncidentRoleAssignment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteRoleAssignment(firehydrantTypescriptSDK, { + const res = await incidentsDeleteIncidentRoleAssignment(firehydrant, { incidentId: "", roleAssignmentId: "", }); @@ -3638,32 +3642,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listSimilar +## createIncidentTeamAssignment -List similar incidents +Assign a team for this incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.listSimilar({ + await firehydrant.incidents.createIncidentTeamAssignment({ incidentId: "", + createIncidentTeamAssignment: { + teamId: "", + }, }); @@ -3677,18 +3678,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListSimilar } from "firehydrant-typescript-sdk/funcs/incidentsListSimilar.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateIncidentTeamAssignment } from "firehydrant/funcs/incidentsCreateIncidentTeamAssignment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListSimilar(firehydrantTypescriptSDK, { + const res = await incidentsCreateIncidentTeamAssignment(firehydrant, { incidentId: "", + createIncidentTeamAssignment: { + teamId: "", + }, }); if (!res.ok) { @@ -3707,7 +3711,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSimilarIncidentsRequest](../../models/operations/getsimilarincidentsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentTeamAssignmentRequest](../../models/operations/createincidentteamassignmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -3718,36 +3722,30 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listStatusPages +## deleteIncidentTeamAssignment -List status pages that are attached to an incident +Unassign a team from an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.listStatusPages({ + await firehydrant.incidents.deleteIncidentTeamAssignment({ incidentId: "", + teamAssignmentId: "", }); - // Handle the result - console.log(result); + } run(); @@ -3758,18 +3756,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsListStatusPages } from "firehydrant-typescript-sdk/funcs/incidentsListStatusPages.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteIncidentTeamAssignment } from "firehydrant/funcs/incidentsDeleteIncidentTeamAssignment.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsListStatusPages(firehydrantTypescriptSDK, { + const res = await incidentsDeleteIncidentTeamAssignment(firehydrant, { incidentId: "", + teamAssignmentId: "", }); if (!res.ok) { @@ -3778,8 +3777,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -3789,47 +3787,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentStatusPagesRequest](../../models/operations/listincidentstatuspagesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentTeamAssignmentRequest](../../models/operations/deleteincidentteamassignmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsStatusPageEntityPaginated](../../models/components/incidentsstatuspageentitypaginated.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## addStatusPage +## getIncidentUser -Add a status page to an incident. +Retrieve a user with current roles for an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.addStatusPage({ + const result = await firehydrant.incidents.getIncidentUser({ incidentId: "", - postV1IncidentsIncidentIdStatusPages: { - integrationSlug: "", - integrationId: "", - }, + userId: "", }); // Handle the result @@ -3844,22 +3833,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsAddStatusPage } from "firehydrant-typescript-sdk/funcs/incidentsAddStatusPage.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetIncidentUser } from "firehydrant/funcs/incidentsGetIncidentUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsAddStatusPage(firehydrantTypescriptSDK, { + const res = await incidentsGetIncidentUser(firehydrant, { incidentId: "", - postV1IncidentsIncidentIdStatusPages: { - integrationSlug: "", - integrationId: "", - }, + userId: "", }); if (!res.ok) { @@ -3879,46 +3865,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentStatusPageRequest](../../models/operations/createincidentstatuspagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentUserRequest](../../models/operations/getincidentuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsStatusPageEntity](../../models/components/incidentsstatuspageentity.md)\>** +**Promise\<[components.IncidentsRoleAssignmentEntity](../../models/components/incidentsroleassignmententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createTaskList +## getIncidentRelationships -Add all tasks from list to incident +List any parent/child relationships for an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.createTaskList({ + const result = await firehydrant.incidents.getIncidentRelationships({ incidentId: "", - postV1IncidentsIncidentIdTaskLists: { - taskListId: "", - }, }); // Handle the result @@ -3933,21 +3910,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateTaskList } from "firehydrant-typescript-sdk/funcs/incidentsCreateTaskList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetIncidentRelationships } from "firehydrant/funcs/incidentsGetIncidentRelationships.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateTaskList(firehydrantTypescriptSDK, { + const res = await incidentsGetIncidentRelationships(firehydrant, { incidentId: "", - postV1IncidentsIncidentIdTaskLists: { - taskListId: "", - }, }); if (!res.ok) { @@ -3967,49 +3941,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentTaskListRequest](../../models/operations/createincidenttasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentRelationshipsRequest](../../models/operations/getincidentrelationshipsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TaskEntity](../../models/components/taskentity.md)\>** +**Promise\<[components.IncidentsRelationshipsEntity](../../models/components/incidentsrelationshipsentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createTeamAssignment +## listScheduledMaintenances -Assign a team for this incident +Lists all scheduled maintenance events ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.createTeamAssignment({ - incidentId: "", - postV1IncidentsIncidentIdTeamAssignments: { - teamId: "", - }, - }); - + const result = await firehydrant.incidents.listScheduledMaintenances({}); + // Handle the result + console.log(result); } run(); @@ -4020,22 +3984,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsCreateTeamAssignment } from "firehydrant-typescript-sdk/funcs/incidentsCreateTeamAssignment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsListScheduledMaintenances } from "firehydrant/funcs/incidentsListScheduledMaintenances.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsCreateTeamAssignment(firehydrantTypescriptSDK, { - incidentId: "", - postV1IncidentsIncidentIdTeamAssignments: { - teamId: "", - }, - }); + const res = await incidentsListScheduledMaintenances(firehydrant, {}); if (!res.ok) { throw res.error; @@ -4043,7 +4002,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -4053,47 +4013,43 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentTeamAssignmentRequest](../../models/operations/createincidentteamassignmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListScheduledMaintenancesRequest](../../models/operations/listscheduledmaintenancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteTeamAssignment +## createScheduledMaintenance -Unassign a team from an incident +Create a new scheduled maintenance event ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.deleteTeamAssignment({ - incidentId: "", - teamAssignmentId: "", + const result = await firehydrant.incidents.createScheduledMaintenance({ + name: "", + startsAt: new Date("2024-11-04T00:39:53.690Z"), + endsAt: new Date("2023-11-08T19:38:38.616Z"), }); - + // Handle the result + console.log(result); } run(); @@ -4104,19 +4060,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteTeamAssignment } from "firehydrant-typescript-sdk/funcs/incidentsDeleteTeamAssignment.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsCreateScheduledMaintenance } from "firehydrant/funcs/incidentsCreateScheduledMaintenance.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteTeamAssignment(firehydrantTypescriptSDK, { - incidentId: "", - teamAssignmentId: "", + const res = await incidentsCreateScheduledMaintenance(firehydrant, { + name: "", + startsAt: new Date("2024-11-04T00:39:53.690Z"), + endsAt: new Date("2023-11-08T19:38:38.616Z"), }); if (!res.ok) { @@ -4125,7 +4082,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -4135,43 +4093,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentTeamAssignmentRequest](../../models/operations/deleteincidentteamassignmentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateScheduledMaintenance](../../models/components/createscheduledmaintenance.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## getTranscript +## getScheduledMaintenance -Retrieve the transcript for a specific incident +Fetch the details of a scheduled maintenance event. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.getTranscript({ - incidentId: "", + const result = await firehydrant.incidents.getScheduledMaintenance({ + scheduledMaintenanceId: "", }); // Handle the result @@ -4186,18 +4139,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGetTranscript } from "firehydrant-typescript-sdk/funcs/incidentsGetTranscript.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetScheduledMaintenance } from "firehydrant/funcs/incidentsGetScheduledMaintenance.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGetTranscript(firehydrantTypescriptSDK, { - incidentId: "", + const res = await incidentsGetScheduledMaintenance(firehydrant, { + scheduledMaintenanceId: "", }); if (!res.ok) { @@ -4217,44 +4170,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentTranscriptRequest](../../models/operations/getincidenttranscriptrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetScheduledMaintenanceRequest](../../models/operations/getscheduledmaintenancerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PublicApiv1IncidentsTranscriptEntity](../../models/components/publicapiv1incidentstranscriptentity.md)\>** +**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteTranscript +## deleteScheduledMaintenance -Delete a transcript from an incident +Delete a scheduled maintenance event, preventing it from taking place. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidents.deleteTranscript({ - transcriptId: "", - incidentId: "", + await firehydrant.incidents.deleteScheduledMaintenance({ + scheduledMaintenanceId: "", }); @@ -4268,19 +4214,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsDeleteTranscript } from "firehydrant-typescript-sdk/funcs/incidentsDeleteTranscript.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsDeleteScheduledMaintenance } from "firehydrant/funcs/incidentsDeleteScheduledMaintenance.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsDeleteTranscript(firehydrantTypescriptSDK, { - transcriptId: "", - incidentId: "", + const res = await incidentsDeleteScheduledMaintenance(firehydrant, { + scheduledMaintenanceId: "", }); if (!res.ok) { @@ -4299,7 +4244,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentTranscriptRequest](../../models/operations/deleteincidenttranscriptrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteScheduledMaintenanceRequest](../../models/operations/deletescheduledmaintenancerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -4310,32 +4255,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## unarchive +## updateScheduledMaintenance -Unarchives an incident +Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.unarchive({ - incidentId: "", + const result = await firehydrant.incidents.updateScheduledMaintenance({ + scheduledMaintenanceId: "", + updateScheduledMaintenance: {}, }); // Handle the result @@ -4350,18 +4290,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsUnarchive } from "firehydrant-typescript-sdk/funcs/incidentsUnarchive.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsUpdateScheduledMaintenance } from "firehydrant/funcs/incidentsUpdateScheduledMaintenance.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsUnarchive(firehydrantTypescriptSDK, { - incidentId: "", + const res = await incidentsUpdateScheduledMaintenance(firehydrant, { + scheduledMaintenanceId: "", + updateScheduledMaintenance: {}, }); if (!res.ok) { @@ -4381,44 +4322,117 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UnarchiveIncidentRequest](../../models/operations/unarchiveincidentrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateScheduledMaintenanceRequest](../../models/operations/updatescheduledmaintenancerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentEntity](../../models/components/incidententity.md)\>** +**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getUserRole +## getAiIncidentSummaryVoteStatus -Retrieve a user with current roles for an incident +Get the current user's vote status for an AI-generated incident summary ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidents.getUserRole({ + await firehydrant.incidents.getAiIncidentSummaryVoteStatus({ incidentId: "", - userId: "", + generatedSummaryId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsGetAiIncidentSummaryVoteStatus } from "firehydrant/funcs/incidentsGetAiIncidentSummaryVoteStatus.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentsGetAiIncidentSummaryVoteStatus(firehydrant, { + incidentId: "", + generatedSummaryId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAiIncidentSummaryVoteStatusRequest](../../models/operations/getaiincidentsummaryvotestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## voteAiIncidentSummary + +Vote on an AI-generated incident summary for the current user + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.incidents.voteAiIncidentSummary({ + incidentId: "", + generatedSummaryId: "", + requestBody: { + direction: "down", + }, }); // Handle the result @@ -4433,19 +4447,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentsGetUserRole } from "firehydrant-typescript-sdk/funcs/incidentsGetUserRole.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentsVoteAiIncidentSummary } from "firehydrant/funcs/incidentsVoteAiIncidentSummary.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentsGetUserRole(firehydrantTypescriptSDK, { + const res = await incidentsVoteAiIncidentSummary(firehydrant, { incidentId: "", - userId: "", + generatedSummaryId: "", + requestBody: { + direction: "down", + }, }); if (!res.ok) { @@ -4465,23 +4482,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentUserRoleRequest](../../models/operations/getincidentuserrolerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.VoteAiIncidentSummaryRequest](../../models/operations/voteaiincidentsummaryrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentsRoleAssignmentEntity](../../models/components/incidentsroleassignmententity.md)\>** +**Promise\<[components.AIEntitiesIncidentSummaryEntity](../../models/components/aientitiesincidentsummaryentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/incidentsettings/README.md b/docs/sdks/incidentsettings/README.md index 1c754620..200a7f86 100644 --- a/docs/sdks/incidentsettings/README.md +++ b/docs/sdks/incidentsettings/README.md @@ -3,30 +3,31 @@ ## Overview +Operations related to Incident Settings + ### Available Operations -* [listCustomFieldDefinitions](#listcustomfielddefinitions) - List custom field definitions -* [createCustomFieldDefinition](#createcustomfielddefinition) - Create a custom field definition -* [deleteCustomFieldDefinition](#deletecustomfielddefinition) - Delete a custom field definition -* [updateCustomFieldDefinition](#updatecustomfielddefinition) - Update a custom field definition -* [listSelectOptions](#listselectoptions) - List select options for a custom field -* [getFormConfiguration](#getformconfiguration) - Get a form configuration -* [listRoles](#listroles) - List incident roles +* [listIncidentRoles](#listincidentroles) - List incident roles * [createIncidentRole](#createincidentrole) - Create an incident role * [getIncidentRole](#getincidentrole) - Get an incident role -* [deleteRole](#deleterole) - Archive an incident role +* [deleteIncidentRole](#deleteincidentrole) - Archive an incident role * [updateIncidentRole](#updateincidentrole) - Update an incident role -* [listIncidentTags](#listincidenttags) - List incident tags * [validateIncidentTags](#validateincidenttags) - Validate incident tags +* [listIncidentTags](#listincidenttags) - List incident tags * [listIncidentTypes](#listincidenttypes) - List incident types * [createIncidentType](#createincidenttype) - Create an incident type * [getIncidentType](#getincidenttype) - Get an incident type -* [archiveIncidentType](#archiveincidenttype) - Archive an incident type -* [updateType](#updatetype) - Update an incident type -* [createMilestone](#createmilestone) - Create a milestone for an incident lifecycle -* [deleteLifecycleMilestone](#deletelifecyclemilestone) - Delete a lifecycle milestone -* [updateLifecycleMilestone](#updatelifecyclemilestone) - Update a lifecycle milestone -* [listLifecyclePhases](#listlifecyclephases) - List lifecycle phases and milestones +* [deleteIncidentType](#deleteincidenttype) - Archive an incident type +* [updateIncidentType](#updateincidenttype) - Update an incident type +* [listLifecycleMeasurementDefinitions](#listlifecyclemeasurementdefinitions) - List measurement definitions +* [createLifecycleMeasurementDefinition](#createlifecyclemeasurementdefinition) - Create a measurement definition +* [getLifecycleMeasurementDefinition](#getlifecyclemeasurementdefinition) - Get a measurement definition +* [deleteLifecycleMeasurementDefinition](#deletelifecyclemeasurementdefinition) - Archive a measurement definition +* [updateLifecycleMeasurementDefinition](#updatelifecyclemeasurementdefinition) - Update a measurement definition +* [listLifecyclePhases](#listlifecyclephases) - List phases and milestones +* [createLifecycleMilestone](#createlifecyclemilestone) - Create a milestone +* [deleteLifecycleMilestone](#deletelifecyclemilestone) - Delete a milestone +* [updateLifecycleMilestone](#updatelifecyclemilestone) - Update a milestone * [listPriorities](#listpriorities) - List priorities * [createPriority](#createpriority) - Create a priority * [getPriority](#getpriority) - Get a priority @@ -43,29 +44,33 @@ * [createSeverityMatrixCondition](#createseveritymatrixcondition) - Create a severity matrix condition * [getSeverityMatrixCondition](#getseveritymatrixcondition) - Get a severity matrix condition * [deleteSeverityMatrixCondition](#deleteseveritymatrixcondition) - Delete a severity matrix condition -* [updateCondition](#updatecondition) - Update a severity matrix condition +* [updateSeverityMatrixCondition](#updateseveritymatrixcondition) - Update a severity matrix condition * [listSeverityMatrixImpacts](#listseveritymatriximpacts) - List severity matrix impacts -* [createImpact](#createimpact) - Create a severity matrix impact -* [deleteSeverityMatrixImpact](#deleteseveritymatriximpact) - Delete an impact from the severity matrix -* [updateImpact](#updateimpact) - Update an impact in the severity matrix -* [listTicketingPriorities](#listticketingpriorities) - List ticketing priorities -* [createTicketingPriority](#createticketingpriority) - Create a ticketing priority +* [createSeverityMatrixImpact](#createseveritymatriximpact) - Create a severity matrix impact +* [deleteSeverityMatrixImpact](#deleteseveritymatriximpact) - Delete a severity matrix impact +* [updateSeverityMatrixImpact](#updateseveritymatriximpact) - Update a severity matrix impact +* [deleteCustomFieldDefinition](#deletecustomfielddefinition) - Delete a custom field definition +* [updateCustomFieldDefinition](#updatecustomfielddefinition) - Update a custom field definition +* [listCustomFieldDefinitions](#listcustomfielddefinitions) - List custom field definitions +* [createCustomFieldDefinition](#createcustomfielddefinition) - Create a custom field definition +* [listCustomFieldSelectOptions](#listcustomfieldselectoptions) - Get available values for a custom field +* [getFormConfiguration](#getformconfiguration) - Get a form configuration -## listCustomFieldDefinitions +## listIncidentRoles -List all custom field definitions +List all of the incident roles in the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listCustomFieldDefinitions(); + const result = await firehydrant.incidentSettings.listIncidentRoles({}); // Handle the result console.log(result); @@ -79,17 +84,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListCustomFieldDefinitions } from "firehydrant-typescript-sdk/funcs/incidentSettingsListCustomFieldDefinitions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListIncidentRoles } from "firehydrant/funcs/incidentSettingsListIncidentRoles.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListCustomFieldDefinitions(firehydrantTypescriptSDK); + const res = await incidentSettingsListIncidentRoles(firehydrant, {}); if (!res.ok) { throw res.error; @@ -108,44 +113,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListIncidentRolesRequest](../../models/operations/listincidentrolesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** +**Promise\<[components.IncidentRoleEntityPaginated](../../models/components/incidentroleentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createCustomFieldDefinition +## createIncidentRole -Create a new custom field definition +Create a new incident role ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createCustomFieldDefinition({ - displayName: "Juvenal_Herman70", - fieldType: "", - required: true, + const result = await firehydrant.incidentSettings.createIncidentRole({ + name: "", + summary: "", }); // Handle the result @@ -160,20 +159,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateCustomFieldDefinition } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateCustomFieldDefinition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateIncidentRole } from "firehydrant/funcs/incidentSettingsCreateIncidentRole.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateCustomFieldDefinition(firehydrantTypescriptSDK, { - displayName: "Juvenal_Herman70", - fieldType: "", - required: true, + const res = await incidentSettingsCreateIncidentRole(firehydrant, { + name: "", + summary: "", }); if (!res.ok) { @@ -193,43 +191,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1CustomFieldsDefinitions](../../models/components/postv1customfieldsdefinitions.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateIncidentRole](../../models/components/createincidentrole.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** +**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteCustomFieldDefinition +## getIncidentRole -Delete a custom field definition +Retrieve a single incident role from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.deleteCustomFieldDefinition({ - fieldId: "", + const result = await firehydrant.incidentSettings.getIncidentRole({ + incidentRoleId: "", }); // Handle the result @@ -244,18 +236,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsDeleteCustomFieldDefinition } from "firehydrant-typescript-sdk/funcs/incidentSettingsDeleteCustomFieldDefinition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetIncidentRole } from "firehydrant/funcs/incidentSettingsGetIncidentRole.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsDeleteCustomFieldDefinition(firehydrantTypescriptSDK, { - fieldId: "", + const res = await incidentSettingsGetIncidentRole(firehydrant, { + incidentRoleId: "", }); if (!res.ok) { @@ -275,44 +267,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteCustomFieldDefinitionRequest](../../models/operations/deletecustomfielddefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentRoleRequest](../../models/operations/getincidentrolerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** +**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateCustomFieldDefinition +## deleteIncidentRole -Update a single custom field definition +Archives an incident role which will hide it from lists and metrics ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateCustomFieldDefinition({ - fieldId: "", - patchV1CustomFieldsDefinitionsFieldId: {}, + const result = await firehydrant.incidentSettings.deleteIncidentRole({ + incidentRoleId: "", }); // Handle the result @@ -327,19 +312,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateCustomFieldDefinition } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateCustomFieldDefinition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteIncidentRole } from "firehydrant/funcs/incidentSettingsDeleteIncidentRole.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateCustomFieldDefinition(firehydrantTypescriptSDK, { - fieldId: "", - patchV1CustomFieldsDefinitionsFieldId: {}, + const res = await incidentSettingsDeleteIncidentRole(firehydrant, { + incidentRoleId: "", }); if (!res.ok) { @@ -359,43 +343,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateCustomFieldDefinitionRequest](../../models/operations/updatecustomfielddefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentRoleRequest](../../models/operations/deleteincidentrolerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** +**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listSelectOptions +## updateIncidentRole -Get the permissible values for the a currently active custom select or multi-select field. +Update a single incident role from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listSelectOptions({ - fieldId: "", + const result = await firehydrant.incidentSettings.updateIncidentRole({ + incidentRoleId: "", + updateIncidentRole: {}, }); // Handle the result @@ -410,18 +389,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListSelectOptions } from "firehydrant-typescript-sdk/funcs/incidentSettingsListSelectOptions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateIncidentRole } from "firehydrant/funcs/incidentSettingsUpdateIncidentRole.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListSelectOptions(firehydrantTypescriptSDK, { - fieldId: "", + const res = await incidentSettingsUpdateIncidentRole(firehydrant, { + incidentRoleId: "", + updateIncidentRole: {}, }); if (!res.ok) { @@ -441,46 +421,43 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetCustomFieldSelectOptionsRequest](../../models/operations/getcustomfieldselectoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentRoleRequest](../../models/operations/updateincidentrolerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** +**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getFormConfiguration +## validateIncidentTags -Get a form configuration +Validate the format of a list of tags ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidentSettings.getFormConfiguration({ - slug: "", - }); - + const result = await firehydrant.incidentSettings.validateIncidentTags([ + "", + "", + "", + ]); + // Handle the result + console.log(result); } run(); @@ -491,19 +468,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsGetFormConfiguration } from "firehydrant-typescript-sdk/funcs/incidentSettingsGetFormConfiguration.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsValidateIncidentTags } from "firehydrant/funcs/incidentSettingsValidateIncidentTags.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsGetFormConfiguration(firehydrantTypescriptSDK, { - slug: "", - }); + const res = await incidentSettingsValidateIncidentTags(firehydrant, [ + "", + "", + "", + ]); if (!res.ok) { throw res.error; @@ -511,7 +490,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -521,42 +501,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetFormConfigurationRequest](../../models/operations/getformconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [string[]](../../models/.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.TagEntity](../../models/components/tagentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listRoles +## listIncidentTags -List all of the incident roles in the organization +List all of the incident tags in the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listRoles({}); + const result = await firehydrant.incidentSettings.listIncidentTags({}); // Handle the result console.log(result); @@ -570,17 +544,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListRoles } from "firehydrant-typescript-sdk/funcs/incidentSettingsListRoles.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListIncidentTags } from "firehydrant/funcs/incidentSettingsListIncidentTags.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListRoles(firehydrantTypescriptSDK, {}); + const res = await incidentSettingsListIncidentTags(firehydrant, {}); if (!res.ok) { throw res.error; @@ -599,45 +573,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentRolesRequest](../../models/operations/listincidentrolesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentTagsRequest](../../models/operations/listincidenttagsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentRoleEntityPaginated](../../models/components/incidentroleentitypaginated.md)\>** +**Promise\<[components.TagEntityPaginated](../../models/components/tagentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createIncidentRole +## listIncidentTypes -Create a new incident role +List all of the incident types in the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createIncidentRole({ - name: "", - summary: "", - }); + const result = await firehydrant.incidentSettings.listIncidentTypes({}); // Handle the result console.log(result); @@ -651,20 +616,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateIncidentRole } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateIncidentRole.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListIncidentTypes } from "firehydrant/funcs/incidentSettingsListIncidentTypes.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateIncidentRole(firehydrantTypescriptSDK, { - name: "", - summary: "", - }); + const res = await incidentSettingsListIncidentTypes(firehydrant, {}); if (!res.ok) { throw res.error; @@ -683,43 +645,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1IncidentRoles](../../models/components/postv1incidentroles.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentTypesRequest](../../models/operations/listincidenttypesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** +**Promise\<[components.IncidentTypeEntityPaginated](../../models/components/incidenttypeentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getIncidentRole +## createIncidentType -Retrieve a single incident role from its ID +Create a new incident type ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.getIncidentRole({ - incidentRoleId: "", + const result = await firehydrant.incidentSettings.createIncidentType({ + name: "", + template: {}, }); // Handle the result @@ -734,18 +691,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsGetIncidentRole } from "firehydrant-typescript-sdk/funcs/incidentSettingsGetIncidentRole.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateIncidentType } from "firehydrant/funcs/incidentSettingsCreateIncidentType.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsGetIncidentRole(firehydrantTypescriptSDK, { - incidentRoleId: "", + const res = await incidentSettingsCreateIncidentType(firehydrant, { + name: "", + template: {}, }); if (!res.ok) { @@ -765,43 +723,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentRoleRequest](../../models/operations/getincidentrolerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateIncidentType](../../models/components/createincidenttype.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** +**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteRole +## getIncidentType -Archives an incident role which will hide it from lists and metrics +Retrieve a single incident type from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.deleteRole({ - incidentRoleId: "", + const result = await firehydrant.incidentSettings.getIncidentType({ + id: "", }); // Handle the result @@ -816,18 +768,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsDeleteRole } from "firehydrant-typescript-sdk/funcs/incidentSettingsDeleteRole.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetIncidentType } from "firehydrant/funcs/incidentSettingsGetIncidentType.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsDeleteRole(firehydrantTypescriptSDK, { - incidentRoleId: "", + const res = await incidentSettingsGetIncidentType(firehydrant, { + id: "", }); if (!res.ok) { @@ -847,44 +799,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentRoleRequest](../../models/operations/deleteincidentrolerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentTypeRequest](../../models/operations/getincidenttyperequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** +**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateIncidentRole +## deleteIncidentType -Update a single incident role from its ID +Archives an incident type which will hide it from lists and metrics ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateIncidentRole({ - incidentRoleId: "", - patchV1IncidentRolesIncidentRoleId: {}, + const result = await firehydrant.incidentSettings.deleteIncidentType({ + id: "", }); // Handle the result @@ -899,19 +844,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateIncidentRole } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateIncidentRole.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteIncidentType } from "firehydrant/funcs/incidentSettingsDeleteIncidentType.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateIncidentRole(firehydrantTypescriptSDK, { - incidentRoleId: "", - patchV1IncidentRolesIncidentRoleId: {}, + const res = await incidentSettingsDeleteIncidentType(firehydrant, { + id: "", }); if (!res.ok) { @@ -931,42 +875,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentRoleRequest](../../models/operations/updateincidentrolerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentTypeRequest](../../models/operations/deleteincidenttyperequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentRoleEntity](../../models/components/incidentroleentity.md)\>** +**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listIncidentTags +## updateIncidentType -List all of the incident tags in the organization +Update a single incident type from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listIncidentTags({}); + const result = await firehydrant.incidentSettings.updateIncidentType({ + id: "", + updateIncidentType: { + name: "", + template: {}, + }, + }); // Handle the result console.log(result); @@ -980,17 +924,23 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListIncidentTags } from "firehydrant-typescript-sdk/funcs/incidentSettingsListIncidentTags.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateIncidentType } from "firehydrant/funcs/incidentSettingsUpdateIncidentType.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListIncidentTags(firehydrantTypescriptSDK, {}); + const res = await incidentSettingsUpdateIncidentType(firehydrant, { + id: "", + updateIncidentType: { + name: "", + template: {}, + }, + }); if (!res.ok) { throw res.error; @@ -1009,49 +959,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentTagsRequest](../../models/operations/listincidenttagsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentTypeRequest](../../models/operations/updateincidenttyperequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TagEntityPaginated](../../models/components/tagentitypaginated.md)\>** +**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## validateIncidentTags +## listLifecycleMeasurementDefinitions -Validate the format of a list of tags +List all of the measurement definitions in the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.validateIncidentTags([ - "", - "", - "", - ]); + await firehydrant.incidentSettings.listLifecycleMeasurementDefinitions({}); + - // Handle the result - console.log(result); } run(); @@ -1062,21 +1001,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsValidateIncidentTags } from "firehydrant-typescript-sdk/funcs/incidentSettingsValidateIncidentTags.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListLifecycleMeasurementDefinitions } from "firehydrant/funcs/incidentSettingsListLifecycleMeasurementDefinitions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsValidateIncidentTags(firehydrantTypescriptSDK, [ - "", - "", - "", - ]); + const res = await incidentSettingsListLifecycleMeasurementDefinitions(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1084,8 +1019,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1095,45 +1029,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [string[]](../../models/.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListLifecycleMeasurementDefinitionsRequest](../../models/operations/listlifecyclemeasurementdefinitionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TagEntity](../../models/components/tagentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listIncidentTypes +## createLifecycleMeasurementDefinition -List all of the incident types in the organization +Create a new measurement definition ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listIncidentTypes({}); + await firehydrant.incidentSettings.createLifecycleMeasurementDefinition({ + name: "", + startsAtMilestoneId: "", + endsAtMilestoneId: "", + }); + - // Handle the result - console.log(result); } run(); @@ -1144,17 +1075,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListIncidentTypes } from "firehydrant-typescript-sdk/funcs/incidentSettingsListIncidentTypes.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateLifecycleMeasurementDefinition } from "firehydrant/funcs/incidentSettingsCreateLifecycleMeasurementDefinition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListIncidentTypes(firehydrantTypescriptSDK, {}); + const res = await incidentSettingsCreateLifecycleMeasurementDefinition(firehydrant, { + name: "", + startsAtMilestoneId: "", + endsAtMilestoneId: "", + }); if (!res.ok) { throw res.error; @@ -1162,8 +1097,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1173,48 +1107,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentTypesRequest](../../models/operations/listincidenttypesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateLifecycleMeasurementDefinitionRequest](../../models/operations/createlifecyclemeasurementdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentTypeEntityPaginated](../../models/components/incidenttypeentitypaginated.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createIncidentType +## getLifecycleMeasurementDefinition -Create a new incident type +Retrieve a single measurement definition from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createIncidentType({ - name: "", - template: {}, + await firehydrant.incidentSettings.getLifecycleMeasurementDefinition({ + measurementDefinitionId: "", }); - // Handle the result - console.log(result); + } run(); @@ -1225,19 +1151,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateIncidentType } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateIncidentType.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetLifecycleMeasurementDefinition } from "firehydrant/funcs/incidentSettingsGetLifecycleMeasurementDefinition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateIncidentType(firehydrantTypescriptSDK, { - name: "", - template: {}, + const res = await incidentSettingsGetLifecycleMeasurementDefinition(firehydrant, { + measurementDefinitionId: "", }); if (!res.ok) { @@ -1246,8 +1171,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1257,47 +1181,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1IncidentTypes](../../models/components/postv1incidenttypes.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetLifecycleMeasurementDefinitionRequest](../../models/operations/getlifecyclemeasurementdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getIncidentType +## deleteLifecycleMeasurementDefinition -Retrieve a single incident type from its ID +Archives a measurement definition which will hide it from lists and metrics ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.getIncidentType({ - id: "", + await firehydrant.incidentSettings.deleteLifecycleMeasurementDefinition({ + measurementDefinitionId: "", }); - // Handle the result - console.log(result); + } run(); @@ -1308,18 +1225,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsGetIncidentType } from "firehydrant-typescript-sdk/funcs/incidentSettingsGetIncidentType.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteLifecycleMeasurementDefinition } from "firehydrant/funcs/incidentSettingsDeleteLifecycleMeasurementDefinition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsGetIncidentType(firehydrantTypescriptSDK, { - id: "", + const res = await incidentSettingsDeleteLifecycleMeasurementDefinition(firehydrant, { + measurementDefinitionId: "", }); if (!res.ok) { @@ -1328,8 +1245,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1339,47 +1255,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentTypeRequest](../../models/operations/getincidenttyperequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteLifecycleMeasurementDefinitionRequest](../../models/operations/deletelifecyclemeasurementdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## archiveIncidentType +## updateLifecycleMeasurementDefinition -Archives an incident type which will hide it from lists and metrics +Update a single measurement definition from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.archiveIncidentType({ - id: "", + await firehydrant.incidentSettings.updateLifecycleMeasurementDefinition({ + measurementDefinitionId: "", }); - // Handle the result - console.log(result); + } run(); @@ -1390,18 +1299,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsArchiveIncidentType } from "firehydrant-typescript-sdk/funcs/incidentSettingsArchiveIncidentType.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateLifecycleMeasurementDefinition } from "firehydrant/funcs/incidentSettingsUpdateLifecycleMeasurementDefinition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsArchiveIncidentType(firehydrantTypescriptSDK, { - id: "", + const res = await incidentSettingsUpdateLifecycleMeasurementDefinition(firehydrant, { + measurementDefinitionId: "", }); if (!res.ok) { @@ -1410,8 +1319,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1421,48 +1329,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ArchiveIncidentTypeRequest](../../models/operations/archiveincidenttyperequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateLifecycleMeasurementDefinitionRequest](../../models/operations/updatelifecyclemeasurementdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateType +## listLifecyclePhases -Update a single incident type from its ID +List all of the lifecycle phases and milestones in the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateType({ - id: "", - patchV1IncidentTypesId: { - name: "", - template: {}, - }, - }); + const result = await firehydrant.incidentSettings.listLifecyclePhases(); // Handle the result console.log(result); @@ -1476,23 +1372,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateType } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateType.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListLifecyclePhases } from "firehydrant/funcs/incidentSettingsListLifecyclePhases.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateType(firehydrantTypescriptSDK, { - id: "", - patchV1IncidentTypesId: { - name: "", - template: {}, - }, - }); + const res = await incidentSettingsListLifecyclePhases(firehydrant); if (!res.ok) { throw res.error; @@ -1511,44 +1401,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentTypeRequest](../../models/operations/updateincidenttyperequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IncidentTypeEntity](../../models/components/incidenttypeentity.md)\>** +**Promise\<[components.LifecyclesPhaseEntityList](../../models/components/lifecyclesphaseentitylist.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createMilestone +## createLifecycleMilestone Create a new milestone ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createMilestone({ + const result = await firehydrant.incidentSettings.createLifecycleMilestone({ name: "", - description: "consequently scoff caring inhibit entice wherever", + description: "serpentine blah into after pendant zowie athletic", phaseId: "", }); @@ -1564,19 +1447,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateMilestone } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateMilestone.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateLifecycleMilestone } from "firehydrant/funcs/incidentSettingsCreateLifecycleMilestone.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateMilestone(firehydrantTypescriptSDK, { + const res = await incidentSettingsCreateLifecycleMilestone(firehydrant, { name: "", - description: "consequently scoff caring inhibit entice wherever", + description: "serpentine blah into after pendant zowie athletic", phaseId: "", }); @@ -1597,7 +1480,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateLifecycleMilestoneRequestBody](../../models/operations/createlifecyclemilestonerequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateLifecycleMilestoneRequest](../../models/operations/createlifecyclemilestonerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1608,15 +1491,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## deleteLifecycleMilestone @@ -1625,14 +1502,14 @@ Delete a milestone ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.deleteLifecycleMilestone({ + const result = await firehydrant.incidentSettings.deleteLifecycleMilestone({ milestoneId: "", }); @@ -1648,17 +1525,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsDeleteLifecycleMilestone } from "firehydrant-typescript-sdk/funcs/incidentSettingsDeleteLifecycleMilestone.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteLifecycleMilestone } from "firehydrant/funcs/incidentSettingsDeleteLifecycleMilestone.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsDeleteLifecycleMilestone(firehydrantTypescriptSDK, { + const res = await incidentSettingsDeleteLifecycleMilestone(firehydrant, { milestoneId: "", }); @@ -1690,15 +1567,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## updateLifecycleMilestone @@ -1707,14 +1578,14 @@ Update a milestone ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateLifecycleMilestone({ + const result = await firehydrant.incidentSettings.updateLifecycleMilestone({ milestoneId: "", }); @@ -1730,17 +1601,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateLifecycleMilestone } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateLifecycleMilestone.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateLifecycleMilestone } from "firehydrant/funcs/incidentSettingsUpdateLifecycleMilestone.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateLifecycleMilestone(firehydrantTypescriptSDK, { + const res = await incidentSettingsUpdateLifecycleMilestone(firehydrant, { milestoneId: "", }); @@ -1772,31 +1643,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listLifecyclePhases +## listPriorities -List all of the lifecycle phases and milestones in the organization +Lists priorities ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listLifecyclePhases(); + const result = await firehydrant.incidentSettings.listPriorities({}); // Handle the result console.log(result); @@ -1810,17 +1675,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListLifecyclePhases } from "firehydrant-typescript-sdk/funcs/incidentSettingsListLifecyclePhases.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListPriorities } from "firehydrant/funcs/incidentSettingsListPriorities.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListLifecyclePhases(firehydrantTypescriptSDK); + const res = await incidentSettingsListPriorities(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1839,84 +1704,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.LifecyclesPhaseEntityList](../../models/components/lifecyclesphaseentitylist.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listPriorities - -Lists priorities - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listPriorities({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListPriorities } from "firehydrant-typescript-sdk/funcs/incidentSettingsListPriorities.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await incidentSettingsListPriorities(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListPrioritiesRequest](../../models/operations/listprioritiesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListPrioritiesRequest](../../models/operations/listprioritiesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1927,15 +1715,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## createPriority @@ -1944,14 +1726,14 @@ Create a new priority ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createPriority({ + const result = await firehydrant.incidentSettings.createPriority({ slug: "", }); @@ -1967,17 +1749,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreatePriority } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreatePriority.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreatePriority } from "firehydrant/funcs/incidentSettingsCreatePriority.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreatePriority(firehydrantTypescriptSDK, { + const res = await incidentSettingsCreatePriority(firehydrant, { slug: "", }); @@ -1998,7 +1780,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Priorities](../../models/components/postv1priorities.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreatePriority](../../models/components/createpriority.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -2009,15 +1791,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## getPriority @@ -2026,14 +1802,14 @@ Retrieve a specific priority ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.getPriority({ + const result = await firehydrant.incidentSettings.getPriority({ prioritySlug: "", }); @@ -2049,17 +1825,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsGetPriority } from "firehydrant-typescript-sdk/funcs/incidentSettingsGetPriority.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetPriority } from "firehydrant/funcs/incidentSettingsGetPriority.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsGetPriority(firehydrantTypescriptSDK, { + const res = await incidentSettingsGetPriority(firehydrant, { prioritySlug: "", }); @@ -2091,15 +1867,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## deletePriority @@ -2108,14 +1878,14 @@ Delete a specific priority ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.deletePriority({ + const result = await firehydrant.incidentSettings.deletePriority({ prioritySlug: "", }); @@ -2131,17 +1901,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsDeletePriority } from "firehydrant-typescript-sdk/funcs/incidentSettingsDeletePriority.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeletePriority } from "firehydrant/funcs/incidentSettingsDeletePriority.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsDeletePriority(firehydrantTypescriptSDK, { + const res = await incidentSettingsDeletePriority(firehydrant, { prioritySlug: "", }); @@ -2173,15 +1943,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## updatePriority @@ -2190,16 +1954,16 @@ Update a specific priority ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updatePriority({ + const result = await firehydrant.incidentSettings.updatePriority({ prioritySlug: "", - patchV1PrioritiesPrioritySlug: {}, + updatePriority: {}, }); // Handle the result @@ -2214,19 +1978,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdatePriority } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdatePriority.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdatePriority } from "firehydrant/funcs/incidentSettingsUpdatePriority.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdatePriority(firehydrantTypescriptSDK, { + const res = await incidentSettingsUpdatePriority(firehydrant, { prioritySlug: "", - patchV1PrioritiesPrioritySlug: {}, + updatePriority: {}, }); if (!res.ok) { @@ -2257,15 +2021,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## listSeverities @@ -2274,14 +2032,14 @@ Lists severities ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listSeverities({}); + const result = await firehydrant.incidentSettings.listSeverities({}); // Handle the result console.log(result); @@ -2295,17 +2053,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListSeverities } from "firehydrant-typescript-sdk/funcs/incidentSettingsListSeverities.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListSeverities } from "firehydrant/funcs/incidentSettingsListSeverities.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListSeverities(firehydrantTypescriptSDK, {}); + const res = await incidentSettingsListSeverities(firehydrant, {}); if (!res.ok) { throw res.error; @@ -2335,15 +2093,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## createSeverity @@ -2352,14 +2104,14 @@ Create a new severity ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createSeverity({ + const result = await firehydrant.incidentSettings.createSeverity({ slug: "", }); @@ -2375,17 +2127,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateSeverity } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateSeverity.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateSeverity } from "firehydrant/funcs/incidentSettingsCreateSeverity.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateSeverity(firehydrantTypescriptSDK, { + const res = await incidentSettingsCreateSeverity(firehydrant, { slug: "", }); @@ -2406,7 +2158,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Severities](../../models/components/postv1severities.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateSeverity](../../models/components/createseverity.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -2417,15 +2169,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## getSeverity @@ -2434,14 +2180,14 @@ Retrieve a specific severity ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.getSeverity({ + const result = await firehydrant.incidentSettings.getSeverity({ severitySlug: "", }); @@ -2457,17 +2203,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsGetSeverity } from "firehydrant-typescript-sdk/funcs/incidentSettingsGetSeverity.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetSeverity } from "firehydrant/funcs/incidentSettingsGetSeverity.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsGetSeverity(firehydrantTypescriptSDK, { + const res = await incidentSettingsGetSeverity(firehydrant, { severitySlug: "", }); @@ -2499,15 +2245,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## deleteSeverity @@ -2516,14 +2256,14 @@ Delete a specific severity ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.deleteSeverity({ + const result = await firehydrant.incidentSettings.deleteSeverity({ severitySlug: "", }); @@ -2539,17 +2279,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsDeleteSeverity } from "firehydrant-typescript-sdk/funcs/incidentSettingsDeleteSeverity.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteSeverity } from "firehydrant/funcs/incidentSettingsDeleteSeverity.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsDeleteSeverity(firehydrantTypescriptSDK, { + const res = await incidentSettingsDeleteSeverity(firehydrant, { severitySlug: "", }); @@ -2581,15 +2321,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## updateSeverity @@ -2598,16 +2332,16 @@ Update a specific severity ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateSeverity({ + const result = await firehydrant.incidentSettings.updateSeverity({ severitySlug: "", - patchV1SeveritiesSeveritySlug: {}, + updateSeverity: {}, }); // Handle the result @@ -2622,19 +2356,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateSeverity } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateSeverity.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateSeverity } from "firehydrant/funcs/incidentSettingsUpdateSeverity.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateSeverity(firehydrantTypescriptSDK, { + const res = await incidentSettingsUpdateSeverity(firehydrant, { severitySlug: "", - patchV1SeveritiesSeveritySlug: {}, + updateSeverity: {}, }); if (!res.ok) { @@ -2665,15 +2399,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## getSeverityMatrix @@ -2682,14 +2410,14 @@ Retrieve the Severity matrix for your organization and its components and config ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.getSeverityMatrix(); + const result = await firehydrant.incidentSettings.getSeverityMatrix(); // Handle the result console.log(result); @@ -2703,17 +2431,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsGetSeverityMatrix } from "firehydrant-typescript-sdk/funcs/incidentSettingsGetSeverityMatrix.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetSeverityMatrix } from "firehydrant/funcs/incidentSettingsGetSeverityMatrix.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsGetSeverityMatrix(firehydrantTypescriptSDK); + const res = await incidentSettingsGetSeverityMatrix(firehydrant); if (!res.ok) { throw res.error; @@ -2742,15 +2470,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## updateSeverityMatrix @@ -2759,20 +2481,30 @@ Update available severities and impacts in your organization's severity matrix. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateSeverityMatrix({ + const result = await firehydrant.incidentSettings.updateSeverityMatrix({ data: [ { severity: "", impactId: "", conditionId: "", }, + { + severity: "", + impactId: "", + conditionId: "", + }, + { + severity: "", + impactId: "", + conditionId: "", + }, ], }); @@ -2788,23 +2520,33 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateSeverityMatrix } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateSeverityMatrix.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateSeverityMatrix } from "firehydrant/funcs/incidentSettingsUpdateSeverityMatrix.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateSeverityMatrix(firehydrantTypescriptSDK, { + const res = await incidentSettingsUpdateSeverityMatrix(firehydrant, { data: [ { severity: "", impactId: "", conditionId: "", }, + { + severity: "", + impactId: "", + conditionId: "", + }, + { + severity: "", + impactId: "", + conditionId: "", + }, ], }); @@ -2825,7 +2567,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PatchV1SeverityMatrix](../../models/components/patchv1severitymatrix.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.UpdateSeverityMatrix](../../models/components/updateseveritymatrix.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -2836,15 +2578,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## listSeverityMatrixConditions @@ -2853,14 +2589,14 @@ Lists conditions ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listSeverityMatrixConditions({}); + const result = await firehydrant.incidentSettings.listSeverityMatrixConditions({}); // Handle the result console.log(result); @@ -2874,17 +2610,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListSeverityMatrixConditions } from "firehydrant-typescript-sdk/funcs/incidentSettingsListSeverityMatrixConditions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListSeverityMatrixConditions } from "firehydrant/funcs/incidentSettingsListSeverityMatrixConditions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListSeverityMatrixConditions(firehydrantTypescriptSDK, {}); + const res = await incidentSettingsListSeverityMatrixConditions(firehydrant, {}); if (!res.ok) { throw res.error; @@ -2914,15 +2650,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## createSeverityMatrixCondition @@ -2931,14 +2661,14 @@ Create a new condition ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createSeverityMatrixCondition({ + const result = await firehydrant.incidentSettings.createSeverityMatrixCondition({ name: "", }); @@ -2954,17 +2684,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateSeverityMatrixCondition } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateSeverityMatrixCondition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateSeverityMatrixCondition } from "firehydrant/funcs/incidentSettingsCreateSeverityMatrixCondition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateSeverityMatrixCondition(firehydrantTypescriptSDK, { + const res = await incidentSettingsCreateSeverityMatrixCondition(firehydrant, { name: "", }); @@ -2985,7 +2715,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1SeverityMatrixConditions](../../models/components/postv1severitymatrixconditions.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateSeverityMatrixCondition](../../models/components/createseveritymatrixcondition.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -2996,35 +2726,30 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## getSeverityMatrixCondition -Get a severity matrix condition +Retrieve a specific condition ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.incidentSettings.getSeverityMatrixCondition({ + const result = await firehydrant.incidentSettings.getSeverityMatrixCondition({ conditionId: "", }); - + // Handle the result + console.log(result); } run(); @@ -3035,17 +2760,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsGetSeverityMatrixCondition } from "firehydrant-typescript-sdk/funcs/incidentSettingsGetSeverityMatrixCondition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetSeverityMatrixCondition } from "firehydrant/funcs/incidentSettingsGetSeverityMatrixCondition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsGetSeverityMatrixCondition(firehydrantTypescriptSDK, { + const res = await incidentSettingsGetSeverityMatrixCondition(firehydrant, { conditionId: "", }); @@ -3055,7 +2780,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -3072,19 +2798,13 @@ run(); ### Response -**Promise\** +**Promise\<[components.SeverityMatrixConditionEntity](../../models/components/severitymatrixconditionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## deleteSeverityMatrixCondition @@ -3093,14 +2813,14 @@ Delete a specific condition ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.deleteSeverityMatrixCondition({ + const result = await firehydrant.incidentSettings.deleteSeverityMatrixCondition({ conditionId: "", }); @@ -3116,17 +2836,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsDeleteSeverityMatrixCondition } from "firehydrant-typescript-sdk/funcs/incidentSettingsDeleteSeverityMatrixCondition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteSeverityMatrixCondition } from "firehydrant/funcs/incidentSettingsDeleteSeverityMatrixCondition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsDeleteSeverityMatrixCondition(firehydrantTypescriptSDK, { + const res = await incidentSettingsDeleteSeverityMatrixCondition(firehydrant, { conditionId: "", }); @@ -3158,33 +2878,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateCondition +## updateSeverityMatrixCondition -Update a specific condition +Update a severity matrix condition ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateCondition({ + const result = await firehydrant.incidentSettings.updateSeverityMatrixCondition({ conditionId: "", - patchV1SeverityMatrixConditionsConditionId: {}, + updateSeverityMatrixCondition: {}, }); // Handle the result @@ -3199,19 +2913,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateCondition } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateCondition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateSeverityMatrixCondition } from "firehydrant/funcs/incidentSettingsUpdateSeverityMatrixCondition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateCondition(firehydrantTypescriptSDK, { + const res = await incidentSettingsUpdateSeverityMatrixCondition(firehydrant, { conditionId: "", - patchV1SeverityMatrixConditionsConditionId: {}, + updateSeverityMatrixCondition: {}, }); if (!res.ok) { @@ -3242,15 +2956,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## listSeverityMatrixImpacts @@ -3259,14 +2967,14 @@ Lists impacts ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listSeverityMatrixImpacts({}); + const result = await firehydrant.incidentSettings.listSeverityMatrixImpacts({}); // Handle the result console.log(result); @@ -3280,17 +2988,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListSeverityMatrixImpacts } from "firehydrant-typescript-sdk/funcs/incidentSettingsListSeverityMatrixImpacts.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListSeverityMatrixImpacts } from "firehydrant/funcs/incidentSettingsListSeverityMatrixImpacts.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListSeverityMatrixImpacts(firehydrantTypescriptSDK, {}); + const res = await incidentSettingsListSeverityMatrixImpacts(firehydrant, {}); if (!res.ok) { throw res.error; @@ -3320,31 +3028,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createImpact +## createSeverityMatrixImpact Create a new impact ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createImpact({ + const result = await firehydrant.incidentSettings.createSeverityMatrixImpact({ affectsType: "", affectsId: "", }); @@ -3361,17 +3063,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateImpact } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateImpact.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateSeverityMatrixImpact } from "firehydrant/funcs/incidentSettingsCreateSeverityMatrixImpact.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateImpact(firehydrantTypescriptSDK, { + const res = await incidentSettingsCreateSeverityMatrixImpact(firehydrant, { affectsType: "", affectsId: "", }); @@ -3393,7 +3095,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1SeverityMatrixImpacts](../../models/components/postv1severitymatriximpacts.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateSeverityMatrixImpact](../../models/components/createseveritymatriximpact.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -3404,15 +3106,9 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | ## deleteSeverityMatrixImpact @@ -3421,14 +3117,14 @@ Delete a specific impact ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.deleteSeverityMatrixImpact({ + const result = await firehydrant.incidentSettings.deleteSeverityMatrixImpact({ impactId: "", }); @@ -3444,17 +3140,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsDeleteSeverityMatrixImpact } from "firehydrant-typescript-sdk/funcs/incidentSettingsDeleteSeverityMatrixImpact.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteSeverityMatrixImpact } from "firehydrant/funcs/incidentSettingsDeleteSeverityMatrixImpact.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsDeleteSeverityMatrixImpact(firehydrantTypescriptSDK, { + const res = await incidentSettingsDeleteSeverityMatrixImpact(firehydrant, { impactId: "", }); @@ -3486,33 +3182,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateImpact +## updateSeverityMatrixImpact -Update a specific impact +Update a severity matrix impact ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.updateImpact({ + const result = await firehydrant.incidentSettings.updateSeverityMatrixImpact({ impactId: "", - patchV1SeverityMatrixImpactsImpactId: {}, + updateSeverityMatrixImpact: {}, }); // Handle the result @@ -3527,19 +3217,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsUpdateImpact } from "firehydrant-typescript-sdk/funcs/incidentSettingsUpdateImpact.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateSeverityMatrixImpact } from "firehydrant/funcs/incidentSettingsUpdateSeverityMatrixImpact.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsUpdateImpact(firehydrantTypescriptSDK, { + const res = await incidentSettingsUpdateSeverityMatrixImpact(firehydrant, { impactId: "", - patchV1SeverityMatrixImpactsImpactId: {}, + updateSeverityMatrixImpact: {}, }); if (!res.ok) { @@ -3570,31 +3260,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listTicketingPriorities +## deleteCustomFieldDefinition -List all ticketing priorities available to the organization +Delete a custom field definition ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.listTicketingPriorities(); + const result = await firehydrant.incidentSettings.deleteCustomFieldDefinition({ + fieldId: "", + }); // Handle the result console.log(result); @@ -3608,17 +3294,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsListTicketingPriorities } from "firehydrant-typescript-sdk/funcs/incidentSettingsListTicketingPriorities.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsDeleteCustomFieldDefinition } from "firehydrant/funcs/incidentSettingsDeleteCustomFieldDefinition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsListTicketingPriorities(firehydrantTypescriptSDK); + const res = await incidentSettingsDeleteCustomFieldDefinition(firehydrant, { + fieldId: "", + }); if (!res.ok) { throw res.error; @@ -3637,42 +3325,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteCustomFieldDefinitionRequest](../../models/operations/deletecustomfielddefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** +**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createTicketingPriority +## updateCustomFieldDefinition -Create a single ticketing priority +Update a single custom field definition ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.incidentSettings.createTicketingPriority({ - name: "", + const result = await firehydrant.incidentSettings.updateCustomFieldDefinition({ + fieldId: "", + updateCustomFieldDefinition: {}, }); // Handle the result @@ -3687,18 +3371,246 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { incidentSettingsCreateTicketingPriority } from "firehydrant-typescript-sdk/funcs/incidentSettingsCreateTicketingPriority.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsUpdateCustomFieldDefinition } from "firehydrant/funcs/incidentSettingsUpdateCustomFieldDefinition.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await incidentSettingsCreateTicketingPriority(firehydrantTypescriptSDK, { - name: "", + const res = await incidentSettingsUpdateCustomFieldDefinition(firehydrant, { + fieldId: "", + updateCustomFieldDefinition: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateCustomFieldDefinitionRequest](../../models/operations/updatecustomfielddefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listCustomFieldDefinitions + +List all custom field definitions + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.incidentSettings.listCustomFieldDefinitions(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListCustomFieldDefinitions } from "firehydrant/funcs/incidentSettingsListCustomFieldDefinitions.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentSettingsListCustomFieldDefinitions(firehydrant); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createCustomFieldDefinition + +Create a new custom field definition + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.incidentSettings.createCustomFieldDefinition({ + displayName: "Meredith_Gibson", + fieldType: "", + required: true, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsCreateCustomFieldDefinition } from "firehydrant/funcs/incidentSettingsCreateCustomFieldDefinition.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentSettingsCreateCustomFieldDefinition(firehydrant, { + displayName: "Meredith_Gibson", + fieldType: "", + required: true, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateCustomFieldDefinition](../../models/components/createcustomfielddefinition.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listCustomFieldSelectOptions + +Get the permissible values for the a currently active custom select or multi-select field. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.incidentSettings.listCustomFieldSelectOptions({ + fieldId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsListCustomFieldSelectOptions } from "firehydrant/funcs/incidentSettingsListCustomFieldSelectOptions.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentSettingsListCustomFieldSelectOptions(firehydrant, { + fieldId: "", }); if (!res.ok) { @@ -3718,23 +3630,93 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1TicketingPriorities](../../models/components/postv1ticketingpriorities.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListCustomFieldSelectOptionsRequest](../../models/operations/listcustomfieldselectoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.OrganizationsCustomFieldDefinitionEntity](../../models/components/organizationscustomfielddefinitionentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getFormConfiguration + +Get a form configuration + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.incidentSettings.getFormConfiguration({ + slug: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { incidentSettingsGetFormConfiguration } from "firehydrant/funcs/incidentSettingsGetFormConfiguration.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await incidentSettingsGetFormConfiguration(firehydrant, { + slug: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetFormConfigurationRequest](../../models/operations/getformconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** +**Promise\<[components.FormConfigurationEntity](../../models/components/formconfigurationentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/infrastructures/README.md b/docs/sdks/infrastructures/README.md deleted file mode 100644 index f922b2b3..00000000 --- a/docs/sdks/infrastructures/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# Infrastructures -(*infrastructures*) - -## Overview - -### Available Operations - -* [list](#list) - List catalog entries - -## list - -Lists functionality, service and environment objects - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.infrastructures.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { infrastructuresList } from "firehydrant-typescript-sdk/funcs/infrastructuresList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await infrastructuresList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListInfrastructuresRequest](../../models/operations/listinfrastructuresrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.InfrastructureSearchEntity](../../models/components/infrastructuresearchentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/integrations/README.md b/docs/sdks/integrations/README.md index b2742851..83631fe9 100644 --- a/docs/sdks/integrations/README.md +++ b/docs/sdks/integrations/README.md @@ -7,49 +7,60 @@ Operations related to Integrations ### Available Operations -* [list](#list) - List all available integrations -* [listCloudtrailBatches](#listcloudtrailbatches) - List AWS CloudTrail batches -* [updateCloudTrailBatch](#updatecloudtrailbatch) - Update an AWS CloudTrail batch +* [listIntegrations](#listintegrations) - List integrations +* [getIntegration](#getintegration) - Get an integration +* [updateFieldMap](#updatefieldmap) - Update field mapping +* [listFieldMapAvailableFields](#listfieldmapavailablefields) - List available fields for field mapping +* [listAuthedProviders](#listauthedproviders) - Lists the available and configured integrations +* [updateAuthedProvider](#updateauthedprovider) - Get an authed provider * [listConnections](#listconnections) - List integration connections * [createConnection](#createconnection) - Create a new integration connection -* [updateConnection](#updateconnection) - Update an integration connection * [refreshConnection](#refreshconnection) - Refresh an integration connection -* [updateFieldMap](#updatefieldmap) - Update a field mapping configuration -* [getFieldMapAvailableFields](#getfieldmapavailablefields) - List available fields for field mapping -* [listEmojiActions](#listemojiactions) - List Slack emoji actions -* [getStatus](#getstatus) - Get an integration status +* [updateConnection](#updateconnection) - Update an integration connection +* [listConnectionStatuses](#listconnectionstatuses) - Get integration connection status +* [listConnectionStatusesBySlug](#listconnectionstatusesbyslug) - Get an integration connection status +* [listConnectionStatusesBySlugAndId](#listconnectionstatusesbyslugandid) - Get an integration connection status +* [listAwsConnections](#listawsconnections) - List AWS connections +* [getAwsConnection](#getawsconnection) - Get an AWS connection +* [updateAwsConnection](#updateawsconnection) - Update an AWS connection +* [listAwsCloudtrailBatches](#listawscloudtrailbatches) - List CloudTrail batches +* [getAwsCloudtrailBatch](#getawscloudtrailbatch) - Get a CloudTrail batch +* [updateAwsCloudtrailBatch](#updateawscloudtrailbatch) - Update a CloudTrail batch +* [listAwsCloudtrailBatchEvents](#listawscloudtrailbatchevents) - List events for an AWS CloudTrail batch +* [searchConfluenceSpaces](#searchconfluencespaces) - List Confluence spaces +* [listSlackWorkspaces](#listslackworkspaces) - List Slack workspaces +* [listSlackUsergroups](#listslackusergroups) - List Slack user groups +* [listSlackEmojiActions](#listslackemojiactions) - List Slack emoji actions +* [createSlackEmojiAction](#createslackemojiaction) - Create a new Slack emoji action +* [getSlackEmojiAction](#getslackemojiaction) - Get a Slack emoji action +* [deleteSlackEmojiAction](#deleteslackemojiaction) - Delete a Slack emoji action +* [updateSlackEmojiAction](#updateslackemojiaction) - Update a Slack emoji action +* [listStatuspageConnections](#liststatuspageconnections) - List Statuspage connections * [getStatuspageConnection](#getstatuspageconnection) - Get a Statuspage connection * [deleteStatuspageConnection](#deletestatuspageconnection) - Delete a Statuspage connection -* [get](#get) - Get an integration -* [deletePriority](#deletepriority) - Delete a ticketing priority -* [updatePriority](#updatepriority) - Update a ticketing priority -* [listProjects](#listprojects) - List ticketing projects -* [getProjectConfigurationOptions](#getprojectconfigurationoptions) - List configuration options for a ticketing project -* [getProjectFieldOptions](#getprojectfieldoptions) - List configuration options for a ticketing project field -* [createFieldMap](#createfieldmap) - Create a field mapping for a ticketing project -* [getAvailableFields](#getavailablefields) - List available fields for ticket field mapping -* [deleteFieldMap](#deletefieldmap) - Delete a field map for a ticketing project -* [updateTicketingFieldMap](#updateticketingfieldmap) - Update a field map for a ticketing project -* [deleteProjectConfig](#deleteprojectconfig) - Delete a ticketing project configuration -* [getTicket](#getticket) - Get a ticket - -## list - -List all available integrations +* [updateStatuspageConnection](#updatestatuspageconnection) - Update a Statuspage connection +* [listStatuspageConnectionPages](#liststatuspageconnectionpages) - List StatusPage pages for a connection +* [searchZendeskTickets](#searchzendesktickets) - Search for Zendesk tickets +* [getZendeskCustomerSupportIssue](#getzendeskcustomersupportissue) - Search for Zendesk tickets + +## listIntegrations + +Lists the available and configured integrations ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.list(); - + const result = await firehydrant.integrations.listIntegrations(); + // Handle the result + console.log(result); } run(); @@ -60,17 +71,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsList } from "firehydrant-typescript-sdk/funcs/integrationsList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListIntegrations } from "firehydrant/funcs/integrationsListIntegrations.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsList(firehydrantTypescriptSDK); + const res = await integrationsListIntegrations(firehydrant); if (!res.ok) { throw res.error; @@ -78,7 +89,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -94,35 +106,31 @@ run(); ### Response -**Promise\** +**Promise\<[components.IntegrationsIntegrationEntityPaginated](../../models/components/integrationsintegrationentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listCloudtrailBatches +## getIntegration -Lists CloudTrail batches for the authenticated organization. +Retrieve a single integration ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.listCloudtrailBatches({}); + const result = await firehydrant.integrations.getIntegration({ + integrationId: "", + }); // Handle the result console.log(result); @@ -136,17 +144,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsListCloudtrailBatches } from "firehydrant-typescript-sdk/funcs/integrationsListCloudtrailBatches.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsGetIntegration } from "firehydrant/funcs/integrationsGetIntegration.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsListCloudtrailBatches(firehydrantTypescriptSDK, {}); + const res = await integrationsGetIntegration(firehydrant, { + integrationId: "", + }); if (!res.ok) { throw res.error; @@ -165,44 +175,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListAwsCloudtrailBatchesRequest](../../models/operations/listawscloudtrailbatchesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIntegrationRequest](../../models/operations/getintegrationrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IntegrationsAwsCloudtrailBatchEntityPaginated](../../models/components/integrationsawscloudtrailbatchentitypaginated.md)\>** +**Promise\<[components.IntegrationsIntegrationEntity](../../models/components/integrationsintegrationentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateCloudTrailBatch +## updateFieldMap -Update a CloudTrail batch with new information. +Update field mapping ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.updateCloudTrailBatch({ - id: "", - patchV1IntegrationsAwsCloudtrailBatchesId: {}, + const result = await firehydrant.integrations.updateFieldMap({ + fieldMapId: "", }); // Handle the result @@ -217,19 +220,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsUpdateCloudTrailBatch } from "firehydrant-typescript-sdk/funcs/integrationsUpdateCloudTrailBatch.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsUpdateFieldMap } from "firehydrant/funcs/integrationsUpdateFieldMap.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsUpdateCloudTrailBatch(firehydrantTypescriptSDK, { - id: "", - patchV1IntegrationsAwsCloudtrailBatchesId: {}, + const res = await integrationsUpdateFieldMap(firehydrant, { + fieldMapId: "", }); if (!res.ok) { @@ -249,44 +251,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateAwsCloudTrailBatchRequest](../../models/operations/updateawscloudtrailbatchrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateFieldMapRequest](../../models/operations/updatefieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IntegrationsAwsCloudtrailBatchEntity](../../models/components/integrationsawscloudtrailbatchentity.md)\>** +**Promise\<[components.FieldMappingFieldMapEntity](../../models/components/fieldmappingfieldmapentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listConnections +## listFieldMapAvailableFields -List integration connections +Get a description of the fields to which data can be mapped ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.listConnections({}); - + const result = await firehydrant.integrations.listFieldMapAvailableFields({ + fieldMapId: "", + }); + // Handle the result + console.log(result); } run(); @@ -297,17 +296,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsListConnections } from "firehydrant-typescript-sdk/funcs/integrationsListConnections.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListFieldMapAvailableFields } from "firehydrant/funcs/integrationsListFieldMapAvailableFields.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsListConnections(firehydrantTypescriptSDK, {}); + const res = await integrationsListFieldMapAvailableFields(firehydrant, { + fieldMapId: "", + }); if (!res.ok) { throw res.error; @@ -315,7 +316,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -325,46 +327,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIntegrationConnectionsRequest](../../models/operations/listintegrationconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListFieldMapAvailableFieldsRequest](../../models/operations/listfieldmapavailablefieldsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.FieldMappingMappableFieldEntity](../../models/components/fieldmappingmappablefieldentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createConnection +## listAuthedProviders -Create a new integration connection +Lists the available and configured integrations ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.createConnection({ - slug: "", + const result = await firehydrant.integrations.listAuthedProviders({ + integrationSlug: "", + connectionId: "", }); - + // Handle the result + console.log(result); } run(); @@ -375,18 +373,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsCreateConnection } from "firehydrant-typescript-sdk/funcs/integrationsCreateConnection.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListAuthedProviders } from "firehydrant/funcs/integrationsListAuthedProviders.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsCreateConnection(firehydrantTypescriptSDK, { - slug: "", + const res = await integrationsListAuthedProviders(firehydrant, { + integrationSlug: "", + connectionId: "", }); if (!res.ok) { @@ -395,7 +394,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -405,47 +405,43 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIntegrationConnectionRequest](../../models/operations/createintegrationconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListAuthedProvidersRequest](../../models/operations/listauthedprovidersrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IntegrationsAuthedProviderEntityPaginated](../../models/components/integrationsauthedproviderentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateConnection +## updateAuthedProvider -Update an integration connection +Retrieve a single authed provider ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.updateConnection({ - slug: "", + const result = await firehydrant.integrations.updateAuthedProvider({ + integrationSlug: "", connectionId: "", + authedProviderId: "", }); - + // Handle the result + console.log(result); } run(); @@ -456,19 +452,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsUpdateConnection } from "firehydrant-typescript-sdk/funcs/integrationsUpdateConnection.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsUpdateAuthedProvider } from "firehydrant/funcs/integrationsUpdateAuthedProvider.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsUpdateConnection(firehydrantTypescriptSDK, { - slug: "", + const res = await integrationsUpdateAuthedProvider(firehydrant, { + integrationSlug: "", connectionId: "", + authedProviderId: "", }); if (!res.ok) { @@ -477,7 +474,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -487,47 +485,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIntegrationConnectionRequest](../../models/operations/updateintegrationconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateAuthedProviderRequest](../../models/operations/updateauthedproviderrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.PublicApiv1IntegrationsAuthedProviderEntity](../../models/components/publicapiv1integrationsauthedproviderentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## refreshConnection +## listConnections -Refresh an integration connection +List available integration connections ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.refreshConnection({ - slug: "", - connectionId: "", - }); - + const result = await firehydrant.integrations.listConnections({}); + // Handle the result + console.log(result); } run(); @@ -538,20 +528,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsRefreshConnection } from "firehydrant-typescript-sdk/funcs/integrationsRefreshConnection.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListConnections } from "firehydrant/funcs/integrationsListConnections.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsRefreshConnection(firehydrantTypescriptSDK, { - slug: "", - connectionId: "", - }); + const res = await integrationsListConnections(firehydrant, {}); if (!res.ok) { throw res.error; @@ -559,7 +546,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -569,43 +557,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.RefreshIntegrationConnectionRequest](../../models/operations/refreshintegrationconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListConnectionsRequest](../../models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IntegrationsConnectionEntityPaginated](../../models/components/integrationsconnectionentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateFieldMap +## createConnection -Update field map +Create a new integration connection ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.updateFieldMap({ - fieldMapId: "", + const result = await firehydrant.integrations.createConnection({ + slug: "", }); // Handle the result @@ -620,18 +602,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsUpdateFieldMap } from "firehydrant-typescript-sdk/funcs/integrationsUpdateFieldMap.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsCreateConnection } from "firehydrant/funcs/integrationsCreateConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsUpdateFieldMap(firehydrantTypescriptSDK, { - fieldMapId: "", + const res = await integrationsCreateConnection(firehydrant, { + slug: "", }); if (!res.ok) { @@ -651,43 +633,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIntegrationFieldMapRequest](../../models/operations/updateintegrationfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateConnectionRequest](../../models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.FieldMappingFieldMapEntity](../../models/components/fieldmappingfieldmapentity.md)\>** +**Promise\<[components.IntegrationsConnectionEntity](../../models/components/integrationsconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getFieldMapAvailableFields +## refreshConnection -Get a description of the fields to which data can be mapped +Refresh the integration connection with the provided data ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.getFieldMapAvailableFields({ - fieldMapId: "", + const result = await firehydrant.integrations.refreshConnection({ + slug: "", + connectionId: "", }); // Handle the result @@ -702,18 +679,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGetFieldMapAvailableFields } from "firehydrant-typescript-sdk/funcs/integrationsGetFieldMapAvailableFields.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsRefreshConnection } from "firehydrant/funcs/integrationsRefreshConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGetFieldMapAvailableFields(firehydrantTypescriptSDK, { - fieldMapId: "", + const res = await integrationsRefreshConnection(firehydrant, { + slug: "", + connectionId: "", }); if (!res.ok) { @@ -733,46 +711,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIntegrationFieldMapAvailableFieldsRequest](../../models/operations/getintegrationfieldmapavailablefieldsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.RefreshConnectionRequest](../../models/operations/refreshconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.FieldMappingMappableFieldEntity](../../models/components/fieldmappingmappablefieldentity.md)\>** +**Promise\<[components.IntegrationsConnectionEntity](../../models/components/integrationsconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listEmojiActions +## updateConnection -Lists all slack emoji actions +Update the integration connection with the provided data ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.listEmojiActions({ + const result = await firehydrant.integrations.updateConnection({ + slug: "", connectionId: "", }); - + // Handle the result + console.log(result); } run(); @@ -783,17 +757,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsListEmojiActions } from "firehydrant-typescript-sdk/funcs/integrationsListEmojiActions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsUpdateConnection } from "firehydrant/funcs/integrationsUpdateConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsListEmojiActions(firehydrantTypescriptSDK, { + const res = await integrationsUpdateConnection(firehydrant, { + slug: "", connectionId: "", }); @@ -803,7 +778,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -813,46 +789,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSlackEmojiActionsRequest](../../models/operations/listslackemojiactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateConnectionRequest](../../models/operations/updateconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IntegrationsConnectionEntity](../../models/components/integrationsconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getStatus +## listConnectionStatuses -Get an integration status +Retrieve overall integration connection status ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.getStatus({ - slug: "", - }); - + const result = await firehydrant.integrations.listConnectionStatuses(); + // Handle the result + console.log(result); } run(); @@ -863,19 +832,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGetStatus } from "firehydrant-typescript-sdk/funcs/integrationsGetStatus.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListConnectionStatuses } from "firehydrant/funcs/integrationsListConnectionStatuses.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGetStatus(firehydrantTypescriptSDK, { - slug: "", - }); + const res = await integrationsListConnectionStatuses(firehydrant); if (!res.ok) { throw res.error; @@ -883,7 +850,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -893,43 +861,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIntegrationStatusRequest](../../models/operations/getintegrationstatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IntegrationsConnectionStatusEntity](../../models/components/integrationsconnectionstatusentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getStatuspageConnection +## listConnectionStatusesBySlug -Retrieve the information about the Statuspage connection. +Retrieve a single integration connection status ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.getStatuspageConnection({ - connectionId: "", + const result = await firehydrant.integrations.listConnectionStatusesBySlug({ + slug: "", }); // Handle the result @@ -944,18 +905,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGetStatuspageConnection } from "firehydrant-typescript-sdk/funcs/integrationsGetStatuspageConnection.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListConnectionStatusesBySlug } from "firehydrant/funcs/integrationsListConnectionStatusesBySlug.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGetStatuspageConnection(firehydrantTypescriptSDK, { - connectionId: "", + const res = await integrationsListConnectionStatusesBySlug(firehydrant, { + slug: "", }); if (!res.ok) { @@ -975,43 +936,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetStatuspageConnectionRequest](../../models/operations/getstatuspageconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListConnectionStatusesBySlugRequest](../../models/operations/listconnectionstatusesbyslugrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IntegrationsStatuspageConnectionEntity](../../models/components/integrationsstatuspageconnectionentity.md)\>** +**Promise\<[components.IntegrationsConnectionStatusEntity](../../models/components/integrationsconnectionstatusentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteStatuspageConnection +## listConnectionStatusesBySlugAndId -Deletes the given Statuspage integration connection. +Retrieve a single integration connection status ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.deleteStatuspageConnection({ - connectionId: "", + const result = await firehydrant.integrations.listConnectionStatusesBySlugAndId({ + slug: "", + byConnectionId: "", }); // Handle the result @@ -1026,18 +982,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsDeleteStatuspageConnection } from "firehydrant-typescript-sdk/funcs/integrationsDeleteStatuspageConnection.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListConnectionStatusesBySlugAndId } from "firehydrant/funcs/integrationsListConnectionStatusesBySlugAndId.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsDeleteStatuspageConnection(firehydrantTypescriptSDK, { - connectionId: "", + const res = await integrationsListConnectionStatusesBySlugAndId(firehydrant, { + slug: "", + byConnectionId: "", }); if (!res.ok) { @@ -1057,44 +1014,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteStatuspageConnectionRequest](../../models/operations/deletestatuspageconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListConnectionStatusesBySlugAndIdRequest](../../models/operations/listconnectionstatusesbyslugandidrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IntegrationsStatuspageConnectionEntity](../../models/components/integrationsstatuspageconnectionentity.md)\>** +**Promise\<[components.IntegrationsConnectionStatusEntity](../../models/components/integrationsconnectionstatusentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## listAwsConnections -Retrieve a single integration +Lists the available and configured AWS integration connections for the authenticated organization. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.get({ - integrationId: "", - }); + const result = await firehydrant.integrations.listAwsConnections({}); // Handle the result console.log(result); @@ -1108,19 +1057,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGet } from "firehydrant-typescript-sdk/funcs/integrationsGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListAwsConnections } from "firehydrant/funcs/integrationsListAwsConnections.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGet(firehydrantTypescriptSDK, { - integrationId: "", - }); + const res = await integrationsListAwsConnections(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1139,42 +1086,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIntegrationRequest](../../models/operations/getintegrationrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListAwsConnectionsRequest](../../models/operations/listawsconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.IntegrationsIntegrationEntity](../../models/components/integrationsintegrationentity.md)\>** +**Promise\<[components.IntegrationsAwsConnectionEntityPaginated](../../models/components/integrationsawsconnectionentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deletePriority +## getAwsConnection -Delete a single ticketing priority by ID +Retrieves the information about the AWS connection. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.deletePriority({ + const result = await firehydrant.integrations.getAwsConnection({ id: "", }); @@ -1190,17 +1131,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsDeletePriority } from "firehydrant-typescript-sdk/funcs/integrationsDeletePriority.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsGetAwsConnection } from "firehydrant/funcs/integrationsGetAwsConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsDeletePriority(firehydrantTypescriptSDK, { + const res = await integrationsGetAwsConnection(firehydrant, { id: "", }); @@ -1221,44 +1162,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTicketingPriorityRequest](../../models/operations/deleteticketingpriorityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetAwsConnectionRequest](../../models/operations/getawsconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** +**Promise\<[components.IntegrationsAwsConnectionEntity](../../models/components/integrationsawsconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updatePriority +## updateAwsConnection -Update a single ticketing priority's attributes +Update the AWS connection with the provided data. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.updatePriority({ + const result = await firehydrant.integrations.updateAwsConnection({ id: "", - patchV1TicketingPrioritiesId: {}, + updateAwsConnection: {}, }); // Handle the result @@ -1273,19 +1208,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsUpdatePriority } from "firehydrant-typescript-sdk/funcs/integrationsUpdatePriority.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsUpdateAwsConnection } from "firehydrant/funcs/integrationsUpdateAwsConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsUpdatePriority(firehydrantTypescriptSDK, { + const res = await integrationsUpdateAwsConnection(firehydrant, { id: "", - patchV1TicketingPrioritiesId: {}, + updateAwsConnection: {}, }); if (!res.ok) { @@ -1305,42 +1240,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTicketingPriorityRequest](../../models/operations/updateticketingpriorityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateAwsConnectionRequest](../../models/operations/updateawsconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** +**Promise\<[components.IntegrationsAwsConnectionEntity](../../models/components/integrationsawsconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listProjects +## listAwsCloudtrailBatches -List all ticketing projects available to the organization +Lists CloudTrail batches for the authenticated organization. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.listProjects({}); + const result = await firehydrant.integrations.listAwsCloudtrailBatches({}); // Handle the result console.log(result); @@ -1354,17 +1283,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsListProjects } from "firehydrant-typescript-sdk/funcs/integrationsListProjects.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListAwsCloudtrailBatches } from "firehydrant/funcs/integrationsListAwsCloudtrailBatches.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsListProjects(firehydrantTypescriptSDK, {}); + const res = await integrationsListAwsCloudtrailBatches(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1383,46 +1312,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTicketingProjectsRequest](../../models/operations/listticketingprojectsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListAwsCloudtrailBatchesRequest](../../models/operations/listawscloudtrailbatchesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingProjectsProjectListItemEntity](../../models/components/ticketingprojectsprojectlistitementity.md)\>** +**Promise\<[components.IntegrationsAwsCloudtrailBatchEntityPaginated](../../models/components/integrationsawscloudtrailbatchentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getProjectConfigurationOptions +## getAwsCloudtrailBatch -List configuration options for a ticketing project +Retrieve a single CloudTrail batch. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.getProjectConfigurationOptions({ - ticketingProjectId: "", + const result = await firehydrant.integrations.getAwsCloudtrailBatch({ + id: "", }); - + // Handle the result + console.log(result); } run(); @@ -1433,18 +1357,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGetProjectConfigurationOptions } from "firehydrant-typescript-sdk/funcs/integrationsGetProjectConfigurationOptions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsGetAwsCloudtrailBatch } from "firehydrant/funcs/integrationsGetAwsCloudtrailBatch.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGetProjectConfigurationOptions(firehydrantTypescriptSDK, { - ticketingProjectId: "", + const res = await integrationsGetAwsCloudtrailBatch(firehydrant, { + id: "", }); if (!res.ok) { @@ -1453,7 +1377,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1463,47 +1388,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketingProjectConfigurationOptionsRequest](../../models/operations/getticketingprojectconfigurationoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetAwsCloudtrailBatchRequest](../../models/operations/getawscloudtrailbatchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IntegrationsAwsCloudtrailBatchEntity](../../models/components/integrationsawscloudtrailbatchentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getProjectFieldOptions +## updateAwsCloudtrailBatch -List configuration options for a ticketing project field +Update a CloudTrail batch with new information. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.getProjectFieldOptions({ - fieldId: "", - ticketingProjectId: "", + const result = await firehydrant.integrations.updateAwsCloudtrailBatch({ + id: "", + updateAwsCloudtrailBatch: {}, }); - + // Handle the result + console.log(result); } run(); @@ -1514,19 +1434,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGetProjectFieldOptions } from "firehydrant-typescript-sdk/funcs/integrationsGetProjectFieldOptions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsUpdateAwsCloudtrailBatch } from "firehydrant/funcs/integrationsUpdateAwsCloudtrailBatch.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGetProjectFieldOptions(firehydrantTypescriptSDK, { - fieldId: "", - ticketingProjectId: "", + const res = await integrationsUpdateAwsCloudtrailBatch(firehydrant, { + id: "", + updateAwsCloudtrailBatch: {}, }); if (!res.ok) { @@ -1535,7 +1455,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1545,43 +1466,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketingProjectFieldOptionsRequest](../../models/operations/getticketingprojectfieldoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateAwsCloudtrailBatchRequest](../../models/operations/updateawscloudtrailbatchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IntegrationsAwsCloudtrailBatchEntity](../../models/components/integrationsawscloudtrailbatchentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createFieldMap +## listAwsCloudtrailBatchEvents -Creates field map for a ticketing project +List events for an AWS CloudTrail batch ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.createFieldMap({ - ticketingProjectId: "", + const result = await firehydrant.integrations.listAwsCloudtrailBatchEvents({ + id: "", }); // Handle the result @@ -1596,18 +1511,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsCreateFieldMap } from "firehydrant-typescript-sdk/funcs/integrationsCreateFieldMap.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListAwsCloudtrailBatchEvents } from "firehydrant/funcs/integrationsListAwsCloudtrailBatchEvents.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsCreateFieldMap(firehydrantTypescriptSDK, { - ticketingProjectId: "", + const res = await integrationsListAwsCloudtrailBatchEvents(firehydrant, { + id: "", }); if (!res.ok) { @@ -1627,43 +1542,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTicketingProjectFieldMapRequest](../../models/operations/createticketingprojectfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListAwsCloudtrailBatchEventsRequest](../../models/operations/listawscloudtrailbatcheventsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingProjectFieldMapEntity](../../models/components/ticketingprojectfieldmapentity.md)\>** +**Promise\<[components.ChangeEventEntity](../../models/components/changeevententity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getAvailableFields +## searchConfluenceSpaces -Returns metadata for the fields that are available for field mapping. +Lists available space keys for the Confluence integration connection. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.getAvailableFields({ - ticketingProjectId: "", + const result = await firehydrant.integrations.searchConfluenceSpaces({ + id: "", }); // Handle the result @@ -1678,18 +1587,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGetAvailableFields } from "firehydrant-typescript-sdk/funcs/integrationsGetAvailableFields.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsSearchConfluenceSpaces } from "firehydrant/funcs/integrationsSearchConfluenceSpaces.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGetAvailableFields(firehydrantTypescriptSDK, { - ticketingProjectId: "", + const res = await integrationsSearchConfluenceSpaces(firehydrant, { + id: "", }); if (!res.ok) { @@ -1709,47 +1618,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketingProjectAvailableFieldsRequest](../../models/operations/getticketingprojectavailablefieldsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.SearchConfluenceSpacesRequest](../../models/operations/searchconfluencespacesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingFieldMapsMappableFieldEntity](../../models/components/ticketingfieldmapsmappablefieldentity.md)\>** +**Promise\<[components.IntegrationsConfluenceCloudSpaceKeyEntity](../../models/components/integrationsconfluencecloudspacekeyentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteFieldMap +## listSlackWorkspaces -Archive field map for a ticketing project +Lists all Slack workspaces ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.integrations.deleteFieldMap({ - mapId: "", - ticketingProjectId: "", + const result = await firehydrant.integrations.listSlackWorkspaces({ + connectionId: "", }); - + // Handle the result + console.log(result); } run(); @@ -1760,19 +1663,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsDeleteFieldMap } from "firehydrant-typescript-sdk/funcs/integrationsDeleteFieldMap.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListSlackWorkspaces } from "firehydrant/funcs/integrationsListSlackWorkspaces.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsDeleteFieldMap(firehydrantTypescriptSDK, { - mapId: "", - ticketingProjectId: "", + const res = await integrationsListSlackWorkspaces(firehydrant, { + connectionId: "", }); if (!res.ok) { @@ -1781,7 +1683,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1791,45 +1694,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTicketingProjectFieldMapRequest](../../models/operations/deleteticketingprojectfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSlackWorkspacesRequest](../../models/operations/listslackworkspacesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.IntegrationsSlackWorkspaceEntity](../../models/components/integrationsslackworkspaceentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateTicketingFieldMap +## listSlackUsergroups -Update field map for a ticketing project +Lists all Slack user groups ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.updateTicketingFieldMap({ - mapId: "", - ticketingProjectId: "", - }); + const result = await firehydrant.integrations.listSlackUsergroups(); // Handle the result console.log(result); @@ -1843,20 +1737,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsUpdateTicketingFieldMap } from "firehydrant-typescript-sdk/funcs/integrationsUpdateTicketingFieldMap.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListSlackUsergroups } from "firehydrant/funcs/integrationsListSlackUsergroups.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsUpdateTicketingFieldMap(firehydrantTypescriptSDK, { - mapId: "", - ticketingProjectId: "", - }); + const res = await integrationsListSlackUsergroups(firehydrant); if (!res.ok) { throw res.error; @@ -1875,48 +1766,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTicketingProjectFieldMapRequest](../../models/operations/updateticketingprojectfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingProjectFieldMapEntity](../../models/components/ticketingprojectfieldmapentity.md)\>** +**Promise\<[components.IntegrationsSlackUsergroupEntity](../../models/components/integrationsslackusergroupentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteProjectConfig +## listSlackEmojiActions -Archive configuration for a ticketing project +Lists Slack emoji actions ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.deleteProjectConfig({ - ticketingProjectId: "", - configId: "", + await firehydrant.integrations.listSlackEmojiActions({ + connectionId: "", }); - // Handle the result - console.log(result); + } run(); @@ -1927,19 +1809,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsDeleteProjectConfig } from "firehydrant-typescript-sdk/funcs/integrationsDeleteProjectConfig.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListSlackEmojiActions } from "firehydrant/funcs/integrationsListSlackEmojiActions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsDeleteProjectConfig(firehydrantTypescriptSDK, { - ticketingProjectId: "", - configId: "", + const res = await integrationsListSlackEmojiActions(firehydrant, { + connectionId: "", }); if (!res.ok) { @@ -1948,8 +1829,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1959,47 +1839,43 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTicketingProjectConfigRequest](../../models/operations/deleteticketingprojectconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSlackEmojiActionsRequest](../../models/operations/listslackemojiactionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getTicket +## createSlackEmojiAction -Retrieves a single ticket by ID +Creates a new Slack emoji action ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.integrations.getTicket({ - ticketId: "", + await firehydrant.integrations.createSlackEmojiAction({ + connectionId: "", + requestBody: { + emojiName: "", + }, }); - // Handle the result - console.log(result); + } run(); @@ -2010,18 +1886,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { integrationsGetTicket } from "firehydrant-typescript-sdk/funcs/integrationsGetTicket.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsCreateSlackEmojiAction } from "firehydrant/funcs/integrationsCreateSlackEmojiAction.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await integrationsGetTicket(firehydrantTypescriptSDK, { - ticketId: "", + const res = await integrationsCreateSlackEmojiAction(firehydrant, { + connectionId: "", + requestBody: { + emojiName: "", + }, }); if (!res.ok) { @@ -2030,8 +1909,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -2041,23 +1919,775 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketRequest](../../models/operations/getticketrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateSlackEmojiActionRequest](../../models/operations/createslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getSlackEmojiAction + +Retrieves a Slack emoji action + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.integrations.getSlackEmojiAction({ + connectionId: "", + emojiActionId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsGetSlackEmojiAction } from "firehydrant/funcs/integrationsGetSlackEmojiAction.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsGetSlackEmojiAction(firehydrant, { + connectionId: "", + emojiActionId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSlackEmojiActionRequest](../../models/operations/getslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteSlackEmojiAction + +Deletes a Slack emoji action + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.integrations.deleteSlackEmojiAction({ + connectionId: "", + emojiActionId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsDeleteSlackEmojiAction } from "firehydrant/funcs/integrationsDeleteSlackEmojiAction.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsDeleteSlackEmojiAction(firehydrant, { + connectionId: "", + emojiActionId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteSlackEmojiActionRequest](../../models/operations/deleteslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateSlackEmojiAction + +Updates a Slack emoji action + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.integrations.updateSlackEmojiAction({ + connectionId: "", + emojiActionId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsUpdateSlackEmojiAction } from "firehydrant/funcs/integrationsUpdateSlackEmojiAction.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsUpdateSlackEmojiAction(firehydrant, { + connectionId: "", + emojiActionId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateSlackEmojiActionRequest](../../models/operations/updateslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listStatuspageConnections + +Lists the available and configured Statuspage integrations connections for the authenticated organization. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.integrations.listStatuspageConnections({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListStatuspageConnections } from "firehydrant/funcs/integrationsListStatuspageConnections.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsListStatuspageConnections(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListStatuspageConnectionsRequest](../../models/operations/liststatuspageconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IntegrationsStatuspageConnectionEntityPaginated](../../models/components/integrationsstatuspageconnectionentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getStatuspageConnection + +Retrieve the information about the Statuspage connection. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.integrations.getStatuspageConnection({ + connectionId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsGetStatuspageConnection } from "firehydrant/funcs/integrationsGetStatuspageConnection.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsGetStatuspageConnection(firehydrant, { + connectionId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetStatuspageConnectionRequest](../../models/operations/getstatuspageconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IntegrationsStatuspageConnectionEntity](../../models/components/integrationsstatuspageconnectionentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteStatuspageConnection + +Deletes the given Statuspage integration connection. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.integrations.deleteStatuspageConnection({ + connectionId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsDeleteStatuspageConnection } from "firehydrant/funcs/integrationsDeleteStatuspageConnection.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsDeleteStatuspageConnection(firehydrant, { + connectionId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteStatuspageConnectionRequest](../../models/operations/deletestatuspageconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IntegrationsStatuspageConnectionEntity](../../models/components/integrationsstatuspageconnectionentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateStatuspageConnection + +Update the given Statuspage integration connection. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.integrations.updateStatuspageConnection({ + connectionId: "", + updateStatuspageConnection: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsUpdateStatuspageConnection } from "firehydrant/funcs/integrationsUpdateStatuspageConnection.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsUpdateStatuspageConnection(firehydrant, { + connectionId: "", + updateStatuspageConnection: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateStatuspageConnectionRequest](../../models/operations/updatestatuspageconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IntegrationsStatuspageConnectionEntity](../../models/components/integrationsstatuspageconnectionentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listStatuspageConnectionPages + +Lists available page IDs for the Statuspage integration connection. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.integrations.listStatuspageConnectionPages({ + connectionId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsListStatuspageConnectionPages } from "firehydrant/funcs/integrationsListStatuspageConnectionPages.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsListStatuspageConnectionPages(firehydrant, { + connectionId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListStatuspageConnectionPagesRequest](../../models/operations/liststatuspageconnectionpagesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IntegrationsStatuspagePageEntity](../../models/components/integrationsstatuspagepageentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## searchZendeskTickets + +Search for Zendesk tickets + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.integrations.searchZendeskTickets({ + connectionId: "", + query: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsSearchZendeskTickets } from "firehydrant/funcs/integrationsSearchZendeskTickets.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsSearchZendeskTickets(firehydrant, { + connectionId: "", + query: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.SearchZendeskTicketsRequest](../../models/operations/searchzendeskticketsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IntegrationsZendeskSearchTicketsPaginatedEntity](../../models/components/integrationszendesksearchticketspaginatedentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getZendeskCustomerSupportIssue + +Search for Zendesk tickets + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.integrations.getZendeskCustomerSupportIssue({ + ticketId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { integrationsGetZendeskCustomerSupportIssue } from "firehydrant/funcs/integrationsGetZendeskCustomerSupportIssue.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await integrationsGetZendeskCustomerSupportIssue(firehydrant, { + ticketId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetZendeskCustomerSupportIssueRequest](../../models/operations/getzendeskcustomersupportissuerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/list/README.md b/docs/sdks/list/README.md deleted file mode 100644 index 55a33e92..00000000 --- a/docs/sdks/list/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# List -(*tasks.list*) - -## Overview - -### Available Operations - -* [delete](#delete) - Delete a task list - -## delete - -Delete a task list - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.tasks.list.delete({ - taskListId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksListDelete } from "firehydrant-typescript-sdk/funcs/tasksListDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await tasksListDelete(firehydrantTypescriptSDK, { - taskListId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTaskListRequest](../../models/operations/deletetasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/maintenances/README.md b/docs/sdks/maintenances/README.md deleted file mode 100644 index 562480f9..00000000 --- a/docs/sdks/maintenances/README.md +++ /dev/null @@ -1,255 +0,0 @@ -# Maintenances -(*maintenances*) - -## Overview - -### Available Operations - -* [list](#list) - List scheduled maintenance events -* [create](#create) - Create a scheduled maintenance event -* [delete](#delete) - Delete a scheduled maintenance event - -## list - -Lists all scheduled maintenance events - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.maintenances.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { maintenancesList } from "firehydrant-typescript-sdk/funcs/maintenancesList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await maintenancesList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListScheduledMaintenancesRequest](../../models/operations/listscheduledmaintenancesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## create - -Create a new scheduled maintenance event - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.maintenances.create({ - name: "", - startsAt: new Date("2023-06-18T07:14:55.338Z"), - endsAt: new Date("2023-12-01T17:06:07.804Z"), - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { maintenancesCreate } from "firehydrant-typescript-sdk/funcs/maintenancesCreate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await maintenancesCreate(firehydrantTypescriptSDK, { - name: "", - startsAt: new Date("2023-06-18T07:14:55.338Z"), - endsAt: new Date("2023-12-01T17:06:07.804Z"), - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1ScheduledMaintenances](../../models/components/postv1scheduledmaintenances.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ScheduledMaintenanceEntity](../../models/components/scheduledmaintenanceentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## delete - -Delete a scheduled maintenance event, preventing it from taking place. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.maintenances.delete({ - scheduledMaintenanceId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { maintenancesDelete } from "firehydrant-typescript-sdk/funcs/maintenancesDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await maintenancesDelete(firehydrantTypescriptSDK, { - scheduledMaintenanceId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteScheduledMaintenanceRequest](../../models/operations/deletescheduledmaintenancerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/metrics/README.md b/docs/sdks/metrics/README.md deleted file mode 100644 index be8f4ed6..00000000 --- a/docs/sdks/metrics/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Metrics -(*metrics*) - -## Overview - -### Available Operations - -* [getInfrastructure](#getinfrastructure) - Get metrics for a specific catalog entry - -## getInfrastructure - -Return metrics for a specific component - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.metrics.getInfrastructure({ - infraType: "environments", - infraId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsGetInfrastructure } from "firehydrant-typescript-sdk/funcs/metricsGetInfrastructure.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await metricsGetInfrastructure(firehydrantTypescriptSDK, { - infraType: "environments", - infraId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetInfrastructureMetricsRequest](../../models/operations/getinfrastructuremetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.MetricsInfrastructureMetricsEntity](../../models/components/metricsinfrastructuremetricsentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/metricsreporting/README.md b/docs/sdks/metricsreporting/README.md index 99110d02..3d615b2d 100644 --- a/docs/sdks/metricsreporting/README.md +++ b/docs/sdks/metricsreporting/README.md @@ -3,38 +3,43 @@ ## Overview +Operations related to Metrics & Reporting + ### Available Operations -* [listMeasurementDefinitions](#listmeasurementdefinitions) - List measurement definitions -* [createMeasurementDefinition](#createmeasurementdefinition) - Create a measurement definition -* [getMeasurementDefinition](#getmeasurementdefinition) - Get a measurement definition -* [deleteMeasurementDefinition](#deletemeasurementdefinition) - Archive a measurement definition -* [updateMeasurementDefinition](#updatemeasurementdefinition) - Update a measurement definition +* [getMeanTimeReport](#getmeantimereport) - Get mean time metrics for incidents +* [listRetrospectiveMetrics](#listretrospectivemetrics) - List retrospective metrics +* [listUserInvolvementMetrics](#listuserinvolvementmetrics) - List user metrics * [listIncidentMetrics](#listincidentmetrics) - List incident metrics and analytics -* [listRetrospectives](#listretrospectives) - List retrospective metrics for a date range -* [listUserInvolvementMetrics](#listuserinvolvementmetrics) - List user involvement metrics -* [listInfrastructureMetrics](#listinfrastructuremetrics) - List metrics for all services, environments, functionalities, or customers -* [getMeanTime](#getmeantime) - Get mean time metrics for incidents +* [listInfrastructureTypeMetrics](#listinfrastructuretypemetrics) - List metrics for a component type +* [listInfrastructureMetrics](#listinfrastructuremetrics) - Get metrics for a component +* [getSavedSearch](#getsavedsearch) - Get a saved search +* [deleteSavedSearch](#deletesavedsearch) - Delete a saved search +* [updateSavedSearch](#updatesavedsearch) - Update a saved search * [listSavedSearches](#listsavedsearches) - List saved searches * [createSavedSearch](#createsavedsearch) - Create a saved search +* [getSignalsTimeseriesAnalytics](#getsignalstimeseriesanalytics) - Generate timeseries alert metrics +* [getSignalsGroupedMetrics](#getsignalsgroupedmetrics) - Generate grouped alert metrics +* [getSignalsMttxAnalytics](#getsignalsmttxanalytics) - Get MTTX analytics for signals -## listMeasurementDefinitions +## getMeanTimeReport -List all of the measurement definitions in the organization +Returns a report with time bucketed analytics data ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.metricsReporting.listMeasurementDefinitions({}); - + const result = await firehydrant.metricsReporting.getMeanTimeReport({}); + // Handle the result + console.log(result); } run(); @@ -45,17 +50,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingListMeasurementDefinitions } from "firehydrant-typescript-sdk/funcs/metricsReportingListMeasurementDefinitions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingGetMeanTimeReport } from "firehydrant/funcs/metricsReportingGetMeanTimeReport.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingListMeasurementDefinitions(firehydrantTypescriptSDK, {}); + const res = await metricsReportingGetMeanTimeReport(firehydrant, {}); if (!res.ok) { throw res.error; @@ -63,7 +68,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -73,48 +79,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListMeasurementDefinitionsRequest](../../models/operations/listmeasurementdefinitionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetMeanTimeReportRequest](../../models/operations/getmeantimereportrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.ReportEntity](../../models/components/reportentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createMeasurementDefinition +## listRetrospectiveMetrics -Create a new measurement definition +Returns a report with retrospective analytics data ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.metricsReporting.createMeasurementDefinition({ - name: "", - startsAtMilestoneId: "", - endsAtMilestoneId: "", - }); - + const result = await firehydrant.metricsReporting.listRetrospectiveMetrics({}); + // Handle the result + console.log(result); } run(); @@ -125,21 +122,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingCreateMeasurementDefinition } from "firehydrant-typescript-sdk/funcs/metricsReportingCreateMeasurementDefinition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingListRetrospectiveMetrics } from "firehydrant/funcs/metricsReportingListRetrospectiveMetrics.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingCreateMeasurementDefinition(firehydrantTypescriptSDK, { - name: "", - startsAtMilestoneId: "", - endsAtMilestoneId: "", - }); + const res = await metricsReportingListRetrospectiveMetrics(firehydrant, {}); if (!res.ok) { throw res.error; @@ -147,7 +140,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -157,46 +151,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateMeasurementDefinitionRequestBody](../../models/operations/createmeasurementdefinitionrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListRetrospectiveMetricsRequest](../../models/operations/listretrospectivemetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.MetricsRetrospectiveEntity](../../models/components/metricsretrospectiveentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getMeasurementDefinition +## listUserInvolvementMetrics -Retrieve a single measurement definition from its ID +Returns a report with time bucketed analytics data ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.metricsReporting.getMeasurementDefinition({ - measurementDefinitionId: "", - }); - + const result = await firehydrant.metricsReporting.listUserInvolvementMetrics({}); + // Handle the result + console.log(result); } run(); @@ -207,19 +194,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingGetMeasurementDefinition } from "firehydrant-typescript-sdk/funcs/metricsReportingGetMeasurementDefinition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingListUserInvolvementMetrics } from "firehydrant/funcs/metricsReportingListUserInvolvementMetrics.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingGetMeasurementDefinition(firehydrantTypescriptSDK, { - measurementDefinitionId: "", - }); + const res = await metricsReportingListUserInvolvementMetrics(firehydrant, {}); if (!res.ok) { throw res.error; @@ -227,7 +212,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -237,46 +223,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetMeasurementDefinitionRequest](../../models/operations/getmeasurementdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListUserInvolvementMetricsRequest](../../models/operations/listuserinvolvementmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.MetricsMetricsEntity](../../models/components/metricsmetricsentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteMeasurementDefinition +## listIncidentMetrics -Archives a measurement definition which will hide it from lists and metrics +Returns a report with time bucketed analytics data ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.metricsReporting.deleteMeasurementDefinition({ - measurementDefinitionId: "", - }); - + const result = await firehydrant.metricsReporting.listIncidentMetrics({}); + // Handle the result + console.log(result); } run(); @@ -287,19 +266,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingDeleteMeasurementDefinition } from "firehydrant-typescript-sdk/funcs/metricsReportingDeleteMeasurementDefinition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingListIncidentMetrics } from "firehydrant/funcs/metricsReportingListIncidentMetrics.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingDeleteMeasurementDefinition(firehydrantTypescriptSDK, { - measurementDefinitionId: "", - }); + const res = await metricsReportingListIncidentMetrics(firehydrant, {}); if (!res.ok) { throw res.error; @@ -307,7 +284,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -317,46 +295,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteMeasurementDefinitionRequest](../../models/operations/deletemeasurementdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentMetricsRequest](../../models/operations/listincidentmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.MetricsMetricsEntity](../../models/components/metricsmetricsentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateMeasurementDefinition +## listInfrastructureTypeMetrics -Update a single measurement definition from its ID +Returns metrics for all components of a given type ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.metricsReporting.updateMeasurementDefinition({ - measurementDefinitionId: "", + const result = await firehydrant.metricsReporting.listInfrastructureTypeMetrics({ + infraType: "customers", }); - + // Handle the result + console.log(result); } run(); @@ -367,18 +340,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingUpdateMeasurementDefinition } from "firehydrant-typescript-sdk/funcs/metricsReportingUpdateMeasurementDefinition.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingListInfrastructureTypeMetrics } from "firehydrant/funcs/metricsReportingListInfrastructureTypeMetrics.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingUpdateMeasurementDefinition(firehydrantTypescriptSDK, { - measurementDefinitionId: "", + const res = await metricsReportingListInfrastructureTypeMetrics(firehydrant, { + infraType: "customers", }); if (!res.ok) { @@ -387,7 +360,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -397,42 +371,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateMeasurementDefinitionRequest](../../models/operations/updatemeasurementdefinitionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListInfrastructureTypeMetricsRequest](../../models/operations/listinfrastructuretypemetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.MetricsInfrastructureListEntity](../../models/components/metricsinfrastructurelistentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listIncidentMetrics +## listInfrastructureMetrics -Returns a report with time bucketed analytics data +Return metrics for a specific component ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.metricsReporting.listIncidentMetrics({}); + const result = await firehydrant.metricsReporting.listInfrastructureMetrics({ + infraType: "environments", + infraId: "", + }); // Handle the result console.log(result); @@ -446,17 +417,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingListIncidentMetrics } from "firehydrant-typescript-sdk/funcs/metricsReportingListIncidentMetrics.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingListInfrastructureMetrics } from "firehydrant/funcs/metricsReportingListInfrastructureMetrics.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingListIncidentMetrics(firehydrantTypescriptSDK, {}); + const res = await metricsReportingListInfrastructureMetrics(firehydrant, { + infraType: "environments", + infraId: "", + }); if (!res.ok) { throw res.error; @@ -475,42 +449,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentMetricsRequest](../../models/operations/listincidentmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListInfrastructureMetricsRequest](../../models/operations/listinfrastructuremetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.MetricsMetricsEntity](../../models/components/metricsmetricsentity.md)\>** +**Promise\<[components.MetricsInfrastructureMetricsEntity](../../models/components/metricsinfrastructuremetricsentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listRetrospectives +## getSavedSearch -Returns a report with retrospective analytics data +Retrieve a specific save search ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.metricsReporting.listRetrospectives({}); + const result = await firehydrant.metricsReporting.getSavedSearch({ + resourceType: "incidents", + savedSearchId: "", + }); // Handle the result console.log(result); @@ -524,17 +495,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingListRetrospectives } from "firehydrant-typescript-sdk/funcs/metricsReportingListRetrospectives.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingGetSavedSearch } from "firehydrant/funcs/metricsReportingGetSavedSearch.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingListRetrospectives(firehydrantTypescriptSDK, {}); + const res = await metricsReportingGetSavedSearch(firehydrant, { + resourceType: "incidents", + savedSearchId: "", + }); if (!res.ok) { throw res.error; @@ -553,42 +527,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListRetrospectiveMetricsRequest](../../models/operations/listretrospectivemetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetSavedSearchRequest](../../models/operations/getsavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.MetricsRetrospectiveEntity](../../models/components/metricsretrospectiveentity.md)\>** +**Promise\<[components.SavedSearchEntity](../../models/components/savedsearchentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listUserInvolvementMetrics +## deleteSavedSearch -Returns a report with time bucketed analytics data +Delete a specific saved search ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.metricsReporting.listUserInvolvementMetrics({}); + const result = await firehydrant.metricsReporting.deleteSavedSearch({ + resourceType: "scheduled_maintenances", + savedSearchId: "", + }); // Handle the result console.log(result); @@ -602,17 +573,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingListUserInvolvementMetrics } from "firehydrant-typescript-sdk/funcs/metricsReportingListUserInvolvementMetrics.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingDeleteSavedSearch } from "firehydrant/funcs/metricsReportingDeleteSavedSearch.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingListUserInvolvementMetrics(firehydrantTypescriptSDK, {}); + const res = await metricsReportingDeleteSavedSearch(firehydrant, { + resourceType: "scheduled_maintenances", + savedSearchId: "", + }); if (!res.ok) { throw res.error; @@ -631,43 +605,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListUserInvolvementMetricsRequest](../../models/operations/listuserinvolvementmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteSavedSearchRequest](../../models/operations/deletesavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.MetricsMetricsEntity](../../models/components/metricsmetricsentity.md)\>** +**Promise\<[components.SavedSearchEntity](../../models/components/savedsearchentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listInfrastructureMetrics +## updateSavedSearch -Returns metrics for all components of a given type +Update a specific saved search ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.metricsReporting.listInfrastructureMetrics({ - infraType: "services", + const result = await firehydrant.metricsReporting.updateSavedSearch({ + resourceType: "incident_events", + savedSearchId: "", + updateSavedSearch: {}, }); // Handle the result @@ -682,18 +652,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingListInfrastructureMetrics } from "firehydrant-typescript-sdk/funcs/metricsReportingListInfrastructureMetrics.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingUpdateSavedSearch } from "firehydrant/funcs/metricsReportingUpdateSavedSearch.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingListInfrastructureMetrics(firehydrantTypescriptSDK, { - infraType: "services", + const res = await metricsReportingUpdateSavedSearch(firehydrant, { + resourceType: "incident_events", + savedSearchId: "", + updateSavedSearch: {}, }); if (!res.ok) { @@ -713,42 +685,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListInfrastructureMetricsRequest](../../models/operations/listinfrastructuremetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateSavedSearchRequest](../../models/operations/updatesavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.MetricsInfrastructureListEntity](../../models/components/metricsinfrastructurelistentity.md)\>** +**Promise\<[components.SavedSearchEntity](../../models/components/savedsearchentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getMeanTime +## listSavedSearches -Returns a report with time bucketed analytics data +Lists saved searches ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.metricsReporting.getMeanTime({}); + const result = await firehydrant.metricsReporting.listSavedSearches({ + resourceType: "incidents", + }); // Handle the result console.log(result); @@ -762,17 +730,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingGetMeanTime } from "firehydrant-typescript-sdk/funcs/metricsReportingGetMeanTime.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingListSavedSearches } from "firehydrant/funcs/metricsReportingListSavedSearches.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingGetMeanTime(firehydrantTypescriptSDK, {}); + const res = await metricsReportingListSavedSearches(firehydrant, { + resourceType: "incidents", + }); if (!res.ok) { throw res.error; @@ -791,43 +761,45 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetMeanTimeReportRequest](../../models/operations/getmeantimereportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSavedSearchesRequest](../../models/operations/listsavedsearchesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ReportEntity](../../models/components/reportentity.md)\>** +**Promise\<[components.SavedSearchEntity](../../models/components/savedsearchentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listSavedSearches +## createSavedSearch -Lists save searches +Create a new saved search for a particular resource type ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.metricsReporting.listSavedSearches({ - resourceType: "incident_events", + const result = await firehydrant.metricsReporting.createSavedSearch({ + resourceType: "services", + createSavedSearch: { + name: "", + filterValues: { + "key": "", + "key1": "", + "key2": "", + }, + }, }); // Handle the result @@ -842,18 +814,26 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingListSavedSearches } from "firehydrant-typescript-sdk/funcs/metricsReportingListSavedSearches.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingCreateSavedSearch } from "firehydrant/funcs/metricsReportingCreateSavedSearch.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingListSavedSearches(firehydrantTypescriptSDK, { - resourceType: "incident_events", + const res = await metricsReportingCreateSavedSearch(firehydrant, { + resourceType: "services", + createSavedSearch: { + name: "", + filterValues: { + "key": "", + "key1": "", + "key2": "", + }, + }, }); if (!res.ok) { @@ -873,7 +853,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSavedSearchesRequest](../../models/operations/listsavedsearchesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateSavedSearchRequest](../../models/operations/createsavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -884,42 +864,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createSavedSearch +## getSignalsTimeseriesAnalytics -Create a new saved search for a particular resource type +Generate a timeseries-based report of metrics for Signals alerts ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.metricsReporting.createSavedSearch({ - resourceType: "ticket_follow_ups", - postV1SavedSearchesResourceType: { - name: "", - filterValues: { + await firehydrant.metricsReporting.getSignalsTimeseriesAnalytics({}); - }, - }, - }); - // Handle the result - console.log(result); } run(); @@ -930,25 +895,87 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { metricsReportingCreateSavedSearch } from "firehydrant-typescript-sdk/funcs/metricsReportingCreateSavedSearch.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingGetSignalsTimeseriesAnalytics } from "firehydrant/funcs/metricsReportingGetSignalsTimeseriesAnalytics.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await metricsReportingCreateSavedSearch(firehydrantTypescriptSDK, { - resourceType: "ticket_follow_ups", - postV1SavedSearchesResourceType: { - name: "", - filterValues: { + const res = await metricsReportingGetSignalsTimeseriesAnalytics(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + - }, - }, - }); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSignalsTimeseriesAnalyticsRequest](../../models/operations/getsignalstimeseriesanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getSignalsGroupedMetrics + +Generate a report of grouped metrics for Signals alerts + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.metricsReporting.getSignalsGroupedMetrics({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingGetSignalsGroupedMetrics } from "firehydrant/funcs/metricsReportingGetSignalsGroupedMetrics.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await metricsReportingGetSignalsGroupedMetrics(firehydrant, {}); if (!res.ok) { throw res.error; @@ -956,8 +983,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -967,23 +993,87 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateSavedSearchRequest](../../models/operations/createsavedsearchrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetSignalsGroupedMetricsRequest](../../models/operations/getsignalsgroupedmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.SavedSearchEntity](../../models/components/savedsearchentity.md)\>** +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getSignalsMttxAnalytics + +Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.metricsReporting.getSignalsMttxAnalytics({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { metricsReportingGetSignalsMttxAnalytics } from "firehydrant/funcs/metricsReportingGetSignalsMttxAnalytics.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await metricsReportingGetSignalsMttxAnalytics(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSignalsMttxAnalyticsRequest](../../models/operations/getsignalsmttxanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/oncallschedules/README.md b/docs/sdks/oncallschedules/README.md deleted file mode 100644 index 17785c87..00000000 --- a/docs/sdks/oncallschedules/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# OnCallSchedules -(*onCallSchedules*) - -## Overview - -### Available Operations - -* [delete](#delete) - Delete an on-call schedule for a team - -## delete - -Delete a Signals on-call schedule by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.onCallSchedules.delete({ - teamId: "", - scheduleId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { onCallSchedulesDelete } from "firehydrant-typescript-sdk/funcs/onCallSchedulesDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await onCallSchedulesDelete(firehydrantTypescriptSDK, { - teamId: "", - scheduleId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTeamOnCallScheduleRequest](../../models/operations/deleteteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/projectconfigurations/README.md b/docs/sdks/projectconfigurations/README.md deleted file mode 100644 index e0dd462c..00000000 --- a/docs/sdks/projectconfigurations/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# ProjectConfigurations -(*projectConfigurations*) - -## Overview - -### Available Operations - -* [create](#create) - Create a ticketing project configuration -* [get](#get) - Get a ticketing project configuration - -## create - -Creates configuration for a ticketing project - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.projectConfigurations.create({ - ticketingProjectId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { projectConfigurationsCreate } from "firehydrant-typescript-sdk/funcs/projectConfigurationsCreate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await projectConfigurationsCreate(firehydrantTypescriptSDK, { - ticketingProjectId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTicketingProjectConfigurationRequest](../../models/operations/createticketingprojectconfigurationrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## get - -Retrieve configuration for a ticketing project - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.projectConfigurations.get({ - ticketingProjectId: "", - configId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { projectConfigurationsGet } from "firehydrant-typescript-sdk/funcs/projectConfigurationsGet.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await projectConfigurationsGet(firehydrantTypescriptSDK, { - ticketingProjectId: "", - configId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketingProjectConfigRequest](../../models/operations/getticketingprojectconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/retrospectives/README.md b/docs/sdks/retrospectives/README.md index 5785b9f8..7d2eb415 100644 --- a/docs/sdks/retrospectives/README.md +++ b/docs/sdks/retrospectives/README.md @@ -7,36 +7,1171 @@ Operations related to Retrospectives ### Available Operations -* [listQuestions](#listquestions) - List retrospective questions -* [updateQuestions](#updatequestions) - Update retrospective questions -* [getQuestion](#getquestion) - Get a retrospective question -* [listReports](#listreports) - List retrospective reports -* [createReport](#createreport) - Create a retrospective report -* [getReport](#getreport) - Get a retrospective report -* [updateReport](#updatereport) - Update a retrospective report -* [updateField](#updatefield) - Update a retrospective field -* [publishReport](#publishreport) - Publish a retrospective report -* [listReportReasons](#listreportreasons) - List contributing factors for a retrospective report -* [createReason](#createreason) - Create a contributing factor for a retrospective report -* [updateReportReasonOrder](#updatereportreasonorder) - Update the order of contributing factors in a retrospective report -* [deleteReason](#deletereason) - Delete a contributing factor from a retrospective report -* [updateReason](#updatereason) - Update a contributing factor in a retrospective report - -## listQuestions +* [shareIncidentRetrospectives](#shareincidentretrospectives) - Share an incident's retrospective +* [exportIncidentRetrospectives](#exportincidentretrospectives) - Export an incident's retrospective(s) +* [listIncidentRetrospectives](#listincidentretrospectives) - All attached retrospectives for an incident +* [createIncidentRetrospective](#createincidentretrospective) - Create a new retrospective on the incident using the template +* [updateIncidentRetrospective](#updateincidentretrospective) - Update a retrospective on the incident +* [createIncidentRetrospectiveField](#createincidentretrospectivefield) - Appends a new incident retrospective field to an incident retrospective +* [getIncidentRetrospectiveField](#getincidentretrospectivefield) - Get a retrospective field +* [updateIncidentRetrospectiveField](#updateincidentretrospectivefield) - Update the value on a retrospective field +* [createIncidentRetrospectiveDynamicInput](#createincidentretrospectivedynamicinput) - Add a new dynamic input field to a retrospective's dynamic input group field +* [deleteIncidentRetrospectiveDynamicInput](#deleteincidentretrospectivedynamicinput) - Removes a dynamic input from a retrospective's dynamic input group field +* [listRetrospectives](#listretrospectives) - List retrospective reports +* [listPostMortemReports](#listpostmortemreports) - List retrospective reports +* [createPostMortemReport](#createpostmortemreport) - Create a retrospective report +* [getPostMortemReport](#getpostmortemreport) - Get a retrospective report +* [updatePostMortemReport](#updatepostmortemreport) - Update a retrospective report +* [listPostMortemReasons](#listpostmortemreasons) - List contributing factors for a retrospective report +* [createPostMortemReason](#createpostmortemreason) - Create a contributing factor for a retrospective report +* [deletePostMortemReason](#deletepostmortemreason) - Delete a contributing factor from a retrospective report +* [updatePostMortemReason](#updatepostmortemreason) - Update a contributing factor in a retrospective report +* [reorderPostMortemReasons](#reorderpostmortemreasons) - Reorder a contributing factor for a retrospective report +* [publishPostMortemReport](#publishpostmortemreport) - Publish a retrospective report +* [updatePostMortemField](#updatepostmortemfield) - Update a retrospective field +* [listPostMortemQuestions](#listpostmortemquestions) - List retrospective questions +* [updatePostMortemQuestions](#updatepostmortemquestions) - Update retrospective questions +* [getPostMortemQuestion](#getpostmortemquestion) - Get a retrospective question +* [listRetrospectiveTemplates](#listretrospectivetemplates) - List retrospective templates +* [createRetrospectiveTemplate](#createretrospectivetemplate) - Create a retrospective template +* [getRetrospectiveTemplate](#getretrospectivetemplate) - Get a retrospective template +* [deleteRetrospectiveTemplate](#deleteretrospectivetemplate) - Delete a retrospective template +* [updateRetrospectiveTemplate](#updateretrospectivetemplate) - Update a retrospective template + +## shareIncidentRetrospectives + +Share incident retrospectives with users or teams -List the questions configured to be provided and filled out on each retrospective report. +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.shareIncidentRetrospectives({ + incidentId: "", + requestBody: { + retrospectiveIds: [ + "", + ], + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesShareIncidentRetrospectives } from "firehydrant/funcs/retrospectivesShareIncidentRetrospectives.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesShareIncidentRetrospectives(firehydrant, { + incidentId: "", + requestBody: { + retrospectiveIds: [ + "", + ], + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ShareIncidentRetrospectivesRequest](../../models/operations/shareincidentretrospectivesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsShareRetrospectivesResultEntity](../../models/components/incidentsshareretrospectivesresultentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## exportIncidentRetrospectives + +Export incident's retrospective(s) using their templates + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.exportIncidentRetrospectives({ + incidentId: "", + requestBody: { + integrationSlug: "google_docs", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesExportIncidentRetrospectives } from "firehydrant/funcs/retrospectivesExportIncidentRetrospectives.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesExportIncidentRetrospectives(firehydrant, { + incidentId: "", + requestBody: { + integrationSlug: "google_docs", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ExportIncidentRetrospectivesRequest](../../models/operations/exportincidentretrospectivesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsExportRetrospectivesResultEntity](../../models/components/incidentsexportretrospectivesresultentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listIncidentRetrospectives + +Retrieve retrospectives attached to an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.listIncidentRetrospectives({ + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesListIncidentRetrospectives } from "firehydrant/funcs/retrospectivesListIncidentRetrospectives.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesListIncidentRetrospectives(firehydrant, { + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListIncidentRetrospectivesRequest](../../models/operations/listincidentretrospectivesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveEntityPaginated](../../models/components/incidentsretrospectiveentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createIncidentRetrospective + +Create a new retrospective for an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.createIncidentRetrospective({ + incidentId: "", + requestBody: { + retrospectiveTemplateId: "", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesCreateIncidentRetrospective } from "firehydrant/funcs/retrospectivesCreateIncidentRetrospective.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesCreateIncidentRetrospective(firehydrant, { + incidentId: "", + requestBody: { + retrospectiveTemplateId: "", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateIncidentRetrospectiveRequest](../../models/operations/createincidentretrospectiverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveEntity](../../models/components/incidentsretrospectiveentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateIncidentRetrospective + +Update a retrospective attached to an incident + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.updateIncidentRetrospective({ + retrospectiveId: "", + incidentId: "", + updateIncidentRetrospective: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesUpdateIncidentRetrospective } from "firehydrant/funcs/retrospectivesUpdateIncidentRetrospective.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesUpdateIncidentRetrospective(firehydrant, { + retrospectiveId: "", + incidentId: "", + updateIncidentRetrospective: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateIncidentRetrospectiveRequest](../../models/operations/updateincidentretrospectiverequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveEntity](../../models/components/incidentsretrospectiveentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createIncidentRetrospectiveField + +Add a new field to an incident retrospective + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.createIncidentRetrospectiveField({ + retrospectiveId: "", + incidentId: "", + requestBody: { + label: "", + type: "dynamic_input_group", + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesCreateIncidentRetrospectiveField } from "firehydrant/funcs/retrospectivesCreateIncidentRetrospectiveField.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesCreateIncidentRetrospectiveField(firehydrant, { + retrospectiveId: "", + incidentId: "", + requestBody: { + label: "", + type: "dynamic_input_group", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateIncidentRetrospectiveFieldRequest](../../models/operations/createincidentretrospectivefieldrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveFieldEntity](../../models/components/incidentsretrospectivefieldentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getIncidentRetrospectiveField + +Retrieve a field on an incident retrospective + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.getIncidentRetrospectiveField({ + retrospectiveId: "", + fieldId: "", + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesGetIncidentRetrospectiveField } from "firehydrant/funcs/retrospectivesGetIncidentRetrospectiveField.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesGetIncidentRetrospectiveField(firehydrant, { + retrospectiveId: "", + fieldId: "", + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetIncidentRetrospectiveFieldRequest](../../models/operations/getincidentretrospectivefieldrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveFieldEntity](../../models/components/incidentsretrospectivefieldentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateIncidentRetrospectiveField + +Update retrospective field value + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.updateIncidentRetrospectiveField({ + retrospectiveId: "", + fieldId: "", + incidentId: "", + updateIncidentRetrospectiveField: { + value: 168058, + }, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesUpdateIncidentRetrospectiveField } from "firehydrant/funcs/retrospectivesUpdateIncidentRetrospectiveField.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesUpdateIncidentRetrospectiveField(firehydrant, { + retrospectiveId: "", + fieldId: "", + incidentId: "", + updateIncidentRetrospectiveField: { + value: 168058, + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateIncidentRetrospectiveFieldRequest](../../models/operations/updateincidentretrospectivefieldrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveFieldEntity](../../models/components/incidentsretrospectivefieldentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createIncidentRetrospectiveDynamicInput + +Add a new dynamic input field to a dynamic input group + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.createIncidentRetrospectiveDynamicInput({ + retrospectiveId: "", + fieldId: "", + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesCreateIncidentRetrospectiveDynamicInput } from "firehydrant/funcs/retrospectivesCreateIncidentRetrospectiveDynamicInput.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesCreateIncidentRetrospectiveDynamicInput(firehydrant, { + retrospectiveId: "", + fieldId: "", + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateIncidentRetrospectiveDynamicInputRequest](../../models/operations/createincidentretrospectivedynamicinputrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveFieldEntity](../../models/components/incidentsretrospectivefieldentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteIncidentRetrospectiveDynamicInput + +Delete a dynamic input on a dynamic input group + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.deleteIncidentRetrospectiveDynamicInput({ + retrospectiveId: "", + fieldId: "", + dynamicInputFieldId: "", + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesDeleteIncidentRetrospectiveDynamicInput } from "firehydrant/funcs/retrospectivesDeleteIncidentRetrospectiveDynamicInput.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesDeleteIncidentRetrospectiveDynamicInput(firehydrant, { + retrospectiveId: "", + fieldId: "", + dynamicInputFieldId: "", + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteIncidentRetrospectiveDynamicInputRequest](../../models/operations/deleteincidentretrospectivedynamicinputrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveFieldEntity](../../models/components/incidentsretrospectivefieldentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listRetrospectives + +List all retrospective reports + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.listRetrospectives({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesListRetrospectives } from "firehydrant/funcs/retrospectivesListRetrospectives.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesListRetrospectives(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListRetrospectivesRequest](../../models/operations/listretrospectivesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.IncidentsRetrospectiveEntityPaginated](../../models/components/incidentsretrospectiveentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listPostMortemReports + +List all reports + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.listPostMortemReports({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesListPostMortemReports } from "firehydrant/funcs/retrospectivesListPostMortemReports.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesListPostMortemReports(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPostMortemReportsRequest](../../models/operations/listpostmortemreportsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PostMortemsPostMortemReportEntityPaginated](../../models/components/postmortemspostmortemreportentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createPostMortemReport + +Create a report + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.createPostMortemReport({ + incidentId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesCreatePostMortemReport } from "firehydrant/funcs/retrospectivesCreatePostMortemReport.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesCreatePostMortemReport(firehydrant, { + incidentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreatePostMortemReport](../../models/components/createpostmortemreport.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PostMortemsPostMortemReportEntity](../../models/components/postmortemspostmortemreportentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getPostMortemReport + +Get a report + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.getPostMortemReport({ + reportId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesGetPostMortemReport } from "firehydrant/funcs/retrospectivesGetPostMortemReport.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesGetPostMortemReport(firehydrant, { + reportId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPostMortemReportRequest](../../models/operations/getpostmortemreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PostMortemsPostMortemReportEntity](../../models/components/postmortemspostmortemreportentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updatePostMortemReport + +Update a report ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.listQuestions({}); + const result = await firehydrant.retrospectives.updatePostMortemReport({ + reportId: "", + updatePostMortemReport: {}, + }); // Handle the result console.log(result); @@ -50,17 +1185,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesListQuestions } from "firehydrant-typescript-sdk/funcs/retrospectivesListQuestions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesUpdatePostMortemReport } from "firehydrant/funcs/retrospectivesUpdatePostMortemReport.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesListQuestions(firehydrantTypescriptSDK, {}); + const res = await retrospectivesUpdatePostMortemReport(firehydrant, { + reportId: "", + updatePostMortemReport: {}, + }); if (!res.ok) { throw res.error; @@ -79,42 +1217,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListRetrospectiveQuestionsRequest](../../models/operations/listretrospectivequestionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdatePostMortemReportRequest](../../models/operations/updatepostmortemreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsQuestionTypeEntityPaginated](../../models/components/postmortemsquestiontypeentitypaginated.md)\>** +**Promise\<[components.PostMortemsPostMortemReportEntity](../../models/components/postmortemspostmortemreportentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateQuestions +## listPostMortemReasons -Update the questions configured to be provided and filled out on future retrospective reports. +List all contributing factors to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.updateQuestions({}); + const result = await firehydrant.retrospectives.listPostMortemReasons({ + reportId: "", + }); // Handle the result console.log(result); @@ -128,17 +1262,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesUpdateQuestions } from "firehydrant-typescript-sdk/funcs/retrospectivesUpdateQuestions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesListPostMortemReasons } from "firehydrant/funcs/retrospectivesListPostMortemReasons.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesUpdateQuestions(firehydrantTypescriptSDK, {}); + const res = await retrospectivesListPostMortemReasons(firehydrant, { + reportId: "", + }); if (!res.ok) { throw res.error; @@ -157,46 +1293,44 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PutV1PostMortemsQuestions](../../models/components/putv1postmortemsquestions.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListPostMortemReasonsRequest](../../models/operations/listpostmortemreasonsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsQuestionTypeEntity](../../models/components/postmortemsquestiontypeentity.md)\>** +**Promise\<[components.PostMortemsReasonEntityPaginated](../../models/components/postmortemsreasonentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getQuestion +## createPostMortemReason -Get an incident retrospective question +Add a new contributing factor to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.retrospectives.getQuestion({ - questionId: "", + const result = await firehydrant.retrospectives.createPostMortemReason({ + reportId: "", + createPostMortemReason: { + summary: "", + }, }); - + // Handle the result + console.log(result); } run(); @@ -207,18 +1341,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesGetQuestion } from "firehydrant-typescript-sdk/funcs/retrospectivesGetQuestion.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesCreatePostMortemReason } from "firehydrant/funcs/retrospectivesCreatePostMortemReason.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesGetQuestion(firehydrantTypescriptSDK, { - questionId: "", + const res = await retrospectivesCreatePostMortemReason(firehydrant, { + reportId: "", + createPostMortemReason: { + summary: "", + }, }); if (!res.ok) { @@ -227,7 +1364,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -237,42 +1375,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRetrospectiveQuestionRequest](../../models/operations/getretrospectivequestionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreatePostMortemReasonRequest](../../models/operations/createpostmortemreasonrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listReports +## deletePostMortemReason -List all reports +Delete a contributing factor ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.listReports({}); + const result = await firehydrant.retrospectives.deletePostMortemReason({ + reportId: "", + reasonId: "", + }); // Handle the result console.log(result); @@ -286,17 +1421,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesListReports } from "firehydrant-typescript-sdk/funcs/retrospectivesListReports.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesDeletePostMortemReason } from "firehydrant/funcs/retrospectivesDeletePostMortemReason.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesListReports(firehydrantTypescriptSDK, {}); + const res = await retrospectivesDeletePostMortemReason(firehydrant, { + reportId: "", + reasonId: "", + }); if (!res.ok) { throw res.error; @@ -315,43 +1453,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListRetrospectiveReportsRequest](../../models/operations/listretrospectivereportsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeletePostMortemReasonRequest](../../models/operations/deletepostmortemreasonrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsPostMortemReportEntityPaginated](../../models/components/postmortemspostmortemreportentitypaginated.md)\>** +**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createReport +## updatePostMortemReason -Create a report +Update a contributing factor ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.createReport({ - incidentId: "", + const result = await firehydrant.retrospectives.updatePostMortemReason({ + reportId: "", + reasonId: "", + updatePostMortemReason: {}, }); // Handle the result @@ -366,18 +1500,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesCreateReport } from "firehydrant-typescript-sdk/funcs/retrospectivesCreateReport.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesUpdatePostMortemReason } from "firehydrant/funcs/retrospectivesUpdatePostMortemReason.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesCreateReport(firehydrantTypescriptSDK, { - incidentId: "", + const res = await retrospectivesUpdatePostMortemReason(firehydrant, { + reportId: "", + reasonId: "", + updatePostMortemReason: {}, }); if (!res.ok) { @@ -397,43 +1533,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1PostMortemsReports](../../models/components/postv1postmortemsreports.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdatePostMortemReasonRequest](../../models/operations/updatepostmortemreasonrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsPostMortemReportEntity](../../models/components/postmortemspostmortemreportentity.md)\>** +**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getReport +## reorderPostMortemReasons -Get a report +Update the order of contributing factors in a retrospective report ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.getReport({ + const result = await firehydrant.retrospectives.reorderPostMortemReasons({ reportId: "", + reorderPostMortemReasons: { + oldPosition: 735999, + newPosition: 264317, + }, }); // Handle the result @@ -448,18 +1582,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesGetReport } from "firehydrant-typescript-sdk/funcs/retrospectivesGetReport.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesReorderPostMortemReasons } from "firehydrant/funcs/retrospectivesReorderPostMortemReasons.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesGetReport(firehydrantTypescriptSDK, { + const res = await retrospectivesReorderPostMortemReasons(firehydrant, { reportId: "", + reorderPostMortemReasons: { + oldPosition: 735999, + newPosition: 264317, + }, }); if (!res.ok) { @@ -479,44 +1617,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetPostMortemReportRequest](../../models/operations/getpostmortemreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ReorderPostMortemReasonsRequest](../../models/operations/reorderpostmortemreasonsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsPostMortemReportEntity](../../models/components/postmortemspostmortemreportentity.md)\>** +**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateReport +## publishPostMortemReport -Update a report +Marks an incident retrospective as published and emails all of the participants in the report the summary ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.updateReport({ + const result = await firehydrant.retrospectives.publishPostMortemReport({ reportId: "", - patchV1PostMortemsReportsReportId: {}, + publishPostMortemReport: {}, }); // Handle the result @@ -531,19 +1663,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesUpdateReport } from "firehydrant-typescript-sdk/funcs/retrospectivesUpdateReport.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesPublishPostMortemReport } from "firehydrant/funcs/retrospectivesPublishPostMortemReport.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesUpdateReport(firehydrantTypescriptSDK, { + const res = await retrospectivesPublishPostMortemReport(firehydrant, { reportId: "", - patchV1PostMortemsReportsReportId: {}, + publishPostMortemReport: {}, }); if (!res.ok) { @@ -563,7 +1695,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdatePostMortemReportRequest](../../models/operations/updatepostmortemreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.PublishPostMortemReportRequest](../../models/operations/publishpostmortemreportrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -574,34 +1706,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateField +## updatePostMortemField Update a field value on a post mortem report ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.updateField({ + const result = await firehydrant.retrospectives.updatePostMortemField({ fieldId: "", reportId: "", - patchV1PostMortemsReportsReportIdFieldsFieldId: { + updatePostMortemField: { value: "", }, }); @@ -618,20 +1745,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesUpdateField } from "firehydrant-typescript-sdk/funcs/retrospectivesUpdateField.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesUpdatePostMortemField } from "firehydrant/funcs/retrospectivesUpdatePostMortemField.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesUpdateField(firehydrantTypescriptSDK, { + const res = await retrospectivesUpdatePostMortemField(firehydrant, { fieldId: "", reportId: "", - patchV1PostMortemsReportsReportIdFieldsFieldId: { + updatePostMortemField: { value: "", }, }); @@ -653,7 +1780,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRetrospectiveFieldRequest](../../models/operations/updateretrospectivefieldrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdatePostMortemFieldRequest](../../models/operations/updatepostmortemfieldrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -664,34 +1791,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## publishReport +## listPostMortemQuestions -Marks an incident retrospective as published and emails all of the participants in the report the summary +List the questions configured to be provided and filled out on each retrospective report. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.publishReport({ - reportId: "", - postV1PostMortemsReportsReportIdPublish: {}, - }); + const result = await firehydrant.retrospectives.listPostMortemQuestions({}); // Handle the result console.log(result); @@ -705,20 +1823,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesPublishReport } from "firehydrant-typescript-sdk/funcs/retrospectivesPublishReport.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesListPostMortemQuestions } from "firehydrant/funcs/retrospectivesListPostMortemQuestions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesPublishReport(firehydrantTypescriptSDK, { - reportId: "", - postV1PostMortemsReportsReportIdPublish: {}, - }); + const res = await retrospectivesListPostMortemQuestions(firehydrant, {}); if (!res.ok) { throw res.error; @@ -737,45 +1852,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.PublishRetrospectiveReportRequest](../../models/operations/publishretrospectivereportrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListPostMortemQuestionsRequest](../../models/operations/listpostmortemquestionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsPostMortemReportEntity](../../models/components/postmortemspostmortemreportentity.md)\>** +**Promise\<[components.PostMortemsQuestionTypeEntityPaginated](../../models/components/postmortemsquestiontypeentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listReportReasons +## updatePostMortemQuestions -List all contributing factors to an incident +Update the questions configured to be provided and filled out on future retrospective reports. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.listReportReasons({ - reportId: "", - }); + const result = await firehydrant.retrospectives.updatePostMortemQuestions({}); // Handle the result console.log(result); @@ -789,18 +1895,91 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesListReportReasons } from "firehydrant-typescript-sdk/funcs/retrospectivesListReportReasons.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesUpdatePostMortemQuestions } from "firehydrant/funcs/retrospectivesUpdatePostMortemQuestions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesListReportReasons(firehydrantTypescriptSDK, { - reportId: "", + const res = await retrospectivesUpdatePostMortemQuestions(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.UpdatePostMortemQuestions](../../models/components/updatepostmortemquestions.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.PostMortemsQuestionTypeEntity](../../models/components/postmortemsquestiontypeentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getPostMortemQuestion + +Get an incident retrospective question configured to be provided and filled out on each retrospective report. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.retrospectives.getPostMortemQuestion({ + questionId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesGetPostMortemQuestion } from "firehydrant/funcs/retrospectivesGetPostMortemQuestion.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesGetPostMortemQuestion(firehydrant, { + questionId: "", }); if (!res.ok) { @@ -809,6 +1988,77 @@ async function run() { const { value: result } = res; + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPostMortemQuestionRequest](../../models/operations/getpostmortemquestionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listRetrospectiveTemplates + +List all retrospective templates + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.retrospectives.listRetrospectiveTemplates({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesListRetrospectiveTemplates } from "firehydrant/funcs/retrospectivesListRetrospectiveTemplates.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await retrospectivesListRetrospectiveTemplates(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + // Handle the result console.log(result); } @@ -820,46 +2070,52 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListRetrospectiveReportReasonsRequest](../../models/operations/listretrospectivereportreasonsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListRetrospectiveTemplatesRequest](../../models/operations/listretrospectivetemplatesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsReasonEntityPaginated](../../models/components/postmortemsreasonentitypaginated.md)\>** +**Promise\<[components.RetrospectivesIndexTemplateEntityPaginated](../../models/components/retrospectivesindextemplateentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createReason +## createRetrospectiveTemplate -Add a new contributing factor to an incident +Create a new retrospective template ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.createReason({ - reportId: "", - postV1PostMortemsReportsReportIdReasons: { - summary: "", - }, + const result = await firehydrant.retrospectives.createRetrospectiveTemplate({ + name: "", + description: "second-hand ample mid bidet fooey", + sectionsSlug: [ + "key_data", + "key_data", + "key_data", + ], + sectionsElements: [ + "", + "", + "", + ], + fieldsLabel: [], + fieldsType: [ + "multi_select", + ], }); // Handle the result @@ -874,21 +2130,33 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesCreateReason } from "firehydrant-typescript-sdk/funcs/retrospectivesCreateReason.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesCreateRetrospectiveTemplate } from "firehydrant/funcs/retrospectivesCreateRetrospectiveTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesCreateReason(firehydrantTypescriptSDK, { - reportId: "", - postV1PostMortemsReportsReportIdReasons: { - summary: "", - }, + const res = await retrospectivesCreateRetrospectiveTemplate(firehydrant, { + name: "", + description: "second-hand ample mid bidet fooey", + sectionsSlug: [ + "key_data", + "key_data", + "key_data", + ], + sectionsElements: [ + "", + "", + "", + ], + fieldsLabel: [], + fieldsType: [ + "multi_select", + ], }); if (!res.ok) { @@ -908,47 +2176,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateRetrospectiveReportReasonRequest](../../models/operations/createretrospectivereportreasonrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateRetrospectiveTemplateRequest](../../models/operations/createretrospectivetemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** +**Promise\<[components.RetrospectivesTemplateEntity](../../models/components/retrospectivestemplateentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateReportReasonOrder +## getRetrospectiveTemplate -Reorder a contributing factor +Retrieve a single retrospective template by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.updateReportReasonOrder({ - reportId: "", - putV1PostMortemsReportsReportIdReasonsOrder: { - oldPosition: 698480, - newPosition: 723135, - }, + const result = await firehydrant.retrospectives.getRetrospectiveTemplate({ + retrospectiveTemplateId: "", }); // Handle the result @@ -963,22 +2221,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesUpdateReportReasonOrder } from "firehydrant-typescript-sdk/funcs/retrospectivesUpdateReportReasonOrder.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesGetRetrospectiveTemplate } from "firehydrant/funcs/retrospectivesGetRetrospectiveTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesUpdateReportReasonOrder(firehydrantTypescriptSDK, { - reportId: "", - putV1PostMortemsReportsReportIdReasonsOrder: { - oldPosition: 698480, - newPosition: 723135, - }, + const res = await retrospectivesGetRetrospectiveTemplate(firehydrant, { + retrospectiveTemplateId: "", }); if (!res.ok) { @@ -998,44 +2252,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRetrospectiveReportReasonOrderRequest](../../models/operations/updateretrospectivereportreasonorderrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetRetrospectiveTemplateRequest](../../models/operations/getretrospectivetemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** +**Promise\<[components.RetrospectivesTemplateEntity](../../models/components/retrospectivestemplateentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteReason +## deleteRetrospectiveTemplate -Delete a contributing factor +Delete a single retrospective template ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.deleteReason({ - reportId: "", - reasonId: "", + const result = await firehydrant.retrospectives.deleteRetrospectiveTemplate({ + retrospectiveTemplateId: "", }); // Handle the result @@ -1050,19 +2297,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesDeleteReason } from "firehydrant-typescript-sdk/funcs/retrospectivesDeleteReason.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesDeleteRetrospectiveTemplate } from "firehydrant/funcs/retrospectivesDeleteRetrospectiveTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesDeleteReason(firehydrantTypescriptSDK, { - reportId: "", - reasonId: "", + const res = await retrospectivesDeleteRetrospectiveTemplate(firehydrant, { + retrospectiveTemplateId: "", }); if (!res.ok) { @@ -1082,45 +2328,47 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteRetrospectiveReasonRequest](../../models/operations/deleteretrospectivereasonrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteRetrospectiveTemplateRequest](../../models/operations/deleteretrospectivetemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** +**Promise\<[components.RetrospectivesTemplateEntity](../../models/components/retrospectivestemplateentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateReason +## updateRetrospectiveTemplate -Update a contributing factor +Update a single retrospective template ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.retrospectives.updateReason({ - reportId: "", - reasonId: "", - patchV1PostMortemsReportsReportIdReasonsReasonId: {}, + const result = await firehydrant.retrospectives.updateRetrospectiveTemplate({ + retrospectiveTemplateId: "", + requestBody: { + sectionsSlug: [], + sectionsElements: [ + "", + "", + "", + ], + fieldsLabel: [], + fieldsType: [], + }, }); // Handle the result @@ -1135,20 +2383,28 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { retrospectivesUpdateReason } from "firehydrant-typescript-sdk/funcs/retrospectivesUpdateReason.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { retrospectivesUpdateRetrospectiveTemplate } from "firehydrant/funcs/retrospectivesUpdateRetrospectiveTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await retrospectivesUpdateReason(firehydrantTypescriptSDK, { - reportId: "", - reasonId: "", - patchV1PostMortemsReportsReportIdReasonsReasonId: {}, + const res = await retrospectivesUpdateRetrospectiveTemplate(firehydrant, { + retrospectiveTemplateId: "", + requestBody: { + sectionsSlug: [], + sectionsElements: [ + "", + "", + "", + ], + fieldsLabel: [], + fieldsType: [], + }, }); if (!res.ok) { @@ -1168,23 +2424,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRetrospectiveReasonRequest](../../models/operations/updateretrospectivereasonrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateRetrospectiveTemplateRequest](../../models/operations/updateretrospectivetemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.PostMortemsReasonEntity](../../models/components/postmortemsreasonentity.md)\>** +**Promise\<[components.RetrospectivesTemplateEntity](../../models/components/retrospectivestemplateentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/runbooks/README.md b/docs/sdks/runbooks/README.md index 3f8d3cd0..f3be1ec5 100644 --- a/docs/sdks/runbooks/README.md +++ b/docs/sdks/runbooks/README.md @@ -7,197 +7,37 @@ Operations related to Runbooks ### Available Operations -* [listAudits](#listaudits) - List runbook audits -* [list](#list) - List runbooks -* [create](#create) - Create a runbook -* [listActions](#listactions) - List runbook actions -* [listExecutions](#listexecutions) - List runbook executions -* [createExecution](#createexecution) - Create a runbook execution -* [getExecution](#getexecution) - Get a runbook execution -* [updateExecutionStep](#updateexecutionstep) - Update a runbook execution step -* [getExecutionStepScript](#getexecutionstepscript) - Get a runbook execution step script -* [updateExecutionStepScriptState](#updateexecutionstepscriptstate) - Update the script state for a runbook execution step -* [updateExecutionStepVotes](#updateexecutionstepvotes) - Update votes for a runbook execution step -* [getStepVoteStatus](#getstepvotestatus) - Get vote counts for a runbook step -* [updateExecutionVotes](#updateexecutionvotes) - Vote on a runbook execution -* [getExecutionVoteStatus](#getexecutionvotestatus) - Get vote counts for a runbook execution -* [listSelectOptions](#listselectoptions) - List select options for a runbook integration action field -* [get](#get) - Get a runbook -* [update](#update) - Update a runbook -* [delete](#delete) - Delete a runbook - -## listAudits - -Please contact support to enable audit logging for your account. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.runbooks.listAudits({}); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksListAudits } from "firehydrant-typescript-sdk/funcs/runbooksListAudits.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await runbooksListAudits(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListRunbookAuditsRequest](../../models/operations/listrunbookauditsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## list - -Lists all available runbooks. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.runbooks.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksList } from "firehydrant-typescript-sdk/funcs/runbooksList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await runbooksList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListRunbooksRequest](../../models/operations/listrunbooksrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.RunbookEntity](../../models/components/runbookentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## create - -Create a new runbook for use with incidents. +* [listRunbookActions](#listrunbookactions) - List runbook actions +* [listRunbookExecutions](#listrunbookexecutions) - List runbook executions +* [createRunbookExecution](#createrunbookexecution) - Create a runbook execution +* [getRunbookExecution](#getrunbookexecution) - Get a runbook execution +* [deleteRunbookExecution](#deleterunbookexecution) - Terminate a runbook execution +* [updateRunbookExecutionStep](#updaterunbookexecutionstep) - Update a runbook step execution +* [getRunbookExecutionStepScript](#getrunbookexecutionstepscript) - Get a step's bash script +* [updateRunbookExecutionStepScript](#updaterunbookexecutionstepscript) - Update a script step's execution status +* [getRunbookActionFieldOptions](#getrunbookactionfieldoptions) - List select options for a runbook integration action field +* [listRunbooks](#listrunbooks) - List runbooks +* [createRunbook](#createrunbook) - Create a runbook +* [getRunbook](#getrunbook) - Get a runbook +* [updateRunbook](#updaterunbook) - Update a runbook +* [deleteRunbook](#deleterunbook) - Delete a runbook +* [listRunbookAudits](#listrunbookaudits) - List runbook audits + +## listRunbookActions + +List all runbook actions available through your connected integrations ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.create({ - name: "", - type: "general", - }); + const result = await firehydrant.runbooks.listRunbookActions({}); // Handle the result console.log(result); @@ -211,98 +51,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksCreate } from "firehydrant-typescript-sdk/funcs/runbooksCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksListRunbookActions } from "firehydrant/funcs/runbooksListRunbookActions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksCreate(firehydrantTypescriptSDK, { - name: "", - type: "general", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Runbooks](../../models/components/postv1runbooks.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.RunbookEntity](../../models/components/runbookentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listActions - -List all Runbook actions available through your connected integrations - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.runbooks.listActions({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksListActions } from "firehydrant-typescript-sdk/funcs/runbooksListActions.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await runbooksListActions(firehydrantTypescriptSDK, {}); + const res = await runbooksListRunbookActions(firehydrant, {}); if (!res.ok) { throw res.error; @@ -332,31 +91,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listExecutions +## listRunbookExecutions -List all Runbook executions across all Runbooks +List all runbook executions across all runbooks ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.listExecutions({}); + const result = await firehydrant.runbooks.listRunbookExecutions({}); // Handle the result console.log(result); @@ -370,17 +123,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksListExecutions } from "firehydrant-typescript-sdk/funcs/runbooksListExecutions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksListRunbookExecutions } from "firehydrant/funcs/runbooksListRunbookExecutions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksListExecutions(firehydrantTypescriptSDK, {}); + const res = await runbooksListRunbookExecutions(firehydrant, {}); if (!res.ok) { throw res.error; @@ -410,31 +163,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createExecution +## createRunbookExecution Attaches a runbook to an incident and executes it ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.createExecution({ + const result = await firehydrant.runbooks.createRunbookExecution({ executeFor: "", runbookId: "", }); @@ -451,17 +198,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksCreateExecution } from "firehydrant-typescript-sdk/funcs/runbooksCreateExecution.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksCreateRunbookExecution } from "firehydrant/funcs/runbooksCreateRunbookExecution.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksCreateExecution(firehydrantTypescriptSDK, { + const res = await runbooksCreateRunbookExecution(firehydrant, { executeFor: "", runbookId: "", }); @@ -483,7 +230,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1RunbooksExecutions](../../models/components/postv1runbooksexecutions.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateRunbookExecution](../../models/components/createrunbookexecution.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -494,31 +241,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getExecution +## getRunbookExecution Retrieve a runbook execution by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.getExecution({ + const result = await firehydrant.runbooks.getRunbookExecution({ executionId: "", }); @@ -534,17 +275,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksGetExecution } from "firehydrant-typescript-sdk/funcs/runbooksGetExecution.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksGetRunbookExecution } from "firehydrant/funcs/runbooksGetRunbookExecution.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksGetExecution(firehydrantTypescriptSDK, { + const res = await runbooksGetRunbookExecution(firehydrant, { executionId: "", }); @@ -576,40 +317,30 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateExecutionStep +## deleteRunbookExecution -Updates a runbook step execution, especially for changing the state of a step execution. +Terminates a runbook execution, preventing any further steps from being executed ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.updateExecutionStep({ + await firehydrant.runbooks.deleteRunbookExecution({ executionId: "", - stepId: "", - putV1RunbooksExecutionsExecutionIdStepsStepId: { - state: "Colorado", - }, + reason: "", }); - // Handle the result - console.log(result); + } run(); @@ -620,22 +351,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksUpdateExecutionStep } from "firehydrant-typescript-sdk/funcs/runbooksUpdateExecutionStep.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksDeleteRunbookExecution } from "firehydrant/funcs/runbooksDeleteRunbookExecution.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksUpdateExecutionStep(firehydrantTypescriptSDK, { + const res = await runbooksDeleteRunbookExecution(firehydrant, { executionId: "", - stepId: "", - putV1RunbooksExecutionsExecutionIdStepsStepId: { - state: "Colorado", - }, + reason: "", }); if (!res.ok) { @@ -644,8 +372,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -655,44 +382,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRunbookExecutionStepRequest](../../models/operations/updaterunbookexecutionsteprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteRunbookExecutionRequest](../../models/operations/deleterunbookexecutionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.RunbooksExecutionEntity](../../models/components/runbooksexecutionentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getExecutionStepScript +## updateRunbookExecutionStep -Retrieves the bash script from a "script" step. +Updates a runbook step execution, especially for changing the state of a step execution. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.getExecutionStepScript({ + const result = await firehydrant.runbooks.updateRunbookExecutionStep({ executionId: "", stepId: "", + updateRunbookExecutionStep: { + state: "Maine", + }, }); // Handle the result @@ -707,19 +431,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksGetExecutionStepScript } from "firehydrant-typescript-sdk/funcs/runbooksGetExecutionStepScript.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksUpdateRunbookExecutionStep } from "firehydrant/funcs/runbooksUpdateRunbookExecutionStep.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksGetExecutionStepScript(firehydrantTypescriptSDK, { + const res = await runbooksUpdateRunbookExecutionStep(firehydrant, { executionId: "", stepId: "", + updateRunbookExecutionStep: { + state: "Maine", + }, }); if (!res.ok) { @@ -739,7 +466,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRunbookExecutionStepScriptRequest](../../models/operations/getrunbookexecutionstepscriptrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateRunbookExecutionStepRequest](../../models/operations/updaterunbookexecutionsteprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -750,34 +477,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateExecutionStepScriptState +## getRunbookExecutionStepScript -Updates the execution's step. +Retrieves the bash script from a "script" step. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.updateExecutionStepScriptState({ + const result = await firehydrant.runbooks.getRunbookExecutionStepScript({ executionId: "", stepId: "", - state: "West Virginia", }); // Handle the result @@ -792,20 +512,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksUpdateExecutionStepScriptState } from "firehydrant-typescript-sdk/funcs/runbooksUpdateExecutionStepScriptState.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksGetRunbookExecutionStepScript } from "firehydrant/funcs/runbooksGetRunbookExecutionStepScript.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksUpdateExecutionStepScriptState(firehydrantTypescriptSDK, { + const res = await runbooksGetRunbookExecutionStepScript(firehydrant, { executionId: "", stepId: "", - state: "West Virginia", }); if (!res.ok) { @@ -825,7 +544,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRunbookExecutionStepScriptStateRequest](../../models/operations/updaterunbookexecutionstepscriptstaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetRunbookExecutionStepScriptRequest](../../models/operations/getrunbookexecutionstepscriptrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -836,36 +555,28 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateExecutionStepVotes +## updateRunbookExecutionStepScript -Allows for upvoting or downvoting an event +Updates the execution's step. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.updateExecutionStepVotes({ + const result = await firehydrant.runbooks.updateRunbookExecutionStepScript({ executionId: "", stepId: "", - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: { - direction: "up", - }, + state: "Tennessee", }); // Handle the result @@ -880,22 +591,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksUpdateExecutionStepVotes } from "firehydrant-typescript-sdk/funcs/runbooksUpdateExecutionStepVotes.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksUpdateRunbookExecutionStepScript } from "firehydrant/funcs/runbooksUpdateRunbookExecutionStepScript.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksUpdateExecutionStepVotes(firehydrantTypescriptSDK, { + const res = await runbooksUpdateRunbookExecutionStepScript(firehydrant, { executionId: "", stepId: "", - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: { - direction: "up", - }, + state: "Tennessee", }); if (!res.ok) { @@ -915,48 +624,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRunbookExecutionStepVotesRequest](../../models/operations/updaterunbookexecutionstepvotesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateRunbookExecutionStepScriptRequest](../../models/operations/updaterunbookexecutionstepscriptrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** +**Promise\<[components.RunbooksExecutionEntity](../../models/components/runbooksexecutionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getStepVoteStatus +## getRunbookActionFieldOptions -Returns the current vote counts for an object +List select options for a runbook integration action field ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.getStepVoteStatus({ - executionId: "", - stepId: "", + await firehydrant.runbooks.getRunbookActionFieldOptions({ + integrationSlug: "", + actionSlug: "", + field: "", }); - // Handle the result - console.log(result); + } run(); @@ -967,19 +670,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksGetStepVoteStatus } from "firehydrant-typescript-sdk/funcs/runbooksGetStepVoteStatus.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksGetRunbookActionFieldOptions } from "firehydrant/funcs/runbooksGetRunbookActionFieldOptions.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksGetStepVoteStatus(firehydrantTypescriptSDK, { - executionId: "", - stepId: "", + const res = await runbooksGetRunbookActionFieldOptions(firehydrant, { + integrationSlug: "", + actionSlug: "", + field: "", }); if (!res.ok) { @@ -988,8 +692,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -999,47 +702,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRunbookStepVoteStatusRequest](../../models/operations/getrunbookstepvotestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetRunbookActionFieldOptionsRequest](../../models/operations/getrunbookactionfieldoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateExecutionVotes +## listRunbooks -Allows for upvoting or downvoting an event +Lists all available runbooks. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.updateExecutionVotes({ - executionId: "", - patchV1RunbooksExecutionsExecutionIdVotes: { - direction: "down", - }, - }); + const result = await firehydrant.runbooks.listRunbooks({}); // Handle the result console.log(result); @@ -1053,22 +745,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksUpdateExecutionVotes } from "firehydrant-typescript-sdk/funcs/runbooksUpdateExecutionVotes.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksListRunbooks } from "firehydrant/funcs/runbooksListRunbooks.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksUpdateExecutionVotes(firehydrantTypescriptSDK, { - executionId: "", - patchV1RunbooksExecutionsExecutionIdVotes: { - direction: "down", - }, - }); + const res = await runbooksListRunbooks(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1087,43 +774,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRunbookExecutionVotesRequest](../../models/operations/updaterunbookexecutionvotesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListRunbooksRequest](../../models/operations/listrunbooksrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** +**Promise\<[components.RunbookEntity](../../models/components/runbookentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getExecutionVoteStatus +## createRunbook -Returns the current vote counts for an object +Create a new runbook for use with incidents. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.getExecutionVoteStatus({ - executionId: "", + const result = await firehydrant.runbooks.createRunbook({ + name: "", + type: "incident_role", }); // Handle the result @@ -1138,18 +820,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksGetExecutionVoteStatus } from "firehydrant-typescript-sdk/funcs/runbooksGetExecutionVoteStatus.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksCreateRunbook } from "firehydrant/funcs/runbooksCreateRunbook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksGetExecutionVoteStatus(firehydrantTypescriptSDK, { - executionId: "", + const res = await runbooksCreateRunbook(firehydrant, { + name: "", + type: "incident_role", }); if (!res.ok) { @@ -1169,48 +852,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRunbookExecutionVoteStatusRequest](../../models/operations/getrunbookexecutionvotestatusrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateRunbook](../../models/components/createrunbook.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.VotesEntity](../../models/components/votesentity.md)\>** +**Promise\<[components.RunbookEntity](../../models/components/runbookentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listSelectOptions +## getRunbook -List select options for a runbook integration action field +Get a runbook and all its configuration ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.runbooks.listSelectOptions({ - integrationSlug: "", - actionSlug: "", - field: "", + const result = await firehydrant.runbooks.getRunbook({ + runbookId: "", }); - + // Handle the result + console.log(result); } run(); @@ -1221,20 +897,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksListSelectOptions } from "firehydrant-typescript-sdk/funcs/runbooksListSelectOptions.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksGetRunbook } from "firehydrant/funcs/runbooksGetRunbook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksListSelectOptions(firehydrantTypescriptSDK, { - integrationSlug: "", - actionSlug: "", - field: "", + const res = await runbooksGetRunbook(firehydrant, { + runbookId: "", }); if (!res.ok) { @@ -1243,7 +917,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1253,43 +928,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRunbookSelectOptionsRequest](../../models/operations/getrunbookselectoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetRunbookRequest](../../models/operations/getrunbookrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.RunbookEntity](../../models/components/runbookentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## updateRunbook + +Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything +about a runbook, including but not limited to the steps, environments, attachment rules, and severities. -Get a runbook and all its configuration ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.get({ + const result = await firehydrant.runbooks.updateRunbook({ runbookId: "", + updateRunbook: {}, }); // Handle the result @@ -1304,18 +976,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksGet } from "firehydrant-typescript-sdk/funcs/runbooksGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksUpdateRunbook } from "firehydrant/funcs/runbooksUpdateRunbook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksGet(firehydrantTypescriptSDK, { + const res = await runbooksUpdateRunbook(firehydrant, { runbookId: "", + updateRunbook: {}, }); if (!res.ok) { @@ -1335,7 +1008,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetRunbookRequest](../../models/operations/getrunbookrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateRunbookRequest](../../models/operations/updaterunbookrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1346,35 +1019,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## update - -Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything -about a runbook, including but not limited to the steps, environments, attachment rules, and severities. +## deleteRunbook +Delete a runbook and make it unavailable for any future incidents. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.update({ + const result = await firehydrant.runbooks.deleteRunbook({ runbookId: "", - putV1RunbooksRunbookId: {}, }); // Handle the result @@ -1389,19 +1053,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksUpdate } from "firehydrant-typescript-sdk/funcs/runbooksUpdate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksDeleteRunbook } from "firehydrant/funcs/runbooksDeleteRunbook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksUpdate(firehydrantTypescriptSDK, { + const res = await runbooksDeleteRunbook(firehydrant, { runbookId: "", - putV1RunbooksRunbookId: {}, }); if (!res.ok) { @@ -1421,7 +1084,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateRunbookRequest](../../models/operations/updaterunbookrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteRunbookRequest](../../models/operations/deleterunbookrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1432,36 +1095,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## delete +## listRunbookAudits -Delete a runbook and make it unavailable for any future incidents. +Please contact support to enable audit logging for your account. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.runbooks.delete({ - runbookId: "", - }); + await firehydrant.runbooks.listRunbookAudits({}); + - // Handle the result - console.log(result); } run(); @@ -1472,19 +1126,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { runbooksDelete } from "firehydrant-typescript-sdk/funcs/runbooksDelete.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { runbooksListRunbookAudits } from "firehydrant/funcs/runbooksListRunbookAudits.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await runbooksDelete(firehydrantTypescriptSDK, { - runbookId: "", - }); + const res = await runbooksListRunbookAudits(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1492,8 +1144,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1503,23 +1154,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteRunbookRequest](../../models/operations/deleterunbookrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListRunbookAuditsRequest](../../models/operations/listrunbookauditsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.RunbookEntity](../../models/components/runbookentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/scim/README.md b/docs/sdks/scim/README.md index 8c9312bd..44e94a03 100644 --- a/docs/sdks/scim/README.md +++ b/docs/sdks/scim/README.md @@ -3,35 +3,39 @@ ## Overview +Operations related to SCIM + ### Available Operations -* [listGroups](#listgroups) - List teams via SCIM -* [create](#create) - Create a team via SCIM -* [getGroup](#getgroup) - Get a SCIM group -* [updateGroup](#updategroup) - Update a SCIM group -* [deleteGroup](#deletegroup) - Delete a SCIM group -* [listUsers](#listusers) - List users via SCIM -* [createUser](#createuser) - Create a user via SCIM -* [getUser](#getuser) - Get a SCIM user -* [replaceUser](#replaceuser) - Replace a SCIM user -* [deleteUser](#deleteuser) - Delete a SCIM user -* [updateUser](#updateuser) - Update a SCIM user +* [getScimGroup](#getscimgroup) - Get a SCIM group +* [updateScimGroup](#updatescimgroup) - Update a SCIM group and assign members +* [deleteScimGroup](#deletescimgroup) - Delete a SCIM group +* [listScimGroups](#listscimgroups) - List SCIM groups +* [createScimGroup](#createscimgroup) - Create a SCIM group and assign members +* [getScimUser](#getscimuser) - Get a SCIM user +* [updateScimUser](#updatescimuser) - Update a User from SCIM data +* [deleteScimUser](#deletescimuser) - Delete a User matching SCIM data +* [patchScimUser](#patchscimuser) - Update a User from SCIM data +* [listScimUsers](#listscimusers) - List SCIM users +* [createScimUser](#createscimuser) - Create a User from SCIM data -## listGroups +## getScimGroup -SCIM endpoint that lists all Teams (Colloquial for Group in the SCIM protocol) +SCIM endpoint that lists a Team (Colloquial for Group in the SCIM protocol) ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.listGroups({}); + await firehydrant.scim.getScimGroup({ + id: "", + }); } @@ -44,17 +48,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimListGroups } from "firehydrant-typescript-sdk/funcs/scimListGroups.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimGetSCIMGroup } from "firehydrant/funcs/scimGetSCIMGroup.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimListGroups(firehydrantTypescriptSDK, {}); + const res = await scimGetSCIMGroup(firehydrant, { + id: "", + }); if (!res.ok) { throw res.error; @@ -72,7 +78,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetScimGroupsRequest](../../models/operations/getscimgroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetScimGroupRequest](../../models/operations/getscimgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -83,43 +89,34 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## updateScimGroup -SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. +SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.create({ - displayName: "Jed6", - members: [ - { - value: "", - }, - { - value: "", - }, - { - value: "", - }, - ], + await firehydrant.scim.updateScimGroup({ + id: "", + updateScimGroup: { + displayName: "Monte_Schowalter", + members: [ + { + value: "", + }, + ], + }, }); @@ -133,29 +130,26 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimCreate } from "firehydrant-typescript-sdk/funcs/scimCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimUpdateSCIMGroup } from "firehydrant/funcs/scimUpdateSCIMGroup.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimCreate(firehydrantTypescriptSDK, { - displayName: "Jed6", - members: [ - { - value: "", - }, - { - value: "", - }, - { - value: "", - }, - ], + const res = await scimUpdateSCIMGroup(firehydrant, { + id: "", + updateScimGroup: { + displayName: "Monte_Schowalter", + members: [ + { + value: "", + }, + ], + }, }); if (!res.ok) { @@ -174,7 +168,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1ScimV2Groups](../../models/components/postv1scimv2groups.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateScimGroupRequest](../../models/operations/updatescimgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -185,31 +179,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getGroup +## deleteScimGroup -SCIM endpoint that lists a Team (Colloquial for Group in the SCIM protocol) +SCIM endpoint to delete a Team (Colloquial for Group in the SCIM protocol). ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.getGroup({ + await firehydrant.scim.deleteScimGroup({ id: "", }); @@ -224,17 +212,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimGetGroup } from "firehydrant-typescript-sdk/funcs/scimGetGroup.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimDeleteSCIMGroup } from "firehydrant/funcs/scimDeleteSCIMGroup.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimGetGroup(firehydrantTypescriptSDK, { + const res = await scimDeleteSCIMGroup(firehydrant, { id: "", }); @@ -254,7 +242,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetScimGroupRequest](../../models/operations/getscimgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteScimGroupRequest](../../models/operations/deletescimgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -265,47 +253,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateGroup +## listScimGroups -SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. +SCIM endpoint that lists all Teams (Colloquial for Group in the SCIM protocol) ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.updateGroup({ - id: "", - putV1ScimV2GroupsId: { - displayName: "Ibrahim.Kuhic40", - members: [ - { - value: "", - }, - { - value: "", - }, - { - value: "", - }, - ], - }, - }); + await firehydrant.scim.listScimGroups({}); } @@ -318,33 +284,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimUpdateGroup } from "firehydrant-typescript-sdk/funcs/scimUpdateGroup.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimListSCIMGroups } from "firehydrant/funcs/scimListSCIMGroups.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimUpdateGroup(firehydrantTypescriptSDK, { - id: "", - putV1ScimV2GroupsId: { - displayName: "Ibrahim.Kuhic40", - members: [ - { - value: "", - }, - { - value: "", - }, - { - value: "", - }, - ], - }, - }); + const res = await scimListSCIMGroups(firehydrant, {}); if (!res.ok) { throw res.error; @@ -362,7 +312,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateScimGroupRequest](../../models/operations/updatescimgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListScimGroupsRequest](../../models/operations/listscimgroupsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -373,32 +323,37 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteGroup +## createScimGroup -SCIM endpoint to delete a Team (Colloquial for Group in the SCIM protocol). +SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.deleteGroup({ - id: "", + await firehydrant.scim.createScimGroup({ + displayName: "Allie.Schowalter", + members: [ + { + value: "", + }, + { + value: "", + }, + { + value: "", + }, + ], }); @@ -412,18 +367,29 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimDeleteGroup } from "firehydrant-typescript-sdk/funcs/scimDeleteGroup.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimCreateSCIMGroup } from "firehydrant/funcs/scimCreateSCIMGroup.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimDeleteGroup(firehydrantTypescriptSDK, { - id: "", + const res = await scimCreateSCIMGroup(firehydrant, { + displayName: "Allie.Schowalter", + members: [ + { + value: "", + }, + { + value: "", + }, + { + value: "", + }, + ], }); if (!res.ok) { @@ -442,7 +408,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteScimGroupRequest](../../models/operations/deletescimgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateScimGroup](../../models/components/createscimgroup.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -453,31 +419,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listUsers +## getScimUser -SCIM endpoint that lists users. This endpoint will display a list of Users currently in the system. +SCIM endpoint that lists a User ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.listUsers({}); + await firehydrant.scim.getScimUser({ + id: "", + }); } @@ -490,17 +452,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimListUsers } from "firehydrant-typescript-sdk/funcs/scimListUsers.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimGetSCIMUser } from "firehydrant/funcs/scimGetSCIMUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimListUsers(firehydrantTypescriptSDK, {}); + const res = await scimGetSCIMUser(firehydrant, { + id: "", + }); if (!res.ok) { throw res.error; @@ -518,7 +482,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetScimUsersRequest](../../models/operations/getscimusersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetScimUserRequest](../../models/operations/getscimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -529,42 +493,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createUser +## updateScimUser -SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. +PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.createUser({ - userName: "Jimmy12", - name: { - familyName: "", - givenName: "", - }, - emails: [ - { - value: "", - primary: false, - }, - ], + await firehydrant.scim.updateScimUser({ + id: "", + updateScimUser: {}, }); @@ -578,28 +527,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimCreateUser } from "firehydrant-typescript-sdk/funcs/scimCreateUser.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimUpdateSCIMUser } from "firehydrant/funcs/scimUpdateSCIMUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimCreateUser(firehydrantTypescriptSDK, { - userName: "Jimmy12", - name: { - familyName: "", - givenName: "", - }, - emails: [ - { - value: "", - primary: false, - }, - ], + const res = await scimUpdateSCIMUser(firehydrant, { + id: "", + updateScimUser: {}, }); if (!res.ok) { @@ -618,7 +558,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1ScimV2Users](../../models/components/postv1scimv2users.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateScimUserRequest](../../models/operations/updatescimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -629,31 +569,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getUser +## deleteScimUser -SCIM endpoint that lists a User +SCIM endpoint to delete a User. This endpoint will deactivate a confirmed User record in our system. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.getUser({ + await firehydrant.scim.deleteScimUser({ id: "", }); @@ -668,17 +602,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimGetUser } from "firehydrant-typescript-sdk/funcs/scimGetUser.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimDeleteSCIMUser } from "firehydrant/funcs/scimDeleteSCIMUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimGetUser(firehydrantTypescriptSDK, { + const res = await scimDeleteSCIMUser(firehydrant, { id: "", }); @@ -698,7 +632,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetScimUserRequest](../../models/operations/getscimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteScimUserRequest](../../models/operations/deletescimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -709,33 +643,42 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## replaceUser +## patchScimUser -PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. +PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.replaceUser({ + await firehydrant.scim.patchScimUser({ id: "", - putV1ScimV2UsersId: {}, + patchScimUser: { + operations: [ + { + op: "", + path: "/System", + }, + { + op: "", + path: "/lib", + }, + { + op: "", + path: "/etc/namedb", + }, + ], + }, }); @@ -749,19 +692,34 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimReplaceUser } from "firehydrant-typescript-sdk/funcs/scimReplaceUser.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimPatchSCIMUser } from "firehydrant/funcs/scimPatchSCIMUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimReplaceUser(firehydrantTypescriptSDK, { + const res = await scimPatchSCIMUser(firehydrant, { id: "", - putV1ScimV2UsersId: {}, + patchScimUser: { + operations: [ + { + op: "", + path: "/System", + }, + { + op: "", + path: "/lib", + }, + { + op: "", + path: "/etc/namedb", + }, + ], + }, }); if (!res.ok) { @@ -780,7 +738,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ReplaceScimUserRequest](../../models/operations/replacescimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.PatchScimUserRequest](../../models/operations/patchscimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -791,33 +749,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteUser +## listScimUsers -SCIM endpoint to delete a User. This endpoint will deactivate a confirmed User record in our system. +SCIM endpoint that lists users. This endpoint will display a list of Users currently in the system. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.deleteUser({ - id: "", - }); + await firehydrant.scim.listScimUsers({}); } @@ -830,19 +780,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimDeleteUser } from "firehydrant-typescript-sdk/funcs/scimDeleteUser.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimListSCIMUsers } from "firehydrant/funcs/scimListSCIMUsers.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimDeleteUser(firehydrantTypescriptSDK, { - id: "", - }); + const res = await scimListSCIMUsers(firehydrant, {}); if (!res.ok) { throw res.error; @@ -860,7 +808,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteScimUserRequest](../../models/operations/deletescimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListScimUsersRequest](../../models/operations/listscimusersrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -871,40 +819,44 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateUser +## createScimUser -PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. +SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.scim.updateUser({ - id: "", - patchV1ScimV2UsersId: { - operations: [ - { - op: "", - path: "/home/user/dir", - }, - ], + await firehydrant.scim.createScimUser({ + userName: "Angeline72", + name: { + familyName: "", + givenName: "", }, + emails: [ + { + value: "", + primary: false, + }, + { + value: "", + primary: false, + }, + { + value: "", + primary: true, + }, + ], }); @@ -918,26 +870,36 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { scimUpdateUser } from "firehydrant-typescript-sdk/funcs/scimUpdateUser.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { scimCreateSCIMUser } from "firehydrant/funcs/scimCreateSCIMUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await scimUpdateUser(firehydrantTypescriptSDK, { - id: "", - patchV1ScimV2UsersId: { - operations: [ - { - op: "", - path: "/net", - }, - ], + const res = await scimCreateSCIMUser(firehydrant, { + userName: "Angeline72", + name: { + familyName: "", + givenName: "", }, + emails: [ + { + value: "", + primary: false, + }, + { + value: "", + primary: false, + }, + { + value: "", + primary: true, + }, + ], }); if (!res.ok) { @@ -956,7 +918,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateScimUserRequest](../../models/operations/updatescimuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateScimUser](../../models/components/createscimuser.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -967,12 +929,6 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/services/README.md b/docs/sdks/services/README.md deleted file mode 100644 index 07db3722..00000000 --- a/docs/sdks/services/README.md +++ /dev/null @@ -1,1354 +0,0 @@ -# Services -(*services*) - -## Overview - -Operations related to Services - -### Available Operations - -* [createDependency](#createdependency) - Create a dependency relationship between services -* [getDependency](#getdependency) - Get a service dependency -* [deleteDependency](#deletedependency) - Delete a service dependency -* [update](#update) - Update a service dependency -* [list](#list) - List services -* [create](#create) - Create a service -* [createLinks](#createlinks) - Create multiple services and link them to external services -* [get](#get) - Get a service -* [delete](#delete) - Delete a service -* [patch](#patch) - Update a service -* [getAvailableDownstreamDependencies](#getavailabledownstreamdependencies) - List available downstream service dependencies -* [listAvailableUpstreamDependencies](#listavailableupstreamdependencies) - List available upstream service dependencies -* [createChecklistResponse](#createchecklistresponse) - Create a checklist response for a service -* [listDependencies](#listdependencies) - List dependencies for a service -* [deleteLink](#deletelink) - Delete a service link -* [listForUser](#listforuser) - List services for a user's teams - -## createDependency - -Creates a service dependency relationship between two services - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.createDependency({ - serviceId: "", - connectedServiceId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesCreateDependency } from "firehydrant-typescript-sdk/funcs/servicesCreateDependency.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesCreateDependency(firehydrantTypescriptSDK, { - serviceId: "", - connectedServiceId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1ServiceDependencies](../../models/components/postv1servicedependencies.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## getDependency - -Retrieves a single service dependency by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.getDependency({ - serviceDependencyId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesGetDependency } from "firehydrant-typescript-sdk/funcs/servicesGetDependency.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesGetDependency(firehydrantTypescriptSDK, { - serviceDependencyId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetServiceDependencyRequest](../../models/operations/getservicedependencyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## deleteDependency - -Deletes a single service dependency - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.deleteDependency({ - serviceDependencyId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesDeleteDependency } from "firehydrant-typescript-sdk/funcs/servicesDeleteDependency.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesDeleteDependency(firehydrantTypescriptSDK, { - serviceDependencyId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteServiceDependencyRequest](../../models/operations/deleteservicedependencyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## update - -Update the notes of the service dependency - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.update({ - serviceDependencyId: "", - patchV1ServiceDependenciesServiceDependencyId: {}, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesUpdate } from "firehydrant-typescript-sdk/funcs/servicesUpdate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesUpdate(firehydrantTypescriptSDK, { - serviceDependencyId: "", - patchV1ServiceDependenciesServiceDependencyId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateServiceDependencyRequest](../../models/operations/updateservicedependencyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceDependencyEntity](../../models/components/servicedependencyentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## list - -List all of the services that have been added to the organization. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesList } from "firehydrant-typescript-sdk/funcs/servicesList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListServicesRequest](../../models/operations/listservicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceEntityPaginated](../../models/components/serviceentitypaginated.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## create - -Creates a service for the organization, you may also create or attach functionalities to the service on create. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.create({ - name: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesCreate } from "firehydrant-typescript-sdk/funcs/servicesCreate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesCreate(firehydrantTypescriptSDK, { - name: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Services](../../models/components/postv1services.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## createLinks - -Creates a service with the appropriate integration for each external service ID passed - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.createLinks({ - externalServiceIds: "", - connectionId: "", - integration: "victorops", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesCreateLinks } from "firehydrant-typescript-sdk/funcs/servicesCreateLinks.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesCreateLinks(firehydrantTypescriptSDK, { - externalServiceIds: "", - connectionId: "", - integration: "victorops", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1ServicesServiceLinks](../../models/components/postv1servicesservicelinks.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceLinkEntity[]](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## get - -Retrieves a single service by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.get({ - serviceId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesGet } from "firehydrant-typescript-sdk/funcs/servicesGet.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesGet(firehydrantTypescriptSDK, { - serviceId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetServiceRequest](../../models/operations/getservicerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## delete - -Deletes the service from FireHydrant. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.delete({ - serviceId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesDelete } from "firehydrant-typescript-sdk/funcs/servicesDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesDelete(firehydrantTypescriptSDK, { - serviceId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteServiceRequest](../../models/operations/deleteservicerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## patch - -Update a services attributes, you may also add or remove functionalities from the service as well. -Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. - - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.patch({ - serviceId: "", - patchV1ServicesServiceId: {}, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesPatch } from "firehydrant-typescript-sdk/funcs/servicesPatch.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesPatch(firehydrantTypescriptSDK, { - serviceId: "", - patchV1ServicesServiceId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateServiceRequest](../../models/operations/updateservicerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceEntity](../../models/components/serviceentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## getAvailableDownstreamDependencies - -Retrieves all services that are available to be downstream dependencies - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.getAvailableDownstreamDependencies({ - serviceId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesGetAvailableDownstreamDependencies } from "firehydrant-typescript-sdk/funcs/servicesGetAvailableDownstreamDependencies.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesGetAvailableDownstreamDependencies(firehydrantTypescriptSDK, { - serviceId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListServiceAvailableDownstreamDependenciesRequest](../../models/operations/listserviceavailabledownstreamdependenciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceEntityLite](../../models/components/serviceentitylite.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listAvailableUpstreamDependencies - -Retrieves all services that are available to be upstream dependencies - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.listAvailableUpstreamDependencies({ - serviceId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesListAvailableUpstreamDependencies } from "firehydrant-typescript-sdk/funcs/servicesListAvailableUpstreamDependencies.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesListAvailableUpstreamDependencies(firehydrantTypescriptSDK, { - serviceId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListServiceAvailableUpstreamDependenciesRequest](../../models/operations/listserviceavailableupstreamdependenciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceEntityLite](../../models/components/serviceentitylite.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## createChecklistResponse - -Creates a response for a checklist item - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.services.createChecklistResponse({ - serviceId: "", - checklistId: "", - postV1ServicesServiceIdChecklistResponseChecklistId: { - checkId: "", - status: false, - }, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesCreateChecklistResponse } from "firehydrant-typescript-sdk/funcs/servicesCreateChecklistResponse.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesCreateChecklistResponse(firehydrantTypescriptSDK, { - serviceId: "", - checklistId: "", - postV1ServicesServiceIdChecklistResponseChecklistId: { - checkId: "", - status: false, - }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateServiceChecklistResponseRequest](../../models/operations/createservicechecklistresponserequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listDependencies - -Retrieves a service's dependencies - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.listDependencies({ - serviceId: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesListDependencies } from "firehydrant-typescript-sdk/funcs/servicesListDependencies.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesListDependencies(firehydrantTypescriptSDK, { - serviceId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetServiceDependenciesRequest](../../models/operations/getservicedependenciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ServiceWithAllDependenciesEntity](../../models/components/servicewithalldependenciesentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## deleteLink - -Deletes a service link from FireHydrant. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.services.deleteLink({ - serviceId: "", - remoteId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesDeleteLink } from "firehydrant-typescript-sdk/funcs/servicesDeleteLink.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesDeleteLink(firehydrantTypescriptSDK, { - serviceId: "", - remoteId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteServiceLinkRequest](../../models/operations/deleteservicelinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listForUser - -Retrieves a list of services owned by the teams a user is on - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.services.listForUser({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { servicesListForUser } from "firehydrant-typescript-sdk/funcs/servicesListForUser.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await servicesListForUser(firehydrantTypescriptSDK, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListUserServicesRequest](../../models/operations/listuserservicesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TeamEntityPaginated[]](../../models/.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/signals/README.md b/docs/sdks/signals/README.md index d85214d2..7ec1e7c5 100644 --- a/docs/sdks/signals/README.md +++ b/docs/sdks/signals/README.md @@ -7,49 +7,58 @@ Operations related to Signals ### Available Operations -* [listGroupedMetrics](#listgroupedmetrics) - List grouped signal alert metrics -* [getMttxAnalytics](#getmttxanalytics) - Get MTTX analytics for signals -* [getAnalyticsTimeseries](#getanalyticstimeseries) - List timeseries metrics for signal alerts -* [debug](#debug) - Debug a signal -* [listEmailTargets](#listemailtargets) - List email targets for signals -* [createEmailTarget](#createemailtarget) - Create an email target for signals -* [getEmailTarget](#getemailtarget) - Get a signal email target -* [deleteEmailTarget](#deleteemailtarget) - Delete a signal email target -* [updateEmailTarget](#updateemailtarget) - Update a signal email target -* [listEventSources](#listeventsources) - List event sources for signals -* [getIngestUrl](#getingesturl) - Get signal ingestion URL -* [listTransposers](#listtransposers) - List signal transposers -* [listWebhookTargets](#listwebhooktargets) - List webhook targets for signals -* [createWebhookTarget](#createwebhooktarget) - Create a webhook target for signals -* [getWebhookTarget](#getwebhooktarget) - Get a webhook target -* [deleteWebhookTarget](#deletewebhooktarget) - Delete a webhook target -* [updateWebhookTarget](#updatewebhooktarget) - Update a webhook target -* [listOnCall](#listoncall) - List on-call schedules -* [listEscalationPolicies](#listescalationpolicies) - List escalation policies for a team -* [deleteEscalationPolicy](#deleteescalationpolicy) - Delete an escalation policy for a team -* [getOnCallSchedule](#getoncallschedule) - Get an on-call schedule for a team -* [updateOnCallSchedule](#updateoncallschedule) - Update an on-call schedule for a team -* [listRules](#listrules) - List signal rules for a team -* [createRule](#createrule) - Create a signal rule for a team -* [getRule](#getrule) - Get a signal rule -* [deleteRule](#deleterule) - Delete a signal rule -* [updateRule](#updaterule) - Update a signal rule - -## listGroupedMetrics - -Generate a report of grouped metrics for Signals alerts +* [listTeamEscalationPolicies](#listteamescalationpolicies) - List escalation policies for a team +* [createTeamEscalationPolicy](#createteamescalationpolicy) - Create an escalation policy for a team +* [getTeamEscalationPolicy](#getteamescalationpolicy) - Get an escalation policy for a team +* [deleteTeamEscalationPolicy](#deleteteamescalationpolicy) - Delete an escalation policy for a team +* [updateTeamEscalationPolicy](#updateteamescalationpolicy) - Update an escalation policy for a team +* [listTeamOnCallSchedules](#listteamoncallschedules) - List on-call schedules for a team +* [createTeamOnCallSchedule](#createteamoncallschedule) - Create an on-call schedule for a team +* [getTeamOnCallSchedule](#getteamoncallschedule) - Get an on-call schedule for a team +* [deleteTeamOnCallSchedule](#deleteteamoncallschedule) - Delete an on-call schedule for a team +* [updateTeamOnCallSchedule](#updateteamoncallschedule) - Update an on-call schedule for a team +* [createOnCallShift](#createoncallshift) - Create a shift for an on-call schedule +* [getOnCallShift](#getoncallshift) - Get an on-call shift for a team schedule +* [deleteOnCallShift](#deleteoncallshift) - Delete an on-call shift from a team schedule +* [updateOnCallShift](#updateoncallshift) - Update an on-call shift for a team schedule +* [listTeamSignalRules](#listteamsignalrules) - List Signals rules +* [createTeamSignalRule](#createteamsignalrule) - Create a Signals rule +* [getTeamSignalRule](#getteamsignalrule) - Get a Signals rule +* [deleteTeamSignalRule](#deleteteamsignalrule) - Delete a Signals rule +* [updateTeamSignalRule](#updateteamsignalrule) - Update a Signals rule +* [listSignalsEventSources](#listsignalseventsources) - List event sources for Signals +* [listSignalsEmailTargets](#listsignalsemailtargets) - List email targets for signals +* [createSignalsEmailTarget](#createsignalsemailtarget) - Create an email target for signals +* [getSignalsEmailTarget](#getsignalsemailtarget) - Get a signal email target +* [deleteSignalsEmailTarget](#deletesignalsemailtarget) - Delete a signal email target +* [updateSignalsEmailTarget](#updatesignalsemailtarget) - Update an email target +* [listSignalsWebhookTargets](#listsignalswebhooktargets) - List webhook targets +* [createSignalsWebhookTarget](#createsignalswebhooktarget) - Create a webhook target +* [getSignalsWebhookTarget](#getsignalswebhooktarget) - Get a webhook target +* [deleteSignalsWebhookTarget](#deletesignalswebhooktarget) - Delete a webhook target +* [updateSignalsWebhookTarget](#updatesignalswebhooktarget) - Update a webhook target +* [listSignalsTransposers](#listsignalstransposers) - List signal transposers +* [getSignalsIngestUrl](#getsignalsingesturl) - Get the signals ingestion URL +* [debugSignalsExpression](#debugsignalsexpression) - Debug Signals expressions +* [listOrganizationOnCallSchedules](#listorganizationoncallschedules) - List on-call schedules + +## listTeamEscalationPolicies + +List all Signals escalation policies for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listGroupedMetrics({}); + await firehydrant.signals.listTeamEscalationPolicies({ + teamId: "", + }); } @@ -62,17 +71,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListGroupedMetrics } from "firehydrant-typescript-sdk/funcs/signalsListGroupedMetrics.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListTeamEscalationPolicies } from "firehydrant/funcs/signalsListTeamEscalationPolicies.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListGroupedMetrics(firehydrantTypescriptSDK, {}); + const res = await signalsListTeamEscalationPolicies(firehydrant, { + teamId: "", + }); if (!res.ok) { throw res.error; @@ -90,7 +101,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSignalGroupedMetricsRequest](../../models/operations/getsignalgroupedmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListTeamEscalationPoliciesRequest](../../models/operations/listteamescalationpoliciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -101,31 +112,62 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getMttxAnalytics +## createTeamEscalationPolicy -Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts +Create a Signals escalation policy for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.getMttxAnalytics({}); + await firehydrant.signals.createTeamEscalationPolicy({ + teamId: "", + createTeamEscalationPolicy: { + name: "", + steps: [ + { + targets: [], + timeout: "", + }, + { + targets: [ + { + type: "Webhook", + id: "", + }, + { + type: "OnCallSchedule", + id: "", + }, + ], + timeout: "", + }, + { + targets: [ + { + type: "SlackChannel", + id: "", + }, + { + type: "EntireTeam", + id: "", + }, + ], + timeout: "", + }, + ], + }, + }); } @@ -138,17 +180,54 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsGetMttxAnalytics } from "firehydrant-typescript-sdk/funcs/signalsGetMttxAnalytics.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsCreateTeamEscalationPolicy } from "firehydrant/funcs/signalsCreateTeamEscalationPolicy.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsGetMttxAnalytics(firehydrantTypescriptSDK, {}); + const res = await signalsCreateTeamEscalationPolicy(firehydrant, { + teamId: "", + createTeamEscalationPolicy: { + name: "", + steps: [ + { + targets: [], + timeout: "", + }, + { + targets: [ + { + type: "Webhook", + id: "", + }, + { + type: "OnCallSchedule", + id: "", + }, + ], + timeout: "", + }, + { + targets: [ + { + type: "SlackChannel", + id: "", + }, + { + type: "EntireTeam", + id: "", + }, + ], + timeout: "", + }, + ], + }, + }); if (!res.ok) { throw res.error; @@ -166,7 +245,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSignalsMttxAnalyticsRequest](../../models/operations/getsignalsmttxanalyticsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateTeamEscalationPolicyRequest](../../models/operations/createteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -177,31 +256,28 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getAnalyticsTimeseries +## getTeamEscalationPolicy -Generate a timeseries-based report of metrics for Signals alerts +Get a Signals escalation policy by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.getAnalyticsTimeseries({}); + await firehydrant.signals.getTeamEscalationPolicy({ + teamId: "", + id: "", + }); } @@ -214,17 +290,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsGetAnalyticsTimeseries } from "firehydrant-typescript-sdk/funcs/signalsGetAnalyticsTimeseries.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsGetTeamEscalationPolicy } from "firehydrant/funcs/signalsGetTeamEscalationPolicy.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsGetAnalyticsTimeseries(firehydrantTypescriptSDK, {}); + const res = await signalsGetTeamEscalationPolicy(firehydrant, { + teamId: "", + id: "", + }); if (!res.ok) { throw res.error; @@ -242,7 +321,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSignalsAnalyticsTimeseriesRequest](../../models/operations/getsignalsanalyticstimeseriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetTeamEscalationPolicyRequest](../../models/operations/getteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -253,35 +332,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## debug +## deleteTeamEscalationPolicy -Debug a signal +Delete a Signals escalation policy by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.debug({ - expression: "", - signals: [ - {}, - ], + await firehydrant.signals.deleteTeamEscalationPolicy({ + teamId: "", + id: "", }); @@ -295,21 +366,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsDebug } from "firehydrant-typescript-sdk/funcs/signalsDebug.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsDeleteTeamEscalationPolicy } from "firehydrant/funcs/signalsDeleteTeamEscalationPolicy.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsDebug(firehydrantTypescriptSDK, { - expression: "", - signals: [ - {}, - ], + const res = await signalsDeleteTeamEscalationPolicy(firehydrant, { + teamId: "", + id: "", }); if (!res.ok) { @@ -328,7 +397,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1SignalsDebugger](../../models/components/postv1signalsdebugger.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteTeamEscalationPolicyRequest](../../models/operations/deleteteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -339,31 +408,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listEmailTargets +## updateTeamEscalationPolicy -List all Signals email targets for a team. +Update a Signals escalation policy by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listEmailTargets({}); + await firehydrant.signals.updateTeamEscalationPolicy({ + teamId: "", + id: "", + updateTeamEscalationPolicy: {}, + }); } @@ -376,17 +443,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListEmailTargets } from "firehydrant-typescript-sdk/funcs/signalsListEmailTargets.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsUpdateTeamEscalationPolicy } from "firehydrant/funcs/signalsUpdateTeamEscalationPolicy.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListEmailTargets(firehydrantTypescriptSDK, {}); + const res = await signalsUpdateTeamEscalationPolicy(firehydrant, { + teamId: "", + id: "", + updateTeamEscalationPolicy: {}, + }); if (!res.ok) { throw res.error; @@ -404,7 +475,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSignalEmailTargetsRequest](../../models/operations/listsignalemailtargetsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateTeamEscalationPolicyRequest](../../models/operations/updateteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -415,32 +486,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createEmailTarget +## listTeamOnCallSchedules -Create a Signals email target for a team. +List all Signals on-call schedules for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.createEmailTarget({ - name: "", + await firehydrant.signals.listTeamOnCallSchedules({ + teamId: "", }); @@ -454,18 +519,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsCreateEmailTarget } from "firehydrant-typescript-sdk/funcs/signalsCreateEmailTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListTeamOnCallSchedules } from "firehydrant/funcs/signalsListTeamOnCallSchedules.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsCreateEmailTarget(firehydrantTypescriptSDK, { - name: "", + const res = await signalsListTeamOnCallSchedules(firehydrant, { + teamId: "", }); if (!res.ok) { @@ -484,7 +549,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1SignalsEmailTargets](../../models/components/postv1signalsemailtargets.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListTeamOnCallSchedulesRequest](../../models/operations/listteamoncallschedulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -495,32 +560,33 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getEmailTarget +## createTeamOnCallSchedule -Get a Signals email target by ID +Create a Signals on-call schedule for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.getEmailTarget({ - id: "", + await firehydrant.signals.createTeamOnCallSchedule({ + teamId: "", + createTeamOnCallSchedule: { + name: "", + timeZone: "Antarctica/DumontDUrville", + strategy: { + type: "custom", + }, + }, }); @@ -534,18 +600,25 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsGetEmailTarget } from "firehydrant-typescript-sdk/funcs/signalsGetEmailTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsCreateTeamOnCallSchedule } from "firehydrant/funcs/signalsCreateTeamOnCallSchedule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsGetEmailTarget(firehydrantTypescriptSDK, { - id: "", + const res = await signalsCreateTeamOnCallSchedule(firehydrant, { + teamId: "", + createTeamOnCallSchedule: { + name: "", + timeZone: "Antarctica/DumontDUrville", + strategy: { + type: "custom", + }, + }, }); if (!res.ok) { @@ -564,7 +637,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSignalEmailTargetRequest](../../models/operations/getsignalemailtargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateTeamOnCallScheduleRequest](../../models/operations/createteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -575,32 +648,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteEmailTarget +## getTeamOnCallSchedule -Delete a Signals email target by ID +Get a Signals on-call schedule by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.deleteEmailTarget({ - id: "", + await firehydrant.signals.getTeamOnCallSchedule({ + teamId: "", + scheduleId: "", }); @@ -614,18 +682,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsDeleteEmailTarget } from "firehydrant-typescript-sdk/funcs/signalsDeleteEmailTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsGetTeamOnCallSchedule } from "firehydrant/funcs/signalsGetTeamOnCallSchedule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsDeleteEmailTarget(firehydrantTypescriptSDK, { - id: "", + const res = await signalsGetTeamOnCallSchedule(firehydrant, { + teamId: "", + scheduleId: "", }); if (!res.ok) { @@ -644,7 +713,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteSignalEmailTargetRequest](../../models/operations/deletesignalemailtargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetTeamOnCallScheduleRequest](../../models/operations/getteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -655,33 +724,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateEmailTarget +## deleteTeamOnCallSchedule -Update a Signals email target by ID +Delete a Signals on-call schedule by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.updateEmailTarget({ - id: "", - patchV1SignalsEmailTargetsId: {}, + await firehydrant.signals.deleteTeamOnCallSchedule({ + teamId: "", + scheduleId: "", }); @@ -695,19 +758,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsUpdateEmailTarget } from "firehydrant-typescript-sdk/funcs/signalsUpdateEmailTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsDeleteTeamOnCallSchedule } from "firehydrant/funcs/signalsDeleteTeamOnCallSchedule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsUpdateEmailTarget(firehydrantTypescriptSDK, { - id: "", - patchV1SignalsEmailTargetsId: {}, + const res = await signalsDeleteTeamOnCallSchedule(firehydrant, { + teamId: "", + scheduleId: "", }); if (!res.ok) { @@ -726,7 +789,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateSignalEmailTargetRequest](../../models/operations/updatesignalemailtargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteTeamOnCallScheduleRequest](../../models/operations/deleteteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -737,31 +800,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listEventSources +## updateTeamOnCallSchedule -List event sources for signals +Update a Signals on-call schedule by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listEventSources({}); + await firehydrant.signals.updateTeamOnCallSchedule({ + teamId: "", + scheduleId: "", + updateTeamOnCallSchedule: {}, + }); } @@ -774,17 +835,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListEventSources } from "firehydrant-typescript-sdk/funcs/signalsListEventSources.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsUpdateTeamOnCallSchedule } from "firehydrant/funcs/signalsUpdateTeamOnCallSchedule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListEventSources(firehydrantTypescriptSDK, {}); + const res = await signalsUpdateTeamOnCallSchedule(firehydrant, { + teamId: "", + scheduleId: "", + updateTeamOnCallSchedule: {}, + }); if (!res.ok) { throw res.error; @@ -802,7 +867,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSignalEventSourcesRequest](../../models/operations/listsignaleventsourcesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateTeamOnCallScheduleRequest](../../models/operations/updateteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -813,34 +878,34 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getIngestUrl +## createOnCallShift -Retrieve the url for ingesting signals for your organization +Create a Signals on-call shift in a schedule. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.signals.getIngestUrl({}); + await firehydrant.signals.createOnCallShift({ + teamId: "", + scheduleId: "", + createOnCallShift: { + startTime: "", + endTime: "", + }, + }); + - // Handle the result - console.log(result); } run(); @@ -851,17 +916,24 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsGetIngestUrl } from "firehydrant-typescript-sdk/funcs/signalsGetIngestUrl.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsCreateOnCallShift } from "firehydrant/funcs/signalsCreateOnCallShift.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsGetIngestUrl(firehydrantTypescriptSDK, {}); + const res = await signalsCreateOnCallShift(firehydrant, { + teamId: "", + scheduleId: "", + createOnCallShift: { + startTime: "", + endTime: "", + }, + }); if (!res.ok) { throw res.error; @@ -869,8 +941,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -880,42 +951,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSignalIngestUrlRequest](../../models/operations/getsignalingesturlrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateOnCallShiftRequest](../../models/operations/createoncallshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.SignalsAPIIngestKeyEntity](../../models/components/signalsapiingestkeyentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listTransposers +## getOnCallShift -List signal transposers +Get a Signals on-call shift by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listTransposers(); + await firehydrant.signals.getOnCallShift({ + id: "", + teamId: "", + scheduleId: "", + }); } @@ -928,17 +997,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListTransposers } from "firehydrant-typescript-sdk/funcs/signalsListTransposers.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsGetOnCallShift } from "firehydrant/funcs/signalsGetOnCallShift.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListTransposers(firehydrantTypescriptSDK); + const res = await signalsGetOnCallShift(firehydrant, { + id: "", + teamId: "", + scheduleId: "", + }); if (!res.ok) { throw res.error; @@ -956,6 +1029,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetOnCallShiftRequest](../../models/operations/getoncallshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -966,31 +1040,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listWebhookTargets +## deleteOnCallShift -List all Signals webhook targets. +Delete a Signals on-call shift by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listWebhookTargets({}); + await firehydrant.signals.deleteOnCallShift({ + id: "", + teamId: "", + scheduleId: "", + }); } @@ -1003,17 +1075,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListWebhookTargets } from "firehydrant-typescript-sdk/funcs/signalsListWebhookTargets.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsDeleteOnCallShift } from "firehydrant/funcs/signalsDeleteOnCallShift.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListWebhookTargets(firehydrantTypescriptSDK, {}); + const res = await signalsDeleteOnCallShift(firehydrant, { + id: "", + teamId: "", + scheduleId: "", + }); if (!res.ok) { throw res.error; @@ -1031,7 +1107,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSignalWebhookTargetsRequest](../../models/operations/listsignalwebhooktargetsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteOnCallShiftRequest](../../models/operations/deleteoncallshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1042,33 +1118,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createWebhookTarget +## updateOnCallShift -Create a Signals webhook target. +Update a Signals on-call shift by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.createWebhookTarget({ - name: "", - url: "https://critical-prohibition.biz", + await firehydrant.signals.updateOnCallShift({ + id: "", + teamId: "", + scheduleId: "", + updateOnCallShift: {}, }); @@ -1082,19 +1154,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsCreateWebhookTarget } from "firehydrant-typescript-sdk/funcs/signalsCreateWebhookTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsUpdateOnCallShift } from "firehydrant/funcs/signalsUpdateOnCallShift.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsCreateWebhookTarget(firehydrantTypescriptSDK, { - name: "", - url: "https://critical-prohibition.biz", + const res = await signalsUpdateOnCallShift(firehydrant, { + id: "", + teamId: "", + scheduleId: "", + updateOnCallShift: {}, }); if (!res.ok) { @@ -1113,7 +1187,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1SignalsWebhookTargets](../../models/components/postv1signalswebhooktargets.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateOnCallShiftRequest](../../models/operations/updateoncallshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1124,32 +1198,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getWebhookTarget +## listTeamSignalRules -Get a Signals webhook target by ID +List all Signals rules for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.getWebhookTarget({ - id: "", + await firehydrant.signals.listTeamSignalRules({ + teamId: "", }); @@ -1163,18 +1231,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsGetWebhookTarget } from "firehydrant-typescript-sdk/funcs/signalsGetWebhookTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListTeamSignalRules } from "firehydrant/funcs/signalsListTeamSignalRules.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsGetWebhookTarget(firehydrantTypescriptSDK, { - id: "", + const res = await signalsListTeamSignalRules(firehydrant, { + teamId: "", }); if (!res.ok) { @@ -1193,7 +1261,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetSignalsWebhookTargetRequest](../../models/operations/getsignalswebhooktargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListTeamSignalRulesRequest](../../models/operations/listteamsignalrulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1204,32 +1272,32 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteWebhookTarget +## createTeamSignalRule -Delete a Signals webhook target by ID +Create a Signals rule for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.deleteWebhookTarget({ - id: "", + await firehydrant.signals.createTeamSignalRule({ + teamId: "", + createTeamSignalRule: { + name: "", + expression: "", + targetType: "OnCallSchedule", + targetId: "", + }, }); @@ -1243,18 +1311,24 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsDeleteWebhookTarget } from "firehydrant-typescript-sdk/funcs/signalsDeleteWebhookTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsCreateTeamSignalRule } from "firehydrant/funcs/signalsCreateTeamSignalRule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsDeleteWebhookTarget(firehydrantTypescriptSDK, { - id: "", + const res = await signalsCreateTeamSignalRule(firehydrant, { + teamId: "", + createTeamSignalRule: { + name: "", + expression: "", + targetType: "OnCallSchedule", + targetId: "", + }, }); if (!res.ok) { @@ -1273,7 +1347,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteSignalsWebhookTargetRequest](../../models/operations/deletesignalswebhooktargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateTeamSignalRuleRequest](../../models/operations/createteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1284,33 +1358,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateWebhookTarget +## getTeamSignalRule -Update a Signals webhook target by ID +Get a Signals rule by ID. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.updateWebhookTarget({ + await firehydrant.signals.getTeamSignalRule({ + teamId: "", id: "", - patchV1SignalsWebhookTargetsId: {}, }); @@ -1324,19 +1392,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsUpdateWebhookTarget } from "firehydrant-typescript-sdk/funcs/signalsUpdateWebhookTarget.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsGetTeamSignalRule } from "firehydrant/funcs/signalsGetTeamSignalRule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsUpdateWebhookTarget(firehydrantTypescriptSDK, { + const res = await signalsGetTeamSignalRule(firehydrant, { + teamId: "", id: "", - patchV1SignalsWebhookTargetsId: {}, }); if (!res.ok) { @@ -1355,7 +1423,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateSignalsWebhookTargetRequest](../../models/operations/updatesignalswebhooktargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetTeamSignalRuleRequest](../../models/operations/getteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1366,31 +1434,28 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listOnCall +## deleteTeamSignalRule -List all Signals on-call schedules for the entire organization. +Delete a Signals rule by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listOnCall({}); + await firehydrant.signals.deleteTeamSignalRule({ + teamId: "", + id: "", + }); } @@ -1403,17 +1468,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListOnCall } from "firehydrant-typescript-sdk/funcs/signalsListOnCall.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsDeleteTeamSignalRule } from "firehydrant/funcs/signalsDeleteTeamSignalRule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListOnCall(firehydrantTypescriptSDK, {}); + const res = await signalsDeleteTeamSignalRule(firehydrant, { + teamId: "", + id: "", + }); if (!res.ok) { throw res.error; @@ -1431,7 +1499,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSignalsOnCallRequest](../../models/operations/listsignalsoncallrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteTeamSignalRuleRequest](../../models/operations/deleteteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1442,32 +1510,28 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listEscalationPolicies +## updateTeamSignalRule -List all Signals escalation policies for a team. +Update a Signals rule by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listEscalationPolicies({ + await firehydrant.signals.updateTeamSignalRule({ teamId: "", + id: "", + updateTeamSignalRule: {}, }); @@ -1481,18 +1545,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListEscalationPolicies } from "firehydrant-typescript-sdk/funcs/signalsListEscalationPolicies.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsUpdateTeamSignalRule } from "firehydrant/funcs/signalsUpdateTeamSignalRule.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListEscalationPolicies(firehydrantTypescriptSDK, { + const res = await signalsUpdateTeamSignalRule(firehydrant, { teamId: "", + id: "", + updateTeamSignalRule: {}, }); if (!res.ok) { @@ -1511,7 +1577,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTeamEscalationPoliciesRequest](../../models/operations/listteamescalationpoliciesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateTeamSignalRuleRequest](../../models/operations/updateteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1522,34 +1588,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteEscalationPolicy +## listSignalsEventSources -Delete a Signals escalation policy by ID +List all Signals event sources for the authenticated user. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.deleteEscalationPolicy({ - teamId: "", - id: "", - }); + await firehydrant.signals.listSignalsEventSources({}); } @@ -1562,20 +1619,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsDeleteEscalationPolicy } from "firehydrant-typescript-sdk/funcs/signalsDeleteEscalationPolicy.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListSignalsEventSources } from "firehydrant/funcs/signalsListSignalsEventSources.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsDeleteEscalationPolicy(firehydrantTypescriptSDK, { - teamId: "", - id: "", - }); + const res = await signalsListSignalsEventSources(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1593,7 +1647,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTeamEscalationPolicyRequest](../../models/operations/deleteteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSignalsEventSourcesRequest](../../models/operations/listsignalseventsourcesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1604,34 +1658,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getOnCallSchedule +## listSignalsEmailTargets -Get a Signals on-call schedule by ID +List all Signals email targets for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.getOnCallSchedule({ - teamId: "", - scheduleId: "", - }); + await firehydrant.signals.listSignalsEmailTargets({}); } @@ -1644,20 +1689,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsGetOnCallSchedule } from "firehydrant-typescript-sdk/funcs/signalsGetOnCallSchedule.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListSignalsEmailTargets } from "firehydrant/funcs/signalsListSignalsEmailTargets.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsGetOnCallSchedule(firehydrantTypescriptSDK, { - teamId: "", - scheduleId: "", - }); + const res = await signalsListSignalsEmailTargets(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1675,7 +1717,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTeamOnCallScheduleRequest](../../models/operations/getteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSignalsEmailTargetsRequest](../../models/operations/listsignalsemailtargetsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1686,34 +1728,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateOnCallSchedule +## createSignalsEmailTarget -Update a Signals on-call schedule by ID +Create a Signals email target for a team. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.updateOnCallSchedule({ - teamId: "", - scheduleId: "", - patchV1TeamsTeamIdOnCallSchedulesScheduleId: {}, + await firehydrant.signals.createSignalsEmailTarget({ + name: "", }); @@ -1727,20 +1761,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsUpdateOnCallSchedule } from "firehydrant-typescript-sdk/funcs/signalsUpdateOnCallSchedule.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsCreateSignalsEmailTarget } from "firehydrant/funcs/signalsCreateSignalsEmailTarget.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsUpdateOnCallSchedule(firehydrantTypescriptSDK, { - teamId: "", - scheduleId: "", - patchV1TeamsTeamIdOnCallSchedulesScheduleId: {}, + const res = await signalsCreateSignalsEmailTarget(firehydrant, { + name: "", }); if (!res.ok) { @@ -1759,7 +1791,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTeamOnCallScheduleRequest](../../models/operations/updateteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateSignalsEmailTarget](../../models/components/createsignalsemailtarget.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1770,32 +1802,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listRules +## getSignalsEmailTarget -List all Signals rules for a team. +Get a Signals email target by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.listRules({ - teamId: "", + await firehydrant.signals.getSignalsEmailTarget({ + id: "", }); @@ -1809,18 +1835,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsListRules } from "firehydrant-typescript-sdk/funcs/signalsListRules.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsGetSignalsEmailTarget } from "firehydrant/funcs/signalsGetSignalsEmailTarget.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsListRules(firehydrantTypescriptSDK, { - teamId: "", + const res = await signalsGetSignalsEmailTarget(firehydrant, { + id: "", }); if (!res.ok) { @@ -1839,7 +1865,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTeamSignalRulesRequest](../../models/operations/listteamsignalrulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetSignalsEmailTargetRequest](../../models/operations/getsignalsemailtargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1850,38 +1876,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createRule +## deleteSignalsEmailTarget -Create a Signals rule for a team. +Delete a Signals email target by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.createRule({ - teamId: "", - postV1TeamsTeamIdSignalRules: { - name: "", - expression: "", - targetType: "User", - targetId: "", - }, + await firehydrant.signals.deleteSignalsEmailTarget({ + id: "", }); @@ -1895,24 +1909,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsCreateRule } from "firehydrant-typescript-sdk/funcs/signalsCreateRule.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsDeleteSignalsEmailTarget } from "firehydrant/funcs/signalsDeleteSignalsEmailTarget.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsCreateRule(firehydrantTypescriptSDK, { - teamId: "", - postV1TeamsTeamIdSignalRules: { - name: "", - expression: "", - targetType: "User", - targetId: "", - }, + const res = await signalsDeleteSignalsEmailTarget(firehydrant, { + id: "", }); if (!res.ok) { @@ -1931,7 +1939,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTeamSignalRuleRequest](../../models/operations/createteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteSignalsEmailTargetRequest](../../models/operations/deletesignalsemailtargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1942,33 +1950,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getRule +## updateSignalsEmailTarget -Get a Signals rule by ID. +Update a Signals email target by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.getRule({ - teamId: "", + await firehydrant.signals.updateSignalsEmailTarget({ id: "", + updateSignalsEmailTarget: {}, }); @@ -1982,19 +1984,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsGetRule } from "firehydrant-typescript-sdk/funcs/signalsGetRule.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsUpdateSignalsEmailTarget } from "firehydrant/funcs/signalsUpdateSignalsEmailTarget.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsGetRule(firehydrantTypescriptSDK, { - teamId: "", + const res = await signalsUpdateSignalsEmailTarget(firehydrant, { id: "", + updateSignalsEmailTarget: {}, }); if (!res.ok) { @@ -2013,7 +2015,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTeamSignalRuleRequest](../../models/operations/getteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateSignalsEmailTargetRequest](../../models/operations/updatesignalsemailtargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -2024,34 +2026,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteRule +## listSignalsWebhookTargets -Delete a Signals rule by ID +List all Signals webhook targets. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.deleteRule({ - teamId: "", - id: "", - }); + await firehydrant.signals.listSignalsWebhookTargets({}); } @@ -2064,20 +2057,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsDeleteRule } from "firehydrant-typescript-sdk/funcs/signalsDeleteRule.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListSignalsWebhookTargets } from "firehydrant/funcs/signalsListSignalsWebhookTargets.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsDeleteRule(firehydrantTypescriptSDK, { - teamId: "", - id: "", - }); + const res = await signalsListSignalsWebhookTargets(firehydrant, {}); if (!res.ok) { throw res.error; @@ -2095,7 +2085,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTeamSignalRuleRequest](../../models/operations/deleteteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSignalsWebhookTargetsRequest](../../models/operations/listsignalswebhooktargetsrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -2106,34 +2096,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateRule +## createSignalsWebhookTarget -Update a Signals rule by ID +Create a Signals webhook target. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.signals.updateRule({ - teamId: "", - id: "", - patchV1TeamsTeamIdSignalRulesId: {}, + await firehydrant.signals.createSignalsWebhookTarget({ + name: "", + url: "https://our-alligator.net/", }); @@ -2147,20 +2130,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { signalsUpdateRule } from "firehydrant-typescript-sdk/funcs/signalsUpdateRule.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsCreateSignalsWebhookTarget } from "firehydrant/funcs/signalsCreateSignalsWebhookTarget.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await signalsUpdateRule(firehydrantTypescriptSDK, { - teamId: "", - id: "", - patchV1TeamsTeamIdSignalRulesId: {}, + const res = await signalsCreateSignalsWebhookTarget(firehydrant, { + name: "", + url: "https://our-alligator.net/", }); if (!res.ok) { @@ -2179,7 +2161,524 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTeamSignalRuleRequest](../../models/operations/updateteamsignalrulerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateSignalsWebhookTarget](../../models/components/createsignalswebhooktarget.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getSignalsWebhookTarget + +Get a Signals webhook target by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.signals.getSignalsWebhookTarget({ + id: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsGetSignalsWebhookTarget } from "firehydrant/funcs/signalsGetSignalsWebhookTarget.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await signalsGetSignalsWebhookTarget(firehydrant, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSignalsWebhookTargetRequest](../../models/operations/getsignalswebhooktargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteSignalsWebhookTarget + +Delete a Signals webhook target by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.signals.deleteSignalsWebhookTarget({ + id: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsDeleteSignalsWebhookTarget } from "firehydrant/funcs/signalsDeleteSignalsWebhookTarget.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await signalsDeleteSignalsWebhookTarget(firehydrant, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteSignalsWebhookTargetRequest](../../models/operations/deletesignalswebhooktargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateSignalsWebhookTarget + +Update a Signals webhook target by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.signals.updateSignalsWebhookTarget({ + id: "", + updateSignalsWebhookTarget: {}, + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsUpdateSignalsWebhookTarget } from "firehydrant/funcs/signalsUpdateSignalsWebhookTarget.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await signalsUpdateSignalsWebhookTarget(firehydrant, { + id: "", + updateSignalsWebhookTarget: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateSignalsWebhookTargetRequest](../../models/operations/updatesignalswebhooktargetrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listSignalsTransposers + +List all transposers for your organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.signals.listSignalsTransposers(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListSignalsTransposers } from "firehydrant/funcs/signalsListSignalsTransposers.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await signalsListSignalsTransposers(firehydrant); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.SignalsAPITransposerListEntity](../../models/components/signalsapitransposerlistentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getSignalsIngestUrl + +Retrieve the url for ingesting signals for your organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.signals.getSignalsIngestUrl({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsGetSignalsIngestUrl } from "firehydrant/funcs/signalsGetSignalsIngestUrl.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await signalsGetSignalsIngestUrl(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSignalsIngestUrlRequest](../../models/operations/getsignalsingesturlrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.SignalsAPIIngestKeyEntity](../../models/components/signalsapiingestkeyentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## debugSignalsExpression + +Debug Signals expressions + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.signals.debugSignalsExpression({ + expression: "", + signals: [ + {}, + ], + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsDebugSignalsExpression } from "firehydrant/funcs/signalsDebugSignalsExpression.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await signalsDebugSignalsExpression(firehydrant, { + expression: "", + signals: [ + {}, + ], + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.DebugSignalsExpression](../../models/components/debugsignalsexpression.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listOrganizationOnCallSchedules + +List all Signals on-call schedules for the entire organization. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.signals.listOrganizationOnCallSchedules({}); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { signalsListOrganizationOnCallSchedules } from "firehydrant/funcs/signalsListOrganizationOnCallSchedules.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await signalsListOrganizationOnCallSchedules(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListOrganizationOnCallSchedulesRequest](../../models/operations/listorganizationoncallschedulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -2190,12 +2689,6 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/slack/README.md b/docs/sdks/slack/README.md deleted file mode 100644 index e6e692fc..00000000 --- a/docs/sdks/slack/README.md +++ /dev/null @@ -1,253 +0,0 @@ -# Slack -(*slack*) - -## Overview - -### Available Operations - -* [createEmojiAction](#createemojiaction) - Create a Slack emoji action -* [updateEmojiAction](#updateemojiaction) - Update a Slack emoji action -* [listUsergroups](#listusergroups) - List Slack usergroups - -## createEmojiAction - -Creates a new slack emoji action - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.slack.createEmojiAction({ - connectionId: "", - requestBody: { - emojiName: "", - }, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { slackCreateEmojiAction } from "firehydrant-typescript-sdk/funcs/slackCreateEmojiAction.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await slackCreateEmojiAction(firehydrantTypescriptSDK, { - connectionId: "", - requestBody: { - emojiName: "", - }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateSlackEmojiActionRequest](../../models/operations/createslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## updateEmojiAction - -Updates a slack emoji action - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.slack.updateEmojiAction({ - connectionId: "", - emojiActionId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { slackUpdateEmojiAction } from "firehydrant-typescript-sdk/funcs/slackUpdateEmojiAction.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await slackUpdateEmojiAction(firehydrantTypescriptSDK, { - connectionId: "", - emojiActionId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateSlackEmojiActionRequest](../../models/operations/updateslackemojiactionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listUsergroups - -List Slack usergroups - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.slack.listUsergroups(); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { slackListUsergroups } from "firehydrant-typescript-sdk/funcs/slackListUsergroups.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await slackListUsergroups(firehydrantTypescriptSDK); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/statuspage/README.md b/docs/sdks/statuspage/README.md deleted file mode 100644 index 1812cad8..00000000 --- a/docs/sdks/statuspage/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Statuspage -(*statuspage*) - -## Overview - -### Available Operations - -* [updateConnection](#updateconnection) - Update a Statuspage connection - -## updateConnection - -Update the given Statuspage integration connection. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.statuspage.updateConnection({ - connectionId: "", - patchV1IntegrationsStatuspageConnectionsConnectionId: {}, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statuspageUpdateConnection } from "firehydrant-typescript-sdk/funcs/statuspageUpdateConnection.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await statuspageUpdateConnection(firehydrantTypescriptSDK, { - connectionId: "", - patchV1IntegrationsStatuspageConnectionsConnectionId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateStatuspageConnectionRequest](../../models/operations/updatestatuspageconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.IntegrationsStatuspageConnectionEntity](../../models/components/integrationsstatuspageconnectionentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/statuspages/README.md b/docs/sdks/statuspages/README.md index 275d9a59..ed5e3452 100644 --- a/docs/sdks/statuspages/README.md +++ b/docs/sdks/statuspages/README.md @@ -3,43 +3,45 @@ ## Overview +Operations related to Status Pages + ### Available Operations -* [deleteIncident](#deleteincident) - Remove a status page from an incident -* [createSubscription](#createsubscription) - Create a status page subscription -* [deleteSubscription](#deletesubscription) - Unsubscribe from status page notifications -* [list](#list) - List status pages -* [create](#create) - Create a status page -* [get](#get) - Get a status page -* [update](#update) - Update a status page -* [delete](#delete) - Delete a status page -* [createComponentGroup](#createcomponentgroup) - Create a component group for a status page -* [deleteComponentGroup](#deletecomponentgroup) - Delete a status page component group -* [updateComponentGroup](#updatecomponentgroup) - Update a status page component group -* [updateImage](#updateimage) - Upload an image for a status page -* [deleteImage](#deleteimage) - Delete an image from a status page -* [createLink](#createlink) - Create a link for a status page -* [deleteLink](#deletelink) - Delete a status page link -* [updateLink](#updatelink) - Update a status page link -* [listSubscribers](#listsubscribers) - List status page subscribers -* [createSubscribers](#createsubscribers) - Add subscribers to a status page -* [deleteSubscribers](#deletesubscribers) - Remove subscribers from a status page - -## deleteIncident +* [deleteIncidentStatusPage](#deleteincidentstatuspage) - Remove a status page from an incident +* [listNuncConnections](#listnuncconnections) - List status pages +* [createNuncConnection](#createnuncconnection) - Create a status page +* [listEmailSubscribers](#listemailsubscribers) - List status page subscribers +* [createEmailSubscriber](#createemailsubscriber) - Add subscribers to a status page +* [deleteEmailSubscriber](#deleteemailsubscriber) - Remove subscribers from a status page +* [getNuncConnection](#getnuncconnection) - Get a status page +* [updateNuncConnection](#updatenuncconnection) - Update a status page +* [deleteNuncConnection](#deletenuncconnection) - Delete a status page +* [deleteNuncComponentGroup](#deletenunccomponentgroup) - Delete a status page component group +* [updateNuncComponentGroup](#updatenunccomponentgroup) - Update a status page component group +* [createNuncComponentGroup](#createnunccomponentgroup) - Create a component group for a status page +* [deleteNuncLink](#deletenunclink) - Delete a status page link +* [updateNuncLink](#updatenunclink) - Update a status page link +* [createNuncLink](#createnunclink) - Add link to a status page +* [updateNuncImage](#updatenuncimage) - Upload an image for a status page +* [deleteNuncImage](#deletenuncimage) - Delete an image from a status page +* [deleteNuncSubscription](#deletenuncsubscription) - Unsubscribe from status page notifications +* [createNuncSubscription](#createnuncsubscription) - Create a status page subscription + +## deleteIncidentStatusPage Remove a status page incident attached to an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.statusPages.deleteIncident({ + await firehydrant.statusPages.deleteIncidentStatusPage({ statusPageId: "", incidentId: "", }); @@ -55,17 +57,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesDeleteIncident } from "firehydrant-typescript-sdk/funcs/statusPagesDeleteIncident.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesDeleteIncidentStatusPage } from "firehydrant/funcs/statusPagesDeleteIncidentStatusPage.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesDeleteIncident(firehydrantTypescriptSDK, { + const res = await statusPagesDeleteIncidentStatusPage(firehydrant, { statusPageId: "", incidentId: "", }); @@ -97,33 +99,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createSubscription +## listNuncConnections -Subscribe to status page updates +Lists the information displayed as part of your FireHydrant hosted status pages. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.createSubscription({ - email: "Christ52@gmail.com", - }); + const result = await firehydrant.statusPages.listNuncConnections(); // Handle the result console.log(result); @@ -137,19 +131,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesCreateSubscription } from "firehydrant-typescript-sdk/funcs/statusPagesCreateSubscription.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesListNuncConnections } from "firehydrant/funcs/statusPagesListNuncConnections.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesCreateSubscription(firehydrantTypescriptSDK, { - email: "Christ52@gmail.com", - }); + const res = await statusPagesListNuncConnections(firehydrant); if (!res.ok) { throw res.error; @@ -168,43 +160,52 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1NuncSubscriptions](../../models/components/postv1nuncsubscriptions.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncNuncSubscription](../../models/components/nuncnuncsubscription.md)\>** +**Promise\<[components.NuncConnectionEntityPaginated](../../models/components/nuncconnectionentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteSubscription +## createNuncConnection -Unsubscribe from status page updates +Create a new FireHydrant hosted status page for customer facing statuses. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.deleteSubscription({ - unsubscribeToken: "", + const result = await firehydrant.statusPages.createNuncConnection({ + domain: "pertinent-ribbon.com", + conditionsNuncCondition: [ + "", + "", + ], + conditionsConditionId: [ + "", + ], + componentsInfrastructureType: [ + "", + "", + ], + componentsInfrastructureId: [ + "", + "", + "", + ], }); // Handle the result @@ -219,18 +220,34 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesDeleteSubscription } from "firehydrant-typescript-sdk/funcs/statusPagesDeleteSubscription.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesCreateNuncConnection } from "firehydrant/funcs/statusPagesCreateNuncConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesDeleteSubscription(firehydrantTypescriptSDK, { - unsubscribeToken: "", + const res = await statusPagesCreateNuncConnection(firehydrant, { + domain: "pertinent-ribbon.com", + conditionsNuncCondition: [ + "", + "", + ], + conditionsConditionId: [ + "", + ], + componentsInfrastructureType: [ + "", + "", + ], + componentsInfrastructureId: [ + "", + "", + "", + ], }); if (!res.ok) { @@ -250,42 +267,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteNuncSubscriptionRequest](../../models/operations/deletenuncsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateNuncConnectionRequest](../../models/operations/createnuncconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncNuncSubscription](../../models/components/nuncnuncsubscription.md)\>** +**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## list +## listEmailSubscribers -Lists the information displayed as part of your FireHydrant hosted status pages. +Retrieves the list of subscribers for a status page. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.list(); + const result = await firehydrant.statusPages.listEmailSubscribers({ + nuncConnectionId: "", + }); // Handle the result console.log(result); @@ -299,17 +312,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesList } from "firehydrant-typescript-sdk/funcs/statusPagesList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesListEmailSubscribers } from "firehydrant/funcs/statusPagesListEmailSubscribers.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesList(firehydrantTypescriptSDK); + const res = await statusPagesListEmailSubscribers(firehydrant, { + nuncConnectionId: "", + }); if (!res.ok) { throw res.error; @@ -328,58 +343,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListEmailSubscribersRequest](../../models/operations/listemailsubscribersrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncConnectionEntityPaginated](../../models/components/nuncconnectionentitypaginated.md)\>** +**Promise\<[components.NuncEmailSubscribersEntity](../../models/components/nuncemailsubscribersentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## createEmailSubscriber -Create a new FireHydrant hosted status page for customer facing statuses. +Subscribes a comma-separated string of emails to status page updates ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.create({ - domain: "low-packaging.info", - conditionsNuncCondition: [ - "", - ], - conditionsConditionId: [ - "", - ], - componentsInfrastructureType: [ - "", - "", - "", - ], - componentsInfrastructureId: [ - "", - "", - "", - ], + const result = await firehydrant.statusPages.createEmailSubscriber({ + nuncConnectionId: "", + requestBody: { + emails: "", + }, }); // Handle the result @@ -394,34 +391,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesCreate } from "firehydrant-typescript-sdk/funcs/statusPagesCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesCreateEmailSubscriber } from "firehydrant/funcs/statusPagesCreateEmailSubscriber.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesCreate(firehydrantTypescriptSDK, { - domain: "low-packaging.info", - conditionsNuncCondition: [ - "", - ], - conditionsConditionId: [ - "", - ], - componentsInfrastructureType: [ - "", - "", - "", - ], - componentsInfrastructureId: [ - "", - "", - "", - ], + const res = await statusPagesCreateEmailSubscriber(firehydrant, { + nuncConnectionId: "", + requestBody: { + emails: "", + }, }); if (!res.ok) { @@ -441,43 +425,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateStatusPageRequestBody](../../models/operations/createstatuspagerequestbody.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateEmailSubscriberRequest](../../models/operations/createemailsubscriberrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** +**Promise\<[components.NuncEmailSubscribersEntity](../../models/components/nuncemailsubscribersentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## deleteEmailSubscriber -Retrieve the information displayed as part of your FireHydrant hosted status page. +Unsubscribes one or more status page subscribers. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.get({ + const result = await firehydrant.statusPages.deleteEmailSubscriber({ nuncConnectionId: "", + subscriberIds: "", }); // Handle the result @@ -492,18 +471,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesGet } from "firehydrant-typescript-sdk/funcs/statusPagesGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesDeleteEmailSubscriber } from "firehydrant/funcs/statusPagesDeleteEmailSubscriber.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesGet(firehydrantTypescriptSDK, { + const res = await statusPagesDeleteEmailSubscriber(firehydrant, { nuncConnectionId: "", + subscriberIds: "", }); if (!res.ok) { @@ -523,62 +503,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetStatusPageRequest](../../models/operations/getstatuspagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteEmailSubscriberRequest](../../models/operations/deleteemailsubscriberrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** +**Promise\<[components.NuncEmailSubscribersEntity](../../models/components/nuncemailsubscribersentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## update +## getNuncConnection -Update your company's information and other components in the specified FireHydrant hosted status page. +Retrieve the information displayed as part of your FireHydrant hosted status page. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.update({ + const result = await firehydrant.statusPages.getNuncConnection({ nuncConnectionId: "", - requestBody: { - conditionsNuncCondition: [ - "", - "", - "", - ], - conditionsConditionId: [ - "", - "", - ], - componentsInfrastructureType: [ - "", - ], - componentsInfrastructureId: [ - "", - "", - "", - ], - }, }); // Handle the result @@ -593,37 +548,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesUpdate } from "firehydrant-typescript-sdk/funcs/statusPagesUpdate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesGetNuncConnection } from "firehydrant/funcs/statusPagesGetNuncConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesUpdate(firehydrantTypescriptSDK, { + const res = await statusPagesGetNuncConnection(firehydrant, { nuncConnectionId: "", - requestBody: { - conditionsNuncCondition: [ - "", - "", - "", - ], - conditionsConditionId: [ - "", - "", - ], - componentsInfrastructureType: [ - "", - ], - componentsInfrastructureId: [ - "", - "", - "", - ], - }, }); if (!res.ok) { @@ -643,7 +579,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateStatusPageRequest](../../models/operations/updatestatuspagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetNuncConnectionRequest](../../models/operations/getnuncconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -654,32 +590,40 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## delete +## updateNuncConnection -Delete a FireHydrant hosted status page, stopping updates of your incidents to it. +Update your company's information and other components in the specified FireHydrant hosted status page. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.delete({ + const result = await firehydrant.statusPages.updateNuncConnection({ nuncConnectionId: "", + requestBody: { + conditionsNuncCondition: [], + conditionsConditionId: [ + "", + "", + "", + ], + componentsInfrastructureType: [ + "", + ], + componentsInfrastructureId: [ + "", + ], + }, }); // Handle the result @@ -694,18 +638,32 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesDelete } from "firehydrant-typescript-sdk/funcs/statusPagesDelete.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesUpdateNuncConnection } from "firehydrant/funcs/statusPagesUpdateNuncConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesDelete(firehydrantTypescriptSDK, { + const res = await statusPagesUpdateNuncConnection(firehydrant, { nuncConnectionId: "", + requestBody: { + conditionsNuncCondition: [], + conditionsConditionId: [ + "", + "", + "", + ], + componentsInfrastructureType: [ + "", + ], + componentsInfrastructureId: [ + "", + ], + }, }); if (!res.ok) { @@ -725,7 +683,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteStatusPageRequest](../../models/operations/deletestatuspagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateNuncConnectionRequest](../../models/operations/updatenuncconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -736,35 +694,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createComponentGroup +## deleteNuncConnection -Add a component group to be displayed on a FireHydrant status page +Delete a FireHydrant hosted status page, stopping updates of your incidents to it. ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.createComponentGroup({ + const result = await firehydrant.statusPages.deleteNuncConnection({ nuncConnectionId: "", - requestBody: { - name: "", - }, }); // Handle the result @@ -779,21 +728,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesCreateComponentGroup } from "firehydrant-typescript-sdk/funcs/statusPagesCreateComponentGroup.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesDeleteNuncConnection } from "firehydrant/funcs/statusPagesDeleteNuncConnection.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesCreateComponentGroup(firehydrantTypescriptSDK, { + const res = await statusPagesDeleteNuncConnection(firehydrant, { nuncConnectionId: "", - requestBody: { - name: "", - }, }); if (!res.ok) { @@ -813,7 +759,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateStatusPageComponentGroupRequest](../../models/operations/createstatuspagecomponentgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteNuncConnectionRequest](../../models/operations/deletenuncconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -824,31 +770,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteComponentGroup +## deleteNuncComponentGroup Delete a component group displayed on a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.statusPages.deleteComponentGroup({ + await firehydrant.statusPages.deleteNuncComponentGroup({ nuncConnectionId: "", groupId: "", }); @@ -864,17 +804,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesDeleteComponentGroup } from "firehydrant-typescript-sdk/funcs/statusPagesDeleteComponentGroup.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesDeleteNuncComponentGroup } from "firehydrant/funcs/statusPagesDeleteNuncComponentGroup.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesDeleteComponentGroup(firehydrantTypescriptSDK, { + const res = await statusPagesDeleteNuncComponentGroup(firehydrant, { nuncConnectionId: "", groupId: "", }); @@ -895,7 +835,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteStatusPageComponentGroupRequest](../../models/operations/deletestatuspagecomponentgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteNuncComponentGroupRequest](../../models/operations/deletenunccomponentgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -906,31 +846,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateComponentGroup +## updateNuncComponentGroup Update a component group to be displayed on a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.statusPages.updateComponentGroup({ + await firehydrant.statusPages.updateNuncComponentGroup({ nuncConnectionId: "", groupId: "", }); @@ -946,17 +880,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesUpdateComponentGroup } from "firehydrant-typescript-sdk/funcs/statusPagesUpdateComponentGroup.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesUpdateNuncComponentGroup } from "firehydrant/funcs/statusPagesUpdateNuncComponentGroup.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesUpdateComponentGroup(firehydrantTypescriptSDK, { + const res = await statusPagesUpdateNuncComponentGroup(firehydrant, { nuncConnectionId: "", groupId: "", }); @@ -977,7 +911,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateStatusPageComponentGroupRequest](../../models/operations/updatestatuspagecomponentgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateNuncComponentGroupRequest](../../models/operations/updatenunccomponentgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -988,33 +922,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateImage +## createNuncComponentGroup -Add or replace an image attached to a FireHydrant status page +Add a component group to be displayed on a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.updateImage({ + const result = await firehydrant.statusPages.createNuncComponentGroup({ nuncConnectionId: "", - type: "", + requestBody: { + name: "", + }, }); // Handle the result @@ -1029,19 +959,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesUpdateImage } from "firehydrant-typescript-sdk/funcs/statusPagesUpdateImage.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesCreateNuncComponentGroup } from "firehydrant/funcs/statusPagesCreateNuncComponentGroup.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesUpdateImage(firehydrantTypescriptSDK, { + const res = await statusPagesCreateNuncComponentGroup(firehydrant, { nuncConnectionId: "", - type: "", + requestBody: { + name: "", + }, }); if (!res.ok) { @@ -1061,7 +993,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateStatusPageImageRequest](../../models/operations/updatestatuspageimagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateNuncComponentGroupRequest](../../models/operations/createnunccomponentgrouprequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -1072,37 +1004,30 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteImage +## deleteNuncLink -Delete an image attached to a FireHydrant status page +Delete a link displayed on a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.deleteImage({ + await firehydrant.statusPages.deleteNuncLink({ nuncConnectionId: "", - type: "", + linkId: "", }); - // Handle the result - console.log(result); + } run(); @@ -1113,19 +1038,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesDeleteImage } from "firehydrant-typescript-sdk/funcs/statusPagesDeleteImage.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesDeleteNuncLink } from "firehydrant/funcs/statusPagesDeleteNuncLink.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesDeleteImage(firehydrantTypescriptSDK, { + const res = await statusPagesDeleteNuncLink(firehydrant, { nuncConnectionId: "", - type: "", + linkId: "", }); if (!res.ok) { @@ -1134,8 +1059,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1145,47 +1069,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteStatusPageImageRequest](../../models/operations/deletestatuspageimagerequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteNuncLinkRequest](../../models/operations/deletenunclinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createLink +## updateNuncLink -Add a link to be displayed on a FireHydrant status page +Update a link to be displayed on a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.createLink({ + await firehydrant.statusPages.updateNuncLink({ nuncConnectionId: "", + linkId: "", + updateNuncLink: {}, }); - // Handle the result - console.log(result); + } run(); @@ -1196,18 +1115,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesCreateLink } from "firehydrant-typescript-sdk/funcs/statusPagesCreateLink.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesUpdateNuncLink } from "firehydrant/funcs/statusPagesUpdateNuncLink.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesCreateLink(firehydrantTypescriptSDK, { + const res = await statusPagesUpdateNuncLink(firehydrant, { nuncConnectionId: "", + linkId: "", + updateNuncLink: {}, }); if (!res.ok) { @@ -1216,8 +1137,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -1227,47 +1147,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateStatusPageLinkRequest](../../models/operations/createstatuspagelinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateNuncLinkRequest](../../models/operations/updatenunclinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteLink +## createNuncLink -Delete a link displayed on a FireHydrant status page +Add a link to be displayed on a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.statusPages.deleteLink({ + const result = await firehydrant.statusPages.createNuncLink({ nuncConnectionId: "", - linkId: "", }); - + // Handle the result + console.log(result); } run(); @@ -1278,19 +1192,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesDeleteLink } from "firehydrant-typescript-sdk/funcs/statusPagesDeleteLink.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesCreateNuncLink } from "firehydrant/funcs/statusPagesCreateNuncLink.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesDeleteLink(firehydrantTypescriptSDK, { + const res = await statusPagesCreateNuncLink(firehydrant, { nuncConnectionId: "", - linkId: "", }); if (!res.ok) { @@ -1299,7 +1212,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1309,48 +1223,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteStatusPageLinkRequest](../../models/operations/deletestatuspagelinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateNuncLinkRequest](../../models/operations/createnunclinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateLink +## updateNuncImage -Update a link to be displayed on a FireHydrant status page +Add or replace an image attached to a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.statusPages.updateLink({ + const result = await firehydrant.statusPages.updateNuncImage({ nuncConnectionId: "", - linkId: "", - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: {}, + type: "", }); - + // Handle the result + console.log(result); } run(); @@ -1361,20 +1269,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesUpdateLink } from "firehydrant-typescript-sdk/funcs/statusPagesUpdateLink.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesUpdateNuncImage } from "firehydrant/funcs/statusPagesUpdateNuncImage.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesUpdateLink(firehydrantTypescriptSDK, { + const res = await statusPagesUpdateNuncImage(firehydrant, { nuncConnectionId: "", - linkId: "", - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: {}, + type: "", }); if (!res.ok) { @@ -1383,7 +1290,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1393,43 +1301,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateStatusPageLinkRequest](../../models/operations/updatestatuspagelinkrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateNuncImageRequest](../../models/operations/updatenuncimagerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listSubscribers +## deleteNuncImage -Retrieves the list of subscribers for a status page. +Delete an image attached to a FireHydrant status page ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.listSubscribers({ + const result = await firehydrant.statusPages.deleteNuncImage({ nuncConnectionId: "", + type: "", }); // Handle the result @@ -1444,18 +1347,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesListSubscribers } from "firehydrant-typescript-sdk/funcs/statusPagesListSubscribers.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesDeleteNuncImage } from "firehydrant/funcs/statusPagesDeleteNuncImage.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesListSubscribers(firehydrantTypescriptSDK, { + const res = await statusPagesDeleteNuncImage(firehydrant, { nuncConnectionId: "", + type: "", }); if (!res.ok) { @@ -1475,46 +1379,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListStatusPageSubscribersRequest](../../models/operations/liststatuspagesubscribersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteNuncImageRequest](../../models/operations/deletenuncimagerequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncEmailSubscribersEntity](../../models/components/nuncemailsubscribersentity.md)\>** +**Promise\<[components.NuncConnectionEntity](../../models/components/nuncconnectionentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createSubscribers +## deleteNuncSubscription -Subscribes a comma-separated string of emails to status page updates +Unsubscribe from status page updates ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.createSubscribers({ - nuncConnectionId: "", - requestBody: { - emails: "", - }, + const result = await firehydrant.statusPages.deleteNuncSubscription({ + unsubscribeToken: "", }); // Handle the result @@ -1529,21 +1424,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesCreateSubscribers } from "firehydrant-typescript-sdk/funcs/statusPagesCreateSubscribers.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesDeleteNuncSubscription } from "firehydrant/funcs/statusPagesDeleteNuncSubscription.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesCreateSubscribers(firehydrantTypescriptSDK, { - nuncConnectionId: "", - requestBody: { - emails: "", - }, + const res = await statusPagesDeleteNuncSubscription(firehydrant, { + unsubscribeToken: "", }); if (!res.ok) { @@ -1563,44 +1455,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateStatusPageSubscribersRequest](../../models/operations/createstatuspagesubscribersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteNuncSubscriptionRequest](../../models/operations/deletenuncsubscriptionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncEmailSubscribersEntity](../../models/components/nuncemailsubscribersentity.md)\>** +**Promise\<[components.NuncNuncSubscription](../../models/components/nuncnuncsubscription.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteSubscribers +## createNuncSubscription -Unsubscribes one or more status page subscribers. +Subscribe to status page updates ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.statusPages.deleteSubscribers({ - nuncConnectionId: "", - subscriberIds: "", + const result = await firehydrant.statusPages.createNuncSubscription({ + email: "Arvilla_Funk@gmail.com", }); // Handle the result @@ -1615,19 +1500,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusPagesDeleteSubscribers } from "firehydrant-typescript-sdk/funcs/statusPagesDeleteSubscribers.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { statusPagesCreateNuncSubscription } from "firehydrant/funcs/statusPagesCreateNuncSubscription.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await statusPagesDeleteSubscribers(firehydrantTypescriptSDK, { - nuncConnectionId: "", - subscriberIds: "", + const res = await statusPagesCreateNuncSubscription(firehydrant, { + email: "Arvilla_Funk@gmail.com", }); if (!res.ok) { @@ -1647,23 +1531,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteStatusPageSubscribersRequest](../../models/operations/deletestatuspagesubscribersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateNuncSubscription](../../models/components/createnuncsubscription.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.NuncEmailSubscribersEntity](../../models/components/nuncemailsubscribersentity.md)\>** +**Promise\<[components.NuncNuncSubscription](../../models/components/nuncnuncsubscription.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/statusupdatetemplates/README.md b/docs/sdks/statusupdatetemplates/README.md deleted file mode 100644 index e73bc530..00000000 --- a/docs/sdks/statusupdatetemplates/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# StatusUpdateTemplates -(*statusUpdateTemplates*) - -## Overview - -### Available Operations - -* [create](#create) - Create a status update template - -## create - -Create a status update template for your organization - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.statusUpdateTemplates.create({ - name: "", - body: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { statusUpdateTemplatesCreate } from "firehydrant-typescript-sdk/funcs/statusUpdateTemplatesCreate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await statusUpdateTemplatesCreate(firehydrantTypescriptSDK, { - name: "", - body: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1StatusUpdateTemplates](../../models/components/postv1statusupdatetemplates.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.StatusUpdateTemplateEntity](../../models/components/statusupdatetemplateentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/system/README.md b/docs/sdks/system/README.md deleted file mode 100644 index 5df2c017..00000000 --- a/docs/sdks/system/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# System -(*system*) - -## Overview - -### Available Operations - -* [ping](#ping) - Check API connectivity - -## ping - -Simple endpoint to verify your API connection is working - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.system.ping(); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { systemPing } from "firehydrant-typescript-sdk/funcs/systemPing.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await systemPing(firehydrantTypescriptSDK); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.PongEntity](../../models/components/pongentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/tasks/README.md b/docs/sdks/tasks/README.md index f109111d..fe41613e 100644 --- a/docs/sdks/tasks/README.md +++ b/docs/sdks/tasks/README.md @@ -7,36 +7,44 @@ Operations related to Tasks ### Available Operations +* [createIncidentTaskList](#createincidenttasklist) - Add tasks from a task list to an incident +* [listIncidentTasks](#listincidenttasks) - List tasks for an incident +* [createIncidentTask](#createincidenttask) - Create an incident task +* [getIncidentTask](#getincidenttask) - Get an incident task +* [deleteIncidentTask](#deleteincidenttask) - Delete an incident task +* [updateIncidentTask](#updateincidenttask) - Update an incident task +* [convertIncidentTask](#convertincidenttask) - Convert a task to a follow-up +* [listTaskLists](#listtasklists) - List task lists +* [createTaskList](#createtasklist) - Create a task list +* [getTaskList](#gettasklist) - Get a task list +* [deleteTaskList](#deletetasklist) - Delete a task list +* [updateTaskList](#updatetasklist) - Update a task list * [listChecklistTemplates](#listchecklisttemplates) - List checklist templates * [createChecklistTemplate](#createchecklisttemplate) - Create a checklist template +* [getChecklistTemplate](#getchecklisttemplate) - Get a checklist template * [deleteChecklistTemplate](#deletechecklisttemplate) - Archive a checklist template * [updateChecklistTemplate](#updatechecklisttemplate) - Update a checklist template -* [listForIncident](#listforincident) - List tasks for an incident -* [create](#create) - Create a task for an incident -* [getForIncident](#getforincident) - Get a task for an incident -* [delete](#delete) - Delete a task from an incident -* [updateTask](#updatetask) - Update a task for an incident -* [convertToFollowup](#converttofollowup) - Convert a task to a follow-up -* [listTasks](#listtasks) - List task lists -* [createList](#createlist) - Create a task list -* [get](#get) - Get a task list -* [update](#update) - Update a task list -## listChecklistTemplates +## createIncidentTaskList -List all of the checklist templates that have been added to the organization +Add all tasks from list to incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.listChecklistTemplates({}); + const result = await firehydrant.tasks.createIncidentTaskList({ + incidentId: "", + createIncidentTaskList: { + taskListId: "", + }, + }); // Handle the result console.log(result); @@ -50,17 +58,22 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksListChecklistTemplates } from "firehydrant-typescript-sdk/funcs/tasksListChecklistTemplates.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksCreateIncidentTaskList } from "firehydrant/funcs/tasksCreateIncidentTaskList.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksListChecklistTemplates(firehydrantTypescriptSDK, {}); + const res = await tasksCreateIncidentTaskList(firehydrant, { + incidentId: "", + createIncidentTaskList: { + taskListId: "", + }, + }); if (!res.ok) { throw res.error; @@ -79,48 +92,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListChecklistTemplatesRequest](../../models/operations/listchecklisttemplatesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentTaskListRequest](../../models/operations/createincidenttasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChecklistTemplateEntityPaginated](../../models/components/checklisttemplateentitypaginated.md)\>** +**Promise\<[components.TaskEntity](../../models/components/taskentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createChecklistTemplate +## listIncidentTasks -Creates a checklist template for the organization +Retrieve a list of all tasks for a specific incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.createChecklistTemplate({ - name: "", - checks: [ - { - name: "", - }, - ], + const result = await firehydrant.tasks.listIncidentTasks({ + incidentId: "", }); // Handle the result @@ -135,23 +137,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksCreateChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksCreateChecklistTemplate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksListIncidentTasks } from "firehydrant/funcs/tasksListIncidentTasks.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksCreateChecklistTemplate(firehydrantTypescriptSDK, { - name: "", - checks: [ - { - name: "", - }, - ], + const res = await tasksListIncidentTasks(firehydrant, { + incidentId: "", }); if (!res.ok) { @@ -171,44 +168,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1ChecklistTemplates](../../models/components/postv1checklisttemplates.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListIncidentTasksRequest](../../models/operations/listincidenttasksrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** +**Promise\<[components.TaskEntityPaginated](../../models/components/taskentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| ---------------------------- | ---------------------------- | ---------------------------- | -| errors.ErrorEntity | 400 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.BadRequest | 413, 414, 415, 422, 431, 510 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## deleteChecklistTemplate +## createIncidentTask -Archive a checklist template +Create a task ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.deleteChecklistTemplate({ - id: "", + const result = await firehydrant.tasks.createIncidentTask({ + incidentId: "", + createIncidentTask: { + title: "", + }, }); // Handle the result @@ -223,18 +216,21 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksDeleteChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksDeleteChecklistTemplate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksCreateIncidentTask } from "firehydrant/funcs/tasksCreateIncidentTask.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksDeleteChecklistTemplate(firehydrantTypescriptSDK, { - id: "", + const res = await tasksCreateIncidentTask(firehydrant, { + incidentId: "", + createIncidentTask: { + title: "", + }, }); if (!res.ok) { @@ -254,48 +250,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteChecklistTemplateRequest](../../models/operations/deletechecklisttemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.CreateIncidentTaskRequest](../../models/operations/createincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** +**Promise\<[components.TaskEntity](../../models/components/taskentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateChecklistTemplate +## getIncidentTask -Update a checklist templates attributes +Retrieve a single task for an incident ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.updateChecklistTemplate({ - id: "", - patchV1ChecklistTemplatesId: {}, + await firehydrant.tasks.getIncidentTask({ + taskId: "", + incidentId: "", }); - // Handle the result - console.log(result); + } run(); @@ -306,19 +295,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksUpdateChecklistTemplate } from "firehydrant-typescript-sdk/funcs/tasksUpdateChecklistTemplate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksGetIncidentTask } from "firehydrant/funcs/tasksGetIncidentTask.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksUpdateChecklistTemplate(firehydrantTypescriptSDK, { - id: "", - patchV1ChecklistTemplatesId: {}, + const res = await tasksGetIncidentTask(firehydrant, { + taskId: "", + incidentId: "", }); if (!res.ok) { @@ -327,8 +316,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -338,47 +326,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateChecklistTemplateRequest](../../models/operations/updatechecklisttemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetIncidentTaskRequest](../../models/operations/getincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listForIncident +## deleteIncidentTask -Retrieve a list of all tasks for a specific incident +Delete a task ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.listForIncident({ + await firehydrant.tasks.deleteIncidentTask({ + taskId: "", incidentId: "", }); - // Handle the result - console.log(result); + } run(); @@ -389,17 +371,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksListForIncident } from "firehydrant-typescript-sdk/funcs/tasksListForIncident.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksDeleteIncidentTask } from "firehydrant/funcs/tasksDeleteIncidentTask.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksListForIncident(firehydrantTypescriptSDK, { + const res = await tasksDeleteIncidentTask(firehydrant, { + taskId: "", incidentId: "", }); @@ -409,8 +392,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -420,46 +402,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListIncidentTasksRequest](../../models/operations/listincidenttasksrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteIncidentTaskRequest](../../models/operations/deleteincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TaskEntityPaginated](../../models/components/taskentitypaginated.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## updateIncidentTask -Create a task +Update a task's attributes ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.create({ + const result = await firehydrant.tasks.updateIncidentTask({ + taskId: "", incidentId: "", - postV1IncidentsIncidentIdTasks: { - title: "", - }, + updateIncidentTask: {}, }); // Handle the result @@ -474,21 +449,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksCreate } from "firehydrant-typescript-sdk/funcs/tasksCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksUpdateIncidentTask } from "firehydrant/funcs/tasksUpdateIncidentTask.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksCreate(firehydrantTypescriptSDK, { + const res = await tasksUpdateIncidentTask(firehydrant, { + taskId: "", incidentId: "", - postV1IncidentsIncidentIdTasks: { - title: "", - }, + updateIncidentTask: {}, }); if (!res.ok) { @@ -508,7 +482,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateIncidentTaskRequest](../../models/operations/createincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateIncidentTaskRequest](../../models/operations/updateincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -519,36 +493,32 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## getForIncident +## convertIncidentTask -Retrieve a single task for an incident +Convert a task to a follow-up ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.tasks.getForIncident({ + const result = await firehydrant.tasks.convertIncidentTask({ taskId: "", incidentId: "", + convertIncidentTask: {}, }); - + // Handle the result + console.log(result); } run(); @@ -559,19 +529,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksGetForIncident } from "firehydrant-typescript-sdk/funcs/tasksGetForIncident.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksConvertIncidentTask } from "firehydrant/funcs/tasksConvertIncidentTask.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksGetForIncident(firehydrantTypescriptSDK, { + const res = await tasksConvertIncidentTask(firehydrant, { taskId: "", incidentId: "", + convertIncidentTask: {}, }); if (!res.ok) { @@ -580,7 +551,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -590,47 +562,121 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetIncidentTaskRequest](../../models/operations/getincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ConvertIncidentTaskRequest](../../models/operations/convertincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.TaskEntityPaginated](../../models/components/taskentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## delete +## listTaskLists -Delete a task +Lists all task lists for your organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.tasks.delete({ - taskId: "", - incidentId: "", - }); + const result = await firehydrant.tasks.listTaskLists({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksListTaskLists } from "firehydrant/funcs/tasksListTaskLists.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await tasksListTaskLists(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTaskListsRequest](../../models/operations/listtasklistsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createTaskList + +Creates a new task list + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.tasks.createTaskList({ + name: "", + taskListItems: [ + { + summary: "", + }, + { + summary: "", + }, + ], + }); + // Handle the result + console.log(result); } run(); @@ -641,19 +687,26 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksDelete } from "firehydrant-typescript-sdk/funcs/tasksDelete.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksCreateTaskList } from "firehydrant/funcs/tasksCreateTaskList.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksDelete(firehydrantTypescriptSDK, { - taskId: "", - incidentId: "", + const res = await tasksCreateTaskList(firehydrant, { + name: "", + taskListItems: [ + { + summary: "", + }, + { + summary: "", + }, + ], }); if (!res.ok) { @@ -662,7 +715,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -672,45 +726,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteIncidentTaskRequest](../../models/operations/deleteincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateTaskList](../../models/components/createtasklist.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateTask +## getTaskList -Update a task's attributes +Retrieves a single task list by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.updateTask({ - taskId: "", - incidentId: "", - patchV1IncidentsIncidentIdTasksTaskId: {}, + const result = await firehydrant.tasks.getTaskList({ + taskListId: "", }); // Handle the result @@ -725,20 +771,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksUpdateTask } from "firehydrant-typescript-sdk/funcs/tasksUpdateTask.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksGetTaskList } from "firehydrant/funcs/tasksGetTaskList.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksUpdateTask(firehydrantTypescriptSDK, { - taskId: "", - incidentId: "", - patchV1IncidentsIncidentIdTasksTaskId: {}, + const res = await tasksGetTaskList(firehydrant, { + taskListId: "", }); if (!res.ok) { @@ -758,45 +802,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateIncidentTaskRequest](../../models/operations/updateincidenttaskrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetTaskListRequest](../../models/operations/gettasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TaskEntity](../../models/components/taskentity.md)\>** +**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## convertToFollowup +## deleteTaskList -Convert a task to a follow-up +Delete a task list ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.convertToFollowup({ - taskId: "", - incidentId: "", - postV1IncidentsIncidentIdTasksTaskIdConvert: {}, + const result = await firehydrant.tasks.deleteTaskList({ + taskListId: "", }); // Handle the result @@ -811,20 +847,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksConvertToFollowup } from "firehydrant-typescript-sdk/funcs/tasksConvertToFollowup.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksDeleteTaskList } from "firehydrant/funcs/tasksDeleteTaskList.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksConvertToFollowup(firehydrantTypescriptSDK, { - taskId: "", - incidentId: "", - postV1IncidentsIncidentIdTasksTaskIdConvert: {}, + const res = await tasksDeleteTaskList(firehydrant, { + taskListId: "", }); if (!res.ok) { @@ -844,42 +878,39 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ConvertIncidentTaskToFollowupRequest](../../models/operations/convertincidenttasktofollowuprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteTaskListRequest](../../models/operations/deletetasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TaskEntityPaginated](../../models/components/taskentitypaginated.md)\>** +**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listTasks +## updateTaskList -Lists all task lists for your organization +Updates a task list's attributes and task list items ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.listTasks({}); + const result = await firehydrant.tasks.updateTaskList({ + taskListId: "", + updateTaskList: {}, + }); // Handle the result console.log(result); @@ -893,17 +924,20 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksListTasks } from "firehydrant-typescript-sdk/funcs/tasksListTasks.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksUpdateTaskList } from "firehydrant/funcs/tasksUpdateTaskList.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksListTasks(firehydrantTypescriptSDK, {}); + const res = await tasksUpdateTaskList(firehydrant, { + taskListId: "", + updateTaskList: {}, + }); if (!res.ok) { throw res.error; @@ -922,7 +956,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTaskListsRequest](../../models/operations/listtasklistsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateTaskListRequest](../../models/operations/updatetasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -933,38 +967,107 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## createList +## listChecklistTemplates -Creates a new task list +List all of the checklist templates that have been added to the organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.tasks.listChecklistTemplates({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksListChecklistTemplates } from "firehydrant/funcs/tasksListChecklistTemplates.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await tasksListChecklistTemplates(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListChecklistTemplatesRequest](../../models/operations/listchecklisttemplatesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ChecklistTemplateEntityPaginated](../../models/components/checklisttemplateentitypaginated.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createChecklistTemplate + +Creates a checklist template for the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.createList({ + const result = await firehydrant.tasks.createChecklistTemplate({ name: "", - taskListItems: [ + checks: [ { - summary: "", + name: "", }, { - summary: "", + name: "", + }, + { + name: "", }, ], }); @@ -981,24 +1084,27 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksCreateList } from "firehydrant-typescript-sdk/funcs/tasksCreateList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksCreateChecklistTemplate } from "firehydrant/funcs/tasksCreateChecklistTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksCreateList(firehydrantTypescriptSDK, { + const res = await tasksCreateChecklistTemplate(firehydrant, { name: "", - taskListItems: [ + checks: [ { - summary: "", + name: "", }, { - summary: "", + name: "", + }, + { + name: "", }, ], }); @@ -1020,43 +1126,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1TaskLists](../../models/components/postv1tasklists.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateChecklistTemplate](../../models/components/createchecklisttemplate.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** +**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| errors.ErrorEntity | 400 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## getChecklistTemplate -Retrieves a single task list by ID +Retrieves a single checklist template by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.get({ - taskListId: "", + const result = await firehydrant.tasks.getChecklistTemplate({ + id: "", }); // Handle the result @@ -1071,18 +1172,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksGet } from "firehydrant-typescript-sdk/funcs/tasksGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksGetChecklistTemplate } from "firehydrant/funcs/tasksGetChecklistTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksGet(firehydrantTypescriptSDK, { - taskListId: "", + const res = await tasksGetChecklistTemplate(firehydrant, { + id: "", }); if (!res.ok) { @@ -1102,44 +1203,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTaskListRequest](../../models/operations/gettasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetChecklistTemplateRequest](../../models/operations/getchecklisttemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** +**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## update +## deleteChecklistTemplate -Updates a task list's attributes and task list items +Archive a checklist template ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.tasks.update({ - taskListId: "", - patchV1TaskListsTaskListId: {}, + const result = await firehydrant.tasks.deleteChecklistTemplate({ + id: "", }); // Handle the result @@ -1154,19 +1248,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { tasksUpdate } from "firehydrant-typescript-sdk/funcs/tasksUpdate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksDeleteChecklistTemplate } from "firehydrant/funcs/tasksDeleteChecklistTemplate.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await tasksUpdate(firehydrantTypescriptSDK, { - taskListId: "", - patchV1TaskListsTaskListId: {}, + const res = await tasksDeleteChecklistTemplate(firehydrant, { + id: "", }); if (!res.ok) { @@ -1186,23 +1279,95 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTaskListRequest](../../models/operations/updatetasklistrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteChecklistTemplateRequest](../../models/operations/deletechecklisttemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TaskListEntity](../../models/components/tasklistentity.md)\>** +**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateChecklistTemplate + +Update a checklist templates attributes + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.tasks.updateChecklistTemplate({ + id: "", + updateChecklistTemplate: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { tasksUpdateChecklistTemplate } from "firehydrant/funcs/tasksUpdateChecklistTemplate.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await tasksUpdateChecklistTemplate(firehydrant, { + id: "", + updateChecklistTemplate: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateChecklistTemplateRequest](../../models/operations/updatechecklisttemplaterequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.ChecklistTemplateEntity](../../models/components/checklisttemplateentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/teams/README.md b/docs/sdks/teams/README.md index 809414f6..b76db1ff 100644 --- a/docs/sdks/teams/README.md +++ b/docs/sdks/teams/README.md @@ -3,116 +3,32 @@ ## Overview +Operations related to Teams + ### Available Operations +* [listTeams](#listteams) - List teams +* [createTeam](#createteam) - Create a team +* [getTeam](#getteam) - Get a team +* [deleteTeam](#deleteteam) - Archive a team +* [updateTeam](#updateteam) - Update a team * [listSchedules](#listschedules) - List schedules -* [list](#list) - List teams -* [create](#create) - Create a team -* [get](#get) - Get a team -* [archive](#archive) - Archive a team -* [update](#update) - Update a team -* [listOnCallSchedules](#listoncallschedules) - List on-call schedules for a team -* [createOnCallSchedule](#createoncallschedule) - Create an on-call schedule for a team -* [getScheduleShift](#getscheduleshift) - Get an on-call shift for a team schedule -* [deleteScheduleShift](#deletescheduleshift) - Delete an on-call shift from a team schedule -* [updateScheduleShift](#updatescheduleshift) - Update an on-call shift in a team schedule -* [createEscalationPolicy](#createescalationpolicy) - Create an escalation policy for a team -* [updateEscalationPolicy](#updateescalationpolicy) - Update an escalation policy for a team -* [createShift](#createshift) - Create a shift for an on-call schedule - -## listSchedules - -List all known schedules in FireHydrant as pulled from external sources - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.teams.listSchedules({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsListSchedules } from "firehydrant-typescript-sdk/funcs/teamsListSchedules.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsListSchedules(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSchedulesRequest](../../models/operations/listschedulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.ScheduleEntityPaginated](../../models/components/scheduleentitypaginated.md)\>** - -### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## list +## listTeams List all of the teams in the organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.teams.list({}); + const result = await firehydrant.teams.listTeams({}); // Handle the result console.log(result); @@ -126,17 +42,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsList } from "firehydrant-typescript-sdk/funcs/teamsList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { teamsListTeams } from "firehydrant/funcs/teamsListTeams.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await teamsList(firehydrantTypescriptSDK, {}); + const res = await teamsListTeams(firehydrant, {}); if (!res.ok) { throw res.error; @@ -166,31 +82,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## createTeam Create a new team ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.teams.create({ + const result = await firehydrant.teams.createTeam({ name: "", }); @@ -206,17 +116,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsCreate } from "firehydrant-typescript-sdk/funcs/teamsCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { teamsCreateTeam } from "firehydrant/funcs/teamsCreateTeam.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await teamsCreate(firehydrantTypescriptSDK, { + const res = await teamsCreateTeam(firehydrant, { name: "", }); @@ -237,7 +147,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Teams](../../models/components/postv1teams.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateTeam](../../models/components/createteam.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -248,31 +158,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## getTeam Retrieve a single team from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.teams.get({ + const result = await firehydrant.teams.getTeam({ teamId: "", }); @@ -288,17 +192,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsGet } from "firehydrant-typescript-sdk/funcs/teamsGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { teamsGetTeam } from "firehydrant/funcs/teamsGetTeam.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await teamsGet(firehydrantTypescriptSDK, { + const res = await teamsGetTeam(firehydrant, { teamId: "", }); @@ -330,31 +234,25 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## archive +## deleteTeam Archives an team which will hide it from lists and metrics ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.teams.archive({ + const result = await firehydrant.teams.deleteTeam({ teamId: "", }); @@ -370,17 +268,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsArchive } from "firehydrant-typescript-sdk/funcs/teamsArchive.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { teamsDeleteTeam } from "firehydrant/funcs/teamsDeleteTeam.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await teamsArchive(firehydrantTypescriptSDK, { + const res = await teamsDeleteTeam(firehydrant, { teamId: "", }); @@ -401,7 +299,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ArchiveTeamRequest](../../models/operations/archiveteamrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteTeamRequest](../../models/operations/deleteteamrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -412,33 +310,27 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## update +## updateTeam Update a single team from its ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.teams.update({ + const result = await firehydrant.teams.updateTeam({ teamId: "", - patchV1TeamsTeamId: {}, + updateTeam: {}, }); // Handle the result @@ -453,19 +345,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsUpdate } from "firehydrant-typescript-sdk/funcs/teamsUpdate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { teamsUpdateTeam } from "firehydrant/funcs/teamsUpdateTeam.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await teamsUpdate(firehydrantTypescriptSDK, { + const res = await teamsUpdateTeam(firehydrant, { teamId: "", - patchV1TeamsTeamId: {}, + updateTeam: {}, }); if (!res.ok) { @@ -496,660 +388,28 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## listOnCallSchedules - -List all Signals on-call schedules for a team. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.teams.listOnCallSchedules({ - teamId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsListOnCallSchedules } from "firehydrant-typescript-sdk/funcs/teamsListOnCallSchedules.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsListOnCallSchedules(firehydrantTypescriptSDK, { - teamId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTeamOnCallSchedulesRequest](../../models/operations/listteamoncallschedulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## createOnCallSchedule +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -Create a Signals on-call schedule for a team. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.teams.createOnCallSchedule({ - teamId: "", - postV1TeamsTeamIdOnCallSchedules: { - name: "", - timeZone: "America/Santo_Domingo", - strategy: { - type: "daily", - }, - }, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsCreateOnCallSchedule } from "firehydrant-typescript-sdk/funcs/teamsCreateOnCallSchedule.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsCreateOnCallSchedule(firehydrantTypescriptSDK, { - teamId: "", - postV1TeamsTeamIdOnCallSchedules: { - name: "", - timeZone: "America/Santo_Domingo", - strategy: { - type: "daily", - }, - }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTeamOnCallScheduleRequest](../../models/operations/createteamoncallschedulerequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## getScheduleShift - -Get a Signals on-call shift by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.teams.getScheduleShift({ - id: "", - teamId: "", - scheduleId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsGetScheduleShift } from "firehydrant-typescript-sdk/funcs/teamsGetScheduleShift.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsGetScheduleShift(firehydrantTypescriptSDK, { - id: "", - teamId: "", - scheduleId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTeamScheduleShiftRequest](../../models/operations/getteamscheduleshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## deleteScheduleShift - -Delete a Signals on-call shift by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.teams.deleteScheduleShift({ - id: "", - teamId: "", - scheduleId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsDeleteScheduleShift } from "firehydrant-typescript-sdk/funcs/teamsDeleteScheduleShift.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsDeleteScheduleShift(firehydrantTypescriptSDK, { - id: "", - teamId: "", - scheduleId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTeamScheduleShiftRequest](../../models/operations/deleteteamscheduleshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## updateScheduleShift - -Update a Signals on-call shift by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.teams.updateScheduleShift({ - id: "", - teamId: "", - scheduleId: "", - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: {}, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsUpdateScheduleShift } from "firehydrant-typescript-sdk/funcs/teamsUpdateScheduleShift.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsUpdateScheduleShift(firehydrantTypescriptSDK, { - id: "", - teamId: "", - scheduleId: "", - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTeamScheduleShiftRequest](../../models/operations/updateteamscheduleshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## createEscalationPolicy - -Create a Signals escalation policy for a team. - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.teams.createEscalationPolicy({ - teamId: "", - postV1TeamsTeamIdEscalationPolicies: { - name: "", - steps: [ - { - targets: [ - { - type: "Webhook", - id: "", - }, - ], - timeout: "", - }, - ], - }, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsCreateEscalationPolicy } from "firehydrant-typescript-sdk/funcs/teamsCreateEscalationPolicy.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsCreateEscalationPolicy(firehydrantTypescriptSDK, { - teamId: "", - postV1TeamsTeamIdEscalationPolicies: { - name: "", - steps: [ - { - targets: [ - { - type: "Webhook", - id: "", - }, - ], - timeout: "", - }, - ], - }, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTeamEscalationPolicyRequest](../../models/operations/createteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## updateEscalationPolicy - -Update a Signals escalation policy by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.teams.updateEscalationPolicy({ - teamId: "", - id: "", - patchV1TeamsTeamIdEscalationPoliciesId: {}, - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsUpdateEscalationPolicy } from "firehydrant-typescript-sdk/funcs/teamsUpdateEscalationPolicy.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await teamsUpdateEscalationPolicy(firehydrantTypescriptSDK, { - teamId: "", - id: "", - patchV1TeamsTeamIdEscalationPoliciesId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTeamEscalationPolicyRequest](../../models/operations/updateteamescalationpolicyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## createShift +## listSchedules -Create a Signals on-call shift in a schedule. +List all known schedules in FireHydrant as pulled from external sources ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.teams.createShift({ - teamId: "", - scheduleId: "", - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: { - startTime: "", - endTime: "", - }, - }); - + const result = await firehydrant.teams.listSchedules({}); + // Handle the result + console.log(result); } run(); @@ -1160,24 +420,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { teamsCreateShift } from "firehydrant-typescript-sdk/funcs/teamsCreateShift.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { teamsListSchedules } from "firehydrant/funcs/teamsListSchedules.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await teamsCreateShift(firehydrantTypescriptSDK, { - teamId: "", - scheduleId: "", - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: { - startTime: "", - endTime: "", - }, - }); + const res = await teamsListSchedules(firehydrant, {}); if (!res.ok) { throw res.error; @@ -1185,7 +438,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -1195,23 +449,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.CreateTeamOnCallScheduleShiftRequest](../../models/operations/createteamoncallscheduleshiftrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListSchedulesRequest](../../models/operations/listschedulesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.ScheduleEntityPaginated](../../models/components/scheduleentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/ticketing/README.md b/docs/sdks/ticketing/README.md index 59c3cd52..bd161466 100644 --- a/docs/sdks/ticketing/README.md +++ b/docs/sdks/ticketing/README.md @@ -3,28 +3,129 @@ ## Overview +Operations related to Ticketing + ### Available Operations -* [getFieldMap](#getfieldmap) - Get a field map for a ticketing project -* [updateProjectConfig](#updateprojectconfig) - Update a ticketing project configuration +* [listTickets](#listtickets) - List tickets +* [createTicket](#createticket) - Create a ticket +* [getTicket](#getticket) - Get a ticket +* [deleteTicket](#deleteticket) - Archive a ticket +* [updateTicket](#updateticket) - Update a ticket +* [listTicketingProjects](#listticketingprojects) - List ticketing projects +* [getTicketingProject](#getticketingproject) - Get a ticketing project +* [getConfigurationOptions](#getconfigurationoptions) - List configuration options for a ticketing project +* [getOptionsForField](#getoptionsforfield) - List a field's configuration options for a ticketing project +* [listAvailableTicketingFieldMaps](#listavailableticketingfieldmaps) - List available fields for ticket field mapping +* [createTicketingFieldMap](#createticketingfieldmap) - Create a field mapping for a ticketing project +* [getTicketingFieldMap](#getticketingfieldmap) - Get a field map for a ticketing project +* [deleteTicketingFieldMap](#deleteticketingfieldmap) - Archive a field map for a ticketing project +* [updateTicketingFieldMap](#updateticketingfieldmap) - Update a field map for a ticketing project +* [listAvailableInboundFieldMaps](#listavailableinboundfieldmaps) - List available fields for ticket field mapping +* [listInboundFieldMaps](#listinboundfieldmaps) - List inbound field maps for a ticketing project +* [createInboundFieldMap](#createinboundfieldmap) - Create inbound field map for a ticketing project +* [getInboundFieldMap](#getinboundfieldmap) - Get inbound field map for a ticketing project +* [updateInboundFieldMap](#updateinboundfieldmap) - Update inbound field map for a ticketing project +* [deleteInboundFieldMap](#deleteinboundfieldmap) - Archive inbound field map for a ticketing project +* [createTicketingProjectConfig](#createticketingprojectconfig) - Create a ticketing project configuration +* [getTicketingProjectConfig](#getticketingprojectconfig) - Get configuration for a ticketing project +* [deleteTicketingProjectConfig](#deleteticketingprojectconfig) - Archive a ticketing project configuration +* [updateTicketingProjectConfig](#updateticketingprojectconfig) - Update configuration for a ticketing project +* [listTicketingPriorities](#listticketingpriorities) - List ticketing priorities +* [createTicketingPriority](#createticketingpriority) - Create a ticketing priority +* [getTicketingPriority](#getticketingpriority) - Get a ticketing priority +* [deleteTicketingPriority](#deleteticketingpriority) - Delete a ticketing priority +* [updateTicketingPriority](#updateticketingpriority) - Update a ticketing priority +* [listTicketTags](#listtickettags) - List ticket tags -## getFieldMap +## listTickets -Retrieve field map for a ticketing project +List all of the tickets that have been added to the organiation ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.ticketing.getFieldMap({ - mapId: "", - ticketingProjectId: "", + const result = await firehydrant.ticketing.listTickets({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingListTickets } from "firehydrant/funcs/ticketingListTickets.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingListTickets(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTicketsRequest](../../models/operations/listticketsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createTicket + +Creates a ticket for a project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.createTicket({ + summary: "", }); // Handle the result @@ -39,19 +140,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { ticketingGetFieldMap } from "firehydrant-typescript-sdk/funcs/ticketingGetFieldMap.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingCreateTicket } from "firehydrant/funcs/ticketingCreateTicket.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await ticketingGetFieldMap(firehydrantTypescriptSDK, { - mapId: "", - ticketingProjectId: "", + const res = await ticketingCreateTicket(firehydrant, { + summary: "", }); if (!res.ok) { @@ -71,44 +171,37 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketingProjectFieldMapRequest](../../models/operations/getticketingprojectfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateTicket](../../models/components/createticket.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingProjectFieldMapEntity](../../models/components/ticketingprojectfieldmapentity.md)\>** +**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## updateProjectConfig +## getTicket -Update configuration for a ticketing project +Retrieves a single ticket by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.ticketing.updateProjectConfig({ - ticketingProjectId: "", - configId: "", + const result = await firehydrant.ticketing.getTicket({ + ticketId: "", }); // Handle the result @@ -123,19 +216,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { ticketingUpdateProjectConfig } from "firehydrant-typescript-sdk/funcs/ticketingUpdateProjectConfig.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetTicket } from "firehydrant/funcs/ticketingGetTicket.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await ticketingUpdateProjectConfig(firehydrantTypescriptSDK, { - ticketingProjectId: "", - configId: "", + const res = await ticketingGetTicket(firehydrant, { + ticketId: "", }); if (!res.ok) { @@ -155,23 +247,2070 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTicketingProjectConfigRequest](../../models/operations/updateticketingprojectconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetTicketRequest](../../models/operations/getticketrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** +**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteTicket + +Archive a ticket + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.ticketing.deleteTicket({ + ticketId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingDeleteTicket } from "firehydrant/funcs/ticketingDeleteTicket.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingDeleteTicket(firehydrant, { + ticketId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteTicketRequest](../../models/operations/deleteticketrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateTicket + +Update a ticket's attributes + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.updateTicket({ + ticketId: "", + updateTicket: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingUpdateTicket } from "firehydrant/funcs/ticketingUpdateTicket.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingUpdateTicket(firehydrant, { + ticketId: "", + updateTicket: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateTicketRequest](../../models/operations/updateticketrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listTicketingProjects + +List all ticketing projects available to the organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.listTicketingProjects({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingListTicketingProjects } from "firehydrant/funcs/ticketingListTicketingProjects.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingListTicketingProjects(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTicketingProjectsRequest](../../models/operations/listticketingprojectsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectsProjectListItemEntity](../../models/components/ticketingprojectsprojectlistitementity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getTicketingProject + +Retrieve a single ticketing project by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.getTicketingProject({ + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetTicketingProject } from "firehydrant/funcs/ticketingGetTicketingProject.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingGetTicketingProject(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTicketingProjectRequest](../../models/operations/getticketingprojectrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectsProjectListItemEntity](../../models/components/ticketingprojectsprojectlistitementity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getConfigurationOptions + +List all configuration options for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.ticketing.getConfigurationOptions({ + ticketingProjectId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetConfigurationOptions } from "firehydrant/funcs/ticketingGetConfigurationOptions.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingGetConfigurationOptions(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetConfigurationOptionsRequest](../../models/operations/getconfigurationoptionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getOptionsForField + +List a field's configuration options for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.ticketing.getOptionsForField({ + fieldId: "", + ticketingProjectId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetOptionsForField } from "firehydrant/funcs/ticketingGetOptionsForField.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingGetOptionsForField(firehydrant, { + fieldId: "", + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetOptionsForFieldRequest](../../models/operations/getoptionsforfieldrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listAvailableTicketingFieldMaps + +Returns metadata for the fields that are available for field mapping. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.listAvailableTicketingFieldMaps({ + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingListAvailableTicketingFieldMaps } from "firehydrant/funcs/ticketingListAvailableTicketingFieldMaps.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingListAvailableTicketingFieldMaps(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAvailableTicketingFieldMapsRequest](../../models/operations/listavailableticketingfieldmapsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingFieldMapsMappableFieldEntity](../../models/components/ticketingfieldmapsmappablefieldentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createTicketingFieldMap + +Creates field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.createTicketingFieldMap({ + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingCreateTicketingFieldMap } from "firehydrant/funcs/ticketingCreateTicketingFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingCreateTicketingFieldMap(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateTicketingFieldMapRequest](../../models/operations/createticketingfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectFieldMapEntity](../../models/components/ticketingprojectfieldmapentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getTicketingFieldMap + +Retrieve field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.getTicketingFieldMap({ + mapId: "", + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetTicketingFieldMap } from "firehydrant/funcs/ticketingGetTicketingFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingGetTicketingFieldMap(firehydrant, { + mapId: "", + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTicketingFieldMapRequest](../../models/operations/getticketingfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectFieldMapEntity](../../models/components/ticketingprojectfieldmapentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteTicketingFieldMap + +Archive field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.ticketing.deleteTicketingFieldMap({ + mapId: "", + ticketingProjectId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingDeleteTicketingFieldMap } from "firehydrant/funcs/ticketingDeleteTicketingFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingDeleteTicketingFieldMap(firehydrant, { + mapId: "", + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteTicketingFieldMapRequest](../../models/operations/deleteticketingfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateTicketingFieldMap + +Update field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.updateTicketingFieldMap({ + mapId: "", + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingUpdateTicketingFieldMap } from "firehydrant/funcs/ticketingUpdateTicketingFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingUpdateTicketingFieldMap(firehydrant, { + mapId: "", + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateTicketingFieldMapRequest](../../models/operations/updateticketingfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectFieldMapEntity](../../models/components/ticketingprojectfieldmapentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listAvailableInboundFieldMaps + +Returns metadata for the fields that are available for inbound field mapping. + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.listAvailableInboundFieldMaps({ + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingListAvailableInboundFieldMaps } from "firehydrant/funcs/ticketingListAvailableInboundFieldMaps.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingListAvailableInboundFieldMaps(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAvailableInboundFieldMapsRequest](../../models/operations/listavailableinboundfieldmapsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectInboundMappableFieldEntity](../../models/components/ticketingprojectinboundmappablefieldentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listInboundFieldMaps + +List all inbound field maps for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.listInboundFieldMaps({ + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingListInboundFieldMaps } from "firehydrant/funcs/ticketingListInboundFieldMaps.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingListInboundFieldMaps(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListInboundFieldMapsRequest](../../models/operations/listinboundfieldmapsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectInboundFieldMapEntity](../../models/components/ticketingprojectinboundfieldmapentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createInboundFieldMap + +Creates inbound field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.createInboundFieldMap({ + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingCreateInboundFieldMap } from "firehydrant/funcs/ticketingCreateInboundFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingCreateInboundFieldMap(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateInboundFieldMapRequest](../../models/operations/createinboundfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectInboundFieldMapEntity](../../models/components/ticketingprojectinboundfieldmapentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getInboundFieldMap + +Retrieve inbound field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.getInboundFieldMap({ + mapId: "", + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetInboundFieldMap } from "firehydrant/funcs/ticketingGetInboundFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingGetInboundFieldMap(firehydrant, { + mapId: "", + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetInboundFieldMapRequest](../../models/operations/getinboundfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectInboundFieldMapEntity](../../models/components/ticketingprojectinboundfieldmapentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateInboundFieldMap + +Update inbound field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.updateInboundFieldMap({ + mapId: "", + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingUpdateInboundFieldMap } from "firehydrant/funcs/ticketingUpdateInboundFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingUpdateInboundFieldMap(firehydrant, { + mapId: "", + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateInboundFieldMapRequest](../../models/operations/updateinboundfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectInboundFieldMapEntity](../../models/components/ticketingprojectinboundfieldmapentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteInboundFieldMap + +Archive inbound field map for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + await firehydrant.ticketing.deleteInboundFieldMap({ + mapId: "", + ticketingProjectId: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingDeleteInboundFieldMap } from "firehydrant/funcs/ticketingDeleteInboundFieldMap.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingDeleteInboundFieldMap(firehydrant, { + mapId: "", + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteInboundFieldMapRequest](../../models/operations/deleteinboundfieldmaprequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createTicketingProjectConfig + +Creates configuration for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.createTicketingProjectConfig({ + ticketingProjectId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingCreateTicketingProjectConfig } from "firehydrant/funcs/ticketingCreateTicketingProjectConfig.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingCreateTicketingProjectConfig(firehydrant, { + ticketingProjectId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateTicketingProjectConfigRequest](../../models/operations/createticketingprojectconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getTicketingProjectConfig + +Retrieve configuration for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.getTicketingProjectConfig({ + ticketingProjectId: "", + configId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetTicketingProjectConfig } from "firehydrant/funcs/ticketingGetTicketingProjectConfig.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingGetTicketingProjectConfig(firehydrant, { + ticketingProjectId: "", + configId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTicketingProjectConfigRequest](../../models/operations/getticketingprojectconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteTicketingProjectConfig + +Archive configuration for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.deleteTicketingProjectConfig({ + ticketingProjectId: "", + configId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingDeleteTicketingProjectConfig } from "firehydrant/funcs/ticketingDeleteTicketingProjectConfig.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingDeleteTicketingProjectConfig(firehydrant, { + ticketingProjectId: "", + configId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteTicketingProjectConfigRequest](../../models/operations/deleteticketingprojectconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateTicketingProjectConfig + +Update configuration for a ticketing project + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.updateTicketingProjectConfig({ + ticketingProjectId: "", + configId: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingUpdateTicketingProjectConfig } from "firehydrant/funcs/ticketingUpdateTicketingProjectConfig.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingUpdateTicketingProjectConfig(firehydrant, { + ticketingProjectId: "", + configId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateTicketingProjectConfigRequest](../../models/operations/updateticketingprojectconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingProjectConfigEntity](../../models/components/ticketingprojectconfigentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listTicketingPriorities + +List all ticketing priorities available to the organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.listTicketingPriorities(); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingListTicketingPriorities } from "firehydrant/funcs/ticketingListTicketingPriorities.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingListTicketingPriorities(firehydrant); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## createTicketingPriority + +Create a single ticketing priority + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.createTicketingPriority({ + name: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingCreateTicketingPriority } from "firehydrant/funcs/ticketingCreateTicketingPriority.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingCreateTicketingPriority(firehydrant, { + name: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [components.CreateTicketingPriority](../../models/components/createticketingpriority.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getTicketingPriority + +Retrieve a single ticketing priority by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.getTicketingPriority({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingGetTicketingPriority } from "firehydrant/funcs/ticketingGetTicketingPriority.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingGetTicketingPriority(firehydrant, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTicketingPriorityRequest](../../models/operations/getticketingpriorityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## deleteTicketingPriority + +Delete a single ticketing priority by ID + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.deleteTicketingPriority({ + id: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingDeleteTicketingPriority } from "firehydrant/funcs/ticketingDeleteTicketingPriority.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingDeleteTicketingPriority(firehydrant, { + id: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteTicketingPriorityRequest](../../models/operations/deleteticketingpriorityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## updateTicketingPriority + +Update a single ticketing priority's attributes + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.updateTicketingPriority({ + id: "", + updateTicketingPriority: {}, + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingUpdateTicketingPriority } from "firehydrant/funcs/ticketingUpdateTicketingPriority.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingUpdateTicketingPriority(firehydrant, { + id: "", + updateTicketingPriority: {}, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateTicketingPriorityRequest](../../models/operations/updateticketingpriorityrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | + +## listTicketTags + +List all of the ticket tags in the organization + +### Example Usage + +```typescript +import { Firehydrant } from "firehydrant"; + +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const result = await firehydrant.ticketing.listTicketTags({}); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { FirehydrantCore } from "firehydrant/core.js"; +import { ticketingListTicketTags } from "firehydrant/funcs/ticketingListTicketTags.js"; + +// Use `FirehydrantCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", +}); + +async function run() { + const res = await ticketingListTicketTags(firehydrant, {}); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTicketTagsRequest](../../models/operations/listtickettagsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.TagEntityPaginated](../../models/components/tagentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/ticketingpriorities/README.md b/docs/sdks/ticketingpriorities/README.md deleted file mode 100644 index 69e809fa..00000000 --- a/docs/sdks/ticketingpriorities/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# TicketingPriorities -(*ticketingPriorities*) - -## Overview - -### Available Operations - -* [get](#get) - Get a ticketing priority - -## get - -Retrieve a single ticketing priority by ID - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.ticketingPriorities.get({ - id: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { ticketingPrioritiesGet } from "firehydrant-typescript-sdk/funcs/ticketingPrioritiesGet.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await ticketingPrioritiesGet(firehydrantTypescriptSDK, { - id: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetTicketingPriorityRequest](../../models/operations/getticketingpriorityrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TicketingPriorityEntity](../../models/components/ticketingpriorityentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/tickets/README.md b/docs/sdks/tickets/README.md deleted file mode 100644 index be07982b..00000000 --- a/docs/sdks/tickets/README.md +++ /dev/null @@ -1,335 +0,0 @@ -# Tickets -(*tickets*) - -## Overview - -### Available Operations - -* [list](#list) - List tickets -* [create](#create) - Create a ticket -* [delete](#delete) - Delete a ticket -* [update](#update) - Update a ticket - -## list - -List all of the tickets that have been added to the organiation - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.tickets.list({}); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { ticketsList } from "firehydrant-typescript-sdk/funcs/ticketsList.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await ticketsList(firehydrantTypescriptSDK, {}); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListTicketsRequest](../../models/operations/listticketsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## create - -Creates a ticket for a project - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.tickets.create({ - summary: "", - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { ticketsCreate } from "firehydrant-typescript-sdk/funcs/ticketsCreate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await ticketsCreate(firehydrantTypescriptSDK, { - summary: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1TicketingTickets](../../models/components/postv1ticketingtickets.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## delete - -Delete a ticket - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.tickets.delete({ - ticketId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { ticketsDelete } from "firehydrant-typescript-sdk/funcs/ticketsDelete.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await ticketsDelete(firehydrantTypescriptSDK, { - ticketId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteTicketRequest](../../models/operations/deleteticketrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | - -## update - -Update a ticket's attributes - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const result = await firehydrantTypescriptSDK.tickets.update({ - ticketId: "", - patchV1TicketingTicketsTicketId: {}, - }); - - // Handle the result - console.log(result); -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { ticketsUpdate } from "firehydrant-typescript-sdk/funcs/ticketsUpdate.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await ticketsUpdate(firehydrantTypescriptSDK, { - ticketId: "", - patchV1TicketingTicketsTicketId: {}, - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - // Handle the result - console.log(result); -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateTicketRequest](../../models/operations/updateticketrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\<[components.TicketingTicketEntity](../../models/components/ticketingticketentity.md)\>** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 2961cedd..d2a232f9 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -7,25 +7,25 @@ Operations related to Users ### Available Operations -* [getCurrent](#getcurrent) - Get the currently authenticated user -* [list](#list) - List users -* [get](#get) - Get a user +* [listUsers](#listusers) - List users +* [getUser](#getuser) - Get a user +* [getCurrentUser](#getcurrentuser) - Get the currently authenticated user -## getCurrent +## listUsers -Retrieve the current user +Retrieve a list of all users in an organization ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.users.getCurrent(); + const result = await firehydrant.users.listUsers({}); // Handle the result console.log(result); @@ -39,17 +39,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { usersGetCurrent } from "firehydrant-typescript-sdk/funcs/usersGetCurrent.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { usersListUsers } from "firehydrant/funcs/usersListUsers.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await usersGetCurrent(firehydrantTypescriptSDK); + const res = await usersListUsers(firehydrant, {}); if (!res.ok) { throw res.error; @@ -68,41 +68,38 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListUsersRequest](../../models/operations/listusersrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.CurrentUserEntity](../../models/components/currentuserentity.md)\>** +**Promise\<[components.UserEntityPaginated](../../models/components/userentitypaginated.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## list +## getUser -Retrieve a list of all users in an organization +Retrieve a single user by ID ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.users.list({}); + const result = await firehydrant.users.getUser({ + id: "", + }); // Handle the result console.log(result); @@ -116,17 +113,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { usersList } from "firehydrant-typescript-sdk/funcs/usersList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { usersGetUser } from "firehydrant/funcs/usersGetUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await usersList(firehydrantTypescriptSDK, {}); + const res = await usersGetUser(firehydrant, { + id: "", + }); if (!res.ok) { throw res.error; @@ -145,44 +144,36 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListUsersRequest](../../models/operations/listusersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetUserRequest](../../models/operations/getuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.UserEntityPaginated](../../models/components/userentitypaginated.md)\>** +**Promise\<[components.UserEntity](../../models/components/userentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## getCurrentUser -Retrieve a single user by ID +Retrieve the current user ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.users.get({ - id: "", - }); + const result = await firehydrant.users.getCurrentUser(); // Handle the result console.log(result); @@ -196,19 +187,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { usersGet } from "firehydrant-typescript-sdk/funcs/usersGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { usersGetCurrentUser } from "firehydrant/funcs/usersGetCurrentUser.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await usersGet(firehydrantTypescriptSDK, { - id: "", - }); + const res = await usersGetCurrentUser(firehydrant); if (!res.ok) { throw res.error; @@ -227,23 +216,16 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetUserRequest](../../models/operations/getuserrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.UserEntity](../../models/components/userentity.md)\>** +**Promise\<[components.CurrentUserEntity](../../models/components/currentuserentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 1781fb2f..e159a45b 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -7,28 +7,28 @@ Operations related to Webhooks ### Available Operations -* [list](#list) - List webhooks -* [create](#create) - Create a webhook -* [get](#get) - Get a webhook -* [delete](#delete) - Delete a webhook -* [update](#update) - Update a webhook -* [listDeliveries](#listdeliveries) - List webhook deliveries +* [listWebhooks](#listwebhooks) - List webhooks +* [createWebhook](#createwebhook) - Create a webhook +* [listWebhookDeliveries](#listwebhookdeliveries) - List webhook deliveries +* [getWebhook](#getwebhook) - Get a webhook +* [deleteWebhook](#deletewebhook) - Delete a webhook +* [updateWebhook](#updatewebhook) - Update a webhook -## list +## listWebhooks Lists webhooks ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.webhooks.list({}); + const result = await firehydrant.webhooks.listWebhooks({}); // Handle the result console.log(result); @@ -42,17 +42,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { webhooksList } from "firehydrant-typescript-sdk/funcs/webhooksList.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { webhooksListWebhooks } from "firehydrant/funcs/webhooksListWebhooks.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await webhooksList(firehydrantTypescriptSDK, {}); + const res = await webhooksListWebhooks(firehydrant, {}); if (!res.ok) { throw res.error; @@ -82,32 +82,26 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## create +## createWebhook Create a new webhook ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.webhooks.create({ - url: "https://probable-heating.com/", + const result = await firehydrant.webhooks.createWebhook({ + url: "https://prime-tooth.biz/", }); // Handle the result @@ -122,18 +116,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { webhooksCreate } from "firehydrant-typescript-sdk/funcs/webhooksCreate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { webhooksCreateWebhook } from "firehydrant/funcs/webhooksCreateWebhook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await webhooksCreate(firehydrantTypescriptSDK, { - url: "https://probable-heating.com/", + const res = await webhooksCreateWebhook(firehydrant, { + url: "https://prime-tooth.biz/", }); if (!res.ok) { @@ -153,7 +147,7 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [components.PostV1Webhooks](../../models/components/postv1webhooks.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [components.CreateWebhook](../../models/components/createwebhook.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | @@ -164,36 +158,29 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## get +## listWebhookDeliveries -Retrieve a specific webhook +Get webhook deliveries ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.webhooks.get({ + await firehydrant.webhooks.listWebhookDeliveries({ webhookId: "", }); - // Handle the result - console.log(result); + } run(); @@ -204,17 +191,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { webhooksGet } from "firehydrant-typescript-sdk/funcs/webhooksGet.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { webhooksListWebhookDeliveries } from "firehydrant/funcs/webhooksListWebhookDeliveries.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await webhooksGet(firehydrantTypescriptSDK, { + const res = await webhooksListWebhookDeliveries(firehydrant, { webhookId: "", }); @@ -224,8 +211,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -235,46 +221,41 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetWebhookRequest](../../models/operations/getwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.ListWebhookDeliveriesRequest](../../models/operations/listwebhookdeliveriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.WebhooksEntitiesWebhookEntity](../../models/components/webhooksentitieswebhookentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## delete +## getWebhook -Delete a specific webhook +Retrieve a specific webhook ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.webhooks.delete({ + const result = await firehydrant.webhooks.getWebhook({ webhookId: "", }); - + // Handle the result + console.log(result); } run(); @@ -285,17 +266,17 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { webhooksDelete } from "firehydrant-typescript-sdk/funcs/webhooksDelete.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { webhooksGetWebhook } from "firehydrant/funcs/webhooksGetWebhook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await webhooksDelete(firehydrantTypescriptSDK, { + const res = await webhooksGetWebhook(firehydrant, { webhookId: "", }); @@ -305,7 +286,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -315,48 +297,40 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.DeleteWebhookRequest](../../models/operations/deletewebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.GetWebhookRequest](../../models/operations/getwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.WebhooksEntitiesWebhookEntity](../../models/components/webhooksentitieswebhookentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## update +## deleteWebhook -Update a specific webhook +Delete a specific webhook ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const result = await firehydrantTypescriptSDK.webhooks.update({ + await firehydrant.webhooks.deleteWebhook({ webhookId: "", - patchV1WebhooksWebhookId: {}, }); - // Handle the result - console.log(result); + } run(); @@ -367,19 +341,18 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { webhooksUpdate } from "firehydrant-typescript-sdk/funcs/webhooksUpdate.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { webhooksDeleteWebhook } from "firehydrant/funcs/webhooksDeleteWebhook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await webhooksUpdate(firehydrantTypescriptSDK, { + const res = await webhooksDeleteWebhook(firehydrant, { webhookId: "", - patchV1WebhooksWebhookId: {}, }); if (!res.ok) { @@ -388,8 +361,7 @@ async function run() { const { value: result } = res; - // Handle the result - console.log(result); + } run(); @@ -399,46 +371,42 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.UpdateWebhookRequest](../../models/operations/updatewebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.DeleteWebhookRequest](../../models/operations/deletewebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\<[components.WebhooksEntitiesWebhookEntity](../../models/components/webhooksentitieswebhookentity.md)\>** +**Promise\** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | -## listDeliveries +## updateWebhook -List webhook deliveries +Update a specific webhook ### Example Usage ```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; +import { Firehydrant } from "firehydrant"; -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new Firehydrant({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - await firehydrantTypescriptSDK.webhooks.listDeliveries({ + const result = await firehydrant.webhooks.updateWebhook({ webhookId: "", + updateWebhook: {}, }); - + // Handle the result + console.log(result); } run(); @@ -449,18 +417,19 @@ run(); The standalone function version of this method: ```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { webhooksListDeliveries } from "firehydrant-typescript-sdk/funcs/webhooksListDeliveries.js"; +import { FirehydrantCore } from "firehydrant/core.js"; +import { webhooksUpdateWebhook } from "firehydrant/funcs/webhooksUpdateWebhook.js"; -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. +// Use `FirehydrantCore` for best tree-shaking performance. // You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", +const firehydrant = new FirehydrantCore({ + apiKey: process.env["FIREHYDRANT_API_KEY"] ?? "", }); async function run() { - const res = await webhooksListDeliveries(firehydrantTypescriptSDK, { + const res = await webhooksUpdateWebhook(firehydrant, { webhookId: "", + updateWebhook: {}, }); if (!res.ok) { @@ -469,7 +438,8 @@ async function run() { const { value: result } = res; - + // Handle the result + console.log(result); } run(); @@ -479,23 +449,17 @@ run(); | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListWebhookDeliveriesRequest](../../models/operations/listwebhookdeliveriesrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `request` | [operations.UpdateWebhookRequest](../../models/operations/updatewebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response -**Promise\** +**Promise\<[components.WebhooksEntitiesWebhookEntity](../../models/components/webhooksentitieswebhookentity.md)\>** ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/zendesk/README.md b/docs/sdks/zendesk/README.md deleted file mode 100644 index 3f613767..00000000 --- a/docs/sdks/zendesk/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Zendesk -(*zendesk*) - -## Overview - -### Available Operations - -* [searchTickets](#searchtickets) - Search for Zendesk tickets - -## searchTickets - -Search for Zendesk tickets - -### Example Usage - -```typescript -import { FirehydrantTypescriptSDK } from "firehydrant-typescript-sdk"; - -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDK({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - await firehydrantTypescriptSDK.zendesk.searchTickets({ - ticketId: "", - }); - - -} - -run(); -``` - -### Standalone function - -The standalone function version of this method: - -```typescript -import { FirehydrantTypescriptSDKCore } from "firehydrant-typescript-sdk/core.js"; -import { zendeskSearchTickets } from "firehydrant-typescript-sdk/funcs/zendeskSearchTickets.js"; - -// Use `FirehydrantTypescriptSDKCore` for best tree-shaking performance. -// You can create one instance of it to use across an application. -const firehydrantTypescriptSDK = new FirehydrantTypescriptSDKCore({ - apiKey: process.env["FIREHYDRANTTYPESCRIPTSDK_API_KEY"] ?? "", -}); - -async function run() { - const res = await zendeskSearchTickets(firehydrantTypescriptSDK, { - ticketId: "", - }); - - if (!res.ok) { - throw res.error; - } - - const { value: result } = res; - - -} - -run(); -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.SearchZendeskTicketsRequest](../../models/operations/searchzendeskticketsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | - -### Response - -**Promise\** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.BadRequest | 400, 413, 414, 415, 422, 431, 510 | application/json | -| errors.Unauthorized | 401, 403, 407, 511 | application/json | -| errors.NotFound | 404, 501, 505 | application/json | -| errors.Timeout | 408, 504 | application/json | -| errors.RateLimited | 429 | application/json | -| errors.InternalServerError | 500, 502, 503, 506, 507, 508 | application/json | -| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..67bccfec --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,22 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import tseslint from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + { files: ["**/*.{js,mjs,cjs,ts}"] }, + { languageOptions: { globals: globals.browser } }, + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + { + rules: { + "no-constant-condition": "off", + "no-useless-escape": "off", + // Handled by typescript compiler + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-namespace": "off", + }, + }, +]; diff --git a/jsr.json b/jsr.json index d5dd99e4..c3668c72 100644 --- a/jsr.json +++ b/jsr.json @@ -1,8 +1,8 @@ { - "name": "firehydrant-typescript-sdk", - "version": "0.0.11", + "name": "firehydrant", + "version": "0.1.13", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 54fb8374..ae7da400 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,29 +1,44 @@ { - "name": "firehydrant-typescript-sdk", - "version": "0.0.11", + "name": "firehydrant", + "version": "0.1.13", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "firehydrant-typescript-sdk", - "version": "0.0.11", + "name": "firehydrant", + "version": "0.1.13", + "bin": { + "mcp": "bin/mcp-server.js" + }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^7.7.1", - "@typescript-eslint/parser": "^7.7.1", - "eslint": "^8.57.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", + "@eslint/js": "^9.19.0", + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@stricli/core": "^1.1.1", + "@types/express": "^4.17.21", + "bun": "^1.2.2", + "bun-types": "^1.2.2", + "eslint": "^9.19.0", + "express": "^4.21.2", + "globals": "^15.14.0", + "tshy": "^2.0.0", "typescript": "^5.4.5", + "typescript-eslint": "^8.22.0", "zod": "^3.23.4" }, "peerDependencies": { + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", "zod": ">= 3" + }, + "peerDependenciesMeta": { + "@modelcontextprotocol/sdk": { + "optional": true + } } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, "license": "MIT", "dependencies": { @@ -49,17 +64,79 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", + "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", + "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", + "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -67,7 +144,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -84,6 +161,19 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -98,53 +188,75 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "version": "9.26.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.26.0.tgz", + "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", - "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", + "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.3", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.13.0", + "levn": "^0.4.1" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, - "license": "ISC", + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -161,1594 +273,1594 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "BSD-3-Clause" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": ">= 8" + "node": ">=12" } }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.9.0.tgz", + "integrity": "sha512-Jq2EUCQpe0iyO5FGpzVYDNFR6oR53AIrwph9yWl7uSc7IWUMsrmpmSaTGra5hQNunXpM+9oit85p924jWuHzUA==", "dev": true, "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.3", + "eventsource": "^3.0.2", + "express": "^5.0.1", + "express-rate-limit": "^7.5.0", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.24.1" + }, "engines": { - "node": ">= 8" + "node": ">=18" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@modelcontextprotocol/sdk/node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", "dev": true, "license": "MIT", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" }, "engines": { - "node": ">= 8" + "node": ">= 0.6" } }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "node_modules/@modelcontextprotocol/sdk/node_modules/body-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", "dev": true, "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" + }, "engines": { - "node": ">=12.4.0" + "node": ">=18" } }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "node_modules/@modelcontextprotocol/sdk/node_modules/content-disposition": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", + "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "node_modules/@modelcontextprotocol/sdk/node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "node_modules/@modelcontextprotocol/sdk/node_modules/express": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz", + "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "accepts": "^2.0.0", + "body-parser": "^2.2.0", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": ">= 18" }, "funding": { "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "url": "https://opencollective.com/express" } }, - "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "node_modules/@modelcontextprotocol/sdk/node_modules/finalhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", + "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4" + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" }, "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">= 0.8" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "node_modules/@modelcontextprotocol/sdk/node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">= 0.8" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=0.10.0" } }, - "node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "node_modules/@modelcontextprotocol/sdk/node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">= 0.8" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "node_modules/@modelcontextprotocol/sdk/node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, + "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": ">=18" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "node_modules/@modelcontextprotocol/sdk/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "mime-db": "^1.54.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" + "node": ">= 0.6" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "node_modules/@modelcontextprotocol/sdk/node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" + "side-channel": "^1.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": ">=0.6" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz", - "integrity": "sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==", - "dev": true, - "license": "ISC" - }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "node_modules/@modelcontextprotocol/sdk/node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" }, "engines": { - "node": ">=0.4.0" + "node": ">= 18" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "node_modules/@modelcontextprotocol/sdk/node_modules/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", "dev": true, "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@modelcontextprotocol/sdk/node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">= 8" } }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 8" } }, - "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 8" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "node_modules/@oven/bun-darwin-aarch64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.2.13.tgz", + "integrity": "sha512-AOU4O9jxRp2TXeqoEfOjEaUNZb3+SUPBN8TIEnUjpnyLWPoYJGCeNdQuCDcUkmF3MJEmEuJdyF1IeOITozpC6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.2.13.tgz", + "integrity": "sha512-kJ2iOvxY8uz5/nu+8zIjKf4LmRIHBH9pJJM2q+tA47U04Tod6k6rtntDOI8SdmRe2M5c87RfbadWdxhpYHFIWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.2.13.tgz", + "integrity": "sha512-bZpIUOvx9np07AmH5MVXGYHWZ40m2vCpNV74fma6sCzBlssJclS2V3BZgO+lLvtUKSqnW3HAyJBGsRF34wPbNw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-linux-aarch64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.2.13.tgz", + "integrity": "sha512-hocSJmblX4CCjP1HpaM64I65erB+CONUCCwKzGGOfLGLobVi+vn/G56UaYWsje1y/Z7WlVaUSgKYVWl7EJ6T9g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-aarch64-musl": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.2.13.tgz", + "integrity": "sha512-P56m718KXeyu4Vq5fsESFktfu+0Us1jhu/ZzgHYFRYJcm/hjs6AUA/RJtUAifFy5PNAM5IJdrYl3xPsE8Wa+pg==", + "cpu": [ + "aarch64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.2.13.tgz", + "integrity": "sha512-pf8+Kn2GLrFKLcb8JSLM6Z147Af6L9GQODpnOHM4gvXQv6E/GwQg47/o+7f1XCfzib3fdzOTJlDPvvO1rnXOTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.2.13.tgz", + "integrity": "sha512-9n1ai2ejEpxEMqpbHQMWFyvacq3MYsB7gh5mxRlFwhNFPCWu/Sv6gyrO+q2vkOYgcEIGhJb6dqJ6L9vBNaL61A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.2.13.tgz", + "integrity": "sha512-w5Ob+GM3Ww4yRA6f1N845o6wEvuwHSmipFUGaRaVp4UELrFnIV9G3pmrlBbYHFnWhk13o8Q7H1/4ZphOkCRJmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.2.13.tgz", + "integrity": "sha512-VI8hVdfqk0QmbAbyrsIdo2O95n3fkbt72E0h3Wu69cHD1iKJqRXG28R8QoHdehoLSJnKVzRTwsUzHp764nefWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-windows-x64": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.2.13.tgz", + "integrity": "sha512-sArgbRmT7V3mUdNFaAdUcuJsuS+oeMDZLPWFSg0gtQZpRrURs9nPzEnZMmVCFo4+kPF9Tb5ujQT9uDySh6/qVg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oven/bun-windows-x64-baseline": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.2.13.tgz", + "integrity": "sha512-Aiezu99fOUJJpzGuylOJryd6w9Syg2TBigHeXV2+RJsouBzvAnIEYIBA94ZspRq1ulD26Wmkk8Ae+jZ4edk9GA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "license": "MIT", + "optional": true, "engines": { - "node": ">=8" + "node": ">=14" } }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "node_modules/@stricli/core": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@stricli/core/-/core-1.1.2.tgz", + "integrity": "sha512-/yWSoHUxo9mF8rgUyZkJgdrAoyIiOOhez1jo9vHTUJa8HTZYhioQUXtQU+rhi52m/hnV9Z2VGC2ap3OTH4NvUg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/connect": "*", + "@types/node": "*" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/node": "*" } }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" } }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", + "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.15.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.17.tgz", + "integrity": "sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==", "dev": true, "license": "MIT", "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "undici-types": "~6.21.0" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "node_modules/@types/qs": { + "version": "6.9.18", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", + "integrity": "sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==", "dev": true, "license": "MIT" }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "@types/mime": "^1", + "@types/node": "*" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dev": true, "license": "MIT", "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" } }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "node_modules/@typescript-eslint/type-utils": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.0.tgz", + "integrity": "sha512-t2vouuYQKEKSLtJaa5bB4jHeha2HJczQ6E5IXPDPgIty9EqcJxpr1QHQ86YyIPwDwxvUmLfP2YADQ5ZY4qddZg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" + "@typescript-eslint/typescript-estree": "8.32.0", + "@typescript-eslint/utils": "8.32.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.0.tgz", + "integrity": "sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.0.tgz", + "integrity": "sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" + "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/visitor-keys": "8.32.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/call-bound": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", - "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.0.tgz", + "integrity": "sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "get-intrinsic": "^1.2.6" + "@typescript-eslint/types": "8.32.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">=6" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/@typescript-eslint/type-utils/node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": ">=18.12" }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "peerDependencies": { + "typescript": ">=4.8.4" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/@typescript-eslint/utils": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.0.tgz", + "integrity": "sha512-8S9hXau6nQ/sYVtC3D6ISIDoJzS1NsCK+gluVhLN2YkBPX+/1wkwyUiDKnxRh15579WoOIyVWnoyIf3yGI9REw==", "dev": true, "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.32.0", + "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/typescript-estree": "8.32.0" }, "engines": { - "node": ">=7.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.0.tgz", + "integrity": "sha512-jc/4IxGNedXkmG4mx4nJTILb6TMjL66D41vyeaPWvDUmeYQzF3lKtN15WsAeTr65ce4mPxwopPSo1yUUAWw0hQ==", "dev": true, "license": "MIT", "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/visitor-keys": "8.32.0" }, "engines": { - "node": ">= 8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.0.tgz", + "integrity": "sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.0.tgz", + "integrity": "sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" + "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/visitor-keys": "8.32.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/inspect-js" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.0.tgz", + "integrity": "sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" + "@typescript-eslint/types": "8.32.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, + "license": "Apache-2.0", "engines": { - "node": ">=6.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "node_modules/@typescript-eslint/utils/node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", "dev": true, "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, "engines": { - "node": ">= 0.4" + "node": ">=18.12" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "peerDependencies": { + "typescript": ">=4.8.4" } }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "license": "MIT", "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "mime-types": "~2.1.34", + "negotiator": "0.6.3" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "node_modules/acorn": { + "version": "8.14.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "dev": true, "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=8" + "node": ">=0.4.0" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">= 0.4" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/enhanced-resolve": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", - "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, "engines": { - "node": ">=10.13.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/es-abstract": { - "version": "1.23.8", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.8.tgz", - "integrity": "sha512-lfab8IzDn6EpI1ibZakcgS6WsfEBiB+43cuJo+wgylx1xKXf+Sp+YR3vFuQwC/u3sxYwV8Cxe3B0DpVUu/WiJQ==", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.2.6", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-regex": "^1.2.1", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.0", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.0", - "regexp.prototype.flags": "^1.5.3", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.18" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, - "license": "MIT", + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, "engines": { - "node": ">= 0.4" + "node": ">= 8" } }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0" + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/body-parser/node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8" } }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.0" + "balanced-match": "^1.0.0" } }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" + "fill-range": "^7.1.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" + } + }, + "node_modules/bun": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/bun/-/bun-1.2.13.tgz", + "integrity": "sha512-EhP1MhFbicqtaRSFCbEZdkcFco8Ov47cNJcB9QmKS8U4cojKHfLU+dQR14lCvLYmtBvGgwv/Lp+9SSver2OPzQ==", + "cpu": [ + "arm64", + "x64", + "aarch64" + ], + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "os": [ + "darwin", + "linux", + "win32" + ], + "bin": { + "bun": "bin/bun.exe", + "bunx": "bin/bun.exe" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "optionalDependencies": { + "@oven/bun-darwin-aarch64": "1.2.13", + "@oven/bun-darwin-x64": "1.2.13", + "@oven/bun-darwin-x64-baseline": "1.2.13", + "@oven/bun-linux-aarch64": "1.2.13", + "@oven/bun-linux-aarch64-musl": "1.2.13", + "@oven/bun-linux-x64": "1.2.13", + "@oven/bun-linux-x64-baseline": "1.2.13", + "@oven/bun-linux-x64-musl": "1.2.13", + "@oven/bun-linux-x64-musl-baseline": "1.2.13", + "@oven/bun-windows-x64": "1.2.13", + "@oven/bun-windows-x64-baseline": "1.2.13" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/bun-types": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.13.tgz", + "integrity": "sha512-rRjA1T6n7wto4gxhAO/ErZEtOXyEZEmnIHQfl0Dt1QQSB4QV0iP6BZ9/YB5fZaHFQ2dwHFrmPaRQ9GGMX01k9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "dev": true, "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.8" } }, - "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" + "node": ">= 0.4" } }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", "dev": true, "license": "MIT", "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-typescript": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.7.0.tgz", - "integrity": "sha512-Vrwyi8HHxY97K5ebydMtffsWAn1SCR9eol49eCd5fJS4O1WV7PaAjbcjmbfJJSMz/t4Mal212Uz/fQZrOB8mow==", - "dev": true, - "license": "ISC", - "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.3.7", - "enhanced-resolve": "^5.15.0", - "fast-glob": "^3.3.2", - "get-tsconfig": "^4.7.5", - "is-bun-module": "^1.0.2", - "is-glob": "^4.0.3", - "stable-hash": "^0.0.4" + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": ">= 0.4" }, "funding": { - "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" - }, - "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*", - "eslint-plugin-import-x": "*" - }, - "peerDependenciesMeta": { - "eslint-plugin-import": { - "optional": true - }, - "eslint-plugin-import-x": { - "optional": true - } + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", - "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" + "node": ">=6" } }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", - "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "license": "MIT", "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" + "node": ">= 8.10.0" }, - "engines": { - "node": "*" + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "is-glob": "^4.0.1" }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">= 6" } }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" + "color-name": "~1.1.4" }, "engines": { - "node": "*" + "node": ">=7.0.0" } }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } + "license": "MIT" }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } + "license": "MIT" }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "estraverse": "^5.2.0" + "safe-buffer": "5.2.1" }, "engines": { - "node": ">=4.0" + "node": ">= 0.6" } }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "engines": { - "node": ">=4.0" + "node": ">= 0.6" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true, "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, "license": "MIT", "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "object-assign": "^4", + "vary": "^1" }, "engines": { - "node": ">=8.6.0" + "node": ">= 0.10" } }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "is-glob": "^4.0.1" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", - "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" + "node": ">= 8" } }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "ms": "^2.1.3" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "dev": true, "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", "dev": true, "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "license": "MIT", "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">= 0.4" } }, - "node_modules/flatted": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", - "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, - "license": "ISC" + "license": "MIT" }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.3" - } + "license": "MIT" }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, - "license": "ISC" + "license": "MIT" }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.8" } }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.4" } }, - "node_modules/get-intrinsic": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", - "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "dunder-proto": "^1.0.0", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "function-bind": "^1.1.2", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.0.0" + "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-tsconfig": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", - "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "node_modules/eslint": { + "version": "9.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.26.0.tgz", + "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==", "dev": true, "license": "MIT", "dependencies": { - "resolve-pkg-maps": "^1.0.0" + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.20.0", + "@eslint/config-helpers": "^0.2.1", + "@eslint/core": "^0.13.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.26.0", + "@eslint/plugin-kit": "^0.2.8", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@modelcontextprotocol/sdk": "^1.8.0", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.3.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "zod": "^3.24.2" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/eslint-scope": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", "dev": true, - "license": "ISC", + "license": "BSD-2-Clause", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": "*" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://opencollective.com/eslint" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, + "license": "Apache-2.0", "engines": { - "node": ">=10.13.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/glob/node_modules/brace-expansion": { + "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", @@ -1759,7 +1871,20 @@ "concat-map": "0.0.1" } }, - "node_modules/glob/node_modules/minimatch": { + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", @@ -1772,350 +1897,436 @@ "node": "*" } }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "type-fest": "^0.20.2" + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": ">=8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, + "license": "Apache-2.0", "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/eslint" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, - "license": "MIT", + "license": "BSD-3-Clause", "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "estraverse": "^5.1.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10" } }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=4.0" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4.0" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "dev": true, "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.6" } }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", "dev": true, "license": "MIT", "dependencies": { - "dunder-proto": "^1.0.0" + "eventsource-parser": "^3.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.1.tgz", + "integrity": "sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "node_modules/express-rate-limit": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.0.tgz", + "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">= 16" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": "^4.11 || 5 || ^5.0.0-beta.1" } }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "license": "MIT", "dependencies": { - "has-symbols": "^1.0.3" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8.6.0" } }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "function-bind": "^1.1.2" + "is-glob": "^4.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">= 6" } }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz", + "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, "engines": { - "node": ">= 4" + "node": ">=16.0.0" } }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "dev": true, "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, "engines": { - "node": ">=0.8.19" + "node": ">= 0.8" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "ms": "2.0.0" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true, - "license": "ISC" + "license": "MIT" }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=16" } }, - "node_modules/is-async-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", - "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "dev": true, - "license": "MIT", + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", "dependencies": { - "has-tostringtag": "^1.0.0" + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/is-boolean-object": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", - "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.6" } }, - "node_modules/is-bun-module": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.3.0.tgz", - "integrity": "sha512-DgXeu5UWI0IsMQundYb5UAOzm6G2eVnarJ0byP6Tm55iZNKceD59LNPA2L4VvsScTtHcw0yEkVwSf7PC+QoLSA==", + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, + "hasInstallScript": true, "license": "MIT", - "dependencies": { - "semver": "^7.6.3" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, "license": "MIT", - "engines": { - "node": ">= 0.4" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "node_modules/get-intrinsic": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", "dev": true, "license": "MIT", "dependencies": { - "hasown": "^2.0.2" + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -2124,34 +2335,59 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": ">= 0.4" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -2159,25 +2395,29 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, "engines": { "node": ">= 0.4" }, @@ -2185,234 +2425,163 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, "license": "MIT", "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", "engines": { - "node": ">=0.12.0" + "node": ">= 0.8" } }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" + "safer-buffer": ">= 2.1.2 < 3" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 4" } }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=6" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.8.19" } }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "ISC" }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.10" } }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" + "binary-extensions": "^2.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/is-weakref": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", - "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.12.0" } }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", "dev": true, "license": "MIT" }, @@ -2423,6 +2592,22 @@ "dev": true, "license": "ISC" }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2457,19 +2642,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -2517,6 +2689,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -2527,6 +2706,26 @@ "node": ">= 0.4" } }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2537,6 +2736,16 @@ "node": ">= 8" } }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -2551,6 +2760,42 @@ "node": ">=8.6" } }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -2567,14 +2812,30 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "dev": true, "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ms": { @@ -2591,96 +2852,42 @@ "dev": true, "license": "MIT" }, - "node_modules/object-inspect": { - "version": "1.13.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", - "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 0.6" } }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, "engines": { - "node": ">= 0.4" + "node": ">=0.10.0" } }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", + "node_modules/object-inspect": { + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, "engines": { "node": ">= 0.4" }, @@ -2688,6 +2895,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2716,24 +2936,6 @@ "node": ">= 0.8.0" } }, - "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2766,6 +2968,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2779,24 +2988,24 @@ "node": ">=6" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/path-key": { @@ -2809,23 +3018,30 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, "engines": { - "node": ">=8" + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "dev": true, + "license": "MIT" + }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -2839,14 +3055,27 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "node_modules/pkce-challenge": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", + "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", "dev": true, "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=16.20.0" + } + }, + "node_modules/polite-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/polite-json/-/polite-json-5.0.0.tgz", + "integrity": "sha512-OLS/0XeUAcE8a2fdwemNja+udKgXNnY6yKVIXqAD2zVRx1KvY6Ato/rZ2vdzbxqYwPW0u6SCNC/bAMPNzpzxbw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/prelude-ls": { @@ -2859,6 +3088,20 @@ "node": ">= 0.8.0" } }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -2869,6 +3112,22 @@ "node": ">=6" } }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2890,67 +3149,56 @@ ], "license": "MIT" }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.9.tgz", - "integrity": "sha512-r0Ay04Snci87djAsI4U+WNRcSw5S4pOH7qFjd/veA5gC7TbqESR3tcj28ia95L/fYUDw11JKP7uqUKUAfVvV5Q==", + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", + "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "dunder-proto": "^1.0.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "which-builtin-type": "^1.2.1" + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.6.3", + "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", - "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.2" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" + "picomatch": "^2.2.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8.10.0" } }, "node_modules/resolve-from": { @@ -2963,14 +3211,21 @@ "node": ">=4" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "node_modules/resolve-import": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-1.4.6.tgz", + "integrity": "sha512-CIw9e64QcKcCFUj9+KxUCJPy8hYofv6eVfo3U9wdhCm2E4IjvFnZ6G4/yIC4yP3f11+h6uU5b3LdS7O64LgqrA==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^10.3.3", + "walk-up-path": "^3.0.1" + }, + "engines": { + "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20" + }, "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/reusify": { @@ -2985,22 +3240,48 @@ } }, "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", "dev": true, "license": "ISC", "dependencies": { - "glob": "^7.1.3" + "glob": "^10.3.7" }, "bin": { - "rimraf": "bin.js" + "rimraf": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/router/node_modules/path-to-regexp": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -3025,60 +3306,33 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, "node_modules/semver": { "version": "7.6.3", @@ -3093,40 +3347,81 @@ "node": ">=10" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "dev": true, "license": "MIT", "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8.0" } }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "license": "MIT", "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" }, "engines": { - "node": ">= 0.4" + "node": ">= 0.8.0" } }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -3226,83 +3521,111 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "license": "MIT", + "license": "ISC", "engines": { - "node": ">=8" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/stable-hash": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.4.tgz", - "integrity": "sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==", + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">= 0.8" + } }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/strip-ansi": { + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -3315,14 +3638,14 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/strip-json-comments": { @@ -3351,36 +3674,28 @@ "node": ">=8" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "node_modules/sync-content": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-1.0.2.tgz", + "integrity": "sha512-znd3rYiiSxU3WteWyS9a6FXkTA/Wjk8WQsOyzHbineeL837dLn3DA4MRhsIX3qGcxDMH6+uuFV4axztssk7wEQ==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^10.2.6", + "mkdirp": "^3.0.1", + "path-scurry": "^1.9.2", + "rimraf": "^5.0.1" + }, + "bin": { + "sync-content": "dist/mjs/bin.mjs" + }, "engines": { - "node": ">= 0.4" + "node": ">=14" }, "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3394,30 +3709,53 @@ "node": ">=8.0" } }, - "node_modules/ts-api-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", - "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "dev": true, "license": "MIT", "engines": { - "node": ">=16" + "node": ">=0.6" + } + }, + "node_modules/tshy": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tshy/-/tshy-2.0.1.tgz", + "integrity": "sha512-U5fC+3pMaGfmULhPTVpxKMd62AcX13yfsFrjhAP/daTLG6LFRLIuxqYOmkejJ4MT/s5bEa29+1Jy/9mXkMiMfA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "chalk": "^5.3.0", + "chokidar": "^3.6.0", + "foreground-child": "^3.1.1", + "minimatch": "^9.0.4", + "mkdirp": "^3.0.1", + "polite-json": "^5.0.0", + "resolve-import": "^1.4.5", + "rimraf": "^5.0.1", + "sync-content": "^1.0.2", + "typescript": "5", + "walk-up-path": "^3.0.1" }, - "peerDependencies": { - "typescript": ">=4.2.0" + "bin": { + "tshy": "dist/esm/index.js" + }, + "engines": { + "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1" } }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "node_modules/tshy/node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "dev": true, "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/type-check": { @@ -3433,128 +3771,230 @@ "node": ">= 0.8.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, "engines": { - "node": ">=10" + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=14.17" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "node_modules/typescript-eslint": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.0.tgz", + "integrity": "sha512-UMq2kxdXCzinFFPsXc9o2ozIpYCCOiEC46MG3yEh5Vipq6BO27otTtEBZA1fQ66DulEUgE97ucQ/3YY66CPg0A==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" + "@typescript-eslint/eslint-plugin": "8.32.0", + "@typescript-eslint/parser": "8.32.0", + "@typescript-eslint/utils": "8.32.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.0.tgz", + "integrity": "sha512-/jU9ettcntkBFmWUzzGgsClEi2ZFiikMX5eEQsmxIAWMOn4H3D4rvHssstmAHGVvrYnaMqdWWWg0b5M6IN/MTQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.32.0", + "@typescript-eslint/type-utils": "8.32.0", + "@typescript-eslint/utils": "8.32.0", + "@typescript-eslint/visitor-keys": "8.32.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.0.tgz", + "integrity": "sha512-B2MdzyWxCE2+SqiZHAjPphft+/2x2FlO9YBx7eKE1BCb+rqBlQdhtAEhzIEdozHd55DXPmxBdpMygFJjfjjA9A==", "dev": true, "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" + "@typescript-eslint/scope-manager": "8.32.0", + "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/typescript-estree": "8.32.0", + "@typescript-eslint/visitor-keys": "8.32.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.0.tgz", + "integrity": "sha512-jc/4IxGNedXkmG4mx4nJTILb6TMjL66D41vyeaPWvDUmeYQzF3lKtN15WsAeTr65ce4mPxwopPSo1yUUAWw0hQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" + "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/visitor-keys": "8.32.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/typescript": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", - "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.0.tgz", + "integrity": "sha512-O5Id6tGadAZEMThM6L9HmVf5hQUXNSxLVKeGJYWNhhVseps/0LddMkp7//VDkzwJ69lPL0UmZdcZwggj9akJaA==", "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.0.tgz", + "integrity": "sha512-pU9VD7anSCOIoBFnhTGfOzlVFQIA1XXiQpH/CezqOBaDppRwTglJzCC6fUQGpfwey4T183NKhF1/mfatYmjRqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.32.0", + "@typescript-eslint/visitor-keys": "8.32.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" }, "engines": { - "node": ">=14.17" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.0.tgz", + "integrity": "sha512-1rYQTCLFFzOI5Nl0c8LUpJT8HxpwVRn9E4CkMsYfuN6ctmQqExjSTzzSk0Tz2apmXy7WU6/6fyaZVVA/thPN+w==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" + "@typescript-eslint/types": "8.32.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/typescript-eslint/node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" } }, "node_modules/uri-js": { @@ -3567,6 +4007,33 @@ "punycode": "^2.1.0" } }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/walk-up-path": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", + "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==", + "dev": true, + "license": "ISC" + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3583,102 +4050,109 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "license": "MIT", "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/which-typed-array": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", - "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/wrappy": { @@ -3702,14 +4176,24 @@ } }, "node_modules/zod": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.1.tgz", - "integrity": "sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==", + "version": "3.24.4", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", + "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } + }, + "node_modules/zod-to-json-schema": { + "version": "3.24.5", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.5.tgz", + "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", + "dev": true, + "license": "ISC", + "peerDependencies": { + "zod": "^3.24.1" + } } } } diff --git a/package.json b/package.json index 425d9889..831b607a 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,143 @@ { - "name": "firehydrant-typescript-sdk", - "version": "0.0.11", - "author": "Speakeasy", - "main": "./index.js", + "name": "firehydrant", + "version": "0.1.13", + "author": "Firehydrant", + "type": "module", + "bin": { + "mcp": "bin/mcp-server.js" + }, + "tshy": { + "sourceDialects": [ + "firehydrant/source" + ], + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json", + "./types": "./src/types/index.ts", + "./models/errors": "./src/models/errors/index.ts", + "./models/components": "./src/models/components/index.ts", + "./models/operations": "./src/models/operations/index.ts", + "./*.js": "./src/*.ts", + "./*": "./src/*.ts" + } + }, "sideEffects": false, "repository": { "type": "git", "url": "https://github.com/firehydrant/firehydrant-typescript-sdk.git" }, "scripts": { - "lint": "eslint --max-warnings=0 src", - "build": "tsc", + "lint": "eslint --cache --max-warnings=0 src", + "build:mcp": "bun src/mcp-server/build.mts", + "build": "npm run build:mcp && tshy", "prepublishOnly": "npm run build" }, "peerDependencies": { + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", "zod": ">= 3" }, + "peerDependenciesMeta": { + "@modelcontextprotocol/sdk": { + "optional": true + } + }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^7.7.1", - "@typescript-eslint/parser": "^7.7.1", - "eslint": "^8.57.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", + "@eslint/js": "^9.19.0", + "@modelcontextprotocol/sdk": ">=1.5.0 <1.10.0", + "@stricli/core": "^1.1.1", + "@types/express": "^4.17.21", + "bun": "^1.2.2", + "bun-types": "^1.2.2", + "eslint": "^9.19.0", + "express": "^4.21.2", + "globals": "^15.14.0", + "tshy": "^2.0.0", "typescript": "^5.4.5", + "typescript-eslint": "^8.22.0", "zod": "^3.23.4" }, - "dependencies": { - - } + "dependencies": {}, + "exports": { + ".": { + "import": { + "firehydrant/source": "./src/index.ts", + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./package.json": "./package.json", + "./types": { + "import": { + "firehydrant/source": "./src/types/index.ts", + "types": "./dist/esm/types/index.d.ts", + "default": "./dist/esm/types/index.js" + }, + "require": { + "types": "./dist/commonjs/types/index.d.ts", + "default": "./dist/commonjs/types/index.js" + } + }, + "./models/errors": { + "import": { + "firehydrant/source": "./src/models/errors/index.ts", + "types": "./dist/esm/models/errors/index.d.ts", + "default": "./dist/esm/models/errors/index.js" + }, + "require": { + "types": "./dist/commonjs/models/errors/index.d.ts", + "default": "./dist/commonjs/models/errors/index.js" + } + }, + "./models/components": { + "import": { + "firehydrant/source": "./src/models/components/index.ts", + "types": "./dist/esm/models/components/index.d.ts", + "default": "./dist/esm/models/components/index.js" + }, + "require": { + "types": "./dist/commonjs/models/components/index.d.ts", + "default": "./dist/commonjs/models/components/index.js" + } + }, + "./models/operations": { + "import": { + "firehydrant/source": "./src/models/operations/index.ts", + "types": "./dist/esm/models/operations/index.d.ts", + "default": "./dist/esm/models/operations/index.js" + }, + "require": { + "types": "./dist/commonjs/models/operations/index.d.ts", + "default": "./dist/commonjs/models/operations/index.js" + } + }, + "./*.js": { + "import": { + "firehydrant/source": "./src/*.ts", + "types": "./dist/esm/*.d.ts", + "default": "./dist/esm/*.js" + }, + "require": { + "types": "./dist/commonjs/*.d.ts", + "default": "./dist/commonjs/*.js" + } + }, + "./*": { + "import": { + "firehydrant/source": "./src/*.ts", + "types": "./dist/esm/*.d.ts", + "default": "./dist/esm/*.js" + }, + "require": { + "types": "./dist/commonjs/*.d.ts", + "default": "./dist/commonjs/*.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" } diff --git a/src/core.ts b/src/core.ts index 8311a35e..90aa75d1 100644 --- a/src/core.ts +++ b/src/core.ts @@ -10,4 +10,4 @@ import { ClientSDK } from "./lib/sdks.js"; * application and passed around through some dependency injection mechanism to * parts of an application that need to make SDK calls. */ -export class FirehydrantTypescriptSDKCore extends ClientSDK {} +export class FirehydrantCore extends ClientSDK {} diff --git a/src/funcs/accountSettingsDeleteSavedSearch.ts b/src/funcs/accountSettingsDeleteSavedSearch.ts deleted file mode 100644 index 339785c7..00000000 --- a/src/funcs/accountSettingsDeleteSavedSearch.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a saved search - * - * @remarks - * Delete a specific saved search - */ -export async function accountSettingsDeleteSavedSearch( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteSavedSearchRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteSavedSearchRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - resource_type: encodeSimple("resource_type", payload.resource_type, { - explode: false, - charEncoding: "percent", - }), - saved_search_id: encodeSimple("saved_search_id", payload.saved_search_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/saved_searches/{resource_type}/{saved_search_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteSavedSearch", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/accountSettingsGetAiPreferences.ts b/src/funcs/accountSettingsGetAiPreferences.ts index 856aa4de..49ac870e 100644 --- a/src/funcs/accountSettingsGetAiPreferences.ts +++ b/src/funcs/accountSettingsGetAiPreferences.ts @@ -2,8 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -16,8 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -26,18 +27,12 @@ import { Result } from "../types/fp.js"; * @remarks * Retrieves the current AI preferences */ -export async function accountSettingsGetAiPreferences( - client: FirehydrantTypescriptSDKCore, +export function accountSettingsGetAiPreferences( + client: FirehydrantCore, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.AIEntitiesPreferencesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -46,19 +41,44 @@ export async function accountSettingsGetAiPreferences( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.AIEntitiesPreferencesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const path = pathToFunc("/v1/ai/preferences")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getAiPreferences", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_ai_preferences", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -79,59 +99,23 @@ export async function accountSettingsGetAiPreferences( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.AIEntitiesPreferencesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -141,23 +125,12 @@ export async function accountSettingsGetAiPreferences( | ConnectionError >( M.json(200, components.AIEntitiesPreferencesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/accountSettingsGetBootstrap.ts b/src/funcs/accountSettingsGetBootstrap.ts index 6072982b..cbff1a35 100644 --- a/src/funcs/accountSettingsGetBootstrap.ts +++ b/src/funcs/accountSettingsGetBootstrap.ts @@ -2,12 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -16,25 +17,22 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Get initial application configuration and settings + * Get initial application configuration + * + * @remarks + * Get initial application configuration */ -export async function accountSettingsGetBootstrap( - client: FirehydrantTypescriptSDKCore, +export function accountSettingsGetBootstrap( + client: FirehydrantCore, options?: RequestOptions, -): Promise< +): APIPromise< Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.PublicApiv1BootstrapEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -43,19 +41,44 @@ export async function accountSettingsGetBootstrap( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.PublicApiv1BootstrapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const path = pathToFunc("/v1/bootstrap")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getBootstrap", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_bootstrap", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -76,59 +99,23 @@ export async function accountSettingsGetBootstrap( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.PublicApiv1BootstrapEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -137,24 +124,13 @@ export async function accountSettingsGetBootstrap( | RequestTimeoutError | ConnectionError >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(200, components.PublicApiv1BootstrapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/accountSettingsGetSavedSearch.ts b/src/funcs/accountSettingsGetSavedSearch.ts deleted file mode 100644 index 68a02ce6..00000000 --- a/src/funcs/accountSettingsGetSavedSearch.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a saved search - * - * @remarks - * Retrieve a specific save search - */ -export async function accountSettingsGetSavedSearch( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSavedSearchRequest, - options?: RequestOptions, -): Promise< - Result< - components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetSavedSearchRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - resource_type: encodeSimple("resource_type", payload.resource_type, { - explode: false, - charEncoding: "percent", - }), - saved_search_id: encodeSimple("saved_search_id", payload.saved_search_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/saved_searches/{resource_type}/{saved_search_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSavedSearch", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.SavedSearchEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/accountSettingsListEntitlements.ts b/src/funcs/accountSettingsListEntitlements.ts index a308664a..ee563b5e 100644 --- a/src/funcs/accountSettingsListEntitlements.ts +++ b/src/funcs/accountSettingsListEntitlements.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * List entitlements * * @remarks - * Retrieve all entitlements + * List the organization's entitlements */ -export async function accountSettingsListEntitlements( - client: FirehydrantTypescriptSDKCore, +export function accountSettingsListEntitlements( + client: FirehydrantCore, request: operations.ListEntitlementsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.EntitlementEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function accountSettingsListEntitlements( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListEntitlementsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EntitlementEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function accountSettingsListEntitlements( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,16 +90,17 @@ export async function accountSettingsListEntitlements( "type": payload.type, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listEntitlements", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_entitlements", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -101,59 +123,23 @@ export async function accountSettingsListEntitlements( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.EntitlementEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -163,23 +149,12 @@ export async function accountSettingsListEntitlements( | ConnectionError >( M.json(200, components.EntitlementEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/accountSettingsPing.ts b/src/funcs/accountSettingsPing.ts index 0c9f7f10..0b2f94c2 100644 --- a/src/funcs/accountSettingsPing.ts +++ b/src/funcs/accountSettingsPing.ts @@ -2,8 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -16,8 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -26,18 +27,12 @@ import { Result } from "../types/fp.js"; * @remarks * Simple endpoint to verify your API connection is working */ -export async function accountSettingsPing( - client: FirehydrantTypescriptSDKCore, +export function accountSettingsPing( + client: FirehydrantCore, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.PongEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -47,18 +42,43 @@ export async function accountSettingsPing( | ConnectionError > > { - const path = pathToFunc("/v1/noauth/ping")(); + return new APIPromise($do( + client, + options, + )); +} - const headers = new Headers({ +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.PongEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/ping")(); + + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "apiPingNoAuth", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "ping", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -79,59 +99,23 @@ export async function accountSettingsPing( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.PongEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -141,23 +125,12 @@ export async function accountSettingsPing( | ConnectionError >( M.json(200, components.PongEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/accountSettingsPingNoauth.ts b/src/funcs/accountSettingsPingNoauth.ts new file mode 100644 index 00000000..26066bf3 --- /dev/null +++ b/src/funcs/accountSettingsPingNoauth.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Check API connectivity + * + * @remarks + * Simple endpoint to verify your API connection is working + */ +export function accountSettingsPingNoauth( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.PongEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.PongEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/noauth/ping")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "ping_noauth", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PongEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PongEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/accountSettingsUpdateAiPreferences.ts b/src/funcs/accountSettingsUpdateAiPreferences.ts index bb5c0f73..90ed7959 100644 --- a/src/funcs/accountSettingsUpdateAiPreferences.ts +++ b/src/funcs/accountSettingsUpdateAiPreferences.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Updates the AI preferences */ -export async function accountSettingsUpdateAiPreferences( - client: FirehydrantTypescriptSDKCore, - request?: operations.UpdateAiPreferencesRequestBody | undefined, +export function accountSettingsUpdateAiPreferences( + client: FirehydrantCore, + request?: operations.UpdateAiPreferencesRequest | undefined, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.AIEntitiesPreferencesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,17 +45,43 @@ export async function accountSettingsUpdateAiPreferences( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request?: operations.UpdateAiPreferencesRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + components.AIEntitiesPreferencesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, (value) => - operations.UpdateAiPreferencesRequestBody$outboundSchema.optional().parse( + operations.UpdateAiPreferencesRequest$outboundSchema.optional().parse( value, ), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = payload === undefined @@ -69,17 +90,18 @@ export async function accountSettingsUpdateAiPreferences( const path = pathToFunc("/v1/ai/preferences")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateAiPreferences", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_ai_preferences", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -101,59 +123,23 @@ export async function accountSettingsUpdateAiPreferences( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.AIEntitiesPreferencesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -163,23 +149,12 @@ export async function accountSettingsUpdateAiPreferences( | ConnectionError >( M.json(200, components.AIEntitiesPreferencesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/accountSettingsUpdateSavedSearch.ts b/src/funcs/accountSettingsUpdateSavedSearch.ts deleted file mode 100644 index d304a121..00000000 --- a/src/funcs/accountSettingsUpdateSavedSearch.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a saved search - * - * @remarks - * Update a specific saved search - */ -export async function accountSettingsUpdateSavedSearch( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateSavedSearchRequest, - options?: RequestOptions, -): Promise< - Result< - components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateSavedSearchRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1SavedSearchesResourceTypeSavedSearchId, - { explode: true }, - ); - - const pathParams = { - resource_type: encodeSimple("resource_type", payload.resource_type, { - explode: false, - charEncoding: "percent", - }), - saved_search_id: encodeSimple("saved_search_id", payload.saved_search_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/saved_searches/{resource_type}/{saved_search_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateSavedSearch", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.SavedSearchEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/accountSettingsVoteOnIncidentSummary.ts b/src/funcs/accountSettingsVoteOnIncidentSummary.ts deleted file mode 100644 index 2b3fe13f..00000000 --- a/src/funcs/accountSettingsVoteOnIncidentSummary.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Vote on an AI-generated incident summary - */ -export async function accountSettingsVoteOnIncidentSummary( - client: FirehydrantTypescriptSDKCore, - request: operations.VoteOnIncidentSummaryRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.VoteOnIncidentSummaryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - generated_summary_id: encodeSimple( - "generated_summary_id", - payload.generated_summary_id, - { explode: false, charEncoding: "percent" }, - ), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/ai/summarize_incident/{incident_id}/{generated_summary_id}/vote", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "voteOnIncidentSummary", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/alertsCreate.ts b/src/funcs/alertsCreate.ts deleted file mode 100644 index ab2dc0b3..00000000 --- a/src/funcs/alertsCreate.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Attach alerts to an incident - * - * @remarks - * Add an alert to an incident. FireHydrant needs to have ingested the alert from a third party system in order to attach it to the incident. - */ -export async function alertsCreate( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentAlertsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentAlertsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/alerts")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentAlerts", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/alertsCreateIncidentAlert.ts b/src/funcs/alertsCreateIncidentAlert.ts new file mode 100644 index 00000000..a84088c6 --- /dev/null +++ b/src/funcs/alertsCreateIncidentAlert.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Attach an alert to an incident + * + * @remarks + * Add an alert to an incident. FireHydrant needs to have ingested the alert from a third party system in order to attach it to the incident. + */ +export function alertsCreateIncidentAlert( + client: FirehydrantCore, + request: operations.CreateIncidentAlertRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentAlertRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentAlertRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/alerts")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_alert", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/alertsDeleteIncidentAlert.ts b/src/funcs/alertsDeleteIncidentAlert.ts new file mode 100644 index 00000000..4f85a020 --- /dev/null +++ b/src/funcs/alertsDeleteIncidentAlert.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove an alert from an incident + * + * @remarks + * Remove an alert from an incident + */ +export function alertsDeleteIncidentAlert( + client: FirehydrantCore, + request: operations.DeleteIncidentAlertRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentAlertRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentAlertRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_alert_id: encodeSimple( + "incident_alert_id", + payload.incident_alert_id, + { explode: false, charEncoding: "percent" }, + ), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/alerts/{incident_alert_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_alert", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/alertsGet.ts b/src/funcs/alertsGet.ts deleted file mode 100644 index 4370d84a..00000000 --- a/src/funcs/alertsGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an alert - * - * @remarks - * Retrieve a single alert - */ -export async function alertsGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetAlertRequest, - options?: RequestOptions, -): Promise< - Result< - components.AlertsAlertEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetAlertRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - alert_id: encodeSimple("alert_id", payload.alert_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/alerts/{alert_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getAlert", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.AlertsAlertEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.AlertsAlertEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/alertsGetAlert.ts b/src/funcs/alertsGetAlert.ts new file mode 100644 index 00000000..1ed69209 --- /dev/null +++ b/src/funcs/alertsGetAlert.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an alert + * + * @remarks + * Retrieve a single alert + */ +export function alertsGetAlert( + client: FirehydrantCore, + request: operations.GetAlertRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AlertsAlertEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetAlertRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AlertsAlertEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAlertRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + alert_id: encodeSimple("alert_id", payload.alert_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/alerts/{alert_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_alert", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AlertsAlertEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AlertsAlertEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/alertsList.ts b/src/funcs/alertsList.ts deleted file mode 100644 index 0d6f1219..00000000 --- a/src/funcs/alertsList.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List alerts - * - * @remarks - * Retrieve all alerts from third parties - */ -export async function alertsList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListAlertsRequest, - options?: RequestOptions, -): Promise< - Result< - components.AlertsAlertEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListAlertsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/alerts")(); - - const query = encodeFormQuery({ - "environments": payload.environments, - "functionalities": payload.functionalities, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - "services": payload.services, - "signal_rules": payload.signal_rules, - "statuses": payload.statuses, - "tag_match_strategy": payload.tag_match_strategy, - "tags": payload.tags, - "teams": payload.teams, - "users": payload.users, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listAlerts", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.AlertsAlertEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.AlertsAlertEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/alertsListAlerts.ts b/src/funcs/alertsListAlerts.ts new file mode 100644 index 00000000..61e96e62 --- /dev/null +++ b/src/funcs/alertsListAlerts.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List alerts + * + * @remarks + * Retrieve all alerts from third parties + */ +export function alertsListAlerts( + client: FirehydrantCore, + request: operations.ListAlertsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AlertsAlertEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAlertsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AlertsAlertEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListAlertsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/alerts")(); + + const query = encodeFormQuery({ + "environments": payload.environments, + "functionalities": payload.functionalities, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + "services": payload.services, + "signal_rules": payload.signal_rules, + "statuses": payload.statuses, + "tag_match_strategy": payload.tag_match_strategy, + "tags": payload.tags, + "teams": payload.teams, + "users": payload.users, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_alerts", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AlertsAlertEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AlertsAlertEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/alertsListForIncident.ts b/src/funcs/alertsListForIncident.ts deleted file mode 100644 index 2c63adb6..00000000 --- a/src/funcs/alertsListForIncident.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List alerts for an incident - * - * @remarks - * List alerts that have been attached to an incident - */ -export async function alertsListForIncident( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentAlertsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsAlertEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListIncidentAlertsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/alerts")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentAlerts", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsAlertEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsAlertEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/alertsListIncidentAlerts.ts b/src/funcs/alertsListIncidentAlerts.ts new file mode 100644 index 00000000..8a31b5e9 --- /dev/null +++ b/src/funcs/alertsListIncidentAlerts.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List alerts for an incident + * + * @remarks + * List alerts that have been attached to an incident + */ +export function alertsListIncidentAlerts( + client: FirehydrantCore, + request: operations.ListIncidentAlertsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsAlertEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentAlertsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsAlertEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListIncidentAlertsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/alerts")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_alerts", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsAlertEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsAlertEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/alertsListProcessingLogEntries.ts b/src/funcs/alertsListProcessingLogEntries.ts new file mode 100644 index 00000000..bb4f5dfa --- /dev/null +++ b/src/funcs/alertsListProcessingLogEntries.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List alert processing log entries + * + * @remarks + * Processing Log Entries for a specific alert + */ +export function alertsListProcessingLogEntries( + client: FirehydrantCore, + request: operations.ListProcessingLogEntriesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AlertsProcessingLogEntryEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListProcessingLogEntriesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AlertsProcessingLogEntryEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListProcessingLogEntriesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/processing_log_entries")(); + + const query = encodeFormQuery({ + "connection_id": payload.connection_id, + "exact_level": payload.exact_level, + "integration_slug": payload.integration_slug, + "of_level": payload.of_level, + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_processing_log_entries", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AlertsProcessingLogEntryEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.AlertsProcessingLogEntryEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/alertsListProcessingLogs.ts b/src/funcs/alertsListProcessingLogs.ts deleted file mode 100644 index 456cf3b8..00000000 --- a/src/funcs/alertsListProcessingLogs.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List alert processing log entries - * - * @remarks - * Processing Log Entries for a specific alert - */ -export async function alertsListProcessingLogs( - client: FirehydrantTypescriptSDKCore, - request: operations.ListAlertProcessingLogsRequest, - options?: RequestOptions, -): Promise< - Result< - components.AlertsProcessingLogEntryEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListAlertProcessingLogsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/processing_log_entries")(); - - const query = encodeFormQuery({ - "connection_id": payload.connection_id, - "exact_level": payload.exact_level, - "integration_slug": payload.integration_slug, - "of_level": payload.of_level, - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listAlertProcessingLogs", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.AlertsProcessingLogEntryEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.AlertsProcessingLogEntryEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/alertsUpdateIncidentAlertPrimary.ts b/src/funcs/alertsUpdateIncidentAlertPrimary.ts new file mode 100644 index 00000000..d7e7c483 --- /dev/null +++ b/src/funcs/alertsUpdateIncidentAlertPrimary.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Set an alert as primary for an incident + * + * @remarks + * Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. + */ +export function alertsUpdateIncidentAlertPrimary( + client: FirehydrantCore, + request: operations.UpdateIncidentAlertPrimaryRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsAlertEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentAlertPrimaryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsAlertEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentAlertPrimaryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_alert_primary, { + explode: true, + }); + + const pathParams = { + incident_alert_id: encodeSimple( + "incident_alert_id", + payload.incident_alert_id, + { explode: false, charEncoding: "percent" }, + ), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/alerts/{incident_alert_id}/primary", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_alert_primary", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsAlertEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsAlertEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesArchiveAudience.ts b/src/funcs/audiencesArchiveAudience.ts new file mode 100644 index 00000000..2d43bc4a --- /dev/null +++ b/src/funcs/audiencesArchiveAudience.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive audience + * + * @remarks + * Archive an audience + */ +export function audiencesArchiveAudience( + client: FirehydrantCore, + request: operations.ArchiveAudienceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ArchiveAudienceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ArchiveAudienceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + audience_id: encodeSimple("audience_id", payload.audience_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/audiences/{audience_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "archive_audience", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesCreateAudience.ts b/src/funcs/audiencesCreateAudience.ts new file mode 100644 index 00000000..6bdb6849 --- /dev/null +++ b/src/funcs/audiencesCreateAudience.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create audience + * + * @remarks + * Create a new audience + */ +export function audiencesCreateAudience( + client: FirehydrantCore, + request: operations.CreateAudienceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateAudienceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateAudienceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/audiences")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_audience", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesGenerateAudienceSummary.ts b/src/funcs/audiencesGenerateAudienceSummary.ts new file mode 100644 index 00000000..f4d5120d --- /dev/null +++ b/src/funcs/audiencesGenerateAudienceSummary.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Generate summary + * + * @remarks + * Generate a new audience-specific summary for an incident + */ +export function audiencesGenerateAudienceSummary( + client: FirehydrantCore, + request: operations.GenerateAudienceSummaryRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GenerateAudienceSummaryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GenerateAudienceSummaryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + audience_id: encodeSimple("audience_id", payload.audience_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/audiences/{audience_id}/summaries/{incident_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "generate_audience_summary", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.AIEntitiesIncidentSummaryEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesGetAudience.ts b/src/funcs/audiencesGetAudience.ts new file mode 100644 index 00000000..c892aeee --- /dev/null +++ b/src/funcs/audiencesGetAudience.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get audience + * + * @remarks + * Get audience details + */ +export function audiencesGetAudience( + client: FirehydrantCore, + request: operations.GetAudienceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetAudienceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAudienceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + audience_id: encodeSimple("audience_id", payload.audience_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/audiences/{audience_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_audience", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesGetAudienceSummary.ts b/src/funcs/audiencesGetAudienceSummary.ts new file mode 100644 index 00000000..d97118b2 --- /dev/null +++ b/src/funcs/audiencesGetAudienceSummary.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get latest summary + * + * @remarks + * Get the latest audience-specific summary for an incident + */ +export function audiencesGetAudienceSummary( + client: FirehydrantCore, + request: operations.GetAudienceSummaryRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetAudienceSummaryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAudienceSummaryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + audience_id: encodeSimple("audience_id", payload.audience_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/audiences/{audience_id}/summaries/{incident_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_audience_summary", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AIEntitiesIncidentSummaryEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesGetMemberDefaultAudience.ts b/src/funcs/audiencesGetMemberDefaultAudience.ts new file mode 100644 index 00000000..68413285 --- /dev/null +++ b/src/funcs/audiencesGetMemberDefaultAudience.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get default audience + * + * @remarks + * Get member's default audience + */ +export function audiencesGetMemberDefaultAudience( + client: FirehydrantCore, + request: operations.GetMemberDefaultAudienceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetMemberDefaultAudienceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetMemberDefaultAudienceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + member_id: encodeSimple("member_id", payload.member_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/audiences/member/{member_id}/default")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_member_default_audience", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesListAudienceSummaries.ts b/src/funcs/audiencesListAudienceSummaries.ts new file mode 100644 index 00000000..d8986f51 --- /dev/null +++ b/src/funcs/audiencesListAudienceSummaries.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List audience summaries + * + * @remarks + * List all audience summaries for an incident + */ +export function audiencesListAudienceSummaries( + client: FirehydrantCore, + request: operations.ListAudienceSummariesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceSummariesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAudienceSummariesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceSummariesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListAudienceSummariesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/audiences/summaries/{incident_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_audience_summaries", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceSummariesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.AudiencesEntitiesAudienceSummariesEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesListAudiences.ts b/src/funcs/audiencesListAudiences.ts new file mode 100644 index 00000000..aa694286 --- /dev/null +++ b/src/funcs/audiencesListAudiences.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List audiences + * + * @remarks + * List all audiences + */ +export function audiencesListAudiences( + client: FirehydrantCore, + request: operations.ListAudiencesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAudiencesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListAudiencesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/audiences")(); + + const query = encodeFormQuery({ + "include_archived": payload.include_archived, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_audiences", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesRestoreAudience.ts b/src/funcs/audiencesRestoreAudience.ts new file mode 100644 index 00000000..49a522f2 --- /dev/null +++ b/src/funcs/audiencesRestoreAudience.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Restore audience + * + * @remarks + * Restore a previously archived audience + */ +export function audiencesRestoreAudience( + client: FirehydrantCore, + request: operations.RestoreAudienceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.RestoreAudienceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RestoreAudienceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + audience_id: encodeSimple("audience_id", payload.audience_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/audiences/{audience_id}/restore")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "restore_audience", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesSetMemberDefaultAudience.ts b/src/funcs/audiencesSetMemberDefaultAudience.ts new file mode 100644 index 00000000..fed3ee39 --- /dev/null +++ b/src/funcs/audiencesSetMemberDefaultAudience.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Set default audience + * + * @remarks + * Set member's default audience + */ +export function audiencesSetMemberDefaultAudience( + client: FirehydrantCore, + request: operations.SetMemberDefaultAudienceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.SetMemberDefaultAudienceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SetMemberDefaultAudienceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + member_id: encodeSimple("member_id", payload.member_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/audiences/member/{member_id}/default")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "set_member_default_audience", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/audiencesUpdateAudience.ts b/src/funcs/audiencesUpdateAudience.ts new file mode 100644 index 00000000..7c27d3d0 --- /dev/null +++ b/src/funcs/audiencesUpdateAudience.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update audience + * + * @remarks + * Update an existing audience + */ +export function audiencesUpdateAudience( + client: FirehydrantCore, + request: operations.UpdateAudienceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateAudienceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateAudienceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + audience_id: encodeSimple("audience_id", payload.audience_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/audiences/{audience_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_audience", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AudiencesEntitiesAudienceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AudiencesEntitiesAudienceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/awsCloudtrailBatchEventsList.ts b/src/funcs/awsCloudtrailBatchEventsList.ts deleted file mode 100644 index 3233cb9b..00000000 --- a/src/funcs/awsCloudtrailBatchEventsList.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List events for an AWS CloudTrail batch - */ -export async function awsCloudtrailBatchEventsList( - client: FirehydrantTypescriptSDKCore, - request: operations.GetAwsCloudtrailBatchEventsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetAwsCloudtrailBatchEventsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/aws/cloudtrail_batches/{id}/events", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getAwsCloudtrailBatchEvents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/awsConnectionsGet.ts b/src/funcs/awsConnectionsGet.ts deleted file mode 100644 index ca015300..00000000 --- a/src/funcs/awsConnectionsGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an AWS connection - * - * @remarks - * Retrieves the information about the AWS connection. - */ -export async function awsConnectionsGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetAwsConnectionRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsAwsConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetAwsConnectionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/integrations/aws/connections/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getAwsConnection", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsAwsConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IntegrationsAwsConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/awsConnectionsList.ts b/src/funcs/awsConnectionsList.ts deleted file mode 100644 index fcdf02ff..00000000 --- a/src/funcs/awsConnectionsList.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List AWS integration connections - * - * @remarks - * Lists the available and configured AWS integration connections for the authenticated organization. - */ -export async function awsConnectionsList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListAwsConnectionsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsAwsConnectionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListAwsConnectionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/integrations/aws/connections")(); - - const query = encodeFormQuery({ - "aws_account_id": payload.aws_account_id, - "external_id": payload.external_id, - "page": payload.page, - "per_page": payload.per_page, - "target_arn": payload.target_arn, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listAwsConnections", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsAwsConnectionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.IntegrationsAwsConnectionEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/callRoutesListCallRoutes.ts b/src/funcs/callRoutesListCallRoutes.ts new file mode 100644 index 00000000..5ab3aa02 --- /dev/null +++ b/src/funcs/callRoutesListCallRoutes.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List call routes + * + * @remarks + * List call routes for the organization + */ +export function callRoutesListCallRoutes( + client: FirehydrantCore, + request: operations.ListCallRoutesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListCallRoutesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListCallRoutesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/call_routes")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_call_routes", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesCreateEnvironment.ts b/src/funcs/catalogEntriesCreateEnvironment.ts new file mode 100644 index 00000000..4e4101c1 --- /dev/null +++ b/src/funcs/catalogEntriesCreateEnvironment.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create an environment + * + * @remarks + * Creates an environment for the organization + */ +export function catalogEntriesCreateEnvironment( + client: FirehydrantCore, + request: components.CreateEnvironment, + options?: RequestOptions, +): APIPromise< + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateEnvironment, + options?: RequestOptions, +): Promise< + [ + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateEnvironment$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/environments")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_environment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.EnvironmentEntryEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesCreateFunctionality.ts b/src/funcs/catalogEntriesCreateFunctionality.ts new file mode 100644 index 00000000..f2c574a5 --- /dev/null +++ b/src/funcs/catalogEntriesCreateFunctionality.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a functionality + * + * @remarks + * Creates a functionality for the organization + */ +export function catalogEntriesCreateFunctionality( + client: FirehydrantCore, + request: components.CreateFunctionality, + options?: RequestOptions, +): APIPromise< + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateFunctionality, + options?: RequestOptions, +): Promise< + [ + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateFunctionality$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/functionalities")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_functionality", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.FunctionalityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesCreateService.ts b/src/funcs/catalogEntriesCreateService.ts new file mode 100644 index 00000000..d625a636 --- /dev/null +++ b/src/funcs/catalogEntriesCreateService.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a service + * + * @remarks + * Creates a service for the organization, you may also create or attach functionalities to the service on create. + */ +export function catalogEntriesCreateService( + client: FirehydrantCore, + request: components.CreateService, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateService, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateService$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/services")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_service", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.ServiceEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.ServiceEntity$inboundSchema), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesCreateServiceChecklistResponse.ts b/src/funcs/catalogEntriesCreateServiceChecklistResponse.ts new file mode 100644 index 00000000..08ca853d --- /dev/null +++ b/src/funcs/catalogEntriesCreateServiceChecklistResponse.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Record a response for a checklist item + * + * @remarks + * Creates a response for a checklist item + */ +export function catalogEntriesCreateServiceChecklistResponse( + client: FirehydrantCore, + request: operations.CreateServiceChecklistResponseRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateServiceChecklistResponseRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateServiceChecklistResponseRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_service_checklist_response, { + explode: true, + }); + + const pathParams = { + checklist_id: encodeSimple("checklist_id", payload.checklist_id, { + explode: false, + charEncoding: "percent", + }), + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/services/{service_id}/checklist_response/{checklist_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_service_checklist_response", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesCreateServiceDependency.ts b/src/funcs/catalogEntriesCreateServiceDependency.ts new file mode 100644 index 00000000..c6a975bf --- /dev/null +++ b/src/funcs/catalogEntriesCreateServiceDependency.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a service dependency + * + * @remarks + * Creates a service dependency relationship between two services + */ +export function catalogEntriesCreateServiceDependency( + client: FirehydrantCore, + request: components.CreateServiceDependency, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateServiceDependency, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateServiceDependency$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/service_dependencies")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_service_dependency", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.ServiceDependencyEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesCreateServiceLinks.ts b/src/funcs/catalogEntriesCreateServiceLinks.ts new file mode 100644 index 00000000..537f76fd --- /dev/null +++ b/src/funcs/catalogEntriesCreateServiceLinks.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create multiple services linked to external services + * + * @remarks + * Creates a service with the appropriate integration for each external service ID passed + */ +export function catalogEntriesCreateServiceLinks( + client: FirehydrantCore, + request: components.CreateServiceLinks, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateServiceLinks, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateServiceLinks$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/services/service_links")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_service_links", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, z.array(components.ServiceLinkEntity$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesDeleteEnvironment.ts b/src/funcs/catalogEntriesDeleteEnvironment.ts new file mode 100644 index 00000000..1f2c0f11 --- /dev/null +++ b/src/funcs/catalogEntriesDeleteEnvironment.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive an environment + * + * @remarks + * Archive an environment + */ +export function catalogEntriesDeleteEnvironment( + client: FirehydrantCore, + request: operations.DeleteEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + environment_id: encodeSimple("environment_id", payload.environment_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/environments/{environment_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_environment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.EnvironmentEntryEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesDeleteFunctionality.ts b/src/funcs/catalogEntriesDeleteFunctionality.ts new file mode 100644 index 00000000..fa9ae0bb --- /dev/null +++ b/src/funcs/catalogEntriesDeleteFunctionality.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive a functionality + * + * @remarks + * Archive a functionality + */ +export function catalogEntriesDeleteFunctionality( + client: FirehydrantCore, + request: operations.DeleteFunctionalityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteFunctionalityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteFunctionalityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + functionality_id: encodeSimple( + "functionality_id", + payload.functionality_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/functionalities/{functionality_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_functionality", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.FunctionalityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesDeleteService.ts b/src/funcs/catalogEntriesDeleteService.ts new file mode 100644 index 00000000..53ddfa40 --- /dev/null +++ b/src/funcs/catalogEntriesDeleteService.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a service + * + * @remarks + * Deletes the service from FireHydrant. + */ +export function catalogEntriesDeleteService( + client: FirehydrantCore, + request: operations.DeleteServiceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteServiceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteServiceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/services/{service_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_service", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesDeleteServiceDependency.ts b/src/funcs/catalogEntriesDeleteServiceDependency.ts new file mode 100644 index 00000000..b148dd36 --- /dev/null +++ b/src/funcs/catalogEntriesDeleteServiceDependency.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a service dependency + * + * @remarks + * Deletes a single service dependency + */ +export function catalogEntriesDeleteServiceDependency( + client: FirehydrantCore, + request: operations.DeleteServiceDependencyRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteServiceDependencyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteServiceDependencyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + service_dependency_id: encodeSimple( + "service_dependency_id", + payload.service_dependency_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/service_dependencies/{service_dependency_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_service_dependency", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceDependencyEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesDeleteServiceLink.ts b/src/funcs/catalogEntriesDeleteServiceLink.ts new file mode 100644 index 00000000..b9234d17 --- /dev/null +++ b/src/funcs/catalogEntriesDeleteServiceLink.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a service link + * + * @remarks + * Deletes a service link from FireHydrant. + */ +export function catalogEntriesDeleteServiceLink( + client: FirehydrantCore, + request: operations.DeleteServiceLinkRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteServiceLinkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteServiceLinkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + remote_id: encodeSimple("remote_id", payload.remote_id, { + explode: false, + charEncoding: "percent", + }), + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/services/{service_id}/service_links/{remote_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_service_link", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesGetEnvironment.ts b/src/funcs/catalogEntriesGetEnvironment.ts new file mode 100644 index 00000000..2d98d9bd --- /dev/null +++ b/src/funcs/catalogEntriesGetEnvironment.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an environment + * + * @remarks + * Retrieves a single environment by ID + */ +export function catalogEntriesGetEnvironment( + client: FirehydrantCore, + request: operations.GetEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + environment_id: encodeSimple("environment_id", payload.environment_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/environments/{environment_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_environment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.EnvironmentEntryEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesGetFunctionality.ts b/src/funcs/catalogEntriesGetFunctionality.ts new file mode 100644 index 00000000..e161117c --- /dev/null +++ b/src/funcs/catalogEntriesGetFunctionality.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a functionality + * + * @remarks + * Retrieves a single functionality by ID + */ +export function catalogEntriesGetFunctionality( + client: FirehydrantCore, + request: operations.GetFunctionalityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetFunctionalityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetFunctionalityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + functionality_id: encodeSimple( + "functionality_id", + payload.functionality_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/functionalities/{functionality_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_functionality", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.FunctionalityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesGetService.ts b/src/funcs/catalogEntriesGetService.ts new file mode 100644 index 00000000..e782b35e --- /dev/null +++ b/src/funcs/catalogEntriesGetService.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a service + * + * @remarks + * Retrieves a single service by ID + */ +export function catalogEntriesGetService( + client: FirehydrantCore, + request: operations.GetServiceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetServiceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetServiceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/services/{service_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_service", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesGetServiceDependencies.ts b/src/funcs/catalogEntriesGetServiceDependencies.ts new file mode 100644 index 00000000..17841e39 --- /dev/null +++ b/src/funcs/catalogEntriesGetServiceDependencies.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List dependencies for a service + * + * @remarks + * Retrieves a service's dependencies + */ +export function catalogEntriesGetServiceDependencies( + client: FirehydrantCore, + request: operations.GetServiceDependenciesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceWithAllDependenciesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetServiceDependenciesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceWithAllDependenciesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetServiceDependenciesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/services/{service_id}/dependencies")(pathParams); + + const query = encodeFormQuery({ + "flatten": payload.flatten, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_service_dependencies", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceWithAllDependenciesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceWithAllDependenciesEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesGetServiceDependency.ts b/src/funcs/catalogEntriesGetServiceDependency.ts new file mode 100644 index 00000000..b72e155a --- /dev/null +++ b/src/funcs/catalogEntriesGetServiceDependency.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a service dependency + * + * @remarks + * Retrieves a single service dependency by ID + */ +export function catalogEntriesGetServiceDependency( + client: FirehydrantCore, + request: operations.GetServiceDependencyRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetServiceDependencyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetServiceDependencyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + service_dependency_id: encodeSimple( + "service_dependency_id", + payload.service_dependency_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/service_dependencies/{service_dependency_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_service_dependency", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceDependencyEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesIngestCatalogData.ts b/src/funcs/catalogEntriesIngestCatalogData.ts new file mode 100644 index 00000000..7fd56086 --- /dev/null +++ b/src/funcs/catalogEntriesIngestCatalogData.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Ingest service catalog data + * + * @remarks + * Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. + */ +export function catalogEntriesIngestCatalogData( + client: FirehydrantCore, + request: operations.IngestCatalogDataRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ImportsImportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.IngestCatalogDataRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ImportsImportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.IngestCatalogDataRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.ingest_catalog_data, { + explode: true, + }); + + const pathParams = { + catalog_id: encodeSimple("catalog_id", payload.catalog_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/catalogs/{catalog_id}/ingest")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "ingest_catalog_data", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ImportsImportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.ImportsImportEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListEnvironments.ts b/src/funcs/catalogEntriesListEnvironments.ts new file mode 100644 index 00000000..30ee657c --- /dev/null +++ b/src/funcs/catalogEntriesListEnvironments.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List environments + * + * @remarks + * List all of the environments that have been added to the organiation + */ +export function catalogEntriesListEnvironments( + client: FirehydrantCore, + request: operations.ListEnvironmentsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EnvironmentEntryEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListEnvironmentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EnvironmentEntryEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListEnvironmentsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/environments")(); + + const query = encodeFormQuery({ + "name": payload.name, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_environments", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EnvironmentEntryEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.EnvironmentEntryEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListFunctionalities.ts b/src/funcs/catalogEntriesListFunctionalities.ts new file mode 100644 index 00000000..25cab385 --- /dev/null +++ b/src/funcs/catalogEntriesListFunctionalities.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List functionalities + * + * @remarks + * List all of the functionalities that have been added to the organiation + */ +export function catalogEntriesListFunctionalities( + client: FirehydrantCore, + request: operations.ListFunctionalitiesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.FunctionalityEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListFunctionalitiesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FunctionalityEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListFunctionalitiesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/functionalities")(); + + const query = encodeFormQuery({ + "impacted": payload.impacted, + "labels": payload.labels, + "lite": payload.lite, + "name": payload.name, + "owner": payload.owner, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_functionalities", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.FunctionalityEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.FunctionalityEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListFunctionalityServices.ts b/src/funcs/catalogEntriesListFunctionalityServices.ts new file mode 100644 index 00000000..17b9017c --- /dev/null +++ b/src/funcs/catalogEntriesListFunctionalityServices.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List services for a functionality + * + * @remarks + * List services for a functionality + */ +export function catalogEntriesListFunctionalityServices( + client: FirehydrantCore, + request: operations.ListFunctionalityServicesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.FunctionalityWithAllServicesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListFunctionalityServicesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FunctionalityWithAllServicesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListFunctionalityServicesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + functionality_id: encodeSimple( + "functionality_id", + payload.functionality_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/functionalities/{functionality_id}/services")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_functionality_services", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.FunctionalityWithAllServicesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.FunctionalityWithAllServicesEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListInfrastructures.ts b/src/funcs/catalogEntriesListInfrastructures.ts new file mode 100644 index 00000000..d2ff1647 --- /dev/null +++ b/src/funcs/catalogEntriesListInfrastructures.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Lists functionality, service and environment objects + * + * @remarks + * Lists functionality, service and environment objects + */ +export function catalogEntriesListInfrastructures( + client: FirehydrantCore, + request: operations.ListInfrastructuresRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.InfrastructureSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListInfrastructuresRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.InfrastructureSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListInfrastructuresRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/infrastructures")(); + + const query = encodeFormQuery({ + "omit_for": payload.omit_for, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_infrastructures", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.InfrastructureSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.InfrastructureSearchEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListServiceAvailableDownstreamDependencies.ts b/src/funcs/catalogEntriesListServiceAvailableDownstreamDependencies.ts new file mode 100644 index 00000000..c8a5ae65 --- /dev/null +++ b/src/funcs/catalogEntriesListServiceAvailableDownstreamDependencies.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List available downstream service dependencies + * + * @remarks + * Retrieves all services that are available to be downstream dependencies + */ +export function catalogEntriesListServiceAvailableDownstreamDependencies( + client: FirehydrantCore, + request: operations.ListServiceAvailableDownstreamDependenciesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceEntityLite, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListServiceAvailableDownstreamDependenciesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceEntityLite, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations + .ListServiceAvailableDownstreamDependenciesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/services/{service_id}/available_downstream_dependencies", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_service_available_downstream_dependencies", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceEntityLite, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceEntityLite$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListServiceAvailableUpstreamDependencies.ts b/src/funcs/catalogEntriesListServiceAvailableUpstreamDependencies.ts new file mode 100644 index 00000000..a9a5c52d --- /dev/null +++ b/src/funcs/catalogEntriesListServiceAvailableUpstreamDependencies.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List available upstream service dependencies + * + * @remarks + * Retrieves all services that are available to be upstream dependencies + */ +export function catalogEntriesListServiceAvailableUpstreamDependencies( + client: FirehydrantCore, + request: operations.ListServiceAvailableUpstreamDependenciesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceEntityLite, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListServiceAvailableUpstreamDependenciesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceEntityLite, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListServiceAvailableUpstreamDependenciesRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/services/{service_id}/available_upstream_dependencies", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_service_available_upstream_dependencies", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceEntityLite, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceEntityLite$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListServices.ts b/src/funcs/catalogEntriesListServices.ts new file mode 100644 index 00000000..4c3f56e2 --- /dev/null +++ b/src/funcs/catalogEntriesListServices.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, queryJoin } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List services + * + * @remarks + * List all of the services that have been added to the organization. + */ +export function catalogEntriesListServices( + client: FirehydrantCore, + request: operations.ListServicesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListServicesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListServicesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/services")(); + + const query = queryJoin( + encodeFormQuery({ + "include": payload.include, + }, { explode: false }), + encodeFormQuery({ + "available_downstream_dependencies_for_id": + payload.available_downstream_dependencies_for_id, + "available_upstream_dependencies_for_id": + payload.available_upstream_dependencies_for_id, + "functionalities": payload.functionalities, + "impacted": payload.impacted, + "labels": payload.labels, + "lite": payload.lite, + "name": payload.name, + "owner": payload.owner, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + "responding_teams": payload.responding_teams, + "tiers": payload.tiers, + }), + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_services", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesListUserOwnedServices.ts b/src/funcs/catalogEntriesListUserOwnedServices.ts new file mode 100644 index 00000000..11230936 --- /dev/null +++ b/src/funcs/catalogEntriesListUserOwnedServices.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List services owned by a user's teams + * + * @remarks + * Retrieves a list of services owned by the teams a user is on + */ +export function catalogEntriesListUserOwnedServices( + client: FirehydrantCore, + request: operations.ListUserOwnedServicesRequest, + options?: RequestOptions, +): APIPromise< + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListUserOwnedServicesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListUserOwnedServicesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/users/{id}/services")(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_user_owned_services", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + Array, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, z.array(components.TeamEntityPaginated$inboundSchema)), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesRefreshCatalog.ts b/src/funcs/catalogEntriesRefreshCatalog.ts new file mode 100644 index 00000000..92d49888 --- /dev/null +++ b/src/funcs/catalogEntriesRefreshCatalog.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Refresh a service catalog + * + * @remarks + * Schedules an async task to re-import catalog info and update catalog data accordingly. + */ +export function catalogEntriesRefreshCatalog( + client: FirehydrantCore, + request: operations.RefreshCatalogRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.RefreshCatalogRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.RefreshCatalogRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + catalog_id: encodeSimple("catalog_id", payload.catalog_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/catalogs/{catalog_id}/refresh")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "refresh_catalog", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesUpdateEnvironment.ts b/src/funcs/catalogEntriesUpdateEnvironment.ts new file mode 100644 index 00000000..aebff8e2 --- /dev/null +++ b/src/funcs/catalogEntriesUpdateEnvironment.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an environment + * + * @remarks + * Update a environments attributes + */ +export function catalogEntriesUpdateEnvironment( + client: FirehydrantCore, + request: operations.UpdateEnvironmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateEnvironmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateEnvironmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_environment, { + explode: true, + }); + + const pathParams = { + environment_id: encodeSimple("environment_id", payload.environment_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/environments/{environment_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_environment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EnvironmentEntryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.EnvironmentEntryEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesUpdateFunctionality.ts b/src/funcs/catalogEntriesUpdateFunctionality.ts new file mode 100644 index 00000000..772f74da --- /dev/null +++ b/src/funcs/catalogEntriesUpdateFunctionality.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a functionality + * + * @remarks + * Update a functionalities attributes + */ +export function catalogEntriesUpdateFunctionality( + client: FirehydrantCore, + request: operations.UpdateFunctionalityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateFunctionalityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateFunctionalityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_functionality, { + explode: true, + }); + + const pathParams = { + functionality_id: encodeSimple( + "functionality_id", + payload.functionality_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/functionalities/{functionality_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_functionality", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.FunctionalityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.FunctionalityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesUpdateService.ts b/src/funcs/catalogEntriesUpdateService.ts new file mode 100644 index 00000000..ec820649 --- /dev/null +++ b/src/funcs/catalogEntriesUpdateService.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a service + * + * @remarks + * Update a services attributes, you may also add or remove functionalities from the service as well. + * Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. + */ +export function catalogEntriesUpdateService( + client: FirehydrantCore, + request: operations.UpdateServiceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateServiceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateServiceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_service, { explode: true }); + + const pathParams = { + service_id: encodeSimple("service_id", payload.service_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/services/{service_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_service", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/catalogEntriesUpdateServiceDependency.ts b/src/funcs/catalogEntriesUpdateServiceDependency.ts new file mode 100644 index 00000000..d88ab06d --- /dev/null +++ b/src/funcs/catalogEntriesUpdateServiceDependency.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a service dependency + * + * @remarks + * Update the notes of the service dependency + */ +export function catalogEntriesUpdateServiceDependency( + client: FirehydrantCore, + request: operations.UpdateServiceDependencyRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateServiceDependencyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateServiceDependencyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_service_dependency, { + explode: true, + }); + + const pathParams = { + service_dependency_id: encodeSimple( + "service_dependency_id", + payload.service_dependency_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/service_dependencies/{service_dependency_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_service_dependency", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ServiceDependencyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ServiceDependencyEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesCreate.ts b/src/funcs/changesCreate.ts deleted file mode 100644 index e3d3e6c8..00000000 --- a/src/funcs/changesCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a change - * - * @remarks - * Create a new change entry - */ -export async function changesCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Changes, - options?: RequestOptions, -): Promise< - Result< - components.ChangeEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Changes$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/changes")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createChange", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.ChangeEntity$inboundSchema), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesCreateChange.ts b/src/funcs/changesCreateChange.ts new file mode 100644 index 00000000..7923ac5f --- /dev/null +++ b/src/funcs/changesCreateChange.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a new change entry + * + * @remarks + * Create a new change entry + */ +export function changesCreateChange( + client: FirehydrantCore, + request: components.CreateChange, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateChange, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateChange$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/changes")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_change", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.ChangeEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.ChangeEntity$inboundSchema), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesCreateChangeEvent.ts b/src/funcs/changesCreateChangeEvent.ts new file mode 100644 index 00000000..17947582 --- /dev/null +++ b/src/funcs/changesCreateChangeEvent.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a change event + * + * @remarks + * Create a change event + */ +export function changesCreateChangeEvent( + client: FirehydrantCore, + request: components.CreateChangeEvent, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateChangeEvent, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateChangeEvent$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/changes/events")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_change_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.ChangeEventEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesCreateChangeIdentity.ts b/src/funcs/changesCreateChangeIdentity.ts new file mode 100644 index 00000000..d4d6ef66 --- /dev/null +++ b/src/funcs/changesCreateChangeIdentity.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create an identity for a change entry + * + * @remarks + * Create an identity for the change entry + */ +export function changesCreateChangeIdentity( + client: FirehydrantCore, + request: operations.CreateChangeIdentityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeIdentityEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateChangeIdentityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeIdentityEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateChangeIdentityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_change_identity, { + explode: true, + }); + + const pathParams = { + change_id: encodeSimple("change_id", payload.change_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/{change_id}/identities")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_change_identity", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.ChangeIdentityEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.ChangeIdentityEntity$inboundSchema), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesCreateEvent.ts b/src/funcs/changesCreateEvent.ts deleted file mode 100644 index 0b4b9d60..00000000 --- a/src/funcs/changesCreateEvent.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a change event - * - * @remarks - * Create a change event - */ -export async function changesCreateEvent( - client: FirehydrantTypescriptSDKCore, - request: components.ChangesEvents, - options?: RequestOptions, -): Promise< - Result< - components.ChangeEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.ChangesEvents$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/changes/events")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createChangeEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.ChangeEventEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesCreateIdentity.ts b/src/funcs/changesCreateIdentity.ts deleted file mode 100644 index 75ee29ac..00000000 --- a/src/funcs/changesCreateIdentity.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create an identity for a change - * - * @remarks - * Create an identity for this change - */ -export async function changesCreateIdentity( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateChangeIdentityRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeIdentityEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateChangeIdentityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1ChangesChangeIdIdentities, { - explode: true, - }); - - const pathParams = { - change_id: encodeSimple("change_id", payload.change_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/{change_id}/identities")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createChangeIdentity", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeIdentityEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.ChangeIdentityEntity$inboundSchema), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesDelete.ts b/src/funcs/changesDelete.ts deleted file mode 100644 index b13652b4..00000000 --- a/src/funcs/changesDelete.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive a change - * - * @remarks - * Archive a change entry - */ -export async function changesDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteChangeRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteChangeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - change_id: encodeSimple("change_id", payload.change_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/{change_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteChange", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesDeleteChange.ts b/src/funcs/changesDeleteChange.ts new file mode 100644 index 00000000..5c1f5095 --- /dev/null +++ b/src/funcs/changesDeleteChange.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive a change entry + * + * @remarks + * Archive a change entry + */ +export function changesDeleteChange( + client: FirehydrantCore, + request: operations.DeleteChangeRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteChangeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteChangeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + change_id: encodeSimple("change_id", payload.change_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/{change_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_change", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesDeleteChangeEvent.ts b/src/funcs/changesDeleteChangeEvent.ts new file mode 100644 index 00000000..63a973f5 --- /dev/null +++ b/src/funcs/changesDeleteChangeEvent.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a change event + * + * @remarks + * Delete a change event + */ +export function changesDeleteChangeEvent( + client: FirehydrantCore, + request: operations.DeleteChangeEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteChangeEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteChangeEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + change_event_id: encodeSimple("change_event_id", payload.change_event_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/events/{change_event_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_change_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesDeleteChangeIdentity.ts b/src/funcs/changesDeleteChangeIdentity.ts new file mode 100644 index 00000000..cf8db869 --- /dev/null +++ b/src/funcs/changesDeleteChangeIdentity.ts @@ -0,0 +1,177 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete an identity from a change entry + * + * @remarks + * Delete an identity from the change entry + */ +export function changesDeleteChangeIdentity( + client: FirehydrantCore, + request: operations.DeleteChangeIdentityRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteChangeIdentityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteChangeIdentityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + change_id: encodeSimple("change_id", payload.change_id, { + explode: false, + charEncoding: "percent", + }), + identity_id: encodeSimple("identity_id", payload.identity_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/{change_id}/identities/{identity_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_change_identity", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesDeleteEvent.ts b/src/funcs/changesDeleteEvent.ts deleted file mode 100644 index 158f5544..00000000 --- a/src/funcs/changesDeleteEvent.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a change event - * - * @remarks - * Delete a change event - */ -export async function changesDeleteEvent( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteChangeEventRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteChangeEventRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - change_event_id: encodeSimple("change_event_id", payload.change_event_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/events/{change_event_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteChangeEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesDeleteIdentity.ts b/src/funcs/changesDeleteIdentity.ts deleted file mode 100644 index 90bfa561..00000000 --- a/src/funcs/changesDeleteIdentity.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an identity from a change - * - * @remarks - * Delete an identity - */ -export async function changesDeleteIdentity( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteChangeIdentityRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteChangeIdentityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - change_id: encodeSimple("change_id", payload.change_id, { - explode: false, - charEncoding: "percent", - }), - identity_id: encodeSimple("identity_id", payload.identity_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/{change_id}/identities/{identity_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteChangeIdentity", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesGet.ts b/src/funcs/changesGet.ts deleted file mode 100644 index 83557883..00000000 --- a/src/funcs/changesGet.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a scheduled maintenance event - * - * @remarks - * Fetch the details of a scheduled maintenance event. - */ -export async function changesGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetScheduledMaintenanceRequest, - options?: RequestOptions, -): Promise< - Result< - components.ScheduledMaintenanceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetScheduledMaintenanceRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - scheduled_maintenance_id: encodeSimple( - "scheduled_maintenance_id", - payload.scheduled_maintenance_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/scheduled_maintenances/{scheduled_maintenance_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getScheduledMaintenance", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ScheduledMaintenanceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ScheduledMaintenanceEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesGetChangeEvent.ts b/src/funcs/changesGetChangeEvent.ts new file mode 100644 index 00000000..49c5bbfb --- /dev/null +++ b/src/funcs/changesGetChangeEvent.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a change event + * + * @remarks + * Retrieve a change event + */ +export function changesGetChangeEvent( + client: FirehydrantCore, + request: operations.GetChangeEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetChangeEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetChangeEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + change_event_id: encodeSimple("change_event_id", payload.change_event_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/events/{change_event_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_change_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeEventEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesGetEvent.ts b/src/funcs/changesGetEvent.ts deleted file mode 100644 index e7de1370..00000000 --- a/src/funcs/changesGetEvent.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a change event - * - * @remarks - * Retrieve a change event - */ -export async function changesGetEvent( - client: FirehydrantTypescriptSDKCore, - request: operations.GetChangeEventRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetChangeEventRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - change_event_id: encodeSimple("change_event_id", payload.change_event_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/events/{change_event_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getChangeEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChangeEventEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesList.ts b/src/funcs/changesList.ts deleted file mode 100644 index 164f579b..00000000 --- a/src/funcs/changesList.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List changes - * - * @remarks - * Lists all changes - */ -export async function changesList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListChangesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListChangesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/changes")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listChanges", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesListChangeEvents.ts b/src/funcs/changesListChangeEvents.ts new file mode 100644 index 00000000..f5084c72 --- /dev/null +++ b/src/funcs/changesListChangeEvents.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List change events + * + * @remarks + * List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it + */ +export function changesListChangeEvents( + client: FirehydrantCore, + request: operations.ListChangeEventsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeEventSlimEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListChangeEventsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeEventSlimEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListChangeEventsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/changes/events")(); + + const query = encodeFormQuery({ + "ends_at": payload.ends_at, + "environments": payload.environments, + "labels": payload.labels, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + "saved_search_id": payload.saved_search_id, + "services": payload.services, + "starts_at": payload.starts_at, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_change_events", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeEventSlimEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeEventSlimEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesListChangeIdentities.ts b/src/funcs/changesListChangeIdentities.ts new file mode 100644 index 00000000..ace1a613 --- /dev/null +++ b/src/funcs/changesListChangeIdentities.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List identities for a change entry + * + * @remarks + * Retrieve all identities for the change entry + */ +export function changesListChangeIdentities( + client: FirehydrantCore, + request: operations.ListChangeIdentitiesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeIdentityEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListChangeIdentitiesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeIdentityEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListChangeIdentitiesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + change_id: encodeSimple("change_id", payload.change_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/{change_id}/identities")(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_change_identities", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeIdentityEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeIdentityEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesListChangeTypes.ts b/src/funcs/changesListChangeTypes.ts new file mode 100644 index 00000000..7c872da8 --- /dev/null +++ b/src/funcs/changesListChangeTypes.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List change types + * + * @remarks + * List change types for the organization + */ +export function changesListChangeTypes( + client: FirehydrantCore, + request: operations.ListChangeTypesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeTypeEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListChangeTypesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeTypeEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListChangeTypesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/change_types")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_change_types", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeTypeEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeTypeEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesListChanges.ts b/src/funcs/changesListChanges.ts new file mode 100644 index 00000000..ffac19d7 --- /dev/null +++ b/src/funcs/changesListChanges.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List changes + * + * @remarks + * List changes for the organization + */ +export function changesListChanges( + client: FirehydrantCore, + request: operations.ListChangesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListChangesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListChangesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/changes")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_changes", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesListEvents.ts b/src/funcs/changesListEvents.ts deleted file mode 100644 index 7ed726b5..00000000 --- a/src/funcs/changesListEvents.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List change events - * - * @remarks - * List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it - */ -export async function changesListEvents( - client: FirehydrantTypescriptSDKCore, - request: operations.ListChangeEventsRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeEventSlimEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListChangeEventsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/changes/events")(); - - const query = encodeFormQuery({ - "ends_at": payload.ends_at, - "environments": payload.environments, - "labels": payload.labels, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - "saved_search_id": payload.saved_search_id, - "services": payload.services, - "starts_at": payload.starts_at, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listChangeEvents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeEventSlimEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChangeEventSlimEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesListIdentities.ts b/src/funcs/changesListIdentities.ts deleted file mode 100644 index be58f0f6..00000000 --- a/src/funcs/changesListIdentities.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List identities for a change - * - * @remarks - * Retrieve all identities for the change - */ -export async function changesListIdentities( - client: FirehydrantTypescriptSDKCore, - request: operations.ListChangeIdentitiesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeIdentityEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListChangeIdentitiesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - change_id: encodeSimple("change_id", payload.change_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/{change_id}/identities")(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listChangeIdentities", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeIdentityEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChangeIdentityEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesListTypes.ts b/src/funcs/changesListTypes.ts deleted file mode 100644 index 07105912..00000000 --- a/src/funcs/changesListTypes.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List change types - * - * @remarks - * Lists all change types - */ -export async function changesListTypes( - client: FirehydrantTypescriptSDKCore, - request: operations.ListChangeTypesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeTypeEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListChangeTypesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/change_types")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listChangeTypes", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeTypeEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChangeTypeEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesUpdate.ts b/src/funcs/changesUpdate.ts deleted file mode 100644 index 4c396a28..00000000 --- a/src/funcs/changesUpdate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a change - * - * @remarks - * Update a change entry - */ -export async function changesUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateChangeRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateChangeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1ChangesChangeId, { - explode: true, - }); - - const pathParams = { - change_id: encodeSimple("change_id", payload.change_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/{change_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateChange", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChangeEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesUpdateChange.ts b/src/funcs/changesUpdateChange.ts new file mode 100644 index 00000000..9b9744ef --- /dev/null +++ b/src/funcs/changesUpdateChange.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a change entry + * + * @remarks + * Update a change entry + */ +export function changesUpdateChange( + client: FirehydrantCore, + request: operations.UpdateChangeRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateChangeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateChangeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_change, { explode: true }); + + const pathParams = { + change_id: encodeSimple("change_id", payload.change_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/{change_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_change", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesUpdateChangeEvent.ts b/src/funcs/changesUpdateChangeEvent.ts new file mode 100644 index 00000000..1de6925d --- /dev/null +++ b/src/funcs/changesUpdateChangeEvent.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a change event + * + * @remarks + * Update a change event + */ +export function changesUpdateChangeEvent( + client: FirehydrantCore, + request: operations.UpdateChangeEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateChangeEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateChangeEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_change_event, { + explode: true, + }); + + const pathParams = { + change_event_id: encodeSimple("change_event_id", payload.change_event_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/events/{change_event_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_change_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeEventEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesUpdateChangeIdentity.ts b/src/funcs/changesUpdateChangeIdentity.ts new file mode 100644 index 00000000..8c419580 --- /dev/null +++ b/src/funcs/changesUpdateChangeIdentity.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an identity for a change entry + * + * @remarks + * Update an identity for the change entry + */ +export function changesUpdateChangeIdentity( + client: FirehydrantCore, + request: operations.UpdateChangeIdentityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeIdentityEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateChangeIdentityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeIdentityEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateChangeIdentityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_change_identity, { + explode: true, + }); + + const pathParams = { + change_id: encodeSimple("change_id", payload.change_id, { + explode: false, + charEncoding: "percent", + }), + identity_id: encodeSimple("identity_id", payload.identity_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/changes/{change_id}/identities/{identity_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_change_identity", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.ChangeIdentityEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeIdentityEntity$inboundSchema), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/changesUpdateEvent.ts b/src/funcs/changesUpdateEvent.ts deleted file mode 100644 index 365f4019..00000000 --- a/src/funcs/changesUpdateEvent.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a change event - * - * @remarks - * Update a change event - */ -export async function changesUpdateEvent( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateChangeEventRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateChangeEventRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1ChangesEventsChangeEventId, { - explode: true, - }); - - const pathParams = { - change_event_id: encodeSimple("change_event_id", payload.change_event_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/events/{change_event_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateChangeEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChangeEventEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesUpdateIdentity.ts b/src/funcs/changesUpdateIdentity.ts deleted file mode 100644 index a85161f1..00000000 --- a/src/funcs/changesUpdateIdentity.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an identity for a change - * - * @remarks - * Update an identity - */ -export async function changesUpdateIdentity( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateChangeIdentityRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChangeIdentityEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateChangeIdentityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1ChangesChangeIdIdentitiesIdentityId, - { explode: true }, - ); - - const pathParams = { - change_id: encodeSimple("change_id", payload.change_id, { - explode: false, - charEncoding: "percent", - }), - identity_id: encodeSimple("identity_id", payload.identity_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/changes/{change_id}/identities/{identity_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateChangeIdentity", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChangeIdentityEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChangeIdentityEntity$inboundSchema), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/changesUpdateScheduledMaintenance.ts b/src/funcs/changesUpdateScheduledMaintenance.ts deleted file mode 100644 index 86fb5dd1..00000000 --- a/src/funcs/changesUpdateScheduledMaintenance.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a scheduled maintenance event - * - * @remarks - * Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. - */ -export async function changesUpdateScheduledMaintenance( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateScheduledMaintenanceRequest, - options?: RequestOptions, -): Promise< - Result< - components.ScheduledMaintenanceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateScheduledMaintenanceRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1ScheduledMaintenancesScheduledMaintenanceId, - { explode: true }, - ); - - const pathParams = { - scheduled_maintenance_id: encodeSimple( - "scheduled_maintenance_id", - payload.scheduled_maintenance_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/scheduled_maintenances/{scheduled_maintenance_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateScheduledMaintenance", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ScheduledMaintenanceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ScheduledMaintenanceEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/checklistTemplatesGet.ts b/src/funcs/checklistTemplatesGet.ts deleted file mode 100644 index 0bae0ea6..00000000 --- a/src/funcs/checklistTemplatesGet.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a checklist template - * - * @remarks - * Retrieves a single checklist template by ID - */ -export async function checklistTemplatesGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetChecklistTemplateRequest, - options?: RequestOptions, -): Promise< - Result< - components.ChecklistTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetChecklistTemplateRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/checklist_templates/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getChecklistTemplate", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ChecklistTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ChecklistTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/communicationCreateStatusUpdateTemplate.ts b/src/funcs/communicationCreateStatusUpdateTemplate.ts new file mode 100644 index 00000000..421215b9 --- /dev/null +++ b/src/funcs/communicationCreateStatusUpdateTemplate.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a status update template + * + * @remarks + * Create a status update template for your organization + */ +export function communicationCreateStatusUpdateTemplate( + client: FirehydrantCore, + request: components.CreateStatusUpdateTemplate, + options?: RequestOptions, +): APIPromise< + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateStatusUpdateTemplate, + options?: RequestOptions, +): Promise< + [ + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + components.CreateStatusUpdateTemplate$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/status_update_templates")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_status_update_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.StatusUpdateTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/communicationDeleteStatusUpdateTemplate.ts b/src/funcs/communicationDeleteStatusUpdateTemplate.ts index 6f35817c..e6dc892f 100644 --- a/src/funcs/communicationDeleteStatusUpdateTemplate.ts +++ b/src/funcs/communicationDeleteStatusUpdateTemplate.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Delete a single status update template */ -export async function communicationDeleteStatusUpdateTemplate( - client: FirehydrantTypescriptSDKCore, +export function communicationDeleteStatusUpdateTemplate( + client: FirehydrantCore, request: operations.DeleteStatusUpdateTemplateRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function communicationDeleteStatusUpdateTemplate( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteStatusUpdateTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function communicationDeleteStatusUpdateTemplate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -75,16 +96,17 @@ export async function communicationDeleteStatusUpdateTemplate( "/v1/status_update_templates/{status_update_template_id}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteStatusUpdateTemplate", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_status_update_template", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -106,59 +128,23 @@ export async function communicationDeleteStatusUpdateTemplate( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -168,23 +154,12 @@ export async function communicationDeleteStatusUpdateTemplate( | ConnectionError >( M.json(200, components.StatusUpdateTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/communicationGetStatusUpdateTemplate.ts b/src/funcs/communicationGetStatusUpdateTemplate.ts new file mode 100644 index 00000000..2d7897ce --- /dev/null +++ b/src/funcs/communicationGetStatusUpdateTemplate.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a status update template + * + * @remarks + * Get a single status update template by ID + */ +export function communicationGetStatusUpdateTemplate( + client: FirehydrantCore, + request: operations.GetStatusUpdateTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetStatusUpdateTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetStatusUpdateTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + status_update_template_id: encodeSimple( + "status_update_template_id", + payload.status_update_template_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/status_update_templates/{status_update_template_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_status_update_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.StatusUpdateTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/communicationGetTemplate.ts b/src/funcs/communicationGetTemplate.ts deleted file mode 100644 index 153e7631..00000000 --- a/src/funcs/communicationGetTemplate.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a status update template - * - * @remarks - * Get a single status update template by ID - */ -export async function communicationGetTemplate( - client: FirehydrantTypescriptSDKCore, - request: operations.GetStatusUpdateTemplateRequest, - options?: RequestOptions, -): Promise< - Result< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetStatusUpdateTemplateRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - status_update_template_id: encodeSimple( - "status_update_template_id", - payload.status_update_template_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/status_update_templates/{status_update_template_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getStatusUpdateTemplate", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.StatusUpdateTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/communicationListStatusUpdateTemplates.ts b/src/funcs/communicationListStatusUpdateTemplates.ts new file mode 100644 index 00000000..faf045ce --- /dev/null +++ b/src/funcs/communicationListStatusUpdateTemplates.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List status update templates + * + * @remarks + * List all status update templates for your organization + */ +export function communicationListStatusUpdateTemplates( + client: FirehydrantCore, + request: operations.ListStatusUpdateTemplatesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListStatusUpdateTemplatesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListStatusUpdateTemplatesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/status_update_templates")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_status_update_templates", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.StatusUpdateTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/communicationListTemplates.ts b/src/funcs/communicationListTemplates.ts deleted file mode 100644 index 03f76cc2..00000000 --- a/src/funcs/communicationListTemplates.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List status update templates - * - * @remarks - * List all status update templates for your organization - */ -export async function communicationListTemplates( - client: FirehydrantTypescriptSDKCore, - request: operations.ListStatusUpdateTemplatesRequest, - options?: RequestOptions, -): Promise< - Result< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListStatusUpdateTemplatesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/status_update_templates")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listStatusUpdateTemplates", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.StatusUpdateTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/communicationUpdateStatusUpdateTemplate.ts b/src/funcs/communicationUpdateStatusUpdateTemplate.ts new file mode 100644 index 00000000..1ea404e0 --- /dev/null +++ b/src/funcs/communicationUpdateStatusUpdateTemplate.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a status update template + * + * @remarks + * Update a single status update template + */ +export function communicationUpdateStatusUpdateTemplate( + client: FirehydrantCore, + request: operations.UpdateStatusUpdateTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateStatusUpdateTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateStatusUpdateTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_status_update_template, { + explode: true, + }); + + const pathParams = { + status_update_template_id: encodeSimple( + "status_update_template_id", + payload.status_update_template_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/status_update_templates/{status_update_template_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_status_update_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.StatusUpdateTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.StatusUpdateTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/communicationUpdateTemplate.ts b/src/funcs/communicationUpdateTemplate.ts deleted file mode 100644 index 519c2952..00000000 --- a/src/funcs/communicationUpdateTemplate.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a status update template - * - * @remarks - * Update a single status update template - */ -export async function communicationUpdateTemplate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateStatusUpdateTemplateRequest, - options?: RequestOptions, -): Promise< - Result< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateStatusUpdateTemplateRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1StatusUpdateTemplatesStatusUpdateTemplateId, - { explode: true }, - ); - - const pathParams = { - status_update_template_id: encodeSimple( - "status_update_template_id", - payload.status_update_template_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/status_update_templates/{status_update_template_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateStatusUpdateTemplate", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.StatusUpdateTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/confluenceListSpaces.ts b/src/funcs/confluenceListSpaces.ts deleted file mode 100644 index e71de9a9..00000000 --- a/src/funcs/confluenceListSpaces.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List Confluence spaces - * - * @remarks - * Lists available space keys for the Confluence integration connection. - */ -export async function confluenceListSpaces( - client: FirehydrantTypescriptSDKCore, - request: operations.ListConfluenceSpacesRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsConfluenceCloudSpaceKeyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListConfluenceSpacesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/confluence_cloud/connections/{id}/space/search", - )(pathParams); - - const query = encodeFormQuery({ - "keyword": payload.keyword, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listConfluenceSpaces", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsConfluenceCloudSpaceKeyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.IntegrationsConfluenceCloudSpaceKeyEntity$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/conversationsCreateComment.ts b/src/funcs/conversationsCreateComment.ts index 95d61ddd..fe3963e1 100644 --- a/src/funcs/conversationsCreateComment.ts +++ b/src/funcs/conversationsCreateComment.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Create a comment for a conversation + * Create a conversation comment * * @remarks * ALPHA - Creates a comment for a project */ -export async function conversationsCreateComment( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateConversationCommentRequest, +export function conversationsCreateComment( + client: FirehydrantCore, + request: operations.CreateCommentRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,22 +45,43 @@ export async function conversationsCreateComment( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateCommentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.CreateConversationCommentRequest$outboundSchema.parse(value), + (value) => operations.CreateCommentRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1ConversationsConversationIdComments, - { explode: true }, - ); + const body = encodeJSON("body", payload.create_comment, { explode: true }); const pathParams = { conversation_id: encodeSimple("conversation_id", payload.conversation_id, { @@ -78,17 +94,18 @@ export async function conversationsCreateComment( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", - Accept: "application/json", - }); + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createConversationComment", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_comment", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -110,59 +127,23 @@ export async function conversationsCreateComment( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -172,23 +153,12 @@ export async function conversationsCreateComment( | ConnectionError >( M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsCreateCommentReaction.ts b/src/funcs/conversationsCreateCommentReaction.ts index cc4e1cd2..78ea7559 100644 --- a/src/funcs/conversationsCreateCommentReaction.ts +++ b/src/funcs/conversationsCreateCommentReaction.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * ALPHA - Create a reaction on a comment */ -export async function conversationsCreateCommentReaction( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateConversationCommentReactionRequest, +export function conversationsCreateCommentReaction( + client: FirehydrantCore, + request: operations.CreateCommentReactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,24 +45,46 @@ export async function conversationsCreateCommentReaction( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateCommentReactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, (value) => - operations.CreateConversationCommentReactionRequest$outboundSchema.parse( - value, - ), + operations.CreateCommentReactionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1ConversationsConversationIdCommentsCommentIdReactions, - { explode: true }, - ); + const body = encodeJSON("body", payload.create_comment_reaction, { + explode: true, + }); const pathParams = { comment_id: encodeSimple("comment_id", payload.comment_id, { @@ -84,17 +101,18 @@ export async function conversationsCreateCommentReaction( "/v1/conversations/{conversation_id}/comments/{comment_id}/reactions", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", - Accept: "application/json", - }); + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createConversationCommentReaction", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_comment_reaction", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -116,59 +134,23 @@ export async function conversationsCreateCommentReaction( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -178,23 +160,12 @@ export async function conversationsCreateCommentReaction( | ConnectionError >( M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsDeleteComment.ts b/src/funcs/conversationsDeleteComment.ts index c4494687..6ab066b2 100644 --- a/src/funcs/conversationsDeleteComment.ts +++ b/src/funcs/conversationsDeleteComment.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Delete a conversation comment + * Archive a conversation comment * * @remarks * ALPHA - Archive a comment */ -export async function conversationsDeleteComment( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteConversationCommentRequest, +export function conversationsDeleteComment( + client: FirehydrantCore, + request: operations.DeleteCommentRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,15 +45,40 @@ export async function conversationsDeleteComment( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteCommentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.DeleteConversationCommentRequest$outboundSchema.parse(value), + (value) => operations.DeleteCommentRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -78,16 +98,17 @@ export async function conversationsDeleteComment( "/v1/conversations/{conversation_id}/comments/{comment_id}", )(pathParams); - const headers = new Headers({ - Accept: "application/json", - }); + const headers = new Headers(compactMap({ + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteConversationComment", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_comment", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -109,59 +130,23 @@ export async function conversationsDeleteComment( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -171,23 +156,12 @@ export async function conversationsDeleteComment( | ConnectionError >( M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsDeleteCommentReaction.ts b/src/funcs/conversationsDeleteCommentReaction.ts index 765fca40..af03b3f2 100644 --- a/src/funcs/conversationsDeleteCommentReaction.ts +++ b/src/funcs/conversationsDeleteCommentReaction.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * ALPHA - Archive a reaction */ -export async function conversationsDeleteCommentReaction( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteConversationCommentReactionRequest, +export function conversationsDeleteCommentReaction( + client: FirehydrantCore, + request: operations.DeleteCommentReactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,17 +45,41 @@ export async function conversationsDeleteCommentReaction( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteCommentReactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, (value) => - operations.DeleteConversationCommentReactionRequest$outboundSchema.parse( - value, - ), + operations.DeleteCommentReactionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -84,16 +103,17 @@ export async function conversationsDeleteCommentReaction( "/v1/conversations/{conversation_id}/comments/{comment_id}/reactions/{reaction_id}", )(pathParams); - const headers = new Headers({ - Accept: "application/json", - }); + const headers = new Headers(compactMap({ + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteConversationCommentReaction", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_comment_reaction", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -115,59 +135,23 @@ export async function conversationsDeleteCommentReaction( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -177,23 +161,12 @@ export async function conversationsDeleteCommentReaction( | ConnectionError >( M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsGetComment.ts b/src/funcs/conversationsGetComment.ts index 545d3728..21603e05 100644 --- a/src/funcs/conversationsGetComment.ts +++ b/src/funcs/conversationsGetComment.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * ALPHA - Retrieves a single comment by ID */ -export async function conversationsGetComment( - client: FirehydrantTypescriptSDKCore, - request: operations.GetConversationCommentRequest, +export function conversationsGetComment( + client: FirehydrantCore, + request: operations.GetCommentRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,15 +45,40 @@ export async function conversationsGetComment( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetCommentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.GetConversationCommentRequest$outboundSchema.parse(value), + (value) => operations.GetCommentRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -78,16 +98,17 @@ export async function conversationsGetComment( "/v1/conversations/{conversation_id}/comments/{comment_id}", )(pathParams); - const headers = new Headers({ - Accept: "application/json", - }); + const headers = new Headers(compactMap({ + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getConversationComment", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_comment", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -109,59 +130,23 @@ export async function conversationsGetComment( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -171,23 +156,12 @@ export async function conversationsGetComment( | ConnectionError >( M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsGetVoteStatus.ts b/src/funcs/conversationsGetVoteStatus.ts new file mode 100644 index 00000000..0f91fda1 --- /dev/null +++ b/src/funcs/conversationsGetVoteStatus.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get votes + * + * @remarks + * Get an object's current vote counts + */ +export function conversationsGetVoteStatus( + client: FirehydrantCore, + request: operations.GetVoteStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.VotesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetVoteStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.VotesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetVoteStatusRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + event_id: encodeSimple("event_id", payload.event_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/events/{event_id}/votes/status", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_vote_status", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.VotesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.VotesEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/conversationsListCommentReactions.ts b/src/funcs/conversationsListCommentReactions.ts index 8e57f86b..740e87b6 100644 --- a/src/funcs/conversationsListCommentReactions.ts +++ b/src/funcs/conversationsListCommentReactions.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * ALPHA - List all of the reactions that have been added to a comment */ -export async function conversationsListCommentReactions( - client: FirehydrantTypescriptSDKCore, - request: operations.ListConversationCommentReactionsRequest, +export function conversationsListCommentReactions( + client: FirehydrantCore, + request: operations.ListCommentReactionsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,17 +45,41 @@ export async function conversationsListCommentReactions( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListCommentReactionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, (value) => - operations.ListConversationCommentReactionsRequest$outboundSchema.parse( - value, - ), + operations.ListCommentReactionsRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -80,16 +99,17 @@ export async function conversationsListCommentReactions( "/v1/conversations/{conversation_id}/comments/{comment_id}/reactions", )(pathParams); - const headers = new Headers({ - Accept: "application/json", - }); + const headers = new Headers(compactMap({ + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listConversationCommentReactions", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_comment_reactions", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -111,59 +131,23 @@ export async function conversationsListCommentReactions( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -173,23 +157,12 @@ export async function conversationsListCommentReactions( | ConnectionError >( M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsListComments.ts b/src/funcs/conversationsListComments.ts index fc034e75..54556f2c 100644 --- a/src/funcs/conversationsListComments.ts +++ b/src/funcs/conversationsListComments.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * ALPHA - List all of the comments that have been added to the organization */ -export async function conversationsListComments( - client: FirehydrantTypescriptSDKCore, - request: operations.ListConversationCommentsRequest, +export function conversationsListComments( + client: FirehydrantCore, + request: operations.ListCommentsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,15 +45,40 @@ export async function conversationsListComments( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListCommentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.ListConversationCommentsRequest$outboundSchema.parse(value), + (value) => operations.ListCommentsRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -80,16 +100,17 @@ export async function conversationsListComments( "sort": payload.sort, }); - const headers = new Headers({ - Accept: "application/json", - }); + const headers = new Headers(compactMap({ + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listConversationComments", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_comments", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -112,59 +133,23 @@ export async function conversationsListComments( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -174,23 +159,12 @@ export async function conversationsListComments( | ConnectionError >( M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsUpdateComment.ts b/src/funcs/conversationsUpdateComment.ts index f80d3f10..a9f07ad1 100644 --- a/src/funcs/conversationsUpdateComment.ts +++ b/src/funcs/conversationsUpdateComment.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * ALPHA - Update a comment's attributes */ -export async function conversationsUpdateComment( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateConversationCommentRequest, +export function conversationsUpdateComment( + client: FirehydrantCore, + request: operations.UpdateCommentRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,22 +45,43 @@ export async function conversationsUpdateComment( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateCommentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.UpdateConversationCommentRequest$outboundSchema.parse(value), + (value) => operations.UpdateCommentRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1ConversationsConversationIdCommentsCommentId, - { explode: true }, - ); + const body = encodeJSON("body", payload.update_comment, { explode: true }); const pathParams = { comment_id: encodeSimple("comment_id", payload.comment_id, { @@ -82,17 +98,18 @@ export async function conversationsUpdateComment( "/v1/conversations/{conversation_id}/comments/{comment_id}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", - Accept: "application/json", - }); + Accept: "*/*", + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateConversationComment", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_comment", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -114,59 +131,23 @@ export async function conversationsUpdateComment( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -176,23 +157,12 @@ export async function conversationsUpdateComment( | ConnectionError >( M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/conversationsUpdateVote.ts b/src/funcs/conversationsUpdateVote.ts new file mode 100644 index 00000000..584eeb8b --- /dev/null +++ b/src/funcs/conversationsUpdateVote.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update votes + * + * @remarks + * Upvote or downvote an object + */ +export function conversationsUpdateVote( + client: FirehydrantCore, + request: operations.UpdateVoteRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.VotesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateVoteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.VotesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateVoteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_vote, { explode: true }); + + const pathParams = { + event_id: encodeSimple("event_id", payload.event_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/events/{event_id}/votes", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_vote", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.VotesEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.VotesEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/environmentsCreate.ts b/src/funcs/environmentsCreate.ts deleted file mode 100644 index 11a02478..00000000 --- a/src/funcs/environmentsCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create an environment - * - * @remarks - * Creates an environment for the organization - */ -export async function environmentsCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Environments, - options?: RequestOptions, -): Promise< - Result< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Environments$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/environments")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createEnvironment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.EnvironmentEntryEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/environmentsDelete.ts b/src/funcs/environmentsDelete.ts deleted file mode 100644 index a2fa42e1..00000000 --- a/src/funcs/environmentsDelete.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive an environment - * - * @remarks - * Archive an environment - */ -export async function environmentsDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteEnvironmentRequest, - options?: RequestOptions, -): Promise< - Result< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteEnvironmentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - environment_id: encodeSimple("environment_id", payload.environment_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/environments/{environment_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteEnvironment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.EnvironmentEntryEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/environmentsGet.ts b/src/funcs/environmentsGet.ts deleted file mode 100644 index 4a64a01c..00000000 --- a/src/funcs/environmentsGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an environment - * - * @remarks - * Retrieves a single environment by ID - */ -export async function environmentsGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetEnvironmentRequest, - options?: RequestOptions, -): Promise< - Result< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetEnvironmentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - environment_id: encodeSimple("environment_id", payload.environment_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/environments/{environment_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getEnvironment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.EnvironmentEntryEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/environmentsList.ts b/src/funcs/environmentsList.ts deleted file mode 100644 index 686cdebb..00000000 --- a/src/funcs/environmentsList.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List environments - * - * @remarks - * List all of the environments that have been added to the organiation - */ -export async function environmentsList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListEnvironmentsRequest, - options?: RequestOptions, -): Promise< - Result< - components.EnvironmentEntryEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListEnvironmentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/environments")(); - - const query = encodeFormQuery({ - "name": payload.name, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listEnvironments", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EnvironmentEntryEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.EnvironmentEntryEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/environmentsUpdate.ts b/src/funcs/environmentsUpdate.ts deleted file mode 100644 index 2de39a80..00000000 --- a/src/funcs/environmentsUpdate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an environment - * - * @remarks - * Update a environments attributes - */ -export async function environmentsUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateEnvironmentRequest, - options?: RequestOptions, -): Promise< - Result< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateEnvironmentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1EnvironmentsEnvironmentId, { - explode: true, - }); - - const pathParams = { - environment_id: encodeSimple("environment_id", payload.environment_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/environments/{environment_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateEnvironment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EnvironmentEntryEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.EnvironmentEntryEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/functionalitiesCreate.ts b/src/funcs/functionalitiesCreate.ts deleted file mode 100644 index bb919aa0..00000000 --- a/src/funcs/functionalitiesCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a functionality - * - * @remarks - * Creates a functionality for the organization - */ -export async function functionalitiesCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Functionalities, - options?: RequestOptions, -): Promise< - Result< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Functionalities$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/functionalities")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createFunctionality", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.FunctionalityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/functionalitiesDelete.ts b/src/funcs/functionalitiesDelete.ts deleted file mode 100644 index edf6dd3a..00000000 --- a/src/funcs/functionalitiesDelete.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive a functionality - * - * @remarks - * Archive a functionality - */ -export async function functionalitiesDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteFunctionalityRequest, - options?: RequestOptions, -): Promise< - Result< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteFunctionalityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - functionality_id: encodeSimple( - "functionality_id", - payload.functionality_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/functionalities/{functionality_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteFunctionality", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.FunctionalityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/functionalitiesGet.ts b/src/funcs/functionalitiesGet.ts deleted file mode 100644 index 65a35c82..00000000 --- a/src/funcs/functionalitiesGet.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a functionality - * - * @remarks - * Retrieves a single functionality by ID - */ -export async function functionalitiesGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetFunctionalityRequest, - options?: RequestOptions, -): Promise< - Result< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetFunctionalityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - functionality_id: encodeSimple( - "functionality_id", - payload.functionality_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/functionalities/{functionality_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getFunctionality", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.FunctionalityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/functionalitiesList.ts b/src/funcs/functionalitiesList.ts deleted file mode 100644 index 54d5aac6..00000000 --- a/src/funcs/functionalitiesList.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List functionalities - * - * @remarks - * List all of the functionalities that have been added to the organiation - */ -export async function functionalitiesList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListFunctionalitiesRequest, - options?: RequestOptions, -): Promise< - Result< - components.FunctionalityEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListFunctionalitiesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/functionalities")(); - - const query = encodeFormQuery({ - "impacted": payload.impacted, - "labels": payload.labels, - "lite": payload.lite, - "name": payload.name, - "owner": payload.owner, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listFunctionalities", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.FunctionalityEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.FunctionalityEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/functionalitiesListServices.ts b/src/funcs/functionalitiesListServices.ts deleted file mode 100644 index fe470396..00000000 --- a/src/funcs/functionalitiesListServices.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List services for a functionality - */ -export async function functionalitiesListServices( - client: FirehydrantTypescriptSDKCore, - request: operations.GetFunctionalityServicesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetFunctionalityServicesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - functionality_id: encodeSimple( - "functionality_id", - payload.functionality_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/functionalities/{functionality_id}/services")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getFunctionalityServices", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/functionalitiesUpdate.ts b/src/funcs/functionalitiesUpdate.ts deleted file mode 100644 index ecb822f5..00000000 --- a/src/funcs/functionalitiesUpdate.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a functionality - * - * @remarks - * Update a functionalities attributes - */ -export async function functionalitiesUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateFunctionalityRequest, - options?: RequestOptions, -): Promise< - Result< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateFunctionalityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1FunctionalitiesFunctionalityId, - { explode: true }, - ); - - const pathParams = { - functionality_id: encodeSimple( - "functionality_id", - payload.functionality_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/functionalities/{functionality_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateFunctionality", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.FunctionalityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.FunctionalityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsArchiveIncidentType.ts b/src/funcs/incidentSettingsArchiveIncidentType.ts deleted file mode 100644 index 19c6306e..00000000 --- a/src/funcs/incidentSettingsArchiveIncidentType.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive an incident type - * - * @remarks - * Archives an incident type which will hide it from lists and metrics - */ -export async function incidentSettingsArchiveIncidentType( - client: FirehydrantTypescriptSDKCore, - request: operations.ArchiveIncidentTypeRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ArchiveIncidentTypeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incident_types/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "archiveIncidentType", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentTypeEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsCreateCustomFieldDefinition.ts b/src/funcs/incidentSettingsCreateCustomFieldDefinition.ts index da730e68..f655f0f4 100644 --- a/src/funcs/incidentSettingsCreateCustomFieldDefinition.ts +++ b/src/funcs/incidentSettingsCreateCustomFieldDefinition.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,8 +19,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,19 +29,13 @@ import { Result } from "../types/fp.js"; * @remarks * Create a new custom field definition */ -export async function incidentSettingsCreateCustomFieldDefinition( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1CustomFieldsDefinitions, +export function incidentSettingsCreateCustomFieldDefinition( + client: FirehydrantCore, + request: components.CreateCustomFieldDefinition, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -49,32 +44,59 @@ export async function incidentSettingsCreateCustomFieldDefinition( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateCustomFieldDefinition, + options?: RequestOptions, +): Promise< + [ + Result< + components.OrganizationsCustomFieldDefinitionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, (value) => - components.PostV1CustomFieldsDefinitions$outboundSchema.parse(value), + components.CreateCustomFieldDefinition$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/custom_fields/definitions")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createCustomFieldDefinition", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_custom_field_definition", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -96,59 +118,23 @@ export async function incidentSettingsCreateCustomFieldDefinition( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -161,23 +147,12 @@ export async function incidentSettingsCreateCustomFieldDefinition( 201, components.OrganizationsCustomFieldDefinitionEntity$inboundSchema, ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsCreateImpact.ts b/src/funcs/incidentSettingsCreateImpact.ts deleted file mode 100644 index 7886099c..00000000 --- a/src/funcs/incidentSettingsCreateImpact.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a severity matrix impact - * - * @remarks - * Create a new impact - */ -export async function incidentSettingsCreateImpact( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1SeverityMatrixImpacts, - options?: RequestOptions, -): Promise< - Result< - components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - components.PostV1SeverityMatrixImpacts$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/severity_matrix/impacts")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createSeverityMatrixImpact", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.SeverityMatrixImpactEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsCreateIncidentRole.ts b/src/funcs/incidentSettingsCreateIncidentRole.ts index 773731e0..dd188b83 100644 --- a/src/funcs/incidentSettingsCreateIncidentRole.ts +++ b/src/funcs/incidentSettingsCreateIncidentRole.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,8 +19,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,19 +29,13 @@ import { Result } from "../types/fp.js"; * @remarks * Create a new incident role */ -export async function incidentSettingsCreateIncidentRole( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1IncidentRoles, +export function incidentSettingsCreateIncidentRole( + client: FirehydrantCore, + request: components.CreateIncidentRole, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -49,31 +44,58 @@ export async function incidentSettingsCreateIncidentRole( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateIncidentRole, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentRoleEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => components.PostV1IncidentRoles$outboundSchema.parse(value), + (value) => components.CreateIncidentRole$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/incident_roles")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createIncidentRole", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_role", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -95,59 +117,23 @@ export async function incidentSettingsCreateIncidentRole( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -157,23 +143,12 @@ export async function incidentSettingsCreateIncidentRole( | ConnectionError >( M.json(201, components.IncidentRoleEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsCreateIncidentType.ts b/src/funcs/incidentSettingsCreateIncidentType.ts index 2cb78552..2fda5a1f 100644 --- a/src/funcs/incidentSettingsCreateIncidentType.ts +++ b/src/funcs/incidentSettingsCreateIncidentType.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,8 +19,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,19 +29,13 @@ import { Result } from "../types/fp.js"; * @remarks * Create a new incident type */ -export async function incidentSettingsCreateIncidentType( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1IncidentTypes, +export function incidentSettingsCreateIncidentType( + client: FirehydrantCore, + request: components.CreateIncidentType, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -49,31 +44,58 @@ export async function incidentSettingsCreateIncidentType( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateIncidentType, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => components.PostV1IncidentTypes$outboundSchema.parse(value), + (value) => components.CreateIncidentType$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/incident_types")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createIncidentType", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_type", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -95,59 +117,23 @@ export async function incidentSettingsCreateIncidentType( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -157,23 +143,12 @@ export async function incidentSettingsCreateIncidentType( | ConnectionError >( M.json(201, components.IncidentTypeEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsCreateLifecycleMeasurementDefinition.ts b/src/funcs/incidentSettingsCreateLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..a848e1ed --- /dev/null +++ b/src/funcs/incidentSettingsCreateLifecycleMeasurementDefinition.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a measurement definition + * + * @remarks + * Create a new measurement definition + */ +export function incidentSettingsCreateLifecycleMeasurementDefinition( + client: FirehydrantCore, + request: operations.CreateLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateLifecycleMeasurementDefinitionRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/lifecycles/measurement_definitions")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_lifecycle_measurement_definition", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsCreateLifecycleMilestone.ts b/src/funcs/incidentSettingsCreateLifecycleMilestone.ts new file mode 100644 index 00000000..eb3d5298 --- /dev/null +++ b/src/funcs/incidentSettingsCreateLifecycleMilestone.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a milestone + * + * @remarks + * Create a new milestone + */ +export function incidentSettingsCreateLifecycleMilestone( + client: FirehydrantCore, + request: operations.CreateLifecycleMilestoneRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.LifecyclesPhaseEntityList, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateLifecycleMilestoneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.LifecyclesPhaseEntityList, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateLifecycleMilestoneRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/lifecycles/milestones")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_lifecycle_milestone", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.LifecyclesPhaseEntityList, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.LifecyclesPhaseEntityList$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsCreateMilestone.ts b/src/funcs/incidentSettingsCreateMilestone.ts deleted file mode 100644 index 7c498724..00000000 --- a/src/funcs/incidentSettingsCreateMilestone.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a milestone for an incident lifecycle - * - * @remarks - * Create a new milestone - */ -export async function incidentSettingsCreateMilestone( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateLifecycleMilestoneRequestBody, - options?: RequestOptions, -): Promise< - Result< - components.LifecyclesPhaseEntityList, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateLifecycleMilestoneRequestBody$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/lifecycles/milestones")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createLifecycleMilestone", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.LifecyclesPhaseEntityList, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.LifecyclesPhaseEntityList$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsCreatePriority.ts b/src/funcs/incidentSettingsCreatePriority.ts index 677d23aa..4f505ce6 100644 --- a/src/funcs/incidentSettingsCreatePriority.ts +++ b/src/funcs/incidentSettingsCreatePriority.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,8 +19,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,19 +29,13 @@ import { Result } from "../types/fp.js"; * @remarks * Create a new priority */ -export async function incidentSettingsCreatePriority( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Priorities, +export function incidentSettingsCreatePriority( + client: FirehydrantCore, + request: components.CreatePriority, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -49,31 +44,58 @@ export async function incidentSettingsCreatePriority( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreatePriority, + options?: RequestOptions, +): Promise< + [ + Result< + components.PriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => components.PostV1Priorities$outboundSchema.parse(value), + (value) => components.CreatePriority$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/priorities")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createPriority", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_priority", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -95,59 +117,23 @@ export async function incidentSettingsCreatePriority( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -157,23 +143,12 @@ export async function incidentSettingsCreatePriority( | ConnectionError >( M.json(201, components.PriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsCreateSeverity.ts b/src/funcs/incidentSettingsCreateSeverity.ts index 43f7696b..0d2eb87d 100644 --- a/src/funcs/incidentSettingsCreateSeverity.ts +++ b/src/funcs/incidentSettingsCreateSeverity.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,8 +19,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,19 +29,13 @@ import { Result } from "../types/fp.js"; * @remarks * Create a new severity */ -export async function incidentSettingsCreateSeverity( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Severities, +export function incidentSettingsCreateSeverity( + client: FirehydrantCore, + request: components.CreateSeverity, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -49,31 +44,58 @@ export async function incidentSettingsCreateSeverity( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateSeverity, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => components.PostV1Severities$outboundSchema.parse(value), + (value) => components.CreateSeverity$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/severities")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createSeverity", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_severity", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -95,59 +117,23 @@ export async function incidentSettingsCreateSeverity( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -157,23 +143,12 @@ export async function incidentSettingsCreateSeverity( | ConnectionError >( M.json(201, components.SeverityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsCreateSeverityMatrixCondition.ts b/src/funcs/incidentSettingsCreateSeverityMatrixCondition.ts index c52578e3..032eac79 100644 --- a/src/funcs/incidentSettingsCreateSeverityMatrixCondition.ts +++ b/src/funcs/incidentSettingsCreateSeverityMatrixCondition.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,8 +19,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,19 +29,13 @@ import { Result } from "../types/fp.js"; * @remarks * Create a new condition */ -export async function incidentSettingsCreateSeverityMatrixCondition( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1SeverityMatrixConditions, +export function incidentSettingsCreateSeverityMatrixCondition( + client: FirehydrantCore, + request: components.CreateSeverityMatrixCondition, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -49,32 +44,59 @@ export async function incidentSettingsCreateSeverityMatrixCondition( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateSeverityMatrixCondition, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixConditionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, (value) => - components.PostV1SeverityMatrixConditions$outboundSchema.parse(value), + components.CreateSeverityMatrixCondition$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/severity_matrix/conditions")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createSeverityMatrixCondition", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_severity_matrix_condition", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -96,59 +118,23 @@ export async function incidentSettingsCreateSeverityMatrixCondition( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -158,23 +144,12 @@ export async function incidentSettingsCreateSeverityMatrixCondition( | ConnectionError >( M.json(201, components.SeverityMatrixConditionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsCreateSeverityMatrixImpact.ts b/src/funcs/incidentSettingsCreateSeverityMatrixImpact.ts new file mode 100644 index 00000000..cf664a77 --- /dev/null +++ b/src/funcs/incidentSettingsCreateSeverityMatrixImpact.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a severity matrix impact + * + * @remarks + * Create a new impact + */ +export function incidentSettingsCreateSeverityMatrixImpact( + client: FirehydrantCore, + request: components.CreateSeverityMatrixImpact, + options?: RequestOptions, +): APIPromise< + Result< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateSeverityMatrixImpact, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + components.CreateSeverityMatrixImpact$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/severity_matrix/impacts")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_severity_matrix_impact", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.SeverityMatrixImpactEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsCreateTicketingPriority.ts b/src/funcs/incidentSettingsCreateTicketingPriority.ts deleted file mode 100644 index 56aa5cf5..00000000 --- a/src/funcs/incidentSettingsCreateTicketingPriority.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a ticketing priority - * - * @remarks - * Create a single ticketing priority - */ -export async function incidentSettingsCreateTicketingPriority( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1TicketingPriorities, - options?: RequestOptions, -): Promise< - Result< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1TicketingPriorities$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/ticketing/priorities")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTicketingPriority", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TicketingPriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsDeleteCustomFieldDefinition.ts b/src/funcs/incidentSettingsDeleteCustomFieldDefinition.ts index 20e887fe..822c6777 100644 --- a/src/funcs/incidentSettingsDeleteCustomFieldDefinition.ts +++ b/src/funcs/incidentSettingsDeleteCustomFieldDefinition.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Delete a custom field definition */ -export async function incidentSettingsDeleteCustomFieldDefinition( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsDeleteCustomFieldDefinition( + client: FirehydrantCore, request: operations.DeleteCustomFieldDefinitionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsDeleteCustomFieldDefinition( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteCustomFieldDefinitionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.OrganizationsCustomFieldDefinitionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function incidentSettingsDeleteCustomFieldDefinition( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -74,16 +95,17 @@ export async function incidentSettingsDeleteCustomFieldDefinition( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteCustomFieldDefinition", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_custom_field_definition", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +127,23 @@ export async function incidentSettingsDeleteCustomFieldDefinition( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -170,23 +156,12 @@ export async function incidentSettingsDeleteCustomFieldDefinition( 200, components.OrganizationsCustomFieldDefinitionEntity$inboundSchema, ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsDeleteIncidentRole.ts b/src/funcs/incidentSettingsDeleteIncidentRole.ts new file mode 100644 index 00000000..5a44945d --- /dev/null +++ b/src/funcs/incidentSettingsDeleteIncidentRole.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive an incident role + * + * @remarks + * Archives an incident role which will hide it from lists and metrics + */ +export function incidentSettingsDeleteIncidentRole( + client: FirehydrantCore, + request: operations.DeleteIncidentRoleRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentRoleEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentRoleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentRoleEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteIncidentRoleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_role_id: encodeSimple( + "incident_role_id", + payload.incident_role_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/incident_roles/{incident_role_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_role", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentRoleEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentRoleEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsDeleteIncidentType.ts b/src/funcs/incidentSettingsDeleteIncidentType.ts new file mode 100644 index 00000000..8c83d90a --- /dev/null +++ b/src/funcs/incidentSettingsDeleteIncidentType.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive an incident type + * + * @remarks + * Archives an incident type which will hide it from lists and metrics + */ +export function incidentSettingsDeleteIncidentType( + client: FirehydrantCore, + request: operations.DeleteIncidentTypeRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentTypeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteIncidentTypeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incident_types/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_type", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentTypeEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsDeleteLifecycleMeasurementDefinition.ts b/src/funcs/incidentSettingsDeleteLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..3e2994e4 --- /dev/null +++ b/src/funcs/incidentSettingsDeleteLifecycleMeasurementDefinition.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive a measurement definition + * + * @remarks + * Archives a measurement definition which will hide it from lists and metrics + */ +export function incidentSettingsDeleteLifecycleMeasurementDefinition( + client: FirehydrantCore, + request: operations.DeleteLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteLifecycleMeasurementDefinitionRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + measurement_definition_id: encodeSimple( + "measurement_definition_id", + payload.measurement_definition_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/lifecycles/measurement_definitions/{measurement_definition_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_lifecycle_measurement_definition", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsDeleteLifecycleMilestone.ts b/src/funcs/incidentSettingsDeleteLifecycleMilestone.ts index 7ec281a5..63725165 100644 --- a/src/funcs/incidentSettingsDeleteLifecycleMilestone.ts +++ b/src/funcs/incidentSettingsDeleteLifecycleMilestone.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Delete a lifecycle milestone + * Delete a milestone * * @remarks * Delete a milestone */ -export async function incidentSettingsDeleteLifecycleMilestone( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsDeleteLifecycleMilestone( + client: FirehydrantCore, request: operations.DeleteLifecycleMilestoneRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.LifecyclesPhaseEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsDeleteLifecycleMilestone( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteLifecycleMilestoneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.LifecyclesPhaseEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function incidentSettingsDeleteLifecycleMilestone( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -74,16 +95,17 @@ export async function incidentSettingsDeleteLifecycleMilestone( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteLifecycleMilestone", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_lifecycle_milestone", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +127,23 @@ export async function incidentSettingsDeleteLifecycleMilestone( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.LifecyclesPhaseEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -167,23 +153,12 @@ export async function incidentSettingsDeleteLifecycleMilestone( | ConnectionError >( M.json(200, components.LifecyclesPhaseEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsDeletePriority.ts b/src/funcs/incidentSettingsDeletePriority.ts index b9a7475d..706ef9e9 100644 --- a/src/funcs/incidentSettingsDeletePriority.ts +++ b/src/funcs/incidentSettingsDeletePriority.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Delete a specific priority */ -export async function incidentSettingsDeletePriority( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsDeletePriority( + client: FirehydrantCore, request: operations.DeletePriorityRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsDeletePriority( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeletePriorityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsDeletePriority( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,16 +92,17 @@ export async function incidentSettingsDeletePriority( const path = pathToFunc("/v1/priorities/{priority_slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deletePriority", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_priority", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function incidentSettingsDeletePriority( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function incidentSettingsDeletePriority( | ConnectionError >( M.json(200, components.PriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsDeleteRole.ts b/src/funcs/incidentSettingsDeleteRole.ts deleted file mode 100644 index d116c500..00000000 --- a/src/funcs/incidentSettingsDeleteRole.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive an incident role - * - * @remarks - * Archives an incident role which will hide it from lists and metrics - */ -export async function incidentSettingsDeleteRole( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentRoleRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteIncidentRoleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_role_id: encodeSimple( - "incident_role_id", - payload.incident_role_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/incident_roles/{incident_role_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentRole", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentRoleEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsDeleteSeverity.ts b/src/funcs/incidentSettingsDeleteSeverity.ts index 7a994a0d..5550eb66 100644 --- a/src/funcs/incidentSettingsDeleteSeverity.ts +++ b/src/funcs/incidentSettingsDeleteSeverity.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Delete a specific severity */ -export async function incidentSettingsDeleteSeverity( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsDeleteSeverity( + client: FirehydrantCore, request: operations.DeleteSeverityRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsDeleteSeverity( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteSeverityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsDeleteSeverity( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,16 +92,17 @@ export async function incidentSettingsDeleteSeverity( const path = pathToFunc("/v1/severities/{severity_slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteSeverity", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_severity", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function incidentSettingsDeleteSeverity( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function incidentSettingsDeleteSeverity( | ConnectionError >( M.json(200, components.SeverityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsDeleteSeverityMatrixCondition.ts b/src/funcs/incidentSettingsDeleteSeverityMatrixCondition.ts index 556f6ec8..bd6b4bf0 100644 --- a/src/funcs/incidentSettingsDeleteSeverityMatrixCondition.ts +++ b/src/funcs/incidentSettingsDeleteSeverityMatrixCondition.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Delete a specific condition */ -export async function incidentSettingsDeleteSeverityMatrixCondition( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsDeleteSeverityMatrixCondition( + client: FirehydrantCore, request: operations.DeleteSeverityMatrixConditionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsDeleteSeverityMatrixCondition( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteSeverityMatrixConditionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixConditionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -60,7 +81,7 @@ export async function incidentSettingsDeleteSeverityMatrixCondition( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -76,16 +97,17 @@ export async function incidentSettingsDeleteSeverityMatrixCondition( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteSeverityMatrixCondition", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_severity_matrix_condition", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -107,59 +129,23 @@ export async function incidentSettingsDeleteSeverityMatrixCondition( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -169,23 +155,12 @@ export async function incidentSettingsDeleteSeverityMatrixCondition( | ConnectionError >( M.json(200, components.SeverityMatrixConditionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsDeleteSeverityMatrixImpact.ts b/src/funcs/incidentSettingsDeleteSeverityMatrixImpact.ts index 7de54393..6810d722 100644 --- a/src/funcs/incidentSettingsDeleteSeverityMatrixImpact.ts +++ b/src/funcs/incidentSettingsDeleteSeverityMatrixImpact.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Delete an impact from the severity matrix + * Delete a severity matrix impact * * @remarks * Delete a specific impact */ -export async function incidentSettingsDeleteSeverityMatrixImpact( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsDeleteSeverityMatrixImpact( + client: FirehydrantCore, request: operations.DeleteSeverityMatrixImpactRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsDeleteSeverityMatrixImpact( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteSeverityMatrixImpactRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function incidentSettingsDeleteSeverityMatrixImpact( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -74,16 +95,17 @@ export async function incidentSettingsDeleteSeverityMatrixImpact( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteSeverityMatrixImpact", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_severity_matrix_impact", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +127,23 @@ export async function incidentSettingsDeleteSeverityMatrixImpact( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -167,23 +153,12 @@ export async function incidentSettingsDeleteSeverityMatrixImpact( | ConnectionError >( M.json(200, components.SeverityMatrixImpactEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsGetFormConfiguration.ts b/src/funcs/incidentSettingsGetFormConfiguration.ts index 51c7c9d9..37bdce28 100644 --- a/src/funcs/incidentSettingsGetFormConfiguration.ts +++ b/src/funcs/incidentSettingsGetFormConfiguration.ts @@ -2,14 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -18,27 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Get a form configuration + * + * @remarks * Get a form configuration */ -export async function incidentSettingsGetFormConfiguration( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsGetFormConfiguration( + client: FirehydrantCore, request: operations.GetFormConfigurationRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.FormConfigurationEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -47,6 +45,32 @@ export async function incidentSettingsGetFormConfiguration( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetFormConfigurationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FormConfigurationEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -55,7 +79,7 @@ export async function incidentSettingsGetFormConfiguration( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,16 +93,17 @@ export async function incidentSettingsGetFormConfiguration( const path = pathToFunc("/v1/form_configurations/{slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getFormConfiguration", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_form_configuration", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -100,59 +125,23 @@ export async function incidentSettingsGetFormConfiguration( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.FormConfigurationEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -161,24 +150,13 @@ export async function incidentSettingsGetFormConfiguration( | RequestTimeoutError | ConnectionError >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(200, components.FormConfigurationEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsGetIncidentRole.ts b/src/funcs/incidentSettingsGetIncidentRole.ts index 31d8f5e3..631d1230 100644 --- a/src/funcs/incidentSettingsGetIncidentRole.ts +++ b/src/funcs/incidentSettingsGetIncidentRole.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Retrieve a single incident role from its ID */ -export async function incidentSettingsGetIncidentRole( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsGetIncidentRole( + client: FirehydrantCore, request: operations.GetIncidentRoleRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsGetIncidentRole( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentRoleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentRoleEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsGetIncidentRole( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -72,16 +93,17 @@ export async function incidentSettingsGetIncidentRole( const path = pathToFunc("/v1/incident_roles/{incident_role_id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getIncidentRole", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_role", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -103,59 +125,23 @@ export async function incidentSettingsGetIncidentRole( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -165,23 +151,12 @@ export async function incidentSettingsGetIncidentRole( | ConnectionError >( M.json(200, components.IncidentRoleEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsGetIncidentType.ts b/src/funcs/incidentSettingsGetIncidentType.ts index b91a43c6..6d1db2d5 100644 --- a/src/funcs/incidentSettingsGetIncidentType.ts +++ b/src/funcs/incidentSettingsGetIncidentType.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Retrieve a single incident type from its ID */ -export async function incidentSettingsGetIncidentType( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsGetIncidentType( + client: FirehydrantCore, request: operations.GetIncidentTypeRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsGetIncidentType( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentTypeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsGetIncidentType( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,16 +92,17 @@ export async function incidentSettingsGetIncidentType( const path = pathToFunc("/v1/incident_types/{id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getIncidentType", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_type", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function incidentSettingsGetIncidentType( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function incidentSettingsGetIncidentType( | ConnectionError >( M.json(200, components.IncidentTypeEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsGetLifecycleMeasurementDefinition.ts b/src/funcs/incidentSettingsGetLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..514e1e7c --- /dev/null +++ b/src/funcs/incidentSettingsGetLifecycleMeasurementDefinition.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a measurement definition + * + * @remarks + * Retrieve a single measurement definition from its ID + */ +export function incidentSettingsGetLifecycleMeasurementDefinition( + client: FirehydrantCore, + request: operations.GetLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetLifecycleMeasurementDefinitionRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + measurement_definition_id: encodeSimple( + "measurement_definition_id", + payload.measurement_definition_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/lifecycles/measurement_definitions/{measurement_definition_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_lifecycle_measurement_definition", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsGetPriority.ts b/src/funcs/incidentSettingsGetPriority.ts index 397e2256..0f11dd69 100644 --- a/src/funcs/incidentSettingsGetPriority.ts +++ b/src/funcs/incidentSettingsGetPriority.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Retrieve a specific priority */ -export async function incidentSettingsGetPriority( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsGetPriority( + client: FirehydrantCore, request: operations.GetPriorityRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsGetPriority( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetPriorityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsGetPriority( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,16 +92,17 @@ export async function incidentSettingsGetPriority( const path = pathToFunc("/v1/priorities/{priority_slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getPriority", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_priority", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function incidentSettingsGetPriority( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function incidentSettingsGetPriority( | ConnectionError >( M.json(200, components.PriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsGetSeverity.ts b/src/funcs/incidentSettingsGetSeverity.ts index ee5d00a9..eec12309 100644 --- a/src/funcs/incidentSettingsGetSeverity.ts +++ b/src/funcs/incidentSettingsGetSeverity.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Retrieve a specific severity */ -export async function incidentSettingsGetSeverity( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsGetSeverity( + client: FirehydrantCore, request: operations.GetSeverityRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsGetSeverity( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSeverityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsGetSeverity( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,16 +92,17 @@ export async function incidentSettingsGetSeverity( const path = pathToFunc("/v1/severities/{severity_slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getSeverity", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_severity", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function incidentSettingsGetSeverity( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function incidentSettingsGetSeverity( | ConnectionError >( M.json(200, components.SeverityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsGetSeverityMatrix.ts b/src/funcs/incidentSettingsGetSeverityMatrix.ts index ad801c13..efb4be61 100644 --- a/src/funcs/incidentSettingsGetSeverityMatrix.ts +++ b/src/funcs/incidentSettingsGetSeverityMatrix.ts @@ -2,8 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -16,8 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -26,18 +27,12 @@ import { Result } from "../types/fp.js"; * @remarks * Retrieve the Severity matrix for your organization and its components and configured severities. */ -export async function incidentSettingsGetSeverityMatrix( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsGetSeverityMatrix( + client: FirehydrantCore, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityMatrixSeverityMatrixEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -46,19 +41,44 @@ export async function incidentSettingsGetSeverityMatrix( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixSeverityMatrixEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const path = pathToFunc("/v1/severity_matrix")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getSeverityMatrix", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_severity_matrix", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -79,59 +99,23 @@ export async function incidentSettingsGetSeverityMatrix( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityMatrixSeverityMatrixEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -141,23 +125,12 @@ export async function incidentSettingsGetSeverityMatrix( | ConnectionError >( M.json(200, components.SeverityMatrixSeverityMatrixEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsGetSeverityMatrixCondition.ts b/src/funcs/incidentSettingsGetSeverityMatrixCondition.ts index b46e45cb..83cfc82c 100644 --- a/src/funcs/incidentSettingsGetSeverityMatrixCondition.ts +++ b/src/funcs/incidentSettingsGetSeverityMatrixCondition.ts @@ -2,14 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -18,27 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * Get a severity matrix condition + * + * @remarks + * Retrieve a specific condition */ -export async function incidentSettingsGetSeverityMatrixCondition( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsGetSeverityMatrixCondition( + client: FirehydrantCore, request: operations.GetSeverityMatrixConditionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.SeverityMatrixConditionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -47,6 +45,32 @@ export async function incidentSettingsGetSeverityMatrixCondition( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSeverityMatrixConditionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixConditionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -55,7 +79,7 @@ export async function incidentSettingsGetSeverityMatrixCondition( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,16 +95,17 @@ export async function incidentSettingsGetSeverityMatrixCondition( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getSeverityMatrixCondition", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_severity_matrix_condition", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +127,23 @@ export async function incidentSettingsGetSeverityMatrixCondition( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.SeverityMatrixConditionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -163,24 +152,13 @@ export async function incidentSettingsGetSeverityMatrixCondition( | RequestTimeoutError | ConnectionError >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(200, components.SeverityMatrixConditionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListCustomFieldDefinitions.ts b/src/funcs/incidentSettingsListCustomFieldDefinitions.ts index 0eff83f3..18459f9c 100644 --- a/src/funcs/incidentSettingsListCustomFieldDefinitions.ts +++ b/src/funcs/incidentSettingsListCustomFieldDefinitions.ts @@ -2,8 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -16,8 +17,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -26,18 +27,12 @@ import { Result } from "../types/fp.js"; * @remarks * List all custom field definitions */ -export async function incidentSettingsListCustomFieldDefinitions( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListCustomFieldDefinitions( + client: FirehydrantCore, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -46,19 +41,44 @@ export async function incidentSettingsListCustomFieldDefinitions( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.OrganizationsCustomFieldDefinitionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const path = pathToFunc("/v1/custom_fields/definitions")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listCustomFieldDefinitions", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_custom_field_definitions", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -79,59 +99,23 @@ export async function incidentSettingsListCustomFieldDefinitions( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -144,23 +128,12 @@ export async function incidentSettingsListCustomFieldDefinitions( 200, components.OrganizationsCustomFieldDefinitionEntity$inboundSchema, ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListCustomFieldSelectOptions.ts b/src/funcs/incidentSettingsListCustomFieldSelectOptions.ts new file mode 100644 index 00000000..ae54ac55 --- /dev/null +++ b/src/funcs/incidentSettingsListCustomFieldSelectOptions.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get available values for a custom field + * + * @remarks + * Get the permissible values for the a currently active custom select or multi-select field. + */ +export function incidentSettingsListCustomFieldSelectOptions( + client: FirehydrantCore, + request: operations.ListCustomFieldSelectOptionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.OrganizationsCustomFieldDefinitionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListCustomFieldSelectOptionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.OrganizationsCustomFieldDefinitionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListCustomFieldSelectOptionsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + field_id: encodeSimple("field_id", payload.field_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/custom_fields/definitions/{field_id}/select_options", + )(pathParams); + + const query = encodeFormQuery({ + "all_versions": payload.all_versions, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_custom_field_select_options", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.OrganizationsCustomFieldDefinitionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.OrganizationsCustomFieldDefinitionEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsListIncidentRoles.ts b/src/funcs/incidentSettingsListIncidentRoles.ts new file mode 100644 index 00000000..837cee64 --- /dev/null +++ b/src/funcs/incidentSettingsListIncidentRoles.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List incident roles + * + * @remarks + * List all of the incident roles in the organization + */ +export function incidentSettingsListIncidentRoles( + client: FirehydrantCore, + request: operations.ListIncidentRolesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentRoleEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentRolesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentRoleEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListIncidentRolesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/incident_roles")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_roles", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentRoleEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentRoleEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsListIncidentTags.ts b/src/funcs/incidentSettingsListIncidentTags.ts index 92d3b801..8a4ebd21 100644 --- a/src/funcs/incidentSettingsListIncidentTags.ts +++ b/src/funcs/incidentSettingsListIncidentTags.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * List all of the incident tags in the organization */ -export async function incidentSettingsListIncidentTags( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListIncidentTags( + client: FirehydrantCore, request: operations.ListIncidentTagsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.TagEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsListIncidentTags( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentTagsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TagEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsListIncidentTags( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -68,16 +89,17 @@ export async function incidentSettingsListIncidentTags( "prefix": payload.prefix, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listIncidentTags", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_tags", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -100,59 +122,23 @@ export async function incidentSettingsListIncidentTags( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.TagEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -162,23 +148,12 @@ export async function incidentSettingsListIncidentTags( | ConnectionError >( M.json(200, components.TagEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListIncidentTypes.ts b/src/funcs/incidentSettingsListIncidentTypes.ts index b9e5f265..31c62468 100644 --- a/src/funcs/incidentSettingsListIncidentTypes.ts +++ b/src/funcs/incidentSettingsListIncidentTypes.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * List all of the incident types in the organization */ -export async function incidentSettingsListIncidentTypes( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListIncidentTypes( + client: FirehydrantCore, request: operations.ListIncidentTypesRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IncidentTypeEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsListIncidentTypes( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentTypesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentTypeEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsListIncidentTypes( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -70,16 +91,17 @@ export async function incidentSettingsListIncidentTypes( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listIncidentTypes", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_types", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function incidentSettingsListIncidentTypes( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IncidentTypeEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function incidentSettingsListIncidentTypes( | ConnectionError >( M.json(200, components.IncidentTypeEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListLifecycleMeasurementDefinitions.ts b/src/funcs/incidentSettingsListLifecycleMeasurementDefinitions.ts new file mode 100644 index 00000000..5c280a58 --- /dev/null +++ b/src/funcs/incidentSettingsListLifecycleMeasurementDefinitions.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List measurement definitions + * + * @remarks + * List all of the measurement definitions in the organization + */ +export function incidentSettingsListLifecycleMeasurementDefinitions( + client: FirehydrantCore, + request: operations.ListLifecycleMeasurementDefinitionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListLifecycleMeasurementDefinitionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListLifecycleMeasurementDefinitionsRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/lifecycles/measurement_definitions")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_lifecycle_measurement_definitions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsListLifecyclePhases.ts b/src/funcs/incidentSettingsListLifecyclePhases.ts index d8bf2560..c813f46b 100644 --- a/src/funcs/incidentSettingsListLifecyclePhases.ts +++ b/src/funcs/incidentSettingsListLifecyclePhases.ts @@ -2,8 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; @@ -16,28 +17,22 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * List lifecycle phases and milestones + * List phases and milestones * * @remarks * List all of the lifecycle phases and milestones in the organization */ -export async function incidentSettingsListLifecyclePhases( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListLifecyclePhases( + client: FirehydrantCore, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.LifecyclesPhaseEntityList, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -46,19 +41,44 @@ export async function incidentSettingsListLifecyclePhases( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.LifecyclesPhaseEntityList, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const path = pathToFunc("/v1/lifecycles/phases")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listLifecyclePhases", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_lifecycle_phases", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -79,59 +99,23 @@ export async function incidentSettingsListLifecyclePhases( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.LifecyclesPhaseEntityList, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -141,23 +125,12 @@ export async function incidentSettingsListLifecyclePhases( | ConnectionError >( M.json(200, components.LifecyclesPhaseEntityList$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListPriorities.ts b/src/funcs/incidentSettingsListPriorities.ts index 5778d048..15708966 100644 --- a/src/funcs/incidentSettingsListPriorities.ts +++ b/src/funcs/incidentSettingsListPriorities.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Lists priorities */ -export async function incidentSettingsListPriorities( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListPriorities( + client: FirehydrantCore, request: operations.ListPrioritiesRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsListPriorities( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListPrioritiesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsListPriorities( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,16 +90,17 @@ export async function incidentSettingsListPriorities( "per_page": payload.per_page, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listPriorities", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_priorities", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -101,59 +123,23 @@ export async function incidentSettingsListPriorities( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -163,23 +149,12 @@ export async function incidentSettingsListPriorities( | ConnectionError >( M.json(200, components.PriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListRoles.ts b/src/funcs/incidentSettingsListRoles.ts deleted file mode 100644 index aa51833a..00000000 --- a/src/funcs/incidentSettingsListRoles.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List incident roles - * - * @remarks - * List all of the incident roles in the organization - */ -export async function incidentSettingsListRoles( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentRolesRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentRoleEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListIncidentRolesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/incident_roles")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentRoles", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentRoleEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentRoleEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsListSelectOptions.ts b/src/funcs/incidentSettingsListSelectOptions.ts deleted file mode 100644 index f35b090c..00000000 --- a/src/funcs/incidentSettingsListSelectOptions.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List select options for a custom field - * - * @remarks - * Get the permissible values for the a currently active custom select or multi-select field. - */ -export async function incidentSettingsListSelectOptions( - client: FirehydrantTypescriptSDKCore, - request: operations.GetCustomFieldSelectOptionsRequest, - options?: RequestOptions, -): Promise< - Result< - components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetCustomFieldSelectOptionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - field_id: encodeSimple("field_id", payload.field_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/custom_fields/definitions/{field_id}/select_options", - )(pathParams); - - const query = encodeFormQuery({ - "all_versions": payload.all_versions, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getCustomFieldSelectOptions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.OrganizationsCustomFieldDefinitionEntity$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsListSeverities.ts b/src/funcs/incidentSettingsListSeverities.ts index c2241076..ee8c7d1b 100644 --- a/src/funcs/incidentSettingsListSeverities.ts +++ b/src/funcs/incidentSettingsListSeverities.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Lists severities */ -export async function incidentSettingsListSeverities( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListSeverities( + client: FirehydrantCore, request: operations.ListSeveritiesRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsListSeverities( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSeveritiesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function incidentSettingsListSeverities( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,16 +90,17 @@ export async function incidentSettingsListSeverities( "per_page": payload.per_page, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listSeverities", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_severities", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -101,59 +123,23 @@ export async function incidentSettingsListSeverities( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -163,23 +149,12 @@ export async function incidentSettingsListSeverities( | ConnectionError >( M.json(200, components.SeverityEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListSeverityMatrixConditions.ts b/src/funcs/incidentSettingsListSeverityMatrixConditions.ts index a28c1c86..f6baa760 100644 --- a/src/funcs/incidentSettingsListSeverityMatrixConditions.ts +++ b/src/funcs/incidentSettingsListSeverityMatrixConditions.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Lists conditions */ -export async function incidentSettingsListSeverityMatrixConditions( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListSeverityMatrixConditions( + client: FirehydrantCore, request: operations.ListSeverityMatrixConditionsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsListSeverityMatrixConditions( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSeverityMatrixConditionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixConditionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -60,7 +81,7 @@ export async function incidentSettingsListSeverityMatrixConditions( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -72,16 +93,17 @@ export async function incidentSettingsListSeverityMatrixConditions( "per_page": payload.per_page, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listSeverityMatrixConditions", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_severity_matrix_conditions", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -104,59 +126,23 @@ export async function incidentSettingsListSeverityMatrixConditions( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -166,23 +152,12 @@ export async function incidentSettingsListSeverityMatrixConditions( | ConnectionError >( M.json(200, components.SeverityMatrixConditionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListSeverityMatrixImpacts.ts b/src/funcs/incidentSettingsListSeverityMatrixImpacts.ts index 2c89c5c7..37d11021 100644 --- a/src/funcs/incidentSettingsListSeverityMatrixImpacts.ts +++ b/src/funcs/incidentSettingsListSeverityMatrixImpacts.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Lists impacts */ -export async function incidentSettingsListSeverityMatrixImpacts( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsListSeverityMatrixImpacts( + client: FirehydrantCore, request: operations.ListSeverityMatrixImpactsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsListSeverityMatrixImpacts( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSeverityMatrixImpactsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function incidentSettingsListSeverityMatrixImpacts( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -70,16 +91,17 @@ export async function incidentSettingsListSeverityMatrixImpacts( "per_page": payload.per_page, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listSeverityMatrixImpacts", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_severity_matrix_impacts", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function incidentSettingsListSeverityMatrixImpacts( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function incidentSettingsListSeverityMatrixImpacts( | ConnectionError >( M.json(200, components.SeverityMatrixImpactEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsListTicketingPriorities.ts b/src/funcs/incidentSettingsListTicketingPriorities.ts deleted file mode 100644 index cf78c0b0..00000000 --- a/src/funcs/incidentSettingsListTicketingPriorities.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * List ticketing priorities - * - * @remarks - * List all ticketing priorities available to the organization - */ -export async function incidentSettingsListTicketingPriorities( - client: FirehydrantTypescriptSDKCore, - options?: RequestOptions, -): Promise< - Result< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path = pathToFunc("/v1/ticketing/priorities")(); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTicketingPriorities", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingPriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsUpdateCondition.ts b/src/funcs/incidentSettingsUpdateCondition.ts deleted file mode 100644 index 98848584..00000000 --- a/src/funcs/incidentSettingsUpdateCondition.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a severity matrix condition - * - * @remarks - * Update a specific condition - */ -export async function incidentSettingsUpdateCondition( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateSeverityMatrixConditionRequest, - options?: RequestOptions, -): Promise< - Result< - components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateSeverityMatrixConditionRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1SeverityMatrixConditionsConditionId, - { explode: true }, - ); - - const pathParams = { - condition_id: encodeSimple("condition_id", payload.condition_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/severity_matrix/conditions/{condition_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateSeverityMatrixCondition", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.SeverityMatrixConditionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.SeverityMatrixConditionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsUpdateCustomFieldDefinition.ts b/src/funcs/incidentSettingsUpdateCustomFieldDefinition.ts index ebfc99ba..e65b0bda 100644 --- a/src/funcs/incidentSettingsUpdateCustomFieldDefinition.ts +++ b/src/funcs/incidentSettingsUpdateCustomFieldDefinition.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Update a single custom field definition */ -export async function incidentSettingsUpdateCustomFieldDefinition( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsUpdateCustomFieldDefinition( + client: FirehydrantCore, request: operations.UpdateCustomFieldDefinitionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsUpdateCustomFieldDefinition( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateCustomFieldDefinitionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.OrganizationsCustomFieldDefinitionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,14 +79,12 @@ export async function incidentSettingsUpdateCustomFieldDefinition( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1CustomFieldsDefinitionsFieldId, - { explode: true }, - ); + const body = encodeJSON("body", payload.update_custom_field_definition, { + explode: true, + }); const pathParams = { field_id: encodeSimple("field_id", payload.field_id, { @@ -78,17 +97,18 @@ export async function incidentSettingsUpdateCustomFieldDefinition( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateCustomFieldDefinition", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_custom_field_definition", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -110,59 +130,23 @@ export async function incidentSettingsUpdateCustomFieldDefinition( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.OrganizationsCustomFieldDefinitionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -175,23 +159,12 @@ export async function incidentSettingsUpdateCustomFieldDefinition( 200, components.OrganizationsCustomFieldDefinitionEntity$inboundSchema, ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsUpdateImpact.ts b/src/funcs/incidentSettingsUpdateImpact.ts deleted file mode 100644 index 58491b83..00000000 --- a/src/funcs/incidentSettingsUpdateImpact.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an impact in the severity matrix - * - * @remarks - * Update a specific impact - */ -export async function incidentSettingsUpdateImpact( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateSeverityMatrixImpactRequest, - options?: RequestOptions, -): Promise< - Result< - components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateSeverityMatrixImpactRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1SeverityMatrixImpactsImpactId, - { explode: true }, - ); - - const pathParams = { - impact_id: encodeSimple("impact_id", payload.impact_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/severity_matrix/impacts/{impact_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateSeverityMatrixImpact", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.SeverityMatrixImpactEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.SeverityMatrixImpactEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsUpdateIncidentRole.ts b/src/funcs/incidentSettingsUpdateIncidentRole.ts index c85340a3..0455c0bf 100644 --- a/src/funcs/incidentSettingsUpdateIncidentRole.ts +++ b/src/funcs/incidentSettingsUpdateIncidentRole.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Update a single incident role from its ID */ -export async function incidentSettingsUpdateIncidentRole( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsUpdateIncidentRole( + client: FirehydrantCore, request: operations.UpdateIncidentRoleRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsUpdateIncidentRole( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentRoleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentRoleEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,10 +78,10 @@ export async function incidentSettingsUpdateIncidentRole( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1IncidentRolesIncidentRoleId, { + const body = encodeJSON("body", payload.update_incident_role, { explode: true, }); @@ -74,17 +95,18 @@ export async function incidentSettingsUpdateIncidentRole( const path = pathToFunc("/v1/incident_roles/{incident_role_id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateIncidentRole", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_role", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -106,59 +128,23 @@ export async function incidentSettingsUpdateIncidentRole( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IncidentRoleEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -168,23 +154,12 @@ export async function incidentSettingsUpdateIncidentRole( | ConnectionError >( M.json(200, components.IncidentRoleEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsUpdateIncidentType.ts b/src/funcs/incidentSettingsUpdateIncidentType.ts new file mode 100644 index 00000000..3561f365 --- /dev/null +++ b/src/funcs/incidentSettingsUpdateIncidentType.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an incident type + * + * @remarks + * Update a single incident type from its ID + */ +export function incidentSettingsUpdateIncidentType( + client: FirehydrantCore, + request: operations.UpdateIncidentTypeRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentTypeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateIncidentTypeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_type, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incident_types/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_type", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentTypeEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsUpdateLifecycleMeasurementDefinition.ts b/src/funcs/incidentSettingsUpdateLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..7ca7d66a --- /dev/null +++ b/src/funcs/incidentSettingsUpdateLifecycleMeasurementDefinition.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a measurement definition + * + * @remarks + * Update a single measurement definition from its ID + */ +export function incidentSettingsUpdateLifecycleMeasurementDefinition( + client: FirehydrantCore, + request: operations.UpdateLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateLifecycleMeasurementDefinitionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateLifecycleMeasurementDefinitionRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + measurement_definition_id: encodeSimple( + "measurement_definition_id", + payload.measurement_definition_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/lifecycles/measurement_definitions/{measurement_definition_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_lifecycle_measurement_definition", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsUpdateLifecycleMilestone.ts b/src/funcs/incidentSettingsUpdateLifecycleMilestone.ts index 8a07f51c..86a7d7fe 100644 --- a/src/funcs/incidentSettingsUpdateLifecycleMilestone.ts +++ b/src/funcs/incidentSettingsUpdateLifecycleMilestone.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Update a lifecycle milestone + * Update a milestone * * @remarks * Update a milestone */ -export async function incidentSettingsUpdateLifecycleMilestone( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsUpdateLifecycleMilestone( + client: FirehydrantCore, request: operations.UpdateLifecycleMilestoneRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.LifecyclesPhaseEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsUpdateLifecycleMilestone( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateLifecycleMilestoneRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.LifecyclesPhaseEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function incidentSettingsUpdateLifecycleMilestone( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.RequestBody, { explode: true }); @@ -74,17 +95,18 @@ export async function incidentSettingsUpdateLifecycleMilestone( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateLifecycleMilestone", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_lifecycle_milestone", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -106,59 +128,23 @@ export async function incidentSettingsUpdateLifecycleMilestone( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.LifecyclesPhaseEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -168,23 +154,12 @@ export async function incidentSettingsUpdateLifecycleMilestone( | ConnectionError >( M.json(200, components.LifecyclesPhaseEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsUpdatePriority.ts b/src/funcs/incidentSettingsUpdatePriority.ts index 062a707a..492a99b8 100644 --- a/src/funcs/incidentSettingsUpdatePriority.ts +++ b/src/funcs/incidentSettingsUpdatePriority.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Update a specific priority */ -export async function incidentSettingsUpdatePriority( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsUpdatePriority( + client: FirehydrantCore, request: operations.UpdatePriorityRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsUpdatePriority( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdatePriorityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,12 +78,10 @@ export async function incidentSettingsUpdatePriority( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1PrioritiesPrioritySlug, { - explode: true, - }); + const body = encodeJSON("body", payload.update_priority, { explode: true }); const pathParams = { priority_slug: encodeSimple("priority_slug", payload.priority_slug, { @@ -73,17 +92,18 @@ export async function incidentSettingsUpdatePriority( const path = pathToFunc("/v1/priorities/{priority_slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updatePriority", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_priority", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +125,23 @@ export async function incidentSettingsUpdatePriority( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.PriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -167,23 +151,12 @@ export async function incidentSettingsUpdatePriority( | ConnectionError >( M.json(200, components.PriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsUpdateSeverity.ts b/src/funcs/incidentSettingsUpdateSeverity.ts index 4df10458..3ff8a9a3 100644 --- a/src/funcs/incidentSettingsUpdateSeverity.ts +++ b/src/funcs/incidentSettingsUpdateSeverity.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Update a specific severity */ -export async function incidentSettingsUpdateSeverity( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsUpdateSeverity( + client: FirehydrantCore, request: operations.UpdateSeverityRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsUpdateSeverity( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateSeverityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,12 +78,10 @@ export async function incidentSettingsUpdateSeverity( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1SeveritiesSeveritySlug, { - explode: true, - }); + const body = encodeJSON("body", payload.update_severity, { explode: true }); const pathParams = { severity_slug: encodeSimple("severity_slug", payload.severity_slug, { @@ -73,17 +92,18 @@ export async function incidentSettingsUpdateSeverity( const path = pathToFunc("/v1/severities/{severity_slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateSeverity", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_severity", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +125,23 @@ export async function incidentSettingsUpdateSeverity( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -167,23 +151,12 @@ export async function incidentSettingsUpdateSeverity( | ConnectionError >( M.json(200, components.SeverityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsUpdateSeverityMatrix.ts b/src/funcs/incidentSettingsUpdateSeverityMatrix.ts index 4c5aa919..ad807623 100644 --- a/src/funcs/incidentSettingsUpdateSeverityMatrix.ts +++ b/src/funcs/incidentSettingsUpdateSeverityMatrix.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,8 +19,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,19 +29,13 @@ import { Result } from "../types/fp.js"; * @remarks * Update available severities and impacts in your organization's severity matrix. */ -export async function incidentSettingsUpdateSeverityMatrix( - client: FirehydrantTypescriptSDKCore, - request: components.PatchV1SeverityMatrix, +export function incidentSettingsUpdateSeverityMatrix( + client: FirehydrantCore, + request: components.UpdateSeverityMatrix, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SeverityMatrixSeverityMatrixEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -49,31 +44,58 @@ export async function incidentSettingsUpdateSeverityMatrix( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.UpdateSeverityMatrix, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixSeverityMatrixEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => components.PatchV1SeverityMatrix$outboundSchema.parse(value), + (value) => components.UpdateSeverityMatrix$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/severity_matrix")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateSeverityMatrix", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_severity_matrix", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -95,59 +117,23 @@ export async function incidentSettingsUpdateSeverityMatrix( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SeverityMatrixSeverityMatrixEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -157,23 +143,12 @@ export async function incidentSettingsUpdateSeverityMatrix( | ConnectionError >( M.json(200, components.SeverityMatrixSeverityMatrixEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentSettingsUpdateSeverityMatrixCondition.ts b/src/funcs/incidentSettingsUpdateSeverityMatrixCondition.ts new file mode 100644 index 00000000..6b3e01b0 --- /dev/null +++ b/src/funcs/incidentSettingsUpdateSeverityMatrixCondition.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a severity matrix condition + * + * @remarks + * Update a severity matrix condition + */ +export function incidentSettingsUpdateSeverityMatrixCondition( + client: FirehydrantCore, + request: operations.UpdateSeverityMatrixConditionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.SeverityMatrixConditionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateSeverityMatrixConditionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixConditionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateSeverityMatrixConditionRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_severity_matrix_condition, { + explode: true, + }); + + const pathParams = { + condition_id: encodeSimple("condition_id", payload.condition_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/severity_matrix/conditions/{condition_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_severity_matrix_condition", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SeverityMatrixConditionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SeverityMatrixConditionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsUpdateSeverityMatrixImpact.ts b/src/funcs/incidentSettingsUpdateSeverityMatrixImpact.ts new file mode 100644 index 00000000..774ffadb --- /dev/null +++ b/src/funcs/incidentSettingsUpdateSeverityMatrixImpact.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a severity matrix impact + * + * @remarks + * Update a severity matrix impact + */ +export function incidentSettingsUpdateSeverityMatrixImpact( + client: FirehydrantCore, + request: operations.UpdateSeverityMatrixImpactRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateSeverityMatrixImpactRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateSeverityMatrixImpactRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_severity_matrix_impact, { + explode: true, + }); + + const pathParams = { + impact_id: encodeSimple("impact_id", payload.impact_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/severity_matrix/impacts/{impact_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_severity_matrix_impact", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SeverityMatrixImpactEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SeverityMatrixImpactEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentSettingsUpdateType.ts b/src/funcs/incidentSettingsUpdateType.ts deleted file mode 100644 index a2211181..00000000 --- a/src/funcs/incidentSettingsUpdateType.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an incident type - * - * @remarks - * Update a single incident type from its ID - */ -export async function incidentSettingsUpdateType( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentTypeRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateIncidentTypeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1IncidentTypesId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incident_types/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentType", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentTypeEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentSettingsValidateIncidentTags.ts b/src/funcs/incidentSettingsValidateIncidentTags.ts index ef60639d..16341840 100644 --- a/src/funcs/incidentSettingsValidateIncidentTags.ts +++ b/src/funcs/incidentSettingsValidateIncidentTags.ts @@ -3,9 +3,10 @@ */ import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -19,8 +20,8 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Validate the format of a list of tags */ -export async function incidentSettingsValidateIncidentTags( - client: FirehydrantTypescriptSDKCore, +export function incidentSettingsValidateIncidentTags( + client: FirehydrantCore, request: Array, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.TagEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function incidentSettingsValidateIncidentTags( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: Array, + options?: RequestOptions, +): Promise< + [ + Result< + components.TagEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,24 +78,25 @@ export async function incidentSettingsValidateIncidentTags( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/incident_tags/validate")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "validateIncidentTags", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "validate_incident_tags", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -96,59 +118,23 @@ export async function incidentSettingsValidateIncidentTags( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.TagEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -158,23 +144,12 @@ export async function incidentSettingsValidateIncidentTags( | ConnectionError >( M.json(201, components.TagEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/incidentsAddStatusPage.ts b/src/funcs/incidentsAddStatusPage.ts deleted file mode 100644 index 76fbd36d..00000000 --- a/src/funcs/incidentsAddStatusPage.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Add a status page to an incident - * - * @remarks - * Add a status page to an incident. - */ -export async function incidentsAddStatusPage( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentStatusPageRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsStatusPageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentStatusPageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1IncidentsIncidentIdStatusPages, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/status_pages")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentStatusPage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsStatusPageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.IncidentsStatusPageEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsArchive.ts b/src/funcs/incidentsArchive.ts deleted file mode 100644 index 3c95359d..00000000 --- a/src/funcs/incidentsArchive.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive an incident - * - * @remarks - * Archives an incident which will hide it from lists and metrics - */ -export async function incidentsArchive( - client: FirehydrantTypescriptSDKCore, - request: operations.ArchiveIncidentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ArchiveIncidentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "archiveIncident", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsBulkUpdateIncidentMilestones.ts b/src/funcs/incidentsBulkUpdateIncidentMilestones.ts new file mode 100644 index 00000000..c951a508 --- /dev/null +++ b/src/funcs/incidentsBulkUpdateIncidentMilestones.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update milestone times + * + * @remarks + * Update milestone times in bulk for a given incident. All milestone + * times for an incident must occur in chronological order + * corresponding to the configured order of milestones. If the result + * of this request would cause any milestone(s) to appear out of place, + * a 422 response will instead be returned. This includes milestones + * not explicitly submitted or updated in this request. + */ +export function incidentsBulkUpdateIncidentMilestones( + client: FirehydrantCore, + request: operations.BulkUpdateIncidentMilestonesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsMilestoneEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.BulkUpdateIncidentMilestonesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsMilestoneEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.BulkUpdateIncidentMilestonesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.bulk_update_incident_milestones, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/milestones/bulk_update")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "bulk_update_incident_milestones", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsMilestoneEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsMilestoneEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsClose.ts b/src/funcs/incidentsClose.ts deleted file mode 100644 index 0592cd7a..00000000 --- a/src/funcs/incidentsClose.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Close an incident - * - * @remarks - * Closes an incident and optionally close all children - */ -export async function incidentsClose( - client: FirehydrantTypescriptSDKCore, - request: operations.CloseIncidentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.CloseIncidentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/close")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "closeIncident", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCloseIncident.ts b/src/funcs/incidentsCloseIncident.ts new file mode 100644 index 00000000..5af53fcd --- /dev/null +++ b/src/funcs/incidentsCloseIncident.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Close an incident + * + * @remarks + * Closes an incident and optionally close all children + */ +export function incidentsCloseIncident( + client: FirehydrantCore, + request: operations.CloseIncidentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CloseIncidentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CloseIncidentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/close")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "close_incident", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreate.ts b/src/funcs/incidentsCreate.ts deleted file mode 100644 index b1b3a308..00000000 --- a/src/funcs/incidentsCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create an incident - * - * @remarks - * Create a new incident - */ -export async function incidentsCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Incidents, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Incidents$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/incidents")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncident", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateAttachment.ts b/src/funcs/incidentsCreateAttachment.ts deleted file mode 100644 index 0e09475b..00000000 --- a/src/funcs/incidentsCreateAttachment.ts +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { readableStreamToArrayBuffer } from "../lib/files.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { isBlobLike } from "../types/blobs.js"; -import { Result } from "../types/fp.js"; -import { isReadableStream } from "../types/streams.js"; - -/** - * Create an attachment for an incident - * - * @remarks - * Allows adding image attachments to an incident - */ -export async function incidentsCreateAttachment( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentAttachmentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentAttachmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentAttachmentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = new FormData(); - - if (isBlobLike(payload.RequestBody.file)) { - body.append("file", payload.RequestBody.file); - } else if (isReadableStream(payload.RequestBody.file.content)) { - const buffer = await readableStreamToArrayBuffer( - payload.RequestBody.file.content, - ); - const blob = new Blob([buffer], { type: "application/octet-stream" }); - body.append("file", blob); - } else { - body.append( - "file", - new Blob([payload.RequestBody.file.content], { - type: "application/octet-stream", - }), - payload.RequestBody.file.fileName, - ); - } - if (payload.RequestBody.description !== undefined) { - body.append("description", payload.RequestBody.description); - } - if (payload.RequestBody.occurred_at !== undefined) { - body.append("occurred_at", payload.RequestBody.occurred_at); - } - if (payload.RequestBody.vote_direction !== undefined) { - body.append("vote_direction", payload.RequestBody.vote_direction); - } - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/attachments")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentAttachment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentAttachmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.IncidentAttachmentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateGenericChatMessage.ts b/src/funcs/incidentsCreateGenericChatMessage.ts deleted file mode 100644 index 8cb23779..00000000 --- a/src/funcs/incidentsCreateGenericChatMessage.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a chat message for an incident - * - * @remarks - * Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. - */ -export async function incidentsCreateGenericChatMessage( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentGenericChatMessageRequest, - options?: RequestOptions, -): Promise< - Result< - components.EventGenericChatMessageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentGenericChatMessageRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1IncidentsIncidentIdGenericChatMessages, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/generic_chat_messages")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentGenericChatMessage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EventGenericChatMessageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.EventGenericChatMessageEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateImpact.ts b/src/funcs/incidentsCreateImpact.ts deleted file mode 100644 index 2ffa6f36..00000000 --- a/src/funcs/incidentsCreateImpact.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Add impacted infrastructure to an incident - * - * @remarks - * Add impacted infrastructure to an incident - */ -export async function incidentsCreateImpact( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentImpactRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentImpactEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentImpactRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1IncidentsIncidentIdImpactType, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - type: encodeSimple("type", payload.type, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/impact/{type}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentImpact", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentImpactEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.IncidentImpactEntity$inboundSchema), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateIncident.ts b/src/funcs/incidentsCreateIncident.ts new file mode 100644 index 00000000..4444e938 --- /dev/null +++ b/src/funcs/incidentsCreateIncident.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create an incident + * + * @remarks + * Create a new incident + */ +export function incidentsCreateIncident( + client: FirehydrantCore, + request: components.CreateIncident, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateIncident, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateIncident$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/incidents")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentAttachment.ts b/src/funcs/incidentsCreateIncidentAttachment.ts new file mode 100644 index 00000000..81784b14 --- /dev/null +++ b/src/funcs/incidentsCreateIncidentAttachment.ts @@ -0,0 +1,195 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { appendForm, encodeSimple } from "../lib/encodings.js"; +import { readableStreamToArrayBuffer } from "../lib/files.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { isBlobLike } from "../types/blobs.js"; +import { Result } from "../types/fp.js"; +import { isReadableStream } from "../types/streams.js"; + +/** + * Add an attachment to the incident timeline + * + * @remarks + * Allows adding image attachments to an incident + */ +export function incidentsCreateIncidentAttachment( + client: FirehydrantCore, + request: operations.CreateIncidentAttachmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentAttachmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentAttachmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentAttachmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentAttachmentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = new FormData(); + + if (isBlobLike(payload.RequestBody.file)) { + appendForm(body, "file", payload.RequestBody.file); + } else if (isReadableStream(payload.RequestBody.file.content)) { + const buffer = await readableStreamToArrayBuffer( + payload.RequestBody.file.content, + ); + const blob = new Blob([buffer], { type: "application/octet-stream" }); + appendForm(body, "file", blob); + } else { + appendForm( + body, + "file", + new Blob([payload.RequestBody.file.content], { + type: "application/octet-stream", + }), + payload.RequestBody.file.fileName, + ); + } + if (payload.RequestBody.description !== undefined) { + appendForm(body, "description", payload.RequestBody.description); + } + if (payload.RequestBody.occurred_at !== undefined) { + appendForm(body, "occurred_at", payload.RequestBody.occurred_at); + } + if (payload.RequestBody.vote_direction !== undefined) { + appendForm(body, "vote_direction", payload.RequestBody.vote_direction); + } + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/attachments")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_attachment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentAttachmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentAttachmentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentChangeEvent.ts b/src/funcs/incidentsCreateIncidentChangeEvent.ts new file mode 100644 index 00000000..3e7422ad --- /dev/null +++ b/src/funcs/incidentsCreateIncidentChangeEvent.ts @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add a related change to an incident + * + * @remarks + * Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. + */ +export function incidentsCreateIncidentChangeEvent( + client: FirehydrantCore, + request: operations.CreateIncidentChangeEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRelatedChangeEventEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentChangeEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRelatedChangeEventEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentChangeEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_change_event, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/related_change_events")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_change_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "409", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.IncidentsRelatedChangeEventEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentsRelatedChangeEventEntity$inboundSchema), + M.jsonErr([400, 409], errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentChatMessage.ts b/src/funcs/incidentsCreateIncidentChatMessage.ts new file mode 100644 index 00000000..660e5742 --- /dev/null +++ b/src/funcs/incidentsCreateIncidentChatMessage.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add a chat message to an incident + * + * @remarks + * Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. + */ +export function incidentsCreateIncidentChatMessage( + client: FirehydrantCore, + request: operations.CreateIncidentChatMessageRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentChatMessageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentChatMessageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_chat_message, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/generic_chat_messages")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_chat_message", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.EventGenericChatMessageEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentImpact.ts b/src/funcs/incidentsCreateIncidentImpact.ts new file mode 100644 index 00000000..52e5f215 --- /dev/null +++ b/src/funcs/incidentsCreateIncidentImpact.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add impacted infrastructure to an incident + * + * @remarks + * Add impacted infrastructure to an incident + */ +export function incidentsCreateIncidentImpact( + client: FirehydrantCore, + request: operations.CreateIncidentImpactRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentImpactEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentImpactRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentImpactEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentImpactRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_impact, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + type: encodeSimple("type", payload.type, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/impact/{type}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_impact", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.IncidentImpactEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentImpactEntity$inboundSchema), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentLink.ts b/src/funcs/incidentsCreateIncidentLink.ts new file mode 100644 index 00000000..d5d89169 --- /dev/null +++ b/src/funcs/incidentsCreateIncidentLink.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add a link to an incident + * + * @remarks + * Allows adding adhoc links to an incident as an attachment + */ +export function incidentsCreateIncidentLink( + client: FirehydrantCore, + request: operations.CreateIncidentLinkRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AttachmentsLinkEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentLinkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AttachmentsLinkEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateIncidentLinkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_link, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/links")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_link", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AttachmentsLinkEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.AttachmentsLinkEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentNote.ts b/src/funcs/incidentsCreateIncidentNote.ts new file mode 100644 index 00000000..d5d2714c --- /dev/null +++ b/src/funcs/incidentsCreateIncidentNote.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add a note to an incident + * + * @remarks + * Create a new note on for an incident. The visibility field on a note determines where it gets posted. + */ +export function incidentsCreateIncidentNote( + client: FirehydrantCore, + request: operations.CreateIncidentNoteRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EventNoteEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentNoteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventNoteEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateIncidentNoteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_note, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/notes")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_note", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventNoteEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.EventNoteEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentRoleAssignment.ts b/src/funcs/incidentsCreateIncidentRoleAssignment.ts new file mode 100644 index 00000000..d8e1a84d --- /dev/null +++ b/src/funcs/incidentsCreateIncidentRoleAssignment.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Assign a user to an incident + * + * @remarks + * Assign a role to a user for this incident + */ +export function incidentsCreateIncidentRoleAssignment( + client: FirehydrantCore, + request: operations.CreateIncidentRoleAssignmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentRoleAssignmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentRoleAssignmentRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_role_assignment, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/role_assignments")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_role_assignment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentsRoleAssignmentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentStatusPage.ts b/src/funcs/incidentsCreateIncidentStatusPage.ts new file mode 100644 index 00000000..897ef041 --- /dev/null +++ b/src/funcs/incidentsCreateIncidentStatusPage.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add a status page to an incident + * + * @remarks + * Add a status page to an incident. + */ +export function incidentsCreateIncidentStatusPage( + client: FirehydrantCore, + request: operations.CreateIncidentStatusPageRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsStatusPageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentStatusPageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsStatusPageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentStatusPageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_status_page, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/status_pages")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_status_page", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsStatusPageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentsStatusPageEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateIncidentTeamAssignment.ts b/src/funcs/incidentsCreateIncidentTeamAssignment.ts new file mode 100644 index 00000000..69316769 --- /dev/null +++ b/src/funcs/incidentsCreateIncidentTeamAssignment.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Assign a team to an incident + * + * @remarks + * Assign a team for this incident + */ +export function incidentsCreateIncidentTeamAssignment( + client: FirehydrantCore, + request: operations.CreateIncidentTeamAssignmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentTeamAssignmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentTeamAssignmentRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_team_assignment, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/team_assignments")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_team_assignment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateLink.ts b/src/funcs/incidentsCreateLink.ts deleted file mode 100644 index 418e52b7..00000000 --- a/src/funcs/incidentsCreateLink.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a link for an incident - * - * @remarks - * Allows adding adhoc links to an incident as an attachment - */ -export async function incidentsCreateLink( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentLinkRequest, - options?: RequestOptions, -): Promise< - Result< - components.AttachmentsLinkEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.CreateIncidentLinkRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1IncidentsIncidentIdLinks, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/links")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentLink", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.AttachmentsLinkEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.AttachmentsLinkEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateNote.ts b/src/funcs/incidentsCreateNote.ts deleted file mode 100644 index 4bb1fdf1..00000000 --- a/src/funcs/incidentsCreateNote.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a note for an incident - * - * @remarks - * Create a new note on for an incident. The visibility field on a note determines where it gets posted. - */ -export async function incidentsCreateNote( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentNoteRequest, - options?: RequestOptions, -): Promise< - Result< - components.EventNoteEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.CreateIncidentNoteRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1IncidentsIncidentIdNotes, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/notes")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentNote", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EventNoteEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.EventNoteEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateRelatedChange.ts b/src/funcs/incidentsCreateRelatedChange.ts deleted file mode 100644 index e2653895..00000000 --- a/src/funcs/incidentsCreateRelatedChange.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Add a related change to an incident - * - * @remarks - * Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. - */ -export async function incidentsCreateRelatedChange( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentRelatedChangeRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRelatedChangeEventEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentRelatedChangeRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1IncidentsIncidentIdRelatedChangeEvents, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/related_change_events")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentRelatedChange", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "409", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRelatedChangeEventEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.IncidentsRelatedChangeEventEntity$inboundSchema), - M.jsonErr([400, 409], errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateRoleAssignment.ts b/src/funcs/incidentsCreateRoleAssignment.ts deleted file mode 100644 index 70dae5d7..00000000 --- a/src/funcs/incidentsCreateRoleAssignment.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a role assignment for an incident - * - * @remarks - * Assign a role to a user for this incident - */ -export async function incidentsCreateRoleAssignment( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentRoleAssignmentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRoleAssignmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentRoleAssignmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1IncidentsIncidentIdRoleAssignments, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/role_assignments")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentRoleAssignment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRoleAssignmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.IncidentsRoleAssignmentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateScheduledMaintenance.ts b/src/funcs/incidentsCreateScheduledMaintenance.ts new file mode 100644 index 00000000..5a323b56 --- /dev/null +++ b/src/funcs/incidentsCreateScheduledMaintenance.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a scheduled maintenance event + * + * @remarks + * Create a new scheduled maintenance event + */ +export function incidentsCreateScheduledMaintenance( + client: FirehydrantCore, + request: components.CreateScheduledMaintenance, + options?: RequestOptions, +): APIPromise< + Result< + components.ScheduledMaintenanceEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateScheduledMaintenance, + options?: RequestOptions, +): Promise< + [ + Result< + components.ScheduledMaintenanceEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + components.CreateScheduledMaintenance$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/scheduled_maintenances")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_scheduled_maintenance", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.ScheduledMaintenanceEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.ScheduledMaintenanceEntity$inboundSchema), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsCreateTaskList.ts b/src/funcs/incidentsCreateTaskList.ts deleted file mode 100644 index f148e9b3..00000000 --- a/src/funcs/incidentsCreateTaskList.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Add tasks from a task list to an incident - * - * @remarks - * Add all tasks from list to incident - */ -export async function incidentsCreateTaskList( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentTaskListRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentTaskListRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1IncidentsIncidentIdTaskLists, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/task_lists")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentTaskList", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TaskEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsCreateTeamAssignment.ts b/src/funcs/incidentsCreateTeamAssignment.ts deleted file mode 100644 index 48b44ed8..00000000 --- a/src/funcs/incidentsCreateTeamAssignment.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Assign a team to an incident - * - * @remarks - * Assign a team for this incident - */ -export async function incidentsCreateTeamAssignment( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentTeamAssignmentRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateIncidentTeamAssignmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1IncidentsIncidentIdTeamAssignments, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/team_assignments")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentTeamAssignment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteAlert.ts b/src/funcs/incidentsDeleteAlert.ts deleted file mode 100644 index 55dfceb4..00000000 --- a/src/funcs/incidentsDeleteAlert.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an alert from an incident - * - * @remarks - * Remove an alert from an incident - */ -export async function incidentsDeleteAlert( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentAlertRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentAlertRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_alert_id: encodeSimple( - "incident_alert_id", - payload.incident_alert_id, - { explode: false, charEncoding: "percent" }, - ), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/alerts/{incident_alert_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentAlert", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteChatMessage.ts b/src/funcs/incidentsDeleteChatMessage.ts deleted file mode 100644 index 4387239a..00000000 --- a/src/funcs/incidentsDeleteChatMessage.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a chat message from an incident - * - * @remarks - * Delete an existing generic chat message on an incident. - */ -export async function incidentsDeleteChatMessage( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentChatMessageRequest, - options?: RequestOptions, -): Promise< - Result< - components.EventGenericChatMessageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentChatMessageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - message_id: encodeSimple("message_id", payload.message_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/generic_chat_messages/{message_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentChatMessage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EventGenericChatMessageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.EventGenericChatMessageEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteEvent.ts b/src/funcs/incidentsDeleteEvent.ts deleted file mode 100644 index c46d1d41..00000000 --- a/src/funcs/incidentsDeleteEvent.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an incident event - * - * @remarks - * Delete a single event for an incident - */ -export async function incidentsDeleteEvent( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentEventRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentEventRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - event_id: encodeSimple("event_id", payload.event_id, { - explode: false, - charEncoding: "percent", - }), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/events/{event_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEventEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteImpact.ts b/src/funcs/incidentsDeleteImpact.ts deleted file mode 100644 index 548bf6ca..00000000 --- a/src/funcs/incidentsDeleteImpact.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Remove impacted infrastructure from an incident - * - * @remarks - * Remove impacted infrastructure on an incident - */ -export async function incidentsDeleteImpact( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentImpactRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentImpactRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - type: encodeSimple("type", payload.type, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/impact/{type}/{id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentImpact", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteIncident.ts b/src/funcs/incidentsDeleteIncident.ts new file mode 100644 index 00000000..bb4cdafd --- /dev/null +++ b/src/funcs/incidentsDeleteIncident.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive an incident + * + * @remarks + * Archives an incident which will hide it from lists and metrics + */ +export function incidentsDeleteIncident( + client: FirehydrantCore, + request: operations.DeleteIncidentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteIncidentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteIncidentChatMessage.ts b/src/funcs/incidentsDeleteIncidentChatMessage.ts new file mode 100644 index 00000000..10d3897d --- /dev/null +++ b/src/funcs/incidentsDeleteIncidentChatMessage.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a chat message from an incident + * + * @remarks + * Delete an existing generic chat message on an incident. + */ +export function incidentsDeleteIncidentChatMessage( + client: FirehydrantCore, + request: operations.DeleteIncidentChatMessageRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentChatMessageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentChatMessageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + message_id: encodeSimple("message_id", payload.message_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/generic_chat_messages/{message_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_chat_message", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.EventGenericChatMessageEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteIncidentEvent.ts b/src/funcs/incidentsDeleteIncidentEvent.ts new file mode 100644 index 00000000..6d62215f --- /dev/null +++ b/src/funcs/incidentsDeleteIncidentEvent.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete an incident event + * + * @remarks + * Delete an event for an incident + */ +export function incidentsDeleteIncidentEvent( + client: FirehydrantCore, + request: operations.DeleteIncidentEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + event_id: encodeSimple("event_id", payload.event_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/events/{event_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEventEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteIncidentImpact.ts b/src/funcs/incidentsDeleteIncidentImpact.ts new file mode 100644 index 00000000..bc74abda --- /dev/null +++ b/src/funcs/incidentsDeleteIncidentImpact.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove impacted infrastructure from an incident + * + * @remarks + * Remove impacted infrastructure from an incident + */ +export function incidentsDeleteIncidentImpact( + client: FirehydrantCore, + request: operations.DeleteIncidentImpactRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentImpactRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentImpactRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + type: encodeSimple("type", payload.type, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/impact/{type}/{id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_impact", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteIncidentLink.ts b/src/funcs/incidentsDeleteIncidentLink.ts new file mode 100644 index 00000000..9ed8fe41 --- /dev/null +++ b/src/funcs/incidentsDeleteIncidentLink.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove a link from an incident + * + * @remarks + * Remove a link from an incident + */ +export function incidentsDeleteIncidentLink( + client: FirehydrantCore, + request: operations.DeleteIncidentLinkRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentLinkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteIncidentLinkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + link_id: encodeSimple("link_id", payload.link_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/links/{link_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_link", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteIncidentRoleAssignment.ts b/src/funcs/incidentsDeleteIncidentRoleAssignment.ts new file mode 100644 index 00000000..397b3345 --- /dev/null +++ b/src/funcs/incidentsDeleteIncidentRoleAssignment.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Unassign a user from an incident + * + * @remarks + * Unassign a role from a user + */ +export function incidentsDeleteIncidentRoleAssignment( + client: FirehydrantCore, + request: operations.DeleteIncidentRoleAssignmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentRoleAssignmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentRoleAssignmentRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + role_assignment_id: encodeSimple( + "role_assignment_id", + payload.role_assignment_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/role_assignments/{role_assignment_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_role_assignment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRoleAssignmentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteIncidentTeamAssignment.ts b/src/funcs/incidentsDeleteIncidentTeamAssignment.ts new file mode 100644 index 00000000..bf187657 --- /dev/null +++ b/src/funcs/incidentsDeleteIncidentTeamAssignment.ts @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { appendForm, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Unassign a team from an incident + * + * @remarks + * Unassign a team from an incident + */ +export function incidentsDeleteIncidentTeamAssignment( + client: FirehydrantCore, + request: operations.DeleteIncidentTeamAssignmentRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentTeamAssignmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentTeamAssignmentRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = new FormData(); + if (payload.RequestBody != null) { + if (payload.RequestBody.role_assignment_ids !== undefined) { + appendForm( + body, + "role_assignment_ids", + payload.RequestBody.role_assignment_ids, + ); + } + } + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + team_assignment_id: encodeSimple( + "team_assignment_id", + payload.team_assignment_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/team_assignments/{team_assignment_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_team_assignment", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteLink.ts b/src/funcs/incidentsDeleteLink.ts deleted file mode 100644 index 182cfca1..00000000 --- a/src/funcs/incidentsDeleteLink.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an external link from an incident - * - * @remarks - * Deletes the external incident link - */ -export async function incidentsDeleteLink( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentLinkRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteIncidentLinkRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - link_id: encodeSimple("link_id", payload.link_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/links/{link_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentLink", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteRoleAssignment.ts b/src/funcs/incidentsDeleteRoleAssignment.ts deleted file mode 100644 index 2f090f4f..00000000 --- a/src/funcs/incidentsDeleteRoleAssignment.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a role assignment from an incident - * - * @remarks - * Unassign a role from a user - */ -export async function incidentsDeleteRoleAssignment( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentRoleAssignmentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRoleAssignmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentRoleAssignmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - role_assignment_id: encodeSimple( - "role_assignment_id", - payload.role_assignment_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/role_assignments/{role_assignment_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentRoleAssignment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRoleAssignmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsRoleAssignmentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteScheduledMaintenance.ts b/src/funcs/incidentsDeleteScheduledMaintenance.ts new file mode 100644 index 00000000..b758157a --- /dev/null +++ b/src/funcs/incidentsDeleteScheduledMaintenance.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a scheduled maintenance event + * + * @remarks + * Delete a scheduled maintenance event, preventing it from taking place. + */ +export function incidentsDeleteScheduledMaintenance( + client: FirehydrantCore, + request: operations.DeleteScheduledMaintenanceRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteScheduledMaintenanceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteScheduledMaintenanceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + scheduled_maintenance_id: encodeSimple( + "scheduled_maintenance_id", + payload.scheduled_maintenance_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/scheduled_maintenances/{scheduled_maintenance_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_scheduled_maintenance", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsDeleteTeamAssignment.ts b/src/funcs/incidentsDeleteTeamAssignment.ts deleted file mode 100644 index 43852ef5..00000000 --- a/src/funcs/incidentsDeleteTeamAssignment.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Remove a team assignment from an incident - * - * @remarks - * Unassign a team from an incident - */ -export async function incidentsDeleteTeamAssignment( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentTeamAssignmentRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentTeamAssignmentRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = new FormData(); - if (payload.RequestBody != null) { - if (payload.RequestBody.role_assignment_ids !== undefined) { - body.append( - "role_assignment_ids", - String(payload.RequestBody.role_assignment_ids), - ); - } - } - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - team_assignment_id: encodeSimple( - "team_assignment_id", - payload.team_assignment_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/team_assignments/{team_assignment_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentTeamAssignment", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteTranscript.ts b/src/funcs/incidentsDeleteTranscript.ts deleted file mode 100644 index e1093e07..00000000 --- a/src/funcs/incidentsDeleteTranscript.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a transcript from an incident - */ -export async function incidentsDeleteTranscript( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentTranscriptRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentTranscriptRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - transcript_id: encodeSimple("transcript_id", payload.transcript_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/transcript/{transcript_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentTranscript", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsDeleteTranscriptEntry.ts b/src/funcs/incidentsDeleteTranscriptEntry.ts new file mode 100644 index 00000000..a7bc8fcf --- /dev/null +++ b/src/funcs/incidentsDeleteTranscriptEntry.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a transcript from an incident + * + * @remarks + * Delete a transcript from an incident + */ +export function incidentsDeleteTranscriptEntry( + client: FirehydrantCore, + request: operations.DeleteTranscriptEntryRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PublicApiv1IncidentsTranscriptEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTranscriptEntryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PublicApiv1IncidentsTranscriptEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteTranscriptEntryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + transcript_id: encodeSimple("transcript_id", payload.transcript_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/transcript/{transcript_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_transcript_entry", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PublicApiv1IncidentsTranscriptEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PublicApiv1IncidentsTranscriptEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGet.ts b/src/funcs/incidentsGet.ts deleted file mode 100644 index 07a0dcab..00000000 --- a/src/funcs/incidentsGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an incident - * - * @remarks - * Retrieve a single incident from its ID - */ -export async function incidentsGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetIncidentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncident", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsGetAiIncidentSummaryVoteStatus.ts b/src/funcs/incidentsGetAiIncidentSummaryVoteStatus.ts new file mode 100644 index 00000000..bd364a23 --- /dev/null +++ b/src/funcs/incidentsGetAiIncidentSummaryVoteStatus.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get the current user's vote status for an AI-generated incident summary + * + * @remarks + * Get the current user's vote status for an AI-generated incident summary + */ +export function incidentsGetAiIncidentSummaryVoteStatus( + client: FirehydrantCore, + request: operations.GetAiIncidentSummaryVoteStatusRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetAiIncidentSummaryVoteStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetAiIncidentSummaryVoteStatusRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + generated_summary_id: encodeSimple( + "generated_summary_id", + payload.generated_summary_id, + { explode: false, charEncoding: "percent" }, + ), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/ai/summarize_incident/{incident_id}/{generated_summary_id}/voted", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_ai_incident_summary_vote_status", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetAiSummaryVoteStatus.ts b/src/funcs/incidentsGetAiSummaryVoteStatus.ts deleted file mode 100644 index f02d2e8e..00000000 --- a/src/funcs/incidentsGetAiSummaryVoteStatus.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get the vote status for an AI-generated incident summary - */ -export async function incidentsGetAiSummaryVoteStatus( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentAiSummaryVoteStatusRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetIncidentAiSummaryVoteStatusRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - generated_summary_id: encodeSimple( - "generated_summary_id", - payload.generated_summary_id, - { explode: false, charEncoding: "percent" }, - ), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/ai/summarize_incident/{incident_id}/{generated_summary_id}/voted", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentAiSummaryVoteStatus", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsGetChannel.ts b/src/funcs/incidentsGetChannel.ts deleted file mode 100644 index 4e90808d..00000000 --- a/src/funcs/incidentsGetChannel.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get chat channel information for an incident - * - * @remarks - * Gives chat channel information for the specified incident - */ -export async function incidentsGetChannel( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentChannelRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsChannelEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetIncidentChannelRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/channel")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentChannel", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsChannelEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsChannelEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsGetConferenceBridgeTranslation.ts b/src/funcs/incidentsGetConferenceBridgeTranslation.ts new file mode 100644 index 00000000..4b9eb4fe --- /dev/null +++ b/src/funcs/incidentsGetConferenceBridgeTranslation.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Retrieve the translations for a specific conference bridge + * + * @remarks + * Retrieve the translations for a specific conference bridge + */ +export function incidentsGetConferenceBridgeTranslation( + client: FirehydrantCore, + request: operations.GetConferenceBridgeTranslationRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsConferenceBridgeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetConferenceBridgeTranslationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsConferenceBridgeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetConferenceBridgeTranslationRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + language_code: encodeSimple("language_code", payload.language_code, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/conference_bridges/{id}/translations/{language_code}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_conference_bridge_translation", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsConferenceBridgeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsConferenceBridgeEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetEvent.ts b/src/funcs/incidentsGetEvent.ts deleted file mode 100644 index bbdd2eda..00000000 --- a/src/funcs/incidentsGetEvent.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an incident event - * - * @remarks - * Retrieve a single event for an incident - */ -export async function incidentsGetEvent( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentEventRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetIncidentEventRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - event_id: encodeSimple("event_id", payload.event_id, { - explode: false, - charEncoding: "percent", - }), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/events/{event_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEventEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsGetEventVoteStatus.ts b/src/funcs/incidentsGetEventVoteStatus.ts deleted file mode 100644 index ea127573..00000000 --- a/src/funcs/incidentsGetEventVoteStatus.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get vote counts for an incident event - * - * @remarks - * Returns the current vote counts for an object - */ -export async function incidentsGetEventVoteStatus( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentEventVoteStatusRequest, - options?: RequestOptions, -): Promise< - Result< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetIncidentEventVoteStatusRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - event_id: encodeSimple("event_id", payload.event_id, { - explode: false, - charEncoding: "percent", - }), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/events/{event_id}/votes/status", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentEventVoteStatus", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.VotesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsGetIncident.ts b/src/funcs/incidentsGetIncident.ts new file mode 100644 index 00000000..36d9881b --- /dev/null +++ b/src/funcs/incidentsGetIncident.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an incident + * + * @remarks + * Retrieve a single incident from its ID + */ +export function incidentsGetIncident( + client: FirehydrantCore, + request: operations.GetIncidentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIncidentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetIncidentChannel.ts b/src/funcs/incidentsGetIncidentChannel.ts new file mode 100644 index 00000000..31c3a53a --- /dev/null +++ b/src/funcs/incidentsGetIncidentChannel.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get chat channel information for an incident + * + * @remarks + * Gives chat channel information for the specified incident + */ +export function incidentsGetIncidentChannel( + client: FirehydrantCore, + request: operations.GetIncidentChannelRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsChannelEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentChannelRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsChannelEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIncidentChannelRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/channel")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_channel", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsChannelEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsChannelEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetIncidentEvent.ts b/src/funcs/incidentsGetIncidentEvent.ts new file mode 100644 index 00000000..b6826657 --- /dev/null +++ b/src/funcs/incidentsGetIncidentEvent.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an incident event + * + * @remarks + * Retrieve a single event for an incident + */ +export function incidentsGetIncidentEvent( + client: FirehydrantCore, + request: operations.GetIncidentEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIncidentEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + event_id: encodeSimple("event_id", payload.event_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/events/{event_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEventEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetIncidentRelationships.ts b/src/funcs/incidentsGetIncidentRelationships.ts new file mode 100644 index 00000000..de696726 --- /dev/null +++ b/src/funcs/incidentsGetIncidentRelationships.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List incident relationships + * + * @remarks + * List any parent/child relationships for an incident + */ +export function incidentsGetIncidentRelationships( + client: FirehydrantCore, + request: operations.GetIncidentRelationshipsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRelationshipsEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentRelationshipsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRelationshipsEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetIncidentRelationshipsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/relationships")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_relationships", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRelationshipsEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRelationshipsEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetIncidentUser.ts b/src/funcs/incidentsGetIncidentUser.ts new file mode 100644 index 00000000..bd1a196f --- /dev/null +++ b/src/funcs/incidentsGetIncidentUser.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get the current user's incident role + * + * @remarks + * Retrieve a user with current roles for an incident + */ +export function incidentsGetIncidentUser( + client: FirehydrantCore, + request: operations.GetIncidentUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIncidentUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + user_id: encodeSimple("user_id", payload.user_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/users/{user_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRoleAssignmentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRoleAssignmentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetRelationships.ts b/src/funcs/incidentsGetRelationships.ts deleted file mode 100644 index aa797c19..00000000 --- a/src/funcs/incidentsGetRelationships.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List incident relationships - * - * @remarks - * List any parent/child relationships for an incident - */ -export async function incidentsGetRelationships( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentRelationshipsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRelationshipsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetIncidentRelationshipsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/relationships")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentRelationships", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRelationshipsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsRelationshipsEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsGetScheduledMaintenance.ts b/src/funcs/incidentsGetScheduledMaintenance.ts new file mode 100644 index 00000000..ce6d56f3 --- /dev/null +++ b/src/funcs/incidentsGetScheduledMaintenance.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a scheduled maintenance event + * + * @remarks + * Fetch the details of a scheduled maintenance event. + */ +export function incidentsGetScheduledMaintenance( + client: FirehydrantCore, + request: operations.GetScheduledMaintenanceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetScheduledMaintenanceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetScheduledMaintenanceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + scheduled_maintenance_id: encodeSimple( + "scheduled_maintenance_id", + payload.scheduled_maintenance_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/scheduled_maintenances/{scheduled_maintenance_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_scheduled_maintenance", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ScheduledMaintenanceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsGetTranscript.ts b/src/funcs/incidentsGetTranscript.ts deleted file mode 100644 index ceeedda9..00000000 --- a/src/funcs/incidentsGetTranscript.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List transcript messages for an incident - * - * @remarks - * Retrieve the transcript for a specific incident - */ -export async function incidentsGetTranscript( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentTranscriptRequest, - options?: RequestOptions, -): Promise< - Result< - components.PublicApiv1IncidentsTranscriptEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetIncidentTranscriptRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/transcript")(pathParams); - - const query = encodeFormQuery({ - "after": payload.after, - "before": payload.before, - "sort": payload.sort, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentTranscript", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PublicApiv1IncidentsTranscriptEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PublicApiv1IncidentsTranscriptEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsGetUserRole.ts b/src/funcs/incidentsGetUserRole.ts deleted file mode 100644 index 424fb8c9..00000000 --- a/src/funcs/incidentsGetUserRole.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a user's role in an incident - * - * @remarks - * Retrieve a user with current roles for an incident - */ -export async function incidentsGetUserRole( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentUserRoleRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRoleAssignmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetIncidentUserRoleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - user_id: encodeSimple("user_id", payload.user_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/users/{user_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentUserRole", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRoleAssignmentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsRoleAssignmentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsList.ts b/src/funcs/incidentsList.ts deleted file mode 100644 index 036d8e0f..00000000 --- a/src/funcs/incidentsList.ts +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List incidents - * - * @remarks - * List all of the incidents in the organization - */ -export async function incidentsList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListIncidentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/incidents")(); - - const query = encodeFormQuery({ - "archived": payload.archived, - "assigned_teams": payload.assigned_teams, - "conditions": payload.conditions, - "created_at_or_after": payload.created_at_or_after, - "created_at_or_before": payload.created_at_or_before, - "current_milestones": payload.current_milestones, - "end_date": payload.end_date, - "environments": payload.environments, - "excluded_infrastructure_ids": payload.excluded_infrastructure_ids, - "functionalities": payload.functionalities, - "incident_type_id": payload.incident_type_id, - "name": payload.name, - "page": payload.page, - "per_page": payload.per_page, - "priorities": payload.priorities, - "priority_not_set": payload.priority_not_set, - "query": payload.query, - "resolved_at_or_after": payload.resolved_at_or_after, - "resolved_at_or_before": payload.resolved_at_or_before, - "saved_search_id": payload.saved_search_id, - "services": payload.services, - "severities": payload.severities, - "severity_not_set": payload.severity_not_set, - "start_date": payload.start_date, - "status": payload.status, - "tag_match_strategy": payload.tag_match_strategy, - "tags": payload.tags, - "teams": payload.teams, - "updated_after": payload.updated_after, - "updated_before": payload.updated_before, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListAttachments.ts b/src/funcs/incidentsListAttachments.ts deleted file mode 100644 index 1d5b5502..00000000 --- a/src/funcs/incidentsListAttachments.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List attachments for an incident - */ -export async function incidentsListAttachments( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentAttachmentsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListIncidentAttachmentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/attachments")( - pathParams, - ); - - const query = encodeFormQuery({ - "attachable_type": payload.attachable_type, - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentAttachments", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListEvents.ts b/src/funcs/incidentsListEvents.ts deleted file mode 100644 index c84a046a..00000000 --- a/src/funcs/incidentsListEvents.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List events for an incident - * - * @remarks - * List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type. - */ -export async function incidentsListEvents( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentEventsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEventEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListIncidentEventsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/events")(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "types": payload.types, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentEvents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEventEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEventEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListImpact.ts b/src/funcs/incidentsListImpact.ts deleted file mode 100644 index aefdabe7..00000000 --- a/src/funcs/incidentsListImpact.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List impacted infrastructure for an incident - * - * @remarks - * List impacted infrastructure on an incident by specifying type - */ -export async function incidentsListImpact( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentImpactRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentImpactEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListIncidentImpactRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - type: encodeSimple("type", payload.type, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/impact/{type}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentImpact", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentImpactEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentImpactEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListIncidentAttachments.ts b/src/funcs/incidentsListIncidentAttachments.ts new file mode 100644 index 00000000..24f58cc8 --- /dev/null +++ b/src/funcs/incidentsListIncidentAttachments.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List attachments for an incident + * + * @remarks + * List attachments for an incident + */ +export function incidentsListIncidentAttachments( + client: FirehydrantCore, + request: operations.ListIncidentAttachmentsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AttachmentsTypedAttachmentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentAttachmentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AttachmentsTypedAttachmentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentAttachmentsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/attachments")( + pathParams, + ); + + const query = encodeFormQuery({ + "attachable_type": payload.attachable_type, + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_attachments", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AttachmentsTypedAttachmentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.AttachmentsTypedAttachmentEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentChangeEvents.ts b/src/funcs/incidentsListIncidentChangeEvents.ts new file mode 100644 index 00000000..c9fd981e --- /dev/null +++ b/src/funcs/incidentsListIncidentChangeEvents.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List related changes on an incident + * + * @remarks + * List related changes that have been attached to an incident + */ +export function incidentsListIncidentChangeEvents( + client: FirehydrantCore, + request: operations.ListIncidentChangeEventsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRelatedChangeEventEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentChangeEventsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRelatedChangeEventEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentChangeEventsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/related_change_events")( + pathParams, + ); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_change_events", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRelatedChangeEventEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IncidentsRelatedChangeEventEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentConferenceBridges.ts b/src/funcs/incidentsListIncidentConferenceBridges.ts new file mode 100644 index 00000000..b4020c3d --- /dev/null +++ b/src/funcs/incidentsListIncidentConferenceBridges.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Retrieve all conference bridges for an incident + * + * @remarks + * Retrieve all conference bridges for an incident + */ +export function incidentsListIncidentConferenceBridges( + client: FirehydrantCore, + request: operations.ListIncidentConferenceBridgesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsConferenceBridgeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentConferenceBridgesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsConferenceBridgeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentConferenceBridgesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/conference_bridges")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_conference_bridges", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsConferenceBridgeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsConferenceBridgeEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentEvents.ts b/src/funcs/incidentsListIncidentEvents.ts new file mode 100644 index 00000000..24fd39a1 --- /dev/null +++ b/src/funcs/incidentsListIncidentEvents.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List events for an incident + * + * @remarks + * List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type. + */ +export function incidentsListIncidentEvents( + client: FirehydrantCore, + request: operations.ListIncidentEventsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEventEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentEventsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEventEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListIncidentEventsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/events")(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "types": payload.types, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_events", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEventEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEventEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentImpacts.ts b/src/funcs/incidentsListIncidentImpacts.ts new file mode 100644 index 00000000..214db148 --- /dev/null +++ b/src/funcs/incidentsListIncidentImpacts.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List impacted infrastructure for an incident + * + * @remarks + * List impacted infrastructure on an incident by specifying type + */ +export function incidentsListIncidentImpacts( + client: FirehydrantCore, + request: operations.ListIncidentImpactsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentImpactEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentImpactsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentImpactEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentImpactsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + type: encodeSimple("type", payload.type, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/impact/{type}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_impacts", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentImpactEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentImpactEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentLinks.ts b/src/funcs/incidentsListIncidentLinks.ts new file mode 100644 index 00000000..ef1b11a1 --- /dev/null +++ b/src/funcs/incidentsListIncidentLinks.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List links on an incident + * + * @remarks + * List all the editable, external incident links attached to an incident + */ +export function incidentsListIncidentLinks( + client: FirehydrantCore, + request: operations.ListIncidentLinksRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AttachmentsLinkEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentLinksRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AttachmentsLinkEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListIncidentLinksRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/links")(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_links", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AttachmentsLinkEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AttachmentsLinkEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentMilestones.ts b/src/funcs/incidentsListIncidentMilestones.ts new file mode 100644 index 00000000..87550d33 --- /dev/null +++ b/src/funcs/incidentsListIncidentMilestones.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List incident milestones + * + * @remarks + * List times and durations for each milestone on an incident + */ +export function incidentsListIncidentMilestones( + client: FirehydrantCore, + request: operations.ListIncidentMilestonesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsMilestoneEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentMilestonesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsMilestoneEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentMilestonesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/milestones")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_milestones", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsMilestoneEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsMilestoneEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentRoleAssignments.ts b/src/funcs/incidentsListIncidentRoleAssignments.ts new file mode 100644 index 00000000..505e4dca --- /dev/null +++ b/src/funcs/incidentsListIncidentRoleAssignments.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List incident assignees + * + * @remarks + * Retrieve a list of all of the current role assignments for the incident + */ +export function incidentsListIncidentRoleAssignments( + client: FirehydrantCore, + request: operations.ListIncidentRoleAssignmentsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRoleAssignmentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentRoleAssignmentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRoleAssignmentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentRoleAssignmentsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/role_assignments")( + pathParams, + ); + + const query = encodeFormQuery({ + "status": payload.status, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_role_assignments", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRoleAssignmentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IncidentsRoleAssignmentEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidentStatusPages.ts b/src/funcs/incidentsListIncidentStatusPages.ts new file mode 100644 index 00000000..dc58c5b0 --- /dev/null +++ b/src/funcs/incidentsListIncidentStatusPages.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List status pages for an incident + * + * @remarks + * List status pages that are attached to an incident + */ +export function incidentsListIncidentStatusPages( + client: FirehydrantCore, + request: operations.ListIncidentStatusPagesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsStatusPageEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentStatusPagesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsStatusPageEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentStatusPagesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/status_pages")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_status_pages", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsStatusPageEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsStatusPageEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListIncidents.ts b/src/funcs/incidentsListIncidents.ts new file mode 100644 index 00000000..9b1deef2 --- /dev/null +++ b/src/funcs/incidentsListIncidents.ts @@ -0,0 +1,191 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List incidents + * + * @remarks + * List all of the incidents in the organization + */ +export function incidentsListIncidents( + client: FirehydrantCore, + request: operations.ListIncidentsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListIncidentsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/incidents")(); + + const query = encodeFormQuery({ + "archived": payload.archived, + "assigned_teams": payload.assigned_teams, + "closed_at_or_after": payload.closed_at_or_after, + "closed_at_or_before": payload.closed_at_or_before, + "conditions": payload.conditions, + "created_at_or_after": payload.created_at_or_after, + "created_at_or_before": payload.created_at_or_before, + "current_milestones": payload.current_milestones, + "end_date": payload.end_date, + "environments": payload.environments, + "excluded_infrastructure_ids": payload.excluded_infrastructure_ids, + "functionalities": payload.functionalities, + "incident_type_id": payload.incident_type_id, + "name": payload.name, + "page": payload.page, + "per_page": payload.per_page, + "priorities": payload.priorities, + "priority_not_set": payload.priority_not_set, + "query": payload.query, + "resolved_at_or_after": payload.resolved_at_or_after, + "resolved_at_or_before": payload.resolved_at_or_before, + "retrospective_template": payload.retrospective_template, + "saved_search_id": payload.saved_search_id, + "services": payload.services, + "severities": payload.severities, + "severity_not_set": payload.severity_not_set, + "start_date": payload.start_date, + "status": payload.status, + "tag_match_strategy": payload.tag_match_strategy, + "tags": payload.tags, + "teams": payload.teams, + "updated_after": payload.updated_after, + "updated_before": payload.updated_before, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incidents", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListLinks.ts b/src/funcs/incidentsListLinks.ts deleted file mode 100644 index 862da035..00000000 --- a/src/funcs/incidentsListLinks.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List links for an incident - * - * @remarks - * List all the editable, external incident links attached to an incident - */ -export async function incidentsListLinks( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentLinksRequest, - options?: RequestOptions, -): Promise< - Result< - components.AttachmentsLinkEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListIncidentLinksRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/links")(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentLinks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.AttachmentsLinkEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.AttachmentsLinkEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListMilestones.ts b/src/funcs/incidentsListMilestones.ts deleted file mode 100644 index 46439e10..00000000 --- a/src/funcs/incidentsListMilestones.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List milestones for an incident - * - * @remarks - * List times and durations for each milestone on an incident - */ -export async function incidentsListMilestones( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentMilestonesRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsMilestoneEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListIncidentMilestonesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/milestones")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentMilestones", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsMilestoneEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsMilestoneEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListRelatedChangeEvents.ts b/src/funcs/incidentsListRelatedChangeEvents.ts deleted file mode 100644 index 751065eb..00000000 --- a/src/funcs/incidentsListRelatedChangeEvents.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List related changes for an incident - * - * @remarks - * List related changes that have been attached to an incident - */ -export async function incidentsListRelatedChangeEvents( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentRelatedChangesRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRelatedChangeEventEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListIncidentRelatedChangesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/related_change_events")( - pathParams, - ); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "type": payload.type, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentRelatedChanges", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRelatedChangeEventEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.IncidentsRelatedChangeEventEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListRoleAssignments.ts b/src/funcs/incidentsListRoleAssignments.ts deleted file mode 100644 index d47c41e9..00000000 --- a/src/funcs/incidentsListRoleAssignments.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List role assignments for an incident - * - * @remarks - * Retrieve a list of all of the current role assignments for the incident - */ -export async function incidentsListRoleAssignments( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentRoleAssignmentsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRoleAssignmentEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListIncidentRoleAssignmentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/role_assignments")( - pathParams, - ); - - const query = encodeFormQuery({ - "status": payload.status, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentRoleAssignments", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRoleAssignmentEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.IncidentsRoleAssignmentEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListScheduledMaintenances.ts b/src/funcs/incidentsListScheduledMaintenances.ts new file mode 100644 index 00000000..df56ab51 --- /dev/null +++ b/src/funcs/incidentsListScheduledMaintenances.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List scheduled maintenance events + * + * @remarks + * Lists all scheduled maintenance events + */ +export function incidentsListScheduledMaintenances( + client: FirehydrantCore, + request: operations.ListScheduledMaintenancesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListScheduledMaintenancesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListScheduledMaintenancesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/scheduled_maintenances")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_scheduled_maintenances", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ScheduledMaintenanceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListSimilar.ts b/src/funcs/incidentsListSimilar.ts deleted file mode 100644 index 9248e526..00000000 --- a/src/funcs/incidentsListSimilar.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List similar incidents - */ -export async function incidentsListSimilar( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSimilarIncidentsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetSimilarIncidentsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/similar")(pathParams); - - const query = encodeFormQuery({ - "limit": payload.limit, - "threshold": payload.threshold, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSimilarIncidents", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListSimilarIncidents.ts b/src/funcs/incidentsListSimilarIncidents.ts new file mode 100644 index 00000000..807bbb35 --- /dev/null +++ b/src/funcs/incidentsListSimilarIncidents.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List similar incidents + * + * @remarks + * Retrieve a list of similar incidents + */ +export function incidentsListSimilarIncidents( + client: FirehydrantCore, + request: operations.ListSimilarIncidentsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.SimilarIncidentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSimilarIncidentsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SimilarIncidentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListSimilarIncidentsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/similar")(pathParams); + + const query = encodeFormQuery({ + "limit": payload.limit, + "threshold": payload.threshold, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_similar_incidents", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SimilarIncidentEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SimilarIncidentEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsListStatusPages.ts b/src/funcs/incidentsListStatusPages.ts deleted file mode 100644 index f1902b47..00000000 --- a/src/funcs/incidentsListStatusPages.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List status pages for an incident - * - * @remarks - * List status pages that are attached to an incident - */ -export async function incidentsListStatusPages( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentStatusPagesRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsStatusPageEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListIncidentStatusPagesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/status_pages")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentStatusPages", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsStatusPageEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsStatusPageEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsListTranscriptEntries.ts b/src/funcs/incidentsListTranscriptEntries.ts new file mode 100644 index 00000000..e8110180 --- /dev/null +++ b/src/funcs/incidentsListTranscriptEntries.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Lists all of the messages in the incident's transcript + * + * @remarks + * Retrieve the transcript for a specific incident + */ +export function incidentsListTranscriptEntries( + client: FirehydrantCore, + request: operations.ListTranscriptEntriesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PublicApiv1IncidentsTranscriptEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTranscriptEntriesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PublicApiv1IncidentsTranscriptEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListTranscriptEntriesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/transcript")(pathParams); + + const query = encodeFormQuery({ + "after": payload.after, + "before": payload.before, + "sort": payload.sort, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_transcript_entries", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PublicApiv1IncidentsTranscriptEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PublicApiv1IncidentsTranscriptEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsPartialUpdateImpacts.ts b/src/funcs/incidentsPartialUpdateImpacts.ts deleted file mode 100644 index 0c8282a5..00000000 --- a/src/funcs/incidentsPartialUpdateImpacts.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update impacts for an incident - * - * @remarks - * Allows updating an incident's impacted infrastructure, with the option to - * move the incident into a different milestone and provide a note to update - * the incident timeline and any attached status pages. If this method is - * requested with the PUT verb, impacts will be completely replaced with the - * information in the request body, even if not provided (effectively clearing - * all impacts). If this method is requested with the PATCH verb, the provided - * impacts will be added or updated, but no impacts will be removed. - */ -export async function incidentsPartialUpdateImpacts( - client: FirehydrantTypescriptSDKCore, - request: operations.PartialUpdateIncidentImpactsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.PartialUpdateIncidentImpactsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1IncidentsIncidentIdImpact, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/impact")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "partialUpdateIncidentImpacts", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsResolve.ts b/src/funcs/incidentsResolve.ts deleted file mode 100644 index d0249ad0..00000000 --- a/src/funcs/incidentsResolve.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Resolve an incident - * - * @remarks - * Resolves a currently active incident - */ -export async function incidentsResolve( - client: FirehydrantTypescriptSDKCore, - request: operations.ResolveIncidentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ResolveIncidentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/resolve")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "resolveIncident", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsResolveIncident.ts b/src/funcs/incidentsResolveIncident.ts new file mode 100644 index 00000000..a0ff60bd --- /dev/null +++ b/src/funcs/incidentsResolveIncident.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Resolve an incident + * + * @remarks + * Resolves a currently active incident + */ +export function incidentsResolveIncident( + client: FirehydrantCore, + request: operations.ResolveIncidentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ResolveIncidentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ResolveIncidentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/resolve")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "resolve_incident", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsSetAlertAsPrimary.ts b/src/funcs/incidentsSetAlertAsPrimary.ts deleted file mode 100644 index 86a523b9..00000000 --- a/src/funcs/incidentsSetAlertAsPrimary.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Set an alert as primary for an incident - * - * @remarks - * Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. - */ -export async function incidentsSetAlertAsPrimary( - client: FirehydrantTypescriptSDKCore, - request: operations.SetIncidentAlertAsPrimaryRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsAlertEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.SetIncidentAlertAsPrimaryRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary, - { explode: true }, - ); - - const pathParams = { - incident_alert_id: encodeSimple( - "incident_alert_id", - payload.incident_alert_id, - { explode: false, charEncoding: "percent" }, - ), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/alerts/{incident_alert_id}/primary", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "setIncidentAlertAsPrimary", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsAlertEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsAlertEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUnarchive.ts b/src/funcs/incidentsUnarchive.ts deleted file mode 100644 index 13f959eb..00000000 --- a/src/funcs/incidentsUnarchive.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Unarchive an incident - * - * @remarks - * Unarchives an incident - */ -export async function incidentsUnarchive( - client: FirehydrantTypescriptSDKCore, - request: operations.UnarchiveIncidentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UnarchiveIncidentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/unarchive")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "unarchiveIncident", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUnarchiveIncident.ts b/src/funcs/incidentsUnarchiveIncident.ts new file mode 100644 index 00000000..f4619fd9 --- /dev/null +++ b/src/funcs/incidentsUnarchiveIncident.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Unarchive an incident + * + * @remarks + * Unarchive an incident + */ +export function incidentsUnarchiveIncident( + client: FirehydrantCore, + request: operations.UnarchiveIncidentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UnarchiveIncidentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UnarchiveIncidentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/unarchive")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "unarchive_incident", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdate.ts b/src/funcs/incidentsUpdate.ts deleted file mode 100644 index 3d1e59d2..00000000 --- a/src/funcs/incidentsUpdate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an incident - * - * @remarks - * Updates an incident with provided parameters - */ -export async function incidentsUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateIncidentRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1IncidentsIncidentId, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncident", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateChatMessage.ts b/src/funcs/incidentsUpdateChatMessage.ts deleted file mode 100644 index 44852e54..00000000 --- a/src/funcs/incidentsUpdateChatMessage.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a chat message in an incident - * - * @remarks - * Update an existing generic chat message on an incident. - */ -export async function incidentsUpdateChatMessage( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentChatMessageRequest, - options?: RequestOptions, -): Promise< - Result< - components.EventGenericChatMessageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateIncidentChatMessageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IncidentsIncidentIdGenericChatMessagesMessageId, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - message_id: encodeSimple("message_id", payload.message_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/generic_chat_messages/{message_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentChatMessage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EventGenericChatMessageEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.EventGenericChatMessageEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateEvent.ts b/src/funcs/incidentsUpdateEvent.ts deleted file mode 100644 index 520472af..00000000 --- a/src/funcs/incidentsUpdateEvent.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an incident event - * - * @remarks - * Update a single event for an incident - */ -export async function incidentsUpdateEvent( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentEventRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateIncidentEventRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - event_id: encodeSimple("event_id", payload.event_id, { - explode: false, - charEncoding: "percent", - }), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/events/{event_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEventEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEventEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateEventVotes.ts b/src/funcs/incidentsUpdateEventVotes.ts deleted file mode 100644 index a2aadb2c..00000000 --- a/src/funcs/incidentsUpdateEventVotes.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update votes for an incident event - * - * @remarks - * Allows for upvoting or downvoting an event - */ -export async function incidentsUpdateEventVotes( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentEventVotesRequest, - options?: RequestOptions, -): Promise< - Result< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateIncidentEventVotesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IncidentsIncidentIdEventsEventIdVotes, - { explode: true }, - ); - - const pathParams = { - event_id: encodeSimple("event_id", payload.event_id, { - explode: false, - charEncoding: "percent", - }), - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/events/{event_id}/votes", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentEventVotes", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.VotesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateImpacts.ts b/src/funcs/incidentsUpdateImpacts.ts deleted file mode 100644 index d7da3ed4..00000000 --- a/src/funcs/incidentsUpdateImpacts.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Replace all impacts for an incident - * - * @remarks - * Allows updating an incident's impacted infrastructure, with the option to - * move the incident into a different milestone and provide a note to update - * the incident timeline and any attached status pages. If this method is - * requested with the PUT verb, impacts will be completely replaced with the - * information in the request body, even if not provided (effectively clearing - * all impacts). If this method is requested with the PATCH verb, the provided - * impacts will be added or updated, but no impacts will be removed. - */ -export async function incidentsUpdateImpacts( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentImpactsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateIncidentImpactsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.putV1IncidentsIncidentIdImpact, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/impact")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentImpacts", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateIncident.ts b/src/funcs/incidentsUpdateIncident.ts new file mode 100644 index 00000000..4c2e397e --- /dev/null +++ b/src/funcs/incidentsUpdateIncident.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an incident + * + * @remarks + * Updates an incident with provided parameters + */ +export function incidentsUpdateIncident( + client: FirehydrantCore, + request: operations.UpdateIncidentRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateIncidentRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateIncidentChangeEvent.ts b/src/funcs/incidentsUpdateIncidentChangeEvent.ts new file mode 100644 index 00000000..baa6b745 --- /dev/null +++ b/src/funcs/incidentsUpdateIncidentChangeEvent.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a change attached to an incident + * + * @remarks + * Update a change attached to an incident + */ +export function incidentsUpdateIncidentChangeEvent( + client: FirehydrantCore, + request: operations.UpdateIncidentChangeEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRelatedChangeEventEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentChangeEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRelatedChangeEventEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentChangeEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_change_event, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + related_change_event_id: encodeSimple( + "related_change_event_id", + payload.related_change_event_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/related_change_events/{related_change_event_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_change_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "409", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.IncidentsRelatedChangeEventEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRelatedChangeEventEntity$inboundSchema), + M.jsonErr([400, 409], errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateIncidentChatMessage.ts b/src/funcs/incidentsUpdateIncidentChatMessage.ts new file mode 100644 index 00000000..794f2a01 --- /dev/null +++ b/src/funcs/incidentsUpdateIncidentChatMessage.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a chat message on an incident + * + * @remarks + * Update an existing generic chat message on an incident. + */ +export function incidentsUpdateIncidentChatMessage( + client: FirehydrantCore, + request: operations.UpdateIncidentChatMessageRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentChatMessageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentChatMessageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_chat_message, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + message_id: encodeSimple("message_id", payload.message_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/generic_chat_messages/{message_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_chat_message", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventGenericChatMessageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.EventGenericChatMessageEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateIncidentEvent.ts b/src/funcs/incidentsUpdateIncidentEvent.ts new file mode 100644 index 00000000..4cc667ca --- /dev/null +++ b/src/funcs/incidentsUpdateIncidentEvent.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an incident event + * + * @remarks + * Update a single event for an incident + */ +export function incidentsUpdateIncidentEvent( + client: FirehydrantCore, + request: operations.UpdateIncidentEventRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentEventRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentEventRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + event_id: encodeSimple("event_id", payload.event_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/events/{event_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_event", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEventEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateIncidentImpactPatch.ts b/src/funcs/incidentsUpdateIncidentImpactPatch.ts new file mode 100644 index 00000000..b9b444b2 --- /dev/null +++ b/src/funcs/incidentsUpdateIncidentImpactPatch.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update impacts for an incident + * + * @remarks + * Allows updating an incident's impacted infrastructure, with the option to + * move the incident into a different milestone and provide a note to update + * the incident timeline and any attached status pages. If this method is + * requested with the PUT verb, impacts will be completely replaced with the + * information in the request body, even if not provided (effectively clearing + * all impacts). If this method is requested with the PATCH verb, the provided + * impacts will be added or updated, but no impacts will be removed. + */ +export function incidentsUpdateIncidentImpactPatch( + client: FirehydrantCore, + request: operations.UpdateIncidentImpactPatchRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentImpactPatchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentImpactPatchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_impact_patch, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/impact")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_impact_patch", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateIncidentImpactPut.ts b/src/funcs/incidentsUpdateIncidentImpactPut.ts new file mode 100644 index 00000000..b2b48436 --- /dev/null +++ b/src/funcs/incidentsUpdateIncidentImpactPut.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update impacts for an incident + * + * @remarks + * Allows updating an incident's impacted infrastructure, with the option to + * move the incident into a different milestone and provide a note to update + * the incident timeline and any attached status pages. If this method is + * requested with the PUT verb, impacts will be completely replaced with the + * information in the request body, even if not provided (effectively clearing + * all impacts). If this method is requested with the PATCH verb, the provided + * impacts will be added or updated, but no impacts will be removed. + */ +export function incidentsUpdateIncidentImpactPut( + client: FirehydrantCore, + request: operations.UpdateIncidentImpactPutRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentImpactPutRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentImpactPutRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_impact_put, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/impact")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_impact_put", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateIncidentLink.ts b/src/funcs/incidentsUpdateIncidentLink.ts new file mode 100644 index 00000000..82b53a7b --- /dev/null +++ b/src/funcs/incidentsUpdateIncidentLink.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update the external incident link + * + * @remarks + * Update the external incident link attributes + */ +export function incidentsUpdateIncidentLink( + client: FirehydrantCore, + request: operations.UpdateIncidentLinkRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentLinkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateIncidentLinkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_link, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + link_id: encodeSimple("link_id", payload.link_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/links/{link_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_link", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateIncidentNote.ts b/src/funcs/incidentsUpdateIncidentNote.ts new file mode 100644 index 00000000..b632d6ed --- /dev/null +++ b/src/funcs/incidentsUpdateIncidentNote.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a note + * + * @remarks + * Updates the body of a note + */ +export function incidentsUpdateIncidentNote( + client: FirehydrantCore, + request: operations.UpdateIncidentNoteRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.EventNoteEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentNoteRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.EventNoteEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateIncidentNoteRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_note, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + note_id: encodeSimple("note_id", payload.note_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/notes/{note_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_note", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.EventNoteEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.EventNoteEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateLink.ts b/src/funcs/incidentsUpdateLink.ts deleted file mode 100644 index e11bb8cf..00000000 --- a/src/funcs/incidentsUpdateLink.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an external link for an incident - * - * @remarks - * Updates the external incident link attributes - */ -export async function incidentsUpdateLink( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentLinkRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateIncidentLinkRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.putV1IncidentsIncidentIdLinksLinkId, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - link_id: encodeSimple("link_id", payload.link_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/links/{link_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentLink", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateMilestonesBulk.ts b/src/funcs/incidentsUpdateMilestonesBulk.ts deleted file mode 100644 index 6cb484fb..00000000 --- a/src/funcs/incidentsUpdateMilestonesBulk.ts +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Bulk update milestone timestamps for an incident - * - * @remarks - * Update milestone times in bulk for a given incident. All milestone - * times for an incident must occur in chronological order - * corresponding to the configured order of milestones. If the result - * of this request would cause any milestone(s) to appear out of place, - * a 422 response will instead be returned. This includes milestones - * not explicitly submitted or updated in this request. - */ -export async function incidentsUpdateMilestonesBulk( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentMilestonesBulkRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsMilestoneEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateIncidentMilestonesBulkRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.putV1IncidentsIncidentIdMilestonesBulkUpdate, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/milestones/bulk_update")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentMilestonesBulk", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsMilestoneEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsMilestoneEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateNote.ts b/src/funcs/incidentsUpdateNote.ts deleted file mode 100644 index da94b758..00000000 --- a/src/funcs/incidentsUpdateNote.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a note for an incident - * - * @remarks - * Updates the body of a note - */ -export async function incidentsUpdateNote( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentNoteRequest, - options?: RequestOptions, -): Promise< - Result< - components.EventNoteEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateIncidentNoteRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IncidentsIncidentIdNotesNoteId, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - note_id: encodeSimple("note_id", payload.note_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/notes/{note_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentNote", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.EventNoteEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.EventNoteEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateRelatedChangeEvent.ts b/src/funcs/incidentsUpdateRelatedChangeEvent.ts deleted file mode 100644 index e10bb846..00000000 --- a/src/funcs/incidentsUpdateRelatedChangeEvent.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a related change event for an incident - * - * @remarks - * Update a change attached to an incident - */ -export async function incidentsUpdateRelatedChangeEvent( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentRelatedChangeEventRequest, - options?: RequestOptions, -): Promise< - Result< - components.IncidentsRelatedChangeEventEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateIncidentRelatedChangeEventRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - related_change_event_id: encodeSimple( - "related_change_event_id", - payload.related_change_event_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/related_change_events/{related_change_event_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentRelatedChangeEvent", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "409", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IncidentsRelatedChangeEventEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IncidentsRelatedChangeEventEntity$inboundSchema), - M.jsonErr([400, 409], errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/incidentsUpdateScheduledMaintenance.ts b/src/funcs/incidentsUpdateScheduledMaintenance.ts new file mode 100644 index 00000000..2471f7c7 --- /dev/null +++ b/src/funcs/incidentsUpdateScheduledMaintenance.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a scheduled maintenance event + * + * @remarks + * Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. + */ +export function incidentsUpdateScheduledMaintenance( + client: FirehydrantCore, + request: operations.UpdateScheduledMaintenanceRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateScheduledMaintenanceRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateScheduledMaintenanceRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_scheduled_maintenance, { + explode: true, + }); + + const pathParams = { + scheduled_maintenance_id: encodeSimple( + "scheduled_maintenance_id", + payload.scheduled_maintenance_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/scheduled_maintenances/{scheduled_maintenance_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_scheduled_maintenance", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ScheduledMaintenanceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ScheduledMaintenanceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsUpdateTranscriptAttribution.ts b/src/funcs/incidentsUpdateTranscriptAttribution.ts new file mode 100644 index 00000000..1e825f92 --- /dev/null +++ b/src/funcs/incidentsUpdateTranscriptAttribution.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update the attribution of a transcript + * + * @remarks + * Update the attribution of a transcript + */ +export function incidentsUpdateTranscriptAttribution( + client: FirehydrantCore, + request: operations.UpdateTranscriptAttributionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTranscriptAttributionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateTranscriptAttributionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/transcript/attribution")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_transcript_attribution", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/incidentsVoteAiIncidentSummary.ts b/src/funcs/incidentsVoteAiIncidentSummary.ts new file mode 100644 index 00000000..2b05c551 --- /dev/null +++ b/src/funcs/incidentsVoteAiIncidentSummary.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Vote on an AI-generated incident summary + * + * @remarks + * Vote on an AI-generated incident summary for the current user + */ +export function incidentsVoteAiIncidentSummary( + client: FirehydrantCore, + request: operations.VoteAiIncidentSummaryRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.VoteAiIncidentSummaryRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.VoteAiIncidentSummaryRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + generated_summary_id: encodeSimple( + "generated_summary_id", + payload.generated_summary_id, + { explode: false, charEncoding: "percent" }, + ), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/ai/summarize_incident/{incident_id}/{generated_summary_id}/vote", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "vote_ai_incident_summary", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.AIEntitiesIncidentSummaryEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.AIEntitiesIncidentSummaryEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/infrastructuresList.ts b/src/funcs/infrastructuresList.ts deleted file mode 100644 index c05eb1ba..00000000 --- a/src/funcs/infrastructuresList.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List catalog entries - * - * @remarks - * Lists functionality, service and environment objects - */ -export async function infrastructuresList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListInfrastructuresRequest, - options?: RequestOptions, -): Promise< - Result< - components.InfrastructureSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListInfrastructuresRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/infrastructures")(); - - const query = encodeFormQuery({ - "omit_for": payload.omit_for, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - "type": payload.type, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listInfrastructures", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.InfrastructureSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.InfrastructureSearchEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsAwsGetCloudTrailBatch.ts b/src/funcs/integrationsAwsGetCloudTrailBatch.ts deleted file mode 100644 index 9c210178..00000000 --- a/src/funcs/integrationsAwsGetCloudTrailBatch.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an AWS CloudTrail batch - * - * @remarks - * Retrieve a single CloudTrail batch. - */ -export async function integrationsAwsGetCloudTrailBatch( - client: FirehydrantTypescriptSDKCore, - request: operations.GetAwsCloudTrailBatchRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsAwsCloudtrailBatchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetAwsCloudTrailBatchRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/integrations/aws/cloudtrail_batches/{id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getAwsCloudTrailBatch", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsAwsCloudtrailBatchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IntegrationsAwsCloudtrailBatchEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsAwsUpdateConnection.ts b/src/funcs/integrationsAwsUpdateConnection.ts deleted file mode 100644 index 094d9456..00000000 --- a/src/funcs/integrationsAwsUpdateConnection.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an AWS connection - * - * @remarks - * Update the AWS connection with the provided data. - */ -export async function integrationsAwsUpdateConnection( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateAwsConnectionRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsAwsConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateAwsConnectionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1IntegrationsAwsConnectionsId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/integrations/aws/connections/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateAwsConnection", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsAwsConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IntegrationsAwsConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsCreateConnection.ts b/src/funcs/integrationsCreateConnection.ts index af902e9a..2634ab98 100644 --- a/src/funcs/integrationsCreateConnection.ts +++ b/src/funcs/integrationsCreateConnection.ts @@ -2,14 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -18,27 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** + * Create a new integration connection + * + * @remarks * Create a new integration connection */ -export async function integrationsCreateConnection( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIntegrationConnectionRequest, +export function integrationsCreateConnection( + client: FirehydrantCore, + request: operations.CreateConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -47,15 +45,40 @@ export async function integrationsCreateConnection( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.CreateIntegrationConnectionRequest$outboundSchema.parse(value), + (value) => operations.CreateConnectionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,16 +92,17 @@ export async function integrationsCreateConnection( const path = pathToFunc("/v1/integrations/connections/{slug}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createIntegrationConnection", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_connection", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -100,59 +124,23 @@ export async function integrationsCreateConnection( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -161,24 +149,13 @@ export async function integrationsCreateConnection( | RequestTimeoutError | ConnectionError >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(201, components.IntegrationsConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/integrationsCreateFieldMap.ts b/src/funcs/integrationsCreateFieldMap.ts deleted file mode 100644 index dff7b654..00000000 --- a/src/funcs/integrationsCreateFieldMap.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a field mapping for a ticketing project - * - * @remarks - * Creates field map for a ticketing project - */ -export async function integrationsCreateFieldMap( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateTicketingProjectFieldMapRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateTicketingProjectFieldMapRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/field_maps", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTicketingProjectFieldMap", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TicketingProjectFieldMapEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsCreateSlackEmojiAction.ts b/src/funcs/integrationsCreateSlackEmojiAction.ts new file mode 100644 index 00000000..97c7ba56 --- /dev/null +++ b/src/funcs/integrationsCreateSlackEmojiAction.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a new Slack emoji action + * + * @remarks + * Creates a new Slack emoji action + */ +export function integrationsCreateSlackEmojiAction( + client: FirehydrantCore, + request: operations.CreateSlackEmojiActionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateSlackEmojiActionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateSlackEmojiActionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/slack/connections/{connection_id}/emoji_actions", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_slack_emoji_action", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsDeleteFieldMap.ts b/src/funcs/integrationsDeleteFieldMap.ts deleted file mode 100644 index 4ab20770..00000000 --- a/src/funcs/integrationsDeleteFieldMap.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a field map for a ticketing project - * - * @remarks - * Archive field map for a ticketing project - */ -export async function integrationsDeleteFieldMap( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTicketingProjectFieldMapRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteTicketingProjectFieldMapRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - map_id: encodeSimple("map_id", payload.map_id, { - explode: false, - charEncoding: "percent", - }), - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/field_maps/{map_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTicketingProjectFieldMap", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsDeletePriority.ts b/src/funcs/integrationsDeletePriority.ts deleted file mode 100644 index c79750c2..00000000 --- a/src/funcs/integrationsDeletePriority.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a ticketing priority - * - * @remarks - * Delete a single ticketing priority by ID - */ -export async function integrationsDeletePriority( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTicketingPriorityRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteTicketingPriorityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/ticketing/priorities/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTicketingPriority", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingPriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsDeleteProjectConfig.ts b/src/funcs/integrationsDeleteProjectConfig.ts deleted file mode 100644 index de80ea89..00000000 --- a/src/funcs/integrationsDeleteProjectConfig.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a ticketing project configuration - * - * @remarks - * Archive configuration for a ticketing project - */ -export async function integrationsDeleteProjectConfig( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTicketingProjectConfigRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteTicketingProjectConfigRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - config_id: encodeSimple("config_id", payload.config_id, { - explode: false, - charEncoding: "percent", - }), - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations/{config_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTicketingProjectConfig", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingProjectConfigEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsDeleteSlackEmojiAction.ts b/src/funcs/integrationsDeleteSlackEmojiAction.ts new file mode 100644 index 00000000..854f0e2d --- /dev/null +++ b/src/funcs/integrationsDeleteSlackEmojiAction.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a Slack emoji action + * + * @remarks + * Deletes a Slack emoji action + */ +export function integrationsDeleteSlackEmojiAction( + client: FirehydrantCore, + request: operations.DeleteSlackEmojiActionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteSlackEmojiActionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteSlackEmojiActionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + emoji_action_id: encodeSimple("emoji_action_id", payload.emoji_action_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/slack/connections/{connection_id}/emoji_actions/{emoji_action_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_slack_emoji_action", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsDeleteStatuspageConnection.ts b/src/funcs/integrationsDeleteStatuspageConnection.ts index 0539a852..e0baa762 100644 --- a/src/funcs/integrationsDeleteStatuspageConnection.ts +++ b/src/funcs/integrationsDeleteStatuspageConnection.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Deletes the given Statuspage integration connection. */ -export async function integrationsDeleteStatuspageConnection( - client: FirehydrantTypescriptSDKCore, +export function integrationsDeleteStatuspageConnection( + client: FirehydrantCore, request: operations.DeleteStatuspageConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IntegrationsStatuspageConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function integrationsDeleteStatuspageConnection( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteStatuspageConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsStatuspageConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function integrationsDeleteStatuspageConnection( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -74,16 +95,17 @@ export async function integrationsDeleteStatuspageConnection( "/v1/integrations/statuspage/connections/{connection_id}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteStatuspageConnection", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_statuspage_connection", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +127,23 @@ export async function integrationsDeleteStatuspageConnection( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IntegrationsStatuspageConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -170,23 +156,12 @@ export async function integrationsDeleteStatuspageConnection( 200, components.IntegrationsStatuspageConnectionEntity$inboundSchema, ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/integrationsGet.ts b/src/funcs/integrationsGet.ts deleted file mode 100644 index 0810bbba..00000000 --- a/src/funcs/integrationsGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an integration - * - * @remarks - * Retrieve a single integration - */ -export async function integrationsGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIntegrationRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsIntegrationEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetIntegrationRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - integration_id: encodeSimple("integration_id", payload.integration_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/integrations/{integration_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIntegration", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsIntegrationEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IntegrationsIntegrationEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsGetAvailableFields.ts b/src/funcs/integrationsGetAvailableFields.ts deleted file mode 100644 index d63dfbe2..00000000 --- a/src/funcs/integrationsGetAvailableFields.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List available fields for ticket field mapping - * - * @remarks - * Returns metadata for the fields that are available for field mapping. - */ -export async function integrationsGetAvailableFields( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketingProjectAvailableFieldsRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingFieldMapsMappableFieldEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTicketingProjectAvailableFieldsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/field_maps/available_fields", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicketingProjectAvailableFields", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingFieldMapsMappableFieldEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingFieldMapsMappableFieldEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsGetAwsCloudtrailBatch.ts b/src/funcs/integrationsGetAwsCloudtrailBatch.ts new file mode 100644 index 00000000..02710b93 --- /dev/null +++ b/src/funcs/integrationsGetAwsCloudtrailBatch.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a CloudTrail batch + * + * @remarks + * Retrieve a single CloudTrail batch. + */ +export function integrationsGetAwsCloudtrailBatch( + client: FirehydrantCore, + request: operations.GetAwsCloudtrailBatchRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsAwsCloudtrailBatchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetAwsCloudtrailBatchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsAwsCloudtrailBatchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetAwsCloudtrailBatchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/integrations/aws/cloudtrail_batches/{id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_aws_cloudtrail_batch", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsAwsCloudtrailBatchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsAwsCloudtrailBatchEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsGetAwsConnection.ts b/src/funcs/integrationsGetAwsConnection.ts new file mode 100644 index 00000000..dc31fc16 --- /dev/null +++ b/src/funcs/integrationsGetAwsConnection.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an AWS connection + * + * @remarks + * Retrieves the information about the AWS connection. + */ +export function integrationsGetAwsConnection( + client: FirehydrantCore, + request: operations.GetAwsConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsAwsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetAwsConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsAwsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAwsConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/integrations/aws/connections/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_aws_connection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsAwsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsAwsConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsGetFieldMapAvailableFields.ts b/src/funcs/integrationsGetFieldMapAvailableFields.ts deleted file mode 100644 index 60f49da9..00000000 --- a/src/funcs/integrationsGetFieldMapAvailableFields.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List available fields for field mapping - * - * @remarks - * Get a description of the fields to which data can be mapped - */ -export async function integrationsGetFieldMapAvailableFields( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIntegrationFieldMapAvailableFieldsRequest, - options?: RequestOptions, -): Promise< - Result< - components.FieldMappingMappableFieldEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetIntegrationFieldMapAvailableFieldsRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - field_map_id: encodeSimple("field_map_id", payload.field_map_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/field_maps/{field_map_id}/available_fields", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIntegrationFieldMapAvailableFields", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.FieldMappingMappableFieldEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.FieldMappingMappableFieldEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsGetIntegration.ts b/src/funcs/integrationsGetIntegration.ts new file mode 100644 index 00000000..1123c967 --- /dev/null +++ b/src/funcs/integrationsGetIntegration.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an integration + * + * @remarks + * Retrieve a single integration + */ +export function integrationsGetIntegration( + client: FirehydrantCore, + request: operations.GetIntegrationRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsIntegrationEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIntegrationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsIntegrationEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIntegrationRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + integration_id: encodeSimple("integration_id", payload.integration_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/integrations/{integration_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_integration", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsIntegrationEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsIntegrationEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsGetProjectConfigurationOptions.ts b/src/funcs/integrationsGetProjectConfigurationOptions.ts deleted file mode 100644 index 4dca7213..00000000 --- a/src/funcs/integrationsGetProjectConfigurationOptions.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List configuration options for a ticketing project - */ -export async function integrationsGetProjectConfigurationOptions( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketingProjectConfigurationOptionsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTicketingProjectConfigurationOptionsRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/configuration_options", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicketingProjectConfigurationOptions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsGetProjectFieldOptions.ts b/src/funcs/integrationsGetProjectFieldOptions.ts deleted file mode 100644 index 0ea8ac6f..00000000 --- a/src/funcs/integrationsGetProjectFieldOptions.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List configuration options for a ticketing project field - */ -export async function integrationsGetProjectFieldOptions( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketingProjectFieldOptionsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTicketingProjectFieldOptionsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - field_id: encodeSimple("field_id", payload.field_id, { - explode: false, - charEncoding: "percent", - }), - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/configuration_options/options_for/{field_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicketingProjectFieldOptions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsGetSlackEmojiAction.ts b/src/funcs/integrationsGetSlackEmojiAction.ts new file mode 100644 index 00000000..f8db2749 --- /dev/null +++ b/src/funcs/integrationsGetSlackEmojiAction.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a Slack emoji action + * + * @remarks + * Retrieves a Slack emoji action + */ +export function integrationsGetSlackEmojiAction( + client: FirehydrantCore, + request: operations.GetSlackEmojiActionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSlackEmojiActionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSlackEmojiActionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + emoji_action_id: encodeSimple("emoji_action_id", payload.emoji_action_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/slack/connections/{connection_id}/emoji_actions/{emoji_action_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_slack_emoji_action", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsGetStatus.ts b/src/funcs/integrationsGetStatus.ts deleted file mode 100644 index 8647e162..00000000 --- a/src/funcs/integrationsGetStatus.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an integration status - */ -export async function integrationsGetStatus( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIntegrationStatusRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetIntegrationStatusRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - slug: encodeSimple("slug", payload.slug, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/integrations/statuses/{slug}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIntegrationStatus", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsGetStatuspageConnection.ts b/src/funcs/integrationsGetStatuspageConnection.ts index 8a933510..754fefae 100644 --- a/src/funcs/integrationsGetStatuspageConnection.ts +++ b/src/funcs/integrationsGetStatuspageConnection.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Retrieve the information about the Statuspage connection. */ -export async function integrationsGetStatuspageConnection( - client: FirehydrantTypescriptSDKCore, +export function integrationsGetStatuspageConnection( + client: FirehydrantCore, request: operations.GetStatuspageConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.IntegrationsStatuspageConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function integrationsGetStatuspageConnection( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetStatuspageConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsStatuspageConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function integrationsGetStatuspageConnection( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -74,16 +95,17 @@ export async function integrationsGetStatuspageConnection( "/v1/integrations/statuspage/connections/{connection_id}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "getStatuspageConnection", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_statuspage_connection", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +127,23 @@ export async function integrationsGetStatuspageConnection( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.IntegrationsStatuspageConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -170,23 +156,12 @@ export async function integrationsGetStatuspageConnection( 200, components.IntegrationsStatuspageConnectionEntity$inboundSchema, ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/integrationsGetTicket.ts b/src/funcs/integrationsGetTicket.ts deleted file mode 100644 index 6e761f10..00000000 --- a/src/funcs/integrationsGetTicket.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a ticket - * - * @remarks - * Retrieves a single ticket by ID - */ -export async function integrationsGetTicket( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetTicketRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ticket_id: encodeSimple("ticket_id", payload.ticket_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/ticketing/tickets/{ticket_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicket", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingTicketEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsGetZendeskCustomerSupportIssue.ts b/src/funcs/integrationsGetZendeskCustomerSupportIssue.ts new file mode 100644 index 00000000..da081b87 --- /dev/null +++ b/src/funcs/integrationsGetZendeskCustomerSupportIssue.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Search for Zendesk tickets + * + * @remarks + * Search for Zendesk tickets + */ +export function integrationsGetZendeskCustomerSupportIssue( + client: FirehydrantCore, + request: operations.GetZendeskCustomerSupportIssueRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetZendeskCustomerSupportIssueRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetZendeskCustomerSupportIssueRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/integrations/zendesk/search")(); + + const query = encodeFormQuery({ + "include": payload.include, + "ticket_id": payload.ticket_id, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_zendesk_customer_support_issue", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsList.ts b/src/funcs/integrationsList.ts deleted file mode 100644 index dc5b7d43..00000000 --- a/src/funcs/integrationsList.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * List all available integrations - */ -export async function integrationsList( - client: FirehydrantTypescriptSDKCore, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path = pathToFunc("/v1/integrations")(); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIntegrations", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsListAuthedProviders.ts b/src/funcs/integrationsListAuthedProviders.ts new file mode 100644 index 00000000..68ba57f4 --- /dev/null +++ b/src/funcs/integrationsListAuthedProviders.ts @@ -0,0 +1,177 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Lists the available and configured integrations + * + * @remarks + * Lists the available and configured integrations + */ +export function integrationsListAuthedProviders( + client: FirehydrantCore, + request: operations.ListAuthedProvidersRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsAuthedProviderEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAuthedProvidersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsAuthedProviderEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListAuthedProvidersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + integration_slug: encodeSimple( + "integration_slug", + payload.integration_slug, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/integrations/authed_providers/{integration_slug}/{connection_id}", + )(pathParams); + + const query = encodeFormQuery({ + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_authed_providers", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsAuthedProviderEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsAuthedProviderEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListAwsCloudtrailBatchEvents.ts b/src/funcs/integrationsListAwsCloudtrailBatchEvents.ts new file mode 100644 index 00000000..a338d18b --- /dev/null +++ b/src/funcs/integrationsListAwsCloudtrailBatchEvents.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List events for an AWS CloudTrail batch + * + * @remarks + * List events for an AWS CloudTrail batch + */ +export function integrationsListAwsCloudtrailBatchEvents( + client: FirehydrantCore, + request: operations.ListAwsCloudtrailBatchEventsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAwsCloudtrailBatchEventsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListAwsCloudtrailBatchEventsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/aws/cloudtrail_batches/{id}/events", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_aws_cloudtrail_batch_events", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChangeEventEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChangeEventEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListAwsCloudtrailBatches.ts b/src/funcs/integrationsListAwsCloudtrailBatches.ts new file mode 100644 index 00000000..4389af80 --- /dev/null +++ b/src/funcs/integrationsListAwsCloudtrailBatches.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List CloudTrail batches + * + * @remarks + * Lists CloudTrail batches for the authenticated organization. + */ +export function integrationsListAwsCloudtrailBatches( + client: FirehydrantCore, + request: operations.ListAwsCloudtrailBatchesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsAwsCloudtrailBatchEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAwsCloudtrailBatchesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsAwsCloudtrailBatchEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListAwsCloudtrailBatchesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/integrations/aws/cloudtrail_batches")(); + + const query = encodeFormQuery({ + "connection_id": payload.connection_id, + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_aws_cloudtrail_batches", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsAwsCloudtrailBatchEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsAwsCloudtrailBatchEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListAwsConnections.ts b/src/funcs/integrationsListAwsConnections.ts new file mode 100644 index 00000000..f04c32ed --- /dev/null +++ b/src/funcs/integrationsListAwsConnections.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List AWS connections + * + * @remarks + * Lists the available and configured AWS integration connections for the authenticated organization. + */ +export function integrationsListAwsConnections( + client: FirehydrantCore, + request: operations.ListAwsConnectionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsAwsConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAwsConnectionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsAwsConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListAwsConnectionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/integrations/aws/connections")(); + + const query = encodeFormQuery({ + "aws_account_id": payload.aws_account_id, + "external_id": payload.external_id, + "page": payload.page, + "per_page": payload.per_page, + "target_arn": payload.target_arn, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_aws_connections", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsAwsConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsAwsConnectionEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListCloudtrailBatches.ts b/src/funcs/integrationsListCloudtrailBatches.ts deleted file mode 100644 index 0f980bbc..00000000 --- a/src/funcs/integrationsListCloudtrailBatches.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List AWS CloudTrail batches - * - * @remarks - * Lists CloudTrail batches for the authenticated organization. - */ -export async function integrationsListCloudtrailBatches( - client: FirehydrantTypescriptSDKCore, - request: operations.ListAwsCloudtrailBatchesRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsAwsCloudtrailBatchEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListAwsCloudtrailBatchesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/integrations/aws/cloudtrail_batches")(); - - const query = encodeFormQuery({ - "connection_id": payload.connection_id, - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listAwsCloudtrailBatches", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsAwsCloudtrailBatchEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.IntegrationsAwsCloudtrailBatchEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsListConnectionStatuses.ts b/src/funcs/integrationsListConnectionStatuses.ts new file mode 100644 index 00000000..bd4f7a3e --- /dev/null +++ b/src/funcs/integrationsListConnectionStatuses.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get integration connection status + * + * @remarks + * Retrieve overall integration connection status + */ +export function integrationsListConnectionStatuses( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/integrations/statuses")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_connection_statuses", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsConnectionStatusEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListConnectionStatusesBySlug.ts b/src/funcs/integrationsListConnectionStatusesBySlug.ts new file mode 100644 index 00000000..41876971 --- /dev/null +++ b/src/funcs/integrationsListConnectionStatusesBySlug.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an integration connection status + * + * @remarks + * Retrieve a single integration connection status + */ +export function integrationsListConnectionStatusesBySlug( + client: FirehydrantCore, + request: operations.ListConnectionStatusesBySlugRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListConnectionStatusesBySlugRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListConnectionStatusesBySlugRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + slug: encodeSimple("slug", payload.slug, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/integrations/statuses/{slug}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_connection_statuses_by_slug", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsConnectionStatusEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListConnectionStatusesBySlugAndId.ts b/src/funcs/integrationsListConnectionStatusesBySlugAndId.ts new file mode 100644 index 00000000..aad37dbf --- /dev/null +++ b/src/funcs/integrationsListConnectionStatusesBySlugAndId.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an integration connection status + * + * @remarks + * Retrieve a single integration connection status + */ +export function integrationsListConnectionStatusesBySlugAndId( + client: FirehydrantCore, + request: operations.ListConnectionStatusesBySlugAndIdRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListConnectionStatusesBySlugAndIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListConnectionStatusesBySlugAndIdRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + by_connection_id: encodeSimple( + "by_connection_id", + payload.by_connection_id, + { explode: false, charEncoding: "percent" }, + ), + slug: encodeSimple("slug", payload.slug, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/statuses/{slug}/{by_connection_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_connection_statuses_by_slug_and_id", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsConnectionStatusEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsConnectionStatusEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListConnections.ts b/src/funcs/integrationsListConnections.ts index 6276787a..d4d35c04 100644 --- a/src/funcs/integrationsListConnections.ts +++ b/src/funcs/integrationsListConnections.ts @@ -2,14 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -18,27 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * List integration connections + * + * @remarks + * List available integration connections */ -export async function integrationsListConnections( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIntegrationConnectionsRequest, +export function integrationsListConnections( + client: FirehydrantCore, + request: operations.ListConnectionsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntityPaginated, | APIError | SDKValidationError | UnexpectedClientError @@ -47,15 +45,40 @@ export async function integrationsListConnections( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListConnectionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.ListIntegrationConnectionsRequest$outboundSchema.parse(value), + (value) => operations.ListConnectionsRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -66,16 +89,17 @@ export async function integrationsListConnections( "integration_slug": payload.integration_slug, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listIntegrationConnections", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_connections", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -98,59 +122,23 @@ export async function integrationsListConnections( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntityPaginated, | APIError | SDKValidationError | UnexpectedClientError @@ -159,24 +147,13 @@ export async function integrationsListConnections( | RequestTimeoutError | ConnectionError >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(200, components.IntegrationsConnectionEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/integrationsListEmojiActions.ts b/src/funcs/integrationsListEmojiActions.ts deleted file mode 100644 index 1d04ea04..00000000 --- a/src/funcs/integrationsListEmojiActions.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List Slack emoji actions - * - * @remarks - * Lists all slack emoji actions - */ -export async function integrationsListEmojiActions( - client: FirehydrantTypescriptSDKCore, - request: operations.ListSlackEmojiActionsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListSlackEmojiActionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/slack/connections/{connection_id}/emoji_actions", - )(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listSlackEmojiActions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsListFieldMapAvailableFields.ts b/src/funcs/integrationsListFieldMapAvailableFields.ts new file mode 100644 index 00000000..8be395a8 --- /dev/null +++ b/src/funcs/integrationsListFieldMapAvailableFields.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List available fields for field mapping + * + * @remarks + * Get a description of the fields to which data can be mapped + */ +export function integrationsListFieldMapAvailableFields( + client: FirehydrantCore, + request: operations.ListFieldMapAvailableFieldsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.FieldMappingMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListFieldMapAvailableFieldsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FieldMappingMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListFieldMapAvailableFieldsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + field_map_id: encodeSimple("field_map_id", payload.field_map_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/field_maps/{field_map_id}/available_fields", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_field_map_available_fields", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.FieldMappingMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.FieldMappingMappableFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListIntegrations.ts b/src/funcs/integrationsListIntegrations.ts new file mode 100644 index 00000000..c9616532 --- /dev/null +++ b/src/funcs/integrationsListIntegrations.ts @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List integrations + * + * @remarks + * Lists the available and configured integrations + */ +export function integrationsListIntegrations( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsIntegrationEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsIntegrationEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/integrations")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_integrations", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsIntegrationEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsIntegrationEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListProjects.ts b/src/funcs/integrationsListProjects.ts deleted file mode 100644 index 09501198..00000000 --- a/src/funcs/integrationsListProjects.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List ticketing projects - * - * @remarks - * List all ticketing projects available to the organization - */ -export async function integrationsListProjects( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTicketingProjectsRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectsProjectListItemEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListTicketingProjectsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/ticketing/projects")(); - - const query = encodeFormQuery({ - "configured_projects": payload.configured_projects, - "connection_ids": payload.connection_ids, - "page": payload.page, - "per_page": payload.per_page, - "providers": payload.providers, - "query": payload.query, - "supports_ticket_types": payload.supports_ticket_types, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTicketingProjects", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectsProjectListItemEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.TicketingProjectsProjectListItemEntity$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsListSlackEmojiActions.ts b/src/funcs/integrationsListSlackEmojiActions.ts new file mode 100644 index 00000000..9e0e9123 --- /dev/null +++ b/src/funcs/integrationsListSlackEmojiActions.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List Slack emoji actions + * + * @remarks + * Lists Slack emoji actions + */ +export function integrationsListSlackEmojiActions( + client: FirehydrantCore, + request: operations.ListSlackEmojiActionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSlackEmojiActionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListSlackEmojiActionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/slack/connections/{connection_id}/emoji_actions", + )(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_slack_emoji_actions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListSlackUsergroups.ts b/src/funcs/integrationsListSlackUsergroups.ts new file mode 100644 index 00000000..cbc59863 --- /dev/null +++ b/src/funcs/integrationsListSlackUsergroups.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List Slack user groups + * + * @remarks + * Lists all Slack user groups + */ +export function integrationsListSlackUsergroups( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsSlackUsergroupEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsSlackUsergroupEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/integrations/slack/usergroups")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_slack_usergroups", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsSlackUsergroupEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsSlackUsergroupEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListSlackWorkspaces.ts b/src/funcs/integrationsListSlackWorkspaces.ts new file mode 100644 index 00000000..6deff5fa --- /dev/null +++ b/src/funcs/integrationsListSlackWorkspaces.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List Slack workspaces + * + * @remarks + * Lists all Slack workspaces + */ +export function integrationsListSlackWorkspaces( + client: FirehydrantCore, + request: operations.ListSlackWorkspacesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsSlackWorkspaceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSlackWorkspacesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsSlackWorkspaceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListSlackWorkspacesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/slack/connections/{connection_id}/workspaces", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_slack_workspaces", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsSlackWorkspaceEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsSlackWorkspaceEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListStatuspageConnectionPages.ts b/src/funcs/integrationsListStatuspageConnectionPages.ts new file mode 100644 index 00000000..71629c4d --- /dev/null +++ b/src/funcs/integrationsListStatuspageConnectionPages.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List StatusPage pages for a connection + * + * @remarks + * Lists available page IDs for the Statuspage integration connection. + */ +export function integrationsListStatuspageConnectionPages( + client: FirehydrantCore, + request: operations.ListStatuspageConnectionPagesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsStatuspagePageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListStatuspageConnectionPagesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsStatuspagePageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListStatuspageConnectionPagesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/statuspage/connections/{connection_id}/pages", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_statuspage_connection_pages", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsStatuspagePageEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsStatuspagePageEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsListStatuspageConnections.ts b/src/funcs/integrationsListStatuspageConnections.ts new file mode 100644 index 00000000..e6e544ed --- /dev/null +++ b/src/funcs/integrationsListStatuspageConnections.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List Statuspage connections + * + * @remarks + * Lists the available and configured Statuspage integrations connections for the authenticated organization. + */ +export function integrationsListStatuspageConnections( + client: FirehydrantCore, + request: operations.ListStatuspageConnectionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsStatuspageConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListStatuspageConnectionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsStatuspageConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListStatuspageConnectionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/integrations/statuspage/connections")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_statuspage_connections", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsStatuspageConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsStatuspageConnectionEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsRefreshConnection.ts b/src/funcs/integrationsRefreshConnection.ts index 673433d8..c8ba9531 100644 --- a/src/funcs/integrationsRefreshConnection.ts +++ b/src/funcs/integrationsRefreshConnection.ts @@ -2,14 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -18,27 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * Refresh an integration connection + * + * @remarks + * Refresh the integration connection with the provided data */ -export async function integrationsRefreshConnection( - client: FirehydrantTypescriptSDKCore, - request: operations.RefreshIntegrationConnectionRequest, +export function integrationsRefreshConnection( + client: FirehydrantCore, + request: operations.RefreshConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -47,17 +45,40 @@ export async function integrationsRefreshConnection( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.RefreshConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.RefreshIntegrationConnectionRequest$outboundSchema.parse( - value, - ), + (value) => operations.RefreshConnectionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -77,16 +98,17 @@ export async function integrationsRefreshConnection( "/v1/integrations/connections/{slug}/{connection_id}/refresh", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "refreshIntegrationConnection", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "refresh_connection", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -108,59 +130,23 @@ export async function integrationsRefreshConnection( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -169,24 +155,13 @@ export async function integrationsRefreshConnection( | RequestTimeoutError | ConnectionError >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(200, components.IntegrationsConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/integrationsSearchConfluenceSpaces.ts b/src/funcs/integrationsSearchConfluenceSpaces.ts new file mode 100644 index 00000000..b2430e04 --- /dev/null +++ b/src/funcs/integrationsSearchConfluenceSpaces.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List Confluence spaces + * + * @remarks + * Lists available space keys for the Confluence integration connection. + */ +export function integrationsSearchConfluenceSpaces( + client: FirehydrantCore, + request: operations.SearchConfluenceSpacesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsConfluenceCloudSpaceKeyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.SearchConfluenceSpacesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConfluenceCloudSpaceKeyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SearchConfluenceSpacesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/confluence_cloud/connections/{id}/space/search", + )(pathParams); + + const query = encodeFormQuery({ + "keyword": payload.keyword, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "search_confluence_spaces", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsConfluenceCloudSpaceKeyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsConfluenceCloudSpaceKeyEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsSearchZendeskTickets.ts b/src/funcs/integrationsSearchZendeskTickets.ts new file mode 100644 index 00000000..ee22b01f --- /dev/null +++ b/src/funcs/integrationsSearchZendeskTickets.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Search for Zendesk tickets + * + * @remarks + * Search for Zendesk tickets + */ +export function integrationsSearchZendeskTickets( + client: FirehydrantCore, + request: operations.SearchZendeskTicketsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsZendeskSearchTicketsPaginatedEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.SearchZendeskTicketsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsZendeskSearchTicketsPaginatedEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.SearchZendeskTicketsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/zendesk/{connection_id}/tickets/search", + )(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "search_zendesk_tickets", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsZendeskSearchTicketsPaginatedEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsZendeskSearchTicketsPaginatedEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsSlackDeleteEmojiAction.ts b/src/funcs/integrationsSlackDeleteEmojiAction.ts deleted file mode 100644 index d9671064..00000000 --- a/src/funcs/integrationsSlackDeleteEmojiAction.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a Slack emoji action - * - * @remarks - * Deletes a slack emoji action - */ -export async function integrationsSlackDeleteEmojiAction( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteSlackEmojiActionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteSlackEmojiActionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - emoji_action_id: encodeSimple("emoji_action_id", payload.emoji_action_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/slack/connections/{connection_id}/emoji_actions/{emoji_action_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteSlackEmojiAction", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsSlackGetEmojiAction.ts b/src/funcs/integrationsSlackGetEmojiAction.ts deleted file mode 100644 index 8ed8373d..00000000 --- a/src/funcs/integrationsSlackGetEmojiAction.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a Slack emoji action - * - * @remarks - * Retrieves a slack emoji action - */ -export async function integrationsSlackGetEmojiAction( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSlackEmojiActionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetSlackEmojiActionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - emoji_action_id: encodeSimple("emoji_action_id", payload.emoji_action_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/slack/connections/{connection_id}/emoji_actions/{emoji_action_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSlackEmojiAction", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsSlackListWorkspaces.ts b/src/funcs/integrationsSlackListWorkspaces.ts deleted file mode 100644 index 68a87ada..00000000 --- a/src/funcs/integrationsSlackListWorkspaces.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List Slack workspaces for a connection - */ -export async function integrationsSlackListWorkspaces( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSlackWorkspacesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetSlackWorkspacesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/slack/connections/{connection_id}/workspaces", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSlackWorkspaces", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsStatuspageListConnections.ts b/src/funcs/integrationsStatuspageListConnections.ts deleted file mode 100644 index 0751d1db..00000000 --- a/src/funcs/integrationsStatuspageListConnections.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List Statuspage connections - * - * @remarks - * Lists the available and configured Statuspage integrations connections for the authenticated organization. - */ -export async function integrationsStatuspageListConnections( - client: FirehydrantTypescriptSDKCore, - request: operations.ListStatuspageConnectionsRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsStatuspageConnectionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListStatuspageConnectionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/integrations/statuspage/connections")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listStatuspageConnections", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsStatuspageConnectionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.IntegrationsStatuspageConnectionEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsStatuspageListPages.ts b/src/funcs/integrationsStatuspageListPages.ts deleted file mode 100644 index 1af1429d..00000000 --- a/src/funcs/integrationsStatuspageListPages.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List StatusPage pages for a connection - */ -export async function integrationsStatuspageListPages( - client: FirehydrantTypescriptSDKCore, - request: operations.ListStatuspagePagesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListStatuspagePagesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/statuspage/connections/{connection_id}/pages", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listStatuspagePages", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsTicketingGetProject.ts b/src/funcs/integrationsTicketingGetProject.ts deleted file mode 100644 index 40f0fcb7..00000000 --- a/src/funcs/integrationsTicketingGetProject.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a ticketing project - * - * @remarks - * Retrieve a single ticketing project by ID - */ -export async function integrationsTicketingGetProject( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketingProjectRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectsProjectListItemEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTicketingProjectRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/ticketing/projects/{ticketing_project_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicketingProject", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectsProjectListItemEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.TicketingProjectsProjectListItemEntity$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsTicketingListTags.ts b/src/funcs/integrationsTicketingListTags.ts deleted file mode 100644 index 42cf9bf8..00000000 --- a/src/funcs/integrationsTicketingListTags.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List ticket tags - * - * @remarks - * List all of the ticket tags in the organization - */ -export async function integrationsTicketingListTags( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTicketTagsRequest, - options?: RequestOptions, -): Promise< - Result< - components.TagEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListTicketTagsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/ticketing/ticket_tags")(); - - const query = encodeFormQuery({ - "prefix": payload.prefix, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTicketTags", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TagEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TagEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsUpdateAuthedProvider.ts b/src/funcs/integrationsUpdateAuthedProvider.ts new file mode 100644 index 00000000..3fe661f9 --- /dev/null +++ b/src/funcs/integrationsUpdateAuthedProvider.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an authed provider + * + * @remarks + * Retrieve a single authed provider + */ +export function integrationsUpdateAuthedProvider( + client: FirehydrantCore, + request: operations.UpdateAuthedProviderRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PublicApiv1IntegrationsAuthedProviderEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateAuthedProviderRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PublicApiv1IntegrationsAuthedProviderEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateAuthedProviderRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + authed_provider_id: encodeSimple( + "authed_provider_id", + payload.authed_provider_id, + { explode: false, charEncoding: "percent" }, + ), + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + integration_slug: encodeSimple( + "integration_slug", + payload.integration_slug, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/integrations/authed_providers/{integration_slug}/{connection_id}/{authed_provider_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_authed_provider", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PublicApiv1IntegrationsAuthedProviderEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.PublicApiv1IntegrationsAuthedProviderEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsUpdateAwsCloudtrailBatch.ts b/src/funcs/integrationsUpdateAwsCloudtrailBatch.ts new file mode 100644 index 00000000..d73451ca --- /dev/null +++ b/src/funcs/integrationsUpdateAwsCloudtrailBatch.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a CloudTrail batch + * + * @remarks + * Update a CloudTrail batch with new information. + */ +export function integrationsUpdateAwsCloudtrailBatch( + client: FirehydrantCore, + request: operations.UpdateAwsCloudtrailBatchRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsAwsCloudtrailBatchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateAwsCloudtrailBatchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsAwsCloudtrailBatchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateAwsCloudtrailBatchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_aws_cloudtrail_batch, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/integrations/aws/cloudtrail_batches/{id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_aws_cloudtrail_batch", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsAwsCloudtrailBatchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsAwsCloudtrailBatchEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsUpdateAwsConnection.ts b/src/funcs/integrationsUpdateAwsConnection.ts new file mode 100644 index 00000000..ec6c035c --- /dev/null +++ b/src/funcs/integrationsUpdateAwsConnection.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an AWS connection + * + * @remarks + * Update the AWS connection with the provided data. + */ +export function integrationsUpdateAwsConnection( + client: FirehydrantCore, + request: operations.UpdateAwsConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsAwsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateAwsConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsAwsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateAwsConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_aws_connection, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/integrations/aws/connections/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_aws_connection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsAwsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IntegrationsAwsConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsUpdateCloudTrailBatch.ts b/src/funcs/integrationsUpdateCloudTrailBatch.ts deleted file mode 100644 index dc5420ce..00000000 --- a/src/funcs/integrationsUpdateCloudTrailBatch.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an AWS CloudTrail batch - * - * @remarks - * Update a CloudTrail batch with new information. - */ -export async function integrationsUpdateCloudTrailBatch( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateAwsCloudTrailBatchRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsAwsCloudtrailBatchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateAwsCloudTrailBatchRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IntegrationsAwsCloudtrailBatchesId, - { explode: true }, - ); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/integrations/aws/cloudtrail_batches/{id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateAwsCloudTrailBatch", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsAwsCloudtrailBatchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.IntegrationsAwsCloudtrailBatchEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsUpdateConnection.ts b/src/funcs/integrationsUpdateConnection.ts index 5436ea99..21b70676 100644 --- a/src/funcs/integrationsUpdateConnection.ts +++ b/src/funcs/integrationsUpdateConnection.ts @@ -2,14 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; import { APIError } from "../models/errors/apierror.js"; import { ConnectionError, @@ -18,27 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * Update an integration connection + * + * @remarks + * Update the integration connection with the provided data */ -export async function integrationsUpdateConnection( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIntegrationConnectionRequest, +export function integrationsUpdateConnection( + client: FirehydrantCore, + request: operations.UpdateConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -47,15 +45,40 @@ export async function integrationsUpdateConnection( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.UpdateIntegrationConnectionRequest$outboundSchema.parse(value), + (value) => operations.UpdateConnectionRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -75,16 +98,17 @@ export async function integrationsUpdateConnection( "/v1/integrations/connections/{slug}/{connection_id}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateIntegrationConnection", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_connection", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -106,59 +130,23 @@ export async function integrationsUpdateConnection( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.IntegrationsConnectionEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -167,24 +155,13 @@ export async function integrationsUpdateConnection( | RequestTimeoutError | ConnectionError >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(200, components.IntegrationsConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/integrationsUpdateFieldMap.ts b/src/funcs/integrationsUpdateFieldMap.ts index 25be7519..e15a5d7b 100644 --- a/src/funcs/integrationsUpdateFieldMap.ts +++ b/src/funcs/integrationsUpdateFieldMap.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * Update a field mapping configuration + * Update field mapping * * @remarks - * Update field map + * Update field mapping */ -export async function integrationsUpdateFieldMap( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIntegrationFieldMapRequest, +export function integrationsUpdateFieldMap( + client: FirehydrantCore, + request: operations.UpdateFieldMapRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.FieldMappingFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,15 +45,40 @@ export async function integrationsUpdateFieldMap( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.FieldMappingFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => - operations.UpdateIntegrationFieldMapRequest$outboundSchema.parse(value), + (value) => operations.UpdateFieldMapRequest$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -74,16 +94,17 @@ export async function integrationsUpdateFieldMap( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateIntegrationFieldMap", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_field_map", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +126,23 @@ export async function integrationsUpdateFieldMap( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.FieldMappingFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -167,23 +152,12 @@ export async function integrationsUpdateFieldMap( | ConnectionError >( M.json(200, components.FieldMappingFieldMapEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/integrationsUpdatePriority.ts b/src/funcs/integrationsUpdatePriority.ts deleted file mode 100644 index 627e403f..00000000 --- a/src/funcs/integrationsUpdatePriority.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a ticketing priority - * - * @remarks - * Update a single ticketing priority's attributes - */ -export async function integrationsUpdatePriority( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTicketingPriorityRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateTicketingPriorityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1TicketingPrioritiesId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/ticketing/priorities/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTicketingPriority", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingPriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/integrationsUpdateSlackEmojiAction.ts b/src/funcs/integrationsUpdateSlackEmojiAction.ts new file mode 100644 index 00000000..98659754 --- /dev/null +++ b/src/funcs/integrationsUpdateSlackEmojiAction.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a Slack emoji action + * + * @remarks + * Updates a Slack emoji action + */ +export function integrationsUpdateSlackEmojiAction( + client: FirehydrantCore, + request: operations.UpdateSlackEmojiActionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateSlackEmojiActionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateSlackEmojiActionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + emoji_action_id: encodeSimple("emoji_action_id", payload.emoji_action_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/slack/connections/{connection_id}/emoji_actions/{emoji_action_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_slack_emoji_action", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsUpdateStatuspageConnection.ts b/src/funcs/integrationsUpdateStatuspageConnection.ts new file mode 100644 index 00000000..b7104779 --- /dev/null +++ b/src/funcs/integrationsUpdateStatuspageConnection.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a Statuspage connection + * + * @remarks + * Update the given Statuspage integration connection. + */ +export function integrationsUpdateStatuspageConnection( + client: FirehydrantCore, + request: operations.UpdateStatuspageConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IntegrationsStatuspageConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateStatuspageConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IntegrationsStatuspageConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateStatuspageConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_statuspage_connection, { + explode: true, + }); + + const pathParams = { + connection_id: encodeSimple("connection_id", payload.connection_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/integrations/statuspage/connections/{connection_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_statuspage_connection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IntegrationsStatuspageConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.IntegrationsStatuspageConnectionEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/integrationsUpdateTicketingFieldMap.ts b/src/funcs/integrationsUpdateTicketingFieldMap.ts deleted file mode 100644 index 995b13bd..00000000 --- a/src/funcs/integrationsUpdateTicketingFieldMap.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a field map for a ticketing project - * - * @remarks - * Update field map for a ticketing project - */ -export async function integrationsUpdateTicketingFieldMap( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTicketingProjectFieldMapRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateTicketingProjectFieldMapRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - map_id: encodeSimple("map_id", payload.map_id, { - explode: false, - charEncoding: "percent", - }), - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/field_maps/{map_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTicketingProjectFieldMap", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingProjectFieldMapEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/maintenancesCreate.ts b/src/funcs/maintenancesCreate.ts deleted file mode 100644 index a617a026..00000000 --- a/src/funcs/maintenancesCreate.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a scheduled maintenance event - * - * @remarks - * Create a new scheduled maintenance event - */ -export async function maintenancesCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1ScheduledMaintenances, - options?: RequestOptions, -): Promise< - Result< - components.ScheduledMaintenanceEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - components.PostV1ScheduledMaintenances$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/scheduled_maintenances")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createScheduledMaintenance", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ScheduledMaintenanceEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.ScheduledMaintenanceEntity$inboundSchema), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/maintenancesDelete.ts b/src/funcs/maintenancesDelete.ts deleted file mode 100644 index d7a71e5a..00000000 --- a/src/funcs/maintenancesDelete.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a scheduled maintenance event - * - * @remarks - * Delete a scheduled maintenance event, preventing it from taking place. - */ -export async function maintenancesDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteScheduledMaintenanceRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteScheduledMaintenanceRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - scheduled_maintenance_id: encodeSimple( - "scheduled_maintenance_id", - payload.scheduled_maintenance_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/scheduled_maintenances/{scheduled_maintenance_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteScheduledMaintenance", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/maintenancesList.ts b/src/funcs/maintenancesList.ts deleted file mode 100644 index 20477b22..00000000 --- a/src/funcs/maintenancesList.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List scheduled maintenance events - * - * @remarks - * Lists all scheduled maintenance events - */ -export async function maintenancesList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListScheduledMaintenancesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ScheduledMaintenanceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListScheduledMaintenancesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/scheduled_maintenances")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listScheduledMaintenances", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ScheduledMaintenanceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ScheduledMaintenanceEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsGetInfrastructure.ts b/src/funcs/metricsGetInfrastructure.ts deleted file mode 100644 index a1816b35..00000000 --- a/src/funcs/metricsGetInfrastructure.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get metrics for a specific catalog entry - * - * @remarks - * Return metrics for a specific component - */ -export async function metricsGetInfrastructure( - client: FirehydrantTypescriptSDKCore, - request: operations.GetInfrastructureMetricsRequest, - options?: RequestOptions, -): Promise< - Result< - components.MetricsInfrastructureMetricsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetInfrastructureMetricsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - infra_id: encodeSimple("infra_id", payload.infra_id, { - explode: false, - charEncoding: "percent", - }), - infra_type: encodeSimple("infra_type", payload.infra_type, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/metrics/{infra_type}/{infra_id}")(pathParams); - - const query = encodeFormQuery({ - "end_date": payload.end_date, - "start_date": payload.start_date, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getInfrastructureMetrics", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.MetricsInfrastructureMetricsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.MetricsInfrastructureMetricsEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingCreateMeasurementDefinition.ts b/src/funcs/metricsReportingCreateMeasurementDefinition.ts deleted file mode 100644 index 4260b04c..00000000 --- a/src/funcs/metricsReportingCreateMeasurementDefinition.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a measurement definition - * - * @remarks - * Create a new measurement definition - */ -export async function metricsReportingCreateMeasurementDefinition( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateMeasurementDefinitionRequestBody, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateMeasurementDefinitionRequestBody$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/lifecycles/measurement_definitions")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createMeasurementDefinition", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingCreateSavedSearch.ts b/src/funcs/metricsReportingCreateSavedSearch.ts index 8701f7c6..6c30ae11 100644 --- a/src/funcs/metricsReportingCreateSavedSearch.ts +++ b/src/funcs/metricsReportingCreateSavedSearch.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Create a new saved search for a particular resource type */ -export async function metricsReportingCreateSavedSearch( - client: FirehydrantTypescriptSDKCore, +export function metricsReportingCreateSavedSearch( + client: FirehydrantCore, request: operations.CreateSavedSearchRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function metricsReportingCreateSavedSearch( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateSavedSearchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,10 +78,10 @@ export async function metricsReportingCreateSavedSearch( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.postV1SavedSearchesResourceType, { + const body = encodeJSON("body", payload.create_saved_search, { explode: true, }); @@ -73,17 +94,18 @@ export async function metricsReportingCreateSavedSearch( const path = pathToFunc("/v1/saved_searches/{resource_type}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createSavedSearch", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_saved_search", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -105,59 +127,23 @@ export async function metricsReportingCreateSavedSearch( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -167,23 +153,12 @@ export async function metricsReportingCreateSavedSearch( | ConnectionError >( M.json(201, components.SavedSearchEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/metricsReportingDeleteMeasurementDefinition.ts b/src/funcs/metricsReportingDeleteMeasurementDefinition.ts deleted file mode 100644 index b2dab178..00000000 --- a/src/funcs/metricsReportingDeleteMeasurementDefinition.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive a measurement definition - * - * @remarks - * Archives a measurement definition which will hide it from lists and metrics - */ -export async function metricsReportingDeleteMeasurementDefinition( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteMeasurementDefinitionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteMeasurementDefinitionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - measurement_definition_id: encodeSimple( - "measurement_definition_id", - payload.measurement_definition_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/lifecycles/measurement_definitions/{measurement_definition_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteMeasurementDefinition", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingDeleteSavedSearch.ts b/src/funcs/metricsReportingDeleteSavedSearch.ts new file mode 100644 index 00000000..ca4144a6 --- /dev/null +++ b/src/funcs/metricsReportingDeleteSavedSearch.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a saved search + * + * @remarks + * Delete a specific saved search + */ +export function metricsReportingDeleteSavedSearch( + client: FirehydrantCore, + request: operations.DeleteSavedSearchRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteSavedSearchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteSavedSearchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + resource_type: encodeSimple("resource_type", payload.resource_type, { + explode: false, + charEncoding: "percent", + }), + saved_search_id: encodeSimple("saved_search_id", payload.saved_search_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/saved_searches/{resource_type}/{saved_search_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_saved_search", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SavedSearchEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingGetMeanTime.ts b/src/funcs/metricsReportingGetMeanTime.ts deleted file mode 100644 index 389b7950..00000000 --- a/src/funcs/metricsReportingGetMeanTime.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get mean time metrics for incidents - * - * @remarks - * Returns a report with time bucketed analytics data - */ -export async function metricsReportingGetMeanTime( - client: FirehydrantTypescriptSDKCore, - request: operations.GetMeanTimeReportRequest, - options?: RequestOptions, -): Promise< - Result< - components.ReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetMeanTimeReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/reports/mean_time")(); - - const query = encodeFormQuery({ - "current_milestones": payload.current_milestones, - "end_date": payload.end_date, - "environments": payload.environments, - "priorities": payload.priorities, - "priority_not_set": payload.priority_not_set, - "query": payload.query, - "saved_search_id": payload.saved_search_id, - "services": payload.services, - "severities": payload.severities, - "severity_not_set": payload.severity_not_set, - "start_date": payload.start_date, - "status": payload.status, - "teams": payload.teams, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getMeanTimeReport", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ReportEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingGetMeanTimeReport.ts b/src/funcs/metricsReportingGetMeanTimeReport.ts new file mode 100644 index 00000000..cab53e69 --- /dev/null +++ b/src/funcs/metricsReportingGetMeanTimeReport.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get mean time metrics for incidents + * + * @remarks + * Returns a report with time bucketed analytics data + */ +export function metricsReportingGetMeanTimeReport( + client: FirehydrantCore, + request: operations.GetMeanTimeReportRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetMeanTimeReportRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetMeanTimeReportRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/reports/mean_time")(); + + const query = encodeFormQuery({ + "current_milestones": payload.current_milestones, + "end_date": payload.end_date, + "environments": payload.environments, + "priorities": payload.priorities, + "priority_not_set": payload.priority_not_set, + "query": payload.query, + "saved_search_id": payload.saved_search_id, + "services": payload.services, + "severities": payload.severities, + "severity_not_set": payload.severity_not_set, + "start_date": payload.start_date, + "status": payload.status, + "teams": payload.teams, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_mean_time_report", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ReportEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingGetMeasurementDefinition.ts b/src/funcs/metricsReportingGetMeasurementDefinition.ts deleted file mode 100644 index e79e1e10..00000000 --- a/src/funcs/metricsReportingGetMeasurementDefinition.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a measurement definition - * - * @remarks - * Retrieve a single measurement definition from its ID - */ -export async function metricsReportingGetMeasurementDefinition( - client: FirehydrantTypescriptSDKCore, - request: operations.GetMeasurementDefinitionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetMeasurementDefinitionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - measurement_definition_id: encodeSimple( - "measurement_definition_id", - payload.measurement_definition_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/lifecycles/measurement_definitions/{measurement_definition_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getMeasurementDefinition", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingGetSavedSearch.ts b/src/funcs/metricsReportingGetSavedSearch.ts new file mode 100644 index 00000000..99c73a8c --- /dev/null +++ b/src/funcs/metricsReportingGetSavedSearch.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a saved search + * + * @remarks + * Retrieve a specific save search + */ +export function metricsReportingGetSavedSearch( + client: FirehydrantCore, + request: operations.GetSavedSearchRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSavedSearchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetSavedSearchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + resource_type: encodeSimple("resource_type", payload.resource_type, { + explode: false, + charEncoding: "percent", + }), + saved_search_id: encodeSimple("saved_search_id", payload.saved_search_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/saved_searches/{resource_type}/{saved_search_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_saved_search", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SavedSearchEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingGetSignalsGroupedMetrics.ts b/src/funcs/metricsReportingGetSignalsGroupedMetrics.ts new file mode 100644 index 00000000..9f0446bb --- /dev/null +++ b/src/funcs/metricsReportingGetSignalsGroupedMetrics.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Generate grouped alert metrics + * + * @remarks + * Generate a report of grouped metrics for Signals alerts + */ +export function metricsReportingGetSignalsGroupedMetrics( + client: FirehydrantCore, + request: operations.GetSignalsGroupedMetricsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSignalsGroupedMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSignalsGroupedMetricsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/analytics/grouped_metrics")(); + + const query = encodeFormQuery({ + "end_date": payload.end_date, + "environments": payload.environments, + "group_by": payload.group_by, + "services": payload.services, + "signal_rules": payload.signal_rules, + "sort_by": payload.sort_by, + "sort_direction": payload.sort_direction, + "start_date": payload.start_date, + "tags": payload.tags, + "teams": payload.teams, + "users": payload.users, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_signals_grouped_metrics", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingGetSignalsMttxAnalytics.ts b/src/funcs/metricsReportingGetSignalsMttxAnalytics.ts new file mode 100644 index 00000000..f5eab622 --- /dev/null +++ b/src/funcs/metricsReportingGetSignalsMttxAnalytics.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get MTTX analytics for signals + * + * @remarks + * Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts + */ +export function metricsReportingGetSignalsMttxAnalytics( + client: FirehydrantCore, + request: operations.GetSignalsMttxAnalyticsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSignalsMttxAnalyticsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSignalsMttxAnalyticsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/analytics/mttx")(); + + const query = encodeFormQuery({ + "end_date": payload.end_date, + "environments": payload.environments, + "group_by": payload.group_by, + "services": payload.services, + "signal_rules": payload.signal_rules, + "sort_by": payload.sort_by, + "sort_direction": payload.sort_direction, + "start_date": payload.start_date, + "tags": payload.tags, + "teams": payload.teams, + "users": payload.users, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_signals_mttx_analytics", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingGetSignalsTimeseriesAnalytics.ts b/src/funcs/metricsReportingGetSignalsTimeseriesAnalytics.ts new file mode 100644 index 00000000..0cc9b9b8 --- /dev/null +++ b/src/funcs/metricsReportingGetSignalsTimeseriesAnalytics.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Generate timeseries alert metrics + * + * @remarks + * Generate a timeseries-based report of metrics for Signals alerts + */ +export function metricsReportingGetSignalsTimeseriesAnalytics( + client: FirehydrantCore, + request: operations.GetSignalsTimeseriesAnalyticsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSignalsTimeseriesAnalyticsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSignalsTimeseriesAnalyticsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/analytics/timeseries")(); + + const query = encodeFormQuery({ + "bucket": payload.bucket, + "end_date": payload.end_date, + "environments": payload.environments, + "group_by": payload.group_by, + "services": payload.services, + "signal_rules": payload.signal_rules, + "sort_by": payload.sort_by, + "sort_direction": payload.sort_direction, + "start_date": payload.start_date, + "tags": payload.tags, + "teams": payload.teams, + "users": payload.users, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_signals_timeseries_analytics", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingListIncidentMetrics.ts b/src/funcs/metricsReportingListIncidentMetrics.ts index 685da085..0b768f0e 100644 --- a/src/funcs/metricsReportingListIncidentMetrics.ts +++ b/src/funcs/metricsReportingListIncidentMetrics.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Returns a report with time bucketed analytics data */ -export async function metricsReportingListIncidentMetrics( - client: FirehydrantTypescriptSDKCore, +export function metricsReportingListIncidentMetrics( + client: FirehydrantCore, request: operations.ListIncidentMetricsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.MetricsMetricsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function metricsReportingListIncidentMetrics( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.MetricsMetricsEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function metricsReportingListIncidentMetrics( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -76,16 +97,17 @@ export async function metricsReportingListIncidentMetrics( "start_date": payload.start_date, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listIncidentMetrics", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_metrics", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -108,59 +130,23 @@ export async function metricsReportingListIncidentMetrics( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.MetricsMetricsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -170,23 +156,12 @@ export async function metricsReportingListIncidentMetrics( | ConnectionError >( M.json(200, components.MetricsMetricsEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/metricsReportingListInfrastructureMetrics.ts b/src/funcs/metricsReportingListInfrastructureMetrics.ts index 20c75bff..6e14464e 100644 --- a/src/funcs/metricsReportingListInfrastructureMetrics.ts +++ b/src/funcs/metricsReportingListInfrastructureMetrics.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * List metrics for all services, environments, functionalities, or customers + * Get metrics for a component * * @remarks - * Returns metrics for all components of a given type + * Return metrics for a specific component */ -export async function metricsReportingListInfrastructureMetrics( - client: FirehydrantTypescriptSDKCore, +export function metricsReportingListInfrastructureMetrics( + client: FirehydrantCore, request: operations.ListInfrastructureMetricsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< - components.MetricsInfrastructureListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.MetricsInfrastructureMetricsEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function metricsReportingListInfrastructureMetrics( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListInfrastructureMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.MetricsInfrastructureMetricsEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,35 +79,40 @@ export async function metricsReportingListInfrastructureMetrics( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; const pathParams = { + infra_id: encodeSimple("infra_id", payload.infra_id, { + explode: false, + charEncoding: "percent", + }), infra_type: encodeSimple("infra_type", payload.infra_type, { explode: false, charEncoding: "percent", }), }; - const path = pathToFunc("/v1/metrics/{infra_type}")(pathParams); + const path = pathToFunc("/v1/metrics/{infra_type}/{infra_id}")(pathParams); const query = encodeFormQuery({ "end_date": payload.end_date, "start_date": payload.start_date, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listInfrastructureMetrics", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_infrastructure_metrics", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -109,59 +135,23 @@ export async function metricsReportingListInfrastructureMetrics( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< - components.MetricsInfrastructureListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError + components.MetricsInfrastructureMetricsEntity, | APIError | SDKValidationError | UnexpectedClientError @@ -170,24 +160,13 @@ export async function metricsReportingListInfrastructureMetrics( | RequestTimeoutError | ConnectionError >( - M.json(200, components.MetricsInfrastructureListEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.json(200, components.MetricsInfrastructureMetricsEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/metricsReportingListInfrastructureTypeMetrics.ts b/src/funcs/metricsReportingListInfrastructureTypeMetrics.ts new file mode 100644 index 00000000..94b51fa7 --- /dev/null +++ b/src/funcs/metricsReportingListInfrastructureTypeMetrics.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List metrics for a component type + * + * @remarks + * Returns metrics for all components of a given type + */ +export function metricsReportingListInfrastructureTypeMetrics( + client: FirehydrantCore, + request: operations.ListInfrastructureTypeMetricsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.MetricsInfrastructureListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListInfrastructureTypeMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.MetricsInfrastructureListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListInfrastructureTypeMetricsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + infra_type: encodeSimple("infra_type", payload.infra_type, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/metrics/{infra_type}")(pathParams); + + const query = encodeFormQuery({ + "end_date": payload.end_date, + "start_date": payload.start_date, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_infrastructure_type_metrics", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.MetricsInfrastructureListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.MetricsInfrastructureListEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingListMeasurementDefinitions.ts b/src/funcs/metricsReportingListMeasurementDefinitions.ts deleted file mode 100644 index e2ab2568..00000000 --- a/src/funcs/metricsReportingListMeasurementDefinitions.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List measurement definitions - * - * @remarks - * List all of the measurement definitions in the organization - */ -export async function metricsReportingListMeasurementDefinitions( - client: FirehydrantTypescriptSDKCore, - request: operations.ListMeasurementDefinitionsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListMeasurementDefinitionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/lifecycles/measurement_definitions")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listMeasurementDefinitions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingListRetrospectiveMetrics.ts b/src/funcs/metricsReportingListRetrospectiveMetrics.ts new file mode 100644 index 00000000..d1ca3702 --- /dev/null +++ b/src/funcs/metricsReportingListRetrospectiveMetrics.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List retrospective metrics + * + * @remarks + * Returns a report with retrospective analytics data + */ +export function metricsReportingListRetrospectiveMetrics( + client: FirehydrantCore, + request: operations.ListRetrospectiveMetricsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.MetricsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListRetrospectiveMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.MetricsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListRetrospectiveMetricsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/metrics/retrospectives")(); + + const query = encodeFormQuery({ + "end_date": payload.end_date, + "start_date": payload.start_date, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_retrospective_metrics", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.MetricsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.MetricsRetrospectiveEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/metricsReportingListRetrospectives.ts b/src/funcs/metricsReportingListRetrospectives.ts deleted file mode 100644 index 97769e3e..00000000 --- a/src/funcs/metricsReportingListRetrospectives.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List retrospective metrics for a date range - * - * @remarks - * Returns a report with retrospective analytics data - */ -export async function metricsReportingListRetrospectives( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRetrospectiveMetricsRequest, - options?: RequestOptions, -): Promise< - Result< - components.MetricsRetrospectiveEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListRetrospectiveMetricsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/metrics/retrospectives")(); - - const query = encodeFormQuery({ - "end_date": payload.end_date, - "start_date": payload.start_date, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRetrospectiveMetrics", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.MetricsRetrospectiveEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.MetricsRetrospectiveEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingListSavedSearches.ts b/src/funcs/metricsReportingListSavedSearches.ts index 5476d3a4..ecee29cf 100644 --- a/src/funcs/metricsReportingListSavedSearches.ts +++ b/src/funcs/metricsReportingListSavedSearches.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** * List saved searches * * @remarks - * Lists save searches + * Lists saved searches */ -export async function metricsReportingListSavedSearches( - client: FirehydrantTypescriptSDKCore, +export function metricsReportingListSavedSearches( + client: FirehydrantCore, request: operations.ListSavedSearchesRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function metricsReportingListSavedSearches( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSavedSearchesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function metricsReportingListSavedSearches( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -78,16 +99,17 @@ export async function metricsReportingListSavedSearches( "user_id": payload.user_id, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listSavedSearches", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_saved_searches", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -110,59 +132,23 @@ export async function metricsReportingListSavedSearches( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.SavedSearchEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -172,23 +158,12 @@ export async function metricsReportingListSavedSearches( | ConnectionError >( M.json(200, components.SavedSearchEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/metricsReportingListUserInvolvementMetrics.ts b/src/funcs/metricsReportingListUserInvolvementMetrics.ts index 17606126..db81586e 100644 --- a/src/funcs/metricsReportingListUserInvolvementMetrics.ts +++ b/src/funcs/metricsReportingListUserInvolvementMetrics.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,30 +19,24 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** - * List user involvement metrics + * List user metrics * * @remarks * Returns a report with time bucketed analytics data */ -export async function metricsReportingListUserInvolvementMetrics( - client: FirehydrantTypescriptSDKCore, +export function metricsReportingListUserInvolvementMetrics( + client: FirehydrantCore, request: operations.ListUserInvolvementMetricsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.MetricsMetricsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function metricsReportingListUserInvolvementMetrics( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListUserInvolvementMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.MetricsMetricsEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function metricsReportingListUserInvolvementMetrics( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -75,16 +96,17 @@ export async function metricsReportingListUserInvolvementMetrics( "start_date": payload.start_date, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listUserInvolvementMetrics", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_user_involvement_metrics", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -107,59 +129,23 @@ export async function metricsReportingListUserInvolvementMetrics( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.MetricsMetricsEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -169,23 +155,12 @@ export async function metricsReportingListUserInvolvementMetrics( | ConnectionError >( M.json(200, components.MetricsMetricsEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/metricsReportingUpdateMeasurementDefinition.ts b/src/funcs/metricsReportingUpdateMeasurementDefinition.ts deleted file mode 100644 index 4365d051..00000000 --- a/src/funcs/metricsReportingUpdateMeasurementDefinition.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a measurement definition - * - * @remarks - * Update a single measurement definition from its ID - */ -export async function metricsReportingUpdateMeasurementDefinition( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateMeasurementDefinitionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateMeasurementDefinitionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - measurement_definition_id: encodeSimple( - "measurement_definition_id", - payload.measurement_definition_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/lifecycles/measurement_definitions/{measurement_definition_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateMeasurementDefinition", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/metricsReportingUpdateSavedSearch.ts b/src/funcs/metricsReportingUpdateSavedSearch.ts new file mode 100644 index 00000000..1befc766 --- /dev/null +++ b/src/funcs/metricsReportingUpdateSavedSearch.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a saved search + * + * @remarks + * Update a specific saved search + */ +export function metricsReportingUpdateSavedSearch( + client: FirehydrantCore, + request: operations.UpdateSavedSearchRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateSavedSearchRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateSavedSearchRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_saved_search, { + explode: true, + }); + + const pathParams = { + resource_type: encodeSimple("resource_type", payload.resource_type, { + explode: false, + charEncoding: "percent", + }), + saved_search_id: encodeSimple("saved_search_id", payload.saved_search_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/saved_searches/{resource_type}/{saved_search_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_saved_search", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SavedSearchEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SavedSearchEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/onCallSchedulesDelete.ts b/src/funcs/onCallSchedulesDelete.ts deleted file mode 100644 index 300d06bf..00000000 --- a/src/funcs/onCallSchedulesDelete.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an on-call schedule for a team - * - * @remarks - * Delete a Signals on-call schedule by ID - */ -export async function onCallSchedulesDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTeamOnCallScheduleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteTeamOnCallScheduleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - schedule_id: encodeSimple("schedule_id", payload.schedule_id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/teams/{team_id}/on_call_schedules/{schedule_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTeamOnCallSchedule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/projectConfigurationsCreate.ts b/src/funcs/projectConfigurationsCreate.ts deleted file mode 100644 index 71ac843d..00000000 --- a/src/funcs/projectConfigurationsCreate.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a ticketing project configuration - * - * @remarks - * Creates configuration for a ticketing project - */ -export async function projectConfigurationsCreate( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateTicketingProjectConfigurationRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateTicketingProjectConfigurationRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTicketingProjectConfiguration", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TicketingProjectConfigEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/projectConfigurationsGet.ts b/src/funcs/projectConfigurationsGet.ts deleted file mode 100644 index d7d6ca3b..00000000 --- a/src/funcs/projectConfigurationsGet.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a ticketing project configuration - * - * @remarks - * Retrieve configuration for a ticketing project - */ -export async function projectConfigurationsGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketingProjectConfigRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTicketingProjectConfigRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - config_id: encodeSimple("config_id", payload.config_id, { - explode: false, - charEncoding: "percent", - }), - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations/{config_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicketingProjectConfig", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingProjectConfigEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesCreateIncidentRetrospective.ts b/src/funcs/retrospectivesCreateIncidentRetrospective.ts new file mode 100644 index 00000000..cf344bf0 --- /dev/null +++ b/src/funcs/retrospectivesCreateIncidentRetrospective.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a new retrospective on the incident using the template + * + * @remarks + * Create a new retrospective for an incident + */ +export function retrospectivesCreateIncidentRetrospective( + client: FirehydrantCore, + request: operations.CreateIncidentRetrospectiveRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentRetrospectiveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentRetrospectiveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/retrospectives")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_retrospective", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentsRetrospectiveEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesCreateIncidentRetrospectiveDynamicInput.ts b/src/funcs/retrospectivesCreateIncidentRetrospectiveDynamicInput.ts new file mode 100644 index 00000000..c587c9f2 --- /dev/null +++ b/src/funcs/retrospectivesCreateIncidentRetrospectiveDynamicInput.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add a new dynamic input field to a retrospective's dynamic input group field + * + * @remarks + * Add a new dynamic input field to a dynamic input group + */ +export function retrospectivesCreateIncidentRetrospectiveDynamicInput( + client: FirehydrantCore, + request: operations.CreateIncidentRetrospectiveDynamicInputRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentRetrospectiveDynamicInputRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentRetrospectiveDynamicInputRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + field_id: encodeSimple("field_id", payload.field_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + retrospective_id: encodeSimple( + "retrospective_id", + payload.retrospective_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields/{field_id}/inputs", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_retrospective_dynamic_input", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.IncidentsRetrospectiveFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesCreateIncidentRetrospectiveField.ts b/src/funcs/retrospectivesCreateIncidentRetrospectiveField.ts new file mode 100644 index 00000000..61042f24 --- /dev/null +++ b/src/funcs/retrospectivesCreateIncidentRetrospectiveField.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Appends a new incident retrospective field to an incident retrospective + * + * @remarks + * Add a new field to an incident retrospective + */ +export function retrospectivesCreateIncidentRetrospectiveField( + client: FirehydrantCore, + request: operations.CreateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentRetrospectiveFieldRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + retrospective_id: encodeSimple( + "retrospective_id", + payload.retrospective_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_retrospective_field", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRetrospectiveFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesCreatePostMortemReason.ts b/src/funcs/retrospectivesCreatePostMortemReason.ts new file mode 100644 index 00000000..67c00b94 --- /dev/null +++ b/src/funcs/retrospectivesCreatePostMortemReason.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a contributing factor for a retrospective report + * + * @remarks + * Add a new contributing factor to an incident + */ +export function retrospectivesCreatePostMortemReason( + client: FirehydrantCore, + request: operations.CreatePostMortemReasonRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreatePostMortemReasonRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreatePostMortemReasonRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_post_mortem_reason, { + explode: true, + }); + + const pathParams = { + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/post_mortems/reports/{report_id}/reasons")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_post_mortem_reason", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.PostMortemsReasonEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesCreatePostMortemReport.ts b/src/funcs/retrospectivesCreatePostMortemReport.ts new file mode 100644 index 00000000..65229fc3 --- /dev/null +++ b/src/funcs/retrospectivesCreatePostMortemReport.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a retrospective report + * + * @remarks + * Create a report + */ +export function retrospectivesCreatePostMortemReport( + client: FirehydrantCore, + request: components.CreatePostMortemReport, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreatePostMortemReport, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreatePostMortemReport$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/post_mortems/reports")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_post_mortem_report", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.PostMortemsPostMortemReportEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesCreateReason.ts b/src/funcs/retrospectivesCreateReason.ts deleted file mode 100644 index 829ba751..00000000 --- a/src/funcs/retrospectivesCreateReason.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a contributing factor for a retrospective report - * - * @remarks - * Add a new contributing factor to an incident - */ -export async function retrospectivesCreateReason( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateRetrospectiveReportReasonRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateRetrospectiveReportReasonRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1PostMortemsReportsReportIdReasons, - { explode: true }, - ); - - const pathParams = { - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/post_mortems/reports/{report_id}/reasons")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createRetrospectiveReportReason", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.PostMortemsReasonEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesCreateReport.ts b/src/funcs/retrospectivesCreateReport.ts deleted file mode 100644 index bf4f4881..00000000 --- a/src/funcs/retrospectivesCreateReport.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a retrospective report - * - * @remarks - * Create a report - */ -export async function retrospectivesCreateReport( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1PostMortemsReports, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsPostMortemReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1PostMortemsReports$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/post_mortems/reports")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createRetrospectiveReport", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsPostMortemReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.PostMortemsPostMortemReportEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesCreateRetrospectiveTemplate.ts b/src/funcs/retrospectivesCreateRetrospectiveTemplate.ts new file mode 100644 index 00000000..718cb2c8 --- /dev/null +++ b/src/funcs/retrospectivesCreateRetrospectiveTemplate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a retrospective template + * + * @remarks + * Create a new retrospective template + */ +export function retrospectivesCreateRetrospectiveTemplate( + client: FirehydrantCore, + request: operations.CreateRetrospectiveTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateRetrospectiveTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateRetrospectiveTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/retrospective_templates")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_retrospective_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.RetrospectivesTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesDeleteIncidentRetrospectiveDynamicInput.ts b/src/funcs/retrospectivesDeleteIncidentRetrospectiveDynamicInput.ts new file mode 100644 index 00000000..4b140f3a --- /dev/null +++ b/src/funcs/retrospectivesDeleteIncidentRetrospectiveDynamicInput.ts @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Removes a dynamic input from a retrospective's dynamic input group field + * + * @remarks + * Delete a dynamic input on a dynamic input group + */ +export function retrospectivesDeleteIncidentRetrospectiveDynamicInput( + client: FirehydrantCore, + request: operations.DeleteIncidentRetrospectiveDynamicInputRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentRetrospectiveDynamicInputRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentRetrospectiveDynamicInputRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + field_id: encodeSimple("field_id", payload.field_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + retrospective_id: encodeSimple( + "retrospective_id", + payload.retrospective_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields/{field_id}/inputs", + )(pathParams); + + const query = encodeFormQuery({ + "dynamic_input_field_id": payload.dynamic_input_field_id, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_retrospective_dynamic_input", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRetrospectiveFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesDeletePostMortemReason.ts b/src/funcs/retrospectivesDeletePostMortemReason.ts new file mode 100644 index 00000000..70d8d806 --- /dev/null +++ b/src/funcs/retrospectivesDeletePostMortemReason.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a contributing factor from a retrospective report + * + * @remarks + * Delete a contributing factor + */ +export function retrospectivesDeletePostMortemReason( + client: FirehydrantCore, + request: operations.DeletePostMortemReasonRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeletePostMortemReasonRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeletePostMortemReasonRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + reason_id: encodeSimple("reason_id", payload.reason_id, { + explode: false, + charEncoding: "percent", + }), + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/post_mortems/reports/{report_id}/reasons/{reason_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_post_mortem_reason", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsReasonEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesDeleteReason.ts b/src/funcs/retrospectivesDeleteReason.ts deleted file mode 100644 index d9443b57..00000000 --- a/src/funcs/retrospectivesDeleteReason.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a contributing factor from a retrospective report - * - * @remarks - * Delete a contributing factor - */ -export async function retrospectivesDeleteReason( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteRetrospectiveReasonRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteRetrospectiveReasonRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - reason_id: encodeSimple("reason_id", payload.reason_id, { - explode: false, - charEncoding: "percent", - }), - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/post_mortems/reports/{report_id}/reasons/{reason_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteRetrospectiveReason", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsReasonEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesDeleteRetrospectiveTemplate.ts b/src/funcs/retrospectivesDeleteRetrospectiveTemplate.ts new file mode 100644 index 00000000..37361704 --- /dev/null +++ b/src/funcs/retrospectivesDeleteRetrospectiveTemplate.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a retrospective template + * + * @remarks + * Delete a single retrospective template + */ +export function retrospectivesDeleteRetrospectiveTemplate( + client: FirehydrantCore, + request: operations.DeleteRetrospectiveTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteRetrospectiveTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteRetrospectiveTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + retrospective_template_id: encodeSimple( + "retrospective_template_id", + payload.retrospective_template_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/retrospective_templates/{retrospective_template_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_retrospective_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RetrospectivesTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesExportIncidentRetrospectives.ts b/src/funcs/retrospectivesExportIncidentRetrospectives.ts new file mode 100644 index 00000000..dce0939a --- /dev/null +++ b/src/funcs/retrospectivesExportIncidentRetrospectives.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Export an incident's retrospective(s) + * + * @remarks + * Export incident's retrospective(s) using their templates + */ +export function retrospectivesExportIncidentRetrospectives( + client: FirehydrantCore, + request: operations.ExportIncidentRetrospectivesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsExportRetrospectivesResultEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ExportIncidentRetrospectivesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsExportRetrospectivesResultEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ExportIncidentRetrospectivesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/retrospectives/export")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "export_incident_retrospectives", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsExportRetrospectivesResultEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 201, + components.IncidentsExportRetrospectivesResultEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesGetIncidentRetrospectiveField.ts b/src/funcs/retrospectivesGetIncidentRetrospectiveField.ts new file mode 100644 index 00000000..9cb010ef --- /dev/null +++ b/src/funcs/retrospectivesGetIncidentRetrospectiveField.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a retrospective field + * + * @remarks + * Retrieve a field on an incident retrospective + */ +export function retrospectivesGetIncidentRetrospectiveField( + client: FirehydrantCore, + request: operations.GetIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetIncidentRetrospectiveFieldRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + field_id: encodeSimple("field_id", payload.field_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + retrospective_id: encodeSimple( + "retrospective_id", + payload.retrospective_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields/{field_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_retrospective_field", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRetrospectiveFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesGetPostMortemQuestion.ts b/src/funcs/retrospectivesGetPostMortemQuestion.ts new file mode 100644 index 00000000..d72f4016 --- /dev/null +++ b/src/funcs/retrospectivesGetPostMortemQuestion.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a retrospective question + * + * @remarks + * Get an incident retrospective question configured to be provided and filled out on each retrospective report. + */ +export function retrospectivesGetPostMortemQuestion( + client: FirehydrantCore, + request: operations.GetPostMortemQuestionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetPostMortemQuestionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetPostMortemQuestionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + question_id: encodeSimple("question_id", payload.question_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/post_mortems/questions/{question_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_post_mortem_question", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesGetPostMortemReport.ts b/src/funcs/retrospectivesGetPostMortemReport.ts new file mode 100644 index 00000000..27b1f784 --- /dev/null +++ b/src/funcs/retrospectivesGetPostMortemReport.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a retrospective report + * + * @remarks + * Get a report + */ +export function retrospectivesGetPostMortemReport( + client: FirehydrantCore, + request: operations.GetPostMortemReportRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetPostMortemReportRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetPostMortemReportRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/post_mortems/reports/{report_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_post_mortem_report", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsPostMortemReportEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesGetQuestion.ts b/src/funcs/retrospectivesGetQuestion.ts deleted file mode 100644 index 28b930d9..00000000 --- a/src/funcs/retrospectivesGetQuestion.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a retrospective question - * - * @remarks - * Get an incident retrospective question - */ -export async function retrospectivesGetQuestion( - client: FirehydrantTypescriptSDKCore, - request: operations.GetRetrospectiveQuestionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetRetrospectiveQuestionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - question_id: encodeSimple("question_id", payload.question_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/post_mortems/questions/{question_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getRetrospectiveQuestion", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesGetReport.ts b/src/funcs/retrospectivesGetReport.ts deleted file mode 100644 index f324cdbf..00000000 --- a/src/funcs/retrospectivesGetReport.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a retrospective report - * - * @remarks - * Get a report - */ -export async function retrospectivesGetReport( - client: FirehydrantTypescriptSDKCore, - request: operations.GetPostMortemReportRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsPostMortemReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetPostMortemReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/post_mortems/reports/{report_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getPostMortemReport", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsPostMortemReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsPostMortemReportEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesGetRetrospectiveTemplate.ts b/src/funcs/retrospectivesGetRetrospectiveTemplate.ts new file mode 100644 index 00000000..d1e91c68 --- /dev/null +++ b/src/funcs/retrospectivesGetRetrospectiveTemplate.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a retrospective template + * + * @remarks + * Retrieve a single retrospective template by ID + */ +export function retrospectivesGetRetrospectiveTemplate( + client: FirehydrantCore, + request: operations.GetRetrospectiveTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetRetrospectiveTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetRetrospectiveTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + retrospective_template_id: encodeSimple( + "retrospective_template_id", + payload.retrospective_template_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/retrospective_templates/{retrospective_template_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_retrospective_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RetrospectivesTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesListIncidentRetrospectives.ts b/src/funcs/retrospectivesListIncidentRetrospectives.ts new file mode 100644 index 00000000..95a39e41 --- /dev/null +++ b/src/funcs/retrospectivesListIncidentRetrospectives.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * All attached retrospectives for an incident + * + * @remarks + * Retrieve retrospectives attached to an incident + */ +export function retrospectivesListIncidentRetrospectives( + client: FirehydrantCore, + request: operations.ListIncidentRetrospectivesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentRetrospectivesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListIncidentRetrospectivesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/retrospectives")( + pathParams, + ); + + const query = encodeFormQuery({ + "is_hidden": payload.is_hidden, + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_retrospectives", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRetrospectiveEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesListPostMortemQuestions.ts b/src/funcs/retrospectivesListPostMortemQuestions.ts new file mode 100644 index 00000000..3400374b --- /dev/null +++ b/src/funcs/retrospectivesListPostMortemQuestions.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List retrospective questions + * + * @remarks + * List the questions configured to be provided and filled out on each retrospective report. + */ +export function retrospectivesListPostMortemQuestions( + client: FirehydrantCore, + request: operations.ListPostMortemQuestionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsQuestionTypeEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListPostMortemQuestionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsQuestionTypeEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListPostMortemQuestionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/post_mortems/questions")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_post_mortem_questions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsQuestionTypeEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.PostMortemsQuestionTypeEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesListPostMortemReasons.ts b/src/funcs/retrospectivesListPostMortemReasons.ts new file mode 100644 index 00000000..84277b4b --- /dev/null +++ b/src/funcs/retrospectivesListPostMortemReasons.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List contributing factors for a retrospective report + * + * @remarks + * List all contributing factors to an incident + */ +export function retrospectivesListPostMortemReasons( + client: FirehydrantCore, + request: operations.ListPostMortemReasonsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsReasonEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListPostMortemReasonsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsReasonEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListPostMortemReasonsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/post_mortems/reports/{report_id}/reasons")( + pathParams, + ); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_post_mortem_reasons", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsReasonEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsReasonEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesListPostMortemReports.ts b/src/funcs/retrospectivesListPostMortemReports.ts new file mode 100644 index 00000000..6de4d30c --- /dev/null +++ b/src/funcs/retrospectivesListPostMortemReports.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List retrospective reports + * + * @remarks + * List all reports + */ +export function retrospectivesListPostMortemReports( + client: FirehydrantCore, + request: operations.ListPostMortemReportsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsPostMortemReportEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListPostMortemReportsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsPostMortemReportEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListPostMortemReportsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/post_mortems/reports")(); + + const query = encodeFormQuery({ + "incident_id": payload.incident_id, + "page": payload.page, + "per_page": payload.per_page, + "updated_since": payload.updated_since, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_post_mortem_reports", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsPostMortemReportEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.PostMortemsPostMortemReportEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesListQuestions.ts b/src/funcs/retrospectivesListQuestions.ts deleted file mode 100644 index 6d30445e..00000000 --- a/src/funcs/retrospectivesListQuestions.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List retrospective questions - * - * @remarks - * List the questions configured to be provided and filled out on each retrospective report. - */ -export async function retrospectivesListQuestions( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRetrospectiveQuestionsRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsQuestionTypeEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListRetrospectiveQuestionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/post_mortems/questions")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRetrospectiveQuestions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsQuestionTypeEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.PostMortemsQuestionTypeEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesListReportReasons.ts b/src/funcs/retrospectivesListReportReasons.ts deleted file mode 100644 index 96ef7c74..00000000 --- a/src/funcs/retrospectivesListReportReasons.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List contributing factors for a retrospective report - * - * @remarks - * List all contributing factors to an incident - */ -export async function retrospectivesListReportReasons( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRetrospectiveReportReasonsRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsReasonEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListRetrospectiveReportReasonsRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/post_mortems/reports/{report_id}/reasons")( - pathParams, - ); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRetrospectiveReportReasons", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsReasonEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsReasonEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesListReports.ts b/src/funcs/retrospectivesListReports.ts deleted file mode 100644 index e5deb313..00000000 --- a/src/funcs/retrospectivesListReports.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List retrospective reports - * - * @remarks - * List all reports - */ -export async function retrospectivesListReports( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRetrospectiveReportsRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsPostMortemReportEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListRetrospectiveReportsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/post_mortems/reports")(); - - const query = encodeFormQuery({ - "incident_id": payload.incident_id, - "page": payload.page, - "per_page": payload.per_page, - "updated_since": payload.updated_since, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRetrospectiveReports", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsPostMortemReportEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.PostMortemsPostMortemReportEntityPaginated$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesListRetrospectiveTemplates.ts b/src/funcs/retrospectivesListRetrospectiveTemplates.ts new file mode 100644 index 00000000..b382680b --- /dev/null +++ b/src/funcs/retrospectivesListRetrospectiveTemplates.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List retrospective templates + * + * @remarks + * List all retrospective templates + */ +export function retrospectivesListRetrospectiveTemplates( + client: FirehydrantCore, + request: operations.ListRetrospectiveTemplatesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RetrospectivesIndexTemplateEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListRetrospectiveTemplatesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RetrospectivesIndexTemplateEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListRetrospectiveTemplatesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/retrospective_templates")(); + + const query = encodeFormQuery({ + "for_incident": payload.for_incident, + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_retrospective_templates", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RetrospectivesIndexTemplateEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.RetrospectivesIndexTemplateEntityPaginated$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesListRetrospectives.ts b/src/funcs/retrospectivesListRetrospectives.ts new file mode 100644 index 00000000..4b3cb09d --- /dev/null +++ b/src/funcs/retrospectivesListRetrospectives.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List retrospective reports + * + * @remarks + * List all retrospective reports + */ +export function retrospectivesListRetrospectives( + client: FirehydrantCore, + request: operations.ListRetrospectivesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListRetrospectivesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListRetrospectivesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/retrospectives")(); + + const query = encodeFormQuery({ + "incident_id": payload.incident_id, + "page": payload.page, + "per_page": payload.per_page, + "updated_since": payload.updated_since, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_retrospectives", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRetrospectiveEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesPublishPostMortemReport.ts b/src/funcs/retrospectivesPublishPostMortemReport.ts new file mode 100644 index 00000000..e5754320 --- /dev/null +++ b/src/funcs/retrospectivesPublishPostMortemReport.ts @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Publish a retrospective report + * + * @remarks + * Marks an incident retrospective as published and emails all of the participants in the report the summary + */ +export function retrospectivesPublishPostMortemReport( + client: FirehydrantCore, + request: operations.PublishPostMortemReportRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsPostMortemReportEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.PublishPostMortemReportRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsPostMortemReportEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.PublishPostMortemReportRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.publish_post_mortem_report, { + explode: true, + }); + + const pathParams = { + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/post_mortems/reports/{report_id}/publish")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "publish_post_mortem_report", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PostMortemsPostMortemReportEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.PostMortemsPostMortemReportEntity$inboundSchema), + M.jsonErr(400, errors.ErrorEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesPublishReport.ts b/src/funcs/retrospectivesPublishReport.ts deleted file mode 100644 index 7d2c23ff..00000000 --- a/src/funcs/retrospectivesPublishReport.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Publish a retrospective report - * - * @remarks - * Marks an incident retrospective as published and emails all of the participants in the report the summary - */ -export async function retrospectivesPublishReport( - client: FirehydrantTypescriptSDKCore, - request: operations.PublishRetrospectiveReportRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsPostMortemReportEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.PublishRetrospectiveReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1PostMortemsReportsReportIdPublish, - { explode: true }, - ); - - const pathParams = { - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/post_mortems/reports/{report_id}/publish")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "publishRetrospectiveReport", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsPostMortemReportEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.PostMortemsPostMortemReportEntity$inboundSchema), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesReorderPostMortemReasons.ts b/src/funcs/retrospectivesReorderPostMortemReasons.ts new file mode 100644 index 00000000..2f687c4a --- /dev/null +++ b/src/funcs/retrospectivesReorderPostMortemReasons.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Reorder a contributing factor for a retrospective report + * + * @remarks + * Update the order of contributing factors in a retrospective report + */ +export function retrospectivesReorderPostMortemReasons( + client: FirehydrantCore, + request: operations.ReorderPostMortemReasonsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ReorderPostMortemReasonsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ReorderPostMortemReasonsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.reorder_post_mortem_reasons, { + explode: true, + }); + + const pathParams = { + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/post_mortems/reports/{report_id}/reasons/order")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "reorder_post_mortem_reasons", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsReasonEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesShareIncidentRetrospectives.ts b/src/funcs/retrospectivesShareIncidentRetrospectives.ts new file mode 100644 index 00000000..55a5f759 --- /dev/null +++ b/src/funcs/retrospectivesShareIncidentRetrospectives.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Share an incident's retrospective + * + * @remarks + * Share incident retrospectives with users or teams + */ +export function retrospectivesShareIncidentRetrospectives( + client: FirehydrantCore, + request: operations.ShareIncidentRetrospectivesRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsShareRetrospectivesResultEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ShareIncidentRetrospectivesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsShareRetrospectivesResultEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ShareIncidentRetrospectivesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/retrospectives/share")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "share_incident_retrospectives", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsShareRetrospectivesResultEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 201, + components.IncidentsShareRetrospectivesResultEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesUpdateField.ts b/src/funcs/retrospectivesUpdateField.ts deleted file mode 100644 index 34899d24..00000000 --- a/src/funcs/retrospectivesUpdateField.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a retrospective field - * - * @remarks - * Update a field value on a post mortem report - */ -export async function retrospectivesUpdateField( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRetrospectiveFieldRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsSectionFieldEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateRetrospectiveFieldRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1PostMortemsReportsReportIdFieldsFieldId, - { explode: true }, - ); - - const pathParams = { - field_id: encodeSimple("field_id", payload.field_id, { - explode: false, - charEncoding: "percent", - }), - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/post_mortems/reports/{report_id}/fields/{field_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRetrospectiveField", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsSectionFieldEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsSectionFieldEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesUpdateIncidentRetrospective.ts b/src/funcs/retrospectivesUpdateIncidentRetrospective.ts new file mode 100644 index 00000000..6c69ea13 --- /dev/null +++ b/src/funcs/retrospectivesUpdateIncidentRetrospective.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a retrospective on the incident + * + * @remarks + * Update a retrospective attached to an incident + */ +export function retrospectivesUpdateIncidentRetrospective( + client: FirehydrantCore, + request: operations.UpdateIncidentRetrospectiveRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentRetrospectiveRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentRetrospectiveRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_retrospective, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + retrospective_id: encodeSimple( + "retrospective_id", + payload.retrospective_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_retrospective", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRetrospectiveEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesUpdateIncidentRetrospectiveField.ts b/src/funcs/retrospectivesUpdateIncidentRetrospectiveField.ts new file mode 100644 index 00000000..a6e0ec14 --- /dev/null +++ b/src/funcs/retrospectivesUpdateIncidentRetrospectiveField.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update the value on a retrospective field + * + * @remarks + * Update retrospective field value + */ +export function retrospectivesUpdateIncidentRetrospectiveField( + client: FirehydrantCore, + request: operations.UpdateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateIncidentRetrospectiveFieldRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_retrospective_field, { + explode: true, + }); + + const pathParams = { + field_id: encodeSimple("field_id", payload.field_id, { + explode: false, + charEncoding: "percent", + }), + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + retrospective_id: encodeSimple( + "retrospective_id", + payload.retrospective_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields/{field_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_retrospective_field", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.IncidentsRetrospectiveFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.IncidentsRetrospectiveFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesUpdatePostMortemField.ts b/src/funcs/retrospectivesUpdatePostMortemField.ts new file mode 100644 index 00000000..488f1a1e --- /dev/null +++ b/src/funcs/retrospectivesUpdatePostMortemField.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a retrospective field + * + * @remarks + * Update a field value on a post mortem report + */ +export function retrospectivesUpdatePostMortemField( + client: FirehydrantCore, + request: operations.UpdatePostMortemFieldRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsSectionFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdatePostMortemFieldRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsSectionFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdatePostMortemFieldRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_post_mortem_field, { + explode: true, + }); + + const pathParams = { + field_id: encodeSimple("field_id", payload.field_id, { + explode: false, + charEncoding: "percent", + }), + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/post_mortems/reports/{report_id}/fields/{field_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_post_mortem_field", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsSectionFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsSectionFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesUpdatePostMortemQuestions.ts b/src/funcs/retrospectivesUpdatePostMortemQuestions.ts new file mode 100644 index 00000000..4929d863 --- /dev/null +++ b/src/funcs/retrospectivesUpdatePostMortemQuestions.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update retrospective questions + * + * @remarks + * Update the questions configured to be provided and filled out on future retrospective reports. + */ +export function retrospectivesUpdatePostMortemQuestions( + client: FirehydrantCore, + request: components.UpdatePostMortemQuestions, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsQuestionTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.UpdatePostMortemQuestions, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsQuestionTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.UpdatePostMortemQuestions$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/post_mortems/questions")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_post_mortem_questions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsQuestionTypeEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsQuestionTypeEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesUpdatePostMortemReason.ts b/src/funcs/retrospectivesUpdatePostMortemReason.ts new file mode 100644 index 00000000..3fb26d22 --- /dev/null +++ b/src/funcs/retrospectivesUpdatePostMortemReason.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a contributing factor in a retrospective report + * + * @remarks + * Update a contributing factor + */ +export function retrospectivesUpdatePostMortemReason( + client: FirehydrantCore, + request: operations.UpdatePostMortemReasonRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdatePostMortemReasonRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdatePostMortemReasonRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_post_mortem_reason, { + explode: true, + }); + + const pathParams = { + reason_id: encodeSimple("reason_id", payload.reason_id, { + explode: false, + charEncoding: "percent", + }), + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/post_mortems/reports/{report_id}/reasons/{reason_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_post_mortem_reason", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsReasonEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsReasonEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesUpdatePostMortemReport.ts b/src/funcs/retrospectivesUpdatePostMortemReport.ts new file mode 100644 index 00000000..d798b341 --- /dev/null +++ b/src/funcs/retrospectivesUpdatePostMortemReport.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a retrospective report + * + * @remarks + * Update a report + */ +export function retrospectivesUpdatePostMortemReport( + client: FirehydrantCore, + request: operations.UpdatePostMortemReportRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdatePostMortemReportRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdatePostMortemReportRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_post_mortem_report, { + explode: true, + }); + + const pathParams = { + report_id: encodeSimple("report_id", payload.report_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/post_mortems/reports/{report_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_post_mortem_report", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.PostMortemsPostMortemReportEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.PostMortemsPostMortemReportEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/retrospectivesUpdateQuestions.ts b/src/funcs/retrospectivesUpdateQuestions.ts deleted file mode 100644 index 01b607c4..00000000 --- a/src/funcs/retrospectivesUpdateQuestions.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Update retrospective questions - * - * @remarks - * Update the questions configured to be provided and filled out on future retrospective reports. - */ -export async function retrospectivesUpdateQuestions( - client: FirehydrantTypescriptSDKCore, - request: components.PutV1PostMortemsQuestions, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsQuestionTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PutV1PostMortemsQuestions$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/post_mortems/questions")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRetrospectiveQuestions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsQuestionTypeEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsQuestionTypeEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesUpdateReason.ts b/src/funcs/retrospectivesUpdateReason.ts deleted file mode 100644 index 51d38e6b..00000000 --- a/src/funcs/retrospectivesUpdateReason.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a contributing factor in a retrospective report - * - * @remarks - * Update a contributing factor - */ -export async function retrospectivesUpdateReason( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRetrospectiveReasonRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateRetrospectiveReasonRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1PostMortemsReportsReportIdReasonsReasonId, - { explode: true }, - ); - - const pathParams = { - reason_id: encodeSimple("reason_id", payload.reason_id, { - explode: false, - charEncoding: "percent", - }), - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/post_mortems/reports/{report_id}/reasons/{reason_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRetrospectiveReason", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsReasonEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesUpdateReport.ts b/src/funcs/retrospectivesUpdateReport.ts deleted file mode 100644 index 9d3525d1..00000000 --- a/src/funcs/retrospectivesUpdateReport.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a retrospective report - * - * @remarks - * Update a report - */ -export async function retrospectivesUpdateReport( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdatePostMortemReportRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsPostMortemReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdatePostMortemReportRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1PostMortemsReportsReportId, { - explode: true, - }); - - const pathParams = { - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/post_mortems/reports/{report_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updatePostMortemReport", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsPostMortemReportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsPostMortemReportEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesUpdateReportReasonOrder.ts b/src/funcs/retrospectivesUpdateReportReasonOrder.ts deleted file mode 100644 index 17573986..00000000 --- a/src/funcs/retrospectivesUpdateReportReasonOrder.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update the order of contributing factors in a retrospective report - * - * @remarks - * Reorder a contributing factor - */ -export async function retrospectivesUpdateReportReasonOrder( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRetrospectiveReportReasonOrderRequest, - options?: RequestOptions, -): Promise< - Result< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateRetrospectiveReportReasonOrderRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.putV1PostMortemsReportsReportIdReasonsOrder, - { explode: true }, - ); - - const pathParams = { - report_id: encodeSimple("report_id", payload.report_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/post_mortems/reports/{report_id}/reasons/order")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRetrospectiveReportReasonOrder", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PostMortemsReasonEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PostMortemsReasonEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/retrospectivesUpdateRetrospectiveTemplate.ts b/src/funcs/retrospectivesUpdateRetrospectiveTemplate.ts new file mode 100644 index 00000000..672b9a4b --- /dev/null +++ b/src/funcs/retrospectivesUpdateRetrospectiveTemplate.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a retrospective template + * + * @remarks + * Update a single retrospective template + */ +export function retrospectivesUpdateRetrospectiveTemplate( + client: FirehydrantCore, + request: operations.UpdateRetrospectiveTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateRetrospectiveTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateRetrospectiveTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + retrospective_template_id: encodeSimple( + "retrospective_template_id", + payload.retrospective_template_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/retrospective_templates/{retrospective_template_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_retrospective_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RetrospectivesTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RetrospectivesTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksCreate.ts b/src/funcs/runbooksCreate.ts deleted file mode 100644 index 7e549516..00000000 --- a/src/funcs/runbooksCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a runbook - * - * @remarks - * Create a new runbook for use with incidents. - */ -export async function runbooksCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Runbooks, - options?: RequestOptions, -): Promise< - Result< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Runbooks$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/runbooks")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createRunbook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.RunbookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksCreateExecution.ts b/src/funcs/runbooksCreateExecution.ts deleted file mode 100644 index b074bb98..00000000 --- a/src/funcs/runbooksCreateExecution.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a runbook execution - * - * @remarks - * Attaches a runbook to an incident and executes it - */ -export async function runbooksCreateExecution( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1RunbooksExecutions, - options?: RequestOptions, -): Promise< - Result< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1RunbooksExecutions$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/runbooks/executions")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createRunbookExecution", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.RunbooksExecutionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksCreateRunbook.ts b/src/funcs/runbooksCreateRunbook.ts new file mode 100644 index 00000000..203067f7 --- /dev/null +++ b/src/funcs/runbooksCreateRunbook.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a runbook + * + * @remarks + * Create a new runbook for use with incidents. + */ +export function runbooksCreateRunbook( + client: FirehydrantCore, + request: components.CreateRunbook, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateRunbook, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateRunbook$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/runbooks")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_runbook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.RunbookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksCreateRunbookExecution.ts b/src/funcs/runbooksCreateRunbookExecution.ts new file mode 100644 index 00000000..9cbb0294 --- /dev/null +++ b/src/funcs/runbooksCreateRunbookExecution.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a runbook execution + * + * @remarks + * Attaches a runbook to an incident and executes it + */ +export function runbooksCreateRunbookExecution( + client: FirehydrantCore, + request: components.CreateRunbookExecution, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateRunbookExecution, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateRunbookExecution$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/runbooks/executions")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_runbook_execution", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.RunbooksExecutionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksDelete.ts b/src/funcs/runbooksDelete.ts deleted file mode 100644 index 21d81192..00000000 --- a/src/funcs/runbooksDelete.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a runbook - * - * @remarks - * Delete a runbook and make it unavailable for any future incidents. - */ -export async function runbooksDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteRunbookRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteRunbookRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - runbook_id: encodeSimple("runbook_id", payload.runbook_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/runbooks/{runbook_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteRunbook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksDeleteRunbook.ts b/src/funcs/runbooksDeleteRunbook.ts new file mode 100644 index 00000000..1488d523 --- /dev/null +++ b/src/funcs/runbooksDeleteRunbook.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a runbook + * + * @remarks + * Delete a runbook and make it unavailable for any future incidents. + */ +export function runbooksDeleteRunbook( + client: FirehydrantCore, + request: operations.DeleteRunbookRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteRunbookRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteRunbookRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + runbook_id: encodeSimple("runbook_id", payload.runbook_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/runbooks/{runbook_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_runbook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksDeleteRunbookExecution.ts b/src/funcs/runbooksDeleteRunbookExecution.ts new file mode 100644 index 00000000..5e6ea7c3 --- /dev/null +++ b/src/funcs/runbooksDeleteRunbookExecution.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Terminate a runbook execution + * + * @remarks + * Terminates a runbook execution, preventing any further steps from being executed + */ +export function runbooksDeleteRunbookExecution( + client: FirehydrantCore, + request: operations.DeleteRunbookExecutionRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteRunbookExecutionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteRunbookExecutionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + execution_id: encodeSimple("execution_id", payload.execution_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/runbooks/executions/{execution_id}")(pathParams); + + const query = encodeFormQuery({ + "reason": payload.reason, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_runbook_execution", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksExecutionsDelete.ts b/src/funcs/runbooksExecutionsDelete.ts deleted file mode 100644 index 63c80024..00000000 --- a/src/funcs/runbooksExecutionsDelete.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Terminate a runbook execution - * - * @remarks - * Terminates a runbook execution, preventing any further steps from being executed - */ -export async function runbooksExecutionsDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteRunbookExecutionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteRunbookExecutionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/runbooks/executions/{execution_id}")(pathParams); - - const query = encodeFormQuery({ - "reason": payload.reason, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteRunbookExecution", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksGet.ts b/src/funcs/runbooksGet.ts deleted file mode 100644 index 537ce98c..00000000 --- a/src/funcs/runbooksGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a runbook - * - * @remarks - * Get a runbook and all its configuration - */ -export async function runbooksGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetRunbookRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetRunbookRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - runbook_id: encodeSimple("runbook_id", payload.runbook_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/runbooks/{runbook_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getRunbook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksGetExecution.ts b/src/funcs/runbooksGetExecution.ts deleted file mode 100644 index 2103ffd3..00000000 --- a/src/funcs/runbooksGetExecution.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a runbook execution - * - * @remarks - * Retrieve a runbook execution by ID - */ -export async function runbooksGetExecution( - client: FirehydrantTypescriptSDKCore, - request: operations.GetRunbookExecutionRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetRunbookExecutionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/runbooks/executions/{execution_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getRunbookExecution", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbooksExecutionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksGetExecutionStepScript.ts b/src/funcs/runbooksGetExecutionStepScript.ts deleted file mode 100644 index e3fed2f5..00000000 --- a/src/funcs/runbooksGetExecutionStepScript.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a runbook execution step script - * - * @remarks - * Retrieves the bash script from a "script" step. - */ -export async function runbooksGetExecutionStepScript( - client: FirehydrantTypescriptSDKCore, - request: operations.GetRunbookExecutionStepScriptRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetRunbookExecutionStepScriptRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - step_id: encodeSimple("step_id", payload.step_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/runbooks/executions/{execution_id}/steps/{step_id}/script", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getRunbookExecutionStepScript", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbooksExecutionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksGetExecutionVoteStatus.ts b/src/funcs/runbooksGetExecutionVoteStatus.ts deleted file mode 100644 index 15bb1d37..00000000 --- a/src/funcs/runbooksGetExecutionVoteStatus.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get vote counts for a runbook execution - * - * @remarks - * Returns the current vote counts for an object - */ -export async function runbooksGetExecutionVoteStatus( - client: FirehydrantTypescriptSDKCore, - request: operations.GetRunbookExecutionVoteStatusRequest, - options?: RequestOptions, -): Promise< - Result< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetRunbookExecutionVoteStatusRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/runbooks/executions/{execution_id}/votes/status", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getRunbookExecutionVoteStatus", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.VotesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksGetRunbook.ts b/src/funcs/runbooksGetRunbook.ts new file mode 100644 index 00000000..ab3b0067 --- /dev/null +++ b/src/funcs/runbooksGetRunbook.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a runbook + * + * @remarks + * Get a runbook and all its configuration + */ +export function runbooksGetRunbook( + client: FirehydrantCore, + request: operations.GetRunbookRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetRunbookRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetRunbookRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + runbook_id: encodeSimple("runbook_id", payload.runbook_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/runbooks/{runbook_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_runbook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksGetRunbookActionFieldOptions.ts b/src/funcs/runbooksGetRunbookActionFieldOptions.ts new file mode 100644 index 00000000..98210a70 --- /dev/null +++ b/src/funcs/runbooksGetRunbookActionFieldOptions.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List select options for a runbook integration action field + * + * @remarks + * List select options for a runbook integration action field + */ +export function runbooksGetRunbookActionFieldOptions( + client: FirehydrantCore, + request: operations.GetRunbookActionFieldOptionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetRunbookActionFieldOptionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetRunbookActionFieldOptionsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + action_slug: encodeSimple("action_slug", payload.action_slug, { + explode: false, + charEncoding: "percent", + }), + field: encodeSimple("field", payload.field, { + explode: false, + charEncoding: "percent", + }), + integration_slug: encodeSimple( + "integration_slug", + payload.integration_slug, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/runbooks/select_options/{integration_slug}/{action_slug}/{field}", + )(pathParams); + + const query = encodeFormQuery({ + "per_page": payload.per_page, + "query": payload.query, + "scope": payload.scope, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_runbook_action_field_options", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksGetRunbookExecution.ts b/src/funcs/runbooksGetRunbookExecution.ts new file mode 100644 index 00000000..15a9d062 --- /dev/null +++ b/src/funcs/runbooksGetRunbookExecution.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a runbook execution + * + * @remarks + * Retrieve a runbook execution by ID + */ +export function runbooksGetRunbookExecution( + client: FirehydrantCore, + request: operations.GetRunbookExecutionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetRunbookExecutionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetRunbookExecutionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + execution_id: encodeSimple("execution_id", payload.execution_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/runbooks/executions/{execution_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_runbook_execution", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbooksExecutionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksGetRunbookExecutionStepScript.ts b/src/funcs/runbooksGetRunbookExecutionStepScript.ts new file mode 100644 index 00000000..db7e0649 --- /dev/null +++ b/src/funcs/runbooksGetRunbookExecutionStepScript.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a step's bash script + * + * @remarks + * Retrieves the bash script from a "script" step. + */ +export function runbooksGetRunbookExecutionStepScript( + client: FirehydrantCore, + request: operations.GetRunbookExecutionStepScriptRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetRunbookExecutionStepScriptRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetRunbookExecutionStepScriptRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + execution_id: encodeSimple("execution_id", payload.execution_id, { + explode: false, + charEncoding: "percent", + }), + step_id: encodeSimple("step_id", payload.step_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/runbooks/executions/{execution_id}/steps/{step_id}/script", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_runbook_execution_step_script", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbooksExecutionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksGetStepVoteStatus.ts b/src/funcs/runbooksGetStepVoteStatus.ts deleted file mode 100644 index 14d02dd5..00000000 --- a/src/funcs/runbooksGetStepVoteStatus.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get vote counts for a runbook step - * - * @remarks - * Returns the current vote counts for an object - */ -export async function runbooksGetStepVoteStatus( - client: FirehydrantTypescriptSDKCore, - request: operations.GetRunbookStepVoteStatusRequest, - options?: RequestOptions, -): Promise< - Result< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetRunbookStepVoteStatusRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - step_id: encodeSimple("step_id", payload.step_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/runbooks/executions/{execution_id}/steps/{step_id}/votes/status", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getRunbookStepVoteStatus", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.VotesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksList.ts b/src/funcs/runbooksList.ts deleted file mode 100644 index d53d74d1..00000000 --- a/src/funcs/runbooksList.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List runbooks - * - * @remarks - * Lists all available runbooks. - */ -export async function runbooksList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRunbooksRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListRunbooksRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/runbooks")(); - - const query = encodeFormQuery({ - "name": payload.name, - "owners": payload.owners, - "page": payload.page, - "per_page": payload.per_page, - "sort": payload.sort, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRunbooks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksListActions.ts b/src/funcs/runbooksListActions.ts deleted file mode 100644 index cf249d9f..00000000 --- a/src/funcs/runbooksListActions.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List runbook actions - * - * @remarks - * List all Runbook actions available through your connected integrations - */ -export async function runbooksListActions( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRunbookActionsRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbooksActionsEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListRunbookActionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/runbooks/actions")(); - - const query = encodeFormQuery({ - "lite": payload.lite, - "page": payload.page, - "per_page": payload.per_page, - "type": payload.type, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRunbookActions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbooksActionsEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbooksActionsEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksListAudits.ts b/src/funcs/runbooksListAudits.ts deleted file mode 100644 index 77f15979..00000000 --- a/src/funcs/runbooksListAudits.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List runbook audits - * - * @remarks - * Please contact support to enable audit logging for your account. - */ -export async function runbooksListAudits( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRunbookAuditsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListRunbookAuditsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/runbook_audits")(); - - const query = encodeFormQuery({ - "auditable_type": payload.auditable_type, - "page": payload.page, - "per_page": payload.per_page, - "sort": payload.sort, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRunbookAudits", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksListExecutions.ts b/src/funcs/runbooksListExecutions.ts deleted file mode 100644 index df7e9e38..00000000 --- a/src/funcs/runbooksListExecutions.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List runbook executions - * - * @remarks - * List all Runbook executions across all Runbooks - */ -export async function runbooksListExecutions( - client: FirehydrantTypescriptSDKCore, - request: operations.ListRunbookExecutionsRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbooksExecutionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListRunbookExecutionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/runbooks/executions")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listRunbookExecutions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbooksExecutionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbooksExecutionEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksListRunbookActions.ts b/src/funcs/runbooksListRunbookActions.ts new file mode 100644 index 00000000..80a2b706 --- /dev/null +++ b/src/funcs/runbooksListRunbookActions.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List runbook actions + * + * @remarks + * List all runbook actions available through your connected integrations + */ +export function runbooksListRunbookActions( + client: FirehydrantCore, + request: operations.ListRunbookActionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbooksActionsEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListRunbookActionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbooksActionsEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListRunbookActionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/runbooks/actions")(); + + const query = encodeFormQuery({ + "lite": payload.lite, + "page": payload.page, + "per_page": payload.per_page, + "type": payload.type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_runbook_actions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbooksActionsEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbooksActionsEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksListRunbookAudits.ts b/src/funcs/runbooksListRunbookAudits.ts new file mode 100644 index 00000000..c4db5176 --- /dev/null +++ b/src/funcs/runbooksListRunbookAudits.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List runbook audits + * + * @remarks + * Please contact support to enable audit logging for your account. + */ +export function runbooksListRunbookAudits( + client: FirehydrantCore, + request: operations.ListRunbookAuditsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListRunbookAuditsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListRunbookAuditsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/runbook_audits")(); + + const query = encodeFormQuery({ + "auditable_type": payload.auditable_type, + "page": payload.page, + "per_page": payload.per_page, + "sort": payload.sort, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_runbook_audits", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksListRunbookExecutions.ts b/src/funcs/runbooksListRunbookExecutions.ts new file mode 100644 index 00000000..0c8ae923 --- /dev/null +++ b/src/funcs/runbooksListRunbookExecutions.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List runbook executions + * + * @remarks + * List all runbook executions across all runbooks + */ +export function runbooksListRunbookExecutions( + client: FirehydrantCore, + request: operations.ListRunbookExecutionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbooksExecutionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListRunbookExecutionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbooksExecutionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListRunbookExecutionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/runbooks/executions")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_runbook_executions", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbooksExecutionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbooksExecutionEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksListRunbooks.ts b/src/funcs/runbooksListRunbooks.ts new file mode 100644 index 00000000..d09a94f5 --- /dev/null +++ b/src/funcs/runbooksListRunbooks.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List runbooks + * + * @remarks + * Lists all available runbooks. + */ +export function runbooksListRunbooks( + client: FirehydrantCore, + request: operations.ListRunbooksRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListRunbooksRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListRunbooksRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/runbooks")(); + + const query = encodeFormQuery({ + "name": payload.name, + "order_by": payload.order_by, + "order_direction": payload.order_direction, + "owners": payload.owners, + "page": payload.page, + "per_page": payload.per_page, + "sort": payload.sort, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_runbooks", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksListSelectOptions.ts b/src/funcs/runbooksListSelectOptions.ts deleted file mode 100644 index ab9e6ada..00000000 --- a/src/funcs/runbooksListSelectOptions.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List select options for a runbook integration action field - */ -export async function runbooksListSelectOptions( - client: FirehydrantTypescriptSDKCore, - request: operations.GetRunbookSelectOptionsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetRunbookSelectOptionsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - action_slug: encodeSimple("action_slug", payload.action_slug, { - explode: false, - charEncoding: "percent", - }), - field: encodeSimple("field", payload.field, { - explode: false, - charEncoding: "percent", - }), - integration_slug: encodeSimple( - "integration_slug", - payload.integration_slug, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/runbooks/select_options/{integration_slug}/{action_slug}/{field}", - )(pathParams); - - const query = encodeFormQuery({ - "per_page": payload.per_page, - "query": payload.query, - "scope": payload.scope, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getRunbookSelectOptions", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksUpdate.ts b/src/funcs/runbooksUpdate.ts deleted file mode 100644 index 9d38b136..00000000 --- a/src/funcs/runbooksUpdate.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a runbook - * - * @remarks - * Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything - * about a runbook, including but not limited to the steps, environments, attachment rules, and severities. - */ -export async function runbooksUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRunbookRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateRunbookRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.putV1RunbooksRunbookId, { - explode: true, - }); - - const pathParams = { - runbook_id: encodeSimple("runbook_id", payload.runbook_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/runbooks/{runbook_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRunbook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksUpdateExecutionStep.ts b/src/funcs/runbooksUpdateExecutionStep.ts deleted file mode 100644 index 459d7d27..00000000 --- a/src/funcs/runbooksUpdateExecutionStep.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a runbook execution step - * - * @remarks - * Updates a runbook step execution, especially for changing the state of a step execution. - */ -export async function runbooksUpdateExecutionStep( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRunbookExecutionStepRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateRunbookExecutionStepRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.putV1RunbooksExecutionsExecutionIdStepsStepId, - { explode: true }, - ); - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - step_id: encodeSimple("step_id", payload.step_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/runbooks/executions/{execution_id}/steps/{step_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRunbookExecutionStep", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbooksExecutionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksUpdateExecutionStepScriptState.ts b/src/funcs/runbooksUpdateExecutionStepScriptState.ts deleted file mode 100644 index bd0df26d..00000000 --- a/src/funcs/runbooksUpdateExecutionStepScriptState.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update the script state for a runbook execution step - * - * @remarks - * Updates the execution's step. - */ -export async function runbooksUpdateExecutionStepScriptState( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRunbookExecutionStepScriptStateRequest, - options?: RequestOptions, -): Promise< - Result< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateRunbookExecutionStepScriptStateRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - state: encodeSimple("state", payload.state, { - explode: false, - charEncoding: "percent", - }), - step_id: encodeSimple("step_id", payload.step_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/runbooks/executions/{execution_id}/steps/{step_id}/script/{state}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRunbookExecutionStepScriptState", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.RunbooksExecutionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.RunbooksExecutionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksUpdateExecutionStepVotes.ts b/src/funcs/runbooksUpdateExecutionStepVotes.ts deleted file mode 100644 index 6bacde76..00000000 --- a/src/funcs/runbooksUpdateExecutionStepVotes.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update votes for a runbook execution step - * - * @remarks - * Allows for upvoting or downvoting an event - */ -export async function runbooksUpdateExecutionStepVotes( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRunbookExecutionStepVotesRequest, - options?: RequestOptions, -): Promise< - Result< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateRunbookExecutionStepVotesRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes, - { explode: true }, - ); - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - step_id: encodeSimple("step_id", payload.step_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/runbooks/executions/{execution_id}/steps/{step_id}/votes", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRunbookExecutionStepVotes", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.VotesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksUpdateExecutionVotes.ts b/src/funcs/runbooksUpdateExecutionVotes.ts deleted file mode 100644 index fed81a3a..00000000 --- a/src/funcs/runbooksUpdateExecutionVotes.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Vote on a runbook execution - * - * @remarks - * Allows for upvoting or downvoting an event - */ -export async function runbooksUpdateExecutionVotes( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateRunbookExecutionVotesRequest, - options?: RequestOptions, -): Promise< - Result< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateRunbookExecutionVotesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1RunbooksExecutionsExecutionIdVotes, - { explode: true }, - ); - - const pathParams = { - execution_id: encodeSimple("execution_id", payload.execution_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/runbooks/executions/{execution_id}/votes")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateRunbookExecutionVotes", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.VotesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.VotesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/runbooksUpdateRunbook.ts b/src/funcs/runbooksUpdateRunbook.ts new file mode 100644 index 00000000..716381d4 --- /dev/null +++ b/src/funcs/runbooksUpdateRunbook.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a runbook + * + * @remarks + * Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything + * about a runbook, including but not limited to the steps, environments, attachment rules, and severities. + */ +export function runbooksUpdateRunbook( + client: FirehydrantCore, + request: operations.UpdateRunbookRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateRunbookRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateRunbookRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_runbook, { explode: true }); + + const pathParams = { + runbook_id: encodeSimple("runbook_id", payload.runbook_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/runbooks/{runbook_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_runbook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksUpdateRunbookExecutionStep.ts b/src/funcs/runbooksUpdateRunbookExecutionStep.ts new file mode 100644 index 00000000..dd64a9b1 --- /dev/null +++ b/src/funcs/runbooksUpdateRunbookExecutionStep.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a runbook step execution + * + * @remarks + * Updates a runbook step execution, especially for changing the state of a step execution. + */ +export function runbooksUpdateRunbookExecutionStep( + client: FirehydrantCore, + request: operations.UpdateRunbookExecutionStepRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateRunbookExecutionStepRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateRunbookExecutionStepRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_runbook_execution_step, { + explode: true, + }); + + const pathParams = { + execution_id: encodeSimple("execution_id", payload.execution_id, { + explode: false, + charEncoding: "percent", + }), + step_id: encodeSimple("step_id", payload.step_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/runbooks/executions/{execution_id}/steps/{step_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_runbook_execution_step", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbooksExecutionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/runbooksUpdateRunbookExecutionStepScript.ts b/src/funcs/runbooksUpdateRunbookExecutionStepScript.ts new file mode 100644 index 00000000..90143afa --- /dev/null +++ b/src/funcs/runbooksUpdateRunbookExecutionStepScript.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a script step's execution status + * + * @remarks + * Updates the execution's step. + */ +export function runbooksUpdateRunbookExecutionStepScript( + client: FirehydrantCore, + request: operations.UpdateRunbookExecutionStepScriptRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateRunbookExecutionStepScriptRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateRunbookExecutionStepScriptRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + execution_id: encodeSimple("execution_id", payload.execution_id, { + explode: false, + charEncoding: "percent", + }), + state: encodeSimple("state", payload.state, { + explode: false, + charEncoding: "percent", + }), + step_id: encodeSimple("step_id", payload.step_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/runbooks/executions/{execution_id}/steps/{step_id}/script/{state}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_runbook_execution_step_script", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.RunbooksExecutionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.RunbooksExecutionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimCreate.ts b/src/funcs/scimCreate.ts deleted file mode 100644 index 5d2bcfed..00000000 --- a/src/funcs/scimCreate.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a team via SCIM - * - * @remarks - * SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. - */ -export async function scimCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1ScimV2Groups, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1ScimV2Groups$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/scim/v2/Groups")(); - - const headers = new Headers({ - "Content-Type": "application/scim+json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createScimGroup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimCreateSCIMGroup.ts b/src/funcs/scimCreateSCIMGroup.ts new file mode 100644 index 00000000..1a62446e --- /dev/null +++ b/src/funcs/scimCreateSCIMGroup.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a SCIM group and assign members + * + * @remarks + * SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. + */ +export function scimCreateSCIMGroup( + client: FirehydrantCore, + request: components.CreateScimGroup, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateScimGroup, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateScimGroup$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/scim/v2/Groups")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/scim+json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_scim_group", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimCreateSCIMUser.ts b/src/funcs/scimCreateSCIMUser.ts new file mode 100644 index 00000000..8b13d120 --- /dev/null +++ b/src/funcs/scimCreateSCIMUser.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a User from SCIM data + * + * @remarks + * SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. + */ +export function scimCreateSCIMUser( + client: FirehydrantCore, + request: components.CreateScimUser, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateScimUser, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateScimUser$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/scim/v2/Users")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/scim+json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_scim_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimCreateUser.ts b/src/funcs/scimCreateUser.ts deleted file mode 100644 index 724450eb..00000000 --- a/src/funcs/scimCreateUser.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a user via SCIM - * - * @remarks - * SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. - */ -export async function scimCreateUser( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1ScimV2Users, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1ScimV2Users$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/scim/v2/Users")(); - - const headers = new Headers({ - "Content-Type": "application/scim+json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createScimUser", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimDeleteGroup.ts b/src/funcs/scimDeleteGroup.ts deleted file mode 100644 index 76d6b443..00000000 --- a/src/funcs/scimDeleteGroup.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a SCIM group - * - * @remarks - * SCIM endpoint to delete a Team (Colloquial for Group in the SCIM protocol). - */ -export async function scimDeleteGroup( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteScimGroupRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteScimGroupRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/scim/v2/Groups/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteScimGroup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimDeleteSCIMGroup.ts b/src/funcs/scimDeleteSCIMGroup.ts new file mode 100644 index 00000000..2510c2fa --- /dev/null +++ b/src/funcs/scimDeleteSCIMGroup.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a SCIM group + * + * @remarks + * SCIM endpoint to delete a Team (Colloquial for Group in the SCIM protocol). + */ +export function scimDeleteSCIMGroup( + client: FirehydrantCore, + request: operations.DeleteScimGroupRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteScimGroupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteScimGroupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/scim/v2/Groups/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_scim_group", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimDeleteSCIMUser.ts b/src/funcs/scimDeleteSCIMUser.ts new file mode 100644 index 00000000..21654384 --- /dev/null +++ b/src/funcs/scimDeleteSCIMUser.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a User matching SCIM data + * + * @remarks + * SCIM endpoint to delete a User. This endpoint will deactivate a confirmed User record in our system. + */ +export function scimDeleteSCIMUser( + client: FirehydrantCore, + request: operations.DeleteScimUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteScimUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteScimUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_scim_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimDeleteUser.ts b/src/funcs/scimDeleteUser.ts deleted file mode 100644 index 5da51a43..00000000 --- a/src/funcs/scimDeleteUser.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a SCIM user - * - * @remarks - * SCIM endpoint to delete a User. This endpoint will deactivate a confirmed User record in our system. - */ -export async function scimDeleteUser( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteScimUserRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteScimUserRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteScimUser", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimGetGroup.ts b/src/funcs/scimGetGroup.ts deleted file mode 100644 index bdb3065b..00000000 --- a/src/funcs/scimGetGroup.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a SCIM group - * - * @remarks - * SCIM endpoint that lists a Team (Colloquial for Group in the SCIM protocol) - */ -export async function scimGetGroup( - client: FirehydrantTypescriptSDKCore, - request: operations.GetScimGroupRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetScimGroupRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/scim/v2/Groups/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getScimGroup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimGetSCIMGroup.ts b/src/funcs/scimGetSCIMGroup.ts new file mode 100644 index 00000000..6d1b1027 --- /dev/null +++ b/src/funcs/scimGetSCIMGroup.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a SCIM group + * + * @remarks + * SCIM endpoint that lists a Team (Colloquial for Group in the SCIM protocol) + */ +export function scimGetSCIMGroup( + client: FirehydrantCore, + request: operations.GetScimGroupRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetScimGroupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetScimGroupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/scim/v2/Groups/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_scim_group", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimGetSCIMUser.ts b/src/funcs/scimGetSCIMUser.ts new file mode 100644 index 00000000..c0ec9268 --- /dev/null +++ b/src/funcs/scimGetSCIMUser.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a SCIM user + * + * @remarks + * SCIM endpoint that lists a User + */ +export function scimGetSCIMUser( + client: FirehydrantCore, + request: operations.GetScimUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetScimUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetScimUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_scim_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimGetUser.ts b/src/funcs/scimGetUser.ts deleted file mode 100644 index b0b6f66b..00000000 --- a/src/funcs/scimGetUser.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a SCIM user - * - * @remarks - * SCIM endpoint that lists a User - */ -export async function scimGetUser( - client: FirehydrantTypescriptSDKCore, - request: operations.GetScimUserRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetScimUserRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getScimUser", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimListGroups.ts b/src/funcs/scimListGroups.ts deleted file mode 100644 index bdc1d847..00000000 --- a/src/funcs/scimListGroups.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List teams via SCIM - * - * @remarks - * SCIM endpoint that lists all Teams (Colloquial for Group in the SCIM protocol) - */ -export async function scimListGroups( - client: FirehydrantTypescriptSDKCore, - request: operations.GetScimGroupsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetScimGroupsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/scim/v2/Groups")(); - - const query = encodeFormQuery({ - "count": payload.count, - "filter": payload.filter, - "startIndex": payload.startIndex, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getScimGroups", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimListSCIMGroups.ts b/src/funcs/scimListSCIMGroups.ts new file mode 100644 index 00000000..f9e30865 --- /dev/null +++ b/src/funcs/scimListSCIMGroups.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List SCIM groups + * + * @remarks + * SCIM endpoint that lists all Teams (Colloquial for Group in the SCIM protocol) + */ +export function scimListSCIMGroups( + client: FirehydrantCore, + request: operations.ListScimGroupsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListScimGroupsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListScimGroupsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/scim/v2/Groups")(); + + const query = encodeFormQuery({ + "count": payload.count, + "filter": payload.filter, + "startIndex": payload.startIndex, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_scim_groups", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimListSCIMUsers.ts b/src/funcs/scimListSCIMUsers.ts new file mode 100644 index 00000000..c17760bc --- /dev/null +++ b/src/funcs/scimListSCIMUsers.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List SCIM users + * + * @remarks + * SCIM endpoint that lists users. This endpoint will display a list of Users currently in the system. + */ +export function scimListSCIMUsers( + client: FirehydrantCore, + request: operations.ListScimUsersRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListScimUsersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListScimUsersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/scim/v2/Users")(); + + const query = encodeFormQuery({ + "count": payload.count, + "filter": payload.filter, + "startIndex": payload.startIndex, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_scim_users", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimListUsers.ts b/src/funcs/scimListUsers.ts deleted file mode 100644 index fc6bd172..00000000 --- a/src/funcs/scimListUsers.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List users via SCIM - * - * @remarks - * SCIM endpoint that lists users. This endpoint will display a list of Users currently in the system. - */ -export async function scimListUsers( - client: FirehydrantTypescriptSDKCore, - request: operations.GetScimUsersRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetScimUsersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/scim/v2/Users")(); - - const query = encodeFormQuery({ - "count": payload.count, - "filter": payload.filter, - "startIndex": payload.startIndex, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getScimUsers", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimPatchSCIMUser.ts b/src/funcs/scimPatchSCIMUser.ts new file mode 100644 index 00000000..4eb7dd70 --- /dev/null +++ b/src/funcs/scimPatchSCIMUser.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a User from SCIM data + * + * @remarks + * PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. + */ +export function scimPatchSCIMUser( + client: FirehydrantCore, + request: operations.PatchScimUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.PatchScimUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.PatchScimUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.patch_scim_user, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/scim+json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "patch_scim_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimReplaceUser.ts b/src/funcs/scimReplaceUser.ts deleted file mode 100644 index 41a4cf6f..00000000 --- a/src/funcs/scimReplaceUser.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Replace a SCIM user - * - * @remarks - * PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. - */ -export async function scimReplaceUser( - client: FirehydrantTypescriptSDKCore, - request: operations.ReplaceScimUserRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ReplaceScimUserRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.putV1ScimV2UsersId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/scim+json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "replaceScimUser", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimUpdateGroup.ts b/src/funcs/scimUpdateGroup.ts deleted file mode 100644 index a577a83d..00000000 --- a/src/funcs/scimUpdateGroup.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a SCIM group - * - * @remarks - * SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. - */ -export async function scimUpdateGroup( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateScimGroupRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateScimGroupRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.putV1ScimV2GroupsId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/scim/v2/Groups/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/scim+json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateScimGroup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/scimUpdateSCIMGroup.ts b/src/funcs/scimUpdateSCIMGroup.ts new file mode 100644 index 00000000..383a3b0f --- /dev/null +++ b/src/funcs/scimUpdateSCIMGroup.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a SCIM group and assign members + * + * @remarks + * SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. + */ +export function scimUpdateSCIMGroup( + client: FirehydrantCore, + request: operations.UpdateScimGroupRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateScimGroupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateScimGroupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_scim_group, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/scim/v2/Groups/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/scim+json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_scim_group", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimUpdateSCIMUser.ts b/src/funcs/scimUpdateSCIMUser.ts new file mode 100644 index 00000000..049d366c --- /dev/null +++ b/src/funcs/scimUpdateSCIMUser.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a User from SCIM data + * + * @remarks + * PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. + */ +export function scimUpdateSCIMUser( + client: FirehydrantCore, + request: operations.UpdateScimUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateScimUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateScimUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_scim_user, { explode: true }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/scim+json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_scim_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/scimUpdateUser.ts b/src/funcs/scimUpdateUser.ts deleted file mode 100644 index 897ad240..00000000 --- a/src/funcs/scimUpdateUser.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a SCIM user - * - * @remarks - * PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. - */ -export async function scimUpdateUser( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateScimUserRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateScimUserRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1ScimV2UsersId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/scim/v2/Users/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/scim+json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateScimUser", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesCatalogsIngest.ts b/src/funcs/servicesCatalogsIngest.ts deleted file mode 100644 index 1c27f622..00000000 --- a/src/funcs/servicesCatalogsIngest.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Ingest service catalog data - * - * @remarks - * Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. - */ -export async function servicesCatalogsIngest( - client: FirehydrantTypescriptSDKCore, - request: operations.IngestCatalogDataRequest, - options?: RequestOptions, -): Promise< - Result< - components.ImportsImportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.IngestCatalogDataRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1CatalogsCatalogIdIngest, { - explode: true, - }); - - const pathParams = { - catalog_id: encodeSimple("catalog_id", payload.catalog_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/catalogs/{catalog_id}/ingest")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "ingestCatalogData", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ImportsImportEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.ImportsImportEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesCatalogsRefresh.ts b/src/funcs/servicesCatalogsRefresh.ts deleted file mode 100644 index 57fc8090..00000000 --- a/src/funcs/servicesCatalogsRefresh.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Refresh a service catalog - * - * @remarks - * Schedules an async task to re-import catalog info and update catalog data accordingly. - */ -export async function servicesCatalogsRefresh( - client: FirehydrantTypescriptSDKCore, - request: operations.RefreshCatalogRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.RefreshCatalogRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - catalog_id: encodeSimple("catalog_id", payload.catalog_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/catalogs/{catalog_id}/refresh")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "refreshCatalog", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesCreate.ts b/src/funcs/servicesCreate.ts deleted file mode 100644 index 618a1e8a..00000000 --- a/src/funcs/servicesCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a service - * - * @remarks - * Creates a service for the organization, you may also create or attach functionalities to the service on create. - */ -export async function servicesCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Services, - options?: RequestOptions, -): Promise< - Result< - components.ServiceEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Services$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/services")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createService", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceEntity, - | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.ServiceEntity$inboundSchema), - M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesCreateChecklistResponse.ts b/src/funcs/servicesCreateChecklistResponse.ts deleted file mode 100644 index 91b3bf6f..00000000 --- a/src/funcs/servicesCreateChecklistResponse.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a checklist response for a service - * - * @remarks - * Creates a response for a checklist item - */ -export async function servicesCreateChecklistResponse( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateServiceChecklistResponseRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateServiceChecklistResponseRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1ServicesServiceIdChecklistResponseChecklistId, - { explode: true }, - ); - - const pathParams = { - checklist_id: encodeSimple("checklist_id", payload.checklist_id, { - explode: false, - charEncoding: "percent", - }), - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/services/{service_id}/checklist_response/{checklist_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createServiceChecklistResponse", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesCreateDependency.ts b/src/funcs/servicesCreateDependency.ts deleted file mode 100644 index f67735ba..00000000 --- a/src/funcs/servicesCreateDependency.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a dependency relationship between services - * - * @remarks - * Creates a service dependency relationship between two services - */ -export async function servicesCreateDependency( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1ServiceDependencies, - options?: RequestOptions, -): Promise< - Result< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1ServiceDependencies$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/service_dependencies")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createServiceDependency", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.ServiceDependencyEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesCreateLinks.ts b/src/funcs/servicesCreateLinks.ts deleted file mode 100644 index 51f569bb..00000000 --- a/src/funcs/servicesCreateLinks.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create multiple services and link them to external services - * - * @remarks - * Creates a service with the appropriate integration for each external service ID passed - */ -export async function servicesCreateLinks( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1ServicesServiceLinks, - options?: RequestOptions, -): Promise< - Result< - Array, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - components.PostV1ServicesServiceLinks$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/services/service_links")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createServiceLinks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - Array, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, z.array(components.ServiceLinkEntity$inboundSchema)), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesDelete.ts b/src/funcs/servicesDelete.ts deleted file mode 100644 index b63f96f5..00000000 --- a/src/funcs/servicesDelete.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a service - * - * @remarks - * Deletes the service from FireHydrant. - */ -export async function servicesDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteServiceRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteServiceRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/services/{service_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteService", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesDeleteDependency.ts b/src/funcs/servicesDeleteDependency.ts deleted file mode 100644 index c340ecf9..00000000 --- a/src/funcs/servicesDeleteDependency.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a service dependency - * - * @remarks - * Deletes a single service dependency - */ -export async function servicesDeleteDependency( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteServiceDependencyRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteServiceDependencyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - service_dependency_id: encodeSimple( - "service_dependency_id", - payload.service_dependency_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/service_dependencies/{service_dependency_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteServiceDependency", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceDependencyEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesDeleteLink.ts b/src/funcs/servicesDeleteLink.ts deleted file mode 100644 index 9b09fae5..00000000 --- a/src/funcs/servicesDeleteLink.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a service link - * - * @remarks - * Deletes a service link from FireHydrant. - */ -export async function servicesDeleteLink( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteServiceLinkRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteServiceLinkRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - remote_id: encodeSimple("remote_id", payload.remote_id, { - explode: false, - charEncoding: "percent", - }), - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/services/{service_id}/service_links/{remote_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteServiceLink", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesGet.ts b/src/funcs/servicesGet.ts deleted file mode 100644 index e28f000c..00000000 --- a/src/funcs/servicesGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a service - * - * @remarks - * Retrieves a single service by ID - */ -export async function servicesGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetServiceRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetServiceRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/services/{service_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getService", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesGetAvailableDownstreamDependencies.ts b/src/funcs/servicesGetAvailableDownstreamDependencies.ts deleted file mode 100644 index 071ef077..00000000 --- a/src/funcs/servicesGetAvailableDownstreamDependencies.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List available downstream service dependencies - * - * @remarks - * Retrieves all services that are available to be downstream dependencies - */ -export async function servicesGetAvailableDownstreamDependencies( - client: FirehydrantTypescriptSDKCore, - request: operations.ListServiceAvailableDownstreamDependenciesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceEntityLite, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations - .ListServiceAvailableDownstreamDependenciesRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/services/{service_id}/available_downstream_dependencies", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listServiceAvailableDownstreamDependencies", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceEntityLite, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceEntityLite$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesGetDependency.ts b/src/funcs/servicesGetDependency.ts deleted file mode 100644 index 25006054..00000000 --- a/src/funcs/servicesGetDependency.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a service dependency - * - * @remarks - * Retrieves a single service dependency by ID - */ -export async function servicesGetDependency( - client: FirehydrantTypescriptSDKCore, - request: operations.GetServiceDependencyRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetServiceDependencyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - service_dependency_id: encodeSimple( - "service_dependency_id", - payload.service_dependency_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/service_dependencies/{service_dependency_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getServiceDependency", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceDependencyEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesList.ts b/src/funcs/servicesList.ts deleted file mode 100644 index d4fe2459..00000000 --- a/src/funcs/servicesList.ts +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, queryJoin } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List services - * - * @remarks - * List all of the services that have been added to the organization. - */ -export async function servicesList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListServicesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListServicesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/services")(); - - const query = queryJoin( - encodeFormQuery({ - "include": payload.include, - }, { explode: false }), - encodeFormQuery({ - "available_downstream_dependencies_for_id": - payload.available_downstream_dependencies_for_id, - "available_upstream_dependencies_for_id": - payload.available_upstream_dependencies_for_id, - "functionalities": payload.functionalities, - "impacted": payload.impacted, - "labels": payload.labels, - "lite": payload.lite, - "name": payload.name, - "owner": payload.owner, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - "responding_teams": payload.responding_teams, - "tiers": payload.tiers, - }), - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listServices", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesListAvailableUpstreamDependencies.ts b/src/funcs/servicesListAvailableUpstreamDependencies.ts deleted file mode 100644 index 196d6664..00000000 --- a/src/funcs/servicesListAvailableUpstreamDependencies.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List available upstream service dependencies - * - * @remarks - * Retrieves all services that are available to be upstream dependencies - */ -export async function servicesListAvailableUpstreamDependencies( - client: FirehydrantTypescriptSDKCore, - request: operations.ListServiceAvailableUpstreamDependenciesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceEntityLite, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListServiceAvailableUpstreamDependenciesRequest$outboundSchema - .parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/services/{service_id}/available_upstream_dependencies", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listServiceAvailableUpstreamDependencies", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceEntityLite, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceEntityLite$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesListDependencies.ts b/src/funcs/servicesListDependencies.ts deleted file mode 100644 index 730b24f2..00000000 --- a/src/funcs/servicesListDependencies.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List dependencies for a service - * - * @remarks - * Retrieves a service's dependencies - */ -export async function servicesListDependencies( - client: FirehydrantTypescriptSDKCore, - request: operations.GetServiceDependenciesRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceWithAllDependenciesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetServiceDependenciesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/services/{service_id}/dependencies")(pathParams); - - const query = encodeFormQuery({ - "flatten": payload.flatten, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getServiceDependencies", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceWithAllDependenciesEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceWithAllDependenciesEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesListForUser.ts b/src/funcs/servicesListForUser.ts deleted file mode 100644 index 5941a044..00000000 --- a/src/funcs/servicesListForUser.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List services for a user's teams - * - * @remarks - * Retrieves a list of services owned by the teams a user is on - */ -export async function servicesListForUser( - client: FirehydrantTypescriptSDKCore, - request: operations.ListUserServicesRequest, - options?: RequestOptions, -): Promise< - Result< - Array, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListUserServicesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/users/{id}/services")(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listUserServices", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - Array, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, z.array(components.TeamEntityPaginated$inboundSchema)), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesPatch.ts b/src/funcs/servicesPatch.ts deleted file mode 100644 index 07b73cff..00000000 --- a/src/funcs/servicesPatch.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a service - * - * @remarks - * Update a services attributes, you may also add or remove functionalities from the service as well. - * Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. - */ -export async function servicesPatch( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateServiceRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateServiceRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1ServicesServiceId, { - explode: true, - }); - - const pathParams = { - service_id: encodeSimple("service_id", payload.service_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/services/{service_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateService", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/servicesUpdate.ts b/src/funcs/servicesUpdate.ts deleted file mode 100644 index b04cbc25..00000000 --- a/src/funcs/servicesUpdate.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a service dependency - * - * @remarks - * Update the notes of the service dependency - */ -export async function servicesUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateServiceDependencyRequest, - options?: RequestOptions, -): Promise< - Result< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateServiceDependencyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1ServiceDependenciesServiceDependencyId, - { explode: true }, - ); - - const pathParams = { - service_dependency_id: encodeSimple( - "service_dependency_id", - payload.service_dependency_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/service_dependencies/{service_dependency_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateServiceDependency", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.ServiceDependencyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.ServiceDependencyEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsCreateEmailTarget.ts b/src/funcs/signalsCreateEmailTarget.ts deleted file mode 100644 index c714ecea..00000000 --- a/src/funcs/signalsCreateEmailTarget.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create an email target for signals - * - * @remarks - * Create a Signals email target for a team. - */ -export async function signalsCreateEmailTarget( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1SignalsEmailTargets, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1SignalsEmailTargets$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/signals/email_targets")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createSignalEmailTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsCreateOnCallShift.ts b/src/funcs/signalsCreateOnCallShift.ts new file mode 100644 index 00000000..81875156 --- /dev/null +++ b/src/funcs/signalsCreateOnCallShift.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a shift for an on-call schedule + * + * @remarks + * Create a Signals on-call shift in a schedule. + */ +export function signalsCreateOnCallShift( + client: FirehydrantCore, + request: operations.CreateOnCallShiftRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateOnCallShiftRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateOnCallShiftRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_on_call_shift, { + explode: true, + }); + + const pathParams = { + schedule_id: encodeSimple("schedule_id", payload.schedule_id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_on_call_shift", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsCreateRule.ts b/src/funcs/signalsCreateRule.ts deleted file mode 100644 index 92e8d190..00000000 --- a/src/funcs/signalsCreateRule.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a signal rule for a team - * - * @remarks - * Create a Signals rule for a team. - */ -export async function signalsCreateRule( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateTeamSignalRuleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateTeamSignalRuleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1TeamsTeamIdSignalRules, { - explode: true, - }); - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/signal_rules")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTeamSignalRule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsCreateSignalsEmailTarget.ts b/src/funcs/signalsCreateSignalsEmailTarget.ts new file mode 100644 index 00000000..85339480 --- /dev/null +++ b/src/funcs/signalsCreateSignalsEmailTarget.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create an email target for signals + * + * @remarks + * Create a Signals email target for a team. + */ +export function signalsCreateSignalsEmailTarget( + client: FirehydrantCore, + request: components.CreateSignalsEmailTarget, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateSignalsEmailTarget, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateSignalsEmailTarget$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/signals/email_targets")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_signals_email_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsCreateSignalsWebhookTarget.ts b/src/funcs/signalsCreateSignalsWebhookTarget.ts new file mode 100644 index 00000000..39e0b5b4 --- /dev/null +++ b/src/funcs/signalsCreateSignalsWebhookTarget.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a webhook target + * + * @remarks + * Create a Signals webhook target. + */ +export function signalsCreateSignalsWebhookTarget( + client: FirehydrantCore, + request: components.CreateSignalsWebhookTarget, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateSignalsWebhookTarget, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + components.CreateSignalsWebhookTarget$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/signals/webhook_targets")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_signals_webhook_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsCreateTeamEscalationPolicy.ts b/src/funcs/signalsCreateTeamEscalationPolicy.ts new file mode 100644 index 00000000..ee4e0c5b --- /dev/null +++ b/src/funcs/signalsCreateTeamEscalationPolicy.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create an escalation policy for a team + * + * @remarks + * Create a Signals escalation policy for a team. + */ +export function signalsCreateTeamEscalationPolicy( + client: FirehydrantCore, + request: operations.CreateTeamEscalationPolicyRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateTeamEscalationPolicyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateTeamEscalationPolicyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_team_escalation_policy, { + explode: true, + }); + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/escalation_policies")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_team_escalation_policy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsCreateTeamOnCallSchedule.ts b/src/funcs/signalsCreateTeamOnCallSchedule.ts new file mode 100644 index 00000000..7b0c8258 --- /dev/null +++ b/src/funcs/signalsCreateTeamOnCallSchedule.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create an on-call schedule for a team + * + * @remarks + * Create a Signals on-call schedule for a team. + */ +export function signalsCreateTeamOnCallSchedule( + client: FirehydrantCore, + request: operations.CreateTeamOnCallScheduleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateTeamOnCallScheduleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateTeamOnCallScheduleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_team_on_call_schedule, { + explode: true, + }); + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/on_call_schedules")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_team_on_call_schedule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsCreateTeamSignalRule.ts b/src/funcs/signalsCreateTeamSignalRule.ts new file mode 100644 index 00000000..3777aa3f --- /dev/null +++ b/src/funcs/signalsCreateTeamSignalRule.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a Signals rule + * + * @remarks + * Create a Signals rule for a team. + */ +export function signalsCreateTeamSignalRule( + client: FirehydrantCore, + request: operations.CreateTeamSignalRuleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateTeamSignalRuleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateTeamSignalRuleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_team_signal_rule, { + explode: true, + }); + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/signal_rules")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_team_signal_rule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsCreateWebhookTarget.ts b/src/funcs/signalsCreateWebhookTarget.ts deleted file mode 100644 index c9d133dc..00000000 --- a/src/funcs/signalsCreateWebhookTarget.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a webhook target for signals - * - * @remarks - * Create a Signals webhook target. - */ -export async function signalsCreateWebhookTarget( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1SignalsWebhookTargets, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - components.PostV1SignalsWebhookTargets$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/signals/webhook_targets")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createSignalWebhookTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsDebug.ts b/src/funcs/signalsDebug.ts deleted file mode 100644 index be90613a..00000000 --- a/src/funcs/signalsDebug.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Debug a signal - */ -export async function signalsDebug( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1SignalsDebugger, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1SignalsDebugger$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/signals/debugger")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "debugSignal", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsDebugSignalsExpression.ts b/src/funcs/signalsDebugSignalsExpression.ts new file mode 100644 index 00000000..c7033de6 --- /dev/null +++ b/src/funcs/signalsDebugSignalsExpression.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Debug Signals expressions + * + * @remarks + * Debug Signals expressions + */ +export function signalsDebugSignalsExpression( + client: FirehydrantCore, + request: components.DebugSignalsExpression, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.DebugSignalsExpression, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.DebugSignalsExpression$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/signals/debugger")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "debug_signals_expression", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsDeleteEmailTarget.ts b/src/funcs/signalsDeleteEmailTarget.ts deleted file mode 100644 index 981cce71..00000000 --- a/src/funcs/signalsDeleteEmailTarget.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a signal email target - * - * @remarks - * Delete a Signals email target by ID - */ -export async function signalsDeleteEmailTarget( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteSignalEmailTargetRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteSignalEmailTargetRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/signals/email_targets/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteSignalEmailTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsDeleteEscalationPolicy.ts b/src/funcs/signalsDeleteEscalationPolicy.ts deleted file mode 100644 index 885ab360..00000000 --- a/src/funcs/signalsDeleteEscalationPolicy.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an escalation policy for a team - * - * @remarks - * Delete a Signals escalation policy by ID - */ -export async function signalsDeleteEscalationPolicy( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTeamEscalationPolicyRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteTeamEscalationPolicyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/escalation_policies/{id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTeamEscalationPolicy", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsDeleteOnCallShift.ts b/src/funcs/signalsDeleteOnCallShift.ts new file mode 100644 index 00000000..6d83281a --- /dev/null +++ b/src/funcs/signalsDeleteOnCallShift.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete an on-call shift from a team schedule + * + * @remarks + * Delete a Signals on-call shift by ID + */ +export function signalsDeleteOnCallShift( + client: FirehydrantCore, + request: operations.DeleteOnCallShiftRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteOnCallShiftRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteOnCallShiftRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + schedule_id: encodeSimple("schedule_id", payload.schedule_id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts/{id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_on_call_shift", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsDeleteRule.ts b/src/funcs/signalsDeleteRule.ts deleted file mode 100644 index ff2323de..00000000 --- a/src/funcs/signalsDeleteRule.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a signal rule - * - * @remarks - * Delete a Signals rule by ID - */ -export async function signalsDeleteRule( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTeamSignalRuleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteTeamSignalRuleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/signal_rules/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTeamSignalRule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsDeleteSignalsEmailTarget.ts b/src/funcs/signalsDeleteSignalsEmailTarget.ts new file mode 100644 index 00000000..9e6ed7d1 --- /dev/null +++ b/src/funcs/signalsDeleteSignalsEmailTarget.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a signal email target + * + * @remarks + * Delete a Signals email target by ID + */ +export function signalsDeleteSignalsEmailTarget( + client: FirehydrantCore, + request: operations.DeleteSignalsEmailTargetRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteSignalsEmailTargetRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteSignalsEmailTargetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/signals/email_targets/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_signals_email_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsDeleteSignalsWebhookTarget.ts b/src/funcs/signalsDeleteSignalsWebhookTarget.ts new file mode 100644 index 00000000..35d19b96 --- /dev/null +++ b/src/funcs/signalsDeleteSignalsWebhookTarget.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a webhook target + * + * @remarks + * Delete a Signals webhook target by ID + */ +export function signalsDeleteSignalsWebhookTarget( + client: FirehydrantCore, + request: operations.DeleteSignalsWebhookTargetRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteSignalsWebhookTargetRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteSignalsWebhookTargetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/signals/webhook_targets/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_signals_webhook_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsDeleteTeamEscalationPolicy.ts b/src/funcs/signalsDeleteTeamEscalationPolicy.ts new file mode 100644 index 00000000..9f55267a --- /dev/null +++ b/src/funcs/signalsDeleteTeamEscalationPolicy.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete an escalation policy for a team + * + * @remarks + * Delete a Signals escalation policy by ID + */ +export function signalsDeleteTeamEscalationPolicy( + client: FirehydrantCore, + request: operations.DeleteTeamEscalationPolicyRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTeamEscalationPolicyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteTeamEscalationPolicyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/escalation_policies/{id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_team_escalation_policy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsDeleteTeamOnCallSchedule.ts b/src/funcs/signalsDeleteTeamOnCallSchedule.ts new file mode 100644 index 00000000..77dec49e --- /dev/null +++ b/src/funcs/signalsDeleteTeamOnCallSchedule.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete an on-call schedule for a team + * + * @remarks + * Delete a Signals on-call schedule by ID + */ +export function signalsDeleteTeamOnCallSchedule( + client: FirehydrantCore, + request: operations.DeleteTeamOnCallScheduleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTeamOnCallScheduleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteTeamOnCallScheduleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + schedule_id: encodeSimple("schedule_id", payload.schedule_id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_team_on_call_schedule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsDeleteTeamSignalRule.ts b/src/funcs/signalsDeleteTeamSignalRule.ts new file mode 100644 index 00000000..8a273f8a --- /dev/null +++ b/src/funcs/signalsDeleteTeamSignalRule.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a Signals rule + * + * @remarks + * Delete a Signals rule by ID + */ +export function signalsDeleteTeamSignalRule( + client: FirehydrantCore, + request: operations.DeleteTeamSignalRuleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTeamSignalRuleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteTeamSignalRuleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/signal_rules/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_team_signal_rule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsDeleteWebhookTarget.ts b/src/funcs/signalsDeleteWebhookTarget.ts deleted file mode 100644 index 1b41ab8a..00000000 --- a/src/funcs/signalsDeleteWebhookTarget.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a webhook target - * - * @remarks - * Delete a Signals webhook target by ID - */ -export async function signalsDeleteWebhookTarget( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteSignalsWebhookTargetRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteSignalsWebhookTargetRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/signals/webhook_targets/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteSignalsWebhookTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsGetAnalyticsTimeseries.ts b/src/funcs/signalsGetAnalyticsTimeseries.ts deleted file mode 100644 index 75393ba4..00000000 --- a/src/funcs/signalsGetAnalyticsTimeseries.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List timeseries metrics for signal alerts - * - * @remarks - * Generate a timeseries-based report of metrics for Signals alerts - */ -export async function signalsGetAnalyticsTimeseries( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSignalsAnalyticsTimeseriesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetSignalsAnalyticsTimeseriesRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals/analytics/timeseries")(); - - const query = encodeFormQuery({ - "bucket": payload.bucket, - "end_date": payload.end_date, - "environments": payload.environments, - "group_by": payload.group_by, - "services": payload.services, - "signal_rules": payload.signal_rules, - "sort_by": payload.sort_by, - "sort_direction": payload.sort_direction, - "start_date": payload.start_date, - "tags": payload.tags, - "teams": payload.teams, - "users": payload.users, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSignalsAnalyticsTimeseries", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsGetEmailTarget.ts b/src/funcs/signalsGetEmailTarget.ts deleted file mode 100644 index 37c33c40..00000000 --- a/src/funcs/signalsGetEmailTarget.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a signal email target - * - * @remarks - * Get a Signals email target by ID - */ -export async function signalsGetEmailTarget( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSignalEmailTargetRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetSignalEmailTargetRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/signals/email_targets/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSignalEmailTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsGetIngestUrl.ts b/src/funcs/signalsGetIngestUrl.ts deleted file mode 100644 index 81146972..00000000 --- a/src/funcs/signalsGetIngestUrl.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get signal ingestion URL - * - * @remarks - * Retrieve the url for ingesting signals for your organization - */ -export async function signalsGetIngestUrl( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSignalIngestUrlRequest, - options?: RequestOptions, -): Promise< - Result< - components.SignalsAPIIngestKeyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetSignalIngestUrlRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals/ingest_url")(); - - const query = encodeFormQuery({ - "escalation_policy_id": payload.escalation_policy_id, - "on_call_schedule_id": payload.on_call_schedule_id, - "team_id": payload.team_id, - "user_id": payload.user_id, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSignalIngestUrl", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.SignalsAPIIngestKeyEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.SignalsAPIIngestKeyEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsGetMttxAnalytics.ts b/src/funcs/signalsGetMttxAnalytics.ts deleted file mode 100644 index 39fe0fd0..00000000 --- a/src/funcs/signalsGetMttxAnalytics.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get MTTX analytics for signals - * - * @remarks - * Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts - */ -export async function signalsGetMttxAnalytics( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSignalsMttxAnalyticsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetSignalsMttxAnalyticsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals/analytics/mttx")(); - - const query = encodeFormQuery({ - "end_date": payload.end_date, - "environments": payload.environments, - "group_by": payload.group_by, - "services": payload.services, - "signal_rules": payload.signal_rules, - "sort_by": payload.sort_by, - "sort_direction": payload.sort_direction, - "start_date": payload.start_date, - "tags": payload.tags, - "teams": payload.teams, - "users": payload.users, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSignalsMttxAnalytics", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsGetOnCallSchedule.ts b/src/funcs/signalsGetOnCallSchedule.ts deleted file mode 100644 index 44ae6ad8..00000000 --- a/src/funcs/signalsGetOnCallSchedule.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an on-call schedule for a team - * - * @remarks - * Get a Signals on-call schedule by ID - */ -export async function signalsGetOnCallSchedule( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTeamOnCallScheduleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTeamOnCallScheduleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - schedule_id: encodeSimple("schedule_id", payload.schedule_id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/teams/{team_id}/on_call_schedules/{schedule_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTeamOnCallSchedule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsGetOnCallShift.ts b/src/funcs/signalsGetOnCallShift.ts new file mode 100644 index 00000000..5f643a8c --- /dev/null +++ b/src/funcs/signalsGetOnCallShift.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an on-call shift for a team schedule + * + * @remarks + * Get a Signals on-call shift by ID + */ +export function signalsGetOnCallShift( + client: FirehydrantCore, + request: operations.GetOnCallShiftRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetOnCallShiftRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetOnCallShiftRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + schedule_id: encodeSimple("schedule_id", payload.schedule_id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts/{id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_on_call_shift", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsGetRule.ts b/src/funcs/signalsGetRule.ts deleted file mode 100644 index 84a3d9e7..00000000 --- a/src/funcs/signalsGetRule.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a signal rule - * - * @remarks - * Get a Signals rule by ID. - */ -export async function signalsGetRule( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTeamSignalRuleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetTeamSignalRuleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/signal_rules/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTeamSignalRule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsGetSignalsEmailTarget.ts b/src/funcs/signalsGetSignalsEmailTarget.ts new file mode 100644 index 00000000..5cef6b33 --- /dev/null +++ b/src/funcs/signalsGetSignalsEmailTarget.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a signal email target + * + * @remarks + * Get a Signals email target by ID + */ +export function signalsGetSignalsEmailTarget( + client: FirehydrantCore, + request: operations.GetSignalsEmailTargetRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSignalsEmailTargetRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSignalsEmailTargetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/signals/email_targets/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_signals_email_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsGetSignalsIngestUrl.ts b/src/funcs/signalsGetSignalsIngestUrl.ts new file mode 100644 index 00000000..92313dcc --- /dev/null +++ b/src/funcs/signalsGetSignalsIngestUrl.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get the signals ingestion URL + * + * @remarks + * Retrieve the url for ingesting signals for your organization + */ +export function signalsGetSignalsIngestUrl( + client: FirehydrantCore, + request: operations.GetSignalsIngestUrlRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.SignalsAPIIngestKeyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSignalsIngestUrlRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.SignalsAPIIngestKeyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSignalsIngestUrlRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/ingest_url")(); + + const query = encodeFormQuery({ + "escalation_policy_id": payload.escalation_policy_id, + "on_call_schedule_id": payload.on_call_schedule_id, + "team_id": payload.team_id, + "user_id": payload.user_id, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_signals_ingest_url", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SignalsAPIIngestKeyEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SignalsAPIIngestKeyEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsGetSignalsWebhookTarget.ts b/src/funcs/signalsGetSignalsWebhookTarget.ts new file mode 100644 index 00000000..8a1161df --- /dev/null +++ b/src/funcs/signalsGetSignalsWebhookTarget.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a webhook target + * + * @remarks + * Get a Signals webhook target by ID + */ +export function signalsGetSignalsWebhookTarget( + client: FirehydrantCore, + request: operations.GetSignalsWebhookTargetRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetSignalsWebhookTargetRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetSignalsWebhookTargetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/signals/webhook_targets/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_signals_webhook_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsGetTeamEscalationPolicy.ts b/src/funcs/signalsGetTeamEscalationPolicy.ts new file mode 100644 index 00000000..6f07a202 --- /dev/null +++ b/src/funcs/signalsGetTeamEscalationPolicy.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an escalation policy for a team + * + * @remarks + * Get a Signals escalation policy by ID + */ +export function signalsGetTeamEscalationPolicy( + client: FirehydrantCore, + request: operations.GetTeamEscalationPolicyRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTeamEscalationPolicyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetTeamEscalationPolicyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/escalation_policies/{id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_team_escalation_policy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsGetTeamOnCallSchedule.ts b/src/funcs/signalsGetTeamOnCallSchedule.ts new file mode 100644 index 00000000..6048a4c4 --- /dev/null +++ b/src/funcs/signalsGetTeamOnCallSchedule.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an on-call schedule for a team + * + * @remarks + * Get a Signals on-call schedule by ID + */ +export function signalsGetTeamOnCallSchedule( + client: FirehydrantCore, + request: operations.GetTeamOnCallScheduleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTeamOnCallScheduleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetTeamOnCallScheduleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + schedule_id: encodeSimple("schedule_id", payload.schedule_id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_team_on_call_schedule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsGetTeamSignalRule.ts b/src/funcs/signalsGetTeamSignalRule.ts new file mode 100644 index 00000000..445c43c3 --- /dev/null +++ b/src/funcs/signalsGetTeamSignalRule.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a Signals rule + * + * @remarks + * Get a Signals rule by ID. + */ +export function signalsGetTeamSignalRule( + client: FirehydrantCore, + request: operations.GetTeamSignalRuleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTeamSignalRuleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTeamSignalRuleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/signal_rules/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_team_signal_rule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsGetWebhookTarget.ts b/src/funcs/signalsGetWebhookTarget.ts deleted file mode 100644 index 66a2359e..00000000 --- a/src/funcs/signalsGetWebhookTarget.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a webhook target - * - * @remarks - * Get a Signals webhook target by ID - */ -export async function signalsGetWebhookTarget( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSignalsWebhookTargetRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetSignalsWebhookTargetRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/signals/webhook_targets/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSignalsWebhookTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListEmailTargets.ts b/src/funcs/signalsListEmailTargets.ts deleted file mode 100644 index e99430ae..00000000 --- a/src/funcs/signalsListEmailTargets.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List email targets for signals - * - * @remarks - * List all Signals email targets for a team. - */ -export async function signalsListEmailTargets( - client: FirehydrantTypescriptSDKCore, - request: operations.ListSignalEmailTargetsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListSignalEmailTargetsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals/email_targets")(); - - const query = encodeFormQuery({ - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listSignalEmailTargets", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListEscalationPolicies.ts b/src/funcs/signalsListEscalationPolicies.ts deleted file mode 100644 index fd064b48..00000000 --- a/src/funcs/signalsListEscalationPolicies.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List escalation policies for a team - * - * @remarks - * List all Signals escalation policies for a team. - */ -export async function signalsListEscalationPolicies( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTeamEscalationPoliciesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListTeamEscalationPoliciesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/escalation_policies")( - pathParams, - ); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTeamEscalationPolicies", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListEventSources.ts b/src/funcs/signalsListEventSources.ts deleted file mode 100644 index 54454135..00000000 --- a/src/funcs/signalsListEventSources.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List event sources for signals - */ -export async function signalsListEventSources( - client: FirehydrantTypescriptSDKCore, - request: operations.ListSignalEventSourcesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListSignalEventSourcesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals/event_sources")(); - - const query = encodeFormQuery({ - "escalation_policy_id": payload.escalation_policy_id, - "on_call_schedule_id": payload.on_call_schedule_id, - "team_id": payload.team_id, - "user_id": payload.user_id, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listSignalEventSources", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListGroupedMetrics.ts b/src/funcs/signalsListGroupedMetrics.ts deleted file mode 100644 index 65e829fe..00000000 --- a/src/funcs/signalsListGroupedMetrics.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List grouped signal alert metrics - * - * @remarks - * Generate a report of grouped metrics for Signals alerts - */ -export async function signalsListGroupedMetrics( - client: FirehydrantTypescriptSDKCore, - request: operations.GetSignalGroupedMetricsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetSignalGroupedMetricsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals/analytics/grouped_metrics")(); - - const query = encodeFormQuery({ - "end_date": payload.end_date, - "environments": payload.environments, - "group_by": payload.group_by, - "services": payload.services, - "signal_rules": payload.signal_rules, - "sort_by": payload.sort_by, - "sort_direction": payload.sort_direction, - "start_date": payload.start_date, - "tags": payload.tags, - "teams": payload.teams, - "users": payload.users, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getSignalGroupedMetrics", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListOnCall.ts b/src/funcs/signalsListOnCall.ts deleted file mode 100644 index 5fe4b2da..00000000 --- a/src/funcs/signalsListOnCall.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List on-call schedules - * - * @remarks - * List all Signals on-call schedules for the entire organization. - */ -export async function signalsListOnCall( - client: FirehydrantTypescriptSDKCore, - request: operations.ListSignalsOnCallRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListSignalsOnCallRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals_on_call")(); - - const query = encodeFormQuery({ - "team_id": payload.team_id, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listSignalsOnCall", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListOrganizationOnCallSchedules.ts b/src/funcs/signalsListOrganizationOnCallSchedules.ts new file mode 100644 index 00000000..bf8c2bdb --- /dev/null +++ b/src/funcs/signalsListOrganizationOnCallSchedules.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List on-call schedules + * + * @remarks + * List all Signals on-call schedules for the entire organization. + */ +export function signalsListOrganizationOnCallSchedules( + client: FirehydrantCore, + request: operations.ListOrganizationOnCallSchedulesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListOrganizationOnCallSchedulesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListOrganizationOnCallSchedulesRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals_on_call")(); + + const query = encodeFormQuery({ + "team_id": payload.team_id, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_organization_on_call_schedules", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListRules.ts b/src/funcs/signalsListRules.ts deleted file mode 100644 index 81076444..00000000 --- a/src/funcs/signalsListRules.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List signal rules for a team - * - * @remarks - * List all Signals rules for a team. - */ -export async function signalsListRules( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTeamSignalRulesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListTeamSignalRulesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/signal_rules")(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTeamSignalRules", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListSignalsEmailTargets.ts b/src/funcs/signalsListSignalsEmailTargets.ts new file mode 100644 index 00000000..47c49e55 --- /dev/null +++ b/src/funcs/signalsListSignalsEmailTargets.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List email targets for signals + * + * @remarks + * List all Signals email targets for a team. + */ +export function signalsListSignalsEmailTargets( + client: FirehydrantCore, + request: operations.ListSignalsEmailTargetsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSignalsEmailTargetsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListSignalsEmailTargetsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/email_targets")(); + + const query = encodeFormQuery({ + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_signals_email_targets", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListSignalsEventSources.ts b/src/funcs/signalsListSignalsEventSources.ts new file mode 100644 index 00000000..d6b007d1 --- /dev/null +++ b/src/funcs/signalsListSignalsEventSources.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List event sources for Signals + * + * @remarks + * List all Signals event sources for the authenticated user. + */ +export function signalsListSignalsEventSources( + client: FirehydrantCore, + request: operations.ListSignalsEventSourcesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSignalsEventSourcesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListSignalsEventSourcesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/event_sources")(); + + const query = encodeFormQuery({ + "escalation_policy_id": payload.escalation_policy_id, + "on_call_schedule_id": payload.on_call_schedule_id, + "team_id": payload.team_id, + "user_id": payload.user_id, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_signals_event_sources", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListSignalsTransposers.ts b/src/funcs/signalsListSignalsTransposers.ts new file mode 100644 index 00000000..c8baf4af --- /dev/null +++ b/src/funcs/signalsListSignalsTransposers.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List signal transposers + * + * @remarks + * List all transposers for your organization + */ +export function signalsListSignalsTransposers( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.SignalsAPITransposerListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.SignalsAPITransposerListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/signals/transposers")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_signals_transposers", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.SignalsAPITransposerListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.SignalsAPITransposerListEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListSignalsWebhookTargets.ts b/src/funcs/signalsListSignalsWebhookTargets.ts new file mode 100644 index 00000000..32613f04 --- /dev/null +++ b/src/funcs/signalsListSignalsWebhookTargets.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List webhook targets + * + * @remarks + * List all Signals webhook targets. + */ +export function signalsListSignalsWebhookTargets( + client: FirehydrantCore, + request: operations.ListSignalsWebhookTargetsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSignalsWebhookTargetsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListSignalsWebhookTargetsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/signals/webhook_targets")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_signals_webhook_targets", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListTeamEscalationPolicies.ts b/src/funcs/signalsListTeamEscalationPolicies.ts new file mode 100644 index 00000000..5c87ae50 --- /dev/null +++ b/src/funcs/signalsListTeamEscalationPolicies.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List escalation policies for a team + * + * @remarks + * List all Signals escalation policies for a team. + */ +export function signalsListTeamEscalationPolicies( + client: FirehydrantCore, + request: operations.ListTeamEscalationPoliciesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTeamEscalationPoliciesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListTeamEscalationPoliciesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/escalation_policies")( + pathParams, + ); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_team_escalation_policies", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListTeamOnCallSchedules.ts b/src/funcs/signalsListTeamOnCallSchedules.ts new file mode 100644 index 00000000..28a2fcb1 --- /dev/null +++ b/src/funcs/signalsListTeamOnCallSchedules.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List on-call schedules for a team + * + * @remarks + * List all Signals on-call schedules for a team. + */ +export function signalsListTeamOnCallSchedules( + client: FirehydrantCore, + request: operations.ListTeamOnCallSchedulesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTeamOnCallSchedulesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListTeamOnCallSchedulesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/on_call_schedules")(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_team_on_call_schedules", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListTeamSignalRules.ts b/src/funcs/signalsListTeamSignalRules.ts new file mode 100644 index 00000000..784dbd3f --- /dev/null +++ b/src/funcs/signalsListTeamSignalRules.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List Signals rules + * + * @remarks + * List all Signals rules for a team. + */ +export function signalsListTeamSignalRules( + client: FirehydrantCore, + request: operations.ListTeamSignalRulesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTeamSignalRulesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListTeamSignalRulesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/signal_rules")(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_team_signal_rules", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsListTransposers.ts b/src/funcs/signalsListTransposers.ts deleted file mode 100644 index 01a97afa..00000000 --- a/src/funcs/signalsListTransposers.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * List signal transposers - */ -export async function signalsListTransposers( - client: FirehydrantTypescriptSDKCore, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path = pathToFunc("/v1/signals/transposers")(); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listSignalTransposers", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsListWebhookTargets.ts b/src/funcs/signalsListWebhookTargets.ts deleted file mode 100644 index 15a86d99..00000000 --- a/src/funcs/signalsListWebhookTargets.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List webhook targets for signals - * - * @remarks - * List all Signals webhook targets. - */ -export async function signalsListWebhookTargets( - client: FirehydrantTypescriptSDKCore, - request: operations.ListSignalWebhookTargetsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListSignalWebhookTargetsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/signals/webhook_targets")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listSignalWebhookTargets", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsTeamsGetEscalationPolicy.ts b/src/funcs/signalsTeamsGetEscalationPolicy.ts deleted file mode 100644 index d7ca128e..00000000 --- a/src/funcs/signalsTeamsGetEscalationPolicy.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an escalation policy for a team - * - * @remarks - * Get a Signals escalation policy by ID - */ -export async function signalsTeamsGetEscalationPolicy( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTeamEscalationPolicyRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTeamEscalationPolicyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/escalation_policies/{id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTeamEscalationPolicy", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsUpdateEmailTarget.ts b/src/funcs/signalsUpdateEmailTarget.ts deleted file mode 100644 index 53f343c6..00000000 --- a/src/funcs/signalsUpdateEmailTarget.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a signal email target - * - * @remarks - * Update a Signals email target by ID - */ -export async function signalsUpdateEmailTarget( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateSignalEmailTargetRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateSignalEmailTargetRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1SignalsEmailTargetsId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/signals/email_targets/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateSignalEmailTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsUpdateOnCallSchedule.ts b/src/funcs/signalsUpdateOnCallSchedule.ts deleted file mode 100644 index 0feee052..00000000 --- a/src/funcs/signalsUpdateOnCallSchedule.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an on-call schedule for a team - * - * @remarks - * Update a Signals on-call schedule by ID - */ -export async function signalsUpdateOnCallSchedule( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTeamOnCallScheduleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateTeamOnCallScheduleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1TeamsTeamIdOnCallSchedulesScheduleId, - { explode: true }, - ); - - const pathParams = { - schedule_id: encodeSimple("schedule_id", payload.schedule_id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/teams/{team_id}/on_call_schedules/{schedule_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTeamOnCallSchedule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsUpdateOnCallShift.ts b/src/funcs/signalsUpdateOnCallShift.ts new file mode 100644 index 00000000..b5f60449 --- /dev/null +++ b/src/funcs/signalsUpdateOnCallShift.ts @@ -0,0 +1,174 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an on-call shift for a team schedule + * + * @remarks + * Update a Signals on-call shift by ID + */ +export function signalsUpdateOnCallShift( + client: FirehydrantCore, + request: operations.UpdateOnCallShiftRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateOnCallShiftRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateOnCallShiftRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_on_call_shift, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + schedule_id: encodeSimple("schedule_id", payload.schedule_id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts/{id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_on_call_shift", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsUpdateRule.ts b/src/funcs/signalsUpdateRule.ts deleted file mode 100644 index 7dec4fdd..00000000 --- a/src/funcs/signalsUpdateRule.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a signal rule - * - * @remarks - * Update a Signals rule by ID - */ -export async function signalsUpdateRule( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTeamSignalRuleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateTeamSignalRuleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1TeamsTeamIdSignalRulesId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/signal_rules/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTeamSignalRule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/signalsUpdateSignalsEmailTarget.ts b/src/funcs/signalsUpdateSignalsEmailTarget.ts new file mode 100644 index 00000000..0d711092 --- /dev/null +++ b/src/funcs/signalsUpdateSignalsEmailTarget.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an email target + * + * @remarks + * Update a Signals email target by ID + */ +export function signalsUpdateSignalsEmailTarget( + client: FirehydrantCore, + request: operations.UpdateSignalsEmailTargetRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateSignalsEmailTargetRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateSignalsEmailTargetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_signals_email_target, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/signals/email_targets/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_signals_email_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsUpdateSignalsWebhookTarget.ts b/src/funcs/signalsUpdateSignalsWebhookTarget.ts new file mode 100644 index 00000000..ddb061ba --- /dev/null +++ b/src/funcs/signalsUpdateSignalsWebhookTarget.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a webhook target + * + * @remarks + * Update a Signals webhook target by ID + */ +export function signalsUpdateSignalsWebhookTarget( + client: FirehydrantCore, + request: operations.UpdateSignalsWebhookTargetRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateSignalsWebhookTargetRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateSignalsWebhookTargetRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_signals_webhook_target, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/signals/webhook_targets/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_signals_webhook_target", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsUpdateTeamEscalationPolicy.ts b/src/funcs/signalsUpdateTeamEscalationPolicy.ts new file mode 100644 index 00000000..13354fae --- /dev/null +++ b/src/funcs/signalsUpdateTeamEscalationPolicy.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an escalation policy for a team + * + * @remarks + * Update a Signals escalation policy by ID + */ +export function signalsUpdateTeamEscalationPolicy( + client: FirehydrantCore, + request: operations.UpdateTeamEscalationPolicyRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTeamEscalationPolicyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateTeamEscalationPolicyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_team_escalation_policy, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/escalation_policies/{id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_team_escalation_policy", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsUpdateTeamOnCallSchedule.ts b/src/funcs/signalsUpdateTeamOnCallSchedule.ts new file mode 100644 index 00000000..16e6e9e7 --- /dev/null +++ b/src/funcs/signalsUpdateTeamOnCallSchedule.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an on-call schedule for a team + * + * @remarks + * Update a Signals on-call schedule by ID + */ +export function signalsUpdateTeamOnCallSchedule( + client: FirehydrantCore, + request: operations.UpdateTeamOnCallScheduleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTeamOnCallScheduleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateTeamOnCallScheduleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_team_on_call_schedule, { + explode: true, + }); + + const pathParams = { + schedule_id: encodeSimple("schedule_id", payload.schedule_id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_team_on_call_schedule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsUpdateTeamSignalRule.ts b/src/funcs/signalsUpdateTeamSignalRule.ts new file mode 100644 index 00000000..021a9807 --- /dev/null +++ b/src/funcs/signalsUpdateTeamSignalRule.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a Signals rule + * + * @remarks + * Update a Signals rule by ID + */ +export function signalsUpdateTeamSignalRule( + client: FirehydrantCore, + request: operations.UpdateTeamSignalRuleRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTeamSignalRuleRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateTeamSignalRuleRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_team_signal_rule, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}/signal_rules/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_team_signal_rule", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/signalsUpdateWebhookTarget.ts b/src/funcs/signalsUpdateWebhookTarget.ts deleted file mode 100644 index d430409f..00000000 --- a/src/funcs/signalsUpdateWebhookTarget.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a webhook target - * - * @remarks - * Update a Signals webhook target by ID - */ -export async function signalsUpdateWebhookTarget( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateSignalsWebhookTargetRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateSignalsWebhookTargetRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1SignalsWebhookTargetsId, { - explode: true, - }); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/signals/webhook_targets/{id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateSignalsWebhookTarget", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/slackCreateEmojiAction.ts b/src/funcs/slackCreateEmojiAction.ts deleted file mode 100644 index d2925ff3..00000000 --- a/src/funcs/slackCreateEmojiAction.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a Slack emoji action - * - * @remarks - * Creates a new slack emoji action - */ -export async function slackCreateEmojiAction( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateSlackEmojiActionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateSlackEmojiActionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/slack/connections/{connection_id}/emoji_actions", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createSlackEmojiAction", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/slackListUsergroups.ts b/src/funcs/slackListUsergroups.ts deleted file mode 100644 index eddbbc6d..00000000 --- a/src/funcs/slackListUsergroups.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * List Slack usergroups - */ -export async function slackListUsergroups( - client: FirehydrantTypescriptSDKCore, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path = pathToFunc("/v1/integrations/slack/usergroups")(); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listSlackUsergroups", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/slackUpdateEmojiAction.ts b/src/funcs/slackUpdateEmojiAction.ts deleted file mode 100644 index 66297670..00000000 --- a/src/funcs/slackUpdateEmojiAction.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a Slack emoji action - * - * @remarks - * Updates a slack emoji action - */ -export async function slackUpdateEmojiAction( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateSlackEmojiActionRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateSlackEmojiActionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - emoji_action_id: encodeSimple("emoji_action_id", payload.emoji_action_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/slack/connections/{connection_id}/emoji_actions/{emoji_action_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateSlackEmojiAction", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesCreate.ts b/src/funcs/statusPagesCreate.ts deleted file mode 100644 index 75e200c3..00000000 --- a/src/funcs/statusPagesCreate.ts +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a status page - * - * @remarks - * Create a new FireHydrant hosted status page for customer facing statuses. - */ -export async function statusPagesCreate( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateStatusPageRequestBody, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateStatusPageRequestBody$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/nunc_connections")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createStatusPage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesCreateComponentGroup.ts b/src/funcs/statusPagesCreateComponentGroup.ts deleted file mode 100644 index a4a69d9f..00000000 --- a/src/funcs/statusPagesCreateComponentGroup.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a component group for a status page - * - * @remarks - * Add a component group to be displayed on a FireHydrant status page - */ -export async function statusPagesCreateComponentGroup( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateStatusPageComponentGroupRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateStatusPageComponentGroupRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/component_groups", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createStatusPageComponentGroup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesCreateEmailSubscriber.ts b/src/funcs/statusPagesCreateEmailSubscriber.ts new file mode 100644 index 00000000..f8b341fa --- /dev/null +++ b/src/funcs/statusPagesCreateEmailSubscriber.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add subscribers to a status page + * + * @remarks + * Subscribes a comma-separated string of emails to status page updates + */ +export function statusPagesCreateEmailSubscriber( + client: FirehydrantCore, + request: operations.CreateEmailSubscriberRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateEmailSubscriberRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateEmailSubscriberRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/subscribers", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_email_subscriber", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.NuncEmailSubscribersEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesCreateLink.ts b/src/funcs/statusPagesCreateLink.ts deleted file mode 100644 index bdc4e786..00000000 --- a/src/funcs/statusPagesCreateLink.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a link for a status page - * - * @remarks - * Add a link to be displayed on a FireHydrant status page - */ -export async function statusPagesCreateLink( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateStatusPageLinkRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateStatusPageLinkRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}/links")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createStatusPageLink", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesCreateNuncComponentGroup.ts b/src/funcs/statusPagesCreateNuncComponentGroup.ts new file mode 100644 index 00000000..50d4e4b3 --- /dev/null +++ b/src/funcs/statusPagesCreateNuncComponentGroup.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a component group for a status page + * + * @remarks + * Add a component group to be displayed on a FireHydrant status page + */ +export function statusPagesCreateNuncComponentGroup( + client: FirehydrantCore, + request: operations.CreateNuncComponentGroupRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateNuncComponentGroupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateNuncComponentGroupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/component_groups", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_nunc_component_group", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesCreateNuncConnection.ts b/src/funcs/statusPagesCreateNuncConnection.ts new file mode 100644 index 00000000..d35c9089 --- /dev/null +++ b/src/funcs/statusPagesCreateNuncConnection.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a status page + * + * @remarks + * Create a new FireHydrant hosted status page for customer facing statuses. + */ +export function statusPagesCreateNuncConnection( + client: FirehydrantCore, + request: operations.CreateNuncConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateNuncConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateNuncConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/nunc_connections")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_nunc_connection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesCreateNuncLink.ts b/src/funcs/statusPagesCreateNuncLink.ts new file mode 100644 index 00000000..bb47bfb1 --- /dev/null +++ b/src/funcs/statusPagesCreateNuncLink.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add link to a status page + * + * @remarks + * Add a link to be displayed on a FireHydrant status page + */ +export function statusPagesCreateNuncLink( + client: FirehydrantCore, + request: operations.CreateNuncLinkRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateNuncLinkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateNuncLinkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}/links")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_nunc_link", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesCreateNuncSubscription.ts b/src/funcs/statusPagesCreateNuncSubscription.ts new file mode 100644 index 00000000..d3f84bcb --- /dev/null +++ b/src/funcs/statusPagesCreateNuncSubscription.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a status page subscription + * + * @remarks + * Subscribe to status page updates + */ +export function statusPagesCreateNuncSubscription( + client: FirehydrantCore, + request: components.CreateNuncSubscription, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncNuncSubscription, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateNuncSubscription, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncNuncSubscription, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateNuncSubscription$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/nunc/subscriptions")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_nunc_subscription", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncNuncSubscription, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.NuncNuncSubscription$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesCreateSubscribers.ts b/src/funcs/statusPagesCreateSubscribers.ts deleted file mode 100644 index 76187c16..00000000 --- a/src/funcs/statusPagesCreateSubscribers.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Add subscribers to a status page - * - * @remarks - * Subscribes a comma-separated string of emails to status page updates - */ -export async function statusPagesCreateSubscribers( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateStatusPageSubscribersRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncEmailSubscribersEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateStatusPageSubscribersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/subscribers", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createStatusPageSubscribers", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncEmailSubscribersEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.NuncEmailSubscribersEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesCreateSubscription.ts b/src/funcs/statusPagesCreateSubscription.ts deleted file mode 100644 index e61ed2c5..00000000 --- a/src/funcs/statusPagesCreateSubscription.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a status page subscription - * - * @remarks - * Subscribe to status page updates - */ -export async function statusPagesCreateSubscription( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1NuncSubscriptions, - options?: RequestOptions, -): Promise< - Result< - components.NuncNuncSubscription, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1NuncSubscriptions$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/nunc/subscriptions")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createStatusPageSubscription", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncNuncSubscription, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.NuncNuncSubscription$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesDelete.ts b/src/funcs/statusPagesDelete.ts deleted file mode 100644 index 21bc90c0..00000000 --- a/src/funcs/statusPagesDelete.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a status page - * - * @remarks - * Delete a FireHydrant hosted status page, stopping updates of your incidents to it. - */ -export async function statusPagesDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteStatusPageRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteStatusPageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteStatusPage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesDeleteComponentGroup.ts b/src/funcs/statusPagesDeleteComponentGroup.ts deleted file mode 100644 index 7ca028e6..00000000 --- a/src/funcs/statusPagesDeleteComponentGroup.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a status page component group - * - * @remarks - * Delete a component group displayed on a FireHydrant status page - */ -export async function statusPagesDeleteComponentGroup( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteStatusPageComponentGroupRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteStatusPageComponentGroupRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - group_id: encodeSimple("group_id", payload.group_id, { - explode: false, - charEncoding: "percent", - }), - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/component_groups/{group_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteStatusPageComponentGroup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesDeleteEmailSubscriber.ts b/src/funcs/statusPagesDeleteEmailSubscriber.ts new file mode 100644 index 00000000..6d2c3028 --- /dev/null +++ b/src/funcs/statusPagesDeleteEmailSubscriber.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove subscribers from a status page + * + * @remarks + * Unsubscribes one or more status page subscribers. + */ +export function statusPagesDeleteEmailSubscriber( + client: FirehydrantCore, + request: operations.DeleteEmailSubscriberRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteEmailSubscriberRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteEmailSubscriberRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/subscribers", + )(pathParams); + + const query = encodeFormQuery({ + "subscriber_ids": payload.subscriber_ids, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_email_subscriber", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncEmailSubscribersEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesDeleteImage.ts b/src/funcs/statusPagesDeleteImage.ts deleted file mode 100644 index 1686464b..00000000 --- a/src/funcs/statusPagesDeleteImage.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an image from a status page - * - * @remarks - * Delete an image attached to a FireHydrant status page - */ -export async function statusPagesDeleteImage( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteStatusPageImageRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteStatusPageImageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - type: encodeSimple("type", payload.type, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/images/{type}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteStatusPageImage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesDeleteIncident.ts b/src/funcs/statusPagesDeleteIncident.ts deleted file mode 100644 index 6d1b1f6f..00000000 --- a/src/funcs/statusPagesDeleteIncident.ts +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Remove a status page from an incident - * - * @remarks - * Remove a status page incident attached to an incident - */ -export async function statusPagesDeleteIncident( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentStatusPageRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteIncidentStatusPageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - status_page_id: encodeSimple("status_page_id", payload.status_page_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/status_pages/{status_page_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentStatusPage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesDeleteIncidentStatusPage.ts b/src/funcs/statusPagesDeleteIncidentStatusPage.ts new file mode 100644 index 00000000..6ea21cd6 --- /dev/null +++ b/src/funcs/statusPagesDeleteIncidentStatusPage.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Remove a status page from an incident + * + * @remarks + * Remove a status page incident attached to an incident + */ +export function statusPagesDeleteIncidentStatusPage( + client: FirehydrantCore, + request: operations.DeleteIncidentStatusPageRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentStatusPageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteIncidentStatusPageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + status_page_id: encodeSimple("status_page_id", payload.status_page_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/status_pages/{status_page_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_status_page", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesDeleteLink.ts b/src/funcs/statusPagesDeleteLink.ts deleted file mode 100644 index 54a5724b..00000000 --- a/src/funcs/statusPagesDeleteLink.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a status page link - * - * @remarks - * Delete a link displayed on a FireHydrant status page - */ -export async function statusPagesDeleteLink( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteStatusPageLinkRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteStatusPageLinkRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - link_id: encodeSimple("link_id", payload.link_id, { - explode: false, - charEncoding: "percent", - }), - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/links/{link_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteStatusPageLink", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesDeleteNuncComponentGroup.ts b/src/funcs/statusPagesDeleteNuncComponentGroup.ts new file mode 100644 index 00000000..98e3edec --- /dev/null +++ b/src/funcs/statusPagesDeleteNuncComponentGroup.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a status page component group + * + * @remarks + * Delete a component group displayed on a FireHydrant status page + */ +export function statusPagesDeleteNuncComponentGroup( + client: FirehydrantCore, + request: operations.DeleteNuncComponentGroupRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteNuncComponentGroupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteNuncComponentGroupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + group_id: encodeSimple("group_id", payload.group_id, { + explode: false, + charEncoding: "percent", + }), + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/component_groups/{group_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_nunc_component_group", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesDeleteNuncConnection.ts b/src/funcs/statusPagesDeleteNuncConnection.ts new file mode 100644 index 00000000..e73e33a1 --- /dev/null +++ b/src/funcs/statusPagesDeleteNuncConnection.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a status page + * + * @remarks + * Delete a FireHydrant hosted status page, stopping updates of your incidents to it. + */ +export function statusPagesDeleteNuncConnection( + client: FirehydrantCore, + request: operations.DeleteNuncConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteNuncConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteNuncConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_nunc_connection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesDeleteNuncImage.ts b/src/funcs/statusPagesDeleteNuncImage.ts new file mode 100644 index 00000000..4653b291 --- /dev/null +++ b/src/funcs/statusPagesDeleteNuncImage.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete an image from a status page + * + * @remarks + * Delete an image attached to a FireHydrant status page + */ +export function statusPagesDeleteNuncImage( + client: FirehydrantCore, + request: operations.DeleteNuncImageRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteNuncImageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteNuncImageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + type: encodeSimple("type", payload.type, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/images/{type}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_nunc_image", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesDeleteNuncLink.ts b/src/funcs/statusPagesDeleteNuncLink.ts new file mode 100644 index 00000000..c57c0412 --- /dev/null +++ b/src/funcs/statusPagesDeleteNuncLink.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a status page link + * + * @remarks + * Delete a link displayed on a FireHydrant status page + */ +export function statusPagesDeleteNuncLink( + client: FirehydrantCore, + request: operations.DeleteNuncLinkRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteNuncLinkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteNuncLinkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + link_id: encodeSimple("link_id", payload.link_id, { + explode: false, + charEncoding: "percent", + }), + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/links/{link_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_nunc_link", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesDeleteNuncSubscription.ts b/src/funcs/statusPagesDeleteNuncSubscription.ts new file mode 100644 index 00000000..92d50039 --- /dev/null +++ b/src/funcs/statusPagesDeleteNuncSubscription.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Unsubscribe from status page notifications + * + * @remarks + * Unsubscribe from status page updates + */ +export function statusPagesDeleteNuncSubscription( + client: FirehydrantCore, + request: operations.DeleteNuncSubscriptionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncNuncSubscription, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteNuncSubscriptionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncNuncSubscription, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteNuncSubscriptionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + unsubscribe_token: encodeSimple( + "unsubscribe_token", + payload.unsubscribe_token, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/nunc/subscriptions/{unsubscribe_token}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_nunc_subscription", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncNuncSubscription, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncNuncSubscription$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesDeleteSubscribers.ts b/src/funcs/statusPagesDeleteSubscribers.ts deleted file mode 100644 index ff064e9b..00000000 --- a/src/funcs/statusPagesDeleteSubscribers.ts +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Remove subscribers from a status page - * - * @remarks - * Unsubscribes one or more status page subscribers. - */ -export async function statusPagesDeleteSubscribers( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteStatusPageSubscribersRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncEmailSubscribersEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteStatusPageSubscribersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/subscribers", - )(pathParams); - - const query = encodeFormQuery({ - "subscriber_ids": payload.subscriber_ids, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteStatusPageSubscribers", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncEmailSubscribersEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncEmailSubscribersEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesDeleteSubscription.ts b/src/funcs/statusPagesDeleteSubscription.ts deleted file mode 100644 index 91f1b517..00000000 --- a/src/funcs/statusPagesDeleteSubscription.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Unsubscribe from status page notifications - * - * @remarks - * Unsubscribe from status page updates - */ -export async function statusPagesDeleteSubscription( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteNuncSubscriptionRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncNuncSubscription, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteNuncSubscriptionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - unsubscribe_token: encodeSimple( - "unsubscribe_token", - payload.unsubscribe_token, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/nunc/subscriptions/{unsubscribe_token}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteNuncSubscription", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncNuncSubscription, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncNuncSubscription$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesGet.ts b/src/funcs/statusPagesGet.ts deleted file mode 100644 index 8070d722..00000000 --- a/src/funcs/statusPagesGet.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a status page - * - * @remarks - * Retrieve the information displayed as part of your FireHydrant hosted status page. - */ -export async function statusPagesGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetStatusPageRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetStatusPageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getStatusPage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesGetNuncConnection.ts b/src/funcs/statusPagesGetNuncConnection.ts new file mode 100644 index 00000000..a40562aa --- /dev/null +++ b/src/funcs/statusPagesGetNuncConnection.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a status page + * + * @remarks + * Retrieve the information displayed as part of your FireHydrant hosted status page. + */ +export function statusPagesGetNuncConnection( + client: FirehydrantCore, + request: operations.GetNuncConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetNuncConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetNuncConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_nunc_connection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesList.ts b/src/funcs/statusPagesList.ts deleted file mode 100644 index d04791b4..00000000 --- a/src/funcs/statusPagesList.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * List status pages - * - * @remarks - * Lists the information displayed as part of your FireHydrant hosted status pages. - */ -export async function statusPagesList( - client: FirehydrantTypescriptSDKCore, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path = pathToFunc("/v1/nunc_connections")(); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listStatusPages", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncConnectionEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesListEmailSubscribers.ts b/src/funcs/statusPagesListEmailSubscribers.ts new file mode 100644 index 00000000..922ba3e1 --- /dev/null +++ b/src/funcs/statusPagesListEmailSubscribers.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List status page subscribers + * + * @remarks + * Retrieves the list of subscribers for a status page. + */ +export function statusPagesListEmailSubscribers( + client: FirehydrantCore, + request: operations.ListEmailSubscribersRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListEmailSubscribersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListEmailSubscribersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/subscribers", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_email_subscribers", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncEmailSubscribersEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncEmailSubscribersEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesListNuncConnections.ts b/src/funcs/statusPagesListNuncConnections.ts new file mode 100644 index 00000000..b402f98e --- /dev/null +++ b/src/funcs/statusPagesListNuncConnections.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List status pages + * + * @remarks + * Lists the information displayed as part of your FireHydrant hosted status pages. + */ +export function statusPagesListNuncConnections( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/nunc_connections")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_nunc_connections", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncConnectionEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesListSubscribers.ts b/src/funcs/statusPagesListSubscribers.ts deleted file mode 100644 index a0dbce03..00000000 --- a/src/funcs/statusPagesListSubscribers.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List status page subscribers - * - * @remarks - * Retrieves the list of subscribers for a status page. - */ -export async function statusPagesListSubscribers( - client: FirehydrantTypescriptSDKCore, - request: operations.ListStatusPageSubscribersRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncEmailSubscribersEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListStatusPageSubscribersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/subscribers", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listStatusPageSubscribers", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncEmailSubscribersEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncEmailSubscribersEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesUpdate.ts b/src/funcs/statusPagesUpdate.ts deleted file mode 100644 index 201d66fa..00000000 --- a/src/funcs/statusPagesUpdate.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a status page - * - * @remarks - * Update your company's information and other components in the specified FireHydrant hosted status page. - */ -export async function statusPagesUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateStatusPageRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateStatusPageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateStatusPage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesUpdateComponentGroup.ts b/src/funcs/statusPagesUpdateComponentGroup.ts deleted file mode 100644 index f1607590..00000000 --- a/src/funcs/statusPagesUpdateComponentGroup.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a status page component group - * - * @remarks - * Update a component group to be displayed on a FireHydrant status page - */ -export async function statusPagesUpdateComponentGroup( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateStatusPageComponentGroupRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateStatusPageComponentGroupRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.RequestBody, { explode: true }); - - const pathParams = { - group_id: encodeSimple("group_id", payload.group_id, { - explode: false, - charEncoding: "percent", - }), - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/component_groups/{group_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateStatusPageComponentGroup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesUpdateImage.ts b/src/funcs/statusPagesUpdateImage.ts deleted file mode 100644 index 54083d0c..00000000 --- a/src/funcs/statusPagesUpdateImage.ts +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { readableStreamToArrayBuffer } from "../lib/files.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { isBlobLike } from "../types/blobs.js"; -import { Result } from "../types/fp.js"; -import { isReadableStream } from "../types/streams.js"; - -/** - * Upload an image for a status page - * - * @remarks - * Add or replace an image attached to a FireHydrant status page - */ -export async function statusPagesUpdateImage( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateStatusPageImageRequest, - options?: RequestOptions, -): Promise< - Result< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateStatusPageImageRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = new FormData(); - if (payload.RequestBody != null) { - if (payload.RequestBody.file !== undefined) { - if (isBlobLike(payload.RequestBody.file)) { - body.append("file", payload.RequestBody.file); - } else if (isReadableStream(payload.RequestBody.file.content)) { - const buffer = await readableStreamToArrayBuffer( - payload.RequestBody.file.content, - ); - const blob = new Blob([buffer], { type: "application/octet-stream" }); - body.append("file", blob); - } else { - body.append( - "file", - new Blob([payload.RequestBody.file.content], { - type: "application/octet-stream", - }), - payload.RequestBody.file.fileName, - ); - } - } - } - - const pathParams = { - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - type: encodeSimple("type", payload.type, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/images/{type}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateStatusPageImage", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PUT", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.NuncConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.NuncConnectionEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesUpdateLink.ts b/src/funcs/statusPagesUpdateLink.ts deleted file mode 100644 index 8a4aed1f..00000000 --- a/src/funcs/statusPagesUpdateLink.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a status page link - * - * @remarks - * Update a link to be displayed on a FireHydrant status page - */ -export async function statusPagesUpdateLink( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateStatusPageLinkRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateStatusPageLinkRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1NuncConnectionsNuncConnectionIdLinksLinkId, - { explode: true }, - ); - - const pathParams = { - link_id: encodeSimple("link_id", payload.link_id, { - explode: false, - charEncoding: "percent", - }), - nunc_connection_id: encodeSimple( - "nunc_connection_id", - payload.nunc_connection_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/nunc_connections/{nunc_connection_id}/links/{link_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateStatusPageLink", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statusPagesUpdateNuncComponentGroup.ts b/src/funcs/statusPagesUpdateNuncComponentGroup.ts new file mode 100644 index 00000000..2e9ecfcb --- /dev/null +++ b/src/funcs/statusPagesUpdateNuncComponentGroup.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a status page component group + * + * @remarks + * Update a component group to be displayed on a FireHydrant status page + */ +export function statusPagesUpdateNuncComponentGroup( + client: FirehydrantCore, + request: operations.UpdateNuncComponentGroupRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateNuncComponentGroupRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateNuncComponentGroupRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + group_id: encodeSimple("group_id", payload.group_id, { + explode: false, + charEncoding: "percent", + }), + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/component_groups/{group_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_nunc_component_group", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesUpdateNuncConnection.ts b/src/funcs/statusPagesUpdateNuncConnection.ts new file mode 100644 index 00000000..6b497c78 --- /dev/null +++ b/src/funcs/statusPagesUpdateNuncConnection.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a status page + * + * @remarks + * Update your company's information and other components in the specified FireHydrant hosted status page. + */ +export function statusPagesUpdateNuncConnection( + client: FirehydrantCore, + request: operations.UpdateNuncConnectionRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateNuncConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateNuncConnectionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.RequestBody, { explode: true }); + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/nunc_connections/{nunc_connection_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_nunc_connection", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesUpdateNuncImage.ts b/src/funcs/statusPagesUpdateNuncImage.ts new file mode 100644 index 00000000..0165b9fb --- /dev/null +++ b/src/funcs/statusPagesUpdateNuncImage.ts @@ -0,0 +1,193 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { appendForm, encodeSimple } from "../lib/encodings.js"; +import { readableStreamToArrayBuffer } from "../lib/files.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { isBlobLike } from "../types/blobs.js"; +import { Result } from "../types/fp.js"; +import { isReadableStream } from "../types/streams.js"; + +/** + * Upload an image for a status page + * + * @remarks + * Add or replace an image attached to a FireHydrant status page + */ +export function statusPagesUpdateNuncImage( + client: FirehydrantCore, + request: operations.UpdateNuncImageRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateNuncImageRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateNuncImageRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = new FormData(); + if (payload.RequestBody != null) { + if (payload.RequestBody.file !== undefined) { + if (isBlobLike(payload.RequestBody.file)) { + appendForm(body, "file", payload.RequestBody.file); + } else if (isReadableStream(payload.RequestBody.file.content)) { + const buffer = await readableStreamToArrayBuffer( + payload.RequestBody.file.content, + ); + const blob = new Blob([buffer], { type: "application/octet-stream" }); + appendForm(body, "file", blob); + } else { + appendForm( + body, + "file", + new Blob([payload.RequestBody.file.content], { + type: "application/octet-stream", + }), + payload.RequestBody.file.fileName, + ); + } + } + } + + const pathParams = { + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + type: encodeSimple("type", payload.type, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/images/{type}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_nunc_image", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.NuncConnectionEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.NuncConnectionEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusPagesUpdateNuncLink.ts b/src/funcs/statusPagesUpdateNuncLink.ts new file mode 100644 index 00000000..5b6e38ef --- /dev/null +++ b/src/funcs/statusPagesUpdateNuncLink.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a status page link + * + * @remarks + * Update a link to be displayed on a FireHydrant status page + */ +export function statusPagesUpdateNuncLink( + client: FirehydrantCore, + request: operations.UpdateNuncLinkRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateNuncLinkRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateNuncLinkRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_nunc_link, { explode: true }); + + const pathParams = { + link_id: encodeSimple("link_id", payload.link_id, { + explode: false, + charEncoding: "percent", + }), + nunc_connection_id: encodeSimple( + "nunc_connection_id", + payload.nunc_connection_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/nunc_connections/{nunc_connection_id}/links/{link_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_nunc_link", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/statusUpdateTemplatesCreate.ts b/src/funcs/statusUpdateTemplatesCreate.ts deleted file mode 100644 index f004ad42..00000000 --- a/src/funcs/statusUpdateTemplatesCreate.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a status update template - * - * @remarks - * Create a status update template for your organization - */ -export async function statusUpdateTemplatesCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1StatusUpdateTemplates, - options?: RequestOptions, -): Promise< - Result< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - components.PostV1StatusUpdateTemplates$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/status_update_templates")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createStatusUpdateTemplate", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.StatusUpdateTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.StatusUpdateTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/statuspageUpdateConnection.ts b/src/funcs/statuspageUpdateConnection.ts deleted file mode 100644 index d1fff3d5..00000000 --- a/src/funcs/statuspageUpdateConnection.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a Statuspage connection - * - * @remarks - * Update the given Statuspage integration connection. - */ -export async function statuspageUpdateConnection( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateStatuspageConnectionRequest, - options?: RequestOptions, -): Promise< - Result< - components.IntegrationsStatuspageConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateStatuspageConnectionRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IntegrationsStatuspageConnectionsConnectionId, - { explode: true }, - ); - - const pathParams = { - connection_id: encodeSimple("connection_id", payload.connection_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/integrations/statuspage/connections/{connection_id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateStatuspageConnection", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.IntegrationsStatuspageConnectionEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json( - 200, - components.IntegrationsStatuspageConnectionEntity$inboundSchema, - ), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/systemPing.ts b/src/funcs/systemPing.ts deleted file mode 100644 index 7cead507..00000000 --- a/src/funcs/systemPing.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Check API connectivity - * - * @remarks - * Simple endpoint to verify your API connection is working - */ -export async function systemPing( - client: FirehydrantTypescriptSDKCore, - options?: RequestOptions, -): Promise< - Result< - components.PongEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path = pathToFunc("/v1/ping")(); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "apiPing", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.PongEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.PongEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksConvertIncidentTask.ts b/src/funcs/tasksConvertIncidentTask.ts new file mode 100644 index 00000000..1911dc53 --- /dev/null +++ b/src/funcs/tasksConvertIncidentTask.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Convert a task to a follow-up + * + * @remarks + * Convert a task to a follow-up + */ +export function tasksConvertIncidentTask( + client: FirehydrantCore, + request: operations.ConvertIncidentTaskRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ConvertIncidentTaskRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ConvertIncidentTaskRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.convert_incident_task, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + task_id: encodeSimple("task_id", payload.task_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc( + "/v1/incidents/{incident_id}/tasks/{task_id}/convert", + )(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "convert_incident_task", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TaskEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksConvertToFollowup.ts b/src/funcs/tasksConvertToFollowup.ts deleted file mode 100644 index 0e143428..00000000 --- a/src/funcs/tasksConvertToFollowup.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Convert a task to a follow-up - * - * @remarks - * Convert a task to a follow-up - */ -export async function tasksConvertToFollowup( - client: FirehydrantTypescriptSDKCore, - request: operations.ConvertIncidentTaskToFollowupRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ConvertIncidentTaskToFollowupRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1IncidentsIncidentIdTasksTaskIdConvert, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - task_id: encodeSimple("task_id", payload.task_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/incidents/{incident_id}/tasks/{task_id}/convert", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "convertIncidentTaskToFollowup", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TaskEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksCreate.ts b/src/funcs/tasksCreate.ts deleted file mode 100644 index 3a334046..00000000 --- a/src/funcs/tasksCreate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a task for an incident - * - * @remarks - * Create a task - */ -export async function tasksCreate( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateIncidentTaskRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.CreateIncidentTaskRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1IncidentsIncidentIdTasks, { - explode: true, - }); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/tasks")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createIncidentTask", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TaskEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksCreateChecklistTemplate.ts b/src/funcs/tasksCreateChecklistTemplate.ts index 890824de..19022e29 100644 --- a/src/funcs/tasksCreateChecklistTemplate.ts +++ b/src/funcs/tasksCreateChecklistTemplate.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -20,6 +21,7 @@ import { } from "../models/errors/httpclienterrors.js"; import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -28,20 +30,14 @@ import { Result } from "../types/fp.js"; * @remarks * Creates a checklist template for the organization */ -export async function tasksCreateChecklistTemplate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1ChecklistTemplates, +export function tasksCreateChecklistTemplate( + client: FirehydrantCore, + request: components.CreateChecklistTemplate, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.ChecklistTemplateEntity, | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,31 +46,59 @@ export async function tasksCreateChecklistTemplate( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateChecklistTemplate, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChecklistTemplateEntity, + | errors.ErrorEntity + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, - (value) => components.PostV1ChecklistTemplates$outboundSchema.parse(value), + (value) => components.CreateChecklistTemplate$outboundSchema.parse(value), "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); const path = pathToFunc("/v1/checklist_templates")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "createChecklistTemplate", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_checklist_template", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -96,44 +120,18 @@ export async function tasksCreateChecklistTemplate( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["400", "4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -144,12 +142,6 @@ export async function tasksCreateChecklistTemplate( const [result] = await M.match< components.ChecklistTemplateEntity, | errors.ErrorEntity - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.BadRequest - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -160,20 +152,12 @@ export async function tasksCreateChecklistTemplate( >( M.json(201, components.ChecklistTemplateEntity$inboundSchema), M.jsonErr(400, errors.ErrorEntity$inboundSchema), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr([413, 414, 415, 422, 431, 510], errors.BadRequest$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), + M.fail("4XX"), + M.fail("5XX"), )(response, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/tasksCreateIncidentTask.ts b/src/funcs/tasksCreateIncidentTask.ts new file mode 100644 index 00000000..2349f216 --- /dev/null +++ b/src/funcs/tasksCreateIncidentTask.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create an incident task + * + * @remarks + * Create a task + */ +export function tasksCreateIncidentTask( + client: FirehydrantCore, + request: operations.CreateIncidentTaskRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentTaskRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateIncidentTaskRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_task, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/tasks")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_task", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TaskEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksCreateIncidentTaskList.ts b/src/funcs/tasksCreateIncidentTaskList.ts new file mode 100644 index 00000000..a30f6e07 --- /dev/null +++ b/src/funcs/tasksCreateIncidentTaskList.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Add tasks from a task list to an incident + * + * @remarks + * Add all tasks from list to incident + */ +export function tasksCreateIncidentTaskList( + client: FirehydrantCore, + request: operations.CreateIncidentTaskListRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateIncidentTaskListRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateIncidentTaskListRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.create_incident_task_list, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/task_lists")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_incident_task_list", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TaskEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksCreateList.ts b/src/funcs/tasksCreateList.ts deleted file mode 100644 index 8dc61764..00000000 --- a/src/funcs/tasksCreateList.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a task list - * - * @remarks - * Creates a new task list - */ -export async function tasksCreateList( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1TaskLists, - options?: RequestOptions, -): Promise< - Result< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1TaskLists$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/task_lists")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTaskList", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TaskListEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksCreateTaskList.ts b/src/funcs/tasksCreateTaskList.ts new file mode 100644 index 00000000..5bb80f55 --- /dev/null +++ b/src/funcs/tasksCreateTaskList.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a task list + * + * @remarks + * Creates a new task list + */ +export function tasksCreateTaskList( + client: FirehydrantCore, + request: components.CreateTaskList, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateTaskList, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateTaskList$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/task_lists")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_task_list", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TaskListEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksDelete.ts b/src/funcs/tasksDelete.ts deleted file mode 100644 index 9d34afa1..00000000 --- a/src/funcs/tasksDelete.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a task from an incident - * - * @remarks - * Delete a task - */ -export async function tasksDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteIncidentTaskRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteIncidentTaskRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - task_id: encodeSimple("task_id", payload.task_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/tasks/{task_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteIncidentTask", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksDeleteChecklistTemplate.ts b/src/funcs/tasksDeleteChecklistTemplate.ts index 6be9bb5b..6029fad3 100644 --- a/src/funcs/tasksDeleteChecklistTemplate.ts +++ b/src/funcs/tasksDeleteChecklistTemplate.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Archive a checklist template */ -export async function tasksDeleteChecklistTemplate( - client: FirehydrantTypescriptSDKCore, +export function tasksDeleteChecklistTemplate( + client: FirehydrantCore, request: operations.DeleteChecklistTemplateRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.ChecklistTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function tasksDeleteChecklistTemplate( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteChecklistTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChecklistTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function tasksDeleteChecklistTemplate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -72,16 +93,17 @@ export async function tasksDeleteChecklistTemplate( const path = pathToFunc("/v1/checklist_templates/{id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "deleteChecklistTemplate", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_checklist_template", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -103,59 +125,23 @@ export async function tasksDeleteChecklistTemplate( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.ChecklistTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -165,23 +151,12 @@ export async function tasksDeleteChecklistTemplate( | ConnectionError >( M.json(200, components.ChecklistTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/tasksDeleteIncidentTask.ts b/src/funcs/tasksDeleteIncidentTask.ts new file mode 100644 index 00000000..90f8b5d8 --- /dev/null +++ b/src/funcs/tasksDeleteIncidentTask.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete an incident task + * + * @remarks + * Delete a task + */ +export function tasksDeleteIncidentTask( + client: FirehydrantCore, + request: operations.DeleteIncidentTaskRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteIncidentTaskRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteIncidentTaskRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + task_id: encodeSimple("task_id", payload.task_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/tasks/{task_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_incident_task", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksDeleteTaskList.ts b/src/funcs/tasksDeleteTaskList.ts new file mode 100644 index 00000000..1e5ce1c8 --- /dev/null +++ b/src/funcs/tasksDeleteTaskList.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a task list + * + * @remarks + * Delete a task list + */ +export function tasksDeleteTaskList( + client: FirehydrantCore, + request: operations.DeleteTaskListRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTaskListRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteTaskListRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + task_list_id: encodeSimple("task_list_id", payload.task_list_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/task_lists/{task_list_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_task_list", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TaskListEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksGet.ts b/src/funcs/tasksGet.ts deleted file mode 100644 index c5afba7d..00000000 --- a/src/funcs/tasksGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a task list - * - * @remarks - * Retrieves a single task list by ID - */ -export async function tasksGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTaskListRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetTaskListRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - task_list_id: encodeSimple("task_list_id", payload.task_list_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/task_lists/{task_list_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTaskList", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TaskListEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksGetChecklistTemplate.ts b/src/funcs/tasksGetChecklistTemplate.ts new file mode 100644 index 00000000..8f2505ba --- /dev/null +++ b/src/funcs/tasksGetChecklistTemplate.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a checklist template + * + * @remarks + * Retrieves a single checklist template by ID + */ +export function tasksGetChecklistTemplate( + client: FirehydrantCore, + request: operations.GetChecklistTemplateRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.ChecklistTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetChecklistTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChecklistTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetChecklistTemplateRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/checklist_templates/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_checklist_template", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.ChecklistTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.ChecklistTemplateEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksGetForIncident.ts b/src/funcs/tasksGetForIncident.ts deleted file mode 100644 index 7c38e458..00000000 --- a/src/funcs/tasksGetForIncident.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a task for an incident - * - * @remarks - * Retrieve a single task for an incident - */ -export async function tasksGetForIncident( - client: FirehydrantTypescriptSDKCore, - request: operations.GetIncidentTaskRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetIncidentTaskRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - task_id: encodeSimple("task_id", payload.task_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/tasks/{task_id}")( - pathParams, - ); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getIncidentTask", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksGetIncidentTask.ts b/src/funcs/tasksGetIncidentTask.ts new file mode 100644 index 00000000..3511fa0f --- /dev/null +++ b/src/funcs/tasksGetIncidentTask.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get an incident task + * + * @remarks + * Retrieve a single task for an incident + */ +export function tasksGetIncidentTask( + client: FirehydrantCore, + request: operations.GetIncidentTaskRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetIncidentTaskRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetIncidentTaskRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + task_id: encodeSimple("task_id", payload.task_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/tasks/{task_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_incident_task", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksGetTaskList.ts b/src/funcs/tasksGetTaskList.ts new file mode 100644 index 00000000..dda95cd4 --- /dev/null +++ b/src/funcs/tasksGetTaskList.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a task list + * + * @remarks + * Retrieves a single task list by ID + */ +export function tasksGetTaskList( + client: FirehydrantCore, + request: operations.GetTaskListRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTaskListRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTaskListRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + task_list_id: encodeSimple("task_list_id", payload.task_list_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/task_lists/{task_list_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_task_list", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TaskListEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksListChecklistTemplates.ts b/src/funcs/tasksListChecklistTemplates.ts index 2f974460..0e35ce14 100644 --- a/src/funcs/tasksListChecklistTemplates.ts +++ b/src/funcs/tasksListChecklistTemplates.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * List all of the checklist templates that have been added to the organization */ -export async function tasksListChecklistTemplates( - client: FirehydrantTypescriptSDKCore, +export function tasksListChecklistTemplates( + client: FirehydrantCore, request: operations.ListChecklistTemplatesRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.ChecklistTemplateEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function tasksListChecklistTemplates( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListChecklistTemplatesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChecklistTemplateEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +79,7 @@ export async function tasksListChecklistTemplates( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,16 +92,17 @@ export async function tasksListChecklistTemplates( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listChecklistTemplates", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_checklist_templates", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -103,59 +125,23 @@ export async function tasksListChecklistTemplates( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.ChecklistTemplateEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -165,23 +151,12 @@ export async function tasksListChecklistTemplates( | ConnectionError >( M.json(200, components.ChecklistTemplateEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/tasksListDelete.ts b/src/funcs/tasksListDelete.ts deleted file mode 100644 index ec0c4a3c..00000000 --- a/src/funcs/tasksListDelete.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a task list - * - * @remarks - * Delete a task list - */ -export async function tasksListDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTaskListRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteTaskListRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - task_list_id: encodeSimple("task_list_id", payload.task_list_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/task_lists/{task_list_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTaskList", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TaskListEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksListForIncident.ts b/src/funcs/tasksListForIncident.ts deleted file mode 100644 index ef62247f..00000000 --- a/src/funcs/tasksListForIncident.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List tasks for an incident - * - * @remarks - * Retrieve a list of all tasks for a specific incident - */ -export async function tasksListForIncident( - client: FirehydrantTypescriptSDKCore, - request: operations.ListIncidentTasksRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListIncidentTasksRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/tasks")(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listIncidentTasks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TaskEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksListIncidentTasks.ts b/src/funcs/tasksListIncidentTasks.ts new file mode 100644 index 00000000..d149247f --- /dev/null +++ b/src/funcs/tasksListIncidentTasks.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List tasks for an incident + * + * @remarks + * Retrieve a list of all tasks for a specific incident + */ +export function tasksListIncidentTasks( + client: FirehydrantCore, + request: operations.ListIncidentTasksRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListIncidentTasksRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListIncidentTasksRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/tasks")(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_incident_tasks", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TaskEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksListTaskLists.ts b/src/funcs/tasksListTaskLists.ts new file mode 100644 index 00000000..e3084ddd --- /dev/null +++ b/src/funcs/tasksListTaskLists.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List task lists + * + * @remarks + * Lists all task lists for your organization + */ +export function tasksListTaskLists( + client: FirehydrantCore, + request: operations.ListTaskListsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTaskListsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListTaskListsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/task_lists")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_task_lists", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TaskListEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksListTasks.ts b/src/funcs/tasksListTasks.ts deleted file mode 100644 index 3d70cfc0..00000000 --- a/src/funcs/tasksListTasks.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List task lists - * - * @remarks - * Lists all task lists for your organization - */ -export async function tasksListTasks( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTaskListsRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListTaskListsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/task_lists")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTaskLists", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TaskListEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksUpdate.ts b/src/funcs/tasksUpdate.ts deleted file mode 100644 index 54b6eec3..00000000 --- a/src/funcs/tasksUpdate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a task list - * - * @remarks - * Updates a task list's attributes and task list items - */ -export async function tasksUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTaskListRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateTaskListRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1TaskListsTaskListId, { - explode: true, - }); - - const pathParams = { - task_list_id: encodeSimple("task_list_id", payload.task_list_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/task_lists/{task_list_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTaskList", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskListEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TaskListEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksUpdateChecklistTemplate.ts b/src/funcs/tasksUpdateChecklistTemplate.ts index 7ad4a238..131bd0f3 100644 --- a/src/funcs/tasksUpdateChecklistTemplate.ts +++ b/src/funcs/tasksUpdateChecklistTemplate.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * Update a checklist templates attributes */ -export async function tasksUpdateChecklistTemplate( - client: FirehydrantTypescriptSDKCore, +export function tasksUpdateChecklistTemplate( + client: FirehydrantCore, request: operations.UpdateChecklistTemplateRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.ChecklistTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function tasksUpdateChecklistTemplate( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateChecklistTemplateRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ChecklistTemplateEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,10 +79,10 @@ export async function tasksUpdateChecklistTemplate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1ChecklistTemplatesId, { + const body = encodeJSON("body", payload.update_checklist_template, { explode: true, }); @@ -74,17 +95,18 @@ export async function tasksUpdateChecklistTemplate( const path = pathToFunc("/v1/checklist_templates/{id}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "updateChecklistTemplate", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_checklist_template", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -106,59 +128,23 @@ export async function tasksUpdateChecklistTemplate( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.ChecklistTemplateEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -168,23 +154,12 @@ export async function tasksUpdateChecklistTemplate( | ConnectionError >( M.json(200, components.ChecklistTemplateEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/tasksUpdateIncidentTask.ts b/src/funcs/tasksUpdateIncidentTask.ts new file mode 100644 index 00000000..a327e2d4 --- /dev/null +++ b/src/funcs/tasksUpdateIncidentTask.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update an incident task + * + * @remarks + * Update a task's attributes + */ +export function tasksUpdateIncidentTask( + client: FirehydrantCore, + request: operations.UpdateIncidentTaskRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateIncidentTaskRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateIncidentTaskRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_incident_task, { + explode: true, + }); + + const pathParams = { + incident_id: encodeSimple("incident_id", payload.incident_id, { + explode: false, + charEncoding: "percent", + }), + task_id: encodeSimple("task_id", payload.task_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/incidents/{incident_id}/tasks/{task_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_incident_task", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TaskEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/tasksUpdateTask.ts b/src/funcs/tasksUpdateTask.ts deleted file mode 100644 index d1a9637a..00000000 --- a/src/funcs/tasksUpdateTask.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a task for an incident - * - * @remarks - * Update a task's attributes - */ -export async function tasksUpdateTask( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateIncidentTaskRequest, - options?: RequestOptions, -): Promise< - Result< - components.TaskEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateIncidentTaskRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1IncidentsIncidentIdTasksTaskId, - { explode: true }, - ); - - const pathParams = { - incident_id: encodeSimple("incident_id", payload.incident_id, { - explode: false, - charEncoding: "percent", - }), - task_id: encodeSimple("task_id", payload.task_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/incidents/{incident_id}/tasks/{task_id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateIncidentTask", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TaskEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TaskEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/tasksUpdateTaskList.ts b/src/funcs/tasksUpdateTaskList.ts new file mode 100644 index 00000000..6a5cde20 --- /dev/null +++ b/src/funcs/tasksUpdateTaskList.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a task list + * + * @remarks + * Updates a task list's attributes and task list items + */ +export function tasksUpdateTaskList( + client: FirehydrantCore, + request: operations.UpdateTaskListRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTaskListRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateTaskListRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_task_list, { explode: true }); + + const pathParams = { + task_list_id: encodeSimple("task_list_id", payload.task_list_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/task_lists/{task_list_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_task_list", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TaskListEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TaskListEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/teamsArchive.ts b/src/funcs/teamsArchive.ts deleted file mode 100644 index 4bba511a..00000000 --- a/src/funcs/teamsArchive.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Archive a team - * - * @remarks - * Archives an team which will hide it from lists and metrics - */ -export async function teamsArchive( - client: FirehydrantTypescriptSDKCore, - request: operations.ArchiveTeamRequest, - options?: RequestOptions, -): Promise< - Result< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ArchiveTeamRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "archiveTeam", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TeamEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsCreate.ts b/src/funcs/teamsCreate.ts deleted file mode 100644 index d4dd78af..00000000 --- a/src/funcs/teamsCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a team - * - * @remarks - * Create a new team - */ -export async function teamsCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Teams, - options?: RequestOptions, -): Promise< - Result< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Teams$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/teams")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTeam", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TeamEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsCreateEscalationPolicy.ts b/src/funcs/teamsCreateEscalationPolicy.ts deleted file mode 100644 index 184aab8b..00000000 --- a/src/funcs/teamsCreateEscalationPolicy.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create an escalation policy for a team - * - * @remarks - * Create a Signals escalation policy for a team. - */ -export async function teamsCreateEscalationPolicy( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateTeamEscalationPolicyRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateTeamEscalationPolicyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1TeamsTeamIdEscalationPolicies, { - explode: true, - }); - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/escalation_policies")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTeamEscalationPolicy", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsCreateOnCallSchedule.ts b/src/funcs/teamsCreateOnCallSchedule.ts deleted file mode 100644 index 57501cd5..00000000 --- a/src/funcs/teamsCreateOnCallSchedule.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create an on-call schedule for a team - * - * @remarks - * Create a Signals on-call schedule for a team. - */ -export async function teamsCreateOnCallSchedule( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateTeamOnCallScheduleRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateTeamOnCallScheduleRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.postV1TeamsTeamIdOnCallSchedules, { - explode: true, - }); - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/on_call_schedules")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTeamOnCallSchedule", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsCreateShift.ts b/src/funcs/teamsCreateShift.ts deleted file mode 100644 index b1c95218..00000000 --- a/src/funcs/teamsCreateShift.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a shift for an on-call schedule - * - * @remarks - * Create a Signals on-call shift in a schedule. - */ -export async function teamsCreateShift( - client: FirehydrantTypescriptSDKCore, - request: operations.CreateTeamOnCallScheduleShiftRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.CreateTeamOnCallScheduleShiftRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts, - { explode: true }, - ); - - const pathParams = { - schedule_id: encodeSimple("schedule_id", payload.schedule_id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTeamOnCallScheduleShift", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(201, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsCreateTeam.ts b/src/funcs/teamsCreateTeam.ts new file mode 100644 index 00000000..8c7f4414 --- /dev/null +++ b/src/funcs/teamsCreateTeam.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a team + * + * @remarks + * Create a new team + */ +export function teamsCreateTeam( + client: FirehydrantCore, + request: components.CreateTeam, + options?: RequestOptions, +): APIPromise< + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateTeam, + options?: RequestOptions, +): Promise< + [ + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateTeam$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/teams")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_team", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TeamEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/teamsDeleteScheduleShift.ts b/src/funcs/teamsDeleteScheduleShift.ts deleted file mode 100644 index 88727ff7..00000000 --- a/src/funcs/teamsDeleteScheduleShift.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete an on-call shift from a team schedule - * - * @remarks - * Delete a Signals on-call shift by ID - */ -export async function teamsDeleteScheduleShift( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTeamScheduleShiftRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.DeleteTeamScheduleShiftRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - schedule_id: encodeSimple("schedule_id", payload.schedule_id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts/{id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTeamScheduleShift", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsDeleteTeam.ts b/src/funcs/teamsDeleteTeam.ts new file mode 100644 index 00000000..42e9ca39 --- /dev/null +++ b/src/funcs/teamsDeleteTeam.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive a team + * + * @remarks + * Archives an team which will hide it from lists and metrics + */ +export function teamsDeleteTeam( + client: FirehydrantCore, + request: operations.DeleteTeamRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTeamRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteTeamRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_team", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TeamEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/teamsGet.ts b/src/funcs/teamsGet.ts deleted file mode 100644 index b244ffa4..00000000 --- a/src/funcs/teamsGet.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a team - * - * @remarks - * Retrieve a single team from its ID - */ -export async function teamsGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTeamRequest, - options?: RequestOptions, -): Promise< - Result< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetTeamRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}")(pathParams); - - const query = encodeFormQuery({ - "lite": payload.lite, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTeam", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TeamEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsGetScheduleShift.ts b/src/funcs/teamsGetScheduleShift.ts deleted file mode 100644 index cca18ab4..00000000 --- a/src/funcs/teamsGetScheduleShift.ts +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get an on-call shift for a team schedule - * - * @remarks - * Get a Signals on-call shift by ID - */ -export async function teamsGetScheduleShift( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTeamScheduleShiftRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTeamScheduleShiftRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - schedule_id: encodeSimple("schedule_id", payload.schedule_id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts/{id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTeamScheduleShift", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsGetTeam.ts b/src/funcs/teamsGetTeam.ts new file mode 100644 index 00000000..a77d3fef --- /dev/null +++ b/src/funcs/teamsGetTeam.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a team + * + * @remarks + * Retrieve a single team from its ID + */ +export function teamsGetTeam( + client: FirehydrantCore, + request: operations.GetTeamRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTeamRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTeamRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}")(pathParams); + + const query = encodeFormQuery({ + "lite": payload.lite, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_team", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TeamEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/teamsList.ts b/src/funcs/teamsList.ts deleted file mode 100644 index 8a2d3344..00000000 --- a/src/funcs/teamsList.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List teams - * - * @remarks - * List all of the teams in the organization - */ -export async function teamsList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTeamsRequest, - options?: RequestOptions, -): Promise< - Result< - components.TeamEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListTeamsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/teams")(); - - const query = encodeFormQuery({ - "default_incident_role": payload.default_incident_role, - "lite": payload.lite, - "name": payload.name, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - "services": payload.services, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTeams", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TeamEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TeamEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsListOnCallSchedules.ts b/src/funcs/teamsListOnCallSchedules.ts deleted file mode 100644 index 1b48e304..00000000 --- a/src/funcs/teamsListOnCallSchedules.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List on-call schedules for a team - * - * @remarks - * List all Signals on-call schedules for a team. - */ -export async function teamsListOnCallSchedules( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTeamOnCallSchedulesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListTeamOnCallSchedulesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/on_call_schedules")(pathParams); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTeamOnCallSchedules", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsListSchedules.ts b/src/funcs/teamsListSchedules.ts index 3dc5125d..a34c342e 100644 --- a/src/funcs/teamsListSchedules.ts +++ b/src/funcs/teamsListSchedules.ts @@ -2,9 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { FirehydrantTypescriptSDKCore } from "../core.js"; +import { FirehydrantCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; @@ -18,9 +19,9 @@ import { RequestTimeoutError, UnexpectedClientError, } from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; import { Result } from "../types/fp.js"; /** @@ -29,19 +30,13 @@ import { Result } from "../types/fp.js"; * @remarks * List all known schedules in FireHydrant as pulled from external sources */ -export async function teamsListSchedules( - client: FirehydrantTypescriptSDKCore, +export function teamsListSchedules( + client: FirehydrantCore, request: operations.ListSchedulesRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< components.ScheduleEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -50,6 +45,32 @@ export async function teamsListSchedules( | RequestTimeoutError | ConnectionError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListSchedulesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.ScheduleEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +78,7 @@ export async function teamsListSchedules( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -70,16 +91,17 @@ export async function teamsListSchedules( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.apiKey); const securityInput = secConfig == null ? {} : { apiKey: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { - operationID: "listSchedules", + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_schedules", oAuth2Scopes: [], resolvedSecurity: requestSecurity, @@ -102,59 +124,23 @@ export async function teamsListSchedules( timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], + errorCodes: ["4XX", "5XX"], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - const [result] = await M.match< components.ScheduleEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError | APIError | SDKValidationError | UnexpectedClientError @@ -164,23 +150,12 @@ export async function teamsListSchedules( | ConnectionError >( M.json(200, components.ScheduleEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.fail("4XX"), + M.fail("5XX"), + )(response); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/src/funcs/teamsListTeams.ts b/src/funcs/teamsListTeams.ts new file mode 100644 index 00000000..da99dfb3 --- /dev/null +++ b/src/funcs/teamsListTeams.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List teams + * + * @remarks + * List all of the teams in the organization + */ +export function teamsListTeams( + client: FirehydrantCore, + request: operations.ListTeamsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TeamEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTeamsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TeamEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListTeamsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/teams")(); + + const query = encodeFormQuery({ + "default_incident_role": payload.default_incident_role, + "lite": payload.lite, + "name": payload.name, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + "services": payload.services, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_teams", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TeamEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TeamEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/teamsUpdate.ts b/src/funcs/teamsUpdate.ts deleted file mode 100644 index 36cdfd3b..00000000 --- a/src/funcs/teamsUpdate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a team - * - * @remarks - * Update a single team from its ID - */ -export async function teamsUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTeamRequest, - options?: RequestOptions, -): Promise< - Result< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateTeamRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1TeamsTeamId, { - explode: true, - }); - - const pathParams = { - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTeam", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TeamEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TeamEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsUpdateEscalationPolicy.ts b/src/funcs/teamsUpdateEscalationPolicy.ts deleted file mode 100644 index d1f29e18..00000000 --- a/src/funcs/teamsUpdateEscalationPolicy.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an escalation policy for a team - * - * @remarks - * Update a Signals escalation policy by ID - */ -export async function teamsUpdateEscalationPolicy( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTeamEscalationPolicyRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateTeamEscalationPolicyRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1TeamsTeamIdEscalationPoliciesId, - { explode: true }, - ); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/teams/{team_id}/escalation_policies/{id}")( - pathParams, - ); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTeamEscalationPolicy", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsUpdateScheduleShift.ts b/src/funcs/teamsUpdateScheduleShift.ts deleted file mode 100644 index 7011aeaf..00000000 --- a/src/funcs/teamsUpdateScheduleShift.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update an on-call shift in a team schedule - * - * @remarks - * Update a Signals on-call shift by ID - */ -export async function teamsUpdateScheduleShift( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTeamScheduleShiftRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateTeamScheduleShiftRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON( - "body", - payload.patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId, - { explode: true }, - ); - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - schedule_id: encodeSimple("schedule_id", payload.schedule_id, { - explode: false, - charEncoding: "percent", - }), - team_id: encodeSimple("team_id", payload.team_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc( - "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts/{id}", - )(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTeamScheduleShift", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/teamsUpdateTeam.ts b/src/funcs/teamsUpdateTeam.ts new file mode 100644 index 00000000..64f83704 --- /dev/null +++ b/src/funcs/teamsUpdateTeam.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a team + * + * @remarks + * Update a single team from its ID + */ +export function teamsUpdateTeam( + client: FirehydrantCore, + request: operations.UpdateTeamRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTeamRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateTeamRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_team, { explode: true }); + + const pathParams = { + team_id: encodeSimple("team_id", payload.team_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/teams/{team_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_team", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TeamEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TeamEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingCreateInboundFieldMap.ts b/src/funcs/ticketingCreateInboundFieldMap.ts new file mode 100644 index 00000000..314a48e4 --- /dev/null +++ b/src/funcs/ticketingCreateInboundFieldMap.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create inbound field map for a ticketing project + * + * @remarks + * Creates inbound field map for a ticketing project + */ +export function ticketingCreateInboundFieldMap( + client: FirehydrantCore, + request: operations.CreateInboundFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateInboundFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateInboundFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_inbound_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TicketingProjectInboundFieldMapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingCreateTicket.ts b/src/funcs/ticketingCreateTicket.ts new file mode 100644 index 00000000..8c2d1cf1 --- /dev/null +++ b/src/funcs/ticketingCreateTicket.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a ticket + * + * @remarks + * Creates a ticket for a project + */ +export function ticketingCreateTicket( + client: FirehydrantCore, + request: components.CreateTicket, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateTicket, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateTicket$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/ticketing/tickets")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_ticket", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TicketingTicketEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingCreateTicketingFieldMap.ts b/src/funcs/ticketingCreateTicketingFieldMap.ts new file mode 100644 index 00000000..3ead6d4b --- /dev/null +++ b/src/funcs/ticketingCreateTicketingFieldMap.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a field mapping for a ticketing project + * + * @remarks + * Creates field map for a ticketing project + */ +export function ticketingCreateTicketingFieldMap( + client: FirehydrantCore, + request: operations.CreateTicketingFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateTicketingFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateTicketingFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/field_maps", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_ticketing_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TicketingProjectFieldMapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingCreateTicketingPriority.ts b/src/funcs/ticketingCreateTicketingPriority.ts new file mode 100644 index 00000000..49fe66d1 --- /dev/null +++ b/src/funcs/ticketingCreateTicketingPriority.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a ticketing priority + * + * @remarks + * Create a single ticketing priority + */ +export function ticketingCreateTicketingPriority( + client: FirehydrantCore, + request: components.CreateTicketingPriority, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateTicketingPriority, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateTicketingPriority$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/ticketing/priorities")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_ticketing_priority", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TicketingPriorityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingCreateTicketingProjectConfig.ts b/src/funcs/ticketingCreateTicketingProjectConfig.ts new file mode 100644 index 00000000..dd1f3ff6 --- /dev/null +++ b/src/funcs/ticketingCreateTicketingProjectConfig.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a ticketing project configuration + * + * @remarks + * Creates configuration for a ticketing project + */ +export function ticketingCreateTicketingProjectConfig( + client: FirehydrantCore, + request: operations.CreateTicketingProjectConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.CreateTicketingProjectConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.CreateTicketingProjectConfigRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_ticketing_project_config", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.TicketingProjectConfigEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingDeleteInboundFieldMap.ts b/src/funcs/ticketingDeleteInboundFieldMap.ts new file mode 100644 index 00000000..48f9bbc8 --- /dev/null +++ b/src/funcs/ticketingDeleteInboundFieldMap.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive inbound field map for a ticketing project + * + * @remarks + * Archive inbound field map for a ticketing project + */ +export function ticketingDeleteInboundFieldMap( + client: FirehydrantCore, + request: operations.DeleteInboundFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteInboundFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteInboundFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + map_id: encodeSimple("map_id", payload.map_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps/{map_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_inbound_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingDeleteTicket.ts b/src/funcs/ticketingDeleteTicket.ts new file mode 100644 index 00000000..bbf23e92 --- /dev/null +++ b/src/funcs/ticketingDeleteTicket.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive a ticket + * + * @remarks + * Archive a ticket + */ +export function ticketingDeleteTicket( + client: FirehydrantCore, + request: operations.DeleteTicketRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTicketRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteTicketRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticket_id: encodeSimple("ticket_id", payload.ticket_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/ticketing/tickets/{ticket_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_ticket", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingDeleteTicketingFieldMap.ts b/src/funcs/ticketingDeleteTicketingFieldMap.ts new file mode 100644 index 00000000..87612731 --- /dev/null +++ b/src/funcs/ticketingDeleteTicketingFieldMap.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive a field map for a ticketing project + * + * @remarks + * Archive field map for a ticketing project + */ +export function ticketingDeleteTicketingFieldMap( + client: FirehydrantCore, + request: operations.DeleteTicketingFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTicketingFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteTicketingFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + map_id: encodeSimple("map_id", payload.map_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/field_maps/{map_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_ticketing_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingDeleteTicketingPriority.ts b/src/funcs/ticketingDeleteTicketingPriority.ts new file mode 100644 index 00000000..9848cc4a --- /dev/null +++ b/src/funcs/ticketingDeleteTicketingPriority.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a ticketing priority + * + * @remarks + * Delete a single ticketing priority by ID + */ +export function ticketingDeleteTicketingPriority( + client: FirehydrantCore, + request: operations.DeleteTicketingPriorityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTicketingPriorityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteTicketingPriorityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/ticketing/priorities/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_ticketing_priority", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingPriorityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingDeleteTicketingProjectConfig.ts b/src/funcs/ticketingDeleteTicketingProjectConfig.ts new file mode 100644 index 00000000..71496027 --- /dev/null +++ b/src/funcs/ticketingDeleteTicketingProjectConfig.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Archive a ticketing project configuration + * + * @remarks + * Archive configuration for a ticketing project + */ +export function ticketingDeleteTicketingProjectConfig( + client: FirehydrantCore, + request: operations.DeleteTicketingProjectConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteTicketingProjectConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.DeleteTicketingProjectConfigRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + config_id: encodeSimple("config_id", payload.config_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations/{config_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_ticketing_project_config", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectConfigEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetConfigurationOptions.ts b/src/funcs/ticketingGetConfigurationOptions.ts new file mode 100644 index 00000000..3c5a024e --- /dev/null +++ b/src/funcs/ticketingGetConfigurationOptions.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List configuration options for a ticketing project + * + * @remarks + * List all configuration options for a ticketing project + */ +export function ticketingGetConfigurationOptions( + client: FirehydrantCore, + request: operations.GetConfigurationOptionsRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetConfigurationOptionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetConfigurationOptionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/configuration_options", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_configuration_options", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetFieldMap.ts b/src/funcs/ticketingGetFieldMap.ts deleted file mode 100644 index b85ca599..00000000 --- a/src/funcs/ticketingGetFieldMap.ts +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a field map for a ticketing project - * - * @remarks - * Retrieve field map for a ticketing project - */ -export async function ticketingGetFieldMap( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketingProjectFieldMapRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTicketingProjectFieldMapRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - map_id: encodeSimple("map_id", payload.map_id, { - explode: false, - charEncoding: "percent", - }), - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/field_maps/{map_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicketingProjectFieldMap", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectFieldMapEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingProjectFieldMapEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/ticketingGetInboundFieldMap.ts b/src/funcs/ticketingGetInboundFieldMap.ts new file mode 100644 index 00000000..db361d94 --- /dev/null +++ b/src/funcs/ticketingGetInboundFieldMap.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get inbound field map for a ticketing project + * + * @remarks + * Retrieve inbound field map for a ticketing project + */ +export function ticketingGetInboundFieldMap( + client: FirehydrantCore, + request: operations.GetInboundFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetInboundFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetInboundFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + map_id: encodeSimple("map_id", payload.map_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps/{map_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_inbound_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectInboundFieldMapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetOptionsForField.ts b/src/funcs/ticketingGetOptionsForField.ts new file mode 100644 index 00000000..6c775d67 --- /dev/null +++ b/src/funcs/ticketingGetOptionsForField.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List a field's configuration options for a ticketing project + * + * @remarks + * List a field's configuration options for a ticketing project + */ +export function ticketingGetOptionsForField( + client: FirehydrantCore, + request: operations.GetOptionsForFieldRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetOptionsForFieldRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetOptionsForFieldRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + field_id: encodeSimple("field_id", payload.field_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/configuration_options/options_for/{field_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_options_for_field", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetTicket.ts b/src/funcs/ticketingGetTicket.ts new file mode 100644 index 00000000..d3f98a51 --- /dev/null +++ b/src/funcs/ticketingGetTicket.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a ticket + * + * @remarks + * Retrieves a single ticket by ID + */ +export function ticketingGetTicket( + client: FirehydrantCore, + request: operations.GetTicketRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTicketRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetTicketRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticket_id: encodeSimple("ticket_id", payload.ticket_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/ticketing/tickets/{ticket_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_ticket", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingTicketEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetTicketingFieldMap.ts b/src/funcs/ticketingGetTicketingFieldMap.ts new file mode 100644 index 00000000..b1268d83 --- /dev/null +++ b/src/funcs/ticketingGetTicketingFieldMap.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a field map for a ticketing project + * + * @remarks + * Retrieve field map for a ticketing project + */ +export function ticketingGetTicketingFieldMap( + client: FirehydrantCore, + request: operations.GetTicketingFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTicketingFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetTicketingFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + map_id: encodeSimple("map_id", payload.map_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/field_maps/{map_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_ticketing_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectFieldMapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetTicketingPriority.ts b/src/funcs/ticketingGetTicketingPriority.ts new file mode 100644 index 00000000..5840c3d2 --- /dev/null +++ b/src/funcs/ticketingGetTicketingPriority.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a ticketing priority + * + * @remarks + * Retrieve a single ticketing priority by ID + */ +export function ticketingGetTicketingPriority( + client: FirehydrantCore, + request: operations.GetTicketingPriorityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTicketingPriorityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetTicketingPriorityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/ticketing/priorities/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_ticketing_priority", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingPriorityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetTicketingProject.ts b/src/funcs/ticketingGetTicketingProject.ts new file mode 100644 index 00000000..a65b74a9 --- /dev/null +++ b/src/funcs/ticketingGetTicketingProject.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a ticketing project + * + * @remarks + * Retrieve a single ticketing project by ID + */ +export function ticketingGetTicketingProject( + client: FirehydrantCore, + request: operations.GetTicketingProjectRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectsProjectListItemEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTicketingProjectRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectsProjectListItemEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetTicketingProjectRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc("/v1/ticketing/projects/{ticketing_project_id}")( + pathParams, + ); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_ticketing_project", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectsProjectListItemEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.TicketingProjectsProjectListItemEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingGetTicketingProjectConfig.ts b/src/funcs/ticketingGetTicketingProjectConfig.ts new file mode 100644 index 00000000..675b4f27 --- /dev/null +++ b/src/funcs/ticketingGetTicketingProjectConfig.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get configuration for a ticketing project + * + * @remarks + * Retrieve configuration for a ticketing project + */ +export function ticketingGetTicketingProjectConfig( + client: FirehydrantCore, + request: operations.GetTicketingProjectConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetTicketingProjectConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.GetTicketingProjectConfigRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + config_id: encodeSimple("config_id", payload.config_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations/{config_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_ticketing_project_config", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectConfigEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingListAvailableInboundFieldMaps.ts b/src/funcs/ticketingListAvailableInboundFieldMaps.ts new file mode 100644 index 00000000..d4995f05 --- /dev/null +++ b/src/funcs/ticketingListAvailableInboundFieldMaps.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List available fields for ticket field mapping + * + * @remarks + * Returns metadata for the fields that are available for inbound field mapping. + */ +export function ticketingListAvailableInboundFieldMaps( + client: FirehydrantCore, + request: operations.ListAvailableInboundFieldMapsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectInboundMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAvailableInboundFieldMapsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectInboundMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListAvailableInboundFieldMapsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps/available_fields", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_available_inbound_field_maps", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectInboundMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.TicketingProjectInboundMappableFieldEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingListAvailableTicketingFieldMaps.ts b/src/funcs/ticketingListAvailableTicketingFieldMaps.ts new file mode 100644 index 00000000..4bf5dd09 --- /dev/null +++ b/src/funcs/ticketingListAvailableTicketingFieldMaps.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List available fields for ticket field mapping + * + * @remarks + * Returns metadata for the fields that are available for field mapping. + */ +export function ticketingListAvailableTicketingFieldMaps( + client: FirehydrantCore, + request: operations.ListAvailableTicketingFieldMapsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingFieldMapsMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListAvailableTicketingFieldMapsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingFieldMapsMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListAvailableTicketingFieldMapsRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/field_maps/available_fields", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_available_ticketing_field_maps", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingFieldMapsMappableFieldEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingFieldMapsMappableFieldEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingListInboundFieldMaps.ts b/src/funcs/ticketingListInboundFieldMaps.ts new file mode 100644 index 00000000..2953a70e --- /dev/null +++ b/src/funcs/ticketingListInboundFieldMaps.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List inbound field maps for a ticketing project + * + * @remarks + * List all inbound field maps for a ticketing project + */ +export function ticketingListInboundFieldMaps( + client: FirehydrantCore, + request: operations.ListInboundFieldMapsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListInboundFieldMapsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListInboundFieldMapsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps", + )(pathParams); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + "ticket_type": payload.ticket_type, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_inbound_field_maps", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectInboundFieldMapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingListTicketTags.ts b/src/funcs/ticketingListTicketTags.ts new file mode 100644 index 00000000..9d3d678c --- /dev/null +++ b/src/funcs/ticketingListTicketTags.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List ticket tags + * + * @remarks + * List all of the ticket tags in the organization + */ +export function ticketingListTicketTags( + client: FirehydrantCore, + request: operations.ListTicketTagsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TagEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTicketTagsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TagEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListTicketTagsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/ticketing/ticket_tags")(); + + const query = encodeFormQuery({ + "prefix": payload.prefix, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_ticket_tags", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TagEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TagEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingListTicketingPriorities.ts b/src/funcs/ticketingListTicketingPriorities.ts new file mode 100644 index 00000000..7daa44f6 --- /dev/null +++ b/src/funcs/ticketingListTicketingPriorities.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List ticketing priorities + * + * @remarks + * List all ticketing priorities available to the organization + */ +export function ticketingListTicketingPriorities( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/ticketing/priorities")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_ticketing_priorities", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingPriorityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingListTicketingProjects.ts b/src/funcs/ticketingListTicketingProjects.ts new file mode 100644 index 00000000..41ad96c8 --- /dev/null +++ b/src/funcs/ticketingListTicketingProjects.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List ticketing projects + * + * @remarks + * List all ticketing projects available to the organization + */ +export function ticketingListTicketingProjects( + client: FirehydrantCore, + request: operations.ListTicketingProjectsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectsProjectListItemEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTicketingProjectsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectsProjectListItemEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListTicketingProjectsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/ticketing/projects")(); + + const query = encodeFormQuery({ + "configured_projects": payload.configured_projects, + "connection_ids": payload.connection_ids, + "page": payload.page, + "per_page": payload.per_page, + "providers": payload.providers, + "query": payload.query, + "supports_ticket_types": payload.supports_ticket_types, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_ticketing_projects", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectsProjectListItemEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 200, + components.TicketingProjectsProjectListItemEntity$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingListTickets.ts b/src/funcs/ticketingListTickets.ts new file mode 100644 index 00000000..0fd1dbb8 --- /dev/null +++ b/src/funcs/ticketingListTickets.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List tickets + * + * @remarks + * List all of the tickets that have been added to the organiation + */ +export function ticketingListTickets( + client: FirehydrantCore, + request: operations.ListTicketsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListTicketsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListTicketsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/ticketing/tickets")(); + + const query = encodeFormQuery({ + "assigned_user": payload.assigned_user, + "page": payload.page, + "per_page": payload.per_page, + "state": payload.state, + "tag_match_strategy": payload.tag_match_strategy, + "tags": payload.tags, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_tickets", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingTicketEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingPrioritiesGet.ts b/src/funcs/ticketingPrioritiesGet.ts deleted file mode 100644 index cbdca119..00000000 --- a/src/funcs/ticketingPrioritiesGet.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a ticketing priority - * - * @remarks - * Retrieve a single ticketing priority by ID - */ -export async function ticketingPrioritiesGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetTicketingPriorityRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.GetTicketingPriorityRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/ticketing/priorities/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getTicketingPriority", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingPriorityEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingPriorityEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/ticketingUpdateInboundFieldMap.ts b/src/funcs/ticketingUpdateInboundFieldMap.ts new file mode 100644 index 00000000..f2d8fa52 --- /dev/null +++ b/src/funcs/ticketingUpdateInboundFieldMap.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update inbound field map for a ticketing project + * + * @remarks + * Update inbound field map for a ticketing project + */ +export function ticketingUpdateInboundFieldMap( + client: FirehydrantCore, + request: operations.UpdateInboundFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateInboundFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateInboundFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + map_id: encodeSimple("map_id", payload.map_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps/{map_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_inbound_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectInboundFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectInboundFieldMapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingUpdateProjectConfig.ts b/src/funcs/ticketingUpdateProjectConfig.ts deleted file mode 100644 index 1c79270a..00000000 --- a/src/funcs/ticketingUpdateProjectConfig.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a ticketing project configuration - * - * @remarks - * Update configuration for a ticketing project - */ -export async function ticketingUpdateProjectConfig( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTicketingProjectConfigRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.UpdateTicketingProjectConfigRequest$outboundSchema.parse( - value, - ), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - config_id: encodeSimple("config_id", payload.config_id, { - explode: false, - charEncoding: "percent", - }), - ticketing_project_id: encodeSimple( - "ticketing_project_id", - payload.ticketing_project_id, - { explode: false, charEncoding: "percent" }, - ), - }; - - const path = pathToFunc( - "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations/{config_id}", - )(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTicketingProjectConfig", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingProjectConfigEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingProjectConfigEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/ticketingUpdateTicket.ts b/src/funcs/ticketingUpdateTicket.ts new file mode 100644 index 00000000..2d2c5c18 --- /dev/null +++ b/src/funcs/ticketingUpdateTicket.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a ticket + * + * @remarks + * Update a ticket's attributes + */ +export function ticketingUpdateTicket( + client: FirehydrantCore, + request: operations.UpdateTicketRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTicketRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateTicketRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_ticket, { explode: true }); + + const pathParams = { + ticket_id: encodeSimple("ticket_id", payload.ticket_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/ticketing/tickets/{ticket_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_ticket", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingTicketEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingTicketEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingUpdateTicketingFieldMap.ts b/src/funcs/ticketingUpdateTicketingFieldMap.ts new file mode 100644 index 00000000..2abb1415 --- /dev/null +++ b/src/funcs/ticketingUpdateTicketingFieldMap.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a field map for a ticketing project + * + * @remarks + * Update field map for a ticketing project + */ +export function ticketingUpdateTicketingFieldMap( + client: FirehydrantCore, + request: operations.UpdateTicketingFieldMapRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTicketingFieldMapRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateTicketingFieldMapRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + map_id: encodeSimple("map_id", payload.map_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/field_maps/{map_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_ticketing_field_map", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectFieldMapEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectFieldMapEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingUpdateTicketingPriority.ts b/src/funcs/ticketingUpdateTicketingPriority.ts new file mode 100644 index 00000000..d4fb88e5 --- /dev/null +++ b/src/funcs/ticketingUpdateTicketingPriority.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a ticketing priority + * + * @remarks + * Update a single ticketing priority's attributes + */ +export function ticketingUpdateTicketingPriority( + client: FirehydrantCore, + request: operations.UpdateTicketingPriorityRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTicketingPriorityRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateTicketingPriorityRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_ticketing_priority, { + explode: true, + }); + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/ticketing/priorities/{id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_ticketing_priority", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingPriorityEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingPriorityEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketingUpdateTicketingProjectConfig.ts b/src/funcs/ticketingUpdateTicketingProjectConfig.ts new file mode 100644 index 00000000..730e18bf --- /dev/null +++ b/src/funcs/ticketingUpdateTicketingProjectConfig.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update configuration for a ticketing project + * + * @remarks + * Update configuration for a ticketing project + */ +export function ticketingUpdateTicketingProjectConfig( + client: FirehydrantCore, + request: operations.UpdateTicketingProjectConfigRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateTicketingProjectConfigRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.UpdateTicketingProjectConfigRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + config_id: encodeSimple("config_id", payload.config_id, { + explode: false, + charEncoding: "percent", + }), + ticketing_project_id: encodeSimple( + "ticketing_project_id", + payload.ticketing_project_id, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path = pathToFunc( + "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations/{config_id}", + )(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_ticketing_project_config", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.TicketingProjectConfigEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.TicketingProjectConfigEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/ticketsCreate.ts b/src/funcs/ticketsCreate.ts deleted file mode 100644 index 33d60add..00000000 --- a/src/funcs/ticketsCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a ticket - * - * @remarks - * Creates a ticket for a project - */ -export async function ticketsCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1TicketingTickets, - options?: RequestOptions, -): Promise< - Result< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1TicketingTickets$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/ticketing/tickets")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createTicket", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.TicketingTicketEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/ticketsDelete.ts b/src/funcs/ticketsDelete.ts deleted file mode 100644 index 23f64212..00000000 --- a/src/funcs/ticketsDelete.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a ticket - */ -export async function ticketsDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteTicketRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteTicketRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - ticket_id: encodeSimple("ticket_id", payload.ticket_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/ticketing/tickets/{ticket_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteTicket", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/ticketsList.ts b/src/funcs/ticketsList.ts deleted file mode 100644 index 518411c4..00000000 --- a/src/funcs/ticketsList.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List tickets - * - * @remarks - * List all of the tickets that have been added to the organiation - */ -export async function ticketsList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListTicketsRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListTicketsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/ticketing/tickets")(); - - const query = encodeFormQuery({ - "assigned_user": payload.assigned_user, - "page": payload.page, - "per_page": payload.per_page, - "state": payload.state, - "tag_match_strategy": payload.tag_match_strategy, - "tags": payload.tags, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listTickets", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingTicketEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/ticketsUpdate.ts b/src/funcs/ticketsUpdate.ts deleted file mode 100644 index a6b87242..00000000 --- a/src/funcs/ticketsUpdate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a ticket - * - * @remarks - * Update a ticket's attributes - */ -export async function ticketsUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateTicketRequest, - options?: RequestOptions, -): Promise< - Result< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateTicketRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1TicketingTicketsTicketId, { - explode: true, - }); - - const pathParams = { - ticket_id: encodeSimple("ticket_id", payload.ticket_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/ticketing/tickets/{ticket_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateTicket", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.TicketingTicketEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.TicketingTicketEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/usersGet.ts b/src/funcs/usersGet.ts deleted file mode 100644 index bbf31fa4..00000000 --- a/src/funcs/usersGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a user - * - * @remarks - * Retrieve a single user by ID - */ -export async function usersGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetUserRequest, - options?: RequestOptions, -): Promise< - Result< - components.UserEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetUserRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - id: encodeSimple("id", payload.id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/users/{id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getUser", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.UserEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.UserEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/usersGetCurrent.ts b/src/funcs/usersGetCurrent.ts deleted file mode 100644 index 9153c898..00000000 --- a/src/funcs/usersGetCurrent.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import * as M from "../lib/matchers.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Get the currently authenticated user - * - * @remarks - * Retrieve the current user - */ -export async function usersGetCurrent( - client: FirehydrantTypescriptSDKCore, - options?: RequestOptions, -): Promise< - Result< - components.CurrentUserEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const path = pathToFunc("/v1/current_user")(); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getCurrentUser", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.CurrentUserEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.CurrentUserEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/usersGetCurrentUser.ts b/src/funcs/usersGetCurrentUser.ts new file mode 100644 index 00000000..ca162328 --- /dev/null +++ b/src/funcs/usersGetCurrentUser.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get the currently authenticated user + * + * @remarks + * Retrieve the current user + */ +export function usersGetCurrentUser( + client: FirehydrantCore, + options?: RequestOptions, +): APIPromise< + Result< + components.CurrentUserEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: FirehydrantCore, + options?: RequestOptions, +): Promise< + [ + Result< + components.CurrentUserEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const path = pathToFunc("/v1/current_user")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_current_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.CurrentUserEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.CurrentUserEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/usersGetUser.ts b/src/funcs/usersGetUser.ts new file mode 100644 index 00000000..fe3cf4f8 --- /dev/null +++ b/src/funcs/usersGetUser.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a user + * + * @remarks + * Retrieve a single user by ID + */ +export function usersGetUser( + client: FirehydrantCore, + request: operations.GetUserRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.UserEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetUserRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.UserEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetUserRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + id: encodeSimple("id", payload.id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/users/{id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_user", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.UserEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.UserEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/usersList.ts b/src/funcs/usersList.ts deleted file mode 100644 index eea3d361..00000000 --- a/src/funcs/usersList.ts +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List users - * - * @remarks - * Retrieve a list of all users in an organization - */ -export async function usersList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListUsersRequest, - options?: RequestOptions, -): Promise< - Result< - components.UserEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListUsersRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/users")(); - - const query = encodeFormQuery({ - "name": payload.name, - "page": payload.page, - "per_page": payload.per_page, - "query": payload.query, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listUsers", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.UserEntityPaginated, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.UserEntityPaginated$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/usersListUsers.ts b/src/funcs/usersListUsers.ts new file mode 100644 index 00000000..7a02175c --- /dev/null +++ b/src/funcs/usersListUsers.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List users + * + * @remarks + * Retrieve a list of all users in an organization + */ +export function usersListUsers( + client: FirehydrantCore, + request: operations.ListUsersRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.UserEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListUsersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.UserEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListUsersRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/users")(); + + const query = encodeFormQuery({ + "name": payload.name, + "page": payload.page, + "per_page": payload.per_page, + "query": payload.query, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_users", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.UserEntityPaginated, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.UserEntityPaginated$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/webhooksCreate.ts b/src/funcs/webhooksCreate.ts deleted file mode 100644 index c9fa77f1..00000000 --- a/src/funcs/webhooksCreate.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import { Result } from "../types/fp.js"; - -/** - * Create a webhook - * - * @remarks - * Create a new webhook - */ -export async function webhooksCreate( - client: FirehydrantTypescriptSDKCore, - request: components.PostV1Webhooks, - options?: RequestOptions, -): Promise< - Result< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => components.PostV1Webhooks$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload, { explode: true }); - - const path = pathToFunc("/v1/webhooks")(); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "createWebhook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "POST", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(201, components.WebhooksEntitiesWebhookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/webhooksCreateWebhook.ts b/src/funcs/webhooksCreateWebhook.ts new file mode 100644 index 00000000..cdfbf1f5 --- /dev/null +++ b/src/funcs/webhooksCreateWebhook.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create a webhook + * + * @remarks + * Create a new webhook + */ +export function webhooksCreateWebhook( + client: FirehydrantCore, + request: components.CreateWebhook, + options?: RequestOptions, +): APIPromise< + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: components.CreateWebhook, + options?: RequestOptions, +): Promise< + [ + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => components.CreateWebhook$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/v1/webhooks")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "create_webhook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, components.WebhooksEntitiesWebhookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/webhooksDelete.ts b/src/funcs/webhooksDelete.ts deleted file mode 100644 index f7af1012..00000000 --- a/src/funcs/webhooksDelete.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Delete a webhook - * - * @remarks - * Delete a specific webhook - */ -export async function webhooksDelete( - client: FirehydrantTypescriptSDKCore, - request: operations.DeleteWebhookRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.DeleteWebhookRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - webhook_id: encodeSimple("webhook_id", payload.webhook_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/webhooks/{webhook_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "deleteWebhook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "DELETE", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(204, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/webhooksDeleteWebhook.ts b/src/funcs/webhooksDeleteWebhook.ts new file mode 100644 index 00000000..2f360000 --- /dev/null +++ b/src/funcs/webhooksDeleteWebhook.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete a webhook + * + * @remarks + * Delete a specific webhook + */ +export function webhooksDeleteWebhook( + client: FirehydrantCore, + request: operations.DeleteWebhookRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.DeleteWebhookRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.DeleteWebhookRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + webhook_id: encodeSimple("webhook_id", payload.webhook_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/webhooks/{webhook_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "delete_webhook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(204, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/webhooksGet.ts b/src/funcs/webhooksGet.ts deleted file mode 100644 index 3939f4a1..00000000 --- a/src/funcs/webhooksGet.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Get a webhook - * - * @remarks - * Retrieve a specific webhook - */ -export async function webhooksGet( - client: FirehydrantTypescriptSDKCore, - request: operations.GetWebhookRequest, - options?: RequestOptions, -): Promise< - Result< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.GetWebhookRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - webhook_id: encodeSimple("webhook_id", payload.webhook_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/webhooks/{webhook_id}")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "getWebhook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.WebhooksEntitiesWebhookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/webhooksGetWebhook.ts b/src/funcs/webhooksGetWebhook.ts new file mode 100644 index 00000000..785c36ef --- /dev/null +++ b/src/funcs/webhooksGetWebhook.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get a webhook + * + * @remarks + * Retrieve a specific webhook + */ +export function webhooksGetWebhook( + client: FirehydrantCore, + request: operations.GetWebhookRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.GetWebhookRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetWebhookRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + webhook_id: encodeSimple("webhook_id", payload.webhook_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/webhooks/{webhook_id}")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "get_webhook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.WebhooksEntitiesWebhookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/webhooksList.ts b/src/funcs/webhooksList.ts deleted file mode 100644 index 77795917..00000000 --- a/src/funcs/webhooksList.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List webhooks - * - * @remarks - * Lists webhooks - */ -export async function webhooksList( - client: FirehydrantTypescriptSDKCore, - request: operations.ListWebhooksRequest, - options?: RequestOptions, -): Promise< - Result< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.ListWebhooksRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/webhooks")(); - - const query = encodeFormQuery({ - "page": payload.page, - "per_page": payload.per_page, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listWebhooks", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.WebhooksEntitiesWebhookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/webhooksListDeliveries.ts b/src/funcs/webhooksListDeliveries.ts deleted file mode 100644 index afdea9a4..00000000 --- a/src/funcs/webhooksListDeliveries.ts +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * List webhook deliveries - */ -export async function webhooksListDeliveries( - client: FirehydrantTypescriptSDKCore, - request: operations.ListWebhookDeliveriesRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.ListWebhookDeliveriesRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const pathParams = { - webhook_id: encodeSimple("webhook_id", payload.webhook_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/webhooks/{webhook_id}/deliveries")(pathParams); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "listWebhookDeliveries", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/webhooksListWebhookDeliveries.ts b/src/funcs/webhooksListWebhookDeliveries.ts new file mode 100644 index 00000000..5feb85c1 --- /dev/null +++ b/src/funcs/webhooksListWebhookDeliveries.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { FirehydrantCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List webhook deliveries + * + * @remarks + * Get webhook deliveries + */ +export function webhooksListWebhookDeliveries( + client: FirehydrantCore, + request: operations.ListWebhookDeliveriesRequest, + options?: RequestOptions, +): APIPromise< + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListWebhookDeliveriesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ListWebhookDeliveriesRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + webhook_id: encodeSimple("webhook_id", payload.webhook_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/webhooks/{webhook_id}/deliveries")(pathParams); + + const headers = new Headers(compactMap({ + Accept: "*/*", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_webhook_deliveries", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(200, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/webhooksListWebhooks.ts b/src/funcs/webhooksListWebhooks.ts new file mode 100644 index 00000000..5287f656 --- /dev/null +++ b/src/funcs/webhooksListWebhooks.ts @@ -0,0 +1,160 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List webhooks + * + * @remarks + * Lists webhooks + */ +export function webhooksListWebhooks( + client: FirehydrantCore, + request: operations.ListWebhooksRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.ListWebhooksRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ListWebhooksRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/v1/webhooks")(); + + const query = encodeFormQuery({ + "page": payload.page, + "per_page": payload.per_page, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "list_webhooks", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.WebhooksEntitiesWebhookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/webhooksUpdate.ts b/src/funcs/webhooksUpdate.ts deleted file mode 100644 index f494339e..00000000 --- a/src/funcs/webhooksUpdate.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeJSON, encodeSimple } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import * as components from "../models/components/index.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Update a webhook - * - * @remarks - * Update a specific webhook - */ -export async function webhooksUpdate( - client: FirehydrantTypescriptSDKCore, - request: operations.UpdateWebhookRequest, - options?: RequestOptions, -): Promise< - Result< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => operations.UpdateWebhookRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = encodeJSON("body", payload.patchV1WebhooksWebhookId, { - explode: true, - }); - - const pathParams = { - webhook_id: encodeSimple("webhook_id", payload.webhook_id, { - explode: false, - charEncoding: "percent", - }), - }; - - const path = pathToFunc("/v1/webhooks/{webhook_id}")(pathParams); - - const headers = new Headers({ - "Content-Type": "application/json", - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "updateWebhook", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "PATCH", - baseURL: options?.serverURL, - path: path, - headers: headers, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - components.WebhooksEntitiesWebhookEntity, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.json(200, components.WebhooksEntitiesWebhookEntity$inboundSchema), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/funcs/webhooksUpdateWebhook.ts b/src/funcs/webhooksUpdateWebhook.ts new file mode 100644 index 00000000..cb228675 --- /dev/null +++ b/src/funcs/webhooksUpdateWebhook.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { FirehydrantCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Update a webhook + * + * @remarks + * Update a specific webhook + */ +export function webhooksUpdateWebhook( + client: FirehydrantCore, + request: operations.UpdateWebhookRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: FirehydrantCore, + request: operations.UpdateWebhookRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.UpdateWebhookRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.update_webhook, { explode: true }); + + const pathParams = { + webhook_id: encodeSimple("webhook_id", payload.webhook_id, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/v1/webhooks/{webhook_id}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "update_webhook", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PATCH", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const [result] = await M.match< + components.WebhooksEntitiesWebhookEntity, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, components.WebhooksEntitiesWebhookEntity$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/zendeskSearchTickets.ts b/src/funcs/zendeskSearchTickets.ts deleted file mode 100644 index a7fb8e87..00000000 --- a/src/funcs/zendeskSearchTickets.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { FirehydrantTypescriptSDKCore } from "../core.js"; -import { encodeFormQuery } from "../lib/encodings.js"; -import * as M from "../lib/matchers.js"; -import { safeParse } from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { APIError } from "../models/errors/apierror.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../models/errors/httpclienterrors.js"; -import * as errors from "../models/errors/index.js"; -import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; -import * as operations from "../models/operations/index.js"; -import { Result } from "../types/fp.js"; - -/** - * Search for Zendesk tickets - */ -export async function zendeskSearchTickets( - client: FirehydrantTypescriptSDKCore, - request: operations.SearchZendeskTicketsRequest, - options?: RequestOptions, -): Promise< - Result< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const parsed = safeParse( - request, - (value) => - operations.SearchZendeskTicketsRequest$outboundSchema.parse(value), - "Input validation failed", - ); - if (!parsed.ok) { - return parsed; - } - const payload = parsed.value; - const body = null; - - const path = pathToFunc("/v1/integrations/zendesk/search")(); - - const query = encodeFormQuery({ - "include": payload.include, - "ticket_id": payload.ticket_id, - }); - - const headers = new Headers({ - Accept: "application/json", - }); - - const secConfig = await extractSecurity(client._options.apiKey); - const securityInput = secConfig == null ? {} : { apiKey: secConfig }; - const requestSecurity = resolveGlobalSecurity(securityInput); - - const context = { - operationID: "searchZendeskTickets", - oAuth2Scopes: [], - - resolvedSecurity: requestSecurity, - - securitySource: client._options.apiKey, - retryConfig: options?.retries - || client._options.retryConfig - || { strategy: "none" }, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }; - - const requestRes = client._createRequest(context, { - security: requestSecurity, - method: "GET", - baseURL: options?.serverURL, - path: path, - headers: headers, - query: query, - body: body, - timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, - }, options); - if (!requestRes.ok) { - return requestRes; - } - const req = requestRes.value; - - const doResult = await client._do(req, { - context, - errorCodes: [ - "400", - "401", - "403", - "404", - "407", - "408", - "413", - "414", - "415", - "422", - "429", - "431", - "4XX", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "510", - "511", - "5XX", - ], - retryConfig: context.retryConfig, - retryCodes: context.retryCodes, - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields = { - HttpMeta: { Response: response, Request: req }, - }; - - const [result] = await M.match< - void, - | errors.BadRequest - | errors.Unauthorized - | errors.NotFound - | errors.Timeout - | errors.RateLimited - | errors.InternalServerError - | APIError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - M.nil(200, z.void()), - M.jsonErr( - [400, 413, 414, 415, 422, 431, 510], - errors.BadRequest$inboundSchema, - ), - M.jsonErr([401, 403, 407, 511], errors.Unauthorized$inboundSchema), - M.jsonErr([404, 501, 505], errors.NotFound$inboundSchema), - M.jsonErr([408, 504], errors.Timeout$inboundSchema), - M.jsonErr(429, errors.RateLimited$inboundSchema), - M.jsonErr( - [500, 502, 503, 506, 507, 508], - errors.InternalServerError$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); - if (!result.ok) { - return result; - } - - return result; -} diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 8a27c659..1d56c6f2 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -7,8 +7,9 @@ import { RetryConfig } from "../lib/retries.js"; import { SecurityState } from "../lib/security.js"; export type HookContext = { + baseURL: string | URL; operationID: string; - oAuth2Scopes?: string[]; + oAuth2Scopes: string[] | null; securitySource?: any | (() => Promise); retryConfig: RetryConfig; resolvedSecurity: SecurityState | null; diff --git a/src/lib/config.ts b/src/lib/config.ts index 030b6e1f..d5994ed1 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -15,17 +15,17 @@ export const ServerList = [ ] as const; export type SDKOptions = { - apiKey?: string | (() => Promise); + apiKey?: string | (() => Promise) | undefined; httpClient?: HTTPClient; /** * Allows overriding the default server used by the SDK */ - serverIdx?: number; + serverIdx?: number | undefined; /** * Allows overriding the default server URL used by the SDK */ - serverURL?: string; + serverURL?: string | undefined; /** * Allows overriding the default retry config used by the SDK */ @@ -54,8 +54,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.0.11", - genVersion: "2.488.4", - userAgent: - "speakeasy-sdk/typescript 0.0.11 2.488.4 0.0.1 firehydrant-typescript-sdk", + sdkVersion: "0.1.13", + genVersion: "2.598.22", + userAgent: "speakeasy-sdk/typescript 0.1.13 2.598.22 0.0.1 firehydrant", } as const; diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts index 44fa7284..25c9dcba 100644 --- a/src/lib/encodings.ts +++ b/src/lib/encodings.ts @@ -16,12 +16,16 @@ export function encodeMatrix( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -29,21 +33,25 @@ export function encodeMatrix( pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + const keyPrefix = encodeString(pk); tmp = `${keyPrefix}=${encValue}`; // trim trailing '=' if value was empty @@ -66,36 +74,40 @@ export function encodeLabel( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let encValue = ""; + let encValue: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `.${encodeString(k)}.${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { const k = options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; encValue = `${k}${encodeValue(pv)}`; } - out += `.${encValue}`; + out += encValue == null ? "" : `.${encValue}`; }); return out; @@ -105,7 +117,7 @@ type FormEncoder = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) => string; +) => string | undefined; function formEncoder(sep: string): FormEncoder { return ( @@ -118,6 +130,10 @@ function formEncoder(sep: string): FormEncoder { ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -128,20 +144,24 @@ function formEncoder(sep: string): FormEncoder { pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(encodedSep); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(encodedSep); } else if (isPlainObject(pv)) { encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; - }).join(encodedSep); + })?.join(encodedSep); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + tmp = `${encodeString(pk)}=${encValue}`; // If we end up with the nothing then skip forward @@ -180,7 +200,7 @@ export function encodeBodyForm( let tmp = ""; let encValue = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { encValue = JSON.stringify(pv, jsonReplacer); @@ -207,14 +227,14 @@ export function encodeDeepObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } if (!isPlainObject(value)) { throw new EncodingError( - `Value of parameter '${key}' which uses deepObject encoding must be an object`, + `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, ); } @@ -225,9 +245,9 @@ export function encodeDeepObjectObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } let out = ""; @@ -241,7 +261,7 @@ export function encodeDeepObjectObject( } Object.entries(value).forEach(([ck, cv]) => { - if (cv === undefined) { + if (cv == null) { return; } @@ -250,19 +270,17 @@ export function encodeDeepObjectObject( if (isPlainObject(cv)) { const objOut = encodeDeepObjectObject(pk, cv, options); - out += `&${objOut}`; + out += objOut == null ? "" : `&${objOut}`; return; } const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; - let encoded = ""; - - encoded = mapDefined(pairs, (v) => { + const encoded = mapDefined(pairs, (v) => { return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; - }).join("&"); + })?.join("&"); - out += `&${encoded}`; + out += encoded == null ? "" : `&${encoded}`; }); return out.slice(1); @@ -272,9 +290,9 @@ export function encodeJSON( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (typeof value === "undefined") { - return ""; + return; } const encodeString = (v: string) => { @@ -290,40 +308,39 @@ export const encodeSimple = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string => { +): string | undefined => { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let tmp = ""; + let tmp: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - tmp = tmp.slice(1); + }); + tmp = mapped?.join("").slice(1); } else { const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; tmp = `${k}${encodeValue(pv)}`; } - // If we end up with the nothing then skip forward - if (!tmp) { - return; - } - - out += `,${tmp}`; + out += tmp ? `,${tmp}` : ""; }); return out.slice(1); @@ -341,9 +358,7 @@ function explode(key: string, value: unknown): [string, unknown][] { } function serializeValue(value: unknown): string { - if (value === null) { - return "null"; - } else if (typeof value === "undefined") { + if (value == null) { return ""; } else if (value instanceof Date) { return value.toISOString(); @@ -364,14 +379,14 @@ function jsonReplacer(_: string, value: unknown): unknown { } } -function mapDefined(inp: T[], mapper: (v: T) => R): R[] { - return inp.reduce((acc, v) => { - if (v === undefined) { +function mapDefined(inp: T[], mapper: (v: T) => R): R[] | null { + const res = inp.reduce((acc, v) => { + if (v == null) { return acc; } const m = mapper(v); - if (m === undefined) { + if (m == null) { return acc; } @@ -379,30 +394,32 @@ function mapDefined(inp: T[], mapper: (v: T) => R): R[] { return acc; }, []); + + return res.length ? res : null; } function mapDefinedEntries( inp: Iterable<[K, V]>, mapper: (v: [K, V]) => R, -): R[] { +): R[] | null { const acc: R[] = []; for (const [k, v] of inp) { - if (v === undefined) { + if (v == null) { continue; } const m = mapper([k, v]); - if (m === undefined) { + if (m == null) { continue; } acc.push(m); } - return acc; + return acc.length ? acc : null; } -export function queryJoin(...args: string[]): string { +export function queryJoin(...args: (string | undefined)[]): string { return args.filter(Boolean).join("&"); } @@ -415,7 +432,7 @@ type QueryEncoder = ( key: string, value: unknown, options?: QueryEncoderOptions, -) => string; +) => string | undefined; type BulkQueryEncoder = ( values: Record, @@ -447,3 +464,20 @@ export const encodeFormQuery = queryEncoder(encodeForm); export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); + +export function appendForm( + fd: FormData, + key: string, + value: unknown, + fileName?: string, +): void { + if (value == null) { + return; + } else if (value instanceof Blob && fileName) { + fd.append(key, value, fileName); + } else if (value instanceof Blob) { + fd.append(key, value); + } else { + fd.append(key, String(value)); + } +} diff --git a/src/lib/env.ts b/src/lib/env.ts index a76ad9af..8d5cc821 100644 --- a/src/lib/env.ts +++ b/src/lib/env.ts @@ -7,15 +7,15 @@ import { dlv } from "./dlv.js"; import * as z from "zod"; export interface Env { - FIREHYDRANTTYPESCRIPTSDK_API_KEY?: string | undefined; + FIREHYDRANT_API_KEY?: string | undefined; - FIREHYDRANTTYPESCRIPTSDK_DEBUG?: boolean | undefined; + FIREHYDRANT_DEBUG?: boolean | undefined; } export const envSchema: z.ZodType = z.object({ - FIREHYDRANTTYPESCRIPTSDK_API_KEY: z.string().optional(), + FIREHYDRANT_API_KEY: z.string().optional(), - FIREHYDRANTTYPESCRIPTSDK_DEBUG: z.coerce.boolean().optional(), + FIREHYDRANT_DEBUG: z.coerce.boolean().optional(), }); let envMemo: Env | undefined = undefined; diff --git a/src/lib/files.ts b/src/lib/files.ts index 19e08041..59d15f09 100644 --- a/src/lib/files.ts +++ b/src/lib/files.ts @@ -36,5 +36,5 @@ export async function readableStreamToArrayBuffer( offset += chunk.length; } - return concatenatedChunks.buffer; + return concatenatedChunks.buffer as ArrayBuffer; } diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index 65858ac9..17151be7 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -10,6 +10,7 @@ import { isPlainObject } from "./is-plain-object.js"; import { safeParse } from "./schemas.js"; export type Encoding = + | "jsonl" | "json" | "text" | "bytes" @@ -19,6 +20,7 @@ export type Encoding = | "fail"; const DEFAULT_CONTENT_TYPES: Record = { + jsonl: "application/jsonl", json: "application/json", text: "text/plain", bytes: "application/octet-stream", @@ -72,6 +74,21 @@ export function json( return { ...options, enc: "json", codes, schema }; } +export function jsonl( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "jsonl", codes, schema }; +} + +export function jsonlErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "jsonl", codes, schema }; +} export function textErr( codes: StatusCodePredicate, schema: Schema, @@ -204,6 +221,9 @@ export function match( case "json": raw = await response.json(); break; + case "jsonl": + raw = response.body; + break; case "bytes": raw = new Uint8Array(await response.arrayBuffer()); break; diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts index 1dc4ee43..d21f1dc4 100644 --- a/src/lib/primitives.ts +++ b/src/lib/primitives.ts @@ -120,3 +120,31 @@ export function abortSignalAny(signals: AbortSignal[]): AbortSignal { return result; } + +export function compactMap( + values: Record, +): Record { + const out: Record = {}; + + for (const [k, v] of Object.entries(values)) { + if (typeof v !== "undefined") { + out[k] = v; + } + } + + return out; +} + +export function allRequired>( + v: V, +): + | { + [K in keyof V]: NonNullable; + } + | undefined { + if (Object.values(v).every((x) => x == null)) { + return void 0; + } + + return v as ReturnType>; +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts index 93ebc8de..e3ce9aba 100644 --- a/src/lib/retries.ts +++ b/src/lib/retries.ts @@ -158,7 +158,6 @@ async function retryBackoff( const start = Date.now(); let x = 0; - // eslint-disable-next-line no-constant-condition while (true) { try { const res = await fn(); diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index f3856dcb..0e340b7e 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -57,6 +57,7 @@ export function collectExtraKeys< >( obj: ZodObject, extrasKey: K, + optional: boolean, ): ZodEffects< typeof obj, & output> @@ -81,6 +82,10 @@ export function collectExtraKeys< delete val[key]; } + if (optional && Object.keys(extras).length === 0) { + return val; + } + return { ...val, [extrasKey]: extras }; }); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 68f52bf6..c7c4bdb3 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -47,12 +47,14 @@ export type RequestOptions = { */ serverURL?: string | URL; /** + * @deprecated `fetchOptions` has been flattened into `RequestOptions`. + * * Sets various request options on the `fetch` call made by an SDK method. * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} */ fetchOptions?: Omit; -}; +} & Omit; type RequestConfig = { method: string; @@ -79,7 +81,7 @@ export class ClientSDK { readonly #httpClient: HTTPClient; readonly #hooks: SDKHooks; readonly #logger?: Logger | undefined; - protected readonly _baseURL: URL | null; + public readonly _baseURL: URL | null; public readonly _options: SDKOptions & { hooks?: SDKHooks }; constructor(options: SDKOptions = {}) { @@ -107,7 +109,7 @@ export class ClientSDK { this._baseURL = baseURL; this.#httpClient = client; this.#logger = options.debugLogger; - if (!this.#logger && env().FIREHYDRANTTYPESCRIPTSDK_DEBUG) { + if (!this.#logger && env().FIREHYDRANT_DEBUG) { this.#logger = console; } } @@ -135,7 +137,10 @@ export class ClientSDK { const secQuery: string[] = []; for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + const q = encodeForm(k, v, { charEncoding: "percent" }); + if (typeof q !== "undefined") { + secQuery.push(q); + } } if (secQuery.length) { finalQuery += `&${secQuery.join("&")}`; @@ -169,7 +174,9 @@ export class ClientSDK { cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; headers.set("cookie", cookie); - const userHeaders = new Headers(options?.fetchOptions?.headers); + const userHeaders = new Headers( + options?.headers ?? options?.fetchOptions?.headers, + ); for (const [k, v] of userHeaders) { headers.set(k, v); } @@ -180,26 +187,17 @@ export class ClientSDK { headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); } - let fetchOptions = options?.fetchOptions; + const fetchOptions: Omit = { + ...options?.fetchOptions, + ...options, + }; if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - if (!fetchOptions) { - fetchOptions = { signal: timeoutSignal }; - } else { - fetchOptions.signal = timeoutSignal; - } + fetchOptions.signal = timeoutSignal; } if (conf.body instanceof ReadableStream) { - if (!fetchOptions) { - fetchOptions = { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - duplex: "half", - }; - } else { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - fetchOptions.duplex = "half"; - } + Object.assign(fetchOptions, { duplex: "half" }); } let input; @@ -304,7 +302,9 @@ export class ClientSDK { } } -const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; +const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/; +const jsonlLikeContentTypeRE = + /(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/; async function logRequest(logger: Logger | undefined, req: Request) { if (!logger) { return; @@ -370,9 +370,13 @@ async function logResponse( logger.group("Body:"); switch (true) { case matchContentType(res, "application/json") - || jsonLikeContentTypeRE.test(ct): + || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct): logger.log(await res.clone().json()); break; + case matchContentType(res, "application/jsonl") + || jsonlLikeContentTypeRE.test(ct): + logger.log(await res.clone().text()); + break; case matchContentType(res, "text/event-stream"): logger.log(`<${contentType}>`); break; diff --git a/src/lib/security.ts b/src/lib/security.ts index faf2d0b6..89554d63 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -86,7 +86,9 @@ type SecurityInputOAuth2ClientCredentials = { value: | { clientID?: string | undefined; clientSecret?: string | undefined } | null + | string | undefined; + fieldName?: string; }; type SecurityInputOAuth2PasswordCredentials = { @@ -95,13 +97,13 @@ type SecurityInputOAuth2PasswordCredentials = { | string | null | undefined; - fieldName: string; + fieldName?: string; }; type SecurityInputCustom = { type: "http:custom"; value: any | null | undefined; - fieldName: string; + fieldName?: string; }; export type SecurityInput = @@ -138,6 +140,9 @@ export function resolveSecurity( typeof o.value === "string" && !!o.value ); } else if (o.type === "oauth2:client_credentials") { + if (typeof o.value == "string") { + return !!o.value; + } return o.value.clientID != null || o.value.clientSecret != null; } else if (typeof o.value === "string") { return !!o.value; @@ -226,7 +231,9 @@ function applyBearer( value = `Bearer ${value}`; } - state.headers[spec.fieldName] = value; + if (spec.fieldName !== undefined) { + state.headers[spec.fieldName] = value; + } } export function resolveGlobalSecurity( @@ -237,7 +244,7 @@ export function resolveGlobalSecurity( { fieldName: "Authorization", type: "apiKey:header", - value: security?.apiKey ?? env().FIREHYDRANTTYPESCRIPTSDK_API_KEY, + value: security?.apiKey ?? env().FIREHYDRANT_API_KEY, }, ], ); diff --git a/src/mcp-server/build.mts b/src/mcp-server/build.mts new file mode 100644 index 00000000..a04739f2 --- /dev/null +++ b/src/mcp-server/build.mts @@ -0,0 +1,16 @@ +/// + +import { build } from "bun"; + +const entrypoint = "./src/mcp-server/mcp-server.ts"; + +await build({ + entrypoints: [entrypoint], + outdir: "./bin", + sourcemap: "linked", + target: "node", + format: "esm", + minify: false, + throw: true, + banner: "#!/usr/bin/env node", +}); diff --git a/src/mcp-server/cli.ts b/src/mcp-server/cli.ts new file mode 100644 index 00000000..b878d8de --- /dev/null +++ b/src/mcp-server/cli.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CommandContext, StricliProcess } from "@stricli/core"; + +export interface LocalContext extends CommandContext { + readonly process: StricliProcess; +} + +export function buildContext(process: NodeJS.Process): LocalContext { + return { process: process as StricliProcess }; +} diff --git a/src/mcp-server/cli/start/command.ts b/src/mcp-server/cli/start/command.ts new file mode 100644 index 00000000..854c7a17 --- /dev/null +++ b/src/mcp-server/cli/start/command.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { buildCommand } from "@stricli/core"; +import { numberParser } from "@stricli/core"; +import * as z from "zod"; +import { consoleLoggerLevels } from "../../console-logger.js"; +import { mcpScopes } from "../../scopes.js"; + +export const startCommand = buildCommand({ + loader: async () => { + const { main } = await import("./impl.js"); + return main; + }, + parameters: { + flags: { + transport: { + kind: "enum", + brief: "The transport to use for communicating with the server", + default: "stdio", + values: ["stdio", "sse"], + }, + port: { + kind: "parsed", + brief: "The port to use when the SSE transport is enabled", + default: "2718", + parse: (val: string) => + z.coerce.number().int().gte(0).lt(65536).parse(val), + }, + tool: { + kind: "parsed", + brief: "Specify tools to mount on the server", + optional: true, + variadic: true, + parse: (value) => { + return z.string().parse(value); + }, + }, + ...(mcpScopes.length + ? { + scope: { + kind: "enum", + brief: + "Mount tools/resources that match given scope (repeatable flag)", + values: mcpScopes, + variadic: true, + optional: true, + }, + } + : {}), + "api-key": { + kind: "parsed", + brief: "Sets the apiKey auth field for the API", + optional: true, + parse: (value) => { + return z.string().parse(value); + }, + }, + "server-url": { + kind: "parsed", + brief: "Overrides the default server URL used by the SDK", + optional: true, + parse: (value) => new URL(value).toString(), + }, + "server-index": { + kind: "parsed", + brief: "Selects a predefined server used by the SDK", + optional: true, + parse: numberParser, + }, + "log-level": { + kind: "enum", + brief: "The log level to use for the server", + default: "info", + values: consoleLoggerLevels, + }, + env: { + kind: "parsed", + brief: "Environment variables made available to the server", + optional: true, + variadic: true, + parse: (val: string) => { + const sepIdx = val.indexOf("="); + if (sepIdx === -1) { + throw new Error("Invalid environment variable format"); + } + + const key = val.slice(0, sepIdx); + const value = val.slice(sepIdx + 1); + + return [ + z.string().nonempty({ + message: "Environment variable key must be a non-empty string", + }).parse(key), + z.string().nonempty({ + message: "Environment variable value must be a non-empty string", + }).parse(value), + ] satisfies [string, string]; + }, + }, + }, + }, + docs: { + brief: "Run the Model Context Protocol server", + }, +}); diff --git a/src/mcp-server/cli/start/impl.ts b/src/mcp-server/cli/start/impl.ts new file mode 100644 index 00000000..4c82549b --- /dev/null +++ b/src/mcp-server/cli/start/impl.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"; +import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; +import express from "express"; +import { SDKOptions } from "../../../lib/config.js"; +import { LocalContext } from "../../cli.js"; +import { + ConsoleLoggerLevel, + createConsoleLogger, +} from "../../console-logger.js"; +import { MCPScope } from "../../scopes.js"; +import { createMCPServer } from "../../server.js"; + +interface StartCommandFlags { + readonly transport: "stdio" | "sse"; + readonly port: number; + readonly tool?: string[]; + readonly scope?: MCPScope[]; + readonly "api-key"?: string | undefined; + readonly "server-url"?: string; + readonly "server-index"?: SDKOptions["serverIdx"]; + readonly "log-level": ConsoleLoggerLevel; + readonly env?: [string, string][]; +} + +export async function main(this: LocalContext, flags: StartCommandFlags) { + flags.env?.forEach(([key, value]) => { + process.env[key] = value; + }); + + switch (flags.transport) { + case "stdio": + await startStdio(flags); + break; + case "sse": + await startSSE(flags); + break; + default: + throw new Error(`Invalid transport: ${flags.transport}`); + } +} + +async function startStdio(flags: StartCommandFlags) { + const logger = createConsoleLogger(flags["log-level"]); + const transport = new StdioServerTransport(); + const server = createMCPServer({ + logger, + allowedTools: flags.tool, + scopes: flags.scope, + ...{ apiKey: flags["api-key"] }, + serverURL: flags["server-url"], + serverIdx: flags["server-index"], + }); + await server.connect(transport); + + const abort = async () => { + await server.close(); + process.exit(0); + }; + process.on("SIGTERM", abort); + process.on("SIGINT", abort); +} + +async function startSSE(flags: StartCommandFlags) { + const logger = createConsoleLogger(flags["log-level"]); + const app = express(); + const mcpServer = createMCPServer({ + logger, + allowedTools: flags.tool, + scopes: flags.scope, + ...{ apiKey: flags["api-key"] }, + serverURL: flags["server-url"], + serverIdx: flags["server-index"], + }); + let transport: SSEServerTransport | undefined; + const controller = new AbortController(); + + app.get("/sse", async (_req, res) => { + transport = new SSEServerTransport("/message", res); + + await mcpServer.connect(transport); + + mcpServer.server.onclose = async () => { + res.end(); + }; + }); + + app.post("/message", async (req, res) => { + if (!transport) { + throw new Error("Server transport not initialized"); + } + + await transport.handlePostMessage(req, res); + }); + + const httpServer = app.listen(flags.port, "0.0.0.0", () => { + const ha = httpServer.address(); + const host = typeof ha === "string" ? ha : `${ha?.address}:${ha?.port}`; + logger.info("MCP HTTP server started", { host }); + }); + + let closing = false; + controller.signal.addEventListener("abort", async () => { + if (closing) { + logger.info("Received second signal. Forcing shutdown."); + process.exit(1); + } + closing = true; + + logger.info("Shutting down MCP server"); + + await mcpServer.close(); + + logger.info("Shutting down HTTP server"); + + const timer = setTimeout(() => { + logger.info("Forcing shutdown"); + process.exit(1); + }, 5000); + + httpServer.close(() => { + clearTimeout(timer); + logger.info("Graceful shutdown complete"); + process.exit(0); + }); + }); + + const abort = () => controller.abort(); + process.on("SIGTERM", abort); + process.on("SIGINT", abort); +} diff --git a/src/mcp-server/console-logger.ts b/src/mcp-server/console-logger.ts new file mode 100644 index 00000000..d65a295b --- /dev/null +++ b/src/mcp-server/console-logger.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export const consoleLoggerLevels = [ + "debug", + "warning", + "info", + "error", +] as const; + +export type ConsoleLoggerLevel = (typeof consoleLoggerLevels)[number]; + +export type ConsoleLogger = { + [key in ConsoleLoggerLevel]: ( + message: string, + data?: Record, + ) => void; +}; + +export function createConsoleLogger(level: ConsoleLoggerLevel): ConsoleLogger { + const min = consoleLoggerLevels.indexOf(level); + const noop = () => {}; + + const logger: ConsoleLogger = { + debug: noop, + warning: noop, + info: noop, + error: noop, + }; + + return consoleLoggerLevels.reduce((logger, level, i) => { + if (i < min) { + return logger; + } + + logger[level] = log.bind(null, level); + + return logger; + }, logger); +} + +function log( + level: ConsoleLoggerLevel, + message: string, + data?: Record, +) { + let line = ""; + const allData = [{ msg: message, l: level }, data]; + + for (const ctx of allData) { + for (const [key, value] of Object.entries(ctx || {})) { + if (value == null) { + line += ` ${key}=<${value}>`; + } else if (typeof value === "function") { + line += ` ${key}=`; + } else if (typeof value === "symbol") { + line += ` ${key}=${value.toString()}`; + } else if (typeof value === "string") { + const v = value.search(/\s/g) >= 0 ? JSON.stringify(value) : value; + line += ` ${key}=${v}`; + } else if (typeof value !== "object") { + line += ` ${key}=${value}`; + } else { + line += ` ${key}="${JSON.stringify(value)}"`; + } + } + } + + console.error(line); +} diff --git a/src/mcp-server/extensions.ts b/src/mcp-server/extensions.ts new file mode 100644 index 00000000..7aab2809 --- /dev/null +++ b/src/mcp-server/extensions.ts @@ -0,0 +1,17 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ZodRawShape } from "zod"; +import { PromptArgsRawShape, PromptDefinition } from "./prompts.js"; +import { ResourceDefinition, ResourceTemplateDefinition } from "./resources.js"; +import { ToolDefinition } from "./tools.js"; + +export type Register = { + tool: (def: ToolDefinition) => void; + resource: (def: ResourceDefinition) => void; + resourceTemplate: (def: ResourceTemplateDefinition) => void; + prompt: ( + prompt: PromptDefinition, + ) => void; +}; diff --git a/src/mcp-server/mcp-server.ts b/src/mcp-server/mcp-server.ts new file mode 100644 index 00000000..4d6bef82 --- /dev/null +++ b/src/mcp-server/mcp-server.ts @@ -0,0 +1,26 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { buildApplication, buildRouteMap, run } from "@stricli/core"; +import process from "node:process"; +import { buildContext } from "./cli.js"; +import { startCommand } from "./cli/start/command.js"; + +const routes = buildRouteMap({ + routes: { + start: startCommand, + }, + docs: { + brief: "MCP server CLI", + }, +}); + +export const app = buildApplication(routes, { + name: "mcp", + versionInfo: { + currentVersion: "0.1.13", + }, +}); + +run(app, process.argv.slice(2), buildContext(process)); diff --git a/src/mcp-server/prompts.ts b/src/mcp-server/prompts.ts new file mode 100644 index 00000000..ee5c7489 --- /dev/null +++ b/src/mcp-server/prompts.ts @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; +import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; +import { GetPromptResult } from "@modelcontextprotocol/sdk/types.js"; +import { + objectOutputType, + ZodOptional, + ZodType, + ZodTypeAny, + ZodTypeDef, +} from "zod"; +import { FirehydrantCore } from "../core.js"; +import { ConsoleLogger } from "./console-logger.js"; +import { MCPScope } from "./scopes.js"; + +// '@modelcontextprotocol/sdk' currently does not export this type +export type PromptArgsRawShape = { + [k: string]: + | ZodType + | ZodOptional>; +}; + +export type PromptDefinition< + Args extends undefined | PromptArgsRawShape = undefined, +> = Args extends PromptArgsRawShape ? { + name: string; + description?: string; + scopes?: MCPScope[]; + args: Args; + prompt: ( + client: FirehydrantCore, + args: objectOutputType, + extra: RequestHandlerExtra, + ) => GetPromptResult | Promise; + } + : { + name: string; + description?: string; + scopes?: MCPScope[]; + args?: undefined; + prompt: ( + client: FirehydrantCore, + extra: RequestHandlerExtra, + ) => GetPromptResult | Promise; + }; + +// Optional function to assist with formatting prompt results +export async function formatResult(value: string): Promise { + return { + messages: [ + { + role: "user", + content: { + type: "text", + text: value, + }, + }, + ], + }; +} + +export function createRegisterPrompt( + logger: ConsoleLogger, + server: McpServer, + sdk: FirehydrantCore, + allowedScopes: Set, +): ( + prompt: PromptDefinition, +) => void { + return ( + prompt: PromptDefinition, + ): void => { + const scopes = prompt.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + if (prompt.args) { + if (prompt.description) { + server.prompt( + prompt.name, + prompt.description, + prompt.args, + async (args, ctx) => prompt.prompt(sdk, args, ctx), + ); + } else { + server.prompt( + prompt.name, + prompt.args, + async (args, ctx) => prompt.prompt(sdk, args, ctx), + ); + } + } else { + if (prompt.description) { + server.prompt( + prompt.name, + prompt.description, + async (ctx) => prompt.prompt(sdk, ctx), + ); + } else { + server.prompt(prompt.name, async (ctx) => prompt.prompt(sdk, ctx)); + } + } + + logger.debug("Registered prompt", { name: prompt.name }); + }; +} diff --git a/src/mcp-server/resources.ts b/src/mcp-server/resources.ts new file mode 100644 index 00000000..cbdf6b7e --- /dev/null +++ b/src/mcp-server/resources.ts @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + McpServer, + ResourceMetadata, + ResourceTemplate, +} from "@modelcontextprotocol/sdk/server/mcp.js"; +import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; +import { Variables } from "@modelcontextprotocol/sdk/shared/uriTemplate.js"; +import { ReadResourceResult } from "@modelcontextprotocol/sdk/types.js"; +import { FirehydrantCore } from "../core.js"; +import { ConsoleLogger } from "./console-logger.js"; +import { MCPScope } from "./scopes.js"; +import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js"; + +export type ReadResourceCallback = ( + client: FirehydrantCore, + uri: URL, + extra: RequestHandlerExtra, +) => ReadResourceResult | Promise; + +export type ResourceDefinition = { + name: string; + description?: string; + metadata?: ResourceMetadata; + scopes?: MCPScope[]; + resource: string; + read: ReadResourceCallback; +}; + +export type ReadResourceTemplateCallback = ( + client: FirehydrantCore, + uri: URL, + vars: Variables, + extra: RequestHandlerExtra, +) => ReadResourceResult | Promise; + +export type ResourceTemplateDefinition = { + name: string; + description: string; + metadata?: ResourceMetadata; + scopes?: MCPScope[]; + resource: ResourceTemplate; + read: ReadResourceTemplateCallback; +}; + +// Optional function to assist with formatting resource results +export async function formatResult( + value: unknown, + uri: URL, + init: { mimeType?: string | undefined; response?: Response | undefined }, +): Promise { + if (typeof value === "undefined") { + return { contents: [] }; + } + + let contents: ReadResourceResult["contents"] = []; + + const mimeType = init.mimeType ?? init.response?.headers.get("content-type") + ?? ""; + + if (mimeType.search(/\bjson\b/g) !== -1) { + contents = [{ uri: uri.toString(), mimeType, text: JSON.stringify(value) }]; + } else if ( + mimeType.startsWith("text/event-stream") + && isAsyncIterable(value) + ) { + contents = [ + { + uri: uri.toString(), + mimeType: "application/json", + text: await stringifySSEToJSON(value), + }, + ]; + } else if ( + (mimeType.startsWith("text/") || mimeType.startsWith("application/")) + && typeof value === "string" + ) { + contents = [{ uri: uri.toString(), mimeType, text: value }]; + } else if (isBinaryData(value)) { + const blob = await valueToBase64(value); + contents = blob == null ? [] : [{ uri: uri.toString(), blob, mimeType }]; + } else { + throw new Error(`Unsupported content type: "${mimeType}"`); + } + + return { contents }; +} + +async function stringifySSEToJSON( + value: AsyncIterable, +): Promise { + const payloads = []; + + for await (const chunk of value) { + payloads.push(chunk); + } + + return JSON.stringify(payloads); +} + +export function createRegisterResource( + logger: ConsoleLogger, + server: McpServer, + sdk: FirehydrantCore, + allowedScopes: Set, +): (resource: ResourceDefinition) => void { + return (resource: ResourceDefinition): void => { + const scopes = resource.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + const metadata: ResourceMetadata = { + ...resource.metadata, + description: resource.description, + }; + + server.resource( + resource.name, + resource.resource, + metadata, + async (uri, ctx) => resource.read(sdk, uri, ctx), + ); + + logger.debug("Registered resource", { name: resource.name }); + }; +} + +export function createRegisterResourceTemplate( + logger: ConsoleLogger, + server: McpServer, + sdk: FirehydrantCore, + allowedScopes: Set, +): (resource: ResourceTemplateDefinition) => void { + return (resource: ResourceTemplateDefinition): void => { + const scopes = resource.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + const metadata: ResourceMetadata = { + ...resource.metadata, + description: resource.description, + }; + + server.resource( + resource.name, + resource.resource, + metadata, + async (uri, vars, ctx) => resource.read(sdk, uri, vars, ctx), + ); + + logger.debug("Registered resource template", { name: resource.name }); + }; +} diff --git a/src/mcp-server/scopes.ts b/src/mcp-server/scopes.ts new file mode 100644 index 00000000..c25696d4 --- /dev/null +++ b/src/mcp-server/scopes.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export const mcpScopes = [] as const; + +export type MCPScope = (typeof mcpScopes)[number]; diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts new file mode 100644 index 00000000..c357521a --- /dev/null +++ b/src/mcp-server/server.ts @@ -0,0 +1,875 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; +import { FirehydrantCore } from "../core.js"; +import { SDKOptions } from "../lib/config.js"; +import type { ConsoleLogger } from "./console-logger.js"; +import { createRegisterPrompt } from "./prompts.js"; +import { + createRegisterResource, + createRegisterResourceTemplate, +} from "./resources.js"; +import { MCPScope } from "./scopes.js"; +import { createRegisterTool } from "./tools.js"; +import { tool$accountSettingsGetAiPreferences } from "./tools/accountSettingsGetAiPreferences.js"; +import { tool$accountSettingsGetBootstrap } from "./tools/accountSettingsGetBootstrap.js"; +import { tool$accountSettingsListEntitlements } from "./tools/accountSettingsListEntitlements.js"; +import { tool$accountSettingsPing } from "./tools/accountSettingsPing.js"; +import { tool$accountSettingsPingNoauth } from "./tools/accountSettingsPingNoauth.js"; +import { tool$accountSettingsUpdateAiPreferences } from "./tools/accountSettingsUpdateAiPreferences.js"; +import { tool$alertsCreateIncidentAlert } from "./tools/alertsCreateIncidentAlert.js"; +import { tool$alertsDeleteIncidentAlert } from "./tools/alertsDeleteIncidentAlert.js"; +import { tool$alertsGetAlert } from "./tools/alertsGetAlert.js"; +import { tool$alertsListAlerts } from "./tools/alertsListAlerts.js"; +import { tool$alertsListIncidentAlerts } from "./tools/alertsListIncidentAlerts.js"; +import { tool$alertsListProcessingLogEntries } from "./tools/alertsListProcessingLogEntries.js"; +import { tool$alertsUpdateIncidentAlertPrimary } from "./tools/alertsUpdateIncidentAlertPrimary.js"; +import { tool$audiencesArchiveAudience } from "./tools/audiencesArchiveAudience.js"; +import { tool$audiencesCreateAudience } from "./tools/audiencesCreateAudience.js"; +import { tool$audiencesGenerateAudienceSummary } from "./tools/audiencesGenerateAudienceSummary.js"; +import { tool$audiencesGetAudience } from "./tools/audiencesGetAudience.js"; +import { tool$audiencesGetAudienceSummary } from "./tools/audiencesGetAudienceSummary.js"; +import { tool$audiencesGetMemberDefaultAudience } from "./tools/audiencesGetMemberDefaultAudience.js"; +import { tool$audiencesListAudiences } from "./tools/audiencesListAudiences.js"; +import { tool$audiencesListAudienceSummaries } from "./tools/audiencesListAudienceSummaries.js"; +import { tool$audiencesRestoreAudience } from "./tools/audiencesRestoreAudience.js"; +import { tool$audiencesSetMemberDefaultAudience } from "./tools/audiencesSetMemberDefaultAudience.js"; +import { tool$audiencesUpdateAudience } from "./tools/audiencesUpdateAudience.js"; +import { tool$callRoutesListCallRoutes } from "./tools/callRoutesListCallRoutes.js"; +import { tool$catalogEntriesCreateEnvironment } from "./tools/catalogEntriesCreateEnvironment.js"; +import { tool$catalogEntriesCreateFunctionality } from "./tools/catalogEntriesCreateFunctionality.js"; +import { tool$catalogEntriesCreateService } from "./tools/catalogEntriesCreateService.js"; +import { tool$catalogEntriesCreateServiceChecklistResponse } from "./tools/catalogEntriesCreateServiceChecklistResponse.js"; +import { tool$catalogEntriesCreateServiceDependency } from "./tools/catalogEntriesCreateServiceDependency.js"; +import { tool$catalogEntriesCreateServiceLinks } from "./tools/catalogEntriesCreateServiceLinks.js"; +import { tool$catalogEntriesDeleteEnvironment } from "./tools/catalogEntriesDeleteEnvironment.js"; +import { tool$catalogEntriesDeleteFunctionality } from "./tools/catalogEntriesDeleteFunctionality.js"; +import { tool$catalogEntriesDeleteService } from "./tools/catalogEntriesDeleteService.js"; +import { tool$catalogEntriesDeleteServiceDependency } from "./tools/catalogEntriesDeleteServiceDependency.js"; +import { tool$catalogEntriesDeleteServiceLink } from "./tools/catalogEntriesDeleteServiceLink.js"; +import { tool$catalogEntriesGetEnvironment } from "./tools/catalogEntriesGetEnvironment.js"; +import { tool$catalogEntriesGetFunctionality } from "./tools/catalogEntriesGetFunctionality.js"; +import { tool$catalogEntriesGetService } from "./tools/catalogEntriesGetService.js"; +import { tool$catalogEntriesGetServiceDependencies } from "./tools/catalogEntriesGetServiceDependencies.js"; +import { tool$catalogEntriesGetServiceDependency } from "./tools/catalogEntriesGetServiceDependency.js"; +import { tool$catalogEntriesIngestCatalogData } from "./tools/catalogEntriesIngestCatalogData.js"; +import { tool$catalogEntriesListEnvironments } from "./tools/catalogEntriesListEnvironments.js"; +import { tool$catalogEntriesListFunctionalities } from "./tools/catalogEntriesListFunctionalities.js"; +import { tool$catalogEntriesListFunctionalityServices } from "./tools/catalogEntriesListFunctionalityServices.js"; +import { tool$catalogEntriesListInfrastructures } from "./tools/catalogEntriesListInfrastructures.js"; +import { tool$catalogEntriesListServiceAvailableDownstreamDependencies } from "./tools/catalogEntriesListServiceAvailableDownstreamDependencies.js"; +import { tool$catalogEntriesListServiceAvailableUpstreamDependencies } from "./tools/catalogEntriesListServiceAvailableUpstreamDependencies.js"; +import { tool$catalogEntriesListServices } from "./tools/catalogEntriesListServices.js"; +import { tool$catalogEntriesListUserOwnedServices } from "./tools/catalogEntriesListUserOwnedServices.js"; +import { tool$catalogEntriesRefreshCatalog } from "./tools/catalogEntriesRefreshCatalog.js"; +import { tool$catalogEntriesUpdateEnvironment } from "./tools/catalogEntriesUpdateEnvironment.js"; +import { tool$catalogEntriesUpdateFunctionality } from "./tools/catalogEntriesUpdateFunctionality.js"; +import { tool$catalogEntriesUpdateService } from "./tools/catalogEntriesUpdateService.js"; +import { tool$catalogEntriesUpdateServiceDependency } from "./tools/catalogEntriesUpdateServiceDependency.js"; +import { tool$changesCreateChange } from "./tools/changesCreateChange.js"; +import { tool$changesCreateChangeEvent } from "./tools/changesCreateChangeEvent.js"; +import { tool$changesCreateChangeIdentity } from "./tools/changesCreateChangeIdentity.js"; +import { tool$changesDeleteChange } from "./tools/changesDeleteChange.js"; +import { tool$changesDeleteChangeEvent } from "./tools/changesDeleteChangeEvent.js"; +import { tool$changesDeleteChangeIdentity } from "./tools/changesDeleteChangeIdentity.js"; +import { tool$changesGetChangeEvent } from "./tools/changesGetChangeEvent.js"; +import { tool$changesListChangeEvents } from "./tools/changesListChangeEvents.js"; +import { tool$changesListChangeIdentities } from "./tools/changesListChangeIdentities.js"; +import { tool$changesListChanges } from "./tools/changesListChanges.js"; +import { tool$changesListChangeTypes } from "./tools/changesListChangeTypes.js"; +import { tool$changesUpdateChange } from "./tools/changesUpdateChange.js"; +import { tool$changesUpdateChangeEvent } from "./tools/changesUpdateChangeEvent.js"; +import { tool$changesUpdateChangeIdentity } from "./tools/changesUpdateChangeIdentity.js"; +import { tool$communicationCreateStatusUpdateTemplate } from "./tools/communicationCreateStatusUpdateTemplate.js"; +import { tool$communicationDeleteStatusUpdateTemplate } from "./tools/communicationDeleteStatusUpdateTemplate.js"; +import { tool$communicationGetStatusUpdateTemplate } from "./tools/communicationGetStatusUpdateTemplate.js"; +import { tool$communicationListStatusUpdateTemplates } from "./tools/communicationListStatusUpdateTemplates.js"; +import { tool$communicationUpdateStatusUpdateTemplate } from "./tools/communicationUpdateStatusUpdateTemplate.js"; +import { tool$conversationsCreateComment } from "./tools/conversationsCreateComment.js"; +import { tool$conversationsCreateCommentReaction } from "./tools/conversationsCreateCommentReaction.js"; +import { tool$conversationsDeleteComment } from "./tools/conversationsDeleteComment.js"; +import { tool$conversationsDeleteCommentReaction } from "./tools/conversationsDeleteCommentReaction.js"; +import { tool$conversationsGetComment } from "./tools/conversationsGetComment.js"; +import { tool$conversationsGetVoteStatus } from "./tools/conversationsGetVoteStatus.js"; +import { tool$conversationsListCommentReactions } from "./tools/conversationsListCommentReactions.js"; +import { tool$conversationsListComments } from "./tools/conversationsListComments.js"; +import { tool$conversationsUpdateComment } from "./tools/conversationsUpdateComment.js"; +import { tool$conversationsUpdateVote } from "./tools/conversationsUpdateVote.js"; +import { tool$incidentsBulkUpdateIncidentMilestones } from "./tools/incidentsBulkUpdateIncidentMilestones.js"; +import { tool$incidentsCloseIncident } from "./tools/incidentsCloseIncident.js"; +import { tool$incidentsCreateIncident } from "./tools/incidentsCreateIncident.js"; +import { tool$incidentsCreateIncidentAttachment } from "./tools/incidentsCreateIncidentAttachment.js"; +import { tool$incidentsCreateIncidentChangeEvent } from "./tools/incidentsCreateIncidentChangeEvent.js"; +import { tool$incidentsCreateIncidentChatMessage } from "./tools/incidentsCreateIncidentChatMessage.js"; +import { tool$incidentsCreateIncidentImpact } from "./tools/incidentsCreateIncidentImpact.js"; +import { tool$incidentsCreateIncidentLink } from "./tools/incidentsCreateIncidentLink.js"; +import { tool$incidentsCreateIncidentNote } from "./tools/incidentsCreateIncidentNote.js"; +import { tool$incidentsCreateIncidentRoleAssignment } from "./tools/incidentsCreateIncidentRoleAssignment.js"; +import { tool$incidentsCreateIncidentStatusPage } from "./tools/incidentsCreateIncidentStatusPage.js"; +import { tool$incidentsCreateIncidentTeamAssignment } from "./tools/incidentsCreateIncidentTeamAssignment.js"; +import { tool$incidentsCreateScheduledMaintenance } from "./tools/incidentsCreateScheduledMaintenance.js"; +import { tool$incidentsDeleteIncident } from "./tools/incidentsDeleteIncident.js"; +import { tool$incidentsDeleteIncidentChatMessage } from "./tools/incidentsDeleteIncidentChatMessage.js"; +import { tool$incidentsDeleteIncidentEvent } from "./tools/incidentsDeleteIncidentEvent.js"; +import { tool$incidentsDeleteIncidentImpact } from "./tools/incidentsDeleteIncidentImpact.js"; +import { tool$incidentsDeleteIncidentLink } from "./tools/incidentsDeleteIncidentLink.js"; +import { tool$incidentsDeleteIncidentRoleAssignment } from "./tools/incidentsDeleteIncidentRoleAssignment.js"; +import { tool$incidentsDeleteIncidentTeamAssignment } from "./tools/incidentsDeleteIncidentTeamAssignment.js"; +import { tool$incidentsDeleteScheduledMaintenance } from "./tools/incidentsDeleteScheduledMaintenance.js"; +import { tool$incidentsDeleteTranscriptEntry } from "./tools/incidentsDeleteTranscriptEntry.js"; +import { tool$incidentSettingsCreateCustomFieldDefinition } from "./tools/incidentSettingsCreateCustomFieldDefinition.js"; +import { tool$incidentSettingsCreateIncidentRole } from "./tools/incidentSettingsCreateIncidentRole.js"; +import { tool$incidentSettingsCreateIncidentType } from "./tools/incidentSettingsCreateIncidentType.js"; +import { tool$incidentSettingsCreateLifecycleMeasurementDefinition } from "./tools/incidentSettingsCreateLifecycleMeasurementDefinition.js"; +import { tool$incidentSettingsCreateLifecycleMilestone } from "./tools/incidentSettingsCreateLifecycleMilestone.js"; +import { tool$incidentSettingsCreatePriority } from "./tools/incidentSettingsCreatePriority.js"; +import { tool$incidentSettingsCreateSeverity } from "./tools/incidentSettingsCreateSeverity.js"; +import { tool$incidentSettingsCreateSeverityMatrixCondition } from "./tools/incidentSettingsCreateSeverityMatrixCondition.js"; +import { tool$incidentSettingsCreateSeverityMatrixImpact } from "./tools/incidentSettingsCreateSeverityMatrixImpact.js"; +import { tool$incidentSettingsDeleteCustomFieldDefinition } from "./tools/incidentSettingsDeleteCustomFieldDefinition.js"; +import { tool$incidentSettingsDeleteIncidentRole } from "./tools/incidentSettingsDeleteIncidentRole.js"; +import { tool$incidentSettingsDeleteIncidentType } from "./tools/incidentSettingsDeleteIncidentType.js"; +import { tool$incidentSettingsDeleteLifecycleMeasurementDefinition } from "./tools/incidentSettingsDeleteLifecycleMeasurementDefinition.js"; +import { tool$incidentSettingsDeleteLifecycleMilestone } from "./tools/incidentSettingsDeleteLifecycleMilestone.js"; +import { tool$incidentSettingsDeletePriority } from "./tools/incidentSettingsDeletePriority.js"; +import { tool$incidentSettingsDeleteSeverity } from "./tools/incidentSettingsDeleteSeverity.js"; +import { tool$incidentSettingsDeleteSeverityMatrixCondition } from "./tools/incidentSettingsDeleteSeverityMatrixCondition.js"; +import { tool$incidentSettingsDeleteSeverityMatrixImpact } from "./tools/incidentSettingsDeleteSeverityMatrixImpact.js"; +import { tool$incidentSettingsGetFormConfiguration } from "./tools/incidentSettingsGetFormConfiguration.js"; +import { tool$incidentSettingsGetIncidentRole } from "./tools/incidentSettingsGetIncidentRole.js"; +import { tool$incidentSettingsGetIncidentType } from "./tools/incidentSettingsGetIncidentType.js"; +import { tool$incidentSettingsGetLifecycleMeasurementDefinition } from "./tools/incidentSettingsGetLifecycleMeasurementDefinition.js"; +import { tool$incidentSettingsGetPriority } from "./tools/incidentSettingsGetPriority.js"; +import { tool$incidentSettingsGetSeverity } from "./tools/incidentSettingsGetSeverity.js"; +import { tool$incidentSettingsGetSeverityMatrix } from "./tools/incidentSettingsGetSeverityMatrix.js"; +import { tool$incidentSettingsGetSeverityMatrixCondition } from "./tools/incidentSettingsGetSeverityMatrixCondition.js"; +import { tool$incidentSettingsListCustomFieldDefinitions } from "./tools/incidentSettingsListCustomFieldDefinitions.js"; +import { tool$incidentSettingsListCustomFieldSelectOptions } from "./tools/incidentSettingsListCustomFieldSelectOptions.js"; +import { tool$incidentSettingsListIncidentRoles } from "./tools/incidentSettingsListIncidentRoles.js"; +import { tool$incidentSettingsListIncidentTags } from "./tools/incidentSettingsListIncidentTags.js"; +import { tool$incidentSettingsListIncidentTypes } from "./tools/incidentSettingsListIncidentTypes.js"; +import { tool$incidentSettingsListLifecycleMeasurementDefinitions } from "./tools/incidentSettingsListLifecycleMeasurementDefinitions.js"; +import { tool$incidentSettingsListLifecyclePhases } from "./tools/incidentSettingsListLifecyclePhases.js"; +import { tool$incidentSettingsListPriorities } from "./tools/incidentSettingsListPriorities.js"; +import { tool$incidentSettingsListSeverities } from "./tools/incidentSettingsListSeverities.js"; +import { tool$incidentSettingsListSeverityMatrixConditions } from "./tools/incidentSettingsListSeverityMatrixConditions.js"; +import { tool$incidentSettingsListSeverityMatrixImpacts } from "./tools/incidentSettingsListSeverityMatrixImpacts.js"; +import { tool$incidentSettingsUpdateCustomFieldDefinition } from "./tools/incidentSettingsUpdateCustomFieldDefinition.js"; +import { tool$incidentSettingsUpdateIncidentRole } from "./tools/incidentSettingsUpdateIncidentRole.js"; +import { tool$incidentSettingsUpdateIncidentType } from "./tools/incidentSettingsUpdateIncidentType.js"; +import { tool$incidentSettingsUpdateLifecycleMeasurementDefinition } from "./tools/incidentSettingsUpdateLifecycleMeasurementDefinition.js"; +import { tool$incidentSettingsUpdateLifecycleMilestone } from "./tools/incidentSettingsUpdateLifecycleMilestone.js"; +import { tool$incidentSettingsUpdatePriority } from "./tools/incidentSettingsUpdatePriority.js"; +import { tool$incidentSettingsUpdateSeverity } from "./tools/incidentSettingsUpdateSeverity.js"; +import { tool$incidentSettingsUpdateSeverityMatrix } from "./tools/incidentSettingsUpdateSeverityMatrix.js"; +import { tool$incidentSettingsUpdateSeverityMatrixCondition } from "./tools/incidentSettingsUpdateSeverityMatrixCondition.js"; +import { tool$incidentSettingsUpdateSeverityMatrixImpact } from "./tools/incidentSettingsUpdateSeverityMatrixImpact.js"; +import { tool$incidentSettingsValidateIncidentTags } from "./tools/incidentSettingsValidateIncidentTags.js"; +import { tool$incidentsGetAiIncidentSummaryVoteStatus } from "./tools/incidentsGetAiIncidentSummaryVoteStatus.js"; +import { tool$incidentsGetConferenceBridgeTranslation } from "./tools/incidentsGetConferenceBridgeTranslation.js"; +import { tool$incidentsGetIncident } from "./tools/incidentsGetIncident.js"; +import { tool$incidentsGetIncidentChannel } from "./tools/incidentsGetIncidentChannel.js"; +import { tool$incidentsGetIncidentEvent } from "./tools/incidentsGetIncidentEvent.js"; +import { tool$incidentsGetIncidentRelationships } from "./tools/incidentsGetIncidentRelationships.js"; +import { tool$incidentsGetIncidentUser } from "./tools/incidentsGetIncidentUser.js"; +import { tool$incidentsGetScheduledMaintenance } from "./tools/incidentsGetScheduledMaintenance.js"; +import { tool$incidentsListIncidentAttachments } from "./tools/incidentsListIncidentAttachments.js"; +import { tool$incidentsListIncidentChangeEvents } from "./tools/incidentsListIncidentChangeEvents.js"; +import { tool$incidentsListIncidentConferenceBridges } from "./tools/incidentsListIncidentConferenceBridges.js"; +import { tool$incidentsListIncidentEvents } from "./tools/incidentsListIncidentEvents.js"; +import { tool$incidentsListIncidentImpacts } from "./tools/incidentsListIncidentImpacts.js"; +import { tool$incidentsListIncidentLinks } from "./tools/incidentsListIncidentLinks.js"; +import { tool$incidentsListIncidentMilestones } from "./tools/incidentsListIncidentMilestones.js"; +import { tool$incidentsListIncidentRoleAssignments } from "./tools/incidentsListIncidentRoleAssignments.js"; +import { tool$incidentsListIncidents } from "./tools/incidentsListIncidents.js"; +import { tool$incidentsListIncidentStatusPages } from "./tools/incidentsListIncidentStatusPages.js"; +import { tool$incidentsListScheduledMaintenances } from "./tools/incidentsListScheduledMaintenances.js"; +import { tool$incidentsListSimilarIncidents } from "./tools/incidentsListSimilarIncidents.js"; +import { tool$incidentsListTranscriptEntries } from "./tools/incidentsListTranscriptEntries.js"; +import { tool$incidentsResolveIncident } from "./tools/incidentsResolveIncident.js"; +import { tool$incidentsUnarchiveIncident } from "./tools/incidentsUnarchiveIncident.js"; +import { tool$incidentsUpdateIncident } from "./tools/incidentsUpdateIncident.js"; +import { tool$incidentsUpdateIncidentChangeEvent } from "./tools/incidentsUpdateIncidentChangeEvent.js"; +import { tool$incidentsUpdateIncidentChatMessage } from "./tools/incidentsUpdateIncidentChatMessage.js"; +import { tool$incidentsUpdateIncidentEvent } from "./tools/incidentsUpdateIncidentEvent.js"; +import { tool$incidentsUpdateIncidentImpactPatch } from "./tools/incidentsUpdateIncidentImpactPatch.js"; +import { tool$incidentsUpdateIncidentImpactPut } from "./tools/incidentsUpdateIncidentImpactPut.js"; +import { tool$incidentsUpdateIncidentLink } from "./tools/incidentsUpdateIncidentLink.js"; +import { tool$incidentsUpdateIncidentNote } from "./tools/incidentsUpdateIncidentNote.js"; +import { tool$incidentsUpdateScheduledMaintenance } from "./tools/incidentsUpdateScheduledMaintenance.js"; +import { tool$incidentsUpdateTranscriptAttribution } from "./tools/incidentsUpdateTranscriptAttribution.js"; +import { tool$incidentsVoteAiIncidentSummary } from "./tools/incidentsVoteAiIncidentSummary.js"; +import { tool$integrationsCreateConnection } from "./tools/integrationsCreateConnection.js"; +import { tool$integrationsCreateSlackEmojiAction } from "./tools/integrationsCreateSlackEmojiAction.js"; +import { tool$integrationsDeleteSlackEmojiAction } from "./tools/integrationsDeleteSlackEmojiAction.js"; +import { tool$integrationsDeleteStatuspageConnection } from "./tools/integrationsDeleteStatuspageConnection.js"; +import { tool$integrationsGetAwsCloudtrailBatch } from "./tools/integrationsGetAwsCloudtrailBatch.js"; +import { tool$integrationsGetAwsConnection } from "./tools/integrationsGetAwsConnection.js"; +import { tool$integrationsGetIntegration } from "./tools/integrationsGetIntegration.js"; +import { tool$integrationsGetSlackEmojiAction } from "./tools/integrationsGetSlackEmojiAction.js"; +import { tool$integrationsGetStatuspageConnection } from "./tools/integrationsGetStatuspageConnection.js"; +import { tool$integrationsGetZendeskCustomerSupportIssue } from "./tools/integrationsGetZendeskCustomerSupportIssue.js"; +import { tool$integrationsListAuthedProviders } from "./tools/integrationsListAuthedProviders.js"; +import { tool$integrationsListAwsCloudtrailBatches } from "./tools/integrationsListAwsCloudtrailBatches.js"; +import { tool$integrationsListAwsCloudtrailBatchEvents } from "./tools/integrationsListAwsCloudtrailBatchEvents.js"; +import { tool$integrationsListAwsConnections } from "./tools/integrationsListAwsConnections.js"; +import { tool$integrationsListConnections } from "./tools/integrationsListConnections.js"; +import { tool$integrationsListConnectionStatuses } from "./tools/integrationsListConnectionStatuses.js"; +import { tool$integrationsListConnectionStatusesBySlug } from "./tools/integrationsListConnectionStatusesBySlug.js"; +import { tool$integrationsListConnectionStatusesBySlugAndId } from "./tools/integrationsListConnectionStatusesBySlugAndId.js"; +import { tool$integrationsListFieldMapAvailableFields } from "./tools/integrationsListFieldMapAvailableFields.js"; +import { tool$integrationsListIntegrations } from "./tools/integrationsListIntegrations.js"; +import { tool$integrationsListSlackEmojiActions } from "./tools/integrationsListSlackEmojiActions.js"; +import { tool$integrationsListSlackUsergroups } from "./tools/integrationsListSlackUsergroups.js"; +import { tool$integrationsListSlackWorkspaces } from "./tools/integrationsListSlackWorkspaces.js"; +import { tool$integrationsListStatuspageConnectionPages } from "./tools/integrationsListStatuspageConnectionPages.js"; +import { tool$integrationsListStatuspageConnections } from "./tools/integrationsListStatuspageConnections.js"; +import { tool$integrationsRefreshConnection } from "./tools/integrationsRefreshConnection.js"; +import { tool$integrationsSearchConfluenceSpaces } from "./tools/integrationsSearchConfluenceSpaces.js"; +import { tool$integrationsSearchZendeskTickets } from "./tools/integrationsSearchZendeskTickets.js"; +import { tool$integrationsUpdateAuthedProvider } from "./tools/integrationsUpdateAuthedProvider.js"; +import { tool$integrationsUpdateAwsCloudtrailBatch } from "./tools/integrationsUpdateAwsCloudtrailBatch.js"; +import { tool$integrationsUpdateAwsConnection } from "./tools/integrationsUpdateAwsConnection.js"; +import { tool$integrationsUpdateConnection } from "./tools/integrationsUpdateConnection.js"; +import { tool$integrationsUpdateFieldMap } from "./tools/integrationsUpdateFieldMap.js"; +import { tool$integrationsUpdateSlackEmojiAction } from "./tools/integrationsUpdateSlackEmojiAction.js"; +import { tool$integrationsUpdateStatuspageConnection } from "./tools/integrationsUpdateStatuspageConnection.js"; +import { tool$metricsReportingCreateSavedSearch } from "./tools/metricsReportingCreateSavedSearch.js"; +import { tool$metricsReportingDeleteSavedSearch } from "./tools/metricsReportingDeleteSavedSearch.js"; +import { tool$metricsReportingGetMeanTimeReport } from "./tools/metricsReportingGetMeanTimeReport.js"; +import { tool$metricsReportingGetSavedSearch } from "./tools/metricsReportingGetSavedSearch.js"; +import { tool$metricsReportingGetSignalsGroupedMetrics } from "./tools/metricsReportingGetSignalsGroupedMetrics.js"; +import { tool$metricsReportingGetSignalsMttxAnalytics } from "./tools/metricsReportingGetSignalsMttxAnalytics.js"; +import { tool$metricsReportingGetSignalsTimeseriesAnalytics } from "./tools/metricsReportingGetSignalsTimeseriesAnalytics.js"; +import { tool$metricsReportingListIncidentMetrics } from "./tools/metricsReportingListIncidentMetrics.js"; +import { tool$metricsReportingListInfrastructureMetrics } from "./tools/metricsReportingListInfrastructureMetrics.js"; +import { tool$metricsReportingListInfrastructureTypeMetrics } from "./tools/metricsReportingListInfrastructureTypeMetrics.js"; +import { tool$metricsReportingListRetrospectiveMetrics } from "./tools/metricsReportingListRetrospectiveMetrics.js"; +import { tool$metricsReportingListSavedSearches } from "./tools/metricsReportingListSavedSearches.js"; +import { tool$metricsReportingListUserInvolvementMetrics } from "./tools/metricsReportingListUserInvolvementMetrics.js"; +import { tool$metricsReportingUpdateSavedSearch } from "./tools/metricsReportingUpdateSavedSearch.js"; +import { tool$retrospectivesCreateIncidentRetrospective } from "./tools/retrospectivesCreateIncidentRetrospective.js"; +import { tool$retrospectivesCreateIncidentRetrospectiveDynamicInput } from "./tools/retrospectivesCreateIncidentRetrospectiveDynamicInput.js"; +import { tool$retrospectivesCreateIncidentRetrospectiveField } from "./tools/retrospectivesCreateIncidentRetrospectiveField.js"; +import { tool$retrospectivesCreatePostMortemReason } from "./tools/retrospectivesCreatePostMortemReason.js"; +import { tool$retrospectivesCreatePostMortemReport } from "./tools/retrospectivesCreatePostMortemReport.js"; +import { tool$retrospectivesCreateRetrospectiveTemplate } from "./tools/retrospectivesCreateRetrospectiveTemplate.js"; +import { tool$retrospectivesDeleteIncidentRetrospectiveDynamicInput } from "./tools/retrospectivesDeleteIncidentRetrospectiveDynamicInput.js"; +import { tool$retrospectivesDeletePostMortemReason } from "./tools/retrospectivesDeletePostMortemReason.js"; +import { tool$retrospectivesDeleteRetrospectiveTemplate } from "./tools/retrospectivesDeleteRetrospectiveTemplate.js"; +import { tool$retrospectivesExportIncidentRetrospectives } from "./tools/retrospectivesExportIncidentRetrospectives.js"; +import { tool$retrospectivesGetIncidentRetrospectiveField } from "./tools/retrospectivesGetIncidentRetrospectiveField.js"; +import { tool$retrospectivesGetPostMortemQuestion } from "./tools/retrospectivesGetPostMortemQuestion.js"; +import { tool$retrospectivesGetPostMortemReport } from "./tools/retrospectivesGetPostMortemReport.js"; +import { tool$retrospectivesGetRetrospectiveTemplate } from "./tools/retrospectivesGetRetrospectiveTemplate.js"; +import { tool$retrospectivesListIncidentRetrospectives } from "./tools/retrospectivesListIncidentRetrospectives.js"; +import { tool$retrospectivesListPostMortemQuestions } from "./tools/retrospectivesListPostMortemQuestions.js"; +import { tool$retrospectivesListPostMortemReasons } from "./tools/retrospectivesListPostMortemReasons.js"; +import { tool$retrospectivesListPostMortemReports } from "./tools/retrospectivesListPostMortemReports.js"; +import { tool$retrospectivesListRetrospectives } from "./tools/retrospectivesListRetrospectives.js"; +import { tool$retrospectivesListRetrospectiveTemplates } from "./tools/retrospectivesListRetrospectiveTemplates.js"; +import { tool$retrospectivesPublishPostMortemReport } from "./tools/retrospectivesPublishPostMortemReport.js"; +import { tool$retrospectivesReorderPostMortemReasons } from "./tools/retrospectivesReorderPostMortemReasons.js"; +import { tool$retrospectivesShareIncidentRetrospectives } from "./tools/retrospectivesShareIncidentRetrospectives.js"; +import { tool$retrospectivesUpdateIncidentRetrospective } from "./tools/retrospectivesUpdateIncidentRetrospective.js"; +import { tool$retrospectivesUpdateIncidentRetrospectiveField } from "./tools/retrospectivesUpdateIncidentRetrospectiveField.js"; +import { tool$retrospectivesUpdatePostMortemField } from "./tools/retrospectivesUpdatePostMortemField.js"; +import { tool$retrospectivesUpdatePostMortemQuestions } from "./tools/retrospectivesUpdatePostMortemQuestions.js"; +import { tool$retrospectivesUpdatePostMortemReason } from "./tools/retrospectivesUpdatePostMortemReason.js"; +import { tool$retrospectivesUpdatePostMortemReport } from "./tools/retrospectivesUpdatePostMortemReport.js"; +import { tool$retrospectivesUpdateRetrospectiveTemplate } from "./tools/retrospectivesUpdateRetrospectiveTemplate.js"; +import { tool$runbooksCreateRunbook } from "./tools/runbooksCreateRunbook.js"; +import { tool$runbooksCreateRunbookExecution } from "./tools/runbooksCreateRunbookExecution.js"; +import { tool$runbooksDeleteRunbook } from "./tools/runbooksDeleteRunbook.js"; +import { tool$runbooksDeleteRunbookExecution } from "./tools/runbooksDeleteRunbookExecution.js"; +import { tool$runbooksGetRunbook } from "./tools/runbooksGetRunbook.js"; +import { tool$runbooksGetRunbookActionFieldOptions } from "./tools/runbooksGetRunbookActionFieldOptions.js"; +import { tool$runbooksGetRunbookExecution } from "./tools/runbooksGetRunbookExecution.js"; +import { tool$runbooksGetRunbookExecutionStepScript } from "./tools/runbooksGetRunbookExecutionStepScript.js"; +import { tool$runbooksListRunbookActions } from "./tools/runbooksListRunbookActions.js"; +import { tool$runbooksListRunbookAudits } from "./tools/runbooksListRunbookAudits.js"; +import { tool$runbooksListRunbookExecutions } from "./tools/runbooksListRunbookExecutions.js"; +import { tool$runbooksListRunbooks } from "./tools/runbooksListRunbooks.js"; +import { tool$runbooksUpdateRunbook } from "./tools/runbooksUpdateRunbook.js"; +import { tool$runbooksUpdateRunbookExecutionStep } from "./tools/runbooksUpdateRunbookExecutionStep.js"; +import { tool$runbooksUpdateRunbookExecutionStepScript } from "./tools/runbooksUpdateRunbookExecutionStepScript.js"; +import { tool$scimCreateSCIMGroup } from "./tools/scimCreateSCIMGroup.js"; +import { tool$scimCreateSCIMUser } from "./tools/scimCreateSCIMUser.js"; +import { tool$scimDeleteSCIMGroup } from "./tools/scimDeleteSCIMGroup.js"; +import { tool$scimDeleteSCIMUser } from "./tools/scimDeleteSCIMUser.js"; +import { tool$scimGetSCIMGroup } from "./tools/scimGetSCIMGroup.js"; +import { tool$scimGetSCIMUser } from "./tools/scimGetSCIMUser.js"; +import { tool$scimListSCIMGroups } from "./tools/scimListSCIMGroups.js"; +import { tool$scimListSCIMUsers } from "./tools/scimListSCIMUsers.js"; +import { tool$scimPatchSCIMUser } from "./tools/scimPatchSCIMUser.js"; +import { tool$scimUpdateSCIMGroup } from "./tools/scimUpdateSCIMGroup.js"; +import { tool$scimUpdateSCIMUser } from "./tools/scimUpdateSCIMUser.js"; +import { tool$signalsCreateOnCallShift } from "./tools/signalsCreateOnCallShift.js"; +import { tool$signalsCreateSignalsEmailTarget } from "./tools/signalsCreateSignalsEmailTarget.js"; +import { tool$signalsCreateSignalsWebhookTarget } from "./tools/signalsCreateSignalsWebhookTarget.js"; +import { tool$signalsCreateTeamEscalationPolicy } from "./tools/signalsCreateTeamEscalationPolicy.js"; +import { tool$signalsCreateTeamOnCallSchedule } from "./tools/signalsCreateTeamOnCallSchedule.js"; +import { tool$signalsCreateTeamSignalRule } from "./tools/signalsCreateTeamSignalRule.js"; +import { tool$signalsDebugSignalsExpression } from "./tools/signalsDebugSignalsExpression.js"; +import { tool$signalsDeleteOnCallShift } from "./tools/signalsDeleteOnCallShift.js"; +import { tool$signalsDeleteSignalsEmailTarget } from "./tools/signalsDeleteSignalsEmailTarget.js"; +import { tool$signalsDeleteSignalsWebhookTarget } from "./tools/signalsDeleteSignalsWebhookTarget.js"; +import { tool$signalsDeleteTeamEscalationPolicy } from "./tools/signalsDeleteTeamEscalationPolicy.js"; +import { tool$signalsDeleteTeamOnCallSchedule } from "./tools/signalsDeleteTeamOnCallSchedule.js"; +import { tool$signalsDeleteTeamSignalRule } from "./tools/signalsDeleteTeamSignalRule.js"; +import { tool$signalsGetOnCallShift } from "./tools/signalsGetOnCallShift.js"; +import { tool$signalsGetSignalsEmailTarget } from "./tools/signalsGetSignalsEmailTarget.js"; +import { tool$signalsGetSignalsIngestUrl } from "./tools/signalsGetSignalsIngestUrl.js"; +import { tool$signalsGetSignalsWebhookTarget } from "./tools/signalsGetSignalsWebhookTarget.js"; +import { tool$signalsGetTeamEscalationPolicy } from "./tools/signalsGetTeamEscalationPolicy.js"; +import { tool$signalsGetTeamOnCallSchedule } from "./tools/signalsGetTeamOnCallSchedule.js"; +import { tool$signalsGetTeamSignalRule } from "./tools/signalsGetTeamSignalRule.js"; +import { tool$signalsListOrganizationOnCallSchedules } from "./tools/signalsListOrganizationOnCallSchedules.js"; +import { tool$signalsListSignalsEmailTargets } from "./tools/signalsListSignalsEmailTargets.js"; +import { tool$signalsListSignalsEventSources } from "./tools/signalsListSignalsEventSources.js"; +import { tool$signalsListSignalsTransposers } from "./tools/signalsListSignalsTransposers.js"; +import { tool$signalsListSignalsWebhookTargets } from "./tools/signalsListSignalsWebhookTargets.js"; +import { tool$signalsListTeamEscalationPolicies } from "./tools/signalsListTeamEscalationPolicies.js"; +import { tool$signalsListTeamOnCallSchedules } from "./tools/signalsListTeamOnCallSchedules.js"; +import { tool$signalsListTeamSignalRules } from "./tools/signalsListTeamSignalRules.js"; +import { tool$signalsUpdateOnCallShift } from "./tools/signalsUpdateOnCallShift.js"; +import { tool$signalsUpdateSignalsEmailTarget } from "./tools/signalsUpdateSignalsEmailTarget.js"; +import { tool$signalsUpdateSignalsWebhookTarget } from "./tools/signalsUpdateSignalsWebhookTarget.js"; +import { tool$signalsUpdateTeamEscalationPolicy } from "./tools/signalsUpdateTeamEscalationPolicy.js"; +import { tool$signalsUpdateTeamOnCallSchedule } from "./tools/signalsUpdateTeamOnCallSchedule.js"; +import { tool$signalsUpdateTeamSignalRule } from "./tools/signalsUpdateTeamSignalRule.js"; +import { tool$statusPagesCreateEmailSubscriber } from "./tools/statusPagesCreateEmailSubscriber.js"; +import { tool$statusPagesCreateNuncComponentGroup } from "./tools/statusPagesCreateNuncComponentGroup.js"; +import { tool$statusPagesCreateNuncConnection } from "./tools/statusPagesCreateNuncConnection.js"; +import { tool$statusPagesCreateNuncLink } from "./tools/statusPagesCreateNuncLink.js"; +import { tool$statusPagesCreateNuncSubscription } from "./tools/statusPagesCreateNuncSubscription.js"; +import { tool$statusPagesDeleteEmailSubscriber } from "./tools/statusPagesDeleteEmailSubscriber.js"; +import { tool$statusPagesDeleteIncidentStatusPage } from "./tools/statusPagesDeleteIncidentStatusPage.js"; +import { tool$statusPagesDeleteNuncComponentGroup } from "./tools/statusPagesDeleteNuncComponentGroup.js"; +import { tool$statusPagesDeleteNuncConnection } from "./tools/statusPagesDeleteNuncConnection.js"; +import { tool$statusPagesDeleteNuncImage } from "./tools/statusPagesDeleteNuncImage.js"; +import { tool$statusPagesDeleteNuncLink } from "./tools/statusPagesDeleteNuncLink.js"; +import { tool$statusPagesDeleteNuncSubscription } from "./tools/statusPagesDeleteNuncSubscription.js"; +import { tool$statusPagesGetNuncConnection } from "./tools/statusPagesGetNuncConnection.js"; +import { tool$statusPagesListEmailSubscribers } from "./tools/statusPagesListEmailSubscribers.js"; +import { tool$statusPagesListNuncConnections } from "./tools/statusPagesListNuncConnections.js"; +import { tool$statusPagesUpdateNuncComponentGroup } from "./tools/statusPagesUpdateNuncComponentGroup.js"; +import { tool$statusPagesUpdateNuncConnection } from "./tools/statusPagesUpdateNuncConnection.js"; +import { tool$statusPagesUpdateNuncImage } from "./tools/statusPagesUpdateNuncImage.js"; +import { tool$statusPagesUpdateNuncLink } from "./tools/statusPagesUpdateNuncLink.js"; +import { tool$tasksConvertIncidentTask } from "./tools/tasksConvertIncidentTask.js"; +import { tool$tasksCreateChecklistTemplate } from "./tools/tasksCreateChecklistTemplate.js"; +import { tool$tasksCreateIncidentTask } from "./tools/tasksCreateIncidentTask.js"; +import { tool$tasksCreateIncidentTaskList } from "./tools/tasksCreateIncidentTaskList.js"; +import { tool$tasksCreateTaskList } from "./tools/tasksCreateTaskList.js"; +import { tool$tasksDeleteChecklistTemplate } from "./tools/tasksDeleteChecklistTemplate.js"; +import { tool$tasksDeleteIncidentTask } from "./tools/tasksDeleteIncidentTask.js"; +import { tool$tasksDeleteTaskList } from "./tools/tasksDeleteTaskList.js"; +import { tool$tasksGetChecklistTemplate } from "./tools/tasksGetChecklistTemplate.js"; +import { tool$tasksGetIncidentTask } from "./tools/tasksGetIncidentTask.js"; +import { tool$tasksGetTaskList } from "./tools/tasksGetTaskList.js"; +import { tool$tasksListChecklistTemplates } from "./tools/tasksListChecklistTemplates.js"; +import { tool$tasksListIncidentTasks } from "./tools/tasksListIncidentTasks.js"; +import { tool$tasksListTaskLists } from "./tools/tasksListTaskLists.js"; +import { tool$tasksUpdateChecklistTemplate } from "./tools/tasksUpdateChecklistTemplate.js"; +import { tool$tasksUpdateIncidentTask } from "./tools/tasksUpdateIncidentTask.js"; +import { tool$tasksUpdateTaskList } from "./tools/tasksUpdateTaskList.js"; +import { tool$teamsCreateTeam } from "./tools/teamsCreateTeam.js"; +import { tool$teamsDeleteTeam } from "./tools/teamsDeleteTeam.js"; +import { tool$teamsGetTeam } from "./tools/teamsGetTeam.js"; +import { tool$teamsListSchedules } from "./tools/teamsListSchedules.js"; +import { tool$teamsListTeams } from "./tools/teamsListTeams.js"; +import { tool$teamsUpdateTeam } from "./tools/teamsUpdateTeam.js"; +import { tool$ticketingCreateInboundFieldMap } from "./tools/ticketingCreateInboundFieldMap.js"; +import { tool$ticketingCreateTicket } from "./tools/ticketingCreateTicket.js"; +import { tool$ticketingCreateTicketingFieldMap } from "./tools/ticketingCreateTicketingFieldMap.js"; +import { tool$ticketingCreateTicketingPriority } from "./tools/ticketingCreateTicketingPriority.js"; +import { tool$ticketingCreateTicketingProjectConfig } from "./tools/ticketingCreateTicketingProjectConfig.js"; +import { tool$ticketingDeleteInboundFieldMap } from "./tools/ticketingDeleteInboundFieldMap.js"; +import { tool$ticketingDeleteTicket } from "./tools/ticketingDeleteTicket.js"; +import { tool$ticketingDeleteTicketingFieldMap } from "./tools/ticketingDeleteTicketingFieldMap.js"; +import { tool$ticketingDeleteTicketingPriority } from "./tools/ticketingDeleteTicketingPriority.js"; +import { tool$ticketingDeleteTicketingProjectConfig } from "./tools/ticketingDeleteTicketingProjectConfig.js"; +import { tool$ticketingGetConfigurationOptions } from "./tools/ticketingGetConfigurationOptions.js"; +import { tool$ticketingGetInboundFieldMap } from "./tools/ticketingGetInboundFieldMap.js"; +import { tool$ticketingGetOptionsForField } from "./tools/ticketingGetOptionsForField.js"; +import { tool$ticketingGetTicket } from "./tools/ticketingGetTicket.js"; +import { tool$ticketingGetTicketingFieldMap } from "./tools/ticketingGetTicketingFieldMap.js"; +import { tool$ticketingGetTicketingPriority } from "./tools/ticketingGetTicketingPriority.js"; +import { tool$ticketingGetTicketingProject } from "./tools/ticketingGetTicketingProject.js"; +import { tool$ticketingGetTicketingProjectConfig } from "./tools/ticketingGetTicketingProjectConfig.js"; +import { tool$ticketingListAvailableInboundFieldMaps } from "./tools/ticketingListAvailableInboundFieldMaps.js"; +import { tool$ticketingListAvailableTicketingFieldMaps } from "./tools/ticketingListAvailableTicketingFieldMaps.js"; +import { tool$ticketingListInboundFieldMaps } from "./tools/ticketingListInboundFieldMaps.js"; +import { tool$ticketingListTicketingPriorities } from "./tools/ticketingListTicketingPriorities.js"; +import { tool$ticketingListTicketingProjects } from "./tools/ticketingListTicketingProjects.js"; +import { tool$ticketingListTickets } from "./tools/ticketingListTickets.js"; +import { tool$ticketingListTicketTags } from "./tools/ticketingListTicketTags.js"; +import { tool$ticketingUpdateInboundFieldMap } from "./tools/ticketingUpdateInboundFieldMap.js"; +import { tool$ticketingUpdateTicket } from "./tools/ticketingUpdateTicket.js"; +import { tool$ticketingUpdateTicketingFieldMap } from "./tools/ticketingUpdateTicketingFieldMap.js"; +import { tool$ticketingUpdateTicketingPriority } from "./tools/ticketingUpdateTicketingPriority.js"; +import { tool$ticketingUpdateTicketingProjectConfig } from "./tools/ticketingUpdateTicketingProjectConfig.js"; +import { tool$usersGetCurrentUser } from "./tools/usersGetCurrentUser.js"; +import { tool$usersGetUser } from "./tools/usersGetUser.js"; +import { tool$usersListUsers } from "./tools/usersListUsers.js"; +import { tool$webhooksCreateWebhook } from "./tools/webhooksCreateWebhook.js"; +import { tool$webhooksDeleteWebhook } from "./tools/webhooksDeleteWebhook.js"; +import { tool$webhooksGetWebhook } from "./tools/webhooksGetWebhook.js"; +import { tool$webhooksListWebhookDeliveries } from "./tools/webhooksListWebhookDeliveries.js"; +import { tool$webhooksListWebhooks } from "./tools/webhooksListWebhooks.js"; +import { tool$webhooksUpdateWebhook } from "./tools/webhooksUpdateWebhook.js"; + +export function createMCPServer(deps: { + logger: ConsoleLogger; + allowedTools?: string[] | undefined; + scopes?: MCPScope[] | undefined; + serverURL?: string | undefined; + apiKey?: SDKOptions["apiKey"] | undefined; + serverIdx?: SDKOptions["serverIdx"] | undefined; +}) { + const server = new McpServer({ + name: "Firehydrant", + version: "0.1.13", + }); + + const client = new FirehydrantCore({ + apiKey: deps.apiKey, + serverURL: deps.serverURL, + serverIdx: deps.serverIdx, + }); + + const scopes = new Set(deps.scopes); + + const allowedTools = deps.allowedTools && new Set(deps.allowedTools); + const tool = createRegisterTool( + deps.logger, + server, + client, + scopes, + allowedTools, + ); + const resource = createRegisterResource(deps.logger, server, client, scopes); + const resourceTemplate = createRegisterResourceTemplate( + deps.logger, + server, + client, + scopes, + ); + const prompt = createRegisterPrompt(deps.logger, server, client, scopes); + const register = { tool, resource, resourceTemplate, prompt }; + void register; // suppress unused warnings + + tool(tool$accountSettingsPing); + tool(tool$accountSettingsListEntitlements); + tool(tool$accountSettingsPingNoauth); + tool(tool$accountSettingsGetBootstrap); + tool(tool$accountSettingsGetAiPreferences); + tool(tool$accountSettingsUpdateAiPreferences); + tool(tool$catalogEntriesListEnvironments); + tool(tool$catalogEntriesCreateEnvironment); + tool(tool$catalogEntriesGetEnvironment); + tool(tool$catalogEntriesDeleteEnvironment); + tool(tool$catalogEntriesUpdateEnvironment); + tool(tool$catalogEntriesListServices); + tool(tool$catalogEntriesCreateService); + tool(tool$catalogEntriesCreateServiceLinks); + tool(tool$catalogEntriesGetService); + tool(tool$catalogEntriesDeleteService); + tool(tool$catalogEntriesUpdateService); + tool(tool$catalogEntriesGetServiceDependencies); + tool(tool$catalogEntriesListServiceAvailableUpstreamDependencies); + tool(tool$catalogEntriesListServiceAvailableDownstreamDependencies); + tool(tool$catalogEntriesDeleteServiceLink); + tool(tool$catalogEntriesCreateServiceChecklistResponse); + tool(tool$catalogEntriesCreateServiceDependency); + tool(tool$catalogEntriesGetServiceDependency); + tool(tool$catalogEntriesDeleteServiceDependency); + tool(tool$catalogEntriesUpdateServiceDependency); + tool(tool$catalogEntriesListFunctionalities); + tool(tool$catalogEntriesCreateFunctionality); + tool(tool$catalogEntriesGetFunctionality); + tool(tool$catalogEntriesDeleteFunctionality); + tool(tool$catalogEntriesUpdateFunctionality); + tool(tool$catalogEntriesListFunctionalityServices); + tool(tool$catalogEntriesListUserOwnedServices); + tool(tool$catalogEntriesListInfrastructures); + tool(tool$catalogEntriesRefreshCatalog); + tool(tool$catalogEntriesIngestCatalogData); + tool(tool$teamsListTeams); + tool(tool$teamsCreateTeam); + tool(tool$teamsGetTeam); + tool(tool$teamsDeleteTeam); + tool(tool$teamsUpdateTeam); + tool(tool$teamsListSchedules); + tool(tool$signalsListTeamEscalationPolicies); + tool(tool$signalsCreateTeamEscalationPolicy); + tool(tool$signalsGetTeamEscalationPolicy); + tool(tool$signalsDeleteTeamEscalationPolicy); + tool(tool$signalsUpdateTeamEscalationPolicy); + tool(tool$signalsListTeamOnCallSchedules); + tool(tool$signalsCreateTeamOnCallSchedule); + tool(tool$signalsGetTeamOnCallSchedule); + tool(tool$signalsDeleteTeamOnCallSchedule); + tool(tool$signalsUpdateTeamOnCallSchedule); + tool(tool$signalsCreateOnCallShift); + tool(tool$signalsGetOnCallShift); + tool(tool$signalsDeleteOnCallShift); + tool(tool$signalsUpdateOnCallShift); + tool(tool$signalsListTeamSignalRules); + tool(tool$signalsCreateTeamSignalRule); + tool(tool$signalsGetTeamSignalRule); + tool(tool$signalsDeleteTeamSignalRule); + tool(tool$signalsUpdateTeamSignalRule); + tool(tool$signalsListSignalsEventSources); + tool(tool$signalsListSignalsEmailTargets); + tool(tool$signalsCreateSignalsEmailTarget); + tool(tool$signalsGetSignalsEmailTarget); + tool(tool$signalsDeleteSignalsEmailTarget); + tool(tool$signalsUpdateSignalsEmailTarget); + tool(tool$signalsListSignalsWebhookTargets); + tool(tool$signalsCreateSignalsWebhookTarget); + tool(tool$signalsGetSignalsWebhookTarget); + tool(tool$signalsDeleteSignalsWebhookTarget); + tool(tool$signalsUpdateSignalsWebhookTarget); + tool(tool$signalsListSignalsTransposers); + tool(tool$signalsGetSignalsIngestUrl); + tool(tool$signalsDebugSignalsExpression); + tool(tool$signalsListOrganizationOnCallSchedules); + tool(tool$changesListChanges); + tool(tool$changesCreateChange); + tool(tool$changesDeleteChange); + tool(tool$changesUpdateChange); + tool(tool$changesListChangeIdentities); + tool(tool$changesCreateChangeIdentity); + tool(tool$changesDeleteChangeIdentity); + tool(tool$changesUpdateChangeIdentity); + tool(tool$changesListChangeEvents); + tool(tool$changesCreateChangeEvent); + tool(tool$changesGetChangeEvent); + tool(tool$changesDeleteChangeEvent); + tool(tool$changesUpdateChangeEvent); + tool(tool$changesListChangeTypes); + tool(tool$incidentsListIncidents); + tool(tool$incidentsCreateIncident); + tool(tool$incidentsGetIncidentChannel); + tool(tool$incidentsCloseIncident); + tool(tool$incidentsResolveIncident); + tool(tool$incidentsGetIncident); + tool(tool$incidentsDeleteIncident); + tool(tool$incidentsUpdateIncident); + tool(tool$incidentsUnarchiveIncident); + tool(tool$incidentsBulkUpdateIncidentMilestones); + tool(tool$incidentsListIncidentMilestones); + tool(tool$incidentsListIncidentChangeEvents); + tool(tool$incidentsCreateIncidentChangeEvent); + tool(tool$incidentsUpdateIncidentChangeEvent); + tool(tool$incidentsListIncidentStatusPages); + tool(tool$incidentsCreateIncidentStatusPage); + tool(tool$incidentsListIncidentLinks); + tool(tool$incidentsCreateIncidentLink); + tool(tool$incidentsUpdateIncidentLink); + tool(tool$incidentsDeleteIncidentLink); + tool(tool$incidentsUpdateTranscriptAttribution); + tool(tool$incidentsListTranscriptEntries); + tool(tool$incidentsDeleteTranscriptEntry); + tool(tool$incidentsListIncidentConferenceBridges); + tool(tool$incidentsGetConferenceBridgeTranslation); + tool(tool$incidentsListSimilarIncidents); + tool(tool$incidentsListIncidentAttachments); + tool(tool$incidentsCreateIncidentAttachment); + tool(tool$incidentsListIncidentEvents); + tool(tool$incidentsGetIncidentEvent); + tool(tool$incidentsDeleteIncidentEvent); + tool(tool$incidentsUpdateIncidentEvent); + tool(tool$incidentsUpdateIncidentImpactPut); + tool(tool$incidentsUpdateIncidentImpactPatch); + tool(tool$incidentsListIncidentImpacts); + tool(tool$incidentsCreateIncidentImpact); + tool(tool$incidentsDeleteIncidentImpact); + tool(tool$incidentsCreateIncidentNote); + tool(tool$incidentsUpdateIncidentNote); + tool(tool$incidentsCreateIncidentChatMessage); + tool(tool$incidentsDeleteIncidentChatMessage); + tool(tool$incidentsUpdateIncidentChatMessage); + tool(tool$incidentsListIncidentRoleAssignments); + tool(tool$incidentsCreateIncidentRoleAssignment); + tool(tool$incidentsDeleteIncidentRoleAssignment); + tool(tool$incidentsCreateIncidentTeamAssignment); + tool(tool$incidentsDeleteIncidentTeamAssignment); + tool(tool$incidentsGetIncidentUser); + tool(tool$incidentsGetIncidentRelationships); + tool(tool$incidentsListScheduledMaintenances); + tool(tool$incidentsCreateScheduledMaintenance); + tool(tool$incidentsGetScheduledMaintenance); + tool(tool$incidentsDeleteScheduledMaintenance); + tool(tool$incidentsUpdateScheduledMaintenance); + tool(tool$incidentsGetAiIncidentSummaryVoteStatus); + tool(tool$incidentsVoteAiIncidentSummary); + tool(tool$alertsListIncidentAlerts); + tool(tool$alertsCreateIncidentAlert); + tool(tool$alertsUpdateIncidentAlertPrimary); + tool(tool$alertsDeleteIncidentAlert); + tool(tool$alertsListAlerts); + tool(tool$alertsGetAlert); + tool(tool$alertsListProcessingLogEntries); + tool(tool$statusPagesDeleteIncidentStatusPage); + tool(tool$statusPagesListNuncConnections); + tool(tool$statusPagesCreateNuncConnection); + tool(tool$statusPagesListEmailSubscribers); + tool(tool$statusPagesCreateEmailSubscriber); + tool(tool$statusPagesDeleteEmailSubscriber); + tool(tool$statusPagesGetNuncConnection); + tool(tool$statusPagesUpdateNuncConnection); + tool(tool$statusPagesDeleteNuncConnection); + tool(tool$statusPagesDeleteNuncComponentGroup); + tool(tool$statusPagesUpdateNuncComponentGroup); + tool(tool$statusPagesCreateNuncComponentGroup); + tool(tool$statusPagesDeleteNuncLink); + tool(tool$statusPagesUpdateNuncLink); + tool(tool$statusPagesCreateNuncLink); + tool(tool$statusPagesUpdateNuncImage); + tool(tool$statusPagesDeleteNuncImage); + tool(tool$statusPagesDeleteNuncSubscription); + tool(tool$statusPagesCreateNuncSubscription); + tool(tool$tasksCreateIncidentTaskList); + tool(tool$tasksListIncidentTasks); + tool(tool$tasksCreateIncidentTask); + tool(tool$tasksGetIncidentTask); + tool(tool$tasksDeleteIncidentTask); + tool(tool$tasksUpdateIncidentTask); + tool(tool$tasksConvertIncidentTask); + tool(tool$tasksListTaskLists); + tool(tool$tasksCreateTaskList); + tool(tool$tasksGetTaskList); + tool(tool$tasksDeleteTaskList); + tool(tool$tasksUpdateTaskList); + tool(tool$tasksListChecklistTemplates); + tool(tool$tasksCreateChecklistTemplate); + tool(tool$tasksGetChecklistTemplate); + tool(tool$tasksDeleteChecklistTemplate); + tool(tool$tasksUpdateChecklistTemplate); + tool(tool$conversationsGetVoteStatus); + tool(tool$conversationsUpdateVote); + tool(tool$conversationsDeleteCommentReaction); + tool(tool$conversationsListCommentReactions); + tool(tool$conversationsCreateCommentReaction); + tool(tool$conversationsGetComment); + tool(tool$conversationsDeleteComment); + tool(tool$conversationsUpdateComment); + tool(tool$conversationsListComments); + tool(tool$conversationsCreateComment); + tool(tool$retrospectivesShareIncidentRetrospectives); + tool(tool$retrospectivesExportIncidentRetrospectives); + tool(tool$retrospectivesListIncidentRetrospectives); + tool(tool$retrospectivesCreateIncidentRetrospective); + tool(tool$retrospectivesUpdateIncidentRetrospective); + tool(tool$retrospectivesCreateIncidentRetrospectiveField); + tool(tool$retrospectivesGetIncidentRetrospectiveField); + tool(tool$retrospectivesUpdateIncidentRetrospectiveField); + tool(tool$retrospectivesCreateIncidentRetrospectiveDynamicInput); + tool(tool$retrospectivesDeleteIncidentRetrospectiveDynamicInput); + tool(tool$retrospectivesListRetrospectives); + tool(tool$retrospectivesListPostMortemReports); + tool(tool$retrospectivesCreatePostMortemReport); + tool(tool$retrospectivesGetPostMortemReport); + tool(tool$retrospectivesUpdatePostMortemReport); + tool(tool$retrospectivesListPostMortemReasons); + tool(tool$retrospectivesCreatePostMortemReason); + tool(tool$retrospectivesDeletePostMortemReason); + tool(tool$retrospectivesUpdatePostMortemReason); + tool(tool$retrospectivesReorderPostMortemReasons); + tool(tool$retrospectivesPublishPostMortemReport); + tool(tool$retrospectivesUpdatePostMortemField); + tool(tool$retrospectivesListPostMortemQuestions); + tool(tool$retrospectivesUpdatePostMortemQuestions); + tool(tool$retrospectivesGetPostMortemQuestion); + tool(tool$retrospectivesListRetrospectiveTemplates); + tool(tool$retrospectivesCreateRetrospectiveTemplate); + tool(tool$retrospectivesGetRetrospectiveTemplate); + tool(tool$retrospectivesDeleteRetrospectiveTemplate); + tool(tool$retrospectivesUpdateRetrospectiveTemplate); + tool(tool$incidentSettingsListIncidentRoles); + tool(tool$incidentSettingsCreateIncidentRole); + tool(tool$incidentSettingsGetIncidentRole); + tool(tool$incidentSettingsDeleteIncidentRole); + tool(tool$incidentSettingsUpdateIncidentRole); + tool(tool$incidentSettingsValidateIncidentTags); + tool(tool$incidentSettingsListIncidentTags); + tool(tool$incidentSettingsListIncidentTypes); + tool(tool$incidentSettingsCreateIncidentType); + tool(tool$incidentSettingsGetIncidentType); + tool(tool$incidentSettingsDeleteIncidentType); + tool(tool$incidentSettingsUpdateIncidentType); + tool(tool$incidentSettingsListLifecycleMeasurementDefinitions); + tool(tool$incidentSettingsCreateLifecycleMeasurementDefinition); + tool(tool$incidentSettingsGetLifecycleMeasurementDefinition); + tool(tool$incidentSettingsDeleteLifecycleMeasurementDefinition); + tool(tool$incidentSettingsUpdateLifecycleMeasurementDefinition); + tool(tool$incidentSettingsListLifecyclePhases); + tool(tool$incidentSettingsCreateLifecycleMilestone); + tool(tool$incidentSettingsDeleteLifecycleMilestone); + tool(tool$incidentSettingsUpdateLifecycleMilestone); + tool(tool$incidentSettingsListPriorities); + tool(tool$incidentSettingsCreatePriority); + tool(tool$incidentSettingsGetPriority); + tool(tool$incidentSettingsDeletePriority); + tool(tool$incidentSettingsUpdatePriority); + tool(tool$incidentSettingsListSeverities); + tool(tool$incidentSettingsCreateSeverity); + tool(tool$incidentSettingsGetSeverity); + tool(tool$incidentSettingsDeleteSeverity); + tool(tool$incidentSettingsUpdateSeverity); + tool(tool$incidentSettingsGetSeverityMatrix); + tool(tool$incidentSettingsUpdateSeverityMatrix); + tool(tool$incidentSettingsListSeverityMatrixConditions); + tool(tool$incidentSettingsCreateSeverityMatrixCondition); + tool(tool$incidentSettingsGetSeverityMatrixCondition); + tool(tool$incidentSettingsDeleteSeverityMatrixCondition); + tool(tool$incidentSettingsUpdateSeverityMatrixCondition); + tool(tool$incidentSettingsListSeverityMatrixImpacts); + tool(tool$incidentSettingsCreateSeverityMatrixImpact); + tool(tool$incidentSettingsDeleteSeverityMatrixImpact); + tool(tool$incidentSettingsUpdateSeverityMatrixImpact); + tool(tool$incidentSettingsDeleteCustomFieldDefinition); + tool(tool$incidentSettingsUpdateCustomFieldDefinition); + tool(tool$incidentSettingsListCustomFieldDefinitions); + tool(tool$incidentSettingsCreateCustomFieldDefinition); + tool(tool$incidentSettingsListCustomFieldSelectOptions); + tool(tool$incidentSettingsGetFormConfiguration); + tool(tool$integrationsListIntegrations); + tool(tool$integrationsGetIntegration); + tool(tool$integrationsUpdateFieldMap); + tool(tool$integrationsListFieldMapAvailableFields); + tool(tool$integrationsListAuthedProviders); + tool(tool$integrationsUpdateAuthedProvider); + tool(tool$integrationsListConnections); + tool(tool$integrationsCreateConnection); + tool(tool$integrationsRefreshConnection); + tool(tool$integrationsUpdateConnection); + tool(tool$integrationsListConnectionStatuses); + tool(tool$integrationsListConnectionStatusesBySlug); + tool(tool$integrationsListConnectionStatusesBySlugAndId); + tool(tool$integrationsListAwsConnections); + tool(tool$integrationsGetAwsConnection); + tool(tool$integrationsUpdateAwsConnection); + tool(tool$integrationsListAwsCloudtrailBatches); + tool(tool$integrationsGetAwsCloudtrailBatch); + tool(tool$integrationsUpdateAwsCloudtrailBatch); + tool(tool$integrationsListAwsCloudtrailBatchEvents); + tool(tool$integrationsSearchConfluenceSpaces); + tool(tool$integrationsListSlackWorkspaces); + tool(tool$integrationsListSlackUsergroups); + tool(tool$integrationsListSlackEmojiActions); + tool(tool$integrationsCreateSlackEmojiAction); + tool(tool$integrationsGetSlackEmojiAction); + tool(tool$integrationsDeleteSlackEmojiAction); + tool(tool$integrationsUpdateSlackEmojiAction); + tool(tool$integrationsListStatuspageConnections); + tool(tool$integrationsGetStatuspageConnection); + tool(tool$integrationsDeleteStatuspageConnection); + tool(tool$integrationsUpdateStatuspageConnection); + tool(tool$integrationsListStatuspageConnectionPages); + tool(tool$integrationsSearchZendeskTickets); + tool(tool$integrationsGetZendeskCustomerSupportIssue); + tool(tool$usersListUsers); + tool(tool$usersGetUser); + tool(tool$usersGetCurrentUser); + tool(tool$metricsReportingGetMeanTimeReport); + tool(tool$metricsReportingListRetrospectiveMetrics); + tool(tool$metricsReportingListUserInvolvementMetrics); + tool(tool$metricsReportingListIncidentMetrics); + tool(tool$metricsReportingListInfrastructureTypeMetrics); + tool(tool$metricsReportingListInfrastructureMetrics); + tool(tool$metricsReportingGetSavedSearch); + tool(tool$metricsReportingDeleteSavedSearch); + tool(tool$metricsReportingUpdateSavedSearch); + tool(tool$metricsReportingListSavedSearches); + tool(tool$metricsReportingCreateSavedSearch); + tool(tool$metricsReportingGetSignalsTimeseriesAnalytics); + tool(tool$metricsReportingGetSignalsGroupedMetrics); + tool(tool$metricsReportingGetSignalsMttxAnalytics); + tool(tool$runbooksListRunbookActions); + tool(tool$runbooksListRunbookExecutions); + tool(tool$runbooksCreateRunbookExecution); + tool(tool$runbooksGetRunbookExecution); + tool(tool$runbooksDeleteRunbookExecution); + tool(tool$runbooksUpdateRunbookExecutionStep); + tool(tool$runbooksGetRunbookExecutionStepScript); + tool(tool$runbooksUpdateRunbookExecutionStepScript); + tool(tool$runbooksGetRunbookActionFieldOptions); + tool(tool$runbooksListRunbooks); + tool(tool$runbooksCreateRunbook); + tool(tool$runbooksGetRunbook); + tool(tool$runbooksUpdateRunbook); + tool(tool$runbooksDeleteRunbook); + tool(tool$runbooksListRunbookAudits); + tool(tool$communicationListStatusUpdateTemplates); + tool(tool$communicationCreateStatusUpdateTemplate); + tool(tool$communicationGetStatusUpdateTemplate); + tool(tool$communicationDeleteStatusUpdateTemplate); + tool(tool$communicationUpdateStatusUpdateTemplate); + tool(tool$ticketingListTickets); + tool(tool$ticketingCreateTicket); + tool(tool$ticketingGetTicket); + tool(tool$ticketingDeleteTicket); + tool(tool$ticketingUpdateTicket); + tool(tool$ticketingListTicketingProjects); + tool(tool$ticketingGetTicketingProject); + tool(tool$ticketingGetConfigurationOptions); + tool(tool$ticketingGetOptionsForField); + tool(tool$ticketingListAvailableTicketingFieldMaps); + tool(tool$ticketingCreateTicketingFieldMap); + tool(tool$ticketingGetTicketingFieldMap); + tool(tool$ticketingDeleteTicketingFieldMap); + tool(tool$ticketingUpdateTicketingFieldMap); + tool(tool$ticketingListAvailableInboundFieldMaps); + tool(tool$ticketingListInboundFieldMaps); + tool(tool$ticketingCreateInboundFieldMap); + tool(tool$ticketingGetInboundFieldMap); + tool(tool$ticketingUpdateInboundFieldMap); + tool(tool$ticketingDeleteInboundFieldMap); + tool(tool$ticketingCreateTicketingProjectConfig); + tool(tool$ticketingGetTicketingProjectConfig); + tool(tool$ticketingDeleteTicketingProjectConfig); + tool(tool$ticketingUpdateTicketingProjectConfig); + tool(tool$ticketingListTicketingPriorities); + tool(tool$ticketingCreateTicketingPriority); + tool(tool$ticketingGetTicketingPriority); + tool(tool$ticketingDeleteTicketingPriority); + tool(tool$ticketingUpdateTicketingPriority); + tool(tool$ticketingListTicketTags); + tool(tool$scimGetSCIMGroup); + tool(tool$scimUpdateSCIMGroup); + tool(tool$scimDeleteSCIMGroup); + tool(tool$scimListSCIMGroups); + tool(tool$scimCreateSCIMGroup); + tool(tool$scimGetSCIMUser); + tool(tool$scimUpdateSCIMUser); + tool(tool$scimDeleteSCIMUser); + tool(tool$scimPatchSCIMUser); + tool(tool$scimListSCIMUsers); + tool(tool$scimCreateSCIMUser); + tool(tool$callRoutesListCallRoutes); + tool(tool$webhooksListWebhooks); + tool(tool$webhooksCreateWebhook); + tool(tool$webhooksListWebhookDeliveries); + tool(tool$webhooksGetWebhook); + tool(tool$webhooksDeleteWebhook); + tool(tool$webhooksUpdateWebhook); + tool(tool$audiencesListAudiences); + tool(tool$audiencesCreateAudience); + tool(tool$audiencesGetAudience); + tool(tool$audiencesArchiveAudience); + tool(tool$audiencesUpdateAudience); + tool(tool$audiencesRestoreAudience); + tool(tool$audiencesGetMemberDefaultAudience); + tool(tool$audiencesSetMemberDefaultAudience); + tool(tool$audiencesGetAudienceSummary); + tool(tool$audiencesGenerateAudienceSummary); + tool(tool$audiencesListAudienceSummaries); + + return server; +} diff --git a/src/mcp-server/shared.ts b/src/mcp-server/shared.ts new file mode 100644 index 00000000..9dc6d2f6 --- /dev/null +++ b/src/mcp-server/shared.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { bytesToBase64 } from "../lib/base64.js"; + +type BinaryData = + | Uint8Array + | ArrayBuffer + | Blob + | ReadableStream + | Response + | string; + +export async function consumeStream( + stream: ReadableStream, +): Promise { + const reader = stream.getReader(); + const chunks: Uint8Array[] = []; + + try { + while (true) { + const { done, value } = await reader.read(); + if (value != null) chunks.push(value); + if (done) break; + } + } finally { + reader.releaseLock(); + } + + return new Uint8Array(await new Blob(chunks).arrayBuffer()); +} + +export function isAsyncIterable( + value: unknown, +): value is AsyncIterable { + return ( + typeof value === "object" && value != null && Symbol.asyncIterator in value + ); +} + +export function isBinaryData(value: unknown): value is BinaryData { + return ( + value instanceof Uint8Array + || value instanceof ArrayBuffer + || value instanceof Blob + || value instanceof ReadableStream + || value instanceof Response + || typeof value === "string" + ); +} + +const base64Schema = z.string().base64(); + +export async function valueToBase64( + value: BinaryData | null | undefined, +): Promise { + if (value == null) { + return null; + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (value instanceof ArrayBuffer) { + return bytesToBase64(new Uint8Array(value)); + } else if (value instanceof Response || value instanceof Blob) { + return bytesToBase64(new Uint8Array(await value.arrayBuffer())); + } else if (value instanceof ReadableStream) { + return bytesToBase64(await consumeStream(value)); + } else if (typeof value === "string") { + return base64Schema.parse(value); + } else { + value satisfies never; + throw new Error(`Unsupported image value type: ${typeof value}`); + } +} diff --git a/src/mcp-server/tools.ts b/src/mcp-server/tools.ts new file mode 100644 index 00000000..bd3f137c --- /dev/null +++ b/src/mcp-server/tools.ts @@ -0,0 +1,129 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; +import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; +import { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; +import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod"; +import { FirehydrantCore } from "../core.js"; +import { ConsoleLogger } from "./console-logger.js"; +import { MCPScope } from "./scopes.js"; +import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js"; + +export type ToolDefinition = + Args extends ZodRawShape ? { + name: string; + description: string; + scopes?: MCPScope[]; + args: Args; + tool: ( + client: FirehydrantCore, + args: objectOutputType, + extra: RequestHandlerExtra, + ) => CallToolResult | Promise; + } + : { + name: string; + description: string; + scopes?: MCPScope[]; + args?: undefined; + tool: ( + client: FirehydrantCore, + extra: RequestHandlerExtra, + ) => CallToolResult | Promise; + }; + +// Optional function to assist with formatting tool results +export async function formatResult( + value: unknown, + init: { response?: Response | undefined }, +): Promise { + if (typeof value === "undefined") { + return { content: [] }; + } + + const { response } = init; + const contentType = response?.headers.get("content-type") ?? ""; + let content: CallToolResult["content"] = []; + + if (contentType.search(/\bjson\b/g)) { + content = [{ type: "text", text: JSON.stringify(value) }]; + } else if ( + contentType.startsWith("text/event-stream") + && isAsyncIterable(value) + ) { + content = await consumeSSE(value); + } else if (contentType.startsWith("text/") && typeof value === "string") { + content = [{ type: "text", text: value }]; + } else if (isBinaryData(value) && contentType.startsWith("image/")) { + const data = await valueToBase64(value); + content = data == null + ? [] + : [{ type: "image", data, mimeType: contentType }]; + } else { + return { + content: [{ + type: "text", + text: `Unsupported content type: "${contentType}"`, + }], + isError: true, + }; + } + + return { content }; +} + +async function consumeSSE( + value: AsyncIterable, +): Promise { + const content: CallToolResult["content"] = []; + + for await (const chunk of value) { + if (typeof chunk === "string") { + content.push({ type: "text", text: chunk }); + } else { + content.push({ type: "text", text: JSON.stringify(chunk) }); + } + } + + return content; +} + +export function createRegisterTool( + logger: ConsoleLogger, + server: McpServer, + sdk: FirehydrantCore, + allowedScopes: Set, + allowedTools?: Set, +): (tool: ToolDefinition) => void { + return (tool: ToolDefinition): void => { + if (allowedTools && !allowedTools.has(tool.name)) { + return; + } + + const scopes = tool.scopes ?? []; + if (allowedScopes.size > 0 && scopes.length === 0) { + return; + } + + if ( + allowedScopes.size > 0 + && !scopes.every((s: MCPScope) => allowedScopes.has(s)) + ) { + return; + } + + if (tool.args) { + server.tool(tool.name, tool.description, tool.args, async (args, ctx) => { + return tool.tool(sdk, args, ctx); + }); + } else { + server.tool(tool.name, tool.description, async (ctx) => { + return tool.tool(sdk, ctx); + }); + } + + logger.debug("Registered tool", { name: tool.name }); + }; +} diff --git a/src/mcp-server/tools/accountSettingsGetAiPreferences.ts b/src/mcp-server/tools/accountSettingsGetAiPreferences.ts new file mode 100644 index 00000000..81c2036f --- /dev/null +++ b/src/mcp-server/tools/accountSettingsGetAiPreferences.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accountSettingsGetAiPreferences } from "../../funcs/accountSettingsGetAiPreferences.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$accountSettingsGetAiPreferences: ToolDefinition = { + name: "account-settings-get-ai-preferences", + description: `Get AI preferences + +Retrieves the current AI preferences`, + tool: async (client, ctx) => { + const [result, apiCall] = await accountSettingsGetAiPreferences( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/accountSettingsGetBootstrap.ts b/src/mcp-server/tools/accountSettingsGetBootstrap.ts new file mode 100644 index 00000000..72257b44 --- /dev/null +++ b/src/mcp-server/tools/accountSettingsGetBootstrap.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accountSettingsGetBootstrap } from "../../funcs/accountSettingsGetBootstrap.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$accountSettingsGetBootstrap: ToolDefinition = { + name: "account-settings-get-bootstrap", + description: `Get initial application configuration + +Get initial application configuration`, + tool: async (client, ctx) => { + const [result, apiCall] = await accountSettingsGetBootstrap( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/accountSettingsListEntitlements.ts b/src/mcp-server/tools/accountSettingsListEntitlements.ts new file mode 100644 index 00000000..3eb0806f --- /dev/null +++ b/src/mcp-server/tools/accountSettingsListEntitlements.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accountSettingsListEntitlements } from "../../funcs/accountSettingsListEntitlements.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListEntitlementsRequest$inboundSchema, +}; + +export const tool$accountSettingsListEntitlements: ToolDefinition = + { + name: "account-settings-list-entitlements", + description: `List entitlements + +List the organization's entitlements`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await accountSettingsListEntitlements( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/accountSettingsPing.ts b/src/mcp-server/tools/accountSettingsPing.ts new file mode 100644 index 00000000..bc9a31e7 --- /dev/null +++ b/src/mcp-server/tools/accountSettingsPing.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accountSettingsPing } from "../../funcs/accountSettingsPing.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$accountSettingsPing: ToolDefinition = { + name: "account-settings-ping", + description: `Check API connectivity + +Simple endpoint to verify your API connection is working`, + tool: async (client, ctx) => { + const [result, apiCall] = await accountSettingsPing( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/accountSettingsPingNoauth.ts b/src/mcp-server/tools/accountSettingsPingNoauth.ts new file mode 100644 index 00000000..0d72deda --- /dev/null +++ b/src/mcp-server/tools/accountSettingsPingNoauth.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accountSettingsPingNoauth } from "../../funcs/accountSettingsPingNoauth.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$accountSettingsPingNoauth: ToolDefinition = { + name: "account-settings-ping-noauth", + description: `Check API connectivity + +Simple endpoint to verify your API connection is working`, + tool: async (client, ctx) => { + const [result, apiCall] = await accountSettingsPingNoauth( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/accountSettingsUpdateAiPreferences.ts b/src/mcp-server/tools/accountSettingsUpdateAiPreferences.ts new file mode 100644 index 00000000..64fbd742 --- /dev/null +++ b/src/mcp-server/tools/accountSettingsUpdateAiPreferences.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accountSettingsUpdateAiPreferences } from "../../funcs/accountSettingsUpdateAiPreferences.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateAiPreferencesRequest$inboundSchema.optional(), +}; + +export const tool$accountSettingsUpdateAiPreferences: ToolDefinition< + typeof args +> = { + name: "account-settings-update-ai-preferences", + description: `Update AI preferences + +Updates the AI preferences`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await accountSettingsUpdateAiPreferences( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/alertsCreateIncidentAlert.ts b/src/mcp-server/tools/alertsCreateIncidentAlert.ts new file mode 100644 index 00000000..688e585c --- /dev/null +++ b/src/mcp-server/tools/alertsCreateIncidentAlert.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { alertsCreateIncidentAlert } from "../../funcs/alertsCreateIncidentAlert.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentAlertRequest$inboundSchema, +}; + +export const tool$alertsCreateIncidentAlert: ToolDefinition = { + name: "alerts-create-incident-alert", + description: `Attach an alert to an incident + +Add an alert to an incident. FireHydrant needs to have ingested the alert from a third party system in order to attach it to the incident.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await alertsCreateIncidentAlert( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/alertsDeleteIncidentAlert.ts b/src/mcp-server/tools/alertsDeleteIncidentAlert.ts new file mode 100644 index 00000000..286cafc3 --- /dev/null +++ b/src/mcp-server/tools/alertsDeleteIncidentAlert.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { alertsDeleteIncidentAlert } from "../../funcs/alertsDeleteIncidentAlert.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentAlertRequest$inboundSchema, +}; + +export const tool$alertsDeleteIncidentAlert: ToolDefinition = { + name: "alerts-delete-incident-alert", + description: `Remove an alert from an incident + +Remove an alert from an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await alertsDeleteIncidentAlert( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/alertsGetAlert.ts b/src/mcp-server/tools/alertsGetAlert.ts new file mode 100644 index 00000000..dc4f5d42 --- /dev/null +++ b/src/mcp-server/tools/alertsGetAlert.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { alertsGetAlert } from "../../funcs/alertsGetAlert.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAlertRequest$inboundSchema, +}; + +export const tool$alertsGetAlert: ToolDefinition = { + name: "alerts-get-alert", + description: `Get an alert + +Retrieve a single alert`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await alertsGetAlert( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/alertsListAlerts.ts b/src/mcp-server/tools/alertsListAlerts.ts new file mode 100644 index 00000000..f10060af --- /dev/null +++ b/src/mcp-server/tools/alertsListAlerts.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { alertsListAlerts } from "../../funcs/alertsListAlerts.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAlertsRequest$inboundSchema, +}; + +export const tool$alertsListAlerts: ToolDefinition = { + name: "alerts-list-alerts", + description: `List alerts + +Retrieve all alerts from third parties`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await alertsListAlerts( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/alertsListIncidentAlerts.ts b/src/mcp-server/tools/alertsListIncidentAlerts.ts new file mode 100644 index 00000000..021297c0 --- /dev/null +++ b/src/mcp-server/tools/alertsListIncidentAlerts.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { alertsListIncidentAlerts } from "../../funcs/alertsListIncidentAlerts.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentAlertsRequest$inboundSchema, +}; + +export const tool$alertsListIncidentAlerts: ToolDefinition = { + name: "alerts-list-incident-alerts", + description: `List alerts for an incident + +List alerts that have been attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await alertsListIncidentAlerts( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/alertsListProcessingLogEntries.ts b/src/mcp-server/tools/alertsListProcessingLogEntries.ts new file mode 100644 index 00000000..2dae19df --- /dev/null +++ b/src/mcp-server/tools/alertsListProcessingLogEntries.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { alertsListProcessingLogEntries } from "../../funcs/alertsListProcessingLogEntries.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListProcessingLogEntriesRequest$inboundSchema, +}; + +export const tool$alertsListProcessingLogEntries: ToolDefinition = + { + name: "alerts-list-processing-log-entries", + description: `List alert processing log entries + +Processing Log Entries for a specific alert`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await alertsListProcessingLogEntries( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/alertsUpdateIncidentAlertPrimary.ts b/src/mcp-server/tools/alertsUpdateIncidentAlertPrimary.ts new file mode 100644 index 00000000..1a8c5bb0 --- /dev/null +++ b/src/mcp-server/tools/alertsUpdateIncidentAlertPrimary.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { alertsUpdateIncidentAlertPrimary } from "../../funcs/alertsUpdateIncidentAlertPrimary.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentAlertPrimaryRequest$inboundSchema, +}; + +export const tool$alertsUpdateIncidentAlertPrimary: ToolDefinition< + typeof args +> = { + name: "alerts-update-incident-alert-primary", + description: `Set an alert as primary for an incident + +Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await alertsUpdateIncidentAlertPrimary( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesArchiveAudience.ts b/src/mcp-server/tools/audiencesArchiveAudience.ts new file mode 100644 index 00000000..a569f494 --- /dev/null +++ b/src/mcp-server/tools/audiencesArchiveAudience.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesArchiveAudience } from "../../funcs/audiencesArchiveAudience.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ArchiveAudienceRequest$inboundSchema, +}; + +export const tool$audiencesArchiveAudience: ToolDefinition = { + name: "audiences-archive-audience", + description: `Archive audience + +Archive an audience`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesArchiveAudience( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesCreateAudience.ts b/src/mcp-server/tools/audiencesCreateAudience.ts new file mode 100644 index 00000000..e6aacec9 --- /dev/null +++ b/src/mcp-server/tools/audiencesCreateAudience.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesCreateAudience } from "../../funcs/audiencesCreateAudience.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateAudienceRequest$inboundSchema, +}; + +export const tool$audiencesCreateAudience: ToolDefinition = { + name: "audiences-create-audience", + description: `Create audience + +Create a new audience`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesCreateAudience( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesGenerateAudienceSummary.ts b/src/mcp-server/tools/audiencesGenerateAudienceSummary.ts new file mode 100644 index 00000000..531a87b6 --- /dev/null +++ b/src/mcp-server/tools/audiencesGenerateAudienceSummary.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesGenerateAudienceSummary } from "../../funcs/audiencesGenerateAudienceSummary.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GenerateAudienceSummaryRequest$inboundSchema, +}; + +export const tool$audiencesGenerateAudienceSummary: ToolDefinition< + typeof args +> = { + name: "audiences-generate-audience-summary", + description: `Generate summary + +Generate a new audience-specific summary for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesGenerateAudienceSummary( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesGetAudience.ts b/src/mcp-server/tools/audiencesGetAudience.ts new file mode 100644 index 00000000..586e65fd --- /dev/null +++ b/src/mcp-server/tools/audiencesGetAudience.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesGetAudience } from "../../funcs/audiencesGetAudience.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAudienceRequest$inboundSchema, +}; + +export const tool$audiencesGetAudience: ToolDefinition = { + name: "audiences-get-audience", + description: `Get audience + +Get audience details`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesGetAudience( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesGetAudienceSummary.ts b/src/mcp-server/tools/audiencesGetAudienceSummary.ts new file mode 100644 index 00000000..5d718847 --- /dev/null +++ b/src/mcp-server/tools/audiencesGetAudienceSummary.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesGetAudienceSummary } from "../../funcs/audiencesGetAudienceSummary.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAudienceSummaryRequest$inboundSchema, +}; + +export const tool$audiencesGetAudienceSummary: ToolDefinition = { + name: "audiences-get-audience-summary", + description: `Get latest summary + +Get the latest audience-specific summary for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesGetAudienceSummary( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesGetMemberDefaultAudience.ts b/src/mcp-server/tools/audiencesGetMemberDefaultAudience.ts new file mode 100644 index 00000000..7316c97f --- /dev/null +++ b/src/mcp-server/tools/audiencesGetMemberDefaultAudience.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesGetMemberDefaultAudience } from "../../funcs/audiencesGetMemberDefaultAudience.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetMemberDefaultAudienceRequest$inboundSchema, +}; + +export const tool$audiencesGetMemberDefaultAudience: ToolDefinition< + typeof args +> = { + name: "audiences-get-member-default-audience", + description: `Get default audience + +Get member's default audience`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesGetMemberDefaultAudience( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesListAudienceSummaries.ts b/src/mcp-server/tools/audiencesListAudienceSummaries.ts new file mode 100644 index 00000000..ad96dc9e --- /dev/null +++ b/src/mcp-server/tools/audiencesListAudienceSummaries.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesListAudienceSummaries } from "../../funcs/audiencesListAudienceSummaries.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAudienceSummariesRequest$inboundSchema, +}; + +export const tool$audiencesListAudienceSummaries: ToolDefinition = + { + name: "audiences-list-audience-summaries", + description: `List audience summaries + +List all audience summaries for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesListAudienceSummaries( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/audiencesListAudiences.ts b/src/mcp-server/tools/audiencesListAudiences.ts new file mode 100644 index 00000000..a969a22b --- /dev/null +++ b/src/mcp-server/tools/audiencesListAudiences.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesListAudiences } from "../../funcs/audiencesListAudiences.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAudiencesRequest$inboundSchema, +}; + +export const tool$audiencesListAudiences: ToolDefinition = { + name: "audiences-list-audiences", + description: `List audiences + +List all audiences`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesListAudiences( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesRestoreAudience.ts b/src/mcp-server/tools/audiencesRestoreAudience.ts new file mode 100644 index 00000000..906ea6ca --- /dev/null +++ b/src/mcp-server/tools/audiencesRestoreAudience.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesRestoreAudience } from "../../funcs/audiencesRestoreAudience.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.RestoreAudienceRequest$inboundSchema, +}; + +export const tool$audiencesRestoreAudience: ToolDefinition = { + name: "audiences-restore-audience", + description: `Restore audience + +Restore a previously archived audience`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesRestoreAudience( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesSetMemberDefaultAudience.ts b/src/mcp-server/tools/audiencesSetMemberDefaultAudience.ts new file mode 100644 index 00000000..38293f2d --- /dev/null +++ b/src/mcp-server/tools/audiencesSetMemberDefaultAudience.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesSetMemberDefaultAudience } from "../../funcs/audiencesSetMemberDefaultAudience.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.SetMemberDefaultAudienceRequest$inboundSchema, +}; + +export const tool$audiencesSetMemberDefaultAudience: ToolDefinition< + typeof args +> = { + name: "audiences-set-member-default-audience", + description: `Set default audience + +Set member's default audience`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesSetMemberDefaultAudience( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/audiencesUpdateAudience.ts b/src/mcp-server/tools/audiencesUpdateAudience.ts new file mode 100644 index 00000000..626011e7 --- /dev/null +++ b/src/mcp-server/tools/audiencesUpdateAudience.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesUpdateAudience } from "../../funcs/audiencesUpdateAudience.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateAudienceRequest$inboundSchema, +}; + +export const tool$audiencesUpdateAudience: ToolDefinition = { + name: "audiences-update-audience", + description: `Update audience + +Update an existing audience`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await audiencesUpdateAudience( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/callRoutesListCallRoutes.ts b/src/mcp-server/tools/callRoutesListCallRoutes.ts new file mode 100644 index 00000000..905478d4 --- /dev/null +++ b/src/mcp-server/tools/callRoutesListCallRoutes.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { callRoutesListCallRoutes } from "../../funcs/callRoutesListCallRoutes.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListCallRoutesRequest$inboundSchema, +}; + +export const tool$callRoutesListCallRoutes: ToolDefinition = { + name: "call-routes-list-call-routes", + description: `List call routes + +List call routes for the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await callRoutesListCallRoutes( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesCreateEnvironment.ts b/src/mcp-server/tools/catalogEntriesCreateEnvironment.ts new file mode 100644 index 00000000..f6bb8349 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesCreateEnvironment.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesCreateEnvironment } from "../../funcs/catalogEntriesCreateEnvironment.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateEnvironment$inboundSchema, +}; + +export const tool$catalogEntriesCreateEnvironment: ToolDefinition = + { + name: "catalog-entries-create-environment", + description: `Create an environment + +Creates an environment for the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesCreateEnvironment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesCreateFunctionality.ts b/src/mcp-server/tools/catalogEntriesCreateFunctionality.ts new file mode 100644 index 00000000..26334a6b --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesCreateFunctionality.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesCreateFunctionality } from "../../funcs/catalogEntriesCreateFunctionality.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateFunctionality$inboundSchema, +}; + +export const tool$catalogEntriesCreateFunctionality: ToolDefinition< + typeof args +> = { + name: "catalog-entries-create-functionality", + description: `Create a functionality + +Creates a functionality for the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesCreateFunctionality( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesCreateService.ts b/src/mcp-server/tools/catalogEntriesCreateService.ts new file mode 100644 index 00000000..8a79111a --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesCreateService.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesCreateService } from "../../funcs/catalogEntriesCreateService.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateService$inboundSchema, +}; + +export const tool$catalogEntriesCreateService: ToolDefinition = { + name: "catalog-entries-create-service", + description: `Create a service + +Creates a service for the organization, you may also create or attach functionalities to the service on create.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesCreateService( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesCreateServiceChecklistResponse.ts b/src/mcp-server/tools/catalogEntriesCreateServiceChecklistResponse.ts new file mode 100644 index 00000000..545cf18b --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesCreateServiceChecklistResponse.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesCreateServiceChecklistResponse } from "../../funcs/catalogEntriesCreateServiceChecklistResponse.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateServiceChecklistResponseRequest$inboundSchema, +}; + +export const tool$catalogEntriesCreateServiceChecklistResponse: ToolDefinition< + typeof args +> = { + name: "catalog-entries-create-service-checklist-response", + description: `Record a response for a checklist item + +Creates a response for a checklist item`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await catalogEntriesCreateServiceChecklistResponse( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesCreateServiceDependency.ts b/src/mcp-server/tools/catalogEntriesCreateServiceDependency.ts new file mode 100644 index 00000000..fb93f592 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesCreateServiceDependency.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesCreateServiceDependency } from "../../funcs/catalogEntriesCreateServiceDependency.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateServiceDependency$inboundSchema, +}; + +export const tool$catalogEntriesCreateServiceDependency: ToolDefinition< + typeof args +> = { + name: "catalog-entries-create-service-dependency", + description: `Create a service dependency + +Creates a service dependency relationship between two services`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesCreateServiceDependency( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesCreateServiceLinks.ts b/src/mcp-server/tools/catalogEntriesCreateServiceLinks.ts new file mode 100644 index 00000000..6e9895ba --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesCreateServiceLinks.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesCreateServiceLinks } from "../../funcs/catalogEntriesCreateServiceLinks.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateServiceLinks$inboundSchema, +}; + +export const tool$catalogEntriesCreateServiceLinks: ToolDefinition< + typeof args +> = { + name: "catalog-entries-create-service-links", + description: `Create multiple services linked to external services + +Creates a service with the appropriate integration for each external service ID passed`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesCreateServiceLinks( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesDeleteEnvironment.ts b/src/mcp-server/tools/catalogEntriesDeleteEnvironment.ts new file mode 100644 index 00000000..132a061d --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesDeleteEnvironment.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesDeleteEnvironment } from "../../funcs/catalogEntriesDeleteEnvironment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteEnvironmentRequest$inboundSchema, +}; + +export const tool$catalogEntriesDeleteEnvironment: ToolDefinition = + { + name: "catalog-entries-delete-environment", + description: `Archive an environment + +Archive an environment`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesDeleteEnvironment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesDeleteFunctionality.ts b/src/mcp-server/tools/catalogEntriesDeleteFunctionality.ts new file mode 100644 index 00000000..e02b4fb5 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesDeleteFunctionality.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesDeleteFunctionality } from "../../funcs/catalogEntriesDeleteFunctionality.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteFunctionalityRequest$inboundSchema, +}; + +export const tool$catalogEntriesDeleteFunctionality: ToolDefinition< + typeof args +> = { + name: "catalog-entries-delete-functionality", + description: `Archive a functionality + +Archive a functionality`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesDeleteFunctionality( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesDeleteService.ts b/src/mcp-server/tools/catalogEntriesDeleteService.ts new file mode 100644 index 00000000..c603f44f --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesDeleteService.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesDeleteService } from "../../funcs/catalogEntriesDeleteService.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteServiceRequest$inboundSchema, +}; + +export const tool$catalogEntriesDeleteService: ToolDefinition = { + name: "catalog-entries-delete-service", + description: `Delete a service + +Deletes the service from FireHydrant.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesDeleteService( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesDeleteServiceDependency.ts b/src/mcp-server/tools/catalogEntriesDeleteServiceDependency.ts new file mode 100644 index 00000000..cb9e6d9e --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesDeleteServiceDependency.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesDeleteServiceDependency } from "../../funcs/catalogEntriesDeleteServiceDependency.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteServiceDependencyRequest$inboundSchema, +}; + +export const tool$catalogEntriesDeleteServiceDependency: ToolDefinition< + typeof args +> = { + name: "catalog-entries-delete-service-dependency", + description: `Delete a service dependency + +Deletes a single service dependency`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesDeleteServiceDependency( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesDeleteServiceLink.ts b/src/mcp-server/tools/catalogEntriesDeleteServiceLink.ts new file mode 100644 index 00000000..42e9893c --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesDeleteServiceLink.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesDeleteServiceLink } from "../../funcs/catalogEntriesDeleteServiceLink.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteServiceLinkRequest$inboundSchema, +}; + +export const tool$catalogEntriesDeleteServiceLink: ToolDefinition = + { + name: "catalog-entries-delete-service-link", + description: `Delete a service link + +Deletes a service link from FireHydrant.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesDeleteServiceLink( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesGetEnvironment.ts b/src/mcp-server/tools/catalogEntriesGetEnvironment.ts new file mode 100644 index 00000000..6a2b86ed --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesGetEnvironment.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesGetEnvironment } from "../../funcs/catalogEntriesGetEnvironment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetEnvironmentRequest$inboundSchema, +}; + +export const tool$catalogEntriesGetEnvironment: ToolDefinition = { + name: "catalog-entries-get-environment", + description: `Get an environment + +Retrieves a single environment by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesGetEnvironment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesGetFunctionality.ts b/src/mcp-server/tools/catalogEntriesGetFunctionality.ts new file mode 100644 index 00000000..c3a39bbe --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesGetFunctionality.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesGetFunctionality } from "../../funcs/catalogEntriesGetFunctionality.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetFunctionalityRequest$inboundSchema, +}; + +export const tool$catalogEntriesGetFunctionality: ToolDefinition = + { + name: "catalog-entries-get-functionality", + description: `Get a functionality + +Retrieves a single functionality by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesGetFunctionality( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesGetService.ts b/src/mcp-server/tools/catalogEntriesGetService.ts new file mode 100644 index 00000000..de2fadae --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesGetService.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesGetService } from "../../funcs/catalogEntriesGetService.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetServiceRequest$inboundSchema, +}; + +export const tool$catalogEntriesGetService: ToolDefinition = { + name: "catalog-entries-get-service", + description: `Get a service + +Retrieves a single service by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesGetService( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesGetServiceDependencies.ts b/src/mcp-server/tools/catalogEntriesGetServiceDependencies.ts new file mode 100644 index 00000000..804dc9bf --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesGetServiceDependencies.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesGetServiceDependencies } from "../../funcs/catalogEntriesGetServiceDependencies.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetServiceDependenciesRequest$inboundSchema, +}; + +export const tool$catalogEntriesGetServiceDependencies: ToolDefinition< + typeof args +> = { + name: "catalog-entries-get-service-dependencies", + description: `List dependencies for a service + +Retrieves a service's dependencies`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesGetServiceDependencies( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesGetServiceDependency.ts b/src/mcp-server/tools/catalogEntriesGetServiceDependency.ts new file mode 100644 index 00000000..d7aedf23 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesGetServiceDependency.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesGetServiceDependency } from "../../funcs/catalogEntriesGetServiceDependency.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetServiceDependencyRequest$inboundSchema, +}; + +export const tool$catalogEntriesGetServiceDependency: ToolDefinition< + typeof args +> = { + name: "catalog-entries-get-service-dependency", + description: `Get a service dependency + +Retrieves a single service dependency by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesGetServiceDependency( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesIngestCatalogData.ts b/src/mcp-server/tools/catalogEntriesIngestCatalogData.ts new file mode 100644 index 00000000..54114531 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesIngestCatalogData.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesIngestCatalogData } from "../../funcs/catalogEntriesIngestCatalogData.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.IngestCatalogDataRequest$inboundSchema, +}; + +export const tool$catalogEntriesIngestCatalogData: ToolDefinition = + { + name: "catalog-entries-ingest-catalog-data", + description: `Ingest service catalog data + +Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesIngestCatalogData( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesListEnvironments.ts b/src/mcp-server/tools/catalogEntriesListEnvironments.ts new file mode 100644 index 00000000..4cc70d2b --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListEnvironments.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListEnvironments } from "../../funcs/catalogEntriesListEnvironments.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListEnvironmentsRequest$inboundSchema, +}; + +export const tool$catalogEntriesListEnvironments: ToolDefinition = + { + name: "catalog-entries-list-environments", + description: `List environments + +List all of the environments that have been added to the organiation`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesListEnvironments( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesListFunctionalities.ts b/src/mcp-server/tools/catalogEntriesListFunctionalities.ts new file mode 100644 index 00000000..ee24c6be --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListFunctionalities.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListFunctionalities } from "../../funcs/catalogEntriesListFunctionalities.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListFunctionalitiesRequest$inboundSchema, +}; + +export const tool$catalogEntriesListFunctionalities: ToolDefinition< + typeof args +> = { + name: "catalog-entries-list-functionalities", + description: `List functionalities + +List all of the functionalities that have been added to the organiation`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesListFunctionalities( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesListFunctionalityServices.ts b/src/mcp-server/tools/catalogEntriesListFunctionalityServices.ts new file mode 100644 index 00000000..4ae1e326 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListFunctionalityServices.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListFunctionalityServices } from "../../funcs/catalogEntriesListFunctionalityServices.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListFunctionalityServicesRequest$inboundSchema, +}; + +export const tool$catalogEntriesListFunctionalityServices: ToolDefinition< + typeof args +> = { + name: "catalog-entries-list-functionality-services", + description: `List services for a functionality + +List services for a functionality`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesListFunctionalityServices( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesListInfrastructures.ts b/src/mcp-server/tools/catalogEntriesListInfrastructures.ts new file mode 100644 index 00000000..044299ef --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListInfrastructures.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListInfrastructures } from "../../funcs/catalogEntriesListInfrastructures.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListInfrastructuresRequest$inboundSchema, +}; + +export const tool$catalogEntriesListInfrastructures: ToolDefinition< + typeof args +> = { + name: "catalog-entries-list-infrastructures", + description: `Lists functionality, service and environment objects + +Lists functionality, service and environment objects`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesListInfrastructures( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesListServiceAvailableDownstreamDependencies.ts b/src/mcp-server/tools/catalogEntriesListServiceAvailableDownstreamDependencies.ts new file mode 100644 index 00000000..23d26505 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListServiceAvailableDownstreamDependencies.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListServiceAvailableDownstreamDependencies } from "../../funcs/catalogEntriesListServiceAvailableDownstreamDependencies.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: + operations.ListServiceAvailableDownstreamDependenciesRequest$inboundSchema, +}; + +export const tool$catalogEntriesListServiceAvailableDownstreamDependencies: + ToolDefinition = { + name: "catalog-entries-list-service-available-downstream-dependencies", + description: `List available downstream service dependencies + +Retrieves all services that are available to be downstream dependencies`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await catalogEntriesListServiceAvailableDownstreamDependencies( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesListServiceAvailableUpstreamDependencies.ts b/src/mcp-server/tools/catalogEntriesListServiceAvailableUpstreamDependencies.ts new file mode 100644 index 00000000..82fd124f --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListServiceAvailableUpstreamDependencies.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListServiceAvailableUpstreamDependencies } from "../../funcs/catalogEntriesListServiceAvailableUpstreamDependencies.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: + operations.ListServiceAvailableUpstreamDependenciesRequest$inboundSchema, +}; + +export const tool$catalogEntriesListServiceAvailableUpstreamDependencies: + ToolDefinition = { + name: "catalog-entries-list-service-available-upstream-dependencies", + description: `List available upstream service dependencies + +Retrieves all services that are available to be upstream dependencies`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await catalogEntriesListServiceAvailableUpstreamDependencies( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesListServices.ts b/src/mcp-server/tools/catalogEntriesListServices.ts new file mode 100644 index 00000000..ffec3a5e --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListServices.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListServices } from "../../funcs/catalogEntriesListServices.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListServicesRequest$inboundSchema, +}; + +export const tool$catalogEntriesListServices: ToolDefinition = { + name: "catalog-entries-list-services", + description: `List services + +List all of the services that have been added to the organization.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesListServices( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesListUserOwnedServices.ts b/src/mcp-server/tools/catalogEntriesListUserOwnedServices.ts new file mode 100644 index 00000000..3a612e75 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesListUserOwnedServices.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesListUserOwnedServices } from "../../funcs/catalogEntriesListUserOwnedServices.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListUserOwnedServicesRequest$inboundSchema, +}; + +export const tool$catalogEntriesListUserOwnedServices: ToolDefinition< + typeof args +> = { + name: "catalog-entries-list-user-owned-services", + description: `List services owned by a user's teams + +Retrieves a list of services owned by the teams a user is on`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesListUserOwnedServices( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesRefreshCatalog.ts b/src/mcp-server/tools/catalogEntriesRefreshCatalog.ts new file mode 100644 index 00000000..493989f8 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesRefreshCatalog.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesRefreshCatalog } from "../../funcs/catalogEntriesRefreshCatalog.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.RefreshCatalogRequest$inboundSchema, +}; + +export const tool$catalogEntriesRefreshCatalog: ToolDefinition = { + name: "catalog-entries-refresh-catalog", + description: `Refresh a service catalog + +Schedules an async task to re-import catalog info and update catalog data accordingly.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesRefreshCatalog( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesUpdateEnvironment.ts b/src/mcp-server/tools/catalogEntriesUpdateEnvironment.ts new file mode 100644 index 00000000..89ed1924 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesUpdateEnvironment.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesUpdateEnvironment } from "../../funcs/catalogEntriesUpdateEnvironment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateEnvironmentRequest$inboundSchema, +}; + +export const tool$catalogEntriesUpdateEnvironment: ToolDefinition = + { + name: "catalog-entries-update-environment", + description: `Update an environment + +Update a environments attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesUpdateEnvironment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/catalogEntriesUpdateFunctionality.ts b/src/mcp-server/tools/catalogEntriesUpdateFunctionality.ts new file mode 100644 index 00000000..92548d83 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesUpdateFunctionality.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesUpdateFunctionality } from "../../funcs/catalogEntriesUpdateFunctionality.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateFunctionalityRequest$inboundSchema, +}; + +export const tool$catalogEntriesUpdateFunctionality: ToolDefinition< + typeof args +> = { + name: "catalog-entries-update-functionality", + description: `Update a functionality + +Update a functionalities attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesUpdateFunctionality( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesUpdateService.ts b/src/mcp-server/tools/catalogEntriesUpdateService.ts new file mode 100644 index 00000000..746a1600 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesUpdateService.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesUpdateService } from "../../funcs/catalogEntriesUpdateService.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateServiceRequest$inboundSchema, +}; + +export const tool$catalogEntriesUpdateService: ToolDefinition = { + name: "catalog-entries-update-service", + description: `Update a service + +Update a services attributes, you may also add or remove functionalities from the service as well. +Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesUpdateService( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/catalogEntriesUpdateServiceDependency.ts b/src/mcp-server/tools/catalogEntriesUpdateServiceDependency.ts new file mode 100644 index 00000000..23eca006 --- /dev/null +++ b/src/mcp-server/tools/catalogEntriesUpdateServiceDependency.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesUpdateServiceDependency } from "../../funcs/catalogEntriesUpdateServiceDependency.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateServiceDependencyRequest$inboundSchema, +}; + +export const tool$catalogEntriesUpdateServiceDependency: ToolDefinition< + typeof args +> = { + name: "catalog-entries-update-service-dependency", + description: `Update a service dependency + +Update the notes of the service dependency`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await catalogEntriesUpdateServiceDependency( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesCreateChange.ts b/src/mcp-server/tools/changesCreateChange.ts new file mode 100644 index 00000000..815707d3 --- /dev/null +++ b/src/mcp-server/tools/changesCreateChange.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesCreateChange } from "../../funcs/changesCreateChange.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateChange$inboundSchema, +}; + +export const tool$changesCreateChange: ToolDefinition = { + name: "changes-create-change", + description: `Create a new change entry + +Create a new change entry`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesCreateChange( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesCreateChangeEvent.ts b/src/mcp-server/tools/changesCreateChangeEvent.ts new file mode 100644 index 00000000..6101e2d6 --- /dev/null +++ b/src/mcp-server/tools/changesCreateChangeEvent.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesCreateChangeEvent } from "../../funcs/changesCreateChangeEvent.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateChangeEvent$inboundSchema, +}; + +export const tool$changesCreateChangeEvent: ToolDefinition = { + name: "changes-create-change-event", + description: `Create a change event + +Create a change event`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesCreateChangeEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesCreateChangeIdentity.ts b/src/mcp-server/tools/changesCreateChangeIdentity.ts new file mode 100644 index 00000000..c7d9d88e --- /dev/null +++ b/src/mcp-server/tools/changesCreateChangeIdentity.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesCreateChangeIdentity } from "../../funcs/changesCreateChangeIdentity.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateChangeIdentityRequest$inboundSchema, +}; + +export const tool$changesCreateChangeIdentity: ToolDefinition = { + name: "changes-create-change-identity", + description: `Create an identity for a change entry + +Create an identity for the change entry`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesCreateChangeIdentity( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesDeleteChange.ts b/src/mcp-server/tools/changesDeleteChange.ts new file mode 100644 index 00000000..4ae56b7c --- /dev/null +++ b/src/mcp-server/tools/changesDeleteChange.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesDeleteChange } from "../../funcs/changesDeleteChange.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteChangeRequest$inboundSchema, +}; + +export const tool$changesDeleteChange: ToolDefinition = { + name: "changes-delete-change", + description: `Archive a change entry + +Archive a change entry`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesDeleteChange( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesDeleteChangeEvent.ts b/src/mcp-server/tools/changesDeleteChangeEvent.ts new file mode 100644 index 00000000..4056a7a3 --- /dev/null +++ b/src/mcp-server/tools/changesDeleteChangeEvent.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesDeleteChangeEvent } from "../../funcs/changesDeleteChangeEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteChangeEventRequest$inboundSchema, +}; + +export const tool$changesDeleteChangeEvent: ToolDefinition = { + name: "changes-delete-change-event", + description: `Delete a change event + +Delete a change event`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesDeleteChangeEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesDeleteChangeIdentity.ts b/src/mcp-server/tools/changesDeleteChangeIdentity.ts new file mode 100644 index 00000000..6030a65d --- /dev/null +++ b/src/mcp-server/tools/changesDeleteChangeIdentity.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesDeleteChangeIdentity } from "../../funcs/changesDeleteChangeIdentity.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteChangeIdentityRequest$inboundSchema, +}; + +export const tool$changesDeleteChangeIdentity: ToolDefinition = { + name: "changes-delete-change-identity", + description: `Delete an identity from a change entry + +Delete an identity from the change entry`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesDeleteChangeIdentity( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesGetChangeEvent.ts b/src/mcp-server/tools/changesGetChangeEvent.ts new file mode 100644 index 00000000..c81c776d --- /dev/null +++ b/src/mcp-server/tools/changesGetChangeEvent.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesGetChangeEvent } from "../../funcs/changesGetChangeEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetChangeEventRequest$inboundSchema, +}; + +export const tool$changesGetChangeEvent: ToolDefinition = { + name: "changes-get-change-event", + description: `Get a change event + +Retrieve a change event`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesGetChangeEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesListChangeEvents.ts b/src/mcp-server/tools/changesListChangeEvents.ts new file mode 100644 index 00000000..18fb2425 --- /dev/null +++ b/src/mcp-server/tools/changesListChangeEvents.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesListChangeEvents } from "../../funcs/changesListChangeEvents.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListChangeEventsRequest$inboundSchema, +}; + +export const tool$changesListChangeEvents: ToolDefinition = { + name: "changes-list-change-events", + description: `List change events + +List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesListChangeEvents( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesListChangeIdentities.ts b/src/mcp-server/tools/changesListChangeIdentities.ts new file mode 100644 index 00000000..0eafb5d6 --- /dev/null +++ b/src/mcp-server/tools/changesListChangeIdentities.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesListChangeIdentities } from "../../funcs/changesListChangeIdentities.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListChangeIdentitiesRequest$inboundSchema, +}; + +export const tool$changesListChangeIdentities: ToolDefinition = { + name: "changes-list-change-identities", + description: `List identities for a change entry + +Retrieve all identities for the change entry`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesListChangeIdentities( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesListChangeTypes.ts b/src/mcp-server/tools/changesListChangeTypes.ts new file mode 100644 index 00000000..55d258c4 --- /dev/null +++ b/src/mcp-server/tools/changesListChangeTypes.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesListChangeTypes } from "../../funcs/changesListChangeTypes.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListChangeTypesRequest$inboundSchema, +}; + +export const tool$changesListChangeTypes: ToolDefinition = { + name: "changes-list-change-types", + description: `List change types + +List change types for the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesListChangeTypes( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesListChanges.ts b/src/mcp-server/tools/changesListChanges.ts new file mode 100644 index 00000000..9bb3ba89 --- /dev/null +++ b/src/mcp-server/tools/changesListChanges.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesListChanges } from "../../funcs/changesListChanges.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListChangesRequest$inboundSchema, +}; + +export const tool$changesListChanges: ToolDefinition = { + name: "changes-list-changes", + description: `List changes + +List changes for the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesListChanges( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesUpdateChange.ts b/src/mcp-server/tools/changesUpdateChange.ts new file mode 100644 index 00000000..bf9e23b8 --- /dev/null +++ b/src/mcp-server/tools/changesUpdateChange.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesUpdateChange } from "../../funcs/changesUpdateChange.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateChangeRequest$inboundSchema, +}; + +export const tool$changesUpdateChange: ToolDefinition = { + name: "changes-update-change", + description: `Update a change entry + +Update a change entry`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesUpdateChange( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesUpdateChangeEvent.ts b/src/mcp-server/tools/changesUpdateChangeEvent.ts new file mode 100644 index 00000000..1abdba6b --- /dev/null +++ b/src/mcp-server/tools/changesUpdateChangeEvent.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesUpdateChangeEvent } from "../../funcs/changesUpdateChangeEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateChangeEventRequest$inboundSchema, +}; + +export const tool$changesUpdateChangeEvent: ToolDefinition = { + name: "changes-update-change-event", + description: `Update a change event + +Update a change event`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesUpdateChangeEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/changesUpdateChangeIdentity.ts b/src/mcp-server/tools/changesUpdateChangeIdentity.ts new file mode 100644 index 00000000..04d5046a --- /dev/null +++ b/src/mcp-server/tools/changesUpdateChangeIdentity.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { changesUpdateChangeIdentity } from "../../funcs/changesUpdateChangeIdentity.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateChangeIdentityRequest$inboundSchema, +}; + +export const tool$changesUpdateChangeIdentity: ToolDefinition = { + name: "changes-update-change-identity", + description: `Update an identity for a change entry + +Update an identity for the change entry`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await changesUpdateChangeIdentity( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/communicationCreateStatusUpdateTemplate.ts b/src/mcp-server/tools/communicationCreateStatusUpdateTemplate.ts new file mode 100644 index 00000000..b706f99a --- /dev/null +++ b/src/mcp-server/tools/communicationCreateStatusUpdateTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { communicationCreateStatusUpdateTemplate } from "../../funcs/communicationCreateStatusUpdateTemplate.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateStatusUpdateTemplate$inboundSchema, +}; + +export const tool$communicationCreateStatusUpdateTemplate: ToolDefinition< + typeof args +> = { + name: "communication-create-status-update-template", + description: `Create a status update template + +Create a status update template for your organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await communicationCreateStatusUpdateTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/communicationDeleteStatusUpdateTemplate.ts b/src/mcp-server/tools/communicationDeleteStatusUpdateTemplate.ts new file mode 100644 index 00000000..035d063f --- /dev/null +++ b/src/mcp-server/tools/communicationDeleteStatusUpdateTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { communicationDeleteStatusUpdateTemplate } from "../../funcs/communicationDeleteStatusUpdateTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteStatusUpdateTemplateRequest$inboundSchema, +}; + +export const tool$communicationDeleteStatusUpdateTemplate: ToolDefinition< + typeof args +> = { + name: "communication-delete-status-update-template", + description: `Delete a status update template + +Delete a single status update template`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await communicationDeleteStatusUpdateTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/communicationGetStatusUpdateTemplate.ts b/src/mcp-server/tools/communicationGetStatusUpdateTemplate.ts new file mode 100644 index 00000000..3d117681 --- /dev/null +++ b/src/mcp-server/tools/communicationGetStatusUpdateTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { communicationGetStatusUpdateTemplate } from "../../funcs/communicationGetStatusUpdateTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetStatusUpdateTemplateRequest$inboundSchema, +}; + +export const tool$communicationGetStatusUpdateTemplate: ToolDefinition< + typeof args +> = { + name: "communication-get-status-update-template", + description: `Get a status update template + +Get a single status update template by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await communicationGetStatusUpdateTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/communicationListStatusUpdateTemplates.ts b/src/mcp-server/tools/communicationListStatusUpdateTemplates.ts new file mode 100644 index 00000000..961419de --- /dev/null +++ b/src/mcp-server/tools/communicationListStatusUpdateTemplates.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { communicationListStatusUpdateTemplates } from "../../funcs/communicationListStatusUpdateTemplates.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListStatusUpdateTemplatesRequest$inboundSchema, +}; + +export const tool$communicationListStatusUpdateTemplates: ToolDefinition< + typeof args +> = { + name: "communication-list-status-update-templates", + description: `List status update templates + +List all status update templates for your organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await communicationListStatusUpdateTemplates( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/communicationUpdateStatusUpdateTemplate.ts b/src/mcp-server/tools/communicationUpdateStatusUpdateTemplate.ts new file mode 100644 index 00000000..da773a84 --- /dev/null +++ b/src/mcp-server/tools/communicationUpdateStatusUpdateTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { communicationUpdateStatusUpdateTemplate } from "../../funcs/communicationUpdateStatusUpdateTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateStatusUpdateTemplateRequest$inboundSchema, +}; + +export const tool$communicationUpdateStatusUpdateTemplate: ToolDefinition< + typeof args +> = { + name: "communication-update-status-update-template", + description: `Update a status update template + +Update a single status update template`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await communicationUpdateStatusUpdateTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsCreateComment.ts b/src/mcp-server/tools/conversationsCreateComment.ts new file mode 100644 index 00000000..0fcdbefd --- /dev/null +++ b/src/mcp-server/tools/conversationsCreateComment.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsCreateComment } from "../../funcs/conversationsCreateComment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateCommentRequest$inboundSchema, +}; + +export const tool$conversationsCreateComment: ToolDefinition = { + name: "conversations-create-comment", + description: `Create a conversation comment + +ALPHA - Creates a comment for a project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsCreateComment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsCreateCommentReaction.ts b/src/mcp-server/tools/conversationsCreateCommentReaction.ts new file mode 100644 index 00000000..fbb56487 --- /dev/null +++ b/src/mcp-server/tools/conversationsCreateCommentReaction.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsCreateCommentReaction } from "../../funcs/conversationsCreateCommentReaction.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateCommentReactionRequest$inboundSchema, +}; + +export const tool$conversationsCreateCommentReaction: ToolDefinition< + typeof args +> = { + name: "conversations-create-comment-reaction", + description: `Create a reaction for a conversation comment + +ALPHA - Create a reaction on a comment`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsCreateCommentReaction( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsDeleteComment.ts b/src/mcp-server/tools/conversationsDeleteComment.ts new file mode 100644 index 00000000..e67861f2 --- /dev/null +++ b/src/mcp-server/tools/conversationsDeleteComment.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsDeleteComment } from "../../funcs/conversationsDeleteComment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteCommentRequest$inboundSchema, +}; + +export const tool$conversationsDeleteComment: ToolDefinition = { + name: "conversations-delete-comment", + description: `Archive a conversation comment + +ALPHA - Archive a comment`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsDeleteComment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsDeleteCommentReaction.ts b/src/mcp-server/tools/conversationsDeleteCommentReaction.ts new file mode 100644 index 00000000..1e7cf56e --- /dev/null +++ b/src/mcp-server/tools/conversationsDeleteCommentReaction.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsDeleteCommentReaction } from "../../funcs/conversationsDeleteCommentReaction.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteCommentReactionRequest$inboundSchema, +}; + +export const tool$conversationsDeleteCommentReaction: ToolDefinition< + typeof args +> = { + name: "conversations-delete-comment-reaction", + description: `Delete a reaction from a conversation comment + +ALPHA - Archive a reaction`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsDeleteCommentReaction( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsGetComment.ts b/src/mcp-server/tools/conversationsGetComment.ts new file mode 100644 index 00000000..ca505db4 --- /dev/null +++ b/src/mcp-server/tools/conversationsGetComment.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsGetComment } from "../../funcs/conversationsGetComment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetCommentRequest$inboundSchema, +}; + +export const tool$conversationsGetComment: ToolDefinition = { + name: "conversations-get-comment", + description: `Get a conversation comment + +ALPHA - Retrieves a single comment by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsGetComment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsGetVoteStatus.ts b/src/mcp-server/tools/conversationsGetVoteStatus.ts new file mode 100644 index 00000000..767f63ab --- /dev/null +++ b/src/mcp-server/tools/conversationsGetVoteStatus.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsGetVoteStatus } from "../../funcs/conversationsGetVoteStatus.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetVoteStatusRequest$inboundSchema, +}; + +export const tool$conversationsGetVoteStatus: ToolDefinition = { + name: "conversations-get-vote-status", + description: `Get votes + +Get an object's current vote counts`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsGetVoteStatus( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsListCommentReactions.ts b/src/mcp-server/tools/conversationsListCommentReactions.ts new file mode 100644 index 00000000..5aef6d05 --- /dev/null +++ b/src/mcp-server/tools/conversationsListCommentReactions.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsListCommentReactions } from "../../funcs/conversationsListCommentReactions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListCommentReactionsRequest$inboundSchema, +}; + +export const tool$conversationsListCommentReactions: ToolDefinition< + typeof args +> = { + name: "conversations-list-comment-reactions", + description: `List reactions for a conversation comment + +ALPHA - List all of the reactions that have been added to a comment`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsListCommentReactions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsListComments.ts b/src/mcp-server/tools/conversationsListComments.ts new file mode 100644 index 00000000..7c58a091 --- /dev/null +++ b/src/mcp-server/tools/conversationsListComments.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsListComments } from "../../funcs/conversationsListComments.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListCommentsRequest$inboundSchema, +}; + +export const tool$conversationsListComments: ToolDefinition = { + name: "conversations-list-comments", + description: `List comments for a conversation + +ALPHA - List all of the comments that have been added to the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsListComments( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsUpdateComment.ts b/src/mcp-server/tools/conversationsUpdateComment.ts new file mode 100644 index 00000000..bd2d07fe --- /dev/null +++ b/src/mcp-server/tools/conversationsUpdateComment.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsUpdateComment } from "../../funcs/conversationsUpdateComment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateCommentRequest$inboundSchema, +}; + +export const tool$conversationsUpdateComment: ToolDefinition = { + name: "conversations-update-comment", + description: `Update a conversation comment + +ALPHA - Update a comment's attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsUpdateComment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/conversationsUpdateVote.ts b/src/mcp-server/tools/conversationsUpdateVote.ts new file mode 100644 index 00000000..885d4571 --- /dev/null +++ b/src/mcp-server/tools/conversationsUpdateVote.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { conversationsUpdateVote } from "../../funcs/conversationsUpdateVote.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateVoteRequest$inboundSchema, +}; + +export const tool$conversationsUpdateVote: ToolDefinition = { + name: "conversations-update-vote", + description: `Update votes + +Upvote or downvote an object`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await conversationsUpdateVote( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsCreateCustomFieldDefinition.ts b/src/mcp-server/tools/incidentSettingsCreateCustomFieldDefinition.ts new file mode 100644 index 00000000..629ef769 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateCustomFieldDefinition.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateCustomFieldDefinition } from "../../funcs/incidentSettingsCreateCustomFieldDefinition.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateCustomFieldDefinition$inboundSchema, +}; + +export const tool$incidentSettingsCreateCustomFieldDefinition: ToolDefinition< + typeof args +> = { + name: "incident-settings-create-custom-field-definition", + description: `Create a custom field definition + +Create a new custom field definition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsCreateCustomFieldDefinition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsCreateIncidentRole.ts b/src/mcp-server/tools/incidentSettingsCreateIncidentRole.ts new file mode 100644 index 00000000..ce3fec02 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateIncidentRole.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateIncidentRole } from "../../funcs/incidentSettingsCreateIncidentRole.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateIncidentRole$inboundSchema, +}; + +export const tool$incidentSettingsCreateIncidentRole: ToolDefinition< + typeof args +> = { + name: "incident-settings-create-incident-role", + description: `Create an incident role + +Create a new incident role`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsCreateIncidentRole( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsCreateIncidentType.ts b/src/mcp-server/tools/incidentSettingsCreateIncidentType.ts new file mode 100644 index 00000000..1f38d926 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateIncidentType.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateIncidentType } from "../../funcs/incidentSettingsCreateIncidentType.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateIncidentType$inboundSchema, +}; + +export const tool$incidentSettingsCreateIncidentType: ToolDefinition< + typeof args +> = { + name: "incident-settings-create-incident-type", + description: `Create an incident type + +Create a new incident type`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsCreateIncidentType( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsCreateLifecycleMeasurementDefinition.ts b/src/mcp-server/tools/incidentSettingsCreateLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..2f2d01c8 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateLifecycleMeasurementDefinition.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateLifecycleMeasurementDefinition } from "../../funcs/incidentSettingsCreateLifecycleMeasurementDefinition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateLifecycleMeasurementDefinitionRequest$inboundSchema, +}; + +export const tool$incidentSettingsCreateLifecycleMeasurementDefinition: + ToolDefinition = { + name: "incident-settings-create-lifecycle-measurement-definition", + description: `Create a measurement definition + +Create a new measurement definition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsCreateLifecycleMeasurementDefinition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsCreateLifecycleMilestone.ts b/src/mcp-server/tools/incidentSettingsCreateLifecycleMilestone.ts new file mode 100644 index 00000000..15835ab6 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateLifecycleMilestone.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateLifecycleMilestone } from "../../funcs/incidentSettingsCreateLifecycleMilestone.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateLifecycleMilestoneRequest$inboundSchema, +}; + +export const tool$incidentSettingsCreateLifecycleMilestone: ToolDefinition< + typeof args +> = { + name: "incident-settings-create-lifecycle-milestone", + description: `Create a milestone + +Create a new milestone`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsCreateLifecycleMilestone( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsCreatePriority.ts b/src/mcp-server/tools/incidentSettingsCreatePriority.ts new file mode 100644 index 00000000..4f06601f --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreatePriority.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreatePriority } from "../../funcs/incidentSettingsCreatePriority.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreatePriority$inboundSchema, +}; + +export const tool$incidentSettingsCreatePriority: ToolDefinition = + { + name: "incident-settings-create-priority", + description: `Create a priority + +Create a new priority`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsCreatePriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsCreateSeverity.ts b/src/mcp-server/tools/incidentSettingsCreateSeverity.ts new file mode 100644 index 00000000..b02a6bd6 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateSeverity.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateSeverity } from "../../funcs/incidentSettingsCreateSeverity.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateSeverity$inboundSchema, +}; + +export const tool$incidentSettingsCreateSeverity: ToolDefinition = + { + name: "incident-settings-create-severity", + description: `Create a severity + +Create a new severity`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsCreateSeverity( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsCreateSeverityMatrixCondition.ts b/src/mcp-server/tools/incidentSettingsCreateSeverityMatrixCondition.ts new file mode 100644 index 00000000..922bfe8e --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateSeverityMatrixCondition.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateSeverityMatrixCondition } from "../../funcs/incidentSettingsCreateSeverityMatrixCondition.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateSeverityMatrixCondition$inboundSchema, +}; + +export const tool$incidentSettingsCreateSeverityMatrixCondition: ToolDefinition< + typeof args +> = { + name: "incident-settings-create-severity-matrix-condition", + description: `Create a severity matrix condition + +Create a new condition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsCreateSeverityMatrixCondition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsCreateSeverityMatrixImpact.ts b/src/mcp-server/tools/incidentSettingsCreateSeverityMatrixImpact.ts new file mode 100644 index 00000000..125759fc --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsCreateSeverityMatrixImpact.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsCreateSeverityMatrixImpact } from "../../funcs/incidentSettingsCreateSeverityMatrixImpact.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateSeverityMatrixImpact$inboundSchema, +}; + +export const tool$incidentSettingsCreateSeverityMatrixImpact: ToolDefinition< + typeof args +> = { + name: "incident-settings-create-severity-matrix-impact", + description: `Create a severity matrix impact + +Create a new impact`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsCreateSeverityMatrixImpact( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsDeleteCustomFieldDefinition.ts b/src/mcp-server/tools/incidentSettingsDeleteCustomFieldDefinition.ts new file mode 100644 index 00000000..6d5da19c --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteCustomFieldDefinition.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteCustomFieldDefinition } from "../../funcs/incidentSettingsDeleteCustomFieldDefinition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteCustomFieldDefinitionRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteCustomFieldDefinition: ToolDefinition< + typeof args +> = { + name: "incident-settings-delete-custom-field-definition", + description: `Delete a custom field definition + +Delete a custom field definition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsDeleteCustomFieldDefinition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsDeleteIncidentRole.ts b/src/mcp-server/tools/incidentSettingsDeleteIncidentRole.ts new file mode 100644 index 00000000..8f10844d --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteIncidentRole.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteIncidentRole } from "../../funcs/incidentSettingsDeleteIncidentRole.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentRoleRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteIncidentRole: ToolDefinition< + typeof args +> = { + name: "incident-settings-delete-incident-role", + description: `Archive an incident role + +Archives an incident role which will hide it from lists and metrics`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsDeleteIncidentRole( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsDeleteIncidentType.ts b/src/mcp-server/tools/incidentSettingsDeleteIncidentType.ts new file mode 100644 index 00000000..237a8e07 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteIncidentType.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteIncidentType } from "../../funcs/incidentSettingsDeleteIncidentType.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentTypeRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteIncidentType: ToolDefinition< + typeof args +> = { + name: "incident-settings-delete-incident-type", + description: `Archive an incident type + +Archives an incident type which will hide it from lists and metrics`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsDeleteIncidentType( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsDeleteLifecycleMeasurementDefinition.ts b/src/mcp-server/tools/incidentSettingsDeleteLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..4e7bd951 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteLifecycleMeasurementDefinition.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteLifecycleMeasurementDefinition } from "../../funcs/incidentSettingsDeleteLifecycleMeasurementDefinition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteLifecycleMeasurementDefinitionRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteLifecycleMeasurementDefinition: + ToolDefinition = { + name: "incident-settings-delete-lifecycle-measurement-definition", + description: `Archive a measurement definition + +Archives a measurement definition which will hide it from lists and metrics`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsDeleteLifecycleMeasurementDefinition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsDeleteLifecycleMilestone.ts b/src/mcp-server/tools/incidentSettingsDeleteLifecycleMilestone.ts new file mode 100644 index 00000000..34915dcd --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteLifecycleMilestone.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteLifecycleMilestone } from "../../funcs/incidentSettingsDeleteLifecycleMilestone.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteLifecycleMilestoneRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteLifecycleMilestone: ToolDefinition< + typeof args +> = { + name: "incident-settings-delete-lifecycle-milestone", + description: `Delete a milestone + +Delete a milestone`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsDeleteLifecycleMilestone( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsDeletePriority.ts b/src/mcp-server/tools/incidentSettingsDeletePriority.ts new file mode 100644 index 00000000..89528097 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeletePriority.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeletePriority } from "../../funcs/incidentSettingsDeletePriority.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeletePriorityRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeletePriority: ToolDefinition = + { + name: "incident-settings-delete-priority", + description: `Delete a priority + +Delete a specific priority`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsDeletePriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsDeleteSeverity.ts b/src/mcp-server/tools/incidentSettingsDeleteSeverity.ts new file mode 100644 index 00000000..d38cc7b3 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteSeverity.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteSeverity } from "../../funcs/incidentSettingsDeleteSeverity.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteSeverityRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteSeverity: ToolDefinition = + { + name: "incident-settings-delete-severity", + description: `Delete a severity + +Delete a specific severity`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsDeleteSeverity( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsDeleteSeverityMatrixCondition.ts b/src/mcp-server/tools/incidentSettingsDeleteSeverityMatrixCondition.ts new file mode 100644 index 00000000..cb71175c --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteSeverityMatrixCondition.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteSeverityMatrixCondition } from "../../funcs/incidentSettingsDeleteSeverityMatrixCondition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteSeverityMatrixConditionRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteSeverityMatrixCondition: ToolDefinition< + typeof args +> = { + name: "incident-settings-delete-severity-matrix-condition", + description: `Delete a severity matrix condition + +Delete a specific condition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsDeleteSeverityMatrixCondition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsDeleteSeverityMatrixImpact.ts b/src/mcp-server/tools/incidentSettingsDeleteSeverityMatrixImpact.ts new file mode 100644 index 00000000..b3299b9d --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsDeleteSeverityMatrixImpact.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsDeleteSeverityMatrixImpact } from "../../funcs/incidentSettingsDeleteSeverityMatrixImpact.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteSeverityMatrixImpactRequest$inboundSchema, +}; + +export const tool$incidentSettingsDeleteSeverityMatrixImpact: ToolDefinition< + typeof args +> = { + name: "incident-settings-delete-severity-matrix-impact", + description: `Delete a severity matrix impact + +Delete a specific impact`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsDeleteSeverityMatrixImpact( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsGetFormConfiguration.ts b/src/mcp-server/tools/incidentSettingsGetFormConfiguration.ts new file mode 100644 index 00000000..05a0ab66 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetFormConfiguration.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetFormConfiguration } from "../../funcs/incidentSettingsGetFormConfiguration.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetFormConfigurationRequest$inboundSchema, +}; + +export const tool$incidentSettingsGetFormConfiguration: ToolDefinition< + typeof args +> = { + name: "incident-settings-get-form-configuration", + description: `Get a form configuration + +Get a form configuration`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsGetFormConfiguration( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsGetIncidentRole.ts b/src/mcp-server/tools/incidentSettingsGetIncidentRole.ts new file mode 100644 index 00000000..3ad148ef --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetIncidentRole.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetIncidentRole } from "../../funcs/incidentSettingsGetIncidentRole.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentRoleRequest$inboundSchema, +}; + +export const tool$incidentSettingsGetIncidentRole: ToolDefinition = + { + name: "incident-settings-get-incident-role", + description: `Get an incident role + +Retrieve a single incident role from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsGetIncidentRole( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsGetIncidentType.ts b/src/mcp-server/tools/incidentSettingsGetIncidentType.ts new file mode 100644 index 00000000..6d1c2b05 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetIncidentType.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetIncidentType } from "../../funcs/incidentSettingsGetIncidentType.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentTypeRequest$inboundSchema, +}; + +export const tool$incidentSettingsGetIncidentType: ToolDefinition = + { + name: "incident-settings-get-incident-type", + description: `Get an incident type + +Retrieve a single incident type from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsGetIncidentType( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsGetLifecycleMeasurementDefinition.ts b/src/mcp-server/tools/incidentSettingsGetLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..c15d40e2 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetLifecycleMeasurementDefinition.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetLifecycleMeasurementDefinition } from "../../funcs/incidentSettingsGetLifecycleMeasurementDefinition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetLifecycleMeasurementDefinitionRequest$inboundSchema, +}; + +export const tool$incidentSettingsGetLifecycleMeasurementDefinition: + ToolDefinition = { + name: "incident-settings-get-lifecycle-measurement-definition", + description: `Get a measurement definition + +Retrieve a single measurement definition from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsGetLifecycleMeasurementDefinition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsGetPriority.ts b/src/mcp-server/tools/incidentSettingsGetPriority.ts new file mode 100644 index 00000000..e59a45e7 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetPriority.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetPriority } from "../../funcs/incidentSettingsGetPriority.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetPriorityRequest$inboundSchema, +}; + +export const tool$incidentSettingsGetPriority: ToolDefinition = { + name: "incident-settings-get-priority", + description: `Get a priority + +Retrieve a specific priority`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsGetPriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsGetSeverity.ts b/src/mcp-server/tools/incidentSettingsGetSeverity.ts new file mode 100644 index 00000000..b765f4ca --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetSeverity.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetSeverity } from "../../funcs/incidentSettingsGetSeverity.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSeverityRequest$inboundSchema, +}; + +export const tool$incidentSettingsGetSeverity: ToolDefinition = { + name: "incident-settings-get-severity", + description: `Get a severity + +Retrieve a specific severity`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsGetSeverity( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsGetSeverityMatrix.ts b/src/mcp-server/tools/incidentSettingsGetSeverityMatrix.ts new file mode 100644 index 00000000..bfa17e66 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetSeverityMatrix.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetSeverityMatrix } from "../../funcs/incidentSettingsGetSeverityMatrix.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$incidentSettingsGetSeverityMatrix: ToolDefinition = { + name: "incident-settings-get-severity-matrix", + description: `Get severity matrix + +Retrieve the Severity matrix for your organization and its components and configured severities.`, + tool: async (client, ctx) => { + const [result, apiCall] = await incidentSettingsGetSeverityMatrix( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsGetSeverityMatrixCondition.ts b/src/mcp-server/tools/incidentSettingsGetSeverityMatrixCondition.ts new file mode 100644 index 00000000..8c418963 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsGetSeverityMatrixCondition.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsGetSeverityMatrixCondition } from "../../funcs/incidentSettingsGetSeverityMatrixCondition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSeverityMatrixConditionRequest$inboundSchema, +}; + +export const tool$incidentSettingsGetSeverityMatrixCondition: ToolDefinition< + typeof args +> = { + name: "incident-settings-get-severity-matrix-condition", + description: `Get a severity matrix condition + +Retrieve a specific condition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsGetSeverityMatrixCondition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListCustomFieldDefinitions.ts b/src/mcp-server/tools/incidentSettingsListCustomFieldDefinitions.ts new file mode 100644 index 00000000..47f5c788 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListCustomFieldDefinitions.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListCustomFieldDefinitions } from "../../funcs/incidentSettingsListCustomFieldDefinitions.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$incidentSettingsListCustomFieldDefinitions: ToolDefinition = { + name: "incident-settings-list-custom-field-definitions", + description: `List custom field definitions + +List all custom field definitions`, + tool: async (client, ctx) => { + const [result, apiCall] = await incidentSettingsListCustomFieldDefinitions( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListCustomFieldSelectOptions.ts b/src/mcp-server/tools/incidentSettingsListCustomFieldSelectOptions.ts new file mode 100644 index 00000000..2b4ed4bd --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListCustomFieldSelectOptions.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListCustomFieldSelectOptions } from "../../funcs/incidentSettingsListCustomFieldSelectOptions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListCustomFieldSelectOptionsRequest$inboundSchema, +}; + +export const tool$incidentSettingsListCustomFieldSelectOptions: ToolDefinition< + typeof args +> = { + name: "incident-settings-list-custom-field-select-options", + description: `Get available values for a custom field + +Get the permissible values for the a currently active custom select or multi-select field.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsListCustomFieldSelectOptions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListIncidentRoles.ts b/src/mcp-server/tools/incidentSettingsListIncidentRoles.ts new file mode 100644 index 00000000..2488884c --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListIncidentRoles.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListIncidentRoles } from "../../funcs/incidentSettingsListIncidentRoles.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentRolesRequest$inboundSchema, +}; + +export const tool$incidentSettingsListIncidentRoles: ToolDefinition< + typeof args +> = { + name: "incident-settings-list-incident-roles", + description: `List incident roles + +List all of the incident roles in the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsListIncidentRoles( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListIncidentTags.ts b/src/mcp-server/tools/incidentSettingsListIncidentTags.ts new file mode 100644 index 00000000..68b9dad3 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListIncidentTags.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListIncidentTags } from "../../funcs/incidentSettingsListIncidentTags.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentTagsRequest$inboundSchema, +}; + +export const tool$incidentSettingsListIncidentTags: ToolDefinition< + typeof args +> = { + name: "incident-settings-list-incident-tags", + description: `List incident tags + +List all of the incident tags in the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsListIncidentTags( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListIncidentTypes.ts b/src/mcp-server/tools/incidentSettingsListIncidentTypes.ts new file mode 100644 index 00000000..4733eee0 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListIncidentTypes.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListIncidentTypes } from "../../funcs/incidentSettingsListIncidentTypes.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentTypesRequest$inboundSchema, +}; + +export const tool$incidentSettingsListIncidentTypes: ToolDefinition< + typeof args +> = { + name: "incident-settings-list-incident-types", + description: `List incident types + +List all of the incident types in the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsListIncidentTypes( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListLifecycleMeasurementDefinitions.ts b/src/mcp-server/tools/incidentSettingsListLifecycleMeasurementDefinitions.ts new file mode 100644 index 00000000..82a1ff92 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListLifecycleMeasurementDefinitions.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListLifecycleMeasurementDefinitions } from "../../funcs/incidentSettingsListLifecycleMeasurementDefinitions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListLifecycleMeasurementDefinitionsRequest$inboundSchema, +}; + +export const tool$incidentSettingsListLifecycleMeasurementDefinitions: + ToolDefinition = { + name: "incident-settings-list-lifecycle-measurement-definitions", + description: `List measurement definitions + +List all of the measurement definitions in the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsListLifecycleMeasurementDefinitions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsListLifecyclePhases.ts b/src/mcp-server/tools/incidentSettingsListLifecyclePhases.ts new file mode 100644 index 00000000..61b15850 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListLifecyclePhases.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListLifecyclePhases } from "../../funcs/incidentSettingsListLifecyclePhases.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$incidentSettingsListLifecyclePhases: ToolDefinition = { + name: "incident-settings-list-lifecycle-phases", + description: `List phases and milestones + +List all of the lifecycle phases and milestones in the organization`, + tool: async (client, ctx) => { + const [result, apiCall] = await incidentSettingsListLifecyclePhases( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListPriorities.ts b/src/mcp-server/tools/incidentSettingsListPriorities.ts new file mode 100644 index 00000000..6eff605e --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListPriorities.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListPriorities } from "../../funcs/incidentSettingsListPriorities.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListPrioritiesRequest$inboundSchema, +}; + +export const tool$incidentSettingsListPriorities: ToolDefinition = + { + name: "incident-settings-list-priorities", + description: `List priorities + +Lists priorities`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsListPriorities( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsListSeverities.ts b/src/mcp-server/tools/incidentSettingsListSeverities.ts new file mode 100644 index 00000000..ed51124d --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListSeverities.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListSeverities } from "../../funcs/incidentSettingsListSeverities.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSeveritiesRequest$inboundSchema, +}; + +export const tool$incidentSettingsListSeverities: ToolDefinition = + { + name: "incident-settings-list-severities", + description: `List severities + +Lists severities`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsListSeverities( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsListSeverityMatrixConditions.ts b/src/mcp-server/tools/incidentSettingsListSeverityMatrixConditions.ts new file mode 100644 index 00000000..ef3a5904 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListSeverityMatrixConditions.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListSeverityMatrixConditions } from "../../funcs/incidentSettingsListSeverityMatrixConditions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSeverityMatrixConditionsRequest$inboundSchema, +}; + +export const tool$incidentSettingsListSeverityMatrixConditions: ToolDefinition< + typeof args +> = { + name: "incident-settings-list-severity-matrix-conditions", + description: `List severity matrix conditions + +Lists conditions`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsListSeverityMatrixConditions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsListSeverityMatrixImpacts.ts b/src/mcp-server/tools/incidentSettingsListSeverityMatrixImpacts.ts new file mode 100644 index 00000000..a3dbf296 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsListSeverityMatrixImpacts.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsListSeverityMatrixImpacts } from "../../funcs/incidentSettingsListSeverityMatrixImpacts.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSeverityMatrixImpactsRequest$inboundSchema, +}; + +export const tool$incidentSettingsListSeverityMatrixImpacts: ToolDefinition< + typeof args +> = { + name: "incident-settings-list-severity-matrix-impacts", + description: `List severity matrix impacts + +Lists impacts`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsListSeverityMatrixImpacts( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsUpdateCustomFieldDefinition.ts b/src/mcp-server/tools/incidentSettingsUpdateCustomFieldDefinition.ts new file mode 100644 index 00000000..d98df8b3 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateCustomFieldDefinition.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateCustomFieldDefinition } from "../../funcs/incidentSettingsUpdateCustomFieldDefinition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateCustomFieldDefinitionRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateCustomFieldDefinition: ToolDefinition< + typeof args +> = { + name: "incident-settings-update-custom-field-definition", + description: `Update a custom field definition + +Update a single custom field definition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdateCustomFieldDefinition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsUpdateIncidentRole.ts b/src/mcp-server/tools/incidentSettingsUpdateIncidentRole.ts new file mode 100644 index 00000000..5706904e --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateIncidentRole.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateIncidentRole } from "../../funcs/incidentSettingsUpdateIncidentRole.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentRoleRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateIncidentRole: ToolDefinition< + typeof args +> = { + name: "incident-settings-update-incident-role", + description: `Update an incident role + +Update a single incident role from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdateIncidentRole( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsUpdateIncidentType.ts b/src/mcp-server/tools/incidentSettingsUpdateIncidentType.ts new file mode 100644 index 00000000..7f224d7a --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateIncidentType.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateIncidentType } from "../../funcs/incidentSettingsUpdateIncidentType.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentTypeRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateIncidentType: ToolDefinition< + typeof args +> = { + name: "incident-settings-update-incident-type", + description: `Update an incident type + +Update a single incident type from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdateIncidentType( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsUpdateLifecycleMeasurementDefinition.ts b/src/mcp-server/tools/incidentSettingsUpdateLifecycleMeasurementDefinition.ts new file mode 100644 index 00000000..6761e1e6 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateLifecycleMeasurementDefinition.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateLifecycleMeasurementDefinition } from "../../funcs/incidentSettingsUpdateLifecycleMeasurementDefinition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateLifecycleMeasurementDefinitionRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateLifecycleMeasurementDefinition: + ToolDefinition = { + name: "incident-settings-update-lifecycle-measurement-definition", + description: `Update a measurement definition + +Update a single measurement definition from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsUpdateLifecycleMeasurementDefinition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsUpdateLifecycleMilestone.ts b/src/mcp-server/tools/incidentSettingsUpdateLifecycleMilestone.ts new file mode 100644 index 00000000..fa68d316 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateLifecycleMilestone.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateLifecycleMilestone } from "../../funcs/incidentSettingsUpdateLifecycleMilestone.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateLifecycleMilestoneRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateLifecycleMilestone: ToolDefinition< + typeof args +> = { + name: "incident-settings-update-lifecycle-milestone", + description: `Update a milestone + +Update a milestone`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdateLifecycleMilestone( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsUpdatePriority.ts b/src/mcp-server/tools/incidentSettingsUpdatePriority.ts new file mode 100644 index 00000000..07c11179 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdatePriority.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdatePriority } from "../../funcs/incidentSettingsUpdatePriority.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdatePriorityRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdatePriority: ToolDefinition = + { + name: "incident-settings-update-priority", + description: `Update a priority + +Update a specific priority`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdatePriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsUpdateSeverity.ts b/src/mcp-server/tools/incidentSettingsUpdateSeverity.ts new file mode 100644 index 00000000..9b93d486 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateSeverity.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateSeverity } from "../../funcs/incidentSettingsUpdateSeverity.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateSeverityRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateSeverity: ToolDefinition = + { + name: "incident-settings-update-severity", + description: `Update a severity + +Update a specific severity`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdateSeverity( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrix.ts b/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrix.ts new file mode 100644 index 00000000..ca1b9811 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrix.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateSeverityMatrix } from "../../funcs/incidentSettingsUpdateSeverityMatrix.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.UpdateSeverityMatrix$inboundSchema, +}; + +export const tool$incidentSettingsUpdateSeverityMatrix: ToolDefinition< + typeof args +> = { + name: "incident-settings-update-severity-matrix", + description: `Update severity matrix + +Update available severities and impacts in your organization's severity matrix.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdateSeverityMatrix( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrixCondition.ts b/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrixCondition.ts new file mode 100644 index 00000000..de047c0b --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrixCondition.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateSeverityMatrixCondition } from "../../funcs/incidentSettingsUpdateSeverityMatrixCondition.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateSeverityMatrixConditionRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateSeverityMatrixCondition: ToolDefinition< + typeof args +> = { + name: "incident-settings-update-severity-matrix-condition", + description: `Update a severity matrix condition + +Update a severity matrix condition`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await incidentSettingsUpdateSeverityMatrixCondition( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrixImpact.ts b/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrixImpact.ts new file mode 100644 index 00000000..fba37310 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsUpdateSeverityMatrixImpact.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentSettingsUpdateSeverityMatrixImpact } from "../../funcs/incidentSettingsUpdateSeverityMatrixImpact.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateSeverityMatrixImpactRequest$inboundSchema, +}; + +export const tool$incidentSettingsUpdateSeverityMatrixImpact: ToolDefinition< + typeof args +> = { + name: "incident-settings-update-severity-matrix-impact", + description: `Update a severity matrix impact + +Update a severity matrix impact`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsUpdateSeverityMatrixImpact( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentSettingsValidateIncidentTags.ts b/src/mcp-server/tools/incidentSettingsValidateIncidentTags.ts new file mode 100644 index 00000000..6b499312 --- /dev/null +++ b/src/mcp-server/tools/incidentSettingsValidateIncidentTags.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { incidentSettingsValidateIncidentTags } from "../../funcs/incidentSettingsValidateIncidentTags.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: z.array(z.string()), +}; + +export const tool$incidentSettingsValidateIncidentTags: ToolDefinition< + typeof args +> = { + name: "incident-settings-validate-incident-tags", + description: `Validate incident tags + +Validate the format of a list of tags`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentSettingsValidateIncidentTags( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsBulkUpdateIncidentMilestones.ts b/src/mcp-server/tools/incidentsBulkUpdateIncidentMilestones.ts new file mode 100644 index 00000000..d6867037 --- /dev/null +++ b/src/mcp-server/tools/incidentsBulkUpdateIncidentMilestones.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsBulkUpdateIncidentMilestones } from "../../funcs/incidentsBulkUpdateIncidentMilestones.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.BulkUpdateIncidentMilestonesRequest$inboundSchema, +}; + +export const tool$incidentsBulkUpdateIncidentMilestones: ToolDefinition< + typeof args +> = { + name: "incidents-bulk-update-incident-milestones", + description: `Update milestone times + +Update milestone times in bulk for a given incident. All milestone +times for an incident must occur in chronological order +corresponding to the configured order of milestones. If the result +of this request would cause any milestone(s) to appear out of place, +a 422 response will instead be returned. This includes milestones +not explicitly submitted or updated in this request. +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsBulkUpdateIncidentMilestones( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCloseIncident.ts b/src/mcp-server/tools/incidentsCloseIncident.ts new file mode 100644 index 00000000..2aa86a3c --- /dev/null +++ b/src/mcp-server/tools/incidentsCloseIncident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCloseIncident } from "../../funcs/incidentsCloseIncident.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CloseIncidentRequest$inboundSchema, +}; + +export const tool$incidentsCloseIncident: ToolDefinition = { + name: "incidents-close-incident", + description: `Close an incident + +Closes an incident and optionally close all children`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCloseIncident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncident.ts b/src/mcp-server/tools/incidentsCreateIncident.ts new file mode 100644 index 00000000..5dd39210 --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncident } from "../../funcs/incidentsCreateIncident.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateIncident$inboundSchema, +}; + +export const tool$incidentsCreateIncident: ToolDefinition = { + name: "incidents-create-incident", + description: `Create an incident + +Create a new incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentAttachment.ts b/src/mcp-server/tools/incidentsCreateIncidentAttachment.ts new file mode 100644 index 00000000..352f43d0 --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentAttachment.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentAttachment } from "../../funcs/incidentsCreateIncidentAttachment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentAttachmentRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentAttachment: ToolDefinition< + typeof args +> = { + name: "incidents-create-incident-attachment", + description: `Add an attachment to the incident timeline + +Allows adding image attachments to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentAttachment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentChangeEvent.ts b/src/mcp-server/tools/incidentsCreateIncidentChangeEvent.ts new file mode 100644 index 00000000..653658d5 --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentChangeEvent.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentChangeEvent } from "../../funcs/incidentsCreateIncidentChangeEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentChangeEventRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentChangeEvent: ToolDefinition< + typeof args +> = { + name: "incidents-create-incident-change-event", + description: `Add a related change to an incident + +Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentChangeEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentChatMessage.ts b/src/mcp-server/tools/incidentsCreateIncidentChatMessage.ts new file mode 100644 index 00000000..5614467d --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentChatMessage.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentChatMessage } from "../../funcs/incidentsCreateIncidentChatMessage.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentChatMessageRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentChatMessage: ToolDefinition< + typeof args +> = { + name: "incidents-create-incident-chat-message", + description: `Add a chat message to an incident + +Create a new generic chat message on an incident timeline. These are independent of any specific chat provider.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentChatMessage( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentImpact.ts b/src/mcp-server/tools/incidentsCreateIncidentImpact.ts new file mode 100644 index 00000000..3ae022fb --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentImpact.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentImpact } from "../../funcs/incidentsCreateIncidentImpact.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentImpactRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentImpact: ToolDefinition = { + name: "incidents-create-incident-impact", + description: `Add impacted infrastructure to an incident + +Add impacted infrastructure to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentImpact( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentLink.ts b/src/mcp-server/tools/incidentsCreateIncidentLink.ts new file mode 100644 index 00000000..cff8f74c --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentLink.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentLink } from "../../funcs/incidentsCreateIncidentLink.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentLinkRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentLink: ToolDefinition = { + name: "incidents-create-incident-link", + description: `Add a link to an incident + +Allows adding adhoc links to an incident as an attachment`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentLink( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentNote.ts b/src/mcp-server/tools/incidentsCreateIncidentNote.ts new file mode 100644 index 00000000..712459c5 --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentNote.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentNote } from "../../funcs/incidentsCreateIncidentNote.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentNoteRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentNote: ToolDefinition = { + name: "incidents-create-incident-note", + description: `Add a note to an incident + +Create a new note on for an incident. The visibility field on a note determines where it gets posted.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentNote( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentRoleAssignment.ts b/src/mcp-server/tools/incidentsCreateIncidentRoleAssignment.ts new file mode 100644 index 00000000..d6dc76b3 --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentRoleAssignment.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentRoleAssignment } from "../../funcs/incidentsCreateIncidentRoleAssignment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentRoleAssignmentRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentRoleAssignment: ToolDefinition< + typeof args +> = { + name: "incidents-create-incident-role-assignment", + description: `Assign a user to an incident + +Assign a role to a user for this incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentRoleAssignment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentStatusPage.ts b/src/mcp-server/tools/incidentsCreateIncidentStatusPage.ts new file mode 100644 index 00000000..d2355b1e --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentStatusPage.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentStatusPage } from "../../funcs/incidentsCreateIncidentStatusPage.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentStatusPageRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentStatusPage: ToolDefinition< + typeof args +> = { + name: "incidents-create-incident-status-page", + description: `Add a status page to an incident + +Add a status page to an incident.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentStatusPage( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateIncidentTeamAssignment.ts b/src/mcp-server/tools/incidentsCreateIncidentTeamAssignment.ts new file mode 100644 index 00000000..436a2be8 --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateIncidentTeamAssignment.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateIncidentTeamAssignment } from "../../funcs/incidentsCreateIncidentTeamAssignment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentTeamAssignmentRequest$inboundSchema, +}; + +export const tool$incidentsCreateIncidentTeamAssignment: ToolDefinition< + typeof args +> = { + name: "incidents-create-incident-team-assignment", + description: `Assign a team to an incident + +Assign a team for this incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateIncidentTeamAssignment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsCreateScheduledMaintenance.ts b/src/mcp-server/tools/incidentsCreateScheduledMaintenance.ts new file mode 100644 index 00000000..46ca4353 --- /dev/null +++ b/src/mcp-server/tools/incidentsCreateScheduledMaintenance.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsCreateScheduledMaintenance } from "../../funcs/incidentsCreateScheduledMaintenance.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateScheduledMaintenance$inboundSchema, +}; + +export const tool$incidentsCreateScheduledMaintenance: ToolDefinition< + typeof args +> = { + name: "incidents-create-scheduled-maintenance", + description: `Create a scheduled maintenance event + +Create a new scheduled maintenance event`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsCreateScheduledMaintenance( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteIncident.ts b/src/mcp-server/tools/incidentsDeleteIncident.ts new file mode 100644 index 00000000..b500f801 --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteIncident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteIncident } from "../../funcs/incidentsDeleteIncident.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentRequest$inboundSchema, +}; + +export const tool$incidentsDeleteIncident: ToolDefinition = { + name: "incidents-delete-incident", + description: `Archive an incident + +Archives an incident which will hide it from lists and metrics`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteIncident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteIncidentChatMessage.ts b/src/mcp-server/tools/incidentsDeleteIncidentChatMessage.ts new file mode 100644 index 00000000..5918bd30 --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteIncidentChatMessage.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteIncidentChatMessage } from "../../funcs/incidentsDeleteIncidentChatMessage.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentChatMessageRequest$inboundSchema, +}; + +export const tool$incidentsDeleteIncidentChatMessage: ToolDefinition< + typeof args +> = { + name: "incidents-delete-incident-chat-message", + description: `Delete a chat message from an incident + +Delete an existing generic chat message on an incident.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteIncidentChatMessage( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteIncidentEvent.ts b/src/mcp-server/tools/incidentsDeleteIncidentEvent.ts new file mode 100644 index 00000000..9616cc14 --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteIncidentEvent.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteIncidentEvent } from "../../funcs/incidentsDeleteIncidentEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentEventRequest$inboundSchema, +}; + +export const tool$incidentsDeleteIncidentEvent: ToolDefinition = { + name: "incidents-delete-incident-event", + description: `Delete an incident event + +Delete an event for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteIncidentEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteIncidentImpact.ts b/src/mcp-server/tools/incidentsDeleteIncidentImpact.ts new file mode 100644 index 00000000..fc411ba8 --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteIncidentImpact.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteIncidentImpact } from "../../funcs/incidentsDeleteIncidentImpact.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentImpactRequest$inboundSchema, +}; + +export const tool$incidentsDeleteIncidentImpact: ToolDefinition = { + name: "incidents-delete-incident-impact", + description: `Remove impacted infrastructure from an incident + +Remove impacted infrastructure from an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteIncidentImpact( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteIncidentLink.ts b/src/mcp-server/tools/incidentsDeleteIncidentLink.ts new file mode 100644 index 00000000..b76e17f8 --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteIncidentLink.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteIncidentLink } from "../../funcs/incidentsDeleteIncidentLink.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentLinkRequest$inboundSchema, +}; + +export const tool$incidentsDeleteIncidentLink: ToolDefinition = { + name: "incidents-delete-incident-link", + description: `Remove a link from an incident + +Remove a link from an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteIncidentLink( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteIncidentRoleAssignment.ts b/src/mcp-server/tools/incidentsDeleteIncidentRoleAssignment.ts new file mode 100644 index 00000000..6288910b --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteIncidentRoleAssignment.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteIncidentRoleAssignment } from "../../funcs/incidentsDeleteIncidentRoleAssignment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentRoleAssignmentRequest$inboundSchema, +}; + +export const tool$incidentsDeleteIncidentRoleAssignment: ToolDefinition< + typeof args +> = { + name: "incidents-delete-incident-role-assignment", + description: `Unassign a user from an incident + +Unassign a role from a user`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteIncidentRoleAssignment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteIncidentTeamAssignment.ts b/src/mcp-server/tools/incidentsDeleteIncidentTeamAssignment.ts new file mode 100644 index 00000000..6e53e850 --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteIncidentTeamAssignment.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteIncidentTeamAssignment } from "../../funcs/incidentsDeleteIncidentTeamAssignment.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentTeamAssignmentRequest$inboundSchema, +}; + +export const tool$incidentsDeleteIncidentTeamAssignment: ToolDefinition< + typeof args +> = { + name: "incidents-delete-incident-team-assignment", + description: `Unassign a team from an incident + +Unassign a team from an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteIncidentTeamAssignment( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteScheduledMaintenance.ts b/src/mcp-server/tools/incidentsDeleteScheduledMaintenance.ts new file mode 100644 index 00000000..41e5f369 --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteScheduledMaintenance.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteScheduledMaintenance } from "../../funcs/incidentsDeleteScheduledMaintenance.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteScheduledMaintenanceRequest$inboundSchema, +}; + +export const tool$incidentsDeleteScheduledMaintenance: ToolDefinition< + typeof args +> = { + name: "incidents-delete-scheduled-maintenance", + description: `Delete a scheduled maintenance event + +Delete a scheduled maintenance event, preventing it from taking place.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteScheduledMaintenance( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsDeleteTranscriptEntry.ts b/src/mcp-server/tools/incidentsDeleteTranscriptEntry.ts new file mode 100644 index 00000000..81133b9c --- /dev/null +++ b/src/mcp-server/tools/incidentsDeleteTranscriptEntry.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsDeleteTranscriptEntry } from "../../funcs/incidentsDeleteTranscriptEntry.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTranscriptEntryRequest$inboundSchema, +}; + +export const tool$incidentsDeleteTranscriptEntry: ToolDefinition = + { + name: "incidents-delete-transcript-entry", + description: `Delete a transcript from an incident + +Delete a transcript from an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsDeleteTranscriptEntry( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentsGetAiIncidentSummaryVoteStatus.ts b/src/mcp-server/tools/incidentsGetAiIncidentSummaryVoteStatus.ts new file mode 100644 index 00000000..9b1284af --- /dev/null +++ b/src/mcp-server/tools/incidentsGetAiIncidentSummaryVoteStatus.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetAiIncidentSummaryVoteStatus } from "../../funcs/incidentsGetAiIncidentSummaryVoteStatus.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAiIncidentSummaryVoteStatusRequest$inboundSchema, +}; + +export const tool$incidentsGetAiIncidentSummaryVoteStatus: ToolDefinition< + typeof args +> = { + name: "incidents-get-ai-incident-summary-vote-status", + description: + `Get the current user's vote status for an AI-generated incident summary + +Get the current user's vote status for an AI-generated incident summary`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetAiIncidentSummaryVoteStatus( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsGetConferenceBridgeTranslation.ts b/src/mcp-server/tools/incidentsGetConferenceBridgeTranslation.ts new file mode 100644 index 00000000..cd64713e --- /dev/null +++ b/src/mcp-server/tools/incidentsGetConferenceBridgeTranslation.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetConferenceBridgeTranslation } from "../../funcs/incidentsGetConferenceBridgeTranslation.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetConferenceBridgeTranslationRequest$inboundSchema, +}; + +export const tool$incidentsGetConferenceBridgeTranslation: ToolDefinition< + typeof args +> = { + name: "incidents-get-conference-bridge-translation", + description: `Retrieve the translations for a specific conference bridge + +Retrieve the translations for a specific conference bridge`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetConferenceBridgeTranslation( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsGetIncident.ts b/src/mcp-server/tools/incidentsGetIncident.ts new file mode 100644 index 00000000..8e7aa32b --- /dev/null +++ b/src/mcp-server/tools/incidentsGetIncident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetIncident } from "../../funcs/incidentsGetIncident.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentRequest$inboundSchema, +}; + +export const tool$incidentsGetIncident: ToolDefinition = { + name: "incidents-get-incident", + description: `Get an incident + +Retrieve a single incident from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetIncident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsGetIncidentChannel.ts b/src/mcp-server/tools/incidentsGetIncidentChannel.ts new file mode 100644 index 00000000..6513c2b5 --- /dev/null +++ b/src/mcp-server/tools/incidentsGetIncidentChannel.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetIncidentChannel } from "../../funcs/incidentsGetIncidentChannel.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentChannelRequest$inboundSchema, +}; + +export const tool$incidentsGetIncidentChannel: ToolDefinition = { + name: "incidents-get-incident-channel", + description: `Get chat channel information for an incident + +Gives chat channel information for the specified incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetIncidentChannel( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsGetIncidentEvent.ts b/src/mcp-server/tools/incidentsGetIncidentEvent.ts new file mode 100644 index 00000000..07cad9b7 --- /dev/null +++ b/src/mcp-server/tools/incidentsGetIncidentEvent.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetIncidentEvent } from "../../funcs/incidentsGetIncidentEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentEventRequest$inboundSchema, +}; + +export const tool$incidentsGetIncidentEvent: ToolDefinition = { + name: "incidents-get-incident-event", + description: `Get an incident event + +Retrieve a single event for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetIncidentEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsGetIncidentRelationships.ts b/src/mcp-server/tools/incidentsGetIncidentRelationships.ts new file mode 100644 index 00000000..0a0b3a16 --- /dev/null +++ b/src/mcp-server/tools/incidentsGetIncidentRelationships.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetIncidentRelationships } from "../../funcs/incidentsGetIncidentRelationships.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentRelationshipsRequest$inboundSchema, +}; + +export const tool$incidentsGetIncidentRelationships: ToolDefinition< + typeof args +> = { + name: "incidents-get-incident-relationships", + description: `List incident relationships + +List any parent/child relationships for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetIncidentRelationships( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsGetIncidentUser.ts b/src/mcp-server/tools/incidentsGetIncidentUser.ts new file mode 100644 index 00000000..066dabb6 --- /dev/null +++ b/src/mcp-server/tools/incidentsGetIncidentUser.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetIncidentUser } from "../../funcs/incidentsGetIncidentUser.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentUserRequest$inboundSchema, +}; + +export const tool$incidentsGetIncidentUser: ToolDefinition = { + name: "incidents-get-incident-user", + description: `Get the current user's incident role + +Retrieve a user with current roles for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetIncidentUser( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsGetScheduledMaintenance.ts b/src/mcp-server/tools/incidentsGetScheduledMaintenance.ts new file mode 100644 index 00000000..14fde603 --- /dev/null +++ b/src/mcp-server/tools/incidentsGetScheduledMaintenance.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsGetScheduledMaintenance } from "../../funcs/incidentsGetScheduledMaintenance.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetScheduledMaintenanceRequest$inboundSchema, +}; + +export const tool$incidentsGetScheduledMaintenance: ToolDefinition< + typeof args +> = { + name: "incidents-get-scheduled-maintenance", + description: `Get a scheduled maintenance event + +Fetch the details of a scheduled maintenance event.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsGetScheduledMaintenance( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentAttachments.ts b/src/mcp-server/tools/incidentsListIncidentAttachments.ts new file mode 100644 index 00000000..630e4a7d --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentAttachments.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentAttachments } from "../../funcs/incidentsListIncidentAttachments.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentAttachmentsRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentAttachments: ToolDefinition< + typeof args +> = { + name: "incidents-list-incident-attachments", + description: `List attachments for an incident + +List attachments for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentAttachments( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentChangeEvents.ts b/src/mcp-server/tools/incidentsListIncidentChangeEvents.ts new file mode 100644 index 00000000..f398cb57 --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentChangeEvents.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentChangeEvents } from "../../funcs/incidentsListIncidentChangeEvents.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentChangeEventsRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentChangeEvents: ToolDefinition< + typeof args +> = { + name: "incidents-list-incident-change-events", + description: `List related changes on an incident + +List related changes that have been attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentChangeEvents( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentConferenceBridges.ts b/src/mcp-server/tools/incidentsListIncidentConferenceBridges.ts new file mode 100644 index 00000000..fbbb4e53 --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentConferenceBridges.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentConferenceBridges } from "../../funcs/incidentsListIncidentConferenceBridges.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentConferenceBridgesRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentConferenceBridges: ToolDefinition< + typeof args +> = { + name: "incidents-list-incident-conference-bridges", + description: `Retrieve all conference bridges for an incident + +Retrieve all conference bridges for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentConferenceBridges( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentEvents.ts b/src/mcp-server/tools/incidentsListIncidentEvents.ts new file mode 100644 index 00000000..5eb29a04 --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentEvents.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentEvents } from "../../funcs/incidentsListIncidentEvents.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentEventsRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentEvents: ToolDefinition = { + name: "incidents-list-incident-events", + description: `List events for an incident + +List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentEvents( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentImpacts.ts b/src/mcp-server/tools/incidentsListIncidentImpacts.ts new file mode 100644 index 00000000..6884a903 --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentImpacts.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentImpacts } from "../../funcs/incidentsListIncidentImpacts.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentImpactsRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentImpacts: ToolDefinition = { + name: "incidents-list-incident-impacts", + description: `List impacted infrastructure for an incident + +List impacted infrastructure on an incident by specifying type`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentImpacts( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentLinks.ts b/src/mcp-server/tools/incidentsListIncidentLinks.ts new file mode 100644 index 00000000..dd979f4d --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentLinks.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentLinks } from "../../funcs/incidentsListIncidentLinks.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentLinksRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentLinks: ToolDefinition = { + name: "incidents-list-incident-links", + description: `List links on an incident + +List all the editable, external incident links attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentLinks( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentMilestones.ts b/src/mcp-server/tools/incidentsListIncidentMilestones.ts new file mode 100644 index 00000000..869402bd --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentMilestones.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentMilestones } from "../../funcs/incidentsListIncidentMilestones.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentMilestonesRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentMilestones: ToolDefinition = + { + name: "incidents-list-incident-milestones", + description: `List incident milestones + +List times and durations for each milestone on an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentMilestones( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentsListIncidentRoleAssignments.ts b/src/mcp-server/tools/incidentsListIncidentRoleAssignments.ts new file mode 100644 index 00000000..67244ee7 --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentRoleAssignments.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentRoleAssignments } from "../../funcs/incidentsListIncidentRoleAssignments.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentRoleAssignmentsRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentRoleAssignments: ToolDefinition< + typeof args +> = { + name: "incidents-list-incident-role-assignments", + description: `List incident assignees + +Retrieve a list of all of the current role assignments for the incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentRoleAssignments( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidentStatusPages.ts b/src/mcp-server/tools/incidentsListIncidentStatusPages.ts new file mode 100644 index 00000000..c46ff20d --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidentStatusPages.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidentStatusPages } from "../../funcs/incidentsListIncidentStatusPages.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentStatusPagesRequest$inboundSchema, +}; + +export const tool$incidentsListIncidentStatusPages: ToolDefinition< + typeof args +> = { + name: "incidents-list-incident-status-pages", + description: `List status pages for an incident + +List status pages that are attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidentStatusPages( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListIncidents.ts b/src/mcp-server/tools/incidentsListIncidents.ts new file mode 100644 index 00000000..dd4061c3 --- /dev/null +++ b/src/mcp-server/tools/incidentsListIncidents.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListIncidents } from "../../funcs/incidentsListIncidents.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentsRequest$inboundSchema, +}; + +export const tool$incidentsListIncidents: ToolDefinition = { + name: "incidents-list-incidents", + description: `List incidents + +List all of the incidents in the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListIncidents( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListScheduledMaintenances.ts b/src/mcp-server/tools/incidentsListScheduledMaintenances.ts new file mode 100644 index 00000000..8c93f9a1 --- /dev/null +++ b/src/mcp-server/tools/incidentsListScheduledMaintenances.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListScheduledMaintenances } from "../../funcs/incidentsListScheduledMaintenances.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListScheduledMaintenancesRequest$inboundSchema, +}; + +export const tool$incidentsListScheduledMaintenances: ToolDefinition< + typeof args +> = { + name: "incidents-list-scheduled-maintenances", + description: `List scheduled maintenance events + +Lists all scheduled maintenance events`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListScheduledMaintenances( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListSimilarIncidents.ts b/src/mcp-server/tools/incidentsListSimilarIncidents.ts new file mode 100644 index 00000000..96534215 --- /dev/null +++ b/src/mcp-server/tools/incidentsListSimilarIncidents.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListSimilarIncidents } from "../../funcs/incidentsListSimilarIncidents.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSimilarIncidentsRequest$inboundSchema, +}; + +export const tool$incidentsListSimilarIncidents: ToolDefinition = { + name: "incidents-list-similar-incidents", + description: `List similar incidents + +Retrieve a list of similar incidents`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListSimilarIncidents( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsListTranscriptEntries.ts b/src/mcp-server/tools/incidentsListTranscriptEntries.ts new file mode 100644 index 00000000..4c399433 --- /dev/null +++ b/src/mcp-server/tools/incidentsListTranscriptEntries.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsListTranscriptEntries } from "../../funcs/incidentsListTranscriptEntries.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTranscriptEntriesRequest$inboundSchema, +}; + +export const tool$incidentsListTranscriptEntries: ToolDefinition = + { + name: "incidents-list-transcript-entries", + description: `Lists all of the messages in the incident's transcript + +Retrieve the transcript for a specific incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsListTranscriptEntries( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/incidentsResolveIncident.ts b/src/mcp-server/tools/incidentsResolveIncident.ts new file mode 100644 index 00000000..fd8e5e18 --- /dev/null +++ b/src/mcp-server/tools/incidentsResolveIncident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsResolveIncident } from "../../funcs/incidentsResolveIncident.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ResolveIncidentRequest$inboundSchema, +}; + +export const tool$incidentsResolveIncident: ToolDefinition = { + name: "incidents-resolve-incident", + description: `Resolve an incident + +Resolves a currently active incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsResolveIncident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUnarchiveIncident.ts b/src/mcp-server/tools/incidentsUnarchiveIncident.ts new file mode 100644 index 00000000..67bd8db2 --- /dev/null +++ b/src/mcp-server/tools/incidentsUnarchiveIncident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUnarchiveIncident } from "../../funcs/incidentsUnarchiveIncident.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UnarchiveIncidentRequest$inboundSchema, +}; + +export const tool$incidentsUnarchiveIncident: ToolDefinition = { + name: "incidents-unarchive-incident", + description: `Unarchive an incident + +Unarchive an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUnarchiveIncident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncident.ts b/src/mcp-server/tools/incidentsUpdateIncident.ts new file mode 100644 index 00000000..ae08ea42 --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncident } from "../../funcs/incidentsUpdateIncident.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncident: ToolDefinition = { + name: "incidents-update-incident", + description: `Update an incident + +Updates an incident with provided parameters`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncidentChangeEvent.ts b/src/mcp-server/tools/incidentsUpdateIncidentChangeEvent.ts new file mode 100644 index 00000000..96fd82f7 --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncidentChangeEvent.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncidentChangeEvent } from "../../funcs/incidentsUpdateIncidentChangeEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentChangeEventRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncidentChangeEvent: ToolDefinition< + typeof args +> = { + name: "incidents-update-incident-change-event", + description: `Update a change attached to an incident + +Update a change attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncidentChangeEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncidentChatMessage.ts b/src/mcp-server/tools/incidentsUpdateIncidentChatMessage.ts new file mode 100644 index 00000000..bf214a80 --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncidentChatMessage.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncidentChatMessage } from "../../funcs/incidentsUpdateIncidentChatMessage.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentChatMessageRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncidentChatMessage: ToolDefinition< + typeof args +> = { + name: "incidents-update-incident-chat-message", + description: `Update a chat message on an incident + +Update an existing generic chat message on an incident.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncidentChatMessage( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncidentEvent.ts b/src/mcp-server/tools/incidentsUpdateIncidentEvent.ts new file mode 100644 index 00000000..e810dd8b --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncidentEvent.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncidentEvent } from "../../funcs/incidentsUpdateIncidentEvent.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentEventRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncidentEvent: ToolDefinition = { + name: "incidents-update-incident-event", + description: `Update an incident event + +Update a single event for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncidentEvent( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncidentImpactPatch.ts b/src/mcp-server/tools/incidentsUpdateIncidentImpactPatch.ts new file mode 100644 index 00000000..9740e509 --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncidentImpactPatch.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncidentImpactPatch } from "../../funcs/incidentsUpdateIncidentImpactPatch.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentImpactPatchRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncidentImpactPatch: ToolDefinition< + typeof args +> = { + name: "incidents-update-incident-impact-patch", + description: `Update impacts for an incident + +Allows updating an incident's impacted infrastructure, with the option to +move the incident into a different milestone and provide a note to update +the incident timeline and any attached status pages. If this method is +requested with the PUT verb, impacts will be completely replaced with the +information in the request body, even if not provided (effectively clearing +all impacts). If this method is requested with the PATCH verb, the provided +impacts will be added or updated, but no impacts will be removed. +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncidentImpactPatch( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncidentImpactPut.ts b/src/mcp-server/tools/incidentsUpdateIncidentImpactPut.ts new file mode 100644 index 00000000..cb4e4330 --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncidentImpactPut.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncidentImpactPut } from "../../funcs/incidentsUpdateIncidentImpactPut.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentImpactPutRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncidentImpactPut: ToolDefinition< + typeof args +> = { + name: "incidents-update-incident-impact-put", + description: `Update impacts for an incident + +Allows updating an incident's impacted infrastructure, with the option to +move the incident into a different milestone and provide a note to update +the incident timeline and any attached status pages. If this method is +requested with the PUT verb, impacts will be completely replaced with the +information in the request body, even if not provided (effectively clearing +all impacts). If this method is requested with the PATCH verb, the provided +impacts will be added or updated, but no impacts will be removed. +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncidentImpactPut( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncidentLink.ts b/src/mcp-server/tools/incidentsUpdateIncidentLink.ts new file mode 100644 index 00000000..a2b3dbc1 --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncidentLink.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncidentLink } from "../../funcs/incidentsUpdateIncidentLink.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentLinkRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncidentLink: ToolDefinition = { + name: "incidents-update-incident-link", + description: `Update the external incident link + +Update the external incident link attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncidentLink( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateIncidentNote.ts b/src/mcp-server/tools/incidentsUpdateIncidentNote.ts new file mode 100644 index 00000000..168b13ec --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateIncidentNote.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateIncidentNote } from "../../funcs/incidentsUpdateIncidentNote.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentNoteRequest$inboundSchema, +}; + +export const tool$incidentsUpdateIncidentNote: ToolDefinition = { + name: "incidents-update-incident-note", + description: `Update a note + +Updates the body of a note`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateIncidentNote( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateScheduledMaintenance.ts b/src/mcp-server/tools/incidentsUpdateScheduledMaintenance.ts new file mode 100644 index 00000000..71620d3e --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateScheduledMaintenance.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateScheduledMaintenance } from "../../funcs/incidentsUpdateScheduledMaintenance.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateScheduledMaintenanceRequest$inboundSchema, +}; + +export const tool$incidentsUpdateScheduledMaintenance: ToolDefinition< + typeof args +> = { + name: "incidents-update-scheduled-maintenance", + description: `Update a scheduled maintenance event + +Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateScheduledMaintenance( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsUpdateTranscriptAttribution.ts b/src/mcp-server/tools/incidentsUpdateTranscriptAttribution.ts new file mode 100644 index 00000000..9a66ab4a --- /dev/null +++ b/src/mcp-server/tools/incidentsUpdateTranscriptAttribution.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsUpdateTranscriptAttribution } from "../../funcs/incidentsUpdateTranscriptAttribution.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTranscriptAttributionRequest$inboundSchema, +}; + +export const tool$incidentsUpdateTranscriptAttribution: ToolDefinition< + typeof args +> = { + name: "incidents-update-transcript-attribution", + description: `Update the attribution of a transcript + +Update the attribution of a transcript`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsUpdateTranscriptAttribution( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/incidentsVoteAiIncidentSummary.ts b/src/mcp-server/tools/incidentsVoteAiIncidentSummary.ts new file mode 100644 index 00000000..e240fddf --- /dev/null +++ b/src/mcp-server/tools/incidentsVoteAiIncidentSummary.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { incidentsVoteAiIncidentSummary } from "../../funcs/incidentsVoteAiIncidentSummary.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.VoteAiIncidentSummaryRequest$inboundSchema, +}; + +export const tool$incidentsVoteAiIncidentSummary: ToolDefinition = + { + name: "incidents-vote-ai-incident-summary", + description: `Vote on an AI-generated incident summary + +Vote on an AI-generated incident summary for the current user`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await incidentsVoteAiIncidentSummary( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/integrationsCreateConnection.ts b/src/mcp-server/tools/integrationsCreateConnection.ts new file mode 100644 index 00000000..c6ba15b0 --- /dev/null +++ b/src/mcp-server/tools/integrationsCreateConnection.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsCreateConnection } from "../../funcs/integrationsCreateConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateConnectionRequest$inboundSchema, +}; + +export const tool$integrationsCreateConnection: ToolDefinition = { + name: "integrations-create-connection", + description: `Create a new integration connection + +Create a new integration connection`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsCreateConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsCreateSlackEmojiAction.ts b/src/mcp-server/tools/integrationsCreateSlackEmojiAction.ts new file mode 100644 index 00000000..63389017 --- /dev/null +++ b/src/mcp-server/tools/integrationsCreateSlackEmojiAction.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsCreateSlackEmojiAction } from "../../funcs/integrationsCreateSlackEmojiAction.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateSlackEmojiActionRequest$inboundSchema, +}; + +export const tool$integrationsCreateSlackEmojiAction: ToolDefinition< + typeof args +> = { + name: "integrations-create-slack-emoji-action", + description: `Create a new Slack emoji action + +Creates a new Slack emoji action`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsCreateSlackEmojiAction( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsDeleteSlackEmojiAction.ts b/src/mcp-server/tools/integrationsDeleteSlackEmojiAction.ts new file mode 100644 index 00000000..152babe2 --- /dev/null +++ b/src/mcp-server/tools/integrationsDeleteSlackEmojiAction.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsDeleteSlackEmojiAction } from "../../funcs/integrationsDeleteSlackEmojiAction.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteSlackEmojiActionRequest$inboundSchema, +}; + +export const tool$integrationsDeleteSlackEmojiAction: ToolDefinition< + typeof args +> = { + name: "integrations-delete-slack-emoji-action", + description: `Delete a Slack emoji action + +Deletes a Slack emoji action`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsDeleteSlackEmojiAction( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsDeleteStatuspageConnection.ts b/src/mcp-server/tools/integrationsDeleteStatuspageConnection.ts new file mode 100644 index 00000000..f4cb2c03 --- /dev/null +++ b/src/mcp-server/tools/integrationsDeleteStatuspageConnection.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsDeleteStatuspageConnection } from "../../funcs/integrationsDeleteStatuspageConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteStatuspageConnectionRequest$inboundSchema, +}; + +export const tool$integrationsDeleteStatuspageConnection: ToolDefinition< + typeof args +> = { + name: "integrations-delete-statuspage-connection", + description: `Delete a Statuspage connection + +Deletes the given Statuspage integration connection.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsDeleteStatuspageConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsGetAwsCloudtrailBatch.ts b/src/mcp-server/tools/integrationsGetAwsCloudtrailBatch.ts new file mode 100644 index 00000000..50a45028 --- /dev/null +++ b/src/mcp-server/tools/integrationsGetAwsCloudtrailBatch.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsGetAwsCloudtrailBatch } from "../../funcs/integrationsGetAwsCloudtrailBatch.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAwsCloudtrailBatchRequest$inboundSchema, +}; + +export const tool$integrationsGetAwsCloudtrailBatch: ToolDefinition< + typeof args +> = { + name: "integrations-get-aws-cloudtrail-batch", + description: `Get a CloudTrail batch + +Retrieve a single CloudTrail batch.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsGetAwsCloudtrailBatch( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsGetAwsConnection.ts b/src/mcp-server/tools/integrationsGetAwsConnection.ts new file mode 100644 index 00000000..715f824a --- /dev/null +++ b/src/mcp-server/tools/integrationsGetAwsConnection.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsGetAwsConnection } from "../../funcs/integrationsGetAwsConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAwsConnectionRequest$inboundSchema, +}; + +export const tool$integrationsGetAwsConnection: ToolDefinition = { + name: "integrations-get-aws-connection", + description: `Get an AWS connection + +Retrieves the information about the AWS connection.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsGetAwsConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsGetIntegration.ts b/src/mcp-server/tools/integrationsGetIntegration.ts new file mode 100644 index 00000000..effb6352 --- /dev/null +++ b/src/mcp-server/tools/integrationsGetIntegration.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsGetIntegration } from "../../funcs/integrationsGetIntegration.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIntegrationRequest$inboundSchema, +}; + +export const tool$integrationsGetIntegration: ToolDefinition = { + name: "integrations-get-integration", + description: `Get an integration + +Retrieve a single integration`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsGetIntegration( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsGetSlackEmojiAction.ts b/src/mcp-server/tools/integrationsGetSlackEmojiAction.ts new file mode 100644 index 00000000..ac7f5962 --- /dev/null +++ b/src/mcp-server/tools/integrationsGetSlackEmojiAction.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsGetSlackEmojiAction } from "../../funcs/integrationsGetSlackEmojiAction.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSlackEmojiActionRequest$inboundSchema, +}; + +export const tool$integrationsGetSlackEmojiAction: ToolDefinition = + { + name: "integrations-get-slack-emoji-action", + description: `Get a Slack emoji action + +Retrieves a Slack emoji action`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsGetSlackEmojiAction( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/integrationsGetStatuspageConnection.ts b/src/mcp-server/tools/integrationsGetStatuspageConnection.ts new file mode 100644 index 00000000..175533a9 --- /dev/null +++ b/src/mcp-server/tools/integrationsGetStatuspageConnection.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsGetStatuspageConnection } from "../../funcs/integrationsGetStatuspageConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetStatuspageConnectionRequest$inboundSchema, +}; + +export const tool$integrationsGetStatuspageConnection: ToolDefinition< + typeof args +> = { + name: "integrations-get-statuspage-connection", + description: `Get a Statuspage connection + +Retrieve the information about the Statuspage connection.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsGetStatuspageConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsGetZendeskCustomerSupportIssue.ts b/src/mcp-server/tools/integrationsGetZendeskCustomerSupportIssue.ts new file mode 100644 index 00000000..19564b1f --- /dev/null +++ b/src/mcp-server/tools/integrationsGetZendeskCustomerSupportIssue.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsGetZendeskCustomerSupportIssue } from "../../funcs/integrationsGetZendeskCustomerSupportIssue.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetZendeskCustomerSupportIssueRequest$inboundSchema, +}; + +export const tool$integrationsGetZendeskCustomerSupportIssue: ToolDefinition< + typeof args +> = { + name: "integrations-get-zendesk-customer-support-issue", + description: `Search for Zendesk tickets + +Search for Zendesk tickets`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsGetZendeskCustomerSupportIssue( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListAuthedProviders.ts b/src/mcp-server/tools/integrationsListAuthedProviders.ts new file mode 100644 index 00000000..7e8064ff --- /dev/null +++ b/src/mcp-server/tools/integrationsListAuthedProviders.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListAuthedProviders } from "../../funcs/integrationsListAuthedProviders.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAuthedProvidersRequest$inboundSchema, +}; + +export const tool$integrationsListAuthedProviders: ToolDefinition = + { + name: "integrations-list-authed-providers", + description: `Lists the available and configured integrations + +Lists the available and configured integrations`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListAuthedProviders( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/integrationsListAwsCloudtrailBatchEvents.ts b/src/mcp-server/tools/integrationsListAwsCloudtrailBatchEvents.ts new file mode 100644 index 00000000..db1c4bef --- /dev/null +++ b/src/mcp-server/tools/integrationsListAwsCloudtrailBatchEvents.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListAwsCloudtrailBatchEvents } from "../../funcs/integrationsListAwsCloudtrailBatchEvents.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAwsCloudtrailBatchEventsRequest$inboundSchema, +}; + +export const tool$integrationsListAwsCloudtrailBatchEvents: ToolDefinition< + typeof args +> = { + name: "integrations-list-aws-cloudtrail-batch-events", + description: `List events for an AWS CloudTrail batch + +List events for an AWS CloudTrail batch`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListAwsCloudtrailBatchEvents( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListAwsCloudtrailBatches.ts b/src/mcp-server/tools/integrationsListAwsCloudtrailBatches.ts new file mode 100644 index 00000000..3ada41dd --- /dev/null +++ b/src/mcp-server/tools/integrationsListAwsCloudtrailBatches.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListAwsCloudtrailBatches } from "../../funcs/integrationsListAwsCloudtrailBatches.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAwsCloudtrailBatchesRequest$inboundSchema, +}; + +export const tool$integrationsListAwsCloudtrailBatches: ToolDefinition< + typeof args +> = { + name: "integrations-list-aws-cloudtrail-batches", + description: `List CloudTrail batches + +Lists CloudTrail batches for the authenticated organization.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListAwsCloudtrailBatches( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListAwsConnections.ts b/src/mcp-server/tools/integrationsListAwsConnections.ts new file mode 100644 index 00000000..ea14ba33 --- /dev/null +++ b/src/mcp-server/tools/integrationsListAwsConnections.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListAwsConnections } from "../../funcs/integrationsListAwsConnections.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAwsConnectionsRequest$inboundSchema, +}; + +export const tool$integrationsListAwsConnections: ToolDefinition = + { + name: "integrations-list-aws-connections", + description: `List AWS connections + +Lists the available and configured AWS integration connections for the authenticated organization.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListAwsConnections( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/integrationsListConnectionStatuses.ts b/src/mcp-server/tools/integrationsListConnectionStatuses.ts new file mode 100644 index 00000000..c91faef0 --- /dev/null +++ b/src/mcp-server/tools/integrationsListConnectionStatuses.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListConnectionStatuses } from "../../funcs/integrationsListConnectionStatuses.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$integrationsListConnectionStatuses: ToolDefinition = { + name: "integrations-list-connection-statuses", + description: `Get integration connection status + +Retrieve overall integration connection status`, + tool: async (client, ctx) => { + const [result, apiCall] = await integrationsListConnectionStatuses( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListConnectionStatusesBySlug.ts b/src/mcp-server/tools/integrationsListConnectionStatusesBySlug.ts new file mode 100644 index 00000000..6a1dd806 --- /dev/null +++ b/src/mcp-server/tools/integrationsListConnectionStatusesBySlug.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListConnectionStatusesBySlug } from "../../funcs/integrationsListConnectionStatusesBySlug.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListConnectionStatusesBySlugRequest$inboundSchema, +}; + +export const tool$integrationsListConnectionStatusesBySlug: ToolDefinition< + typeof args +> = { + name: "integrations-list-connection-statuses-by-slug", + description: `Get an integration connection status + +Retrieve a single integration connection status`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListConnectionStatusesBySlug( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListConnectionStatusesBySlugAndId.ts b/src/mcp-server/tools/integrationsListConnectionStatusesBySlugAndId.ts new file mode 100644 index 00000000..c6ce03cd --- /dev/null +++ b/src/mcp-server/tools/integrationsListConnectionStatusesBySlugAndId.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListConnectionStatusesBySlugAndId } from "../../funcs/integrationsListConnectionStatusesBySlugAndId.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListConnectionStatusesBySlugAndIdRequest$inboundSchema, +}; + +export const tool$integrationsListConnectionStatusesBySlugAndId: ToolDefinition< + typeof args +> = { + name: "integrations-list-connection-statuses-by-slug-and-id", + description: `Get an integration connection status + +Retrieve a single integration connection status`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await integrationsListConnectionStatusesBySlugAndId( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListConnections.ts b/src/mcp-server/tools/integrationsListConnections.ts new file mode 100644 index 00000000..1588da92 --- /dev/null +++ b/src/mcp-server/tools/integrationsListConnections.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListConnections } from "../../funcs/integrationsListConnections.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListConnectionsRequest$inboundSchema, +}; + +export const tool$integrationsListConnections: ToolDefinition = { + name: "integrations-list-connections", + description: `List integration connections + +List available integration connections`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListConnections( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListFieldMapAvailableFields.ts b/src/mcp-server/tools/integrationsListFieldMapAvailableFields.ts new file mode 100644 index 00000000..c71e6e71 --- /dev/null +++ b/src/mcp-server/tools/integrationsListFieldMapAvailableFields.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListFieldMapAvailableFields } from "../../funcs/integrationsListFieldMapAvailableFields.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListFieldMapAvailableFieldsRequest$inboundSchema, +}; + +export const tool$integrationsListFieldMapAvailableFields: ToolDefinition< + typeof args +> = { + name: "integrations-list-field-map-available-fields", + description: `List available fields for field mapping + +Get a description of the fields to which data can be mapped`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListFieldMapAvailableFields( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListIntegrations.ts b/src/mcp-server/tools/integrationsListIntegrations.ts new file mode 100644 index 00000000..a97951b0 --- /dev/null +++ b/src/mcp-server/tools/integrationsListIntegrations.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListIntegrations } from "../../funcs/integrationsListIntegrations.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$integrationsListIntegrations: ToolDefinition = { + name: "integrations-list-integrations", + description: `List integrations + +Lists the available and configured integrations`, + tool: async (client, ctx) => { + const [result, apiCall] = await integrationsListIntegrations( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListSlackEmojiActions.ts b/src/mcp-server/tools/integrationsListSlackEmojiActions.ts new file mode 100644 index 00000000..4f677709 --- /dev/null +++ b/src/mcp-server/tools/integrationsListSlackEmojiActions.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListSlackEmojiActions } from "../../funcs/integrationsListSlackEmojiActions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSlackEmojiActionsRequest$inboundSchema, +}; + +export const tool$integrationsListSlackEmojiActions: ToolDefinition< + typeof args +> = { + name: "integrations-list-slack-emoji-actions", + description: `List Slack emoji actions + +Lists Slack emoji actions`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListSlackEmojiActions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListSlackUsergroups.ts b/src/mcp-server/tools/integrationsListSlackUsergroups.ts new file mode 100644 index 00000000..b362f2a5 --- /dev/null +++ b/src/mcp-server/tools/integrationsListSlackUsergroups.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListSlackUsergroups } from "../../funcs/integrationsListSlackUsergroups.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$integrationsListSlackUsergroups: ToolDefinition = { + name: "integrations-list-slack-usergroups", + description: `List Slack user groups + +Lists all Slack user groups`, + tool: async (client, ctx) => { + const [result, apiCall] = await integrationsListSlackUsergroups( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListSlackWorkspaces.ts b/src/mcp-server/tools/integrationsListSlackWorkspaces.ts new file mode 100644 index 00000000..fef72410 --- /dev/null +++ b/src/mcp-server/tools/integrationsListSlackWorkspaces.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListSlackWorkspaces } from "../../funcs/integrationsListSlackWorkspaces.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSlackWorkspacesRequest$inboundSchema, +}; + +export const tool$integrationsListSlackWorkspaces: ToolDefinition = + { + name: "integrations-list-slack-workspaces", + description: `List Slack workspaces + +Lists all Slack workspaces`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListSlackWorkspaces( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/integrationsListStatuspageConnectionPages.ts b/src/mcp-server/tools/integrationsListStatuspageConnectionPages.ts new file mode 100644 index 00000000..313dff74 --- /dev/null +++ b/src/mcp-server/tools/integrationsListStatuspageConnectionPages.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListStatuspageConnectionPages } from "../../funcs/integrationsListStatuspageConnectionPages.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListStatuspageConnectionPagesRequest$inboundSchema, +}; + +export const tool$integrationsListStatuspageConnectionPages: ToolDefinition< + typeof args +> = { + name: "integrations-list-statuspage-connection-pages", + description: `List StatusPage pages for a connection + +Lists available page IDs for the Statuspage integration connection.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListStatuspageConnectionPages( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsListStatuspageConnections.ts b/src/mcp-server/tools/integrationsListStatuspageConnections.ts new file mode 100644 index 00000000..c8980208 --- /dev/null +++ b/src/mcp-server/tools/integrationsListStatuspageConnections.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsListStatuspageConnections } from "../../funcs/integrationsListStatuspageConnections.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListStatuspageConnectionsRequest$inboundSchema, +}; + +export const tool$integrationsListStatuspageConnections: ToolDefinition< + typeof args +> = { + name: "integrations-list-statuspage-connections", + description: `List Statuspage connections + +Lists the available and configured Statuspage integrations connections for the authenticated organization.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsListStatuspageConnections( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsRefreshConnection.ts b/src/mcp-server/tools/integrationsRefreshConnection.ts new file mode 100644 index 00000000..f7a3f1b9 --- /dev/null +++ b/src/mcp-server/tools/integrationsRefreshConnection.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsRefreshConnection } from "../../funcs/integrationsRefreshConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.RefreshConnectionRequest$inboundSchema, +}; + +export const tool$integrationsRefreshConnection: ToolDefinition = { + name: "integrations-refresh-connection", + description: `Refresh an integration connection + +Refresh the integration connection with the provided data`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsRefreshConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsSearchConfluenceSpaces.ts b/src/mcp-server/tools/integrationsSearchConfluenceSpaces.ts new file mode 100644 index 00000000..384bd069 --- /dev/null +++ b/src/mcp-server/tools/integrationsSearchConfluenceSpaces.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsSearchConfluenceSpaces } from "../../funcs/integrationsSearchConfluenceSpaces.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.SearchConfluenceSpacesRequest$inboundSchema, +}; + +export const tool$integrationsSearchConfluenceSpaces: ToolDefinition< + typeof args +> = { + name: "integrations-search-confluence-spaces", + description: `List Confluence spaces + +Lists available space keys for the Confluence integration connection.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsSearchConfluenceSpaces( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsSearchZendeskTickets.ts b/src/mcp-server/tools/integrationsSearchZendeskTickets.ts new file mode 100644 index 00000000..ef047501 --- /dev/null +++ b/src/mcp-server/tools/integrationsSearchZendeskTickets.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsSearchZendeskTickets } from "../../funcs/integrationsSearchZendeskTickets.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.SearchZendeskTicketsRequest$inboundSchema, +}; + +export const tool$integrationsSearchZendeskTickets: ToolDefinition< + typeof args +> = { + name: "integrations-search-zendesk-tickets", + description: `Search for Zendesk tickets + +Search for Zendesk tickets`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsSearchZendeskTickets( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsUpdateAuthedProvider.ts b/src/mcp-server/tools/integrationsUpdateAuthedProvider.ts new file mode 100644 index 00000000..7b1d379c --- /dev/null +++ b/src/mcp-server/tools/integrationsUpdateAuthedProvider.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsUpdateAuthedProvider } from "../../funcs/integrationsUpdateAuthedProvider.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateAuthedProviderRequest$inboundSchema, +}; + +export const tool$integrationsUpdateAuthedProvider: ToolDefinition< + typeof args +> = { + name: "integrations-update-authed-provider", + description: `Get an authed provider + +Retrieve a single authed provider`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsUpdateAuthedProvider( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsUpdateAwsCloudtrailBatch.ts b/src/mcp-server/tools/integrationsUpdateAwsCloudtrailBatch.ts new file mode 100644 index 00000000..7f5e756c --- /dev/null +++ b/src/mcp-server/tools/integrationsUpdateAwsCloudtrailBatch.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsUpdateAwsCloudtrailBatch } from "../../funcs/integrationsUpdateAwsCloudtrailBatch.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateAwsCloudtrailBatchRequest$inboundSchema, +}; + +export const tool$integrationsUpdateAwsCloudtrailBatch: ToolDefinition< + typeof args +> = { + name: "integrations-update-aws-cloudtrail-batch", + description: `Update a CloudTrail batch + +Update a CloudTrail batch with new information.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsUpdateAwsCloudtrailBatch( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsUpdateAwsConnection.ts b/src/mcp-server/tools/integrationsUpdateAwsConnection.ts new file mode 100644 index 00000000..e6ff7d3a --- /dev/null +++ b/src/mcp-server/tools/integrationsUpdateAwsConnection.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsUpdateAwsConnection } from "../../funcs/integrationsUpdateAwsConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateAwsConnectionRequest$inboundSchema, +}; + +export const tool$integrationsUpdateAwsConnection: ToolDefinition = + { + name: "integrations-update-aws-connection", + description: `Update an AWS connection + +Update the AWS connection with the provided data.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsUpdateAwsConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/integrationsUpdateConnection.ts b/src/mcp-server/tools/integrationsUpdateConnection.ts new file mode 100644 index 00000000..62495b7c --- /dev/null +++ b/src/mcp-server/tools/integrationsUpdateConnection.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsUpdateConnection } from "../../funcs/integrationsUpdateConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateConnectionRequest$inboundSchema, +}; + +export const tool$integrationsUpdateConnection: ToolDefinition = { + name: "integrations-update-connection", + description: `Update an integration connection + +Update the integration connection with the provided data`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsUpdateConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsUpdateFieldMap.ts b/src/mcp-server/tools/integrationsUpdateFieldMap.ts new file mode 100644 index 00000000..891b2d91 --- /dev/null +++ b/src/mcp-server/tools/integrationsUpdateFieldMap.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsUpdateFieldMap } from "../../funcs/integrationsUpdateFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateFieldMapRequest$inboundSchema, +}; + +export const tool$integrationsUpdateFieldMap: ToolDefinition = { + name: "integrations-update-field-map", + description: `Update field mapping + +Update field mapping`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsUpdateFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsUpdateSlackEmojiAction.ts b/src/mcp-server/tools/integrationsUpdateSlackEmojiAction.ts new file mode 100644 index 00000000..f53d3bac --- /dev/null +++ b/src/mcp-server/tools/integrationsUpdateSlackEmojiAction.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsUpdateSlackEmojiAction } from "../../funcs/integrationsUpdateSlackEmojiAction.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateSlackEmojiActionRequest$inboundSchema, +}; + +export const tool$integrationsUpdateSlackEmojiAction: ToolDefinition< + typeof args +> = { + name: "integrations-update-slack-emoji-action", + description: `Update a Slack emoji action + +Updates a Slack emoji action`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsUpdateSlackEmojiAction( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/integrationsUpdateStatuspageConnection.ts b/src/mcp-server/tools/integrationsUpdateStatuspageConnection.ts new file mode 100644 index 00000000..f74cfe39 --- /dev/null +++ b/src/mcp-server/tools/integrationsUpdateStatuspageConnection.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { integrationsUpdateStatuspageConnection } from "../../funcs/integrationsUpdateStatuspageConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateStatuspageConnectionRequest$inboundSchema, +}; + +export const tool$integrationsUpdateStatuspageConnection: ToolDefinition< + typeof args +> = { + name: "integrations-update-statuspage-connection", + description: `Update a Statuspage connection + +Update the given Statuspage integration connection.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await integrationsUpdateStatuspageConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingCreateSavedSearch.ts b/src/mcp-server/tools/metricsReportingCreateSavedSearch.ts new file mode 100644 index 00000000..8c2c4218 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingCreateSavedSearch.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingCreateSavedSearch } from "../../funcs/metricsReportingCreateSavedSearch.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateSavedSearchRequest$inboundSchema, +}; + +export const tool$metricsReportingCreateSavedSearch: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-create-saved-search", + description: `Create a saved search + +Create a new saved search for a particular resource type`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingCreateSavedSearch( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingDeleteSavedSearch.ts b/src/mcp-server/tools/metricsReportingDeleteSavedSearch.ts new file mode 100644 index 00000000..d28f1320 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingDeleteSavedSearch.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingDeleteSavedSearch } from "../../funcs/metricsReportingDeleteSavedSearch.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteSavedSearchRequest$inboundSchema, +}; + +export const tool$metricsReportingDeleteSavedSearch: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-delete-saved-search", + description: `Delete a saved search + +Delete a specific saved search`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingDeleteSavedSearch( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingGetMeanTimeReport.ts b/src/mcp-server/tools/metricsReportingGetMeanTimeReport.ts new file mode 100644 index 00000000..63d6cd7f --- /dev/null +++ b/src/mcp-server/tools/metricsReportingGetMeanTimeReport.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingGetMeanTimeReport } from "../../funcs/metricsReportingGetMeanTimeReport.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetMeanTimeReportRequest$inboundSchema, +}; + +export const tool$metricsReportingGetMeanTimeReport: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-get-mean-time-report", + description: `Get mean time metrics for incidents + +Returns a report with time bucketed analytics data`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingGetMeanTimeReport( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingGetSavedSearch.ts b/src/mcp-server/tools/metricsReportingGetSavedSearch.ts new file mode 100644 index 00000000..fc699e81 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingGetSavedSearch.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingGetSavedSearch } from "../../funcs/metricsReportingGetSavedSearch.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSavedSearchRequest$inboundSchema, +}; + +export const tool$metricsReportingGetSavedSearch: ToolDefinition = + { + name: "metrics/reporting-get-saved-search", + description: `Get a saved search + +Retrieve a specific save search`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingGetSavedSearch( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/metricsReportingGetSignalsGroupedMetrics.ts b/src/mcp-server/tools/metricsReportingGetSignalsGroupedMetrics.ts new file mode 100644 index 00000000..60c8c5f8 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingGetSignalsGroupedMetrics.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingGetSignalsGroupedMetrics } from "../../funcs/metricsReportingGetSignalsGroupedMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSignalsGroupedMetricsRequest$inboundSchema, +}; + +export const tool$metricsReportingGetSignalsGroupedMetrics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-get-signals-grouped-metrics", + description: `Generate grouped alert metrics + +Generate a report of grouped metrics for Signals alerts`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingGetSignalsGroupedMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingGetSignalsMttxAnalytics.ts b/src/mcp-server/tools/metricsReportingGetSignalsMttxAnalytics.ts new file mode 100644 index 00000000..f85d338b --- /dev/null +++ b/src/mcp-server/tools/metricsReportingGetSignalsMttxAnalytics.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingGetSignalsMttxAnalytics } from "../../funcs/metricsReportingGetSignalsMttxAnalytics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSignalsMttxAnalyticsRequest$inboundSchema, +}; + +export const tool$metricsReportingGetSignalsMttxAnalytics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-get-signals-mttx-analytics", + description: `Get MTTX analytics for signals + +Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingGetSignalsMttxAnalytics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingGetSignalsTimeseriesAnalytics.ts b/src/mcp-server/tools/metricsReportingGetSignalsTimeseriesAnalytics.ts new file mode 100644 index 00000000..51b8fced --- /dev/null +++ b/src/mcp-server/tools/metricsReportingGetSignalsTimeseriesAnalytics.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingGetSignalsTimeseriesAnalytics } from "../../funcs/metricsReportingGetSignalsTimeseriesAnalytics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSignalsTimeseriesAnalyticsRequest$inboundSchema, +}; + +export const tool$metricsReportingGetSignalsTimeseriesAnalytics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-get-signals-timeseries-analytics", + description: `Generate timeseries alert metrics + +Generate a timeseries-based report of metrics for Signals alerts`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await metricsReportingGetSignalsTimeseriesAnalytics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingListIncidentMetrics.ts b/src/mcp-server/tools/metricsReportingListIncidentMetrics.ts new file mode 100644 index 00000000..17267e59 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingListIncidentMetrics.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingListIncidentMetrics } from "../../funcs/metricsReportingListIncidentMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentMetricsRequest$inboundSchema, +}; + +export const tool$metricsReportingListIncidentMetrics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-list-incident-metrics", + description: `List incident metrics and analytics + +Returns a report with time bucketed analytics data`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingListIncidentMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingListInfrastructureMetrics.ts b/src/mcp-server/tools/metricsReportingListInfrastructureMetrics.ts new file mode 100644 index 00000000..5f2c33f8 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingListInfrastructureMetrics.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingListInfrastructureMetrics } from "../../funcs/metricsReportingListInfrastructureMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListInfrastructureMetricsRequest$inboundSchema, +}; + +export const tool$metricsReportingListInfrastructureMetrics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-list-infrastructure-metrics", + description: `Get metrics for a component + +Return metrics for a specific component`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingListInfrastructureMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingListInfrastructureTypeMetrics.ts b/src/mcp-server/tools/metricsReportingListInfrastructureTypeMetrics.ts new file mode 100644 index 00000000..e591e806 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingListInfrastructureTypeMetrics.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingListInfrastructureTypeMetrics } from "../../funcs/metricsReportingListInfrastructureTypeMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListInfrastructureTypeMetricsRequest$inboundSchema, +}; + +export const tool$metricsReportingListInfrastructureTypeMetrics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-list-infrastructure-type-metrics", + description: `List metrics for a component type + +Returns metrics for all components of a given type`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await metricsReportingListInfrastructureTypeMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingListRetrospectiveMetrics.ts b/src/mcp-server/tools/metricsReportingListRetrospectiveMetrics.ts new file mode 100644 index 00000000..b9da9803 --- /dev/null +++ b/src/mcp-server/tools/metricsReportingListRetrospectiveMetrics.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingListRetrospectiveMetrics } from "../../funcs/metricsReportingListRetrospectiveMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListRetrospectiveMetricsRequest$inboundSchema, +}; + +export const tool$metricsReportingListRetrospectiveMetrics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-list-retrospective-metrics", + description: `List retrospective metrics + +Returns a report with retrospective analytics data`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingListRetrospectiveMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingListSavedSearches.ts b/src/mcp-server/tools/metricsReportingListSavedSearches.ts new file mode 100644 index 00000000..f9381b3b --- /dev/null +++ b/src/mcp-server/tools/metricsReportingListSavedSearches.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingListSavedSearches } from "../../funcs/metricsReportingListSavedSearches.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSavedSearchesRequest$inboundSchema, +}; + +export const tool$metricsReportingListSavedSearches: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-list-saved-searches", + description: `List saved searches + +Lists saved searches`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingListSavedSearches( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingListUserInvolvementMetrics.ts b/src/mcp-server/tools/metricsReportingListUserInvolvementMetrics.ts new file mode 100644 index 00000000..6e3615bc --- /dev/null +++ b/src/mcp-server/tools/metricsReportingListUserInvolvementMetrics.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingListUserInvolvementMetrics } from "../../funcs/metricsReportingListUserInvolvementMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListUserInvolvementMetricsRequest$inboundSchema, +}; + +export const tool$metricsReportingListUserInvolvementMetrics: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-list-user-involvement-metrics", + description: `List user metrics + +Returns a report with time bucketed analytics data`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingListUserInvolvementMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/metricsReportingUpdateSavedSearch.ts b/src/mcp-server/tools/metricsReportingUpdateSavedSearch.ts new file mode 100644 index 00000000..3c89d87d --- /dev/null +++ b/src/mcp-server/tools/metricsReportingUpdateSavedSearch.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsReportingUpdateSavedSearch } from "../../funcs/metricsReportingUpdateSavedSearch.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateSavedSearchRequest$inboundSchema, +}; + +export const tool$metricsReportingUpdateSavedSearch: ToolDefinition< + typeof args +> = { + name: "metrics/reporting-update-saved-search", + description: `Update a saved search + +Update a specific saved search`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsReportingUpdateSavedSearch( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesCreateIncidentRetrospective.ts b/src/mcp-server/tools/retrospectivesCreateIncidentRetrospective.ts new file mode 100644 index 00000000..3c771cb7 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesCreateIncidentRetrospective.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesCreateIncidentRetrospective } from "../../funcs/retrospectivesCreateIncidentRetrospective.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentRetrospectiveRequest$inboundSchema, +}; + +export const tool$retrospectivesCreateIncidentRetrospective: ToolDefinition< + typeof args +> = { + name: "retrospectives-create-incident-retrospective", + description: `Create a new retrospective on the incident using the template + +Create a new retrospective for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesCreateIncidentRetrospective( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesCreateIncidentRetrospectiveDynamicInput.ts b/src/mcp-server/tools/retrospectivesCreateIncidentRetrospectiveDynamicInput.ts new file mode 100644 index 00000000..099c8020 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesCreateIncidentRetrospectiveDynamicInput.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesCreateIncidentRetrospectiveDynamicInput } from "../../funcs/retrospectivesCreateIncidentRetrospectiveDynamicInput.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: + operations.CreateIncidentRetrospectiveDynamicInputRequest$inboundSchema, +}; + +export const tool$retrospectivesCreateIncidentRetrospectiveDynamicInput: + ToolDefinition = { + name: "retrospectives-create-incident-retrospective-dynamic-input", + description: + `Add a new dynamic input field to a retrospective's dynamic input group field + +Add a new dynamic input field to a dynamic input group`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await retrospectivesCreateIncidentRetrospectiveDynamicInput( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/retrospectivesCreateIncidentRetrospectiveField.ts b/src/mcp-server/tools/retrospectivesCreateIncidentRetrospectiveField.ts new file mode 100644 index 00000000..86b78b2e --- /dev/null +++ b/src/mcp-server/tools/retrospectivesCreateIncidentRetrospectiveField.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesCreateIncidentRetrospectiveField } from "../../funcs/retrospectivesCreateIncidentRetrospectiveField.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentRetrospectiveFieldRequest$inboundSchema, +}; + +export const tool$retrospectivesCreateIncidentRetrospectiveField: + ToolDefinition = { + name: "retrospectives-create-incident-retrospective-field", + description: + `Appends a new incident retrospective field to an incident retrospective + +Add a new field to an incident retrospective`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await retrospectivesCreateIncidentRetrospectiveField( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/retrospectivesCreatePostMortemReason.ts b/src/mcp-server/tools/retrospectivesCreatePostMortemReason.ts new file mode 100644 index 00000000..11868f72 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesCreatePostMortemReason.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesCreatePostMortemReason } from "../../funcs/retrospectivesCreatePostMortemReason.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreatePostMortemReasonRequest$inboundSchema, +}; + +export const tool$retrospectivesCreatePostMortemReason: ToolDefinition< + typeof args +> = { + name: "retrospectives-create-post-mortem-reason", + description: `Create a contributing factor for a retrospective report + +Add a new contributing factor to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesCreatePostMortemReason( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesCreatePostMortemReport.ts b/src/mcp-server/tools/retrospectivesCreatePostMortemReport.ts new file mode 100644 index 00000000..c38e9d6c --- /dev/null +++ b/src/mcp-server/tools/retrospectivesCreatePostMortemReport.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesCreatePostMortemReport } from "../../funcs/retrospectivesCreatePostMortemReport.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreatePostMortemReport$inboundSchema, +}; + +export const tool$retrospectivesCreatePostMortemReport: ToolDefinition< + typeof args +> = { + name: "retrospectives-create-post-mortem-report", + description: `Create a retrospective report + +Create a report`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesCreatePostMortemReport( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesCreateRetrospectiveTemplate.ts b/src/mcp-server/tools/retrospectivesCreateRetrospectiveTemplate.ts new file mode 100644 index 00000000..9383de6e --- /dev/null +++ b/src/mcp-server/tools/retrospectivesCreateRetrospectiveTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesCreateRetrospectiveTemplate } from "../../funcs/retrospectivesCreateRetrospectiveTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateRetrospectiveTemplateRequest$inboundSchema, +}; + +export const tool$retrospectivesCreateRetrospectiveTemplate: ToolDefinition< + typeof args +> = { + name: "retrospectives-create-retrospective-template", + description: `Create a retrospective template + +Create a new retrospective template`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesCreateRetrospectiveTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesDeleteIncidentRetrospectiveDynamicInput.ts b/src/mcp-server/tools/retrospectivesDeleteIncidentRetrospectiveDynamicInput.ts new file mode 100644 index 00000000..e6010bed --- /dev/null +++ b/src/mcp-server/tools/retrospectivesDeleteIncidentRetrospectiveDynamicInput.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesDeleteIncidentRetrospectiveDynamicInput } from "../../funcs/retrospectivesDeleteIncidentRetrospectiveDynamicInput.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: + operations.DeleteIncidentRetrospectiveDynamicInputRequest$inboundSchema, +}; + +export const tool$retrospectivesDeleteIncidentRetrospectiveDynamicInput: + ToolDefinition = { + name: "retrospectives-delete-incident-retrospective-dynamic-input", + description: + `Removes a dynamic input from a retrospective's dynamic input group field + +Delete a dynamic input on a dynamic input group`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await retrospectivesDeleteIncidentRetrospectiveDynamicInput( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/retrospectivesDeletePostMortemReason.ts b/src/mcp-server/tools/retrospectivesDeletePostMortemReason.ts new file mode 100644 index 00000000..63542810 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesDeletePostMortemReason.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesDeletePostMortemReason } from "../../funcs/retrospectivesDeletePostMortemReason.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeletePostMortemReasonRequest$inboundSchema, +}; + +export const tool$retrospectivesDeletePostMortemReason: ToolDefinition< + typeof args +> = { + name: "retrospectives-delete-post-mortem-reason", + description: `Delete a contributing factor from a retrospective report + +Delete a contributing factor`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesDeletePostMortemReason( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesDeleteRetrospectiveTemplate.ts b/src/mcp-server/tools/retrospectivesDeleteRetrospectiveTemplate.ts new file mode 100644 index 00000000..3e5ba97c --- /dev/null +++ b/src/mcp-server/tools/retrospectivesDeleteRetrospectiveTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesDeleteRetrospectiveTemplate } from "../../funcs/retrospectivesDeleteRetrospectiveTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteRetrospectiveTemplateRequest$inboundSchema, +}; + +export const tool$retrospectivesDeleteRetrospectiveTemplate: ToolDefinition< + typeof args +> = { + name: "retrospectives-delete-retrospective-template", + description: `Delete a retrospective template + +Delete a single retrospective template`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesDeleteRetrospectiveTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesExportIncidentRetrospectives.ts b/src/mcp-server/tools/retrospectivesExportIncidentRetrospectives.ts new file mode 100644 index 00000000..4e5abcec --- /dev/null +++ b/src/mcp-server/tools/retrospectivesExportIncidentRetrospectives.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesExportIncidentRetrospectives } from "../../funcs/retrospectivesExportIncidentRetrospectives.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ExportIncidentRetrospectivesRequest$inboundSchema, +}; + +export const tool$retrospectivesExportIncidentRetrospectives: ToolDefinition< + typeof args +> = { + name: "retrospectives-export-incident-retrospectives", + description: `Export an incident's retrospective(s) + +Export incident's retrospective(s) using their templates`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesExportIncidentRetrospectives( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesGetIncidentRetrospectiveField.ts b/src/mcp-server/tools/retrospectivesGetIncidentRetrospectiveField.ts new file mode 100644 index 00000000..dfacf7db --- /dev/null +++ b/src/mcp-server/tools/retrospectivesGetIncidentRetrospectiveField.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesGetIncidentRetrospectiveField } from "../../funcs/retrospectivesGetIncidentRetrospectiveField.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentRetrospectiveFieldRequest$inboundSchema, +}; + +export const tool$retrospectivesGetIncidentRetrospectiveField: ToolDefinition< + typeof args +> = { + name: "retrospectives-get-incident-retrospective-field", + description: `Get a retrospective field + +Retrieve a field on an incident retrospective`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesGetIncidentRetrospectiveField( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesGetPostMortemQuestion.ts b/src/mcp-server/tools/retrospectivesGetPostMortemQuestion.ts new file mode 100644 index 00000000..5bd0214f --- /dev/null +++ b/src/mcp-server/tools/retrospectivesGetPostMortemQuestion.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesGetPostMortemQuestion } from "../../funcs/retrospectivesGetPostMortemQuestion.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetPostMortemQuestionRequest$inboundSchema, +}; + +export const tool$retrospectivesGetPostMortemQuestion: ToolDefinition< + typeof args +> = { + name: "retrospectives-get-post-mortem-question", + description: `Get a retrospective question + +Get an incident retrospective question configured to be provided and filled out on each retrospective report.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesGetPostMortemQuestion( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesGetPostMortemReport.ts b/src/mcp-server/tools/retrospectivesGetPostMortemReport.ts new file mode 100644 index 00000000..dd180d61 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesGetPostMortemReport.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesGetPostMortemReport } from "../../funcs/retrospectivesGetPostMortemReport.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetPostMortemReportRequest$inboundSchema, +}; + +export const tool$retrospectivesGetPostMortemReport: ToolDefinition< + typeof args +> = { + name: "retrospectives-get-post-mortem-report", + description: `Get a retrospective report + +Get a report`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesGetPostMortemReport( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesGetRetrospectiveTemplate.ts b/src/mcp-server/tools/retrospectivesGetRetrospectiveTemplate.ts new file mode 100644 index 00000000..29eb1687 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesGetRetrospectiveTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesGetRetrospectiveTemplate } from "../../funcs/retrospectivesGetRetrospectiveTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetRetrospectiveTemplateRequest$inboundSchema, +}; + +export const tool$retrospectivesGetRetrospectiveTemplate: ToolDefinition< + typeof args +> = { + name: "retrospectives-get-retrospective-template", + description: `Get a retrospective template + +Retrieve a single retrospective template by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesGetRetrospectiveTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesListIncidentRetrospectives.ts b/src/mcp-server/tools/retrospectivesListIncidentRetrospectives.ts new file mode 100644 index 00000000..036bb118 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesListIncidentRetrospectives.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesListIncidentRetrospectives } from "../../funcs/retrospectivesListIncidentRetrospectives.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentRetrospectivesRequest$inboundSchema, +}; + +export const tool$retrospectivesListIncidentRetrospectives: ToolDefinition< + typeof args +> = { + name: "retrospectives-list-incident-retrospectives", + description: `All attached retrospectives for an incident + +Retrieve retrospectives attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesListIncidentRetrospectives( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesListPostMortemQuestions.ts b/src/mcp-server/tools/retrospectivesListPostMortemQuestions.ts new file mode 100644 index 00000000..3e6d1ff3 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesListPostMortemQuestions.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesListPostMortemQuestions } from "../../funcs/retrospectivesListPostMortemQuestions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListPostMortemQuestionsRequest$inboundSchema, +}; + +export const tool$retrospectivesListPostMortemQuestions: ToolDefinition< + typeof args +> = { + name: "retrospectives-list-post-mortem-questions", + description: `List retrospective questions + +List the questions configured to be provided and filled out on each retrospective report.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesListPostMortemQuestions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesListPostMortemReasons.ts b/src/mcp-server/tools/retrospectivesListPostMortemReasons.ts new file mode 100644 index 00000000..f3d5d19d --- /dev/null +++ b/src/mcp-server/tools/retrospectivesListPostMortemReasons.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesListPostMortemReasons } from "../../funcs/retrospectivesListPostMortemReasons.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListPostMortemReasonsRequest$inboundSchema, +}; + +export const tool$retrospectivesListPostMortemReasons: ToolDefinition< + typeof args +> = { + name: "retrospectives-list-post-mortem-reasons", + description: `List contributing factors for a retrospective report + +List all contributing factors to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesListPostMortemReasons( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesListPostMortemReports.ts b/src/mcp-server/tools/retrospectivesListPostMortemReports.ts new file mode 100644 index 00000000..c2825ada --- /dev/null +++ b/src/mcp-server/tools/retrospectivesListPostMortemReports.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesListPostMortemReports } from "../../funcs/retrospectivesListPostMortemReports.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListPostMortemReportsRequest$inboundSchema, +}; + +export const tool$retrospectivesListPostMortemReports: ToolDefinition< + typeof args +> = { + name: "retrospectives-list-post-mortem-reports", + description: `List retrospective reports + +List all reports`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesListPostMortemReports( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesListRetrospectiveTemplates.ts b/src/mcp-server/tools/retrospectivesListRetrospectiveTemplates.ts new file mode 100644 index 00000000..35f38708 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesListRetrospectiveTemplates.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesListRetrospectiveTemplates } from "../../funcs/retrospectivesListRetrospectiveTemplates.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListRetrospectiveTemplatesRequest$inboundSchema, +}; + +export const tool$retrospectivesListRetrospectiveTemplates: ToolDefinition< + typeof args +> = { + name: "retrospectives-list-retrospective-templates", + description: `List retrospective templates + +List all retrospective templates`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesListRetrospectiveTemplates( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesListRetrospectives.ts b/src/mcp-server/tools/retrospectivesListRetrospectives.ts new file mode 100644 index 00000000..408b9ee7 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesListRetrospectives.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesListRetrospectives } from "../../funcs/retrospectivesListRetrospectives.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListRetrospectivesRequest$inboundSchema, +}; + +export const tool$retrospectivesListRetrospectives: ToolDefinition< + typeof args +> = { + name: "retrospectives-list-retrospectives", + description: `List retrospective reports + +List all retrospective reports`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesListRetrospectives( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesPublishPostMortemReport.ts b/src/mcp-server/tools/retrospectivesPublishPostMortemReport.ts new file mode 100644 index 00000000..d2a47e84 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesPublishPostMortemReport.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesPublishPostMortemReport } from "../../funcs/retrospectivesPublishPostMortemReport.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PublishPostMortemReportRequest$inboundSchema, +}; + +export const tool$retrospectivesPublishPostMortemReport: ToolDefinition< + typeof args +> = { + name: "retrospectives-publish-post-mortem-report", + description: `Publish a retrospective report + +Marks an incident retrospective as published and emails all of the participants in the report the summary`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesPublishPostMortemReport( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesReorderPostMortemReasons.ts b/src/mcp-server/tools/retrospectivesReorderPostMortemReasons.ts new file mode 100644 index 00000000..99252eb0 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesReorderPostMortemReasons.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesReorderPostMortemReasons } from "../../funcs/retrospectivesReorderPostMortemReasons.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ReorderPostMortemReasonsRequest$inboundSchema, +}; + +export const tool$retrospectivesReorderPostMortemReasons: ToolDefinition< + typeof args +> = { + name: "retrospectives-reorder-post-mortem-reasons", + description: `Reorder a contributing factor for a retrospective report + +Update the order of contributing factors in a retrospective report`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesReorderPostMortemReasons( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesShareIncidentRetrospectives.ts b/src/mcp-server/tools/retrospectivesShareIncidentRetrospectives.ts new file mode 100644 index 00000000..688cb2d2 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesShareIncidentRetrospectives.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesShareIncidentRetrospectives } from "../../funcs/retrospectivesShareIncidentRetrospectives.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ShareIncidentRetrospectivesRequest$inboundSchema, +}; + +export const tool$retrospectivesShareIncidentRetrospectives: ToolDefinition< + typeof args +> = { + name: "retrospectives-share-incident-retrospectives", + description: `Share an incident's retrospective + +Share incident retrospectives with users or teams`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesShareIncidentRetrospectives( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesUpdateIncidentRetrospective.ts b/src/mcp-server/tools/retrospectivesUpdateIncidentRetrospective.ts new file mode 100644 index 00000000..494c5a81 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesUpdateIncidentRetrospective.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesUpdateIncidentRetrospective } from "../../funcs/retrospectivesUpdateIncidentRetrospective.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentRetrospectiveRequest$inboundSchema, +}; + +export const tool$retrospectivesUpdateIncidentRetrospective: ToolDefinition< + typeof args +> = { + name: "retrospectives-update-incident-retrospective", + description: `Update a retrospective on the incident + +Update a retrospective attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesUpdateIncidentRetrospective( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesUpdateIncidentRetrospectiveField.ts b/src/mcp-server/tools/retrospectivesUpdateIncidentRetrospectiveField.ts new file mode 100644 index 00000000..b3c4318e --- /dev/null +++ b/src/mcp-server/tools/retrospectivesUpdateIncidentRetrospectiveField.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesUpdateIncidentRetrospectiveField } from "../../funcs/retrospectivesUpdateIncidentRetrospectiveField.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentRetrospectiveFieldRequest$inboundSchema, +}; + +export const tool$retrospectivesUpdateIncidentRetrospectiveField: + ToolDefinition = { + name: "retrospectives-update-incident-retrospective-field", + description: `Update the value on a retrospective field + +Update retrospective field value`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await retrospectivesUpdateIncidentRetrospectiveField( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/retrospectivesUpdatePostMortemField.ts b/src/mcp-server/tools/retrospectivesUpdatePostMortemField.ts new file mode 100644 index 00000000..b430f3aa --- /dev/null +++ b/src/mcp-server/tools/retrospectivesUpdatePostMortemField.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesUpdatePostMortemField } from "../../funcs/retrospectivesUpdatePostMortemField.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdatePostMortemFieldRequest$inboundSchema, +}; + +export const tool$retrospectivesUpdatePostMortemField: ToolDefinition< + typeof args +> = { + name: "retrospectives-update-post-mortem-field", + description: `Update a retrospective field + +Update a field value on a post mortem report`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesUpdatePostMortemField( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesUpdatePostMortemQuestions.ts b/src/mcp-server/tools/retrospectivesUpdatePostMortemQuestions.ts new file mode 100644 index 00000000..bb03b838 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesUpdatePostMortemQuestions.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesUpdatePostMortemQuestions } from "../../funcs/retrospectivesUpdatePostMortemQuestions.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.UpdatePostMortemQuestions$inboundSchema, +}; + +export const tool$retrospectivesUpdatePostMortemQuestions: ToolDefinition< + typeof args +> = { + name: "retrospectives-update-post-mortem-questions", + description: `Update retrospective questions + +Update the questions configured to be provided and filled out on future retrospective reports.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesUpdatePostMortemQuestions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesUpdatePostMortemReason.ts b/src/mcp-server/tools/retrospectivesUpdatePostMortemReason.ts new file mode 100644 index 00000000..498ee60e --- /dev/null +++ b/src/mcp-server/tools/retrospectivesUpdatePostMortemReason.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesUpdatePostMortemReason } from "../../funcs/retrospectivesUpdatePostMortemReason.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdatePostMortemReasonRequest$inboundSchema, +}; + +export const tool$retrospectivesUpdatePostMortemReason: ToolDefinition< + typeof args +> = { + name: "retrospectives-update-post-mortem-reason", + description: `Update a contributing factor in a retrospective report + +Update a contributing factor`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesUpdatePostMortemReason( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesUpdatePostMortemReport.ts b/src/mcp-server/tools/retrospectivesUpdatePostMortemReport.ts new file mode 100644 index 00000000..b7c98399 --- /dev/null +++ b/src/mcp-server/tools/retrospectivesUpdatePostMortemReport.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesUpdatePostMortemReport } from "../../funcs/retrospectivesUpdatePostMortemReport.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdatePostMortemReportRequest$inboundSchema, +}; + +export const tool$retrospectivesUpdatePostMortemReport: ToolDefinition< + typeof args +> = { + name: "retrospectives-update-post-mortem-report", + description: `Update a retrospective report + +Update a report`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesUpdatePostMortemReport( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/retrospectivesUpdateRetrospectiveTemplate.ts b/src/mcp-server/tools/retrospectivesUpdateRetrospectiveTemplate.ts new file mode 100644 index 00000000..6afe185f --- /dev/null +++ b/src/mcp-server/tools/retrospectivesUpdateRetrospectiveTemplate.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { retrospectivesUpdateRetrospectiveTemplate } from "../../funcs/retrospectivesUpdateRetrospectiveTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateRetrospectiveTemplateRequest$inboundSchema, +}; + +export const tool$retrospectivesUpdateRetrospectiveTemplate: ToolDefinition< + typeof args +> = { + name: "retrospectives-update-retrospective-template", + description: `Update a retrospective template + +Update a single retrospective template`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await retrospectivesUpdateRetrospectiveTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksCreateRunbook.ts b/src/mcp-server/tools/runbooksCreateRunbook.ts new file mode 100644 index 00000000..f49622da --- /dev/null +++ b/src/mcp-server/tools/runbooksCreateRunbook.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksCreateRunbook } from "../../funcs/runbooksCreateRunbook.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateRunbook$inboundSchema, +}; + +export const tool$runbooksCreateRunbook: ToolDefinition = { + name: "runbooks-create-runbook", + description: `Create a runbook + +Create a new runbook for use with incidents.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksCreateRunbook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksCreateRunbookExecution.ts b/src/mcp-server/tools/runbooksCreateRunbookExecution.ts new file mode 100644 index 00000000..441f6dd0 --- /dev/null +++ b/src/mcp-server/tools/runbooksCreateRunbookExecution.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksCreateRunbookExecution } from "../../funcs/runbooksCreateRunbookExecution.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateRunbookExecution$inboundSchema, +}; + +export const tool$runbooksCreateRunbookExecution: ToolDefinition = + { + name: "runbooks-create-runbook-execution", + description: `Create a runbook execution + +Attaches a runbook to an incident and executes it`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksCreateRunbookExecution( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/runbooksDeleteRunbook.ts b/src/mcp-server/tools/runbooksDeleteRunbook.ts new file mode 100644 index 00000000..ddcaa6fc --- /dev/null +++ b/src/mcp-server/tools/runbooksDeleteRunbook.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksDeleteRunbook } from "../../funcs/runbooksDeleteRunbook.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteRunbookRequest$inboundSchema, +}; + +export const tool$runbooksDeleteRunbook: ToolDefinition = { + name: "runbooks-delete-runbook", + description: `Delete a runbook + +Delete a runbook and make it unavailable for any future incidents.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksDeleteRunbook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksDeleteRunbookExecution.ts b/src/mcp-server/tools/runbooksDeleteRunbookExecution.ts new file mode 100644 index 00000000..e384fd92 --- /dev/null +++ b/src/mcp-server/tools/runbooksDeleteRunbookExecution.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksDeleteRunbookExecution } from "../../funcs/runbooksDeleteRunbookExecution.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteRunbookExecutionRequest$inboundSchema, +}; + +export const tool$runbooksDeleteRunbookExecution: ToolDefinition = + { + name: "runbooks-delete-runbook-execution", + description: `Terminate a runbook execution + +Terminates a runbook execution, preventing any further steps from being executed`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksDeleteRunbookExecution( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/runbooksGetRunbook.ts b/src/mcp-server/tools/runbooksGetRunbook.ts new file mode 100644 index 00000000..5f3acee4 --- /dev/null +++ b/src/mcp-server/tools/runbooksGetRunbook.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksGetRunbook } from "../../funcs/runbooksGetRunbook.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetRunbookRequest$inboundSchema, +}; + +export const tool$runbooksGetRunbook: ToolDefinition = { + name: "runbooks-get-runbook", + description: `Get a runbook + +Get a runbook and all its configuration`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksGetRunbook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksGetRunbookActionFieldOptions.ts b/src/mcp-server/tools/runbooksGetRunbookActionFieldOptions.ts new file mode 100644 index 00000000..4ee8b742 --- /dev/null +++ b/src/mcp-server/tools/runbooksGetRunbookActionFieldOptions.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksGetRunbookActionFieldOptions } from "../../funcs/runbooksGetRunbookActionFieldOptions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetRunbookActionFieldOptionsRequest$inboundSchema, +}; + +export const tool$runbooksGetRunbookActionFieldOptions: ToolDefinition< + typeof args +> = { + name: "runbooks-get-runbook-action-field-options", + description: `List select options for a runbook integration action field + +List select options for a runbook integration action field`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksGetRunbookActionFieldOptions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksGetRunbookExecution.ts b/src/mcp-server/tools/runbooksGetRunbookExecution.ts new file mode 100644 index 00000000..129fa557 --- /dev/null +++ b/src/mcp-server/tools/runbooksGetRunbookExecution.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksGetRunbookExecution } from "../../funcs/runbooksGetRunbookExecution.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetRunbookExecutionRequest$inboundSchema, +}; + +export const tool$runbooksGetRunbookExecution: ToolDefinition = { + name: "runbooks-get-runbook-execution", + description: `Get a runbook execution + +Retrieve a runbook execution by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksGetRunbookExecution( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksGetRunbookExecutionStepScript.ts b/src/mcp-server/tools/runbooksGetRunbookExecutionStepScript.ts new file mode 100644 index 00000000..ef9154eb --- /dev/null +++ b/src/mcp-server/tools/runbooksGetRunbookExecutionStepScript.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksGetRunbookExecutionStepScript } from "../../funcs/runbooksGetRunbookExecutionStepScript.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetRunbookExecutionStepScriptRequest$inboundSchema, +}; + +export const tool$runbooksGetRunbookExecutionStepScript: ToolDefinition< + typeof args +> = { + name: "runbooks-get-runbook-execution-step-script", + description: `Get a step's bash script + +Retrieves the bash script from a "script" step.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksGetRunbookExecutionStepScript( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksListRunbookActions.ts b/src/mcp-server/tools/runbooksListRunbookActions.ts new file mode 100644 index 00000000..2dd70a58 --- /dev/null +++ b/src/mcp-server/tools/runbooksListRunbookActions.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksListRunbookActions } from "../../funcs/runbooksListRunbookActions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListRunbookActionsRequest$inboundSchema, +}; + +export const tool$runbooksListRunbookActions: ToolDefinition = { + name: "runbooks-list-runbook-actions", + description: `List runbook actions + +List all runbook actions available through your connected integrations`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksListRunbookActions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksListRunbookAudits.ts b/src/mcp-server/tools/runbooksListRunbookAudits.ts new file mode 100644 index 00000000..0923edeb --- /dev/null +++ b/src/mcp-server/tools/runbooksListRunbookAudits.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksListRunbookAudits } from "../../funcs/runbooksListRunbookAudits.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListRunbookAuditsRequest$inboundSchema, +}; + +export const tool$runbooksListRunbookAudits: ToolDefinition = { + name: "runbooks-list-runbook-audits", + description: `List runbook audits + +Please contact support to enable audit logging for your account.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksListRunbookAudits( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksListRunbookExecutions.ts b/src/mcp-server/tools/runbooksListRunbookExecutions.ts new file mode 100644 index 00000000..998e2e4c --- /dev/null +++ b/src/mcp-server/tools/runbooksListRunbookExecutions.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksListRunbookExecutions } from "../../funcs/runbooksListRunbookExecutions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListRunbookExecutionsRequest$inboundSchema, +}; + +export const tool$runbooksListRunbookExecutions: ToolDefinition = { + name: "runbooks-list-runbook-executions", + description: `List runbook executions + +List all runbook executions across all runbooks`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksListRunbookExecutions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksListRunbooks.ts b/src/mcp-server/tools/runbooksListRunbooks.ts new file mode 100644 index 00000000..2837f36c --- /dev/null +++ b/src/mcp-server/tools/runbooksListRunbooks.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksListRunbooks } from "../../funcs/runbooksListRunbooks.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListRunbooksRequest$inboundSchema, +}; + +export const tool$runbooksListRunbooks: ToolDefinition = { + name: "runbooks-list-runbooks", + description: `List runbooks + +Lists all available runbooks.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksListRunbooks( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksUpdateRunbook.ts b/src/mcp-server/tools/runbooksUpdateRunbook.ts new file mode 100644 index 00000000..3a65fcd2 --- /dev/null +++ b/src/mcp-server/tools/runbooksUpdateRunbook.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksUpdateRunbook } from "../../funcs/runbooksUpdateRunbook.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateRunbookRequest$inboundSchema, +}; + +export const tool$runbooksUpdateRunbook: ToolDefinition = { + name: "runbooks-update-runbook", + description: `Update a runbook + +Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything +about a runbook, including but not limited to the steps, environments, attachment rules, and severities. +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksUpdateRunbook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksUpdateRunbookExecutionStep.ts b/src/mcp-server/tools/runbooksUpdateRunbookExecutionStep.ts new file mode 100644 index 00000000..0d798268 --- /dev/null +++ b/src/mcp-server/tools/runbooksUpdateRunbookExecutionStep.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksUpdateRunbookExecutionStep } from "../../funcs/runbooksUpdateRunbookExecutionStep.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateRunbookExecutionStepRequest$inboundSchema, +}; + +export const tool$runbooksUpdateRunbookExecutionStep: ToolDefinition< + typeof args +> = { + name: "runbooks-update-runbook-execution-step", + description: `Update a runbook step execution + +Updates a runbook step execution, especially for changing the state of a step execution.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksUpdateRunbookExecutionStep( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/runbooksUpdateRunbookExecutionStepScript.ts b/src/mcp-server/tools/runbooksUpdateRunbookExecutionStepScript.ts new file mode 100644 index 00000000..10197c32 --- /dev/null +++ b/src/mcp-server/tools/runbooksUpdateRunbookExecutionStepScript.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { runbooksUpdateRunbookExecutionStepScript } from "../../funcs/runbooksUpdateRunbookExecutionStepScript.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateRunbookExecutionStepScriptRequest$inboundSchema, +}; + +export const tool$runbooksUpdateRunbookExecutionStepScript: ToolDefinition< + typeof args +> = { + name: "runbooks-update-runbook-execution-step-script", + description: `Update a script step's execution status + +Updates the execution's step.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await runbooksUpdateRunbookExecutionStepScript( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimCreateSCIMGroup.ts b/src/mcp-server/tools/scimCreateSCIMGroup.ts new file mode 100644 index 00000000..ef8881b8 --- /dev/null +++ b/src/mcp-server/tools/scimCreateSCIMGroup.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimCreateSCIMGroup } from "../../funcs/scimCreateSCIMGroup.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateScimGroup$inboundSchema, +}; + +export const tool$scimCreateSCIMGroup: ToolDefinition = { + name: "scim-create-scim-group", + description: `Create a SCIM group and assign members + +SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimCreateSCIMGroup( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimCreateSCIMUser.ts b/src/mcp-server/tools/scimCreateSCIMUser.ts new file mode 100644 index 00000000..5d564951 --- /dev/null +++ b/src/mcp-server/tools/scimCreateSCIMUser.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimCreateSCIMUser } from "../../funcs/scimCreateSCIMUser.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateScimUser$inboundSchema, +}; + +export const tool$scimCreateSCIMUser: ToolDefinition = { + name: "scim-create-scim-user", + description: `Create a User from SCIM data + +SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimCreateSCIMUser( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimDeleteSCIMGroup.ts b/src/mcp-server/tools/scimDeleteSCIMGroup.ts new file mode 100644 index 00000000..33a6d250 --- /dev/null +++ b/src/mcp-server/tools/scimDeleteSCIMGroup.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimDeleteSCIMGroup } from "../../funcs/scimDeleteSCIMGroup.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteScimGroupRequest$inboundSchema, +}; + +export const tool$scimDeleteSCIMGroup: ToolDefinition = { + name: "scim-delete-scim-group", + description: `Delete a SCIM group + +SCIM endpoint to delete a Team (Colloquial for Group in the SCIM protocol).`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimDeleteSCIMGroup( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimDeleteSCIMUser.ts b/src/mcp-server/tools/scimDeleteSCIMUser.ts new file mode 100644 index 00000000..e0386b1e --- /dev/null +++ b/src/mcp-server/tools/scimDeleteSCIMUser.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimDeleteSCIMUser } from "../../funcs/scimDeleteSCIMUser.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteScimUserRequest$inboundSchema, +}; + +export const tool$scimDeleteSCIMUser: ToolDefinition = { + name: "scim-delete-scim-user", + description: `Delete a User matching SCIM data + +SCIM endpoint to delete a User. This endpoint will deactivate a confirmed User record in our system.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimDeleteSCIMUser( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimGetSCIMGroup.ts b/src/mcp-server/tools/scimGetSCIMGroup.ts new file mode 100644 index 00000000..d6c27357 --- /dev/null +++ b/src/mcp-server/tools/scimGetSCIMGroup.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimGetSCIMGroup } from "../../funcs/scimGetSCIMGroup.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetScimGroupRequest$inboundSchema, +}; + +export const tool$scimGetSCIMGroup: ToolDefinition = { + name: "scim-get-scim-group", + description: `Get a SCIM group + +SCIM endpoint that lists a Team (Colloquial for Group in the SCIM protocol)`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimGetSCIMGroup( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimGetSCIMUser.ts b/src/mcp-server/tools/scimGetSCIMUser.ts new file mode 100644 index 00000000..e559f812 --- /dev/null +++ b/src/mcp-server/tools/scimGetSCIMUser.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimGetSCIMUser } from "../../funcs/scimGetSCIMUser.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetScimUserRequest$inboundSchema, +}; + +export const tool$scimGetSCIMUser: ToolDefinition = { + name: "scim-get-scim-user", + description: `Get a SCIM user + +SCIM endpoint that lists a User`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimGetSCIMUser( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimListSCIMGroups.ts b/src/mcp-server/tools/scimListSCIMGroups.ts new file mode 100644 index 00000000..45ac40a2 --- /dev/null +++ b/src/mcp-server/tools/scimListSCIMGroups.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimListSCIMGroups } from "../../funcs/scimListSCIMGroups.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListScimGroupsRequest$inboundSchema, +}; + +export const tool$scimListSCIMGroups: ToolDefinition = { + name: "scim-list-scim-groups", + description: `List SCIM groups + +SCIM endpoint that lists all Teams (Colloquial for Group in the SCIM protocol)`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimListSCIMGroups( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimListSCIMUsers.ts b/src/mcp-server/tools/scimListSCIMUsers.ts new file mode 100644 index 00000000..353b97a2 --- /dev/null +++ b/src/mcp-server/tools/scimListSCIMUsers.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimListSCIMUsers } from "../../funcs/scimListSCIMUsers.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListScimUsersRequest$inboundSchema, +}; + +export const tool$scimListSCIMUsers: ToolDefinition = { + name: "scim-list-scim-users", + description: `List SCIM users + +SCIM endpoint that lists users. This endpoint will display a list of Users currently in the system.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimListSCIMUsers( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimPatchSCIMUser.ts b/src/mcp-server/tools/scimPatchSCIMUser.ts new file mode 100644 index 00000000..a0a56c97 --- /dev/null +++ b/src/mcp-server/tools/scimPatchSCIMUser.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimPatchSCIMUser } from "../../funcs/scimPatchSCIMUser.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.PatchScimUserRequest$inboundSchema, +}; + +export const tool$scimPatchSCIMUser: ToolDefinition = { + name: "scim-patch-scim-user", + description: `Update a User from SCIM data + +PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimPatchSCIMUser( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimUpdateSCIMGroup.ts b/src/mcp-server/tools/scimUpdateSCIMGroup.ts new file mode 100644 index 00000000..599dabb3 --- /dev/null +++ b/src/mcp-server/tools/scimUpdateSCIMGroup.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimUpdateSCIMGroup } from "../../funcs/scimUpdateSCIMGroup.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateScimGroupRequest$inboundSchema, +}; + +export const tool$scimUpdateSCIMGroup: ToolDefinition = { + name: "scim-update-scim-group", + description: `Update a SCIM group and assign members + +SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimUpdateSCIMGroup( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/scimUpdateSCIMUser.ts b/src/mcp-server/tools/scimUpdateSCIMUser.ts new file mode 100644 index 00000000..43540bca --- /dev/null +++ b/src/mcp-server/tools/scimUpdateSCIMUser.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { scimUpdateSCIMUser } from "../../funcs/scimUpdateSCIMUser.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateScimUserRequest$inboundSchema, +}; + +export const tool$scimUpdateSCIMUser: ToolDefinition = { + name: "scim-update-scim-user", + description: `Update a User from SCIM data + +PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await scimUpdateSCIMUser( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsCreateOnCallShift.ts b/src/mcp-server/tools/signalsCreateOnCallShift.ts new file mode 100644 index 00000000..473d4b8e --- /dev/null +++ b/src/mcp-server/tools/signalsCreateOnCallShift.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsCreateOnCallShift } from "../../funcs/signalsCreateOnCallShift.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateOnCallShiftRequest$inboundSchema, +}; + +export const tool$signalsCreateOnCallShift: ToolDefinition = { + name: "signals-create-on-call-shift", + description: `Create a shift for an on-call schedule + +Create a Signals on-call shift in a schedule.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsCreateOnCallShift( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsCreateSignalsEmailTarget.ts b/src/mcp-server/tools/signalsCreateSignalsEmailTarget.ts new file mode 100644 index 00000000..5144de97 --- /dev/null +++ b/src/mcp-server/tools/signalsCreateSignalsEmailTarget.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsCreateSignalsEmailTarget } from "../../funcs/signalsCreateSignalsEmailTarget.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateSignalsEmailTarget$inboundSchema, +}; + +export const tool$signalsCreateSignalsEmailTarget: ToolDefinition = + { + name: "signals-create-signals-email-target", + description: `Create an email target for signals + +Create a Signals email target for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsCreateSignalsEmailTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsCreateSignalsWebhookTarget.ts b/src/mcp-server/tools/signalsCreateSignalsWebhookTarget.ts new file mode 100644 index 00000000..ac69ae70 --- /dev/null +++ b/src/mcp-server/tools/signalsCreateSignalsWebhookTarget.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsCreateSignalsWebhookTarget } from "../../funcs/signalsCreateSignalsWebhookTarget.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateSignalsWebhookTarget$inboundSchema, +}; + +export const tool$signalsCreateSignalsWebhookTarget: ToolDefinition< + typeof args +> = { + name: "signals-create-signals-webhook-target", + description: `Create a webhook target + +Create a Signals webhook target.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsCreateSignalsWebhookTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsCreateTeamEscalationPolicy.ts b/src/mcp-server/tools/signalsCreateTeamEscalationPolicy.ts new file mode 100644 index 00000000..9fa9fc95 --- /dev/null +++ b/src/mcp-server/tools/signalsCreateTeamEscalationPolicy.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsCreateTeamEscalationPolicy } from "../../funcs/signalsCreateTeamEscalationPolicy.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateTeamEscalationPolicyRequest$inboundSchema, +}; + +export const tool$signalsCreateTeamEscalationPolicy: ToolDefinition< + typeof args +> = { + name: "signals-create-team-escalation-policy", + description: `Create an escalation policy for a team + +Create a Signals escalation policy for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsCreateTeamEscalationPolicy( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsCreateTeamOnCallSchedule.ts b/src/mcp-server/tools/signalsCreateTeamOnCallSchedule.ts new file mode 100644 index 00000000..dd600f7f --- /dev/null +++ b/src/mcp-server/tools/signalsCreateTeamOnCallSchedule.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsCreateTeamOnCallSchedule } from "../../funcs/signalsCreateTeamOnCallSchedule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateTeamOnCallScheduleRequest$inboundSchema, +}; + +export const tool$signalsCreateTeamOnCallSchedule: ToolDefinition = + { + name: "signals-create-team-on-call-schedule", + description: `Create an on-call schedule for a team + +Create a Signals on-call schedule for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsCreateTeamOnCallSchedule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsCreateTeamSignalRule.ts b/src/mcp-server/tools/signalsCreateTeamSignalRule.ts new file mode 100644 index 00000000..94621936 --- /dev/null +++ b/src/mcp-server/tools/signalsCreateTeamSignalRule.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsCreateTeamSignalRule } from "../../funcs/signalsCreateTeamSignalRule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateTeamSignalRuleRequest$inboundSchema, +}; + +export const tool$signalsCreateTeamSignalRule: ToolDefinition = { + name: "signals-create-team-signal-rule", + description: `Create a Signals rule + +Create a Signals rule for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsCreateTeamSignalRule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsDebugSignalsExpression.ts b/src/mcp-server/tools/signalsDebugSignalsExpression.ts new file mode 100644 index 00000000..baa985c2 --- /dev/null +++ b/src/mcp-server/tools/signalsDebugSignalsExpression.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsDebugSignalsExpression } from "../../funcs/signalsDebugSignalsExpression.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.DebugSignalsExpression$inboundSchema, +}; + +export const tool$signalsDebugSignalsExpression: ToolDefinition = { + name: "signals-debug-signals-expression", + description: `Debug Signals expressions + +Debug Signals expressions`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsDebugSignalsExpression( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsDeleteOnCallShift.ts b/src/mcp-server/tools/signalsDeleteOnCallShift.ts new file mode 100644 index 00000000..75dffd17 --- /dev/null +++ b/src/mcp-server/tools/signalsDeleteOnCallShift.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsDeleteOnCallShift } from "../../funcs/signalsDeleteOnCallShift.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteOnCallShiftRequest$inboundSchema, +}; + +export const tool$signalsDeleteOnCallShift: ToolDefinition = { + name: "signals-delete-on-call-shift", + description: `Delete an on-call shift from a team schedule + +Delete a Signals on-call shift by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsDeleteOnCallShift( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsDeleteSignalsEmailTarget.ts b/src/mcp-server/tools/signalsDeleteSignalsEmailTarget.ts new file mode 100644 index 00000000..d0c19259 --- /dev/null +++ b/src/mcp-server/tools/signalsDeleteSignalsEmailTarget.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsDeleteSignalsEmailTarget } from "../../funcs/signalsDeleteSignalsEmailTarget.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteSignalsEmailTargetRequest$inboundSchema, +}; + +export const tool$signalsDeleteSignalsEmailTarget: ToolDefinition = + { + name: "signals-delete-signals-email-target", + description: `Delete a signal email target + +Delete a Signals email target by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsDeleteSignalsEmailTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsDeleteSignalsWebhookTarget.ts b/src/mcp-server/tools/signalsDeleteSignalsWebhookTarget.ts new file mode 100644 index 00000000..ee677255 --- /dev/null +++ b/src/mcp-server/tools/signalsDeleteSignalsWebhookTarget.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsDeleteSignalsWebhookTarget } from "../../funcs/signalsDeleteSignalsWebhookTarget.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteSignalsWebhookTargetRequest$inboundSchema, +}; + +export const tool$signalsDeleteSignalsWebhookTarget: ToolDefinition< + typeof args +> = { + name: "signals-delete-signals-webhook-target", + description: `Delete a webhook target + +Delete a Signals webhook target by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsDeleteSignalsWebhookTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsDeleteTeamEscalationPolicy.ts b/src/mcp-server/tools/signalsDeleteTeamEscalationPolicy.ts new file mode 100644 index 00000000..c2b799e0 --- /dev/null +++ b/src/mcp-server/tools/signalsDeleteTeamEscalationPolicy.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsDeleteTeamEscalationPolicy } from "../../funcs/signalsDeleteTeamEscalationPolicy.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTeamEscalationPolicyRequest$inboundSchema, +}; + +export const tool$signalsDeleteTeamEscalationPolicy: ToolDefinition< + typeof args +> = { + name: "signals-delete-team-escalation-policy", + description: `Delete an escalation policy for a team + +Delete a Signals escalation policy by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsDeleteTeamEscalationPolicy( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsDeleteTeamOnCallSchedule.ts b/src/mcp-server/tools/signalsDeleteTeamOnCallSchedule.ts new file mode 100644 index 00000000..be5d8092 --- /dev/null +++ b/src/mcp-server/tools/signalsDeleteTeamOnCallSchedule.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsDeleteTeamOnCallSchedule } from "../../funcs/signalsDeleteTeamOnCallSchedule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTeamOnCallScheduleRequest$inboundSchema, +}; + +export const tool$signalsDeleteTeamOnCallSchedule: ToolDefinition = + { + name: "signals-delete-team-on-call-schedule", + description: `Delete an on-call schedule for a team + +Delete a Signals on-call schedule by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsDeleteTeamOnCallSchedule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsDeleteTeamSignalRule.ts b/src/mcp-server/tools/signalsDeleteTeamSignalRule.ts new file mode 100644 index 00000000..a28a5198 --- /dev/null +++ b/src/mcp-server/tools/signalsDeleteTeamSignalRule.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsDeleteTeamSignalRule } from "../../funcs/signalsDeleteTeamSignalRule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTeamSignalRuleRequest$inboundSchema, +}; + +export const tool$signalsDeleteTeamSignalRule: ToolDefinition = { + name: "signals-delete-team-signal-rule", + description: `Delete a Signals rule + +Delete a Signals rule by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsDeleteTeamSignalRule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsGetOnCallShift.ts b/src/mcp-server/tools/signalsGetOnCallShift.ts new file mode 100644 index 00000000..3852b7c8 --- /dev/null +++ b/src/mcp-server/tools/signalsGetOnCallShift.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsGetOnCallShift } from "../../funcs/signalsGetOnCallShift.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetOnCallShiftRequest$inboundSchema, +}; + +export const tool$signalsGetOnCallShift: ToolDefinition = { + name: "signals-get-on-call-shift", + description: `Get an on-call shift for a team schedule + +Get a Signals on-call shift by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsGetOnCallShift( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsGetSignalsEmailTarget.ts b/src/mcp-server/tools/signalsGetSignalsEmailTarget.ts new file mode 100644 index 00000000..341f6edf --- /dev/null +++ b/src/mcp-server/tools/signalsGetSignalsEmailTarget.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsGetSignalsEmailTarget } from "../../funcs/signalsGetSignalsEmailTarget.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSignalsEmailTargetRequest$inboundSchema, +}; + +export const tool$signalsGetSignalsEmailTarget: ToolDefinition = { + name: "signals-get-signals-email-target", + description: `Get a signal email target + +Get a Signals email target by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsGetSignalsEmailTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsGetSignalsIngestUrl.ts b/src/mcp-server/tools/signalsGetSignalsIngestUrl.ts new file mode 100644 index 00000000..fcef35a7 --- /dev/null +++ b/src/mcp-server/tools/signalsGetSignalsIngestUrl.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsGetSignalsIngestUrl } from "../../funcs/signalsGetSignalsIngestUrl.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSignalsIngestUrlRequest$inboundSchema, +}; + +export const tool$signalsGetSignalsIngestUrl: ToolDefinition = { + name: "signals-get-signals-ingest-url", + description: `Get the signals ingestion URL + +Retrieve the url for ingesting signals for your organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsGetSignalsIngestUrl( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsGetSignalsWebhookTarget.ts b/src/mcp-server/tools/signalsGetSignalsWebhookTarget.ts new file mode 100644 index 00000000..938a789c --- /dev/null +++ b/src/mcp-server/tools/signalsGetSignalsWebhookTarget.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsGetSignalsWebhookTarget } from "../../funcs/signalsGetSignalsWebhookTarget.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetSignalsWebhookTargetRequest$inboundSchema, +}; + +export const tool$signalsGetSignalsWebhookTarget: ToolDefinition = + { + name: "signals-get-signals-webhook-target", + description: `Get a webhook target + +Get a Signals webhook target by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsGetSignalsWebhookTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsGetTeamEscalationPolicy.ts b/src/mcp-server/tools/signalsGetTeamEscalationPolicy.ts new file mode 100644 index 00000000..92f57bd2 --- /dev/null +++ b/src/mcp-server/tools/signalsGetTeamEscalationPolicy.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsGetTeamEscalationPolicy } from "../../funcs/signalsGetTeamEscalationPolicy.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTeamEscalationPolicyRequest$inboundSchema, +}; + +export const tool$signalsGetTeamEscalationPolicy: ToolDefinition = + { + name: "signals-get-team-escalation-policy", + description: `Get an escalation policy for a team + +Get a Signals escalation policy by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsGetTeamEscalationPolicy( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsGetTeamOnCallSchedule.ts b/src/mcp-server/tools/signalsGetTeamOnCallSchedule.ts new file mode 100644 index 00000000..95b16e18 --- /dev/null +++ b/src/mcp-server/tools/signalsGetTeamOnCallSchedule.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsGetTeamOnCallSchedule } from "../../funcs/signalsGetTeamOnCallSchedule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTeamOnCallScheduleRequest$inboundSchema, +}; + +export const tool$signalsGetTeamOnCallSchedule: ToolDefinition = { + name: "signals-get-team-on-call-schedule", + description: `Get an on-call schedule for a team + +Get a Signals on-call schedule by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsGetTeamOnCallSchedule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsGetTeamSignalRule.ts b/src/mcp-server/tools/signalsGetTeamSignalRule.ts new file mode 100644 index 00000000..04b9eaae --- /dev/null +++ b/src/mcp-server/tools/signalsGetTeamSignalRule.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsGetTeamSignalRule } from "../../funcs/signalsGetTeamSignalRule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTeamSignalRuleRequest$inboundSchema, +}; + +export const tool$signalsGetTeamSignalRule: ToolDefinition = { + name: "signals-get-team-signal-rule", + description: `Get a Signals rule + +Get a Signals rule by ID.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsGetTeamSignalRule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsListOrganizationOnCallSchedules.ts b/src/mcp-server/tools/signalsListOrganizationOnCallSchedules.ts new file mode 100644 index 00000000..c78ad335 --- /dev/null +++ b/src/mcp-server/tools/signalsListOrganizationOnCallSchedules.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListOrganizationOnCallSchedules } from "../../funcs/signalsListOrganizationOnCallSchedules.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListOrganizationOnCallSchedulesRequest$inboundSchema, +}; + +export const tool$signalsListOrganizationOnCallSchedules: ToolDefinition< + typeof args +> = { + name: "signals-list-organization-on-call-schedules", + description: `List on-call schedules + +List all Signals on-call schedules for the entire organization.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsListOrganizationOnCallSchedules( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsListSignalsEmailTargets.ts b/src/mcp-server/tools/signalsListSignalsEmailTargets.ts new file mode 100644 index 00000000..b3e41afe --- /dev/null +++ b/src/mcp-server/tools/signalsListSignalsEmailTargets.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListSignalsEmailTargets } from "../../funcs/signalsListSignalsEmailTargets.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSignalsEmailTargetsRequest$inboundSchema, +}; + +export const tool$signalsListSignalsEmailTargets: ToolDefinition = + { + name: "signals-list-signals-email-targets", + description: `List email targets for signals + +List all Signals email targets for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsListSignalsEmailTargets( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsListSignalsEventSources.ts b/src/mcp-server/tools/signalsListSignalsEventSources.ts new file mode 100644 index 00000000..18df39c7 --- /dev/null +++ b/src/mcp-server/tools/signalsListSignalsEventSources.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListSignalsEventSources } from "../../funcs/signalsListSignalsEventSources.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSignalsEventSourcesRequest$inboundSchema, +}; + +export const tool$signalsListSignalsEventSources: ToolDefinition = + { + name: "signals-list-signals-event-sources", + description: `List event sources for Signals + +List all Signals event sources for the authenticated user.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsListSignalsEventSources( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsListSignalsTransposers.ts b/src/mcp-server/tools/signalsListSignalsTransposers.ts new file mode 100644 index 00000000..42884df6 --- /dev/null +++ b/src/mcp-server/tools/signalsListSignalsTransposers.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListSignalsTransposers } from "../../funcs/signalsListSignalsTransposers.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$signalsListSignalsTransposers: ToolDefinition = { + name: "signals-list-signals-transposers", + description: `List signal transposers + +List all transposers for your organization`, + tool: async (client, ctx) => { + const [result, apiCall] = await signalsListSignalsTransposers( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsListSignalsWebhookTargets.ts b/src/mcp-server/tools/signalsListSignalsWebhookTargets.ts new file mode 100644 index 00000000..da835e60 --- /dev/null +++ b/src/mcp-server/tools/signalsListSignalsWebhookTargets.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListSignalsWebhookTargets } from "../../funcs/signalsListSignalsWebhookTargets.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSignalsWebhookTargetsRequest$inboundSchema, +}; + +export const tool$signalsListSignalsWebhookTargets: ToolDefinition< + typeof args +> = { + name: "signals-list-signals-webhook-targets", + description: `List webhook targets + +List all Signals webhook targets.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsListSignalsWebhookTargets( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsListTeamEscalationPolicies.ts b/src/mcp-server/tools/signalsListTeamEscalationPolicies.ts new file mode 100644 index 00000000..9b659cf5 --- /dev/null +++ b/src/mcp-server/tools/signalsListTeamEscalationPolicies.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListTeamEscalationPolicies } from "../../funcs/signalsListTeamEscalationPolicies.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTeamEscalationPoliciesRequest$inboundSchema, +}; + +export const tool$signalsListTeamEscalationPolicies: ToolDefinition< + typeof args +> = { + name: "signals-list-team-escalation-policies", + description: `List escalation policies for a team + +List all Signals escalation policies for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsListTeamEscalationPolicies( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsListTeamOnCallSchedules.ts b/src/mcp-server/tools/signalsListTeamOnCallSchedules.ts new file mode 100644 index 00000000..98bdd7b1 --- /dev/null +++ b/src/mcp-server/tools/signalsListTeamOnCallSchedules.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListTeamOnCallSchedules } from "../../funcs/signalsListTeamOnCallSchedules.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTeamOnCallSchedulesRequest$inboundSchema, +}; + +export const tool$signalsListTeamOnCallSchedules: ToolDefinition = + { + name: "signals-list-team-on-call-schedules", + description: `List on-call schedules for a team + +List all Signals on-call schedules for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsListTeamOnCallSchedules( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsListTeamSignalRules.ts b/src/mcp-server/tools/signalsListTeamSignalRules.ts new file mode 100644 index 00000000..832f2021 --- /dev/null +++ b/src/mcp-server/tools/signalsListTeamSignalRules.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsListTeamSignalRules } from "../../funcs/signalsListTeamSignalRules.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTeamSignalRulesRequest$inboundSchema, +}; + +export const tool$signalsListTeamSignalRules: ToolDefinition = { + name: "signals-list-team-signal-rules", + description: `List Signals rules + +List all Signals rules for a team.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsListTeamSignalRules( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsUpdateOnCallShift.ts b/src/mcp-server/tools/signalsUpdateOnCallShift.ts new file mode 100644 index 00000000..c7ff78e2 --- /dev/null +++ b/src/mcp-server/tools/signalsUpdateOnCallShift.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsUpdateOnCallShift } from "../../funcs/signalsUpdateOnCallShift.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateOnCallShiftRequest$inboundSchema, +}; + +export const tool$signalsUpdateOnCallShift: ToolDefinition = { + name: "signals-update-on-call-shift", + description: `Update an on-call shift for a team schedule + +Update a Signals on-call shift by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsUpdateOnCallShift( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsUpdateSignalsEmailTarget.ts b/src/mcp-server/tools/signalsUpdateSignalsEmailTarget.ts new file mode 100644 index 00000000..3c836c5c --- /dev/null +++ b/src/mcp-server/tools/signalsUpdateSignalsEmailTarget.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsUpdateSignalsEmailTarget } from "../../funcs/signalsUpdateSignalsEmailTarget.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateSignalsEmailTargetRequest$inboundSchema, +}; + +export const tool$signalsUpdateSignalsEmailTarget: ToolDefinition = + { + name: "signals-update-signals-email-target", + description: `Update an email target + +Update a Signals email target by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsUpdateSignalsEmailTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsUpdateSignalsWebhookTarget.ts b/src/mcp-server/tools/signalsUpdateSignalsWebhookTarget.ts new file mode 100644 index 00000000..5803d78c --- /dev/null +++ b/src/mcp-server/tools/signalsUpdateSignalsWebhookTarget.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsUpdateSignalsWebhookTarget } from "../../funcs/signalsUpdateSignalsWebhookTarget.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateSignalsWebhookTargetRequest$inboundSchema, +}; + +export const tool$signalsUpdateSignalsWebhookTarget: ToolDefinition< + typeof args +> = { + name: "signals-update-signals-webhook-target", + description: `Update a webhook target + +Update a Signals webhook target by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsUpdateSignalsWebhookTarget( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsUpdateTeamEscalationPolicy.ts b/src/mcp-server/tools/signalsUpdateTeamEscalationPolicy.ts new file mode 100644 index 00000000..76b28963 --- /dev/null +++ b/src/mcp-server/tools/signalsUpdateTeamEscalationPolicy.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsUpdateTeamEscalationPolicy } from "../../funcs/signalsUpdateTeamEscalationPolicy.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTeamEscalationPolicyRequest$inboundSchema, +}; + +export const tool$signalsUpdateTeamEscalationPolicy: ToolDefinition< + typeof args +> = { + name: "signals-update-team-escalation-policy", + description: `Update an escalation policy for a team + +Update a Signals escalation policy by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsUpdateTeamEscalationPolicy( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/signalsUpdateTeamOnCallSchedule.ts b/src/mcp-server/tools/signalsUpdateTeamOnCallSchedule.ts new file mode 100644 index 00000000..f1c40041 --- /dev/null +++ b/src/mcp-server/tools/signalsUpdateTeamOnCallSchedule.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsUpdateTeamOnCallSchedule } from "../../funcs/signalsUpdateTeamOnCallSchedule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTeamOnCallScheduleRequest$inboundSchema, +}; + +export const tool$signalsUpdateTeamOnCallSchedule: ToolDefinition = + { + name: "signals-update-team-on-call-schedule", + description: `Update an on-call schedule for a team + +Update a Signals on-call schedule by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsUpdateTeamOnCallSchedule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/signalsUpdateTeamSignalRule.ts b/src/mcp-server/tools/signalsUpdateTeamSignalRule.ts new file mode 100644 index 00000000..e2563b4c --- /dev/null +++ b/src/mcp-server/tools/signalsUpdateTeamSignalRule.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { signalsUpdateTeamSignalRule } from "../../funcs/signalsUpdateTeamSignalRule.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTeamSignalRuleRequest$inboundSchema, +}; + +export const tool$signalsUpdateTeamSignalRule: ToolDefinition = { + name: "signals-update-team-signal-rule", + description: `Update a Signals rule + +Update a Signals rule by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await signalsUpdateTeamSignalRule( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesCreateEmailSubscriber.ts b/src/mcp-server/tools/statusPagesCreateEmailSubscriber.ts new file mode 100644 index 00000000..c8dfbaa6 --- /dev/null +++ b/src/mcp-server/tools/statusPagesCreateEmailSubscriber.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesCreateEmailSubscriber } from "../../funcs/statusPagesCreateEmailSubscriber.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateEmailSubscriberRequest$inboundSchema, +}; + +export const tool$statusPagesCreateEmailSubscriber: ToolDefinition< + typeof args +> = { + name: "status-pages-create-email-subscriber", + description: `Add subscribers to a status page + +Subscribes a comma-separated string of emails to status page updates`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesCreateEmailSubscriber( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesCreateNuncComponentGroup.ts b/src/mcp-server/tools/statusPagesCreateNuncComponentGroup.ts new file mode 100644 index 00000000..64b4ab0d --- /dev/null +++ b/src/mcp-server/tools/statusPagesCreateNuncComponentGroup.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesCreateNuncComponentGroup } from "../../funcs/statusPagesCreateNuncComponentGroup.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateNuncComponentGroupRequest$inboundSchema, +}; + +export const tool$statusPagesCreateNuncComponentGroup: ToolDefinition< + typeof args +> = { + name: "status-pages-create-nunc-component-group", + description: `Create a component group for a status page + +Add a component group to be displayed on a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesCreateNuncComponentGroup( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesCreateNuncConnection.ts b/src/mcp-server/tools/statusPagesCreateNuncConnection.ts new file mode 100644 index 00000000..c24b7624 --- /dev/null +++ b/src/mcp-server/tools/statusPagesCreateNuncConnection.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesCreateNuncConnection } from "../../funcs/statusPagesCreateNuncConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateNuncConnectionRequest$inboundSchema, +}; + +export const tool$statusPagesCreateNuncConnection: ToolDefinition = + { + name: "status-pages-create-nunc-connection", + description: `Create a status page + +Create a new FireHydrant hosted status page for customer facing statuses.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesCreateNuncConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/statusPagesCreateNuncLink.ts b/src/mcp-server/tools/statusPagesCreateNuncLink.ts new file mode 100644 index 00000000..255dcb22 --- /dev/null +++ b/src/mcp-server/tools/statusPagesCreateNuncLink.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesCreateNuncLink } from "../../funcs/statusPagesCreateNuncLink.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateNuncLinkRequest$inboundSchema, +}; + +export const tool$statusPagesCreateNuncLink: ToolDefinition = { + name: "status-pages-create-nunc-link", + description: `Add link to a status page + +Add a link to be displayed on a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesCreateNuncLink( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesCreateNuncSubscription.ts b/src/mcp-server/tools/statusPagesCreateNuncSubscription.ts new file mode 100644 index 00000000..eec59879 --- /dev/null +++ b/src/mcp-server/tools/statusPagesCreateNuncSubscription.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesCreateNuncSubscription } from "../../funcs/statusPagesCreateNuncSubscription.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateNuncSubscription$inboundSchema, +}; + +export const tool$statusPagesCreateNuncSubscription: ToolDefinition< + typeof args +> = { + name: "status-pages-create-nunc-subscription", + description: `Create a status page subscription + +Subscribe to status page updates`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesCreateNuncSubscription( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesDeleteEmailSubscriber.ts b/src/mcp-server/tools/statusPagesDeleteEmailSubscriber.ts new file mode 100644 index 00000000..5d8abe29 --- /dev/null +++ b/src/mcp-server/tools/statusPagesDeleteEmailSubscriber.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesDeleteEmailSubscriber } from "../../funcs/statusPagesDeleteEmailSubscriber.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteEmailSubscriberRequest$inboundSchema, +}; + +export const tool$statusPagesDeleteEmailSubscriber: ToolDefinition< + typeof args +> = { + name: "status-pages-delete-email-subscriber", + description: `Remove subscribers from a status page + +Unsubscribes one or more status page subscribers.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesDeleteEmailSubscriber( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesDeleteIncidentStatusPage.ts b/src/mcp-server/tools/statusPagesDeleteIncidentStatusPage.ts new file mode 100644 index 00000000..f69d04ab --- /dev/null +++ b/src/mcp-server/tools/statusPagesDeleteIncidentStatusPage.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesDeleteIncidentStatusPage } from "../../funcs/statusPagesDeleteIncidentStatusPage.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentStatusPageRequest$inboundSchema, +}; + +export const tool$statusPagesDeleteIncidentStatusPage: ToolDefinition< + typeof args +> = { + name: "status-pages-delete-incident-status-page", + description: `Remove a status page from an incident + +Remove a status page incident attached to an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesDeleteIncidentStatusPage( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesDeleteNuncComponentGroup.ts b/src/mcp-server/tools/statusPagesDeleteNuncComponentGroup.ts new file mode 100644 index 00000000..04a7b263 --- /dev/null +++ b/src/mcp-server/tools/statusPagesDeleteNuncComponentGroup.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesDeleteNuncComponentGroup } from "../../funcs/statusPagesDeleteNuncComponentGroup.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteNuncComponentGroupRequest$inboundSchema, +}; + +export const tool$statusPagesDeleteNuncComponentGroup: ToolDefinition< + typeof args +> = { + name: "status-pages-delete-nunc-component-group", + description: `Delete a status page component group + +Delete a component group displayed on a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesDeleteNuncComponentGroup( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesDeleteNuncConnection.ts b/src/mcp-server/tools/statusPagesDeleteNuncConnection.ts new file mode 100644 index 00000000..288c4a62 --- /dev/null +++ b/src/mcp-server/tools/statusPagesDeleteNuncConnection.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesDeleteNuncConnection } from "../../funcs/statusPagesDeleteNuncConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteNuncConnectionRequest$inboundSchema, +}; + +export const tool$statusPagesDeleteNuncConnection: ToolDefinition = + { + name: "status-pages-delete-nunc-connection", + description: `Delete a status page + +Delete a FireHydrant hosted status page, stopping updates of your incidents to it.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesDeleteNuncConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/statusPagesDeleteNuncImage.ts b/src/mcp-server/tools/statusPagesDeleteNuncImage.ts new file mode 100644 index 00000000..c2dfb1f4 --- /dev/null +++ b/src/mcp-server/tools/statusPagesDeleteNuncImage.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesDeleteNuncImage } from "../../funcs/statusPagesDeleteNuncImage.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteNuncImageRequest$inboundSchema, +}; + +export const tool$statusPagesDeleteNuncImage: ToolDefinition = { + name: "status-pages-delete-nunc-image", + description: `Delete an image from a status page + +Delete an image attached to a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesDeleteNuncImage( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesDeleteNuncLink.ts b/src/mcp-server/tools/statusPagesDeleteNuncLink.ts new file mode 100644 index 00000000..2353e95b --- /dev/null +++ b/src/mcp-server/tools/statusPagesDeleteNuncLink.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesDeleteNuncLink } from "../../funcs/statusPagesDeleteNuncLink.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteNuncLinkRequest$inboundSchema, +}; + +export const tool$statusPagesDeleteNuncLink: ToolDefinition = { + name: "status-pages-delete-nunc-link", + description: `Delete a status page link + +Delete a link displayed on a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesDeleteNuncLink( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesDeleteNuncSubscription.ts b/src/mcp-server/tools/statusPagesDeleteNuncSubscription.ts new file mode 100644 index 00000000..a066e9c9 --- /dev/null +++ b/src/mcp-server/tools/statusPagesDeleteNuncSubscription.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesDeleteNuncSubscription } from "../../funcs/statusPagesDeleteNuncSubscription.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteNuncSubscriptionRequest$inboundSchema, +}; + +export const tool$statusPagesDeleteNuncSubscription: ToolDefinition< + typeof args +> = { + name: "status-pages-delete-nunc-subscription", + description: `Unsubscribe from status page notifications + +Unsubscribe from status page updates`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesDeleteNuncSubscription( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesGetNuncConnection.ts b/src/mcp-server/tools/statusPagesGetNuncConnection.ts new file mode 100644 index 00000000..3444deae --- /dev/null +++ b/src/mcp-server/tools/statusPagesGetNuncConnection.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesGetNuncConnection } from "../../funcs/statusPagesGetNuncConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetNuncConnectionRequest$inboundSchema, +}; + +export const tool$statusPagesGetNuncConnection: ToolDefinition = { + name: "status-pages-get-nunc-connection", + description: `Get a status page + +Retrieve the information displayed as part of your FireHydrant hosted status page.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesGetNuncConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesListEmailSubscribers.ts b/src/mcp-server/tools/statusPagesListEmailSubscribers.ts new file mode 100644 index 00000000..e907d5b0 --- /dev/null +++ b/src/mcp-server/tools/statusPagesListEmailSubscribers.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesListEmailSubscribers } from "../../funcs/statusPagesListEmailSubscribers.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListEmailSubscribersRequest$inboundSchema, +}; + +export const tool$statusPagesListEmailSubscribers: ToolDefinition = + { + name: "status-pages-list-email-subscribers", + description: `List status page subscribers + +Retrieves the list of subscribers for a status page.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesListEmailSubscribers( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/statusPagesListNuncConnections.ts b/src/mcp-server/tools/statusPagesListNuncConnections.ts new file mode 100644 index 00000000..9e812749 --- /dev/null +++ b/src/mcp-server/tools/statusPagesListNuncConnections.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesListNuncConnections } from "../../funcs/statusPagesListNuncConnections.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$statusPagesListNuncConnections: ToolDefinition = { + name: "status-pages-list-nunc-connections", + description: `List status pages + +Lists the information displayed as part of your FireHydrant hosted status pages.`, + tool: async (client, ctx) => { + const [result, apiCall] = await statusPagesListNuncConnections( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesUpdateNuncComponentGroup.ts b/src/mcp-server/tools/statusPagesUpdateNuncComponentGroup.ts new file mode 100644 index 00000000..64a274e5 --- /dev/null +++ b/src/mcp-server/tools/statusPagesUpdateNuncComponentGroup.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesUpdateNuncComponentGroup } from "../../funcs/statusPagesUpdateNuncComponentGroup.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateNuncComponentGroupRequest$inboundSchema, +}; + +export const tool$statusPagesUpdateNuncComponentGroup: ToolDefinition< + typeof args +> = { + name: "status-pages-update-nunc-component-group", + description: `Update a status page component group + +Update a component group to be displayed on a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesUpdateNuncComponentGroup( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesUpdateNuncConnection.ts b/src/mcp-server/tools/statusPagesUpdateNuncConnection.ts new file mode 100644 index 00000000..96ef2ab8 --- /dev/null +++ b/src/mcp-server/tools/statusPagesUpdateNuncConnection.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesUpdateNuncConnection } from "../../funcs/statusPagesUpdateNuncConnection.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateNuncConnectionRequest$inboundSchema, +}; + +export const tool$statusPagesUpdateNuncConnection: ToolDefinition = + { + name: "status-pages-update-nunc-connection", + description: `Update a status page + +Update your company's information and other components in the specified FireHydrant hosted status page.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesUpdateNuncConnection( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/statusPagesUpdateNuncImage.ts b/src/mcp-server/tools/statusPagesUpdateNuncImage.ts new file mode 100644 index 00000000..d8bbe3c9 --- /dev/null +++ b/src/mcp-server/tools/statusPagesUpdateNuncImage.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesUpdateNuncImage } from "../../funcs/statusPagesUpdateNuncImage.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateNuncImageRequest$inboundSchema, +}; + +export const tool$statusPagesUpdateNuncImage: ToolDefinition = { + name: "status-pages-update-nunc-image", + description: `Upload an image for a status page + +Add or replace an image attached to a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesUpdateNuncImage( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/statusPagesUpdateNuncLink.ts b/src/mcp-server/tools/statusPagesUpdateNuncLink.ts new file mode 100644 index 00000000..06fde9fe --- /dev/null +++ b/src/mcp-server/tools/statusPagesUpdateNuncLink.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { statusPagesUpdateNuncLink } from "../../funcs/statusPagesUpdateNuncLink.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateNuncLinkRequest$inboundSchema, +}; + +export const tool$statusPagesUpdateNuncLink: ToolDefinition = { + name: "status-pages-update-nunc-link", + description: `Update a status page link + +Update a link to be displayed on a FireHydrant status page`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await statusPagesUpdateNuncLink( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksConvertIncidentTask.ts b/src/mcp-server/tools/tasksConvertIncidentTask.ts new file mode 100644 index 00000000..1255068f --- /dev/null +++ b/src/mcp-server/tools/tasksConvertIncidentTask.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksConvertIncidentTask } from "../../funcs/tasksConvertIncidentTask.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ConvertIncidentTaskRequest$inboundSchema, +}; + +export const tool$tasksConvertIncidentTask: ToolDefinition = { + name: "tasks-convert-incident-task", + description: `Convert a task to a follow-up + +Convert a task to a follow-up`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksConvertIncidentTask( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksCreateChecklistTemplate.ts b/src/mcp-server/tools/tasksCreateChecklistTemplate.ts new file mode 100644 index 00000000..ea4725c2 --- /dev/null +++ b/src/mcp-server/tools/tasksCreateChecklistTemplate.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksCreateChecklistTemplate } from "../../funcs/tasksCreateChecklistTemplate.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateChecklistTemplate$inboundSchema, +}; + +export const tool$tasksCreateChecklistTemplate: ToolDefinition = { + name: "tasks-create-checklist-template", + description: `Create a checklist template + +Creates a checklist template for the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksCreateChecklistTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksCreateIncidentTask.ts b/src/mcp-server/tools/tasksCreateIncidentTask.ts new file mode 100644 index 00000000..d406fc0d --- /dev/null +++ b/src/mcp-server/tools/tasksCreateIncidentTask.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksCreateIncidentTask } from "../../funcs/tasksCreateIncidentTask.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentTaskRequest$inboundSchema, +}; + +export const tool$tasksCreateIncidentTask: ToolDefinition = { + name: "tasks-create-incident-task", + description: `Create an incident task + +Create a task`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksCreateIncidentTask( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksCreateIncidentTaskList.ts b/src/mcp-server/tools/tasksCreateIncidentTaskList.ts new file mode 100644 index 00000000..7eb0d424 --- /dev/null +++ b/src/mcp-server/tools/tasksCreateIncidentTaskList.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksCreateIncidentTaskList } from "../../funcs/tasksCreateIncidentTaskList.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateIncidentTaskListRequest$inboundSchema, +}; + +export const tool$tasksCreateIncidentTaskList: ToolDefinition = { + name: "tasks-create-incident-task-list", + description: `Add tasks from a task list to an incident + +Add all tasks from list to incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksCreateIncidentTaskList( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksCreateTaskList.ts b/src/mcp-server/tools/tasksCreateTaskList.ts new file mode 100644 index 00000000..3f8723b0 --- /dev/null +++ b/src/mcp-server/tools/tasksCreateTaskList.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksCreateTaskList } from "../../funcs/tasksCreateTaskList.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateTaskList$inboundSchema, +}; + +export const tool$tasksCreateTaskList: ToolDefinition = { + name: "tasks-create-task-list", + description: `Create a task list + +Creates a new task list`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksCreateTaskList( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksDeleteChecklistTemplate.ts b/src/mcp-server/tools/tasksDeleteChecklistTemplate.ts new file mode 100644 index 00000000..2638ac21 --- /dev/null +++ b/src/mcp-server/tools/tasksDeleteChecklistTemplate.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksDeleteChecklistTemplate } from "../../funcs/tasksDeleteChecklistTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteChecklistTemplateRequest$inboundSchema, +}; + +export const tool$tasksDeleteChecklistTemplate: ToolDefinition = { + name: "tasks-delete-checklist-template", + description: `Archive a checklist template + +Archive a checklist template`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksDeleteChecklistTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksDeleteIncidentTask.ts b/src/mcp-server/tools/tasksDeleteIncidentTask.ts new file mode 100644 index 00000000..0c7703bf --- /dev/null +++ b/src/mcp-server/tools/tasksDeleteIncidentTask.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksDeleteIncidentTask } from "../../funcs/tasksDeleteIncidentTask.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteIncidentTaskRequest$inboundSchema, +}; + +export const tool$tasksDeleteIncidentTask: ToolDefinition = { + name: "tasks-delete-incident-task", + description: `Delete an incident task + +Delete a task`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksDeleteIncidentTask( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksDeleteTaskList.ts b/src/mcp-server/tools/tasksDeleteTaskList.ts new file mode 100644 index 00000000..83aa0cf5 --- /dev/null +++ b/src/mcp-server/tools/tasksDeleteTaskList.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksDeleteTaskList } from "../../funcs/tasksDeleteTaskList.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTaskListRequest$inboundSchema, +}; + +export const tool$tasksDeleteTaskList: ToolDefinition = { + name: "tasks-delete-task-list", + description: `Delete a task list + +Delete a task list`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksDeleteTaskList( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksGetChecklistTemplate.ts b/src/mcp-server/tools/tasksGetChecklistTemplate.ts new file mode 100644 index 00000000..ebec809a --- /dev/null +++ b/src/mcp-server/tools/tasksGetChecklistTemplate.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksGetChecklistTemplate } from "../../funcs/tasksGetChecklistTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetChecklistTemplateRequest$inboundSchema, +}; + +export const tool$tasksGetChecklistTemplate: ToolDefinition = { + name: "tasks-get-checklist-template", + description: `Get a checklist template + +Retrieves a single checklist template by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksGetChecklistTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksGetIncidentTask.ts b/src/mcp-server/tools/tasksGetIncidentTask.ts new file mode 100644 index 00000000..8be282b9 --- /dev/null +++ b/src/mcp-server/tools/tasksGetIncidentTask.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksGetIncidentTask } from "../../funcs/tasksGetIncidentTask.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetIncidentTaskRequest$inboundSchema, +}; + +export const tool$tasksGetIncidentTask: ToolDefinition = { + name: "tasks-get-incident-task", + description: `Get an incident task + +Retrieve a single task for an incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksGetIncidentTask( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksGetTaskList.ts b/src/mcp-server/tools/tasksGetTaskList.ts new file mode 100644 index 00000000..87c64130 --- /dev/null +++ b/src/mcp-server/tools/tasksGetTaskList.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksGetTaskList } from "../../funcs/tasksGetTaskList.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTaskListRequest$inboundSchema, +}; + +export const tool$tasksGetTaskList: ToolDefinition = { + name: "tasks-get-task-list", + description: `Get a task list + +Retrieves a single task list by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksGetTaskList( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksListChecklistTemplates.ts b/src/mcp-server/tools/tasksListChecklistTemplates.ts new file mode 100644 index 00000000..eb3f374c --- /dev/null +++ b/src/mcp-server/tools/tasksListChecklistTemplates.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksListChecklistTemplates } from "../../funcs/tasksListChecklistTemplates.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListChecklistTemplatesRequest$inboundSchema, +}; + +export const tool$tasksListChecklistTemplates: ToolDefinition = { + name: "tasks-list-checklist-templates", + description: `List checklist templates + +List all of the checklist templates that have been added to the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksListChecklistTemplates( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksListIncidentTasks.ts b/src/mcp-server/tools/tasksListIncidentTasks.ts new file mode 100644 index 00000000..5ad15ec9 --- /dev/null +++ b/src/mcp-server/tools/tasksListIncidentTasks.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksListIncidentTasks } from "../../funcs/tasksListIncidentTasks.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListIncidentTasksRequest$inboundSchema, +}; + +export const tool$tasksListIncidentTasks: ToolDefinition = { + name: "tasks-list-incident-tasks", + description: `List tasks for an incident + +Retrieve a list of all tasks for a specific incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksListIncidentTasks( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksListTaskLists.ts b/src/mcp-server/tools/tasksListTaskLists.ts new file mode 100644 index 00000000..220472e2 --- /dev/null +++ b/src/mcp-server/tools/tasksListTaskLists.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksListTaskLists } from "../../funcs/tasksListTaskLists.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTaskListsRequest$inboundSchema, +}; + +export const tool$tasksListTaskLists: ToolDefinition = { + name: "tasks-list-task-lists", + description: `List task lists + +Lists all task lists for your organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksListTaskLists( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksUpdateChecklistTemplate.ts b/src/mcp-server/tools/tasksUpdateChecklistTemplate.ts new file mode 100644 index 00000000..d0aa5016 --- /dev/null +++ b/src/mcp-server/tools/tasksUpdateChecklistTemplate.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksUpdateChecklistTemplate } from "../../funcs/tasksUpdateChecklistTemplate.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateChecklistTemplateRequest$inboundSchema, +}; + +export const tool$tasksUpdateChecklistTemplate: ToolDefinition = { + name: "tasks-update-checklist-template", + description: `Update a checklist template + +Update a checklist templates attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksUpdateChecklistTemplate( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksUpdateIncidentTask.ts b/src/mcp-server/tools/tasksUpdateIncidentTask.ts new file mode 100644 index 00000000..60afa4f7 --- /dev/null +++ b/src/mcp-server/tools/tasksUpdateIncidentTask.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksUpdateIncidentTask } from "../../funcs/tasksUpdateIncidentTask.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateIncidentTaskRequest$inboundSchema, +}; + +export const tool$tasksUpdateIncidentTask: ToolDefinition = { + name: "tasks-update-incident-task", + description: `Update an incident task + +Update a task's attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksUpdateIncidentTask( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/tasksUpdateTaskList.ts b/src/mcp-server/tools/tasksUpdateTaskList.ts new file mode 100644 index 00000000..c2a57769 --- /dev/null +++ b/src/mcp-server/tools/tasksUpdateTaskList.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { tasksUpdateTaskList } from "../../funcs/tasksUpdateTaskList.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTaskListRequest$inboundSchema, +}; + +export const tool$tasksUpdateTaskList: ToolDefinition = { + name: "tasks-update-task-list", + description: `Update a task list + +Updates a task list's attributes and task list items`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await tasksUpdateTaskList( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/teamsCreateTeam.ts b/src/mcp-server/tools/teamsCreateTeam.ts new file mode 100644 index 00000000..c15ce66d --- /dev/null +++ b/src/mcp-server/tools/teamsCreateTeam.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { teamsCreateTeam } from "../../funcs/teamsCreateTeam.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateTeam$inboundSchema, +}; + +export const tool$teamsCreateTeam: ToolDefinition = { + name: "teams-create-team", + description: `Create a team + +Create a new team`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await teamsCreateTeam( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/teamsDeleteTeam.ts b/src/mcp-server/tools/teamsDeleteTeam.ts new file mode 100644 index 00000000..65d2c708 --- /dev/null +++ b/src/mcp-server/tools/teamsDeleteTeam.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { teamsDeleteTeam } from "../../funcs/teamsDeleteTeam.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTeamRequest$inboundSchema, +}; + +export const tool$teamsDeleteTeam: ToolDefinition = { + name: "teams-delete-team", + description: `Archive a team + +Archives an team which will hide it from lists and metrics`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await teamsDeleteTeam( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/teamsGetTeam.ts b/src/mcp-server/tools/teamsGetTeam.ts new file mode 100644 index 00000000..6a78b367 --- /dev/null +++ b/src/mcp-server/tools/teamsGetTeam.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { teamsGetTeam } from "../../funcs/teamsGetTeam.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTeamRequest$inboundSchema, +}; + +export const tool$teamsGetTeam: ToolDefinition = { + name: "teams-get-team", + description: `Get a team + +Retrieve a single team from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await teamsGetTeam( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/teamsListSchedules.ts b/src/mcp-server/tools/teamsListSchedules.ts new file mode 100644 index 00000000..69f3fd39 --- /dev/null +++ b/src/mcp-server/tools/teamsListSchedules.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { teamsListSchedules } from "../../funcs/teamsListSchedules.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListSchedulesRequest$inboundSchema, +}; + +export const tool$teamsListSchedules: ToolDefinition = { + name: "teams-list-schedules", + description: `List schedules + +List all known schedules in FireHydrant as pulled from external sources`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await teamsListSchedules( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/teamsListTeams.ts b/src/mcp-server/tools/teamsListTeams.ts new file mode 100644 index 00000000..92f3c9bc --- /dev/null +++ b/src/mcp-server/tools/teamsListTeams.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { teamsListTeams } from "../../funcs/teamsListTeams.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTeamsRequest$inboundSchema, +}; + +export const tool$teamsListTeams: ToolDefinition = { + name: "teams-list-teams", + description: `List teams + +List all of the teams in the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await teamsListTeams( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/teamsUpdateTeam.ts b/src/mcp-server/tools/teamsUpdateTeam.ts new file mode 100644 index 00000000..5a982d3b --- /dev/null +++ b/src/mcp-server/tools/teamsUpdateTeam.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { teamsUpdateTeam } from "../../funcs/teamsUpdateTeam.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTeamRequest$inboundSchema, +}; + +export const tool$teamsUpdateTeam: ToolDefinition = { + name: "teams-update-team", + description: `Update a team + +Update a single team from its ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await teamsUpdateTeam( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingCreateInboundFieldMap.ts b/src/mcp-server/tools/ticketingCreateInboundFieldMap.ts new file mode 100644 index 00000000..fc064853 --- /dev/null +++ b/src/mcp-server/tools/ticketingCreateInboundFieldMap.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingCreateInboundFieldMap } from "../../funcs/ticketingCreateInboundFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateInboundFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingCreateInboundFieldMap: ToolDefinition = + { + name: "ticketing-create-inbound-field-map", + description: `Create inbound field map for a ticketing project + +Creates inbound field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingCreateInboundFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/ticketingCreateTicket.ts b/src/mcp-server/tools/ticketingCreateTicket.ts new file mode 100644 index 00000000..20679d3a --- /dev/null +++ b/src/mcp-server/tools/ticketingCreateTicket.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingCreateTicket } from "../../funcs/ticketingCreateTicket.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateTicket$inboundSchema, +}; + +export const tool$ticketingCreateTicket: ToolDefinition = { + name: "ticketing-create-ticket", + description: `Create a ticket + +Creates a ticket for a project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingCreateTicket( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingCreateTicketingFieldMap.ts b/src/mcp-server/tools/ticketingCreateTicketingFieldMap.ts new file mode 100644 index 00000000..f372e85e --- /dev/null +++ b/src/mcp-server/tools/ticketingCreateTicketingFieldMap.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingCreateTicketingFieldMap } from "../../funcs/ticketingCreateTicketingFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateTicketingFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingCreateTicketingFieldMap: ToolDefinition< + typeof args +> = { + name: "ticketing-create-ticketing-field-map", + description: `Create a field mapping for a ticketing project + +Creates field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingCreateTicketingFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingCreateTicketingPriority.ts b/src/mcp-server/tools/ticketingCreateTicketingPriority.ts new file mode 100644 index 00000000..909b4b2e --- /dev/null +++ b/src/mcp-server/tools/ticketingCreateTicketingPriority.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingCreateTicketingPriority } from "../../funcs/ticketingCreateTicketingPriority.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateTicketingPriority$inboundSchema, +}; + +export const tool$ticketingCreateTicketingPriority: ToolDefinition< + typeof args +> = { + name: "ticketing-create-ticketing-priority", + description: `Create a ticketing priority + +Create a single ticketing priority`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingCreateTicketingPriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingCreateTicketingProjectConfig.ts b/src/mcp-server/tools/ticketingCreateTicketingProjectConfig.ts new file mode 100644 index 00000000..d52cec0f --- /dev/null +++ b/src/mcp-server/tools/ticketingCreateTicketingProjectConfig.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingCreateTicketingProjectConfig } from "../../funcs/ticketingCreateTicketingProjectConfig.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.CreateTicketingProjectConfigRequest$inboundSchema, +}; + +export const tool$ticketingCreateTicketingProjectConfig: ToolDefinition< + typeof args +> = { + name: "ticketing-create-ticketing-project-config", + description: `Create a ticketing project configuration + +Creates configuration for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingCreateTicketingProjectConfig( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingDeleteInboundFieldMap.ts b/src/mcp-server/tools/ticketingDeleteInboundFieldMap.ts new file mode 100644 index 00000000..e0ef041b --- /dev/null +++ b/src/mcp-server/tools/ticketingDeleteInboundFieldMap.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingDeleteInboundFieldMap } from "../../funcs/ticketingDeleteInboundFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteInboundFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingDeleteInboundFieldMap: ToolDefinition = + { + name: "ticketing-delete-inbound-field-map", + description: `Archive inbound field map for a ticketing project + +Archive inbound field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingDeleteInboundFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, + }; diff --git a/src/mcp-server/tools/ticketingDeleteTicket.ts b/src/mcp-server/tools/ticketingDeleteTicket.ts new file mode 100644 index 00000000..fe4a79be --- /dev/null +++ b/src/mcp-server/tools/ticketingDeleteTicket.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingDeleteTicket } from "../../funcs/ticketingDeleteTicket.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTicketRequest$inboundSchema, +}; + +export const tool$ticketingDeleteTicket: ToolDefinition = { + name: "ticketing-delete-ticket", + description: `Archive a ticket + +Archive a ticket`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingDeleteTicket( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingDeleteTicketingFieldMap.ts b/src/mcp-server/tools/ticketingDeleteTicketingFieldMap.ts new file mode 100644 index 00000000..c80af54f --- /dev/null +++ b/src/mcp-server/tools/ticketingDeleteTicketingFieldMap.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingDeleteTicketingFieldMap } from "../../funcs/ticketingDeleteTicketingFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTicketingFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingDeleteTicketingFieldMap: ToolDefinition< + typeof args +> = { + name: "ticketing-delete-ticketing-field-map", + description: `Archive a field map for a ticketing project + +Archive field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingDeleteTicketingFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingDeleteTicketingPriority.ts b/src/mcp-server/tools/ticketingDeleteTicketingPriority.ts new file mode 100644 index 00000000..d6889648 --- /dev/null +++ b/src/mcp-server/tools/ticketingDeleteTicketingPriority.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingDeleteTicketingPriority } from "../../funcs/ticketingDeleteTicketingPriority.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTicketingPriorityRequest$inboundSchema, +}; + +export const tool$ticketingDeleteTicketingPriority: ToolDefinition< + typeof args +> = { + name: "ticketing-delete-ticketing-priority", + description: `Delete a ticketing priority + +Delete a single ticketing priority by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingDeleteTicketingPriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingDeleteTicketingProjectConfig.ts b/src/mcp-server/tools/ticketingDeleteTicketingProjectConfig.ts new file mode 100644 index 00000000..95160773 --- /dev/null +++ b/src/mcp-server/tools/ticketingDeleteTicketingProjectConfig.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingDeleteTicketingProjectConfig } from "../../funcs/ticketingDeleteTicketingProjectConfig.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteTicketingProjectConfigRequest$inboundSchema, +}; + +export const tool$ticketingDeleteTicketingProjectConfig: ToolDefinition< + typeof args +> = { + name: "ticketing-delete-ticketing-project-config", + description: `Archive a ticketing project configuration + +Archive configuration for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingDeleteTicketingProjectConfig( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetConfigurationOptions.ts b/src/mcp-server/tools/ticketingGetConfigurationOptions.ts new file mode 100644 index 00000000..a850114f --- /dev/null +++ b/src/mcp-server/tools/ticketingGetConfigurationOptions.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetConfigurationOptions } from "../../funcs/ticketingGetConfigurationOptions.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetConfigurationOptionsRequest$inboundSchema, +}; + +export const tool$ticketingGetConfigurationOptions: ToolDefinition< + typeof args +> = { + name: "ticketing-get-configuration-options", + description: `List configuration options for a ticketing project + +List all configuration options for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetConfigurationOptions( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetInboundFieldMap.ts b/src/mcp-server/tools/ticketingGetInboundFieldMap.ts new file mode 100644 index 00000000..95b4028e --- /dev/null +++ b/src/mcp-server/tools/ticketingGetInboundFieldMap.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetInboundFieldMap } from "../../funcs/ticketingGetInboundFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetInboundFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingGetInboundFieldMap: ToolDefinition = { + name: "ticketing-get-inbound-field-map", + description: `Get inbound field map for a ticketing project + +Retrieve inbound field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetInboundFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetOptionsForField.ts b/src/mcp-server/tools/ticketingGetOptionsForField.ts new file mode 100644 index 00000000..fc882580 --- /dev/null +++ b/src/mcp-server/tools/ticketingGetOptionsForField.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetOptionsForField } from "../../funcs/ticketingGetOptionsForField.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetOptionsForFieldRequest$inboundSchema, +}; + +export const tool$ticketingGetOptionsForField: ToolDefinition = { + name: "ticketing-get-options-for-field", + description: `List a field's configuration options for a ticketing project + +List a field's configuration options for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetOptionsForField( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetTicket.ts b/src/mcp-server/tools/ticketingGetTicket.ts new file mode 100644 index 00000000..8180537d --- /dev/null +++ b/src/mcp-server/tools/ticketingGetTicket.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetTicket } from "../../funcs/ticketingGetTicket.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTicketRequest$inboundSchema, +}; + +export const tool$ticketingGetTicket: ToolDefinition = { + name: "ticketing-get-ticket", + description: `Get a ticket + +Retrieves a single ticket by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetTicket( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetTicketingFieldMap.ts b/src/mcp-server/tools/ticketingGetTicketingFieldMap.ts new file mode 100644 index 00000000..1f7dde72 --- /dev/null +++ b/src/mcp-server/tools/ticketingGetTicketingFieldMap.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetTicketingFieldMap } from "../../funcs/ticketingGetTicketingFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTicketingFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingGetTicketingFieldMap: ToolDefinition = { + name: "ticketing-get-ticketing-field-map", + description: `Get a field map for a ticketing project + +Retrieve field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetTicketingFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetTicketingPriority.ts b/src/mcp-server/tools/ticketingGetTicketingPriority.ts new file mode 100644 index 00000000..5fe371bc --- /dev/null +++ b/src/mcp-server/tools/ticketingGetTicketingPriority.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetTicketingPriority } from "../../funcs/ticketingGetTicketingPriority.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTicketingPriorityRequest$inboundSchema, +}; + +export const tool$ticketingGetTicketingPriority: ToolDefinition = { + name: "ticketing-get-ticketing-priority", + description: `Get a ticketing priority + +Retrieve a single ticketing priority by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetTicketingPriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetTicketingProject.ts b/src/mcp-server/tools/ticketingGetTicketingProject.ts new file mode 100644 index 00000000..5adeb296 --- /dev/null +++ b/src/mcp-server/tools/ticketingGetTicketingProject.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetTicketingProject } from "../../funcs/ticketingGetTicketingProject.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTicketingProjectRequest$inboundSchema, +}; + +export const tool$ticketingGetTicketingProject: ToolDefinition = { + name: "ticketing-get-ticketing-project", + description: `Get a ticketing project + +Retrieve a single ticketing project by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetTicketingProject( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingGetTicketingProjectConfig.ts b/src/mcp-server/tools/ticketingGetTicketingProjectConfig.ts new file mode 100644 index 00000000..ab6b024a --- /dev/null +++ b/src/mcp-server/tools/ticketingGetTicketingProjectConfig.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingGetTicketingProjectConfig } from "../../funcs/ticketingGetTicketingProjectConfig.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetTicketingProjectConfigRequest$inboundSchema, +}; + +export const tool$ticketingGetTicketingProjectConfig: ToolDefinition< + typeof args +> = { + name: "ticketing-get-ticketing-project-config", + description: `Get configuration for a ticketing project + +Retrieve configuration for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingGetTicketingProjectConfig( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingListAvailableInboundFieldMaps.ts b/src/mcp-server/tools/ticketingListAvailableInboundFieldMaps.ts new file mode 100644 index 00000000..43559a97 --- /dev/null +++ b/src/mcp-server/tools/ticketingListAvailableInboundFieldMaps.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingListAvailableInboundFieldMaps } from "../../funcs/ticketingListAvailableInboundFieldMaps.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAvailableInboundFieldMapsRequest$inboundSchema, +}; + +export const tool$ticketingListAvailableInboundFieldMaps: ToolDefinition< + typeof args +> = { + name: "ticketing-list-available-inbound-field-maps", + description: `List available fields for ticket field mapping + +Returns metadata for the fields that are available for inbound field mapping.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingListAvailableInboundFieldMaps( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingListAvailableTicketingFieldMaps.ts b/src/mcp-server/tools/ticketingListAvailableTicketingFieldMaps.ts new file mode 100644 index 00000000..58c8afc1 --- /dev/null +++ b/src/mcp-server/tools/ticketingListAvailableTicketingFieldMaps.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingListAvailableTicketingFieldMaps } from "../../funcs/ticketingListAvailableTicketingFieldMaps.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListAvailableTicketingFieldMapsRequest$inboundSchema, +}; + +export const tool$ticketingListAvailableTicketingFieldMaps: ToolDefinition< + typeof args +> = { + name: "ticketing-list-available-ticketing-field-maps", + description: `List available fields for ticket field mapping + +Returns metadata for the fields that are available for field mapping.`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingListAvailableTicketingFieldMaps( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingListInboundFieldMaps.ts b/src/mcp-server/tools/ticketingListInboundFieldMaps.ts new file mode 100644 index 00000000..aba5f411 --- /dev/null +++ b/src/mcp-server/tools/ticketingListInboundFieldMaps.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingListInboundFieldMaps } from "../../funcs/ticketingListInboundFieldMaps.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListInboundFieldMapsRequest$inboundSchema, +}; + +export const tool$ticketingListInboundFieldMaps: ToolDefinition = { + name: "ticketing-list-inbound-field-maps", + description: `List inbound field maps for a ticketing project + +List all inbound field maps for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingListInboundFieldMaps( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingListTicketTags.ts b/src/mcp-server/tools/ticketingListTicketTags.ts new file mode 100644 index 00000000..0b40ba95 --- /dev/null +++ b/src/mcp-server/tools/ticketingListTicketTags.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingListTicketTags } from "../../funcs/ticketingListTicketTags.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTicketTagsRequest$inboundSchema, +}; + +export const tool$ticketingListTicketTags: ToolDefinition = { + name: "ticketing-list-ticket-tags", + description: `List ticket tags + +List all of the ticket tags in the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingListTicketTags( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingListTicketingPriorities.ts b/src/mcp-server/tools/ticketingListTicketingPriorities.ts new file mode 100644 index 00000000..e859f03e --- /dev/null +++ b/src/mcp-server/tools/ticketingListTicketingPriorities.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingListTicketingPriorities } from "../../funcs/ticketingListTicketingPriorities.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$ticketingListTicketingPriorities: ToolDefinition = { + name: "ticketing-list-ticketing-priorities", + description: `List ticketing priorities + +List all ticketing priorities available to the organization`, + tool: async (client, ctx) => { + const [result, apiCall] = await ticketingListTicketingPriorities( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingListTicketingProjects.ts b/src/mcp-server/tools/ticketingListTicketingProjects.ts new file mode 100644 index 00000000..0bb06a23 --- /dev/null +++ b/src/mcp-server/tools/ticketingListTicketingProjects.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingListTicketingProjects } from "../../funcs/ticketingListTicketingProjects.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTicketingProjectsRequest$inboundSchema, +}; + +export const tool$ticketingListTicketingProjects: ToolDefinition = + { + name: "ticketing-list-ticketing-projects", + description: `List ticketing projects + +List all ticketing projects available to the organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingListTicketingProjects( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/ticketingListTickets.ts b/src/mcp-server/tools/ticketingListTickets.ts new file mode 100644 index 00000000..b4137eec --- /dev/null +++ b/src/mcp-server/tools/ticketingListTickets.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingListTickets } from "../../funcs/ticketingListTickets.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListTicketsRequest$inboundSchema, +}; + +export const tool$ticketingListTickets: ToolDefinition = { + name: "ticketing-list-tickets", + description: `List tickets + +List all of the tickets that have been added to the organiation`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingListTickets( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingUpdateInboundFieldMap.ts b/src/mcp-server/tools/ticketingUpdateInboundFieldMap.ts new file mode 100644 index 00000000..795b7df6 --- /dev/null +++ b/src/mcp-server/tools/ticketingUpdateInboundFieldMap.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingUpdateInboundFieldMap } from "../../funcs/ticketingUpdateInboundFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateInboundFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingUpdateInboundFieldMap: ToolDefinition = + { + name: "ticketing-update-inbound-field-map", + description: `Update inbound field map for a ticketing project + +Update inbound field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingUpdateInboundFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, + }; diff --git a/src/mcp-server/tools/ticketingUpdateTicket.ts b/src/mcp-server/tools/ticketingUpdateTicket.ts new file mode 100644 index 00000000..2f5263c1 --- /dev/null +++ b/src/mcp-server/tools/ticketingUpdateTicket.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingUpdateTicket } from "../../funcs/ticketingUpdateTicket.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTicketRequest$inboundSchema, +}; + +export const tool$ticketingUpdateTicket: ToolDefinition = { + name: "ticketing-update-ticket", + description: `Update a ticket + +Update a ticket's attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingUpdateTicket( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingUpdateTicketingFieldMap.ts b/src/mcp-server/tools/ticketingUpdateTicketingFieldMap.ts new file mode 100644 index 00000000..f899a114 --- /dev/null +++ b/src/mcp-server/tools/ticketingUpdateTicketingFieldMap.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingUpdateTicketingFieldMap } from "../../funcs/ticketingUpdateTicketingFieldMap.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTicketingFieldMapRequest$inboundSchema, +}; + +export const tool$ticketingUpdateTicketingFieldMap: ToolDefinition< + typeof args +> = { + name: "ticketing-update-ticketing-field-map", + description: `Update a field map for a ticketing project + +Update field map for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingUpdateTicketingFieldMap( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingUpdateTicketingPriority.ts b/src/mcp-server/tools/ticketingUpdateTicketingPriority.ts new file mode 100644 index 00000000..e834dba3 --- /dev/null +++ b/src/mcp-server/tools/ticketingUpdateTicketingPriority.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingUpdateTicketingPriority } from "../../funcs/ticketingUpdateTicketingPriority.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTicketingPriorityRequest$inboundSchema, +}; + +export const tool$ticketingUpdateTicketingPriority: ToolDefinition< + typeof args +> = { + name: "ticketing-update-ticketing-priority", + description: `Update a ticketing priority + +Update a single ticketing priority's attributes`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingUpdateTicketingPriority( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/ticketingUpdateTicketingProjectConfig.ts b/src/mcp-server/tools/ticketingUpdateTicketingProjectConfig.ts new file mode 100644 index 00000000..2e74c1db --- /dev/null +++ b/src/mcp-server/tools/ticketingUpdateTicketingProjectConfig.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ticketingUpdateTicketingProjectConfig } from "../../funcs/ticketingUpdateTicketingProjectConfig.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateTicketingProjectConfigRequest$inboundSchema, +}; + +export const tool$ticketingUpdateTicketingProjectConfig: ToolDefinition< + typeof args +> = { + name: "ticketing-update-ticketing-project-config", + description: `Update configuration for a ticketing project + +Update configuration for a ticketing project`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await ticketingUpdateTicketingProjectConfig( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/usersGetCurrentUser.ts b/src/mcp-server/tools/usersGetCurrentUser.ts new file mode 100644 index 00000000..391cf896 --- /dev/null +++ b/src/mcp-server/tools/usersGetCurrentUser.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { usersGetCurrentUser } from "../../funcs/usersGetCurrentUser.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +export const tool$usersGetCurrentUser: ToolDefinition = { + name: "users-get-current-user", + description: `Get the currently authenticated user + +Retrieve the current user`, + tool: async (client, ctx) => { + const [result, apiCall] = await usersGetCurrentUser( + client, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/usersGetUser.ts b/src/mcp-server/tools/usersGetUser.ts new file mode 100644 index 00000000..bf94e219 --- /dev/null +++ b/src/mcp-server/tools/usersGetUser.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { usersGetUser } from "../../funcs/usersGetUser.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetUserRequest$inboundSchema, +}; + +export const tool$usersGetUser: ToolDefinition = { + name: "users-get-user", + description: `Get a user + +Retrieve a single user by ID`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await usersGetUser( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/usersListUsers.ts b/src/mcp-server/tools/usersListUsers.ts new file mode 100644 index 00000000..dc06d969 --- /dev/null +++ b/src/mcp-server/tools/usersListUsers.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { usersListUsers } from "../../funcs/usersListUsers.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListUsersRequest$inboundSchema, +}; + +export const tool$usersListUsers: ToolDefinition = { + name: "users-list-users", + description: `List users + +Retrieve a list of all users in an organization`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await usersListUsers( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/webhooksCreateWebhook.ts b/src/mcp-server/tools/webhooksCreateWebhook.ts new file mode 100644 index 00000000..b7b0d338 --- /dev/null +++ b/src/mcp-server/tools/webhooksCreateWebhook.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { webhooksCreateWebhook } from "../../funcs/webhooksCreateWebhook.js"; +import * as components from "../../models/components/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: components.CreateWebhook$inboundSchema, +}; + +export const tool$webhooksCreateWebhook: ToolDefinition = { + name: "webhooks-create-webhook", + description: `Create a webhook + +Create a new webhook`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await webhooksCreateWebhook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/webhooksDeleteWebhook.ts b/src/mcp-server/tools/webhooksDeleteWebhook.ts new file mode 100644 index 00000000..043035e3 --- /dev/null +++ b/src/mcp-server/tools/webhooksDeleteWebhook.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { webhooksDeleteWebhook } from "../../funcs/webhooksDeleteWebhook.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.DeleteWebhookRequest$inboundSchema, +}; + +export const tool$webhooksDeleteWebhook: ToolDefinition = { + name: "webhooks-delete-webhook", + description: `Delete a webhook + +Delete a specific webhook`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await webhooksDeleteWebhook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/webhooksGetWebhook.ts b/src/mcp-server/tools/webhooksGetWebhook.ts new file mode 100644 index 00000000..2738fb95 --- /dev/null +++ b/src/mcp-server/tools/webhooksGetWebhook.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { webhooksGetWebhook } from "../../funcs/webhooksGetWebhook.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetWebhookRequest$inboundSchema, +}; + +export const tool$webhooksGetWebhook: ToolDefinition = { + name: "webhooks-get-webhook", + description: `Get a webhook + +Retrieve a specific webhook`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await webhooksGetWebhook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/webhooksListWebhookDeliveries.ts b/src/mcp-server/tools/webhooksListWebhookDeliveries.ts new file mode 100644 index 00000000..a6e54ce3 --- /dev/null +++ b/src/mcp-server/tools/webhooksListWebhookDeliveries.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { webhooksListWebhookDeliveries } from "../../funcs/webhooksListWebhookDeliveries.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListWebhookDeliveriesRequest$inboundSchema, +}; + +export const tool$webhooksListWebhookDeliveries: ToolDefinition = { + name: "webhooks-list-webhook-deliveries", + description: `List webhook deliveries + +Get webhook deliveries`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await webhooksListWebhookDeliveries( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + return formatResult(void 0, apiCall); + }, +}; diff --git a/src/mcp-server/tools/webhooksListWebhooks.ts b/src/mcp-server/tools/webhooksListWebhooks.ts new file mode 100644 index 00000000..943c4e39 --- /dev/null +++ b/src/mcp-server/tools/webhooksListWebhooks.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { webhooksListWebhooks } from "../../funcs/webhooksListWebhooks.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.ListWebhooksRequest$inboundSchema, +}; + +export const tool$webhooksListWebhooks: ToolDefinition = { + name: "webhooks-list-webhooks", + description: `List webhooks + +Lists webhooks`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await webhooksListWebhooks( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/webhooksUpdateWebhook.ts b/src/mcp-server/tools/webhooksUpdateWebhook.ts new file mode 100644 index 00000000..71d1bd3c --- /dev/null +++ b/src/mcp-server/tools/webhooksUpdateWebhook.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { webhooksUpdateWebhook } from "../../funcs/webhooksUpdateWebhook.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.UpdateWebhookRequest$inboundSchema, +}; + +export const tool$webhooksUpdateWebhook: ToolDefinition = { + name: "webhooks-update-webhook", + description: `Update a webhook + +Update a specific webhook`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await webhooksUpdateWebhook( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/models/components/actorentity.ts b/src/models/components/actorentity.ts deleted file mode 100644 index 685129be..00000000 --- a/src/models/components/actorentity.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const ActorEntityType = { - FirehydrantUser: "firehydrant_user", - FirehydrantBot: "firehydrant_bot", - Alertmanager: "alertmanager", - Asana: "asana", - Aws: "aws", - Bugsnag: "bugsnag", - Checkly: "checkly", - CustomAlerts: "custom_alerts", - Datadog: "datadog", - Shortcut: "shortcut", - NewRelic: "new_relic", - Nunc: "nunc", - Github: "github", - Giphy: "giphy", - GoogleMeet: "google_meet", - GoogleCalendar: "google_calendar", - MicrosoftTeams: "microsoft_teams", - MicrosoftTeamsV2: "microsoft_teams_v2", - Webex: "webex", - JiraCloud: "jira_cloud", - JiraOnprem: "jira_onprem", - Opsgenie: "opsgenie", - PagerDuty: "pager_duty", - Honeycomb: "honeycomb", - Patchy: "patchy", - ServiceNow: "service_now", - Signals: "signals", - Slack: "slack", - Statuspage: "statuspage", - Victorops: "victorops", - Zendesk: "zendesk", - Zoom: "zoom", - ConfluenceCloud: "confluence_cloud", - GoogleDocs: "google_docs", - ZoomV2: "zoom_v2", - Linear: "linear", - Cortex: "cortex", -} as const; -export type ActorEntityType = ClosedEnum; - -export type ActorEntity = { - id?: string | undefined; - name?: string | undefined; - email?: string | undefined; - type?: ActorEntityType | undefined; -}; - -/** @internal */ -export const ActorEntityType$inboundSchema: z.ZodNativeEnum< - typeof ActorEntityType -> = z.nativeEnum(ActorEntityType); - -/** @internal */ -export const ActorEntityType$outboundSchema: z.ZodNativeEnum< - typeof ActorEntityType -> = ActorEntityType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ActorEntityType$ { - /** @deprecated use `ActorEntityType$inboundSchema` instead. */ - export const inboundSchema = ActorEntityType$inboundSchema; - /** @deprecated use `ActorEntityType$outboundSchema` instead. */ - export const outboundSchema = ActorEntityType$outboundSchema; -} - -/** @internal */ -export const ActorEntity$inboundSchema: z.ZodType< - ActorEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - email: z.string().optional(), - type: ActorEntityType$inboundSchema.optional(), -}); - -/** @internal */ -export type ActorEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - email?: string | undefined; - type?: string | undefined; -}; - -/** @internal */ -export const ActorEntity$outboundSchema: z.ZodType< - ActorEntity$Outbound, - z.ZodTypeDef, - ActorEntity -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - email: z.string().optional(), - type: ActorEntityType$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ActorEntity$ { - /** @deprecated use `ActorEntity$inboundSchema` instead. */ - export const inboundSchema = ActorEntity$inboundSchema; - /** @deprecated use `ActorEntity$outboundSchema` instead. */ - export const outboundSchema = ActorEntity$outboundSchema; - /** @deprecated use `ActorEntity$Outbound` instead. */ - export type Outbound = ActorEntity$Outbound; -} - -export function actorEntityToJSON(actorEntity: ActorEntity): string { - return JSON.stringify(ActorEntity$outboundSchema.parse(actorEntity)); -} - -export function actorEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ActorEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ActorEntity' from JSON`, - ); -} diff --git a/src/models/components/aientitiesincidentsummaryentity.ts b/src/models/components/aientitiesincidentsummaryentity.ts new file mode 100644 index 00000000..b709f5d5 --- /dev/null +++ b/src/models/components/aientitiesincidentsummaryentity.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * AI_Entities_IncidentSummaryEntity model + */ +export type AIEntitiesIncidentSummaryEntity = { + id?: string | null | undefined; + content?: string | null | undefined; + sourceHash?: string | null | undefined; + type?: string | null | undefined; + createdAt?: string | null | undefined; + incidentUpdatedAt?: Date | null | undefined; +}; + +/** @internal */ +export const AIEntitiesIncidentSummaryEntity$inboundSchema: z.ZodType< + AIEntitiesIncidentSummaryEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + content: z.nullable(z.string()).optional(), + source_hash: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + created_at: z.nullable(z.string()).optional(), + incident_updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "source_hash": "sourceHash", + "created_at": "createdAt", + "incident_updated_at": "incidentUpdatedAt", + }); +}); + +/** @internal */ +export type AIEntitiesIncidentSummaryEntity$Outbound = { + id?: string | null | undefined; + content?: string | null | undefined; + source_hash?: string | null | undefined; + type?: string | null | undefined; + created_at?: string | null | undefined; + incident_updated_at?: string | null | undefined; +}; + +/** @internal */ +export const AIEntitiesIncidentSummaryEntity$outboundSchema: z.ZodType< + AIEntitiesIncidentSummaryEntity$Outbound, + z.ZodTypeDef, + AIEntitiesIncidentSummaryEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + content: z.nullable(z.string()).optional(), + sourceHash: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.string()).optional(), + incidentUpdatedAt: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), +}).transform((v) => { + return remap$(v, { + sourceHash: "source_hash", + createdAt: "created_at", + incidentUpdatedAt: "incident_updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AIEntitiesIncidentSummaryEntity$ { + /** @deprecated use `AIEntitiesIncidentSummaryEntity$inboundSchema` instead. */ + export const inboundSchema = AIEntitiesIncidentSummaryEntity$inboundSchema; + /** @deprecated use `AIEntitiesIncidentSummaryEntity$outboundSchema` instead. */ + export const outboundSchema = AIEntitiesIncidentSummaryEntity$outboundSchema; + /** @deprecated use `AIEntitiesIncidentSummaryEntity$Outbound` instead. */ + export type Outbound = AIEntitiesIncidentSummaryEntity$Outbound; +} + +export function aiEntitiesIncidentSummaryEntityToJSON( + aiEntitiesIncidentSummaryEntity: AIEntitiesIncidentSummaryEntity, +): string { + return JSON.stringify( + AIEntitiesIncidentSummaryEntity$outboundSchema.parse( + aiEntitiesIncidentSummaryEntity, + ), + ); +} + +export function aiEntitiesIncidentSummaryEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AIEntitiesIncidentSummaryEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AIEntitiesIncidentSummaryEntity' from JSON`, + ); +} diff --git a/src/models/components/aientitiespreferencesentity.ts b/src/models/components/aientitiespreferencesentity.ts index 21ad6d54..c9e9958d 100644 --- a/src/models/components/aientitiespreferencesentity.ts +++ b/src/models/components/aientitiespreferencesentity.ts @@ -12,14 +12,14 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * AI_Entities_PreferencesEntity model */ export type AIEntitiesPreferencesEntity = { - ai?: boolean | undefined; - description?: boolean | undefined; - followups?: boolean | undefined; - impact?: boolean | undefined; - retros?: boolean | undefined; - similarIncidents?: boolean | undefined; - summaries?: boolean | undefined; - updates?: boolean | undefined; + ai?: boolean | null | undefined; + description?: boolean | null | undefined; + followups?: boolean | null | undefined; + impact?: boolean | null | undefined; + retros?: boolean | null | undefined; + similarIncidents?: boolean | null | undefined; + summaries?: boolean | null | undefined; + updates?: boolean | null | undefined; }; /** @internal */ @@ -28,14 +28,14 @@ export const AIEntitiesPreferencesEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - ai: z.boolean().optional(), - description: z.boolean().optional(), - followups: z.boolean().optional(), - impact: z.boolean().optional(), - retros: z.boolean().optional(), - similar_incidents: z.boolean().optional(), - summaries: z.boolean().optional(), - updates: z.boolean().optional(), + ai: z.nullable(z.boolean()).optional(), + description: z.nullable(z.boolean()).optional(), + followups: z.nullable(z.boolean()).optional(), + impact: z.nullable(z.boolean()).optional(), + retros: z.nullable(z.boolean()).optional(), + similar_incidents: z.nullable(z.boolean()).optional(), + summaries: z.nullable(z.boolean()).optional(), + updates: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "similar_incidents": "similarIncidents", @@ -44,14 +44,14 @@ export const AIEntitiesPreferencesEntity$inboundSchema: z.ZodType< /** @internal */ export type AIEntitiesPreferencesEntity$Outbound = { - ai?: boolean | undefined; - description?: boolean | undefined; - followups?: boolean | undefined; - impact?: boolean | undefined; - retros?: boolean | undefined; - similar_incidents?: boolean | undefined; - summaries?: boolean | undefined; - updates?: boolean | undefined; + ai?: boolean | null | undefined; + description?: boolean | null | undefined; + followups?: boolean | null | undefined; + impact?: boolean | null | undefined; + retros?: boolean | null | undefined; + similar_incidents?: boolean | null | undefined; + summaries?: boolean | null | undefined; + updates?: boolean | null | undefined; }; /** @internal */ @@ -60,14 +60,14 @@ export const AIEntitiesPreferencesEntity$outboundSchema: z.ZodType< z.ZodTypeDef, AIEntitiesPreferencesEntity > = z.object({ - ai: z.boolean().optional(), - description: z.boolean().optional(), - followups: z.boolean().optional(), - impact: z.boolean().optional(), - retros: z.boolean().optional(), - similarIncidents: z.boolean().optional(), - summaries: z.boolean().optional(), - updates: z.boolean().optional(), + ai: z.nullable(z.boolean()).optional(), + description: z.nullable(z.boolean()).optional(), + followups: z.nullable(z.boolean()).optional(), + impact: z.nullable(z.boolean()).optional(), + retros: z.nullable(z.boolean()).optional(), + similarIncidents: z.nullable(z.boolean()).optional(), + summaries: z.nullable(z.boolean()).optional(), + updates: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { similarIncidents: "similar_incidents", diff --git a/src/models/components/alertsalertentity.ts b/src/models/components/alertsalertentity.ts index ab698147..f35ab22a 100644 --- a/src/models/components/alertsalertentity.ts +++ b/src/models/components/alertsalertentity.ts @@ -7,24 +7,42 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AlertsSirenAlertEntity, + AlertsSirenAlertEntity$inboundSchema, + AlertsSirenAlertEntity$Outbound, + AlertsSirenAlertEntity$outboundSchema, +} from "./alertssirenalertentity.js"; import { AlertsSirenEventEntity, AlertsSirenEventEntity$inboundSchema, AlertsSirenEventEntity$Outbound, AlertsSirenEventEntity$outboundSchema, } from "./alertssirenevententity.js"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$inboundSchema, + ConversationsAPIEntitiesReference$Outbound, + ConversationsAPIEntitiesReference$outboundSchema, +} from "./conversationsapientitiesreference.js"; +import { + NullableSignalsAPIRuleEntity, + NullableSignalsAPIRuleEntity$inboundSchema, + NullableSignalsAPIRuleEntity$Outbound, + NullableSignalsAPIRuleEntity$outboundSchema, +} from "./nullablesignalsapiruleentity.js"; +import { + NullableSignalsAPITargetEntity, + NullableSignalsAPITargetEntity$inboundSchema, + NullableSignalsAPITargetEntity$Outbound, + NullableSignalsAPITargetEntity$outboundSchema, +} from "./nullablesignalsapitargetentity.js"; import { PublicApiv1IncidentsSuccinctEntity, PublicApiv1IncidentsSuccinctEntity$inboundSchema, PublicApiv1IncidentsSuccinctEntity$Outbound, PublicApiv1IncidentsSuccinctEntity$outboundSchema, } from "./publicapiv1incidentssuccinctentity.js"; -import { - SignalsAPIRuleEntity, - SignalsAPIRuleEntity$inboundSchema, - SignalsAPIRuleEntity$Outbound, - SignalsAPIRuleEntity$outboundSchema, -} from "./signalsapiruleentity.js"; import { SuccinctEntity, SuccinctEntity$inboundSchema, @@ -35,80 +53,91 @@ import { /** * Arbitrary key:value pairs of labels. */ -export type Labels = {}; +export type AlertsAlertEntityLabels = {}; /** * Alerts_AlertEntity model */ export type AlertsAlertEntity = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - priority?: string | undefined; - integrationName?: string | undefined; - startsAt?: Date | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + priority?: string | null | undefined; + integrationName?: string | null | undefined; + startsAt?: Date | null | undefined; endsAt?: Date | null | undefined; durationMs?: number | null | undefined; durationIso8601?: string | null | undefined; - status?: string | undefined; - remoteId?: string | undefined; - remoteUrl?: string | undefined; + status?: string | null | undefined; + remoteId?: string | null | undefined; + remoteUrl?: string | null | undefined; /** * Arbitrary key:value pairs of labels. */ - labels?: Labels | undefined; - environments?: Array | undefined; - services?: Array | undefined; - tags?: Array | undefined; - sourceIcon?: string | undefined; - signalId?: string | undefined; - signalRule?: SignalsAPIRuleEntity | undefined; - teamName?: string | undefined; - teamId?: string | undefined; - position?: number | undefined; - incidents?: Array | undefined; - events?: Array | undefined; - isExpired?: boolean | undefined; + labels?: AlertsAlertEntityLabels | null | undefined; + environments?: Array | null | undefined; + services?: Array | null | undefined; + tags?: Array | null | undefined; + sourceIcon?: string | null | undefined; + signalId?: string | null | undefined; + signalRule?: NullableSignalsAPIRuleEntity | null | undefined; + signalTarget?: NullableSignalsAPITargetEntity | null | undefined; + teamName?: string | null | undefined; + teamId?: string | null | undefined; + position?: number | null | undefined; + incidents?: Array | null | undefined; + events?: Array | null | undefined; + isExpired?: boolean | null | undefined; + parentAlerts?: Array | null | undefined; + childAlerts?: Array | null | undefined; + conversations?: Array | null | undefined; }; /** @internal */ -export const Labels$inboundSchema: z.ZodType = z - .object({}); +export const AlertsAlertEntityLabels$inboundSchema: z.ZodType< + AlertsAlertEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ -export type Labels$Outbound = {}; +export type AlertsAlertEntityLabels$Outbound = {}; /** @internal */ -export const Labels$outboundSchema: z.ZodType< - Labels$Outbound, +export const AlertsAlertEntityLabels$outboundSchema: z.ZodType< + AlertsAlertEntityLabels$Outbound, z.ZodTypeDef, - Labels + AlertsAlertEntityLabels > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Labels$ { - /** @deprecated use `Labels$inboundSchema` instead. */ - export const inboundSchema = Labels$inboundSchema; - /** @deprecated use `Labels$outboundSchema` instead. */ - export const outboundSchema = Labels$outboundSchema; - /** @deprecated use `Labels$Outbound` instead. */ - export type Outbound = Labels$Outbound; +export namespace AlertsAlertEntityLabels$ { + /** @deprecated use `AlertsAlertEntityLabels$inboundSchema` instead. */ + export const inboundSchema = AlertsAlertEntityLabels$inboundSchema; + /** @deprecated use `AlertsAlertEntityLabels$outboundSchema` instead. */ + export const outboundSchema = AlertsAlertEntityLabels$outboundSchema; + /** @deprecated use `AlertsAlertEntityLabels$Outbound` instead. */ + export type Outbound = AlertsAlertEntityLabels$Outbound; } -export function labelsToJSON(labels: Labels): string { - return JSON.stringify(Labels$outboundSchema.parse(labels)); +export function alertsAlertEntityLabelsToJSON( + alertsAlertEntityLabels: AlertsAlertEntityLabels, +): string { + return JSON.stringify( + AlertsAlertEntityLabels$outboundSchema.parse(alertsAlertEntityLabels), + ); } -export function labelsFromJSON( +export function alertsAlertEntityLabelsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Labels$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Labels' from JSON`, + (x) => AlertsAlertEntityLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AlertsAlertEntityLabels' from JSON`, ); } @@ -118,35 +147,48 @@ export const AlertsAlertEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - priority: z.string().optional(), - integration_name: z.string().optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + integration_name: z.nullable(z.string()).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), ends_at: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), duration_ms: z.nullable(z.number().int()).optional(), duration_iso8601: z.nullable(z.string()).optional(), - status: z.string().optional(), - remote_id: z.string().optional(), - remote_url: z.string().optional(), - labels: z.lazy(() => Labels$inboundSchema).optional(), - environments: z.array(SuccinctEntity$inboundSchema).optional(), - services: z.array(SuccinctEntity$inboundSchema).optional(), - tags: z.array(z.string()).optional(), - source_icon: z.string().optional(), - signal_id: z.string().optional(), - signal_rule: SignalsAPIRuleEntity$inboundSchema.optional(), - team_name: z.string().optional(), - team_id: z.string().optional(), - position: z.number().int().optional(), - incidents: z.array(PublicApiv1IncidentsSuccinctEntity$inboundSchema) + status: z.nullable(z.string()).optional(), + remote_id: z.nullable(z.string()).optional(), + remote_url: z.nullable(z.string()).optional(), + labels: z.nullable(z.lazy(() => AlertsAlertEntityLabels$inboundSchema)) + .optional(), + environments: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + services: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + tags: z.nullable(z.array(z.string())).optional(), + source_icon: z.nullable(z.string()).optional(), + signal_id: z.nullable(z.string()).optional(), + signal_rule: z.nullable(NullableSignalsAPIRuleEntity$inboundSchema) .optional(), - events: z.array(AlertsSirenEventEntity$inboundSchema).optional(), - is_expired: z.boolean().optional(), + signal_target: z.nullable(NullableSignalsAPITargetEntity$inboundSchema) + .optional(), + team_name: z.nullable(z.string()).optional(), + team_id: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + incidents: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$inboundSchema), + ).optional(), + events: z.nullable(z.array(AlertsSirenEventEntity$inboundSchema)).optional(), + is_expired: z.nullable(z.boolean()).optional(), + parent_alerts: z.nullable(z.array(AlertsSirenAlertEntity$inboundSchema)) + .optional(), + child_alerts: z.nullable(z.array(AlertsSirenAlertEntity$inboundSchema)) + .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "integration_name": "integrationName", @@ -159,39 +201,52 @@ export const AlertsAlertEntity$inboundSchema: z.ZodType< "source_icon": "sourceIcon", "signal_id": "signalId", "signal_rule": "signalRule", + "signal_target": "signalTarget", "team_name": "teamName", "team_id": "teamId", "is_expired": "isExpired", + "parent_alerts": "parentAlerts", + "child_alerts": "childAlerts", }); }); /** @internal */ export type AlertsAlertEntity$Outbound = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - priority?: string | undefined; - integration_name?: string | undefined; - starts_at?: string | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + priority?: string | null | undefined; + integration_name?: string | null | undefined; + starts_at?: string | null | undefined; ends_at?: string | null | undefined; duration_ms?: number | null | undefined; duration_iso8601?: string | null | undefined; - status?: string | undefined; - remote_id?: string | undefined; - remote_url?: string | undefined; - labels?: Labels$Outbound | undefined; - environments?: Array | undefined; - services?: Array | undefined; - tags?: Array | undefined; - source_icon?: string | undefined; - signal_id?: string | undefined; - signal_rule?: SignalsAPIRuleEntity$Outbound | undefined; - team_name?: string | undefined; - team_id?: string | undefined; - position?: number | undefined; - incidents?: Array | undefined; - events?: Array | undefined; - is_expired?: boolean | undefined; + status?: string | null | undefined; + remote_id?: string | null | undefined; + remote_url?: string | null | undefined; + labels?: AlertsAlertEntityLabels$Outbound | null | undefined; + environments?: Array | null | undefined; + services?: Array | null | undefined; + tags?: Array | null | undefined; + source_icon?: string | null | undefined; + signal_id?: string | null | undefined; + signal_rule?: NullableSignalsAPIRuleEntity$Outbound | null | undefined; + signal_target?: NullableSignalsAPITargetEntity$Outbound | null | undefined; + team_name?: string | null | undefined; + team_id?: string | null | undefined; + position?: number | null | undefined; + incidents?: + | Array + | null + | undefined; + events?: Array | null | undefined; + is_expired?: boolean | null | undefined; + parent_alerts?: Array | null | undefined; + child_alerts?: Array | null | undefined; + conversations?: + | Array + | null + | undefined; }; /** @internal */ @@ -200,32 +255,44 @@ export const AlertsAlertEntity$outboundSchema: z.ZodType< z.ZodTypeDef, AlertsAlertEntity > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - priority: z.string().optional(), - integrationName: z.string().optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + integrationName: z.nullable(z.string()).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), durationMs: z.nullable(z.number().int()).optional(), durationIso8601: z.nullable(z.string()).optional(), - status: z.string().optional(), - remoteId: z.string().optional(), - remoteUrl: z.string().optional(), - labels: z.lazy(() => Labels$outboundSchema).optional(), - environments: z.array(SuccinctEntity$outboundSchema).optional(), - services: z.array(SuccinctEntity$outboundSchema).optional(), - tags: z.array(z.string()).optional(), - sourceIcon: z.string().optional(), - signalId: z.string().optional(), - signalRule: SignalsAPIRuleEntity$outboundSchema.optional(), - teamName: z.string().optional(), - teamId: z.string().optional(), - position: z.number().int().optional(), - incidents: z.array(PublicApiv1IncidentsSuccinctEntity$outboundSchema) + status: z.nullable(z.string()).optional(), + remoteId: z.nullable(z.string()).optional(), + remoteUrl: z.nullable(z.string()).optional(), + labels: z.nullable(z.lazy(() => AlertsAlertEntityLabels$outboundSchema)) .optional(), - events: z.array(AlertsSirenEventEntity$outboundSchema).optional(), - isExpired: z.boolean().optional(), + environments: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + services: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + tags: z.nullable(z.array(z.string())).optional(), + sourceIcon: z.nullable(z.string()).optional(), + signalId: z.nullable(z.string()).optional(), + signalRule: z.nullable(NullableSignalsAPIRuleEntity$outboundSchema) + .optional(), + signalTarget: z.nullable(NullableSignalsAPITargetEntity$outboundSchema) + .optional(), + teamName: z.nullable(z.string()).optional(), + teamId: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + incidents: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$outboundSchema), + ).optional(), + events: z.nullable(z.array(AlertsSirenEventEntity$outboundSchema)).optional(), + isExpired: z.nullable(z.boolean()).optional(), + parentAlerts: z.nullable(z.array(AlertsSirenAlertEntity$outboundSchema)) + .optional(), + childAlerts: z.nullable(z.array(AlertsSirenAlertEntity$outboundSchema)) + .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { integrationName: "integration_name", @@ -238,9 +305,12 @@ export const AlertsAlertEntity$outboundSchema: z.ZodType< sourceIcon: "source_icon", signalId: "signal_id", signalRule: "signal_rule", + signalTarget: "signal_target", teamName: "team_name", teamId: "team_id", isExpired: "is_expired", + parentAlerts: "parent_alerts", + childAlerts: "child_alerts", }); }); diff --git a/src/models/components/alertsalertentitypaginated.ts b/src/models/components/alertsalertentitypaginated.ts index 507b361c..a217a66d 100644 --- a/src/models/components/alertsalertentitypaginated.ts +++ b/src/models/components/alertsalertentitypaginated.ts @@ -13,18 +13,18 @@ import { AlertsAlertEntity$outboundSchema, } from "./alertsalertentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Alerts_AlertEntityPaginated model */ export type AlertsAlertEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const AlertsAlertEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(AlertsAlertEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(AlertsAlertEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type AlertsAlertEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const AlertsAlertEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, AlertsAlertEntityPaginated > = z.object({ - data: z.array(AlertsAlertEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(AlertsAlertEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/alertsprocessinglogentryentity.ts b/src/models/components/alertsprocessinglogentryentity.ts index 909a3edb..af030ec7 100644 --- a/src/models/components/alertsprocessinglogentryentity.ts +++ b/src/models/components/alertsprocessinglogentryentity.ts @@ -31,15 +31,15 @@ export const MessageType = { export type MessageType = ClosedEnum; export type AlertsProcessingLogEntryEntity = { - id?: string | undefined; + id?: string | null | undefined; /** * An unstructured representation of this log entry's context. */ - context?: Context | undefined; - createdAt?: Date | undefined; - level?: Level | undefined; - message?: string | undefined; - messageType?: MessageType | undefined; + context?: Context | null | undefined; + createdAt?: Date | null | undefined; + level?: Level | null | undefined; + message?: string | null | undefined; + messageType?: MessageType | null | undefined; }; /** @internal */ @@ -128,13 +128,14 @@ export const AlertsProcessingLogEntryEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - context: z.lazy(() => Context$inboundSchema).optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - level: Level$inboundSchema.optional(), - message: z.string().optional(), - message_type: MessageType$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + context: z.nullable(z.lazy(() => Context$inboundSchema)).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + level: z.nullable(Level$inboundSchema).optional(), + message: z.nullable(z.string()).optional(), + message_type: z.nullable(MessageType$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -144,12 +145,12 @@ export const AlertsProcessingLogEntryEntity$inboundSchema: z.ZodType< /** @internal */ export type AlertsProcessingLogEntryEntity$Outbound = { - id?: string | undefined; - context?: Context$Outbound | undefined; - created_at?: string | undefined; - level?: string | undefined; - message?: string | undefined; - message_type?: string | undefined; + id?: string | null | undefined; + context?: Context$Outbound | null | undefined; + created_at?: string | null | undefined; + level?: string | null | undefined; + message?: string | null | undefined; + message_type?: string | null | undefined; }; /** @internal */ @@ -158,12 +159,12 @@ export const AlertsProcessingLogEntryEntity$outboundSchema: z.ZodType< z.ZodTypeDef, AlertsProcessingLogEntryEntity > = z.object({ - id: z.string().optional(), - context: z.lazy(() => Context$outboundSchema).optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - level: Level$outboundSchema.optional(), - message: z.string().optional(), - messageType: MessageType$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + context: z.nullable(z.lazy(() => Context$outboundSchema)).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + level: z.nullable(Level$outboundSchema).optional(), + message: z.nullable(z.string()).optional(), + messageType: z.nullable(MessageType$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/alertsprocessinglogentryentitypaginated.ts b/src/models/components/alertsprocessinglogentryentitypaginated.ts index 08187a7f..99c24ac2 100644 --- a/src/models/components/alertsprocessinglogentryentitypaginated.ts +++ b/src/models/components/alertsprocessinglogentryentitypaginated.ts @@ -13,18 +13,18 @@ import { AlertsProcessingLogEntryEntity$outboundSchema, } from "./alertsprocessinglogentryentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Alerts_ProcessingLogEntryEntityPaginated model */ export type AlertsProcessingLogEntryEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,15 @@ export const AlertsProcessingLogEntryEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(AlertsProcessingLogEntryEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(AlertsProcessingLogEntryEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type AlertsProcessingLogEntryEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +50,9 @@ export const AlertsProcessingLogEntryEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, AlertsProcessingLogEntryEntityPaginated > = z.object({ - data: z.array(AlertsProcessingLogEntryEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(AlertsProcessingLogEntryEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/alertssirenalertentity.ts b/src/models/components/alertssirenalertentity.ts new file mode 100644 index 00000000..4a530307 --- /dev/null +++ b/src/models/components/alertssirenalertentity.ts @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableSignalsAPIRuleEntity, + NullableSignalsAPIRuleEntity$inboundSchema, + NullableSignalsAPIRuleEntity$Outbound, + NullableSignalsAPIRuleEntity$outboundSchema, +} from "./nullablesignalsapiruleentity.js"; + +/** + * Arbitrary key:value pairs of labels. + */ +export type AlertsSirenAlertEntityLabels = {}; + +export type AlertsSirenAlertEntity = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + startsAt?: Date | null | undefined; + endsAt?: Date | null | undefined; + status?: string | null | undefined; + remoteId?: string | null | undefined; + remoteUrl?: string | null | undefined; + /** + * Arbitrary key:value pairs of labels. + */ + labels?: AlertsSirenAlertEntityLabels | null | undefined; + tags?: Array | null | undefined; + signalId?: string | null | undefined; + signalRule?: NullableSignalsAPIRuleEntity | null | undefined; +}; + +/** @internal */ +export const AlertsSirenAlertEntityLabels$inboundSchema: z.ZodType< + AlertsSirenAlertEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type AlertsSirenAlertEntityLabels$Outbound = {}; + +/** @internal */ +export const AlertsSirenAlertEntityLabels$outboundSchema: z.ZodType< + AlertsSirenAlertEntityLabels$Outbound, + z.ZodTypeDef, + AlertsSirenAlertEntityLabels +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AlertsSirenAlertEntityLabels$ { + /** @deprecated use `AlertsSirenAlertEntityLabels$inboundSchema` instead. */ + export const inboundSchema = AlertsSirenAlertEntityLabels$inboundSchema; + /** @deprecated use `AlertsSirenAlertEntityLabels$outboundSchema` instead. */ + export const outboundSchema = AlertsSirenAlertEntityLabels$outboundSchema; + /** @deprecated use `AlertsSirenAlertEntityLabels$Outbound` instead. */ + export type Outbound = AlertsSirenAlertEntityLabels$Outbound; +} + +export function alertsSirenAlertEntityLabelsToJSON( + alertsSirenAlertEntityLabels: AlertsSirenAlertEntityLabels, +): string { + return JSON.stringify( + AlertsSirenAlertEntityLabels$outboundSchema.parse( + alertsSirenAlertEntityLabels, + ), + ); +} + +export function alertsSirenAlertEntityLabelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AlertsSirenAlertEntityLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AlertsSirenAlertEntityLabels' from JSON`, + ); +} + +/** @internal */ +export const AlertsSirenAlertEntity$inboundSchema: z.ZodType< + AlertsSirenAlertEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + status: z.nullable(z.string()).optional(), + remote_id: z.nullable(z.string()).optional(), + remote_url: z.nullable(z.string()).optional(), + labels: z.nullable(z.lazy(() => AlertsSirenAlertEntityLabels$inboundSchema)) + .optional(), + tags: z.nullable(z.array(z.string())).optional(), + signal_id: z.nullable(z.string()).optional(), + signal_rule: z.nullable(NullableSignalsAPIRuleEntity$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "starts_at": "startsAt", + "ends_at": "endsAt", + "remote_id": "remoteId", + "remote_url": "remoteUrl", + "signal_id": "signalId", + "signal_rule": "signalRule", + }); +}); + +/** @internal */ +export type AlertsSirenAlertEntity$Outbound = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + status?: string | null | undefined; + remote_id?: string | null | undefined; + remote_url?: string | null | undefined; + labels?: AlertsSirenAlertEntityLabels$Outbound | null | undefined; + tags?: Array | null | undefined; + signal_id?: string | null | undefined; + signal_rule?: NullableSignalsAPIRuleEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const AlertsSirenAlertEntity$outboundSchema: z.ZodType< + AlertsSirenAlertEntity$Outbound, + z.ZodTypeDef, + AlertsSirenAlertEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + status: z.nullable(z.string()).optional(), + remoteId: z.nullable(z.string()).optional(), + remoteUrl: z.nullable(z.string()).optional(), + labels: z.nullable(z.lazy(() => AlertsSirenAlertEntityLabels$outboundSchema)) + .optional(), + tags: z.nullable(z.array(z.string())).optional(), + signalId: z.nullable(z.string()).optional(), + signalRule: z.nullable(NullableSignalsAPIRuleEntity$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + startsAt: "starts_at", + endsAt: "ends_at", + remoteId: "remote_id", + remoteUrl: "remote_url", + signalId: "signal_id", + signalRule: "signal_rule", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AlertsSirenAlertEntity$ { + /** @deprecated use `AlertsSirenAlertEntity$inboundSchema` instead. */ + export const inboundSchema = AlertsSirenAlertEntity$inboundSchema; + /** @deprecated use `AlertsSirenAlertEntity$outboundSchema` instead. */ + export const outboundSchema = AlertsSirenAlertEntity$outboundSchema; + /** @deprecated use `AlertsSirenAlertEntity$Outbound` instead. */ + export type Outbound = AlertsSirenAlertEntity$Outbound; +} + +export function alertsSirenAlertEntityToJSON( + alertsSirenAlertEntity: AlertsSirenAlertEntity, +): string { + return JSON.stringify( + AlertsSirenAlertEntity$outboundSchema.parse(alertsSirenAlertEntity), + ); +} + +export function alertsSirenAlertEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AlertsSirenAlertEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AlertsSirenAlertEntity' from JSON`, + ); +} diff --git a/src/models/components/alertssirenevententity.ts b/src/models/components/alertssirenevententity.ts index 1e4c6694..af80b543 100644 --- a/src/models/components/alertssirenevententity.ts +++ b/src/models/components/alertssirenevententity.ts @@ -11,53 +11,63 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The event's payload */ -export type Data = {}; +export type AlertsSirenEventEntityData = {}; export type AlertsSirenEventEntity = { - id?: string | undefined; - type?: string | undefined; + id?: string | null | undefined; + type?: string | null | undefined; /** * The event's payload */ - data?: Data | undefined; - createdAt?: Date | undefined; + data?: AlertsSirenEventEntityData | null | undefined; + createdAt?: Date | null | undefined; }; /** @internal */ -export const Data$inboundSchema: z.ZodType = z - .object({}); +export const AlertsSirenEventEntityData$inboundSchema: z.ZodType< + AlertsSirenEventEntityData, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ -export type Data$Outbound = {}; +export type AlertsSirenEventEntityData$Outbound = {}; /** @internal */ -export const Data$outboundSchema: z.ZodType = - z.object({}); +export const AlertsSirenEventEntityData$outboundSchema: z.ZodType< + AlertsSirenEventEntityData$Outbound, + z.ZodTypeDef, + AlertsSirenEventEntityData +> = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Data$ { - /** @deprecated use `Data$inboundSchema` instead. */ - export const inboundSchema = Data$inboundSchema; - /** @deprecated use `Data$outboundSchema` instead. */ - export const outboundSchema = Data$outboundSchema; - /** @deprecated use `Data$Outbound` instead. */ - export type Outbound = Data$Outbound; +export namespace AlertsSirenEventEntityData$ { + /** @deprecated use `AlertsSirenEventEntityData$inboundSchema` instead. */ + export const inboundSchema = AlertsSirenEventEntityData$inboundSchema; + /** @deprecated use `AlertsSirenEventEntityData$outboundSchema` instead. */ + export const outboundSchema = AlertsSirenEventEntityData$outboundSchema; + /** @deprecated use `AlertsSirenEventEntityData$Outbound` instead. */ + export type Outbound = AlertsSirenEventEntityData$Outbound; } -export function dataToJSON(data: Data): string { - return JSON.stringify(Data$outboundSchema.parse(data)); +export function alertsSirenEventEntityDataToJSON( + alertsSirenEventEntityData: AlertsSirenEventEntityData, +): string { + return JSON.stringify( + AlertsSirenEventEntityData$outboundSchema.parse(alertsSirenEventEntityData), + ); } -export function dataFromJSON( +export function alertsSirenEventEntityDataFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Data$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Data' from JSON`, + (x) => AlertsSirenEventEntityData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AlertsSirenEventEntityData' from JSON`, ); } @@ -67,11 +77,13 @@ export const AlertsSirenEventEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - data: z.lazy(() => Data$inboundSchema).optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + data: z.nullable(z.lazy(() => AlertsSirenEventEntityData$inboundSchema)) .optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -80,10 +92,10 @@ export const AlertsSirenEventEntity$inboundSchema: z.ZodType< /** @internal */ export type AlertsSirenEventEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - data?: Data$Outbound | undefined; - created_at?: string | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + data?: AlertsSirenEventEntityData$Outbound | null | undefined; + created_at?: string | null | undefined; }; /** @internal */ @@ -92,10 +104,11 @@ export const AlertsSirenEventEntity$outboundSchema: z.ZodType< z.ZodTypeDef, AlertsSirenEventEntity > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - data: z.lazy(() => Data$outboundSchema).optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + data: z.nullable(z.lazy(() => AlertsSirenEventEntityData$outboundSchema)) + .optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/attachmentslinkentity.ts b/src/models/components/attachmentslinkentity.ts index a52a0c60..b21ae641 100644 --- a/src/models/components/attachmentslinkentity.ts +++ b/src/models/components/attachmentslinkentity.ts @@ -12,19 +12,19 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Attachments_LinkEntity model */ export type AttachmentsLinkEntity = { - id?: string | undefined; - type?: string | undefined; - displayText?: string | undefined; - hrefUrl?: string | undefined; - iconUrl?: string | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + displayText?: string | null | undefined; + hrefUrl?: string | null | undefined; + iconUrl?: string | null | undefined; /** * Link can be edited */ - editable?: boolean | undefined; + editable?: boolean | null | undefined; /** * Link can be deleted */ - deletable?: boolean | undefined; + deletable?: boolean | null | undefined; }; /** @internal */ @@ -33,13 +33,13 @@ export const AttachmentsLinkEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - display_text: z.string().optional(), - href_url: z.string().optional(), - icon_url: z.string().optional(), - editable: z.boolean().optional(), - deletable: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + display_text: z.nullable(z.string()).optional(), + href_url: z.nullable(z.string()).optional(), + icon_url: z.nullable(z.string()).optional(), + editable: z.nullable(z.boolean()).optional(), + deletable: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "display_text": "displayText", @@ -50,13 +50,13 @@ export const AttachmentsLinkEntity$inboundSchema: z.ZodType< /** @internal */ export type AttachmentsLinkEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - display_text?: string | undefined; - href_url?: string | undefined; - icon_url?: string | undefined; - editable?: boolean | undefined; - deletable?: boolean | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + display_text?: string | null | undefined; + href_url?: string | null | undefined; + icon_url?: string | null | undefined; + editable?: boolean | null | undefined; + deletable?: boolean | null | undefined; }; /** @internal */ @@ -65,13 +65,13 @@ export const AttachmentsLinkEntity$outboundSchema: z.ZodType< z.ZodTypeDef, AttachmentsLinkEntity > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - displayText: z.string().optional(), - hrefUrl: z.string().optional(), - iconUrl: z.string().optional(), - editable: z.boolean().optional(), - deletable: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + displayText: z.nullable(z.string()).optional(), + hrefUrl: z.nullable(z.string()).optional(), + iconUrl: z.nullable(z.string()).optional(), + editable: z.nullable(z.boolean()).optional(), + deletable: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { displayText: "display_text", diff --git a/src/models/components/attachmentslinkentitypaginated.ts b/src/models/components/attachmentslinkentitypaginated.ts index 58ab5394..aa8aac4a 100644 --- a/src/models/components/attachmentslinkentitypaginated.ts +++ b/src/models/components/attachmentslinkentitypaginated.ts @@ -13,18 +13,18 @@ import { AttachmentsLinkEntity$outboundSchema, } from "./attachmentslinkentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Attachments_LinkEntityPaginated model */ export type AttachmentsLinkEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const AttachmentsLinkEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(AttachmentsLinkEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(AttachmentsLinkEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type AttachmentsLinkEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const AttachmentsLinkEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, AttachmentsLinkEntityPaginated > = z.object({ - data: z.array(AttachmentsLinkEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(AttachmentsLinkEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/attachmentstypedattachmententity.ts b/src/models/components/attachmentstypedattachmententity.ts new file mode 100644 index 00000000..effe8397 --- /dev/null +++ b/src/models/components/attachmentstypedattachmententity.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Can be one of: Attachments::LinkEntity, Integrations::CustomerSupportIssueEntity, Attachments::GenericAttachmentEntity + */ +export type Attributes = {}; + +export type AttachmentsTypedAttachmentEntity = { + id?: string | null | undefined; + type?: string | null | undefined; + attachedToId?: string | null | undefined; + attachedToType?: string | null | undefined; + secondaryAttachedToId?: string | null | undefined; + secondaryAttachedToType?: string | null | undefined; + createdAt?: Date | null | undefined; + /** + * Can be one of: Attachments::LinkEntity, Integrations::CustomerSupportIssueEntity, Attachments::GenericAttachmentEntity + */ + attributes?: Attributes | null | undefined; +}; + +/** @internal */ +export const Attributes$inboundSchema: z.ZodType< + Attributes, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type Attributes$Outbound = {}; + +/** @internal */ +export const Attributes$outboundSchema: z.ZodType< + Attributes$Outbound, + z.ZodTypeDef, + Attributes +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Attributes$ { + /** @deprecated use `Attributes$inboundSchema` instead. */ + export const inboundSchema = Attributes$inboundSchema; + /** @deprecated use `Attributes$outboundSchema` instead. */ + export const outboundSchema = Attributes$outboundSchema; + /** @deprecated use `Attributes$Outbound` instead. */ + export type Outbound = Attributes$Outbound; +} + +export function attributesToJSON(attributes: Attributes): string { + return JSON.stringify(Attributes$outboundSchema.parse(attributes)); +} + +export function attributesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Attributes$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Attributes' from JSON`, + ); +} + +/** @internal */ +export const AttachmentsTypedAttachmentEntity$inboundSchema: z.ZodType< + AttachmentsTypedAttachmentEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + attached_to_id: z.nullable(z.string()).optional(), + attached_to_type: z.nullable(z.string()).optional(), + secondary_attached_to_id: z.nullable(z.string()).optional(), + secondary_attached_to_type: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + attributes: z.nullable(z.lazy(() => Attributes$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "attached_to_id": "attachedToId", + "attached_to_type": "attachedToType", + "secondary_attached_to_id": "secondaryAttachedToId", + "secondary_attached_to_type": "secondaryAttachedToType", + "created_at": "createdAt", + }); +}); + +/** @internal */ +export type AttachmentsTypedAttachmentEntity$Outbound = { + id?: string | null | undefined; + type?: string | null | undefined; + attached_to_id?: string | null | undefined; + attached_to_type?: string | null | undefined; + secondary_attached_to_id?: string | null | undefined; + secondary_attached_to_type?: string | null | undefined; + created_at?: string | null | undefined; + attributes?: Attributes$Outbound | null | undefined; +}; + +/** @internal */ +export const AttachmentsTypedAttachmentEntity$outboundSchema: z.ZodType< + AttachmentsTypedAttachmentEntity$Outbound, + z.ZodTypeDef, + AttachmentsTypedAttachmentEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + attachedToId: z.nullable(z.string()).optional(), + attachedToType: z.nullable(z.string()).optional(), + secondaryAttachedToId: z.nullable(z.string()).optional(), + secondaryAttachedToType: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + attributes: z.nullable(z.lazy(() => Attributes$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + attachedToId: "attached_to_id", + attachedToType: "attached_to_type", + secondaryAttachedToId: "secondary_attached_to_id", + secondaryAttachedToType: "secondary_attached_to_type", + createdAt: "created_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AttachmentsTypedAttachmentEntity$ { + /** @deprecated use `AttachmentsTypedAttachmentEntity$inboundSchema` instead. */ + export const inboundSchema = AttachmentsTypedAttachmentEntity$inboundSchema; + /** @deprecated use `AttachmentsTypedAttachmentEntity$outboundSchema` instead. */ + export const outboundSchema = AttachmentsTypedAttachmentEntity$outboundSchema; + /** @deprecated use `AttachmentsTypedAttachmentEntity$Outbound` instead. */ + export type Outbound = AttachmentsTypedAttachmentEntity$Outbound; +} + +export function attachmentsTypedAttachmentEntityToJSON( + attachmentsTypedAttachmentEntity: AttachmentsTypedAttachmentEntity, +): string { + return JSON.stringify( + AttachmentsTypedAttachmentEntity$outboundSchema.parse( + attachmentsTypedAttachmentEntity, + ), + ); +} + +export function attachmentsTypedAttachmentEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AttachmentsTypedAttachmentEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AttachmentsTypedAttachmentEntity' from JSON`, + ); +} diff --git a/src/models/components/attachmentstypedattachmententitypaginated.ts b/src/models/components/attachmentstypedattachmententitypaginated.ts new file mode 100644 index 00000000..a74eabad --- /dev/null +++ b/src/models/components/attachmentstypedattachmententitypaginated.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AttachmentsTypedAttachmentEntity, + AttachmentsTypedAttachmentEntity$inboundSchema, + AttachmentsTypedAttachmentEntity$Outbound, + AttachmentsTypedAttachmentEntity$outboundSchema, +} from "./attachmentstypedattachmententity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; + +/** + * Attachments_TypedAttachmentEntityPaginated model + */ +export type AttachmentsTypedAttachmentEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const AttachmentsTypedAttachmentEntityPaginated$inboundSchema: z.ZodType< + AttachmentsTypedAttachmentEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.array(AttachmentsTypedAttachmentEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), +}); + +/** @internal */ +export type AttachmentsTypedAttachmentEntityPaginated$Outbound = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const AttachmentsTypedAttachmentEntityPaginated$outboundSchema: + z.ZodType< + AttachmentsTypedAttachmentEntityPaginated$Outbound, + z.ZodTypeDef, + AttachmentsTypedAttachmentEntityPaginated + > = z.object({ + data: z.nullable(z.array(AttachmentsTypedAttachmentEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AttachmentsTypedAttachmentEntityPaginated$ { + /** @deprecated use `AttachmentsTypedAttachmentEntityPaginated$inboundSchema` instead. */ + export const inboundSchema = + AttachmentsTypedAttachmentEntityPaginated$inboundSchema; + /** @deprecated use `AttachmentsTypedAttachmentEntityPaginated$outboundSchema` instead. */ + export const outboundSchema = + AttachmentsTypedAttachmentEntityPaginated$outboundSchema; + /** @deprecated use `AttachmentsTypedAttachmentEntityPaginated$Outbound` instead. */ + export type Outbound = AttachmentsTypedAttachmentEntityPaginated$Outbound; +} + +export function attachmentsTypedAttachmentEntityPaginatedToJSON( + attachmentsTypedAttachmentEntityPaginated: + AttachmentsTypedAttachmentEntityPaginated, +): string { + return JSON.stringify( + AttachmentsTypedAttachmentEntityPaginated$outboundSchema.parse( + attachmentsTypedAttachmentEntityPaginated, + ), + ); +} + +export function attachmentsTypedAttachmentEntityPaginatedFromJSON( + jsonString: string, +): SafeParseResult< + AttachmentsTypedAttachmentEntityPaginated, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + AttachmentsTypedAttachmentEntityPaginated$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'AttachmentsTypedAttachmentEntityPaginated' from JSON`, + ); +} diff --git a/src/models/components/audiencesentitiesaudienceentity.ts b/src/models/components/audiencesentitiesaudienceentity.ts new file mode 100644 index 00000000..fda6dfd9 --- /dev/null +++ b/src/models/components/audiencesentitiesaudienceentity.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AudiencesEntitiesDetailEntity, + AudiencesEntitiesDetailEntity$inboundSchema, + AudiencesEntitiesDetailEntity$Outbound, + AudiencesEntitiesDetailEntity$outboundSchema, +} from "./audiencesentitiesdetailentity.js"; + +/** + * Audiences_Entities_AudienceEntity model + */ +export type AudiencesEntitiesAudienceEntity = { + /** + * Unique identifier for the audience + */ + id?: string | null | undefined; + /** + * Name of the audience (maximum 255 characters) + */ + name?: string | null | undefined; + /** + * Slug of the audience, unique and autogenerated + */ + slug?: string | null | undefined; + /** + * Description of the audience and its purpose (maximum 4000 characters) + */ + description?: string | null | undefined; + /** + * Whether this is the organization's default audience + */ + default?: boolean | null | undefined; + /** + * When the audience was created + */ + createdAt?: Date | null | undefined; + /** + * When the audience was last updated + */ + updatedAt?: Date | null | undefined; + /** + * When the audience was discarded (soft deleted) + */ + discardedAt?: Date | null | undefined; + /** + * List of incident details for this audience + */ + details?: Array | null | undefined; +}; + +/** @internal */ +export const AudiencesEntitiesAudienceEntity$inboundSchema: z.ZodType< + AudiencesEntitiesAudienceEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + discarded_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + details: z.nullable(z.array(AudiencesEntitiesDetailEntity$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "updated_at": "updatedAt", + "discarded_at": "discardedAt", + }); +}); + +/** @internal */ +export type AudiencesEntitiesAudienceEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + default?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + discarded_at?: string | null | undefined; + details?: Array | null | undefined; +}; + +/** @internal */ +export const AudiencesEntitiesAudienceEntity$outboundSchema: z.ZodType< + AudiencesEntitiesAudienceEntity$Outbound, + z.ZodTypeDef, + AudiencesEntitiesAudienceEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + discardedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + details: z.nullable(z.array(AudiencesEntitiesDetailEntity$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + updatedAt: "updated_at", + discardedAt: "discarded_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AudiencesEntitiesAudienceEntity$ { + /** @deprecated use `AudiencesEntitiesAudienceEntity$inboundSchema` instead. */ + export const inboundSchema = AudiencesEntitiesAudienceEntity$inboundSchema; + /** @deprecated use `AudiencesEntitiesAudienceEntity$outboundSchema` instead. */ + export const outboundSchema = AudiencesEntitiesAudienceEntity$outboundSchema; + /** @deprecated use `AudiencesEntitiesAudienceEntity$Outbound` instead. */ + export type Outbound = AudiencesEntitiesAudienceEntity$Outbound; +} + +export function audiencesEntitiesAudienceEntityToJSON( + audiencesEntitiesAudienceEntity: AudiencesEntitiesAudienceEntity, +): string { + return JSON.stringify( + AudiencesEntitiesAudienceEntity$outboundSchema.parse( + audiencesEntitiesAudienceEntity, + ), + ); +} + +export function audiencesEntitiesAudienceEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AudiencesEntitiesAudienceEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AudiencesEntitiesAudienceEntity' from JSON`, + ); +} diff --git a/src/models/components/audiencesentitiesaudiencesummariesentity.ts b/src/models/components/audiencesentitiesaudiencesummariesentity.ts new file mode 100644 index 00000000..d1eaa943 --- /dev/null +++ b/src/models/components/audiencesentitiesaudiencesummariesentity.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Audiences_Entities_AudienceSummariesEntity model + */ +export type AudiencesEntitiesAudienceSummariesEntity = { + incidentId?: string | null | undefined; + /** + * JSON-encoded map of audience summaries + */ + audiences?: string | null | undefined; +}; + +/** @internal */ +export const AudiencesEntitiesAudienceSummariesEntity$inboundSchema: z.ZodType< + AudiencesEntitiesAudienceSummariesEntity, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.nullable(z.string()).optional(), + audiences: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type AudiencesEntitiesAudienceSummariesEntity$Outbound = { + incident_id?: string | null | undefined; + audiences?: string | null | undefined; +}; + +/** @internal */ +export const AudiencesEntitiesAudienceSummariesEntity$outboundSchema: z.ZodType< + AudiencesEntitiesAudienceSummariesEntity$Outbound, + z.ZodTypeDef, + AudiencesEntitiesAudienceSummariesEntity +> = z.object({ + incidentId: z.nullable(z.string()).optional(), + audiences: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AudiencesEntitiesAudienceSummariesEntity$ { + /** @deprecated use `AudiencesEntitiesAudienceSummariesEntity$inboundSchema` instead. */ + export const inboundSchema = + AudiencesEntitiesAudienceSummariesEntity$inboundSchema; + /** @deprecated use `AudiencesEntitiesAudienceSummariesEntity$outboundSchema` instead. */ + export const outboundSchema = + AudiencesEntitiesAudienceSummariesEntity$outboundSchema; + /** @deprecated use `AudiencesEntitiesAudienceSummariesEntity$Outbound` instead. */ + export type Outbound = AudiencesEntitiesAudienceSummariesEntity$Outbound; +} + +export function audiencesEntitiesAudienceSummariesEntityToJSON( + audiencesEntitiesAudienceSummariesEntity: + AudiencesEntitiesAudienceSummariesEntity, +): string { + return JSON.stringify( + AudiencesEntitiesAudienceSummariesEntity$outboundSchema.parse( + audiencesEntitiesAudienceSummariesEntity, + ), + ); +} + +export function audiencesEntitiesAudienceSummariesEntityFromJSON( + jsonString: string, +): SafeParseResult< + AudiencesEntitiesAudienceSummariesEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + AudiencesEntitiesAudienceSummariesEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'AudiencesEntitiesAudienceSummariesEntity' from JSON`, + ); +} diff --git a/src/models/components/audiencesentitiesdetailentity.ts b/src/models/components/audiencesentitiesdetailentity.ts new file mode 100644 index 00000000..d1b4f63f --- /dev/null +++ b/src/models/components/audiencesentitiesdetailentity.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type AudiencesEntitiesDetailEntity = { + /** + * Unique identifier for the detail item + */ + id?: string | null | undefined; + /** + * The need-to-know question (maximum 255 characters) + */ + question?: string | null | undefined; + /** + * AI prompt used to gather this information + */ + prompt?: string | null | undefined; + /** + * Order position of this item in the list + */ + position?: number | null | undefined; + /** + * Slug of the detail, unique and autogenerated + */ + slug?: string | null | undefined; +}; + +/** @internal */ +export const AudiencesEntitiesDetailEntity$inboundSchema: z.ZodType< + AudiencesEntitiesDetailEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + question: z.nullable(z.string()).optional(), + prompt: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + slug: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type AudiencesEntitiesDetailEntity$Outbound = { + id?: string | null | undefined; + question?: string | null | undefined; + prompt?: string | null | undefined; + position?: number | null | undefined; + slug?: string | null | undefined; +}; + +/** @internal */ +export const AudiencesEntitiesDetailEntity$outboundSchema: z.ZodType< + AudiencesEntitiesDetailEntity$Outbound, + z.ZodTypeDef, + AudiencesEntitiesDetailEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + question: z.nullable(z.string()).optional(), + prompt: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + slug: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AudiencesEntitiesDetailEntity$ { + /** @deprecated use `AudiencesEntitiesDetailEntity$inboundSchema` instead. */ + export const inboundSchema = AudiencesEntitiesDetailEntity$inboundSchema; + /** @deprecated use `AudiencesEntitiesDetailEntity$outboundSchema` instead. */ + export const outboundSchema = AudiencesEntitiesDetailEntity$outboundSchema; + /** @deprecated use `AudiencesEntitiesDetailEntity$Outbound` instead. */ + export type Outbound = AudiencesEntitiesDetailEntity$Outbound; +} + +export function audiencesEntitiesDetailEntityToJSON( + audiencesEntitiesDetailEntity: AudiencesEntitiesDetailEntity, +): string { + return JSON.stringify( + AudiencesEntitiesDetailEntity$outboundSchema.parse( + audiencesEntitiesDetailEntity, + ), + ); +} + +export function audiencesEntitiesDetailEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => AudiencesEntitiesDetailEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'AudiencesEntitiesDetailEntity' from JSON`, + ); +} diff --git a/src/models/components/authorentity.ts b/src/models/components/authorentity.ts index 5583ae10..84f12cb0 100644 --- a/src/models/components/authorentity.ts +++ b/src/models/components/authorentity.ts @@ -8,10 +8,10 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AuthorEntity = { - id?: string | undefined; - name?: string | undefined; - source?: string | undefined; - email?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; }; /** @internal */ @@ -20,18 +20,18 @@ export const AuthorEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - source: z.string().optional(), - email: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), }); /** @internal */ export type AuthorEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - source?: string | undefined; - email?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; }; /** @internal */ @@ -40,10 +40,10 @@ export const AuthorEntity$outboundSchema: z.ZodType< z.ZodTypeDef, AuthorEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - source: z.string().optional(), - email: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/bulkupdateincidentmilestones.ts b/src/models/components/bulkupdateincidentmilestones.ts new file mode 100644 index 00000000..1e6168fd --- /dev/null +++ b/src/models/components/bulkupdateincidentmilestones.ts @@ -0,0 +1,203 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const Bulk = { + True: "true", +} as const; +export type Bulk = ClosedEnum; + +export type BulkUpdateIncidentMilestonesMilestone = { + /** + * The type/slug of the milestone. Must be one of the currently configured milestones for the given incident. + */ + type: string; + /** + * An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value + */ + occurredAt: Date; + /** + * If set to true, the milestone will be removed from the incident + */ + remove?: boolean | null | undefined; +}; + +/** + * Update milestone times in bulk for a given incident. All milestone + * + * @remarks + * times for an incident must occur in chronological order + * corresponding to the configured order of milestones. If the result + * of this request would cause any milestone(s) to appear out of place, + * a 422 response will instead be returned. This includes milestones + * not explicitly submitted or updated in this request. + */ +export type BulkUpdateIncidentMilestones = { + bulk?: Bulk | null | undefined; + milestones: Array; +}; + +/** @internal */ +export const Bulk$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Bulk, +); + +/** @internal */ +export const Bulk$outboundSchema: z.ZodNativeEnum = + Bulk$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Bulk$ { + /** @deprecated use `Bulk$inboundSchema` instead. */ + export const inboundSchema = Bulk$inboundSchema; + /** @deprecated use `Bulk$outboundSchema` instead. */ + export const outboundSchema = Bulk$outboundSchema; +} + +/** @internal */ +export const BulkUpdateIncidentMilestonesMilestone$inboundSchema: z.ZodType< + BulkUpdateIncidentMilestonesMilestone, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + occurred_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + remove: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "occurred_at": "occurredAt", + }); +}); + +/** @internal */ +export type BulkUpdateIncidentMilestonesMilestone$Outbound = { + type: string; + occurred_at: string; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const BulkUpdateIncidentMilestonesMilestone$outboundSchema: z.ZodType< + BulkUpdateIncidentMilestonesMilestone$Outbound, + z.ZodTypeDef, + BulkUpdateIncidentMilestonesMilestone +> = z.object({ + type: z.string(), + occurredAt: z.date().transform(v => v.toISOString()), + remove: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + occurredAt: "occurred_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BulkUpdateIncidentMilestonesMilestone$ { + /** @deprecated use `BulkUpdateIncidentMilestonesMilestone$inboundSchema` instead. */ + export const inboundSchema = + BulkUpdateIncidentMilestonesMilestone$inboundSchema; + /** @deprecated use `BulkUpdateIncidentMilestonesMilestone$outboundSchema` instead. */ + export const outboundSchema = + BulkUpdateIncidentMilestonesMilestone$outboundSchema; + /** @deprecated use `BulkUpdateIncidentMilestonesMilestone$Outbound` instead. */ + export type Outbound = BulkUpdateIncidentMilestonesMilestone$Outbound; +} + +export function bulkUpdateIncidentMilestonesMilestoneToJSON( + bulkUpdateIncidentMilestonesMilestone: BulkUpdateIncidentMilestonesMilestone, +): string { + return JSON.stringify( + BulkUpdateIncidentMilestonesMilestone$outboundSchema.parse( + bulkUpdateIncidentMilestonesMilestone, + ), + ); +} + +export function bulkUpdateIncidentMilestonesMilestoneFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + BulkUpdateIncidentMilestonesMilestone$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkUpdateIncidentMilestonesMilestone' from JSON`, + ); +} + +/** @internal */ +export const BulkUpdateIncidentMilestones$inboundSchema: z.ZodType< + BulkUpdateIncidentMilestones, + z.ZodTypeDef, + unknown +> = z.object({ + bulk: z.nullable(Bulk$inboundSchema).optional(), + milestones: z.array( + z.lazy(() => BulkUpdateIncidentMilestonesMilestone$inboundSchema), + ), +}); + +/** @internal */ +export type BulkUpdateIncidentMilestones$Outbound = { + bulk?: string | null | undefined; + milestones: Array; +}; + +/** @internal */ +export const BulkUpdateIncidentMilestones$outboundSchema: z.ZodType< + BulkUpdateIncidentMilestones$Outbound, + z.ZodTypeDef, + BulkUpdateIncidentMilestones +> = z.object({ + bulk: z.nullable(Bulk$outboundSchema).optional(), + milestones: z.array( + z.lazy(() => BulkUpdateIncidentMilestonesMilestone$outboundSchema), + ), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BulkUpdateIncidentMilestones$ { + /** @deprecated use `BulkUpdateIncidentMilestones$inboundSchema` instead. */ + export const inboundSchema = BulkUpdateIncidentMilestones$inboundSchema; + /** @deprecated use `BulkUpdateIncidentMilestones$outboundSchema` instead. */ + export const outboundSchema = BulkUpdateIncidentMilestones$outboundSchema; + /** @deprecated use `BulkUpdateIncidentMilestones$Outbound` instead. */ + export type Outbound = BulkUpdateIncidentMilestones$Outbound; +} + +export function bulkUpdateIncidentMilestonesToJSON( + bulkUpdateIncidentMilestones: BulkUpdateIncidentMilestones, +): string { + return JSON.stringify( + BulkUpdateIncidentMilestones$outboundSchema.parse( + bulkUpdateIncidentMilestones, + ), + ); +} + +export function bulkUpdateIncidentMilestonesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => BulkUpdateIncidentMilestones$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkUpdateIncidentMilestones' from JSON`, + ); +} diff --git a/src/models/components/calendarsevententity.ts b/src/models/components/calendarsevententity.ts deleted file mode 100644 index efe80600..00000000 --- a/src/models/components/calendarsevententity.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CalendarsEventEntity = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - startsAt?: string | undefined; - endsAt?: string | undefined; - createdAt?: string | undefined; - updatedAt?: string | undefined; - providerUrl?: string | undefined; - providerIconUrl?: string | undefined; -}; - -/** @internal */ -export const CalendarsEventEntity$inboundSchema: z.ZodType< - CalendarsEventEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - starts_at: z.string().optional(), - ends_at: z.string().optional(), - created_at: z.string().optional(), - updated_at: z.string().optional(), - provider_url: z.string().optional(), - provider_icon_url: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "starts_at": "startsAt", - "ends_at": "endsAt", - "created_at": "createdAt", - "updated_at": "updatedAt", - "provider_url": "providerUrl", - "provider_icon_url": "providerIconUrl", - }); -}); - -/** @internal */ -export type CalendarsEventEntity$Outbound = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - starts_at?: string | undefined; - ends_at?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - provider_url?: string | undefined; - provider_icon_url?: string | undefined; -}; - -/** @internal */ -export const CalendarsEventEntity$outboundSchema: z.ZodType< - CalendarsEventEntity$Outbound, - z.ZodTypeDef, - CalendarsEventEntity -> = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - startsAt: z.string().optional(), - endsAt: z.string().optional(), - createdAt: z.string().optional(), - updatedAt: z.string().optional(), - providerUrl: z.string().optional(), - providerIconUrl: z.string().optional(), -}).transform((v) => { - return remap$(v, { - startsAt: "starts_at", - endsAt: "ends_at", - createdAt: "created_at", - updatedAt: "updated_at", - providerUrl: "provider_url", - providerIconUrl: "provider_icon_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CalendarsEventEntity$ { - /** @deprecated use `CalendarsEventEntity$inboundSchema` instead. */ - export const inboundSchema = CalendarsEventEntity$inboundSchema; - /** @deprecated use `CalendarsEventEntity$outboundSchema` instead. */ - export const outboundSchema = CalendarsEventEntity$outboundSchema; - /** @deprecated use `CalendarsEventEntity$Outbound` instead. */ - export type Outbound = CalendarsEventEntity$Outbound; -} - -export function calendarsEventEntityToJSON( - calendarsEventEntity: CalendarsEventEntity, -): string { - return JSON.stringify( - CalendarsEventEntity$outboundSchema.parse(calendarsEventEntity), - ); -} - -export function calendarsEventEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CalendarsEventEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CalendarsEventEntity' from JSON`, - ); -} diff --git a/src/models/components/changeentity.ts b/src/models/components/changeentity.ts index f76591a2..81e6ad26 100644 --- a/src/models/components/changeentity.ts +++ b/src/models/components/changeentity.ts @@ -20,24 +20,24 @@ export type ChangeEntity = { /** * UUID of the Change */ - id?: string | undefined; + id?: string | null | undefined; /** * Description of the Change */ - summary?: string | undefined; + summary?: string | null | undefined; /** * The time the change entry was created */ - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; /** * Arbitrary key/value pairs of labels. */ - labels?: ChangeEntityLabels | undefined; + labels?: ChangeEntityLabels | null | undefined; /** * Description of the Change */ - description?: string | undefined; + description?: string | null | undefined; }; /** @internal */ @@ -94,14 +94,16 @@ export const ChangeEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - labels: z.lazy(() => ChangeEntityLabels$inboundSchema).optional(), - description: z.string().optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + labels: z.nullable(z.lazy(() => ChangeEntityLabels$inboundSchema)).optional(), + description: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -111,12 +113,12 @@ export const ChangeEntity$inboundSchema: z.ZodType< /** @internal */ export type ChangeEntity$Outbound = { - id?: string | undefined; - summary?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - labels?: ChangeEntityLabels$Outbound | undefined; - description?: string | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + labels?: ChangeEntityLabels$Outbound | null | undefined; + description?: string | null | undefined; }; /** @internal */ @@ -125,12 +127,13 @@ export const ChangeEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeEntity > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - labels: z.lazy(() => ChangeEntityLabels$outboundSchema).optional(), - description: z.string().optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + labels: z.nullable(z.lazy(() => ChangeEntityLabels$outboundSchema)) + .optional(), + description: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/changeevententity.ts b/src/models/components/changeevententity.ts index 2b987a39..dd1ab336 100644 --- a/src/models/components/changeevententity.ts +++ b/src/models/components/changeevententity.ts @@ -38,7 +38,7 @@ import { ServiceEntityLite$outboundSchema, } from "./serviceentitylite.js"; -export type ChangeEventEntityAttachments = {}; +export type ChangeEventEntityAttachment = {}; /** * An object of label key and values @@ -49,78 +49,78 @@ export type ChangeEventEntityLabels = {}; * ChangeEventEntity model */ export type ChangeEventEntity = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - externalId?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - startsAt?: Date | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + externalId?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + startsAt?: Date | null | undefined; endsAt?: Date | null | undefined; durationMs?: number | null | undefined; durationIso8601?: string | null | undefined; - environments?: Array | undefined; - relatedChanges?: Array | undefined; - identities?: Array | undefined; - authors?: Array | undefined; + environments?: Array | null | undefined; + relatedChanges?: Array | null | undefined; + identities?: Array | null | undefined; + authors?: Array | null | undefined; /** * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity */ - attachments?: Array | undefined; + attachments?: Array | null | undefined; /** * An object of label key and values */ - labels?: ChangeEventEntityLabels | undefined; - services?: Array | undefined; + labels?: ChangeEventEntityLabels | null | undefined; + services?: Array | null | undefined; }; /** @internal */ -export const ChangeEventEntityAttachments$inboundSchema: z.ZodType< - ChangeEventEntityAttachments, +export const ChangeEventEntityAttachment$inboundSchema: z.ZodType< + ChangeEventEntityAttachment, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type ChangeEventEntityAttachments$Outbound = {}; +export type ChangeEventEntityAttachment$Outbound = {}; /** @internal */ -export const ChangeEventEntityAttachments$outboundSchema: z.ZodType< - ChangeEventEntityAttachments$Outbound, +export const ChangeEventEntityAttachment$outboundSchema: z.ZodType< + ChangeEventEntityAttachment$Outbound, z.ZodTypeDef, - ChangeEventEntityAttachments + ChangeEventEntityAttachment > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ChangeEventEntityAttachments$ { - /** @deprecated use `ChangeEventEntityAttachments$inboundSchema` instead. */ - export const inboundSchema = ChangeEventEntityAttachments$inboundSchema; - /** @deprecated use `ChangeEventEntityAttachments$outboundSchema` instead. */ - export const outboundSchema = ChangeEventEntityAttachments$outboundSchema; - /** @deprecated use `ChangeEventEntityAttachments$Outbound` instead. */ - export type Outbound = ChangeEventEntityAttachments$Outbound; +export namespace ChangeEventEntityAttachment$ { + /** @deprecated use `ChangeEventEntityAttachment$inboundSchema` instead. */ + export const inboundSchema = ChangeEventEntityAttachment$inboundSchema; + /** @deprecated use `ChangeEventEntityAttachment$outboundSchema` instead. */ + export const outboundSchema = ChangeEventEntityAttachment$outboundSchema; + /** @deprecated use `ChangeEventEntityAttachment$Outbound` instead. */ + export type Outbound = ChangeEventEntityAttachment$Outbound; } -export function changeEventEntityAttachmentsToJSON( - changeEventEntityAttachments: ChangeEventEntityAttachments, +export function changeEventEntityAttachmentToJSON( + changeEventEntityAttachment: ChangeEventEntityAttachment, ): string { return JSON.stringify( - ChangeEventEntityAttachments$outboundSchema.parse( - changeEventEntityAttachments, + ChangeEventEntityAttachment$outboundSchema.parse( + changeEventEntityAttachment, ), ); } -export function changeEventEntityAttachmentsFromJSON( +export function changeEventEntityAttachmentFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ChangeEventEntityAttachments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChangeEventEntityAttachments' from JSON`, + (x) => ChangeEventEntityAttachment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChangeEventEntityAttachment' from JSON`, ); } @@ -178,29 +178,36 @@ export const ChangeEventEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - external_id: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), ends_at: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), duration_ms: z.nullable(z.number().int()).optional(), duration_iso8601: z.nullable(z.string()).optional(), - environments: z.array(EnvironmentEntryEntity$inboundSchema).optional(), - related_changes: z.array(ChangeEntity$inboundSchema).optional(), - identities: z.array(ChangeIdentityEntity$inboundSchema).optional(), - authors: z.array(AuthorEntity$inboundSchema).optional(), - attachments: z.array(z.lazy(() => ChangeEventEntityAttachments$inboundSchema)) + environments: z.nullable(z.array(EnvironmentEntryEntity$inboundSchema)) + .optional(), + related_changes: z.nullable(z.array(ChangeEntity$inboundSchema)).optional(), + identities: z.nullable(z.array(ChangeIdentityEntity$inboundSchema)) + .optional(), + authors: z.nullable(z.array(AuthorEntity$inboundSchema)).optional(), + attachments: z.nullable( + z.array(z.lazy(() => ChangeEventEntityAttachment$inboundSchema)), + ).optional(), + labels: z.nullable(z.lazy(() => ChangeEventEntityLabels$inboundSchema)) .optional(), - labels: z.lazy(() => ChangeEventEntityLabels$inboundSchema).optional(), - services: z.array(ServiceEntityLite$inboundSchema).optional(), + services: z.nullable(z.array(ServiceEntityLite$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "external_id": "externalId", @@ -216,23 +223,23 @@ export const ChangeEventEntity$inboundSchema: z.ZodType< /** @internal */ export type ChangeEventEntity$Outbound = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - external_id?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - starts_at?: string | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + external_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + starts_at?: string | null | undefined; ends_at?: string | null | undefined; duration_ms?: number | null | undefined; duration_iso8601?: string | null | undefined; - environments?: Array | undefined; - related_changes?: Array | undefined; - identities?: Array | undefined; - authors?: Array | undefined; - attachments?: Array | undefined; - labels?: ChangeEventEntityLabels$Outbound | undefined; - services?: Array | undefined; + environments?: Array | null | undefined; + related_changes?: Array | null | undefined; + identities?: Array | null | undefined; + authors?: Array | null | undefined; + attachments?: Array | null | undefined; + labels?: ChangeEventEntityLabels$Outbound | null | undefined; + services?: Array | null | undefined; }; /** @internal */ @@ -241,25 +248,28 @@ export const ChangeEventEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeEventEntity > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - externalId: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), durationMs: z.nullable(z.number().int()).optional(), durationIso8601: z.nullable(z.string()).optional(), - environments: z.array(EnvironmentEntryEntity$outboundSchema).optional(), - relatedChanges: z.array(ChangeEntity$outboundSchema).optional(), - identities: z.array(ChangeIdentityEntity$outboundSchema).optional(), - authors: z.array(AuthorEntity$outboundSchema).optional(), - attachments: z.array( - z.lazy(() => ChangeEventEntityAttachments$outboundSchema), + environments: z.nullable(z.array(EnvironmentEntryEntity$outboundSchema)) + .optional(), + relatedChanges: z.nullable(z.array(ChangeEntity$outboundSchema)).optional(), + identities: z.nullable(z.array(ChangeIdentityEntity$outboundSchema)) + .optional(), + authors: z.nullable(z.array(AuthorEntity$outboundSchema)).optional(), + attachments: z.nullable( + z.array(z.lazy(() => ChangeEventEntityAttachment$outboundSchema)), ).optional(), - labels: z.lazy(() => ChangeEventEntityLabels$outboundSchema).optional(), - services: z.array(ServiceEntityLite$outboundSchema).optional(), + labels: z.nullable(z.lazy(() => ChangeEventEntityLabels$outboundSchema)) + .optional(), + services: z.nullable(z.array(ServiceEntityLite$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { externalId: "external_id", diff --git a/src/models/components/changeeventslimentity.ts b/src/models/components/changeeventslimentity.ts index 076aec5f..6e55eeb4 100644 --- a/src/models/components/changeeventslimentity.ts +++ b/src/models/components/changeeventslimentity.ts @@ -32,23 +32,23 @@ import { export type ChangeEventSlimEntityLabels = {}; export type ChangeEventSlimEntity = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - externalId?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - startsAt?: Date | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + externalId?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + startsAt?: Date | null | undefined; endsAt?: Date | null | undefined; durationMs?: number | null | undefined; durationIso8601?: string | null | undefined; - environments?: Array | undefined; - authors?: Array | undefined; + environments?: Array | null | undefined; + authors?: Array | null | undefined; /** * An object of label key and values */ - labels?: ChangeEventSlimEntityLabels | undefined; - services?: Array | undefined; + labels?: ChangeEventSlimEntityLabels | null | undefined; + services?: Array | null | undefined; }; /** @internal */ @@ -107,25 +107,30 @@ export const ChangeEventSlimEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - external_id: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), ends_at: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), duration_ms: z.nullable(z.number().int()).optional(), duration_iso8601: z.nullable(z.string()).optional(), - environments: z.array(EnvironmentEntryEntity$inboundSchema).optional(), - authors: z.array(AuthorEntity$inboundSchema).optional(), - labels: z.lazy(() => ChangeEventSlimEntityLabels$inboundSchema).optional(), - services: z.array(ServiceEntityLite$inboundSchema).optional(), + environments: z.nullable(z.array(EnvironmentEntryEntity$inboundSchema)) + .optional(), + authors: z.nullable(z.array(AuthorEntity$inboundSchema)).optional(), + labels: z.nullable(z.lazy(() => ChangeEventSlimEntityLabels$inboundSchema)) + .optional(), + services: z.nullable(z.array(ServiceEntityLite$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "external_id": "externalId", @@ -140,20 +145,20 @@ export const ChangeEventSlimEntity$inboundSchema: z.ZodType< /** @internal */ export type ChangeEventSlimEntity$Outbound = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - external_id?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - starts_at?: string | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + external_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + starts_at?: string | null | undefined; ends_at?: string | null | undefined; duration_ms?: number | null | undefined; duration_iso8601?: string | null | undefined; - environments?: Array | undefined; - authors?: Array | undefined; - labels?: ChangeEventSlimEntityLabels$Outbound | undefined; - services?: Array | undefined; + environments?: Array | null | undefined; + authors?: Array | null | undefined; + labels?: ChangeEventSlimEntityLabels$Outbound | null | undefined; + services?: Array | null | undefined; }; /** @internal */ @@ -162,20 +167,22 @@ export const ChangeEventSlimEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeEventSlimEntity > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - externalId: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), durationMs: z.nullable(z.number().int()).optional(), durationIso8601: z.nullable(z.string()).optional(), - environments: z.array(EnvironmentEntryEntity$outboundSchema).optional(), - authors: z.array(AuthorEntity$outboundSchema).optional(), - labels: z.lazy(() => ChangeEventSlimEntityLabels$outboundSchema).optional(), - services: z.array(ServiceEntityLite$outboundSchema).optional(), + environments: z.nullable(z.array(EnvironmentEntryEntity$outboundSchema)) + .optional(), + authors: z.nullable(z.array(AuthorEntity$outboundSchema)).optional(), + labels: z.nullable(z.lazy(() => ChangeEventSlimEntityLabels$outboundSchema)) + .optional(), + services: z.nullable(z.array(ServiceEntityLite$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { externalId: "external_id", diff --git a/src/models/components/changeeventslimentitypaginated.ts b/src/models/components/changeeventslimentitypaginated.ts index af7b1128..f98aff23 100644 --- a/src/models/components/changeeventslimentitypaginated.ts +++ b/src/models/components/changeeventslimentitypaginated.ts @@ -13,18 +13,18 @@ import { ChangeEventSlimEntity$outboundSchema, } from "./changeeventslimentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * ChangeEventSlimEntityPaginated model */ export type ChangeEventSlimEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const ChangeEventSlimEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(ChangeEventSlimEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(ChangeEventSlimEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type ChangeEventSlimEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const ChangeEventSlimEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeEventSlimEntityPaginated > = z.object({ - data: z.array(ChangeEventSlimEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(ChangeEventSlimEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/changeidentityentity.ts b/src/models/components/changeidentityentity.ts index 586a496d..f858f2a8 100644 --- a/src/models/components/changeidentityentity.ts +++ b/src/models/components/changeidentityentity.ts @@ -12,12 +12,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * ChangeIdentityEntity model */ export type ChangeIdentityEntity = { - id?: string | undefined; - type?: string | undefined; - value?: string | undefined; - changeId?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + value?: string | null | undefined; + changeId?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; }; /** @internal */ @@ -26,14 +26,16 @@ export const ChangeIdentityEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - value: z.string().optional(), - change_id: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + change_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "change_id": "changeId", @@ -44,12 +46,12 @@ export const ChangeIdentityEntity$inboundSchema: z.ZodType< /** @internal */ export type ChangeIdentityEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - value?: string | undefined; - change_id?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + value?: string | null | undefined; + change_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; }; /** @internal */ @@ -58,12 +60,12 @@ export const ChangeIdentityEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeIdentityEntity > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - value: z.string().optional(), - changeId: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + changeId: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { changeId: "change_id", diff --git a/src/models/components/changeidentityentitypaginated.ts b/src/models/components/changeidentityentitypaginated.ts index b471ea61..62d9556f 100644 --- a/src/models/components/changeidentityentitypaginated.ts +++ b/src/models/components/changeidentityentitypaginated.ts @@ -13,18 +13,18 @@ import { ChangeIdentityEntity$outboundSchema, } from "./changeidentityentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * ChangeIdentityEntityPaginated model */ export type ChangeIdentityEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const ChangeIdentityEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(ChangeIdentityEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(ChangeIdentityEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type ChangeIdentityEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const ChangeIdentityEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeIdentityEntityPaginated > = z.object({ - data: z.array(ChangeIdentityEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(ChangeIdentityEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/changesevents.ts b/src/models/components/changesevents.ts deleted file mode 100644 index cd458243..00000000 --- a/src/models/components/changesevents.ts +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ChangeIdentities = { - type: string; - value: string; -}; - -export const ChangesEventsType = { - Link: "link", -} as const; -export type ChangesEventsType = ClosedEnum; - -export type Attachments = { - type: ChangesEventsType; -}; - -export type Authors = { - source: string; - sourceId: string; - name: string; -}; - -/** - * Create a change event - */ -export type ChangesEvents = { - summary: string; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; - startsAt?: Date | undefined; - endsAt?: Date | undefined; - /** - * An array of environment IDs - */ - environments?: Array | undefined; - /** - * An array of service IDs - */ - services?: Array | undefined; - /** - * An array of change IDs - */ - changes?: Array | undefined; - /** - * The ID of a change event as assigned by an external provider - */ - externalId?: string | undefined; - /** - * If provided and valid, the event will be linked to all changes that have the same identities. Identity *values* must be unique. - */ - changeIdentities?: Array | undefined; - /** - * JSON objects representing attachments, see attachments documentation for the schema - */ - attachments?: Array | undefined; - /** - * Array of additional authors to add to the change event, the creating actor will automatically be added as an author - */ - authors?: Array | undefined; -}; - -/** @internal */ -export const ChangeIdentities$inboundSchema: z.ZodType< - ChangeIdentities, - z.ZodTypeDef, - unknown -> = z.object({ - type: z.string(), - value: z.string(), -}); - -/** @internal */ -export type ChangeIdentities$Outbound = { - type: string; - value: string; -}; - -/** @internal */ -export const ChangeIdentities$outboundSchema: z.ZodType< - ChangeIdentities$Outbound, - z.ZodTypeDef, - ChangeIdentities -> = z.object({ - type: z.string(), - value: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChangeIdentities$ { - /** @deprecated use `ChangeIdentities$inboundSchema` instead. */ - export const inboundSchema = ChangeIdentities$inboundSchema; - /** @deprecated use `ChangeIdentities$outboundSchema` instead. */ - export const outboundSchema = ChangeIdentities$outboundSchema; - /** @deprecated use `ChangeIdentities$Outbound` instead. */ - export type Outbound = ChangeIdentities$Outbound; -} - -export function changeIdentitiesToJSON( - changeIdentities: ChangeIdentities, -): string { - return JSON.stringify( - ChangeIdentities$outboundSchema.parse(changeIdentities), - ); -} - -export function changeIdentitiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ChangeIdentities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChangeIdentities' from JSON`, - ); -} - -/** @internal */ -export const ChangesEventsType$inboundSchema: z.ZodNativeEnum< - typeof ChangesEventsType -> = z.nativeEnum(ChangesEventsType); - -/** @internal */ -export const ChangesEventsType$outboundSchema: z.ZodNativeEnum< - typeof ChangesEventsType -> = ChangesEventsType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChangesEventsType$ { - /** @deprecated use `ChangesEventsType$inboundSchema` instead. */ - export const inboundSchema = ChangesEventsType$inboundSchema; - /** @deprecated use `ChangesEventsType$outboundSchema` instead. */ - export const outboundSchema = ChangesEventsType$outboundSchema; -} - -/** @internal */ -export const Attachments$inboundSchema: z.ZodType< - Attachments, - z.ZodTypeDef, - unknown -> = z.object({ - type: ChangesEventsType$inboundSchema, -}); - -/** @internal */ -export type Attachments$Outbound = { - type: string; -}; - -/** @internal */ -export const Attachments$outboundSchema: z.ZodType< - Attachments$Outbound, - z.ZodTypeDef, - Attachments -> = z.object({ - type: ChangesEventsType$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Attachments$ { - /** @deprecated use `Attachments$inboundSchema` instead. */ - export const inboundSchema = Attachments$inboundSchema; - /** @deprecated use `Attachments$outboundSchema` instead. */ - export const outboundSchema = Attachments$outboundSchema; - /** @deprecated use `Attachments$Outbound` instead. */ - export type Outbound = Attachments$Outbound; -} - -export function attachmentsToJSON(attachments: Attachments): string { - return JSON.stringify(Attachments$outboundSchema.parse(attachments)); -} - -export function attachmentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Attachments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Attachments' from JSON`, - ); -} - -/** @internal */ -export const Authors$inboundSchema: z.ZodType = - z.object({ - source: z.string(), - source_id: z.string(), - name: z.string(), - }).transform((v) => { - return remap$(v, { - "source_id": "sourceId", - }); - }); - -/** @internal */ -export type Authors$Outbound = { - source: string; - source_id: string; - name: string; -}; - -/** @internal */ -export const Authors$outboundSchema: z.ZodType< - Authors$Outbound, - z.ZodTypeDef, - Authors -> = z.object({ - source: z.string(), - sourceId: z.string(), - name: z.string(), -}).transform((v) => { - return remap$(v, { - sourceId: "source_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Authors$ { - /** @deprecated use `Authors$inboundSchema` instead. */ - export const inboundSchema = Authors$inboundSchema; - /** @deprecated use `Authors$outboundSchema` instead. */ - export const outboundSchema = Authors$outboundSchema; - /** @deprecated use `Authors$Outbound` instead. */ - export type Outbound = Authors$Outbound; -} - -export function authorsToJSON(authors: Authors): string { - return JSON.stringify(Authors$outboundSchema.parse(authors)); -} - -export function authorsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Authors$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Authors' from JSON`, - ); -} - -/** @internal */ -export const ChangesEvents$inboundSchema: z.ZodType< - ChangesEvents, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - environments: z.array(z.string()).optional(), - services: z.array(z.string()).optional(), - changes: z.array(z.string()).optional(), - external_id: z.string().optional(), - change_identities: z.array(z.lazy(() => ChangeIdentities$inboundSchema)) - .optional(), - attachments: z.array(z.lazy(() => Attachments$inboundSchema)).optional(), - authors: z.array(z.lazy(() => Authors$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "starts_at": "startsAt", - "ends_at": "endsAt", - "external_id": "externalId", - "change_identities": "changeIdentities", - }); -}); - -/** @internal */ -export type ChangesEvents$Outbound = { - summary: string; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; - starts_at?: string | undefined; - ends_at?: string | undefined; - environments?: Array | undefined; - services?: Array | undefined; - changes?: Array | undefined; - external_id?: string | undefined; - change_identities?: Array | undefined; - attachments?: Array | undefined; - authors?: Array | undefined; -}; - -/** @internal */ -export const ChangesEvents$outboundSchema: z.ZodType< - ChangesEvents$Outbound, - z.ZodTypeDef, - ChangesEvents -> = z.object({ - summary: z.string(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), - endsAt: z.date().transform(v => v.toISOString()).optional(), - environments: z.array(z.string()).optional(), - services: z.array(z.string()).optional(), - changes: z.array(z.string()).optional(), - externalId: z.string().optional(), - changeIdentities: z.array(z.lazy(() => ChangeIdentities$outboundSchema)) - .optional(), - attachments: z.array(z.lazy(() => Attachments$outboundSchema)).optional(), - authors: z.array(z.lazy(() => Authors$outboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - startsAt: "starts_at", - endsAt: "ends_at", - externalId: "external_id", - changeIdentities: "change_identities", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChangesEvents$ { - /** @deprecated use `ChangesEvents$inboundSchema` instead. */ - export const inboundSchema = ChangesEvents$inboundSchema; - /** @deprecated use `ChangesEvents$outboundSchema` instead. */ - export const outboundSchema = ChangesEvents$outboundSchema; - /** @deprecated use `ChangesEvents$Outbound` instead. */ - export type Outbound = ChangesEvents$Outbound; -} - -export function changesEventsToJSON(changesEvents: ChangesEvents): string { - return JSON.stringify(ChangesEvents$outboundSchema.parse(changesEvents)); -} - -export function changesEventsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ChangesEvents$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChangesEvents' from JSON`, - ); -} diff --git a/src/models/components/changetypeentity.ts b/src/models/components/changetypeentity.ts index bc9855c7..e5f4cc8c 100644 --- a/src/models/components/changetypeentity.ts +++ b/src/models/components/changetypeentity.ts @@ -8,8 +8,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ChangeTypeEntity = { - id?: string | undefined; - name?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -18,14 +18,14 @@ export const ChangeTypeEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }); /** @internal */ export type ChangeTypeEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -34,8 +34,8 @@ export const ChangeTypeEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeTypeEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/changetypeentitypaginated.ts b/src/models/components/changetypeentitypaginated.ts index 8f82173f..b510859e 100644 --- a/src/models/components/changetypeentitypaginated.ts +++ b/src/models/components/changetypeentitypaginated.ts @@ -13,18 +13,18 @@ import { ChangeTypeEntity$outboundSchema, } from "./changetypeentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * ChangeTypeEntityPaginated model */ export type ChangeTypeEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const ChangeTypeEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(ChangeTypeEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(ChangeTypeEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type ChangeTypeEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const ChangeTypeEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, ChangeTypeEntityPaginated > = z.object({ - data: z.array(ChangeTypeEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(ChangeTypeEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/checklistcheckentity.ts b/src/models/components/checklistcheckentity.ts index a2a78282..01b809cf 100644 --- a/src/models/components/checklistcheckentity.ts +++ b/src/models/components/checklistcheckentity.ts @@ -8,10 +8,10 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ChecklistCheckEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - status?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + status?: boolean | null | undefined; }; /** @internal */ @@ -20,18 +20,18 @@ export const ChecklistCheckEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - status: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + status: z.nullable(z.boolean()).optional(), }); /** @internal */ export type ChecklistCheckEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - status?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + status?: boolean | null | undefined; }; /** @internal */ @@ -40,10 +40,10 @@ export const ChecklistCheckEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ChecklistCheckEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - status: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + status: z.nullable(z.boolean()).optional(), }); /** diff --git a/src/models/components/checklisttemplateentity.ts b/src/models/components/checklisttemplateentity.ts index bdf7bd3f..a996b661 100644 --- a/src/models/components/checklisttemplateentity.ts +++ b/src/models/components/checklisttemplateentity.ts @@ -13,34 +13,34 @@ import { ChecklistCheckEntity$Outbound, ChecklistCheckEntity$outboundSchema, } from "./checklistcheckentity.js"; +import { + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; import { ServiceEntityChecklist, ServiceEntityChecklist$inboundSchema, ServiceEntityChecklist$Outbound, ServiceEntityChecklist$outboundSchema, } from "./serviceentitychecklist.js"; -import { - TeamEntityLite, - TeamEntityLite$inboundSchema, - TeamEntityLite$Outbound, - TeamEntityLite$outboundSchema, -} from "./teamentitylite.js"; /** * ChecklistTemplateEntity model */ export type ChecklistTemplateEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - createdAt?: string | undefined; - updatedAt?: Date | undefined; - checks?: Array | undefined; - owner?: TeamEntityLite | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + createdAt?: string | null | undefined; + updatedAt?: Date | null | undefined; + checks?: Array | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; /** * List of services that use this checklist */ - connectedServices?: Array | undefined; + connectedServices?: Array | null | undefined; }; /** @internal */ @@ -49,15 +49,17 @@ export const ChecklistTemplateEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - created_at: z.string().optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + created_at: z.nullable(z.string()).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + checks: z.nullable(z.array(ChecklistCheckEntity$inboundSchema)).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + connected_services: z.nullable(z.array(ServiceEntityChecklist$inboundSchema)) .optional(), - checks: z.array(ChecklistCheckEntity$inboundSchema).optional(), - owner: TeamEntityLite$inboundSchema.optional(), - connected_services: z.array(ServiceEntityChecklist$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -68,14 +70,17 @@ export const ChecklistTemplateEntity$inboundSchema: z.ZodType< /** @internal */ export type ChecklistTemplateEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - checks?: Array | undefined; - owner?: TeamEntityLite$Outbound | undefined; - connected_services?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + checks?: Array | null | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + connected_services?: + | Array + | null + | undefined; }; /** @internal */ @@ -84,14 +89,15 @@ export const ChecklistTemplateEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ChecklistTemplateEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - createdAt: z.string().optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - checks: z.array(ChecklistCheckEntity$outboundSchema).optional(), - owner: TeamEntityLite$outboundSchema.optional(), - connectedServices: z.array(ServiceEntityChecklist$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.string()).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + checks: z.nullable(z.array(ChecklistCheckEntity$outboundSchema)).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + connectedServices: z.nullable(z.array(ServiceEntityChecklist$outboundSchema)) + .optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/checklisttemplateentitypaginated.ts b/src/models/components/checklisttemplateentitypaginated.ts index 44cd4c03..b00a4a47 100644 --- a/src/models/components/checklisttemplateentitypaginated.ts +++ b/src/models/components/checklisttemplateentitypaginated.ts @@ -13,18 +13,18 @@ import { ChecklistTemplateEntity$outboundSchema, } from "./checklisttemplateentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * ChecklistTemplateEntityPaginated model */ export type ChecklistTemplateEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const ChecklistTemplateEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(ChecklistTemplateEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(ChecklistTemplateEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type ChecklistTemplateEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const ChecklistTemplateEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, ChecklistTemplateEntityPaginated > = z.object({ - data: z.array(ChecklistTemplateEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(ChecklistTemplateEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/conversationsapientitieschannel.ts b/src/models/components/conversationsapientitieschannel.ts deleted file mode 100644 index 2c1a8821..00000000 --- a/src/models/components/conversationsapientitieschannel.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ConversationsAPIEntitiesChannel = { - name?: string | undefined; -}; - -/** @internal */ -export const ConversationsAPIEntitiesChannel$inboundSchema: z.ZodType< - ConversationsAPIEntitiesChannel, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), -}); - -/** @internal */ -export type ConversationsAPIEntitiesChannel$Outbound = { - name?: string | undefined; -}; - -/** @internal */ -export const ConversationsAPIEntitiesChannel$outboundSchema: z.ZodType< - ConversationsAPIEntitiesChannel$Outbound, - z.ZodTypeDef, - ConversationsAPIEntitiesChannel -> = z.object({ - name: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ConversationsAPIEntitiesChannel$ { - /** @deprecated use `ConversationsAPIEntitiesChannel$inboundSchema` instead. */ - export const inboundSchema = ConversationsAPIEntitiesChannel$inboundSchema; - /** @deprecated use `ConversationsAPIEntitiesChannel$outboundSchema` instead. */ - export const outboundSchema = ConversationsAPIEntitiesChannel$outboundSchema; - /** @deprecated use `ConversationsAPIEntitiesChannel$Outbound` instead. */ - export type Outbound = ConversationsAPIEntitiesChannel$Outbound; -} - -export function conversationsAPIEntitiesChannelToJSON( - conversationsAPIEntitiesChannel: ConversationsAPIEntitiesChannel, -): string { - return JSON.stringify( - ConversationsAPIEntitiesChannel$outboundSchema.parse( - conversationsAPIEntitiesChannel, - ), - ); -} - -export function conversationsAPIEntitiesChannelFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ConversationsAPIEntitiesChannel$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ConversationsAPIEntitiesChannel' from JSON`, - ); -} diff --git a/src/models/components/conversationsapientitiesreference.ts b/src/models/components/conversationsapientitiesreference.ts index ee48dbd4..6fc2e33a 100644 --- a/src/models/components/conversationsapientitiesreference.ts +++ b/src/models/components/conversationsapientitiesreference.ts @@ -8,19 +8,19 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - ConversationsAPIEntitiesChannel, - ConversationsAPIEntitiesChannel$inboundSchema, - ConversationsAPIEntitiesChannel$Outbound, - ConversationsAPIEntitiesChannel$outboundSchema, -} from "./conversationsapientitieschannel.js"; + NullableConversationsAPIEntitiesChannel, + NullableConversationsAPIEntitiesChannel$inboundSchema, + NullableConversationsAPIEntitiesChannel$Outbound, + NullableConversationsAPIEntitiesChannel$outboundSchema, +} from "./nullableconversationsapientitieschannel.js"; export type ConversationsAPIEntitiesReference = { - id?: string | undefined; - resourceClass?: string | undefined; - resourceId?: string | undefined; - field?: string | undefined; - commentsUrl?: string | undefined; - channel?: ConversationsAPIEntitiesChannel | undefined; + id?: string | null | undefined; + resourceClass?: string | null | undefined; + resourceId?: string | null | undefined; + field?: string | null | undefined; + commentsUrl?: string | null | undefined; + channel?: NullableConversationsAPIEntitiesChannel | null | undefined; }; /** @internal */ @@ -29,12 +29,13 @@ export const ConversationsAPIEntitiesReference$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - resource_class: z.string().optional(), - resource_id: z.string().optional(), - field: z.string().optional(), - comments_url: z.string().optional(), - channel: ConversationsAPIEntitiesChannel$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + resource_class: z.nullable(z.string()).optional(), + resource_id: z.nullable(z.string()).optional(), + field: z.nullable(z.string()).optional(), + comments_url: z.nullable(z.string()).optional(), + channel: z.nullable(NullableConversationsAPIEntitiesChannel$inboundSchema) + .optional(), }).transform((v) => { return remap$(v, { "resource_class": "resourceClass", @@ -45,12 +46,12 @@ export const ConversationsAPIEntitiesReference$inboundSchema: z.ZodType< /** @internal */ export type ConversationsAPIEntitiesReference$Outbound = { - id?: string | undefined; - resource_class?: string | undefined; - resource_id?: string | undefined; - field?: string | undefined; - comments_url?: string | undefined; - channel?: ConversationsAPIEntitiesChannel$Outbound | undefined; + id?: string | null | undefined; + resource_class?: string | null | undefined; + resource_id?: string | null | undefined; + field?: string | null | undefined; + comments_url?: string | null | undefined; + channel?: NullableConversationsAPIEntitiesChannel$Outbound | null | undefined; }; /** @internal */ @@ -59,12 +60,13 @@ export const ConversationsAPIEntitiesReference$outboundSchema: z.ZodType< z.ZodTypeDef, ConversationsAPIEntitiesReference > = z.object({ - id: z.string().optional(), - resourceClass: z.string().optional(), - resourceId: z.string().optional(), - field: z.string().optional(), - commentsUrl: z.string().optional(), - channel: ConversationsAPIEntitiesChannel$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + resourceClass: z.nullable(z.string()).optional(), + resourceId: z.nullable(z.string()).optional(), + field: z.nullable(z.string()).optional(), + commentsUrl: z.nullable(z.string()).optional(), + channel: z.nullable(NullableConversationsAPIEntitiesChannel$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { resourceClass: "resource_class", diff --git a/src/models/components/convertincidenttask.ts b/src/models/components/convertincidenttask.ts new file mode 100644 index 00000000..7930ec5a --- /dev/null +++ b/src/models/components/convertincidenttask.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Convert a task to a follow-up + */ +export type ConvertIncidentTask = { + summary?: string | null | undefined; + projectId?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + /** + * List of tags for the ticket + */ + tagList?: Array | null | undefined; +}; + +/** @internal */ +export const ConvertIncidentTask$inboundSchema: z.ZodType< + ConvertIncidentTask, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + project_id: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "project_id": "projectId", + "tag_list": "tagList", + }); +}); + +/** @internal */ +export type ConvertIncidentTask$Outbound = { + summary?: string | null | undefined; + project_id?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + tag_list?: Array | null | undefined; +}; + +/** @internal */ +export const ConvertIncidentTask$outboundSchema: z.ZodType< + ConvertIncidentTask$Outbound, + z.ZodTypeDef, + ConvertIncidentTask +> = z.object({ + summary: z.nullable(z.string()).optional(), + projectId: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + projectId: "project_id", + tagList: "tag_list", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ConvertIncidentTask$ { + /** @deprecated use `ConvertIncidentTask$inboundSchema` instead. */ + export const inboundSchema = ConvertIncidentTask$inboundSchema; + /** @deprecated use `ConvertIncidentTask$outboundSchema` instead. */ + export const outboundSchema = ConvertIncidentTask$outboundSchema; + /** @deprecated use `ConvertIncidentTask$Outbound` instead. */ + export type Outbound = ConvertIncidentTask$Outbound; +} + +export function convertIncidentTaskToJSON( + convertIncidentTask: ConvertIncidentTask, +): string { + return JSON.stringify( + ConvertIncidentTask$outboundSchema.parse(convertIncidentTask), + ); +} + +export function convertIncidentTaskFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ConvertIncidentTask$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConvertIncidentTask' from JSON`, + ); +} diff --git a/src/models/components/createchange.ts b/src/models/components/createchange.ts new file mode 100644 index 00000000..ec481dfb --- /dev/null +++ b/src/models/components/createchange.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new change entry + */ +export type CreateChange = { + summary?: string | null | undefined; + description?: string | null | undefined; + /** + * A labels hash of keys and values + */ + labels?: { [k: string]: string } | null | undefined; +}; + +/** @internal */ +export const CreateChange$inboundSchema: z.ZodType< + CreateChange, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), +}); + +/** @internal */ +export type CreateChange$Outbound = { + summary?: string | null | undefined; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; +}; + +/** @internal */ +export const CreateChange$outboundSchema: z.ZodType< + CreateChange$Outbound, + z.ZodTypeDef, + CreateChange +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChange$ { + /** @deprecated use `CreateChange$inboundSchema` instead. */ + export const inboundSchema = CreateChange$inboundSchema; + /** @deprecated use `CreateChange$outboundSchema` instead. */ + export const outboundSchema = CreateChange$outboundSchema; + /** @deprecated use `CreateChange$Outbound` instead. */ + export type Outbound = CreateChange$Outbound; +} + +export function createChangeToJSON(createChange: CreateChange): string { + return JSON.stringify(CreateChange$outboundSchema.parse(createChange)); +} + +export function createChangeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateChange$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateChange' from JSON`, + ); +} diff --git a/src/models/components/createchangeevent.ts b/src/models/components/createchangeevent.ts new file mode 100644 index 00000000..0740a03e --- /dev/null +++ b/src/models/components/createchangeevent.ts @@ -0,0 +1,373 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ChangeIdentity = { + type: string; + value: string; +}; + +export const CreateChangeEventType = { + Link: "link", +} as const; +export type CreateChangeEventType = ClosedEnum; + +export type CreateChangeEventAttachment = { + type: CreateChangeEventType; +}; + +export type Author = { + source: string; + sourceId: string; + name: string; +}; + +/** + * Create a change event + */ +export type CreateChangeEvent = { + summary: string; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + startsAt?: Date | null | undefined; + endsAt?: Date | null | undefined; + /** + * An array of environment IDs + */ + environments?: Array | null | undefined; + /** + * An array of service IDs + */ + services?: Array | null | undefined; + /** + * An array of change IDs + */ + changes?: Array | null | undefined; + /** + * The ID of a change event as assigned by an external provider + */ + externalId?: string | null | undefined; + /** + * If provided and valid, the event will be linked to all changes that have the same identities. Identity *values* must be unique. + */ + changeIdentities?: Array | null | undefined; + /** + * JSON objects representing attachments, see attachments documentation for the schema + */ + attachments?: Array | null | undefined; + /** + * Array of additional authors to add to the change event, the creating actor will automatically be added as an author + */ + authors?: Array | null | undefined; +}; + +/** @internal */ +export const ChangeIdentity$inboundSchema: z.ZodType< + ChangeIdentity, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + value: z.string(), +}); + +/** @internal */ +export type ChangeIdentity$Outbound = { + type: string; + value: string; +}; + +/** @internal */ +export const ChangeIdentity$outboundSchema: z.ZodType< + ChangeIdentity$Outbound, + z.ZodTypeDef, + ChangeIdentity +> = z.object({ + type: z.string(), + value: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ChangeIdentity$ { + /** @deprecated use `ChangeIdentity$inboundSchema` instead. */ + export const inboundSchema = ChangeIdentity$inboundSchema; + /** @deprecated use `ChangeIdentity$outboundSchema` instead. */ + export const outboundSchema = ChangeIdentity$outboundSchema; + /** @deprecated use `ChangeIdentity$Outbound` instead. */ + export type Outbound = ChangeIdentity$Outbound; +} + +export function changeIdentityToJSON(changeIdentity: ChangeIdentity): string { + return JSON.stringify(ChangeIdentity$outboundSchema.parse(changeIdentity)); +} + +export function changeIdentityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChangeIdentity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChangeIdentity' from JSON`, + ); +} + +/** @internal */ +export const CreateChangeEventType$inboundSchema: z.ZodNativeEnum< + typeof CreateChangeEventType +> = z.nativeEnum(CreateChangeEventType); + +/** @internal */ +export const CreateChangeEventType$outboundSchema: z.ZodNativeEnum< + typeof CreateChangeEventType +> = CreateChangeEventType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChangeEventType$ { + /** @deprecated use `CreateChangeEventType$inboundSchema` instead. */ + export const inboundSchema = CreateChangeEventType$inboundSchema; + /** @deprecated use `CreateChangeEventType$outboundSchema` instead. */ + export const outboundSchema = CreateChangeEventType$outboundSchema; +} + +/** @internal */ +export const CreateChangeEventAttachment$inboundSchema: z.ZodType< + CreateChangeEventAttachment, + z.ZodTypeDef, + unknown +> = z.object({ + type: CreateChangeEventType$inboundSchema, +}); + +/** @internal */ +export type CreateChangeEventAttachment$Outbound = { + type: string; +}; + +/** @internal */ +export const CreateChangeEventAttachment$outboundSchema: z.ZodType< + CreateChangeEventAttachment$Outbound, + z.ZodTypeDef, + CreateChangeEventAttachment +> = z.object({ + type: CreateChangeEventType$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChangeEventAttachment$ { + /** @deprecated use `CreateChangeEventAttachment$inboundSchema` instead. */ + export const inboundSchema = CreateChangeEventAttachment$inboundSchema; + /** @deprecated use `CreateChangeEventAttachment$outboundSchema` instead. */ + export const outboundSchema = CreateChangeEventAttachment$outboundSchema; + /** @deprecated use `CreateChangeEventAttachment$Outbound` instead. */ + export type Outbound = CreateChangeEventAttachment$Outbound; +} + +export function createChangeEventAttachmentToJSON( + createChangeEventAttachment: CreateChangeEventAttachment, +): string { + return JSON.stringify( + CreateChangeEventAttachment$outboundSchema.parse( + createChangeEventAttachment, + ), + ); +} + +export function createChangeEventAttachmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateChangeEventAttachment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateChangeEventAttachment' from JSON`, + ); +} + +/** @internal */ +export const Author$inboundSchema: z.ZodType = z + .object({ + source: z.string(), + source_id: z.string(), + name: z.string(), + }).transform((v) => { + return remap$(v, { + "source_id": "sourceId", + }); + }); + +/** @internal */ +export type Author$Outbound = { + source: string; + source_id: string; + name: string; +}; + +/** @internal */ +export const Author$outboundSchema: z.ZodType< + Author$Outbound, + z.ZodTypeDef, + Author +> = z.object({ + source: z.string(), + sourceId: z.string(), + name: z.string(), +}).transform((v) => { + return remap$(v, { + sourceId: "source_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Author$ { + /** @deprecated use `Author$inboundSchema` instead. */ + export const inboundSchema = Author$inboundSchema; + /** @deprecated use `Author$outboundSchema` instead. */ + export const outboundSchema = Author$outboundSchema; + /** @deprecated use `Author$Outbound` instead. */ + export type Outbound = Author$Outbound; +} + +export function authorToJSON(author: Author): string { + return JSON.stringify(Author$outboundSchema.parse(author)); +} + +export function authorFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Author$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Author' from JSON`, + ); +} + +/** @internal */ +export const CreateChangeEvent$inboundSchema: z.ZodType< + CreateChangeEvent, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.string(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + environments: z.nullable(z.array(z.string())).optional(), + services: z.nullable(z.array(z.string())).optional(), + changes: z.nullable(z.array(z.string())).optional(), + external_id: z.nullable(z.string()).optional(), + change_identities: z.nullable( + z.array(z.lazy(() => ChangeIdentity$inboundSchema)), + ).optional(), + attachments: z.nullable( + z.array(z.lazy(() => CreateChangeEventAttachment$inboundSchema)), + ).optional(), + authors: z.nullable(z.array(z.lazy(() => Author$inboundSchema))).optional(), +}).transform((v) => { + return remap$(v, { + "starts_at": "startsAt", + "ends_at": "endsAt", + "external_id": "externalId", + "change_identities": "changeIdentities", + }); +}); + +/** @internal */ +export type CreateChangeEvent$Outbound = { + summary: string; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + environments?: Array | null | undefined; + services?: Array | null | undefined; + changes?: Array | null | undefined; + external_id?: string | null | undefined; + change_identities?: Array | null | undefined; + attachments?: Array | null | undefined; + authors?: Array | null | undefined; +}; + +/** @internal */ +export const CreateChangeEvent$outboundSchema: z.ZodType< + CreateChangeEvent$Outbound, + z.ZodTypeDef, + CreateChangeEvent +> = z.object({ + summary: z.string(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + environments: z.nullable(z.array(z.string())).optional(), + services: z.nullable(z.array(z.string())).optional(), + changes: z.nullable(z.array(z.string())).optional(), + externalId: z.nullable(z.string()).optional(), + changeIdentities: z.nullable( + z.array(z.lazy(() => ChangeIdentity$outboundSchema)), + ).optional(), + attachments: z.nullable( + z.array(z.lazy(() => CreateChangeEventAttachment$outboundSchema)), + ).optional(), + authors: z.nullable(z.array(z.lazy(() => Author$outboundSchema))).optional(), +}).transform((v) => { + return remap$(v, { + startsAt: "starts_at", + endsAt: "ends_at", + externalId: "external_id", + changeIdentities: "change_identities", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChangeEvent$ { + /** @deprecated use `CreateChangeEvent$inboundSchema` instead. */ + export const inboundSchema = CreateChangeEvent$inboundSchema; + /** @deprecated use `CreateChangeEvent$outboundSchema` instead. */ + export const outboundSchema = CreateChangeEvent$outboundSchema; + /** @deprecated use `CreateChangeEvent$Outbound` instead. */ + export type Outbound = CreateChangeEvent$Outbound; +} + +export function createChangeEventToJSON( + createChangeEvent: CreateChangeEvent, +): string { + return JSON.stringify( + CreateChangeEvent$outboundSchema.parse(createChangeEvent), + ); +} + +export function createChangeEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateChangeEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateChangeEvent' from JSON`, + ); +} diff --git a/src/models/components/createchangeidentity.ts b/src/models/components/createchangeidentity.ts new file mode 100644 index 00000000..86ae5854 --- /dev/null +++ b/src/models/components/createchangeidentity.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create an identity for the change entry + */ +export type CreateChangeIdentity = { + type: string; + value: string; +}; + +/** @internal */ +export const CreateChangeIdentity$inboundSchema: z.ZodType< + CreateChangeIdentity, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + value: z.string(), +}); + +/** @internal */ +export type CreateChangeIdentity$Outbound = { + type: string; + value: string; +}; + +/** @internal */ +export const CreateChangeIdentity$outboundSchema: z.ZodType< + CreateChangeIdentity$Outbound, + z.ZodTypeDef, + CreateChangeIdentity +> = z.object({ + type: z.string(), + value: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChangeIdentity$ { + /** @deprecated use `CreateChangeIdentity$inboundSchema` instead. */ + export const inboundSchema = CreateChangeIdentity$inboundSchema; + /** @deprecated use `CreateChangeIdentity$outboundSchema` instead. */ + export const outboundSchema = CreateChangeIdentity$outboundSchema; + /** @deprecated use `CreateChangeIdentity$Outbound` instead. */ + export type Outbound = CreateChangeIdentity$Outbound; +} + +export function createChangeIdentityToJSON( + createChangeIdentity: CreateChangeIdentity, +): string { + return JSON.stringify( + CreateChangeIdentity$outboundSchema.parse(createChangeIdentity), + ); +} + +export function createChangeIdentityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateChangeIdentity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateChangeIdentity' from JSON`, + ); +} diff --git a/src/models/components/createchecklisttemplate.ts b/src/models/components/createchecklisttemplate.ts new file mode 100644 index 00000000..5ab438b5 --- /dev/null +++ b/src/models/components/createchecklisttemplate.ts @@ -0,0 +1,258 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateChecklistTemplateCheck = { + /** + * The name of the check + */ + name: string; + /** + * The description of the check + */ + description?: string | null | undefined; +}; + +export type CreateChecklistTemplateConnectedService = { + id: string; +}; + +/** + * Creates a checklist template for the organization + */ +export type CreateChecklistTemplate = { + name: string; + /** + * An array of checks for the checklist template + */ + checks: Array; + description?: string | null | undefined; + /** + * The ID of the Team that owns the checklist template + */ + teamId?: string | null | undefined; + /** + * Array of service IDs to attach checklist template to + */ + connectedServices?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const CreateChecklistTemplateCheck$inboundSchema: z.ZodType< + CreateChecklistTemplateCheck, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CreateChecklistTemplateCheck$Outbound = { + name: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const CreateChecklistTemplateCheck$outboundSchema: z.ZodType< + CreateChecklistTemplateCheck$Outbound, + z.ZodTypeDef, + CreateChecklistTemplateCheck +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChecklistTemplateCheck$ { + /** @deprecated use `CreateChecklistTemplateCheck$inboundSchema` instead. */ + export const inboundSchema = CreateChecklistTemplateCheck$inboundSchema; + /** @deprecated use `CreateChecklistTemplateCheck$outboundSchema` instead. */ + export const outboundSchema = CreateChecklistTemplateCheck$outboundSchema; + /** @deprecated use `CreateChecklistTemplateCheck$Outbound` instead. */ + export type Outbound = CreateChecklistTemplateCheck$Outbound; +} + +export function createChecklistTemplateCheckToJSON( + createChecklistTemplateCheck: CreateChecklistTemplateCheck, +): string { + return JSON.stringify( + CreateChecklistTemplateCheck$outboundSchema.parse( + createChecklistTemplateCheck, + ), + ); +} + +export function createChecklistTemplateCheckFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateChecklistTemplateCheck$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateChecklistTemplateCheck' from JSON`, + ); +} + +/** @internal */ +export const CreateChecklistTemplateConnectedService$inboundSchema: z.ZodType< + CreateChecklistTemplateConnectedService, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CreateChecklistTemplateConnectedService$Outbound = { + id: string; +}; + +/** @internal */ +export const CreateChecklistTemplateConnectedService$outboundSchema: z.ZodType< + CreateChecklistTemplateConnectedService$Outbound, + z.ZodTypeDef, + CreateChecklistTemplateConnectedService +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChecklistTemplateConnectedService$ { + /** @deprecated use `CreateChecklistTemplateConnectedService$inboundSchema` instead. */ + export const inboundSchema = + CreateChecklistTemplateConnectedService$inboundSchema; + /** @deprecated use `CreateChecklistTemplateConnectedService$outboundSchema` instead. */ + export const outboundSchema = + CreateChecklistTemplateConnectedService$outboundSchema; + /** @deprecated use `CreateChecklistTemplateConnectedService$Outbound` instead. */ + export type Outbound = CreateChecklistTemplateConnectedService$Outbound; +} + +export function createChecklistTemplateConnectedServiceToJSON( + createChecklistTemplateConnectedService: + CreateChecklistTemplateConnectedService, +): string { + return JSON.stringify( + CreateChecklistTemplateConnectedService$outboundSchema.parse( + createChecklistTemplateConnectedService, + ), + ); +} + +export function createChecklistTemplateConnectedServiceFromJSON( + jsonString: string, +): SafeParseResult< + CreateChecklistTemplateConnectedService, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateChecklistTemplateConnectedService$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateChecklistTemplateConnectedService' from JSON`, + ); +} + +/** @internal */ +export const CreateChecklistTemplate$inboundSchema: z.ZodType< + CreateChecklistTemplate, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + checks: z.array(z.lazy(() => CreateChecklistTemplateCheck$inboundSchema)), + description: z.nullable(z.string()).optional(), + team_id: z.nullable(z.string()).optional(), + connected_services: z.nullable( + z.array( + z.lazy(() => CreateChecklistTemplateConnectedService$inboundSchema), + ), + ).optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "connected_services": "connectedServices", + }); +}); + +/** @internal */ +export type CreateChecklistTemplate$Outbound = { + name: string; + checks: Array; + description?: string | null | undefined; + team_id?: string | null | undefined; + connected_services?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const CreateChecklistTemplate$outboundSchema: z.ZodType< + CreateChecklistTemplate$Outbound, + z.ZodTypeDef, + CreateChecklistTemplate +> = z.object({ + name: z.string(), + checks: z.array(z.lazy(() => CreateChecklistTemplateCheck$outboundSchema)), + description: z.nullable(z.string()).optional(), + teamId: z.nullable(z.string()).optional(), + connectedServices: z.nullable( + z.array( + z.lazy(() => CreateChecklistTemplateConnectedService$outboundSchema), + ), + ).optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + connectedServices: "connected_services", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateChecklistTemplate$ { + /** @deprecated use `CreateChecklistTemplate$inboundSchema` instead. */ + export const inboundSchema = CreateChecklistTemplate$inboundSchema; + /** @deprecated use `CreateChecklistTemplate$outboundSchema` instead. */ + export const outboundSchema = CreateChecklistTemplate$outboundSchema; + /** @deprecated use `CreateChecklistTemplate$Outbound` instead. */ + export type Outbound = CreateChecklistTemplate$Outbound; +} + +export function createChecklistTemplateToJSON( + createChecklistTemplate: CreateChecklistTemplate, +): string { + return JSON.stringify( + CreateChecklistTemplate$outboundSchema.parse(createChecklistTemplate), + ); +} + +export function createChecklistTemplateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateChecklistTemplate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateChecklistTemplate' from JSON`, + ); +} diff --git a/src/models/components/createcomment.ts b/src/models/components/createcomment.ts new file mode 100644 index 00000000..0f1228bf --- /dev/null +++ b/src/models/components/createcomment.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * ALPHA - Creates a comment for a project + */ +export type CreateComment = { + /** + * Text body of comment + */ + body: string; +}; + +/** @internal */ +export const CreateComment$inboundSchema: z.ZodType< + CreateComment, + z.ZodTypeDef, + unknown +> = z.object({ + body: z.string(), +}); + +/** @internal */ +export type CreateComment$Outbound = { + body: string; +}; + +/** @internal */ +export const CreateComment$outboundSchema: z.ZodType< + CreateComment$Outbound, + z.ZodTypeDef, + CreateComment +> = z.object({ + body: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateComment$ { + /** @deprecated use `CreateComment$inboundSchema` instead. */ + export const inboundSchema = CreateComment$inboundSchema; + /** @deprecated use `CreateComment$outboundSchema` instead. */ + export const outboundSchema = CreateComment$outboundSchema; + /** @deprecated use `CreateComment$Outbound` instead. */ + export type Outbound = CreateComment$Outbound; +} + +export function createCommentToJSON(createComment: CreateComment): string { + return JSON.stringify(CreateComment$outboundSchema.parse(createComment)); +} + +export function createCommentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateComment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateComment' from JSON`, + ); +} diff --git a/src/models/components/createcommentreaction.ts b/src/models/components/createcommentreaction.ts new file mode 100644 index 00000000..dbe3fc60 --- /dev/null +++ b/src/models/components/createcommentreaction.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * ALPHA - Create a reaction on a comment + */ +export type CreateCommentReaction = { + /** + * CLDR short name of Unicode emojis + */ + reaction: string; +}; + +/** @internal */ +export const CreateCommentReaction$inboundSchema: z.ZodType< + CreateCommentReaction, + z.ZodTypeDef, + unknown +> = z.object({ + reaction: z.string(), +}); + +/** @internal */ +export type CreateCommentReaction$Outbound = { + reaction: string; +}; + +/** @internal */ +export const CreateCommentReaction$outboundSchema: z.ZodType< + CreateCommentReaction$Outbound, + z.ZodTypeDef, + CreateCommentReaction +> = z.object({ + reaction: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCommentReaction$ { + /** @deprecated use `CreateCommentReaction$inboundSchema` instead. */ + export const inboundSchema = CreateCommentReaction$inboundSchema; + /** @deprecated use `CreateCommentReaction$outboundSchema` instead. */ + export const outboundSchema = CreateCommentReaction$outboundSchema; + /** @deprecated use `CreateCommentReaction$Outbound` instead. */ + export type Outbound = CreateCommentReaction$Outbound; +} + +export function createCommentReactionToJSON( + createCommentReaction: CreateCommentReaction, +): string { + return JSON.stringify( + CreateCommentReaction$outboundSchema.parse(createCommentReaction), + ); +} + +export function createCommentReactionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCommentReaction$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCommentReaction' from JSON`, + ); +} diff --git a/src/models/components/createcustomfielddefinition.ts b/src/models/components/createcustomfielddefinition.ts new file mode 100644 index 00000000..3fb014f1 --- /dev/null +++ b/src/models/components/createcustomfielddefinition.ts @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new custom field definition + */ +export type CreateCustomFieldDefinition = { + displayName: string; + description?: string | null | undefined; + fieldType: string; + permissibleValues?: Array | null | undefined; + required: boolean; + /** + * An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. + */ + requiredAtMilestoneId?: string | null | undefined; +}; + +/** @internal */ +export const CreateCustomFieldDefinition$inboundSchema: z.ZodType< + CreateCustomFieldDefinition, + z.ZodTypeDef, + unknown +> = z.object({ + display_name: z.string(), + description: z.nullable(z.string()).optional(), + field_type: z.string(), + permissible_values: z.nullable(z.array(z.string())).optional(), + required: z.boolean(), + required_at_milestone_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "display_name": "displayName", + "field_type": "fieldType", + "permissible_values": "permissibleValues", + "required_at_milestone_id": "requiredAtMilestoneId", + }); +}); + +/** @internal */ +export type CreateCustomFieldDefinition$Outbound = { + display_name: string; + description?: string | null | undefined; + field_type: string; + permissible_values?: Array | null | undefined; + required: boolean; + required_at_milestone_id?: string | null | undefined; +}; + +/** @internal */ +export const CreateCustomFieldDefinition$outboundSchema: z.ZodType< + CreateCustomFieldDefinition$Outbound, + z.ZodTypeDef, + CreateCustomFieldDefinition +> = z.object({ + displayName: z.string(), + description: z.nullable(z.string()).optional(), + fieldType: z.string(), + permissibleValues: z.nullable(z.array(z.string())).optional(), + required: z.boolean(), + requiredAtMilestoneId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + displayName: "display_name", + fieldType: "field_type", + permissibleValues: "permissible_values", + requiredAtMilestoneId: "required_at_milestone_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCustomFieldDefinition$ { + /** @deprecated use `CreateCustomFieldDefinition$inboundSchema` instead. */ + export const inboundSchema = CreateCustomFieldDefinition$inboundSchema; + /** @deprecated use `CreateCustomFieldDefinition$outboundSchema` instead. */ + export const outboundSchema = CreateCustomFieldDefinition$outboundSchema; + /** @deprecated use `CreateCustomFieldDefinition$Outbound` instead. */ + export type Outbound = CreateCustomFieldDefinition$Outbound; +} + +export function createCustomFieldDefinitionToJSON( + createCustomFieldDefinition: CreateCustomFieldDefinition, +): string { + return JSON.stringify( + CreateCustomFieldDefinition$outboundSchema.parse( + createCustomFieldDefinition, + ), + ); +} + +export function createCustomFieldDefinitionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCustomFieldDefinition$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCustomFieldDefinition' from JSON`, + ); +} diff --git a/src/models/components/createenvironment.ts b/src/models/components/createenvironment.ts new file mode 100644 index 00000000..cacdf00d --- /dev/null +++ b/src/models/components/createenvironment.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Creates an environment for the organization + */ +export type CreateEnvironment = { + name: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const CreateEnvironment$inboundSchema: z.ZodType< + CreateEnvironment, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CreateEnvironment$Outbound = { + name: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const CreateEnvironment$outboundSchema: z.ZodType< + CreateEnvironment$Outbound, + z.ZodTypeDef, + CreateEnvironment +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateEnvironment$ { + /** @deprecated use `CreateEnvironment$inboundSchema` instead. */ + export const inboundSchema = CreateEnvironment$inboundSchema; + /** @deprecated use `CreateEnvironment$outboundSchema` instead. */ + export const outboundSchema = CreateEnvironment$outboundSchema; + /** @deprecated use `CreateEnvironment$Outbound` instead. */ + export type Outbound = CreateEnvironment$Outbound; +} + +export function createEnvironmentToJSON( + createEnvironment: CreateEnvironment, +): string { + return JSON.stringify( + CreateEnvironment$outboundSchema.parse(createEnvironment), + ); +} + +export function createEnvironmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateEnvironment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEnvironment' from JSON`, + ); +} diff --git a/src/models/components/createfunctionality.ts b/src/models/components/createfunctionality.ts new file mode 100644 index 00000000..032a40ef --- /dev/null +++ b/src/models/components/createfunctionality.ts @@ -0,0 +1,502 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateFunctionalityService = { + /** + * ID of a service + */ + id: string; +}; + +export type CreateFunctionalityExternalResource = { + remoteId: string; + /** + * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. + */ + connectionType?: string | null | undefined; +}; + +export type CreateFunctionalityLink = { + /** + * Short name used to display and identify this link + */ + name: string; + /** + * URL + */ + hrefUrl: string; + /** + * An optional URL to an icon representing this link + */ + iconUrl?: string | null | undefined; +}; + +/** + * An object representing a Team that owns the service + */ +export type CreateFunctionalityOwner = { + id: string; +}; + +export type CreateFunctionalityTeam = { + id: string; +}; + +/** + * Creates a functionality for the organization + */ +export type CreateFunctionality = { + name: string; + description?: string | null | undefined; + services?: Array | null | undefined; + /** + * A hash of label keys and values + */ + labels?: { [k: string]: string } | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + /** + * An array of external resources to attach to this service. + */ + externalResources?: + | Array + | null + | undefined; + /** + * An array of links to associate with this service + */ + links?: Array | null | undefined; + /** + * An object representing a Team that owns the service + */ + owner?: CreateFunctionalityOwner | null | undefined; + /** + * An array of teams to attach to this service. + */ + teams?: Array | null | undefined; +}; + +/** @internal */ +export const CreateFunctionalityService$inboundSchema: z.ZodType< + CreateFunctionalityService, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CreateFunctionalityService$Outbound = { + id: string; +}; + +/** @internal */ +export const CreateFunctionalityService$outboundSchema: z.ZodType< + CreateFunctionalityService$Outbound, + z.ZodTypeDef, + CreateFunctionalityService +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateFunctionalityService$ { + /** @deprecated use `CreateFunctionalityService$inboundSchema` instead. */ + export const inboundSchema = CreateFunctionalityService$inboundSchema; + /** @deprecated use `CreateFunctionalityService$outboundSchema` instead. */ + export const outboundSchema = CreateFunctionalityService$outboundSchema; + /** @deprecated use `CreateFunctionalityService$Outbound` instead. */ + export type Outbound = CreateFunctionalityService$Outbound; +} + +export function createFunctionalityServiceToJSON( + createFunctionalityService: CreateFunctionalityService, +): string { + return JSON.stringify( + CreateFunctionalityService$outboundSchema.parse(createFunctionalityService), + ); +} + +export function createFunctionalityServiceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateFunctionalityService$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateFunctionalityService' from JSON`, + ); +} + +/** @internal */ +export const CreateFunctionalityExternalResource$inboundSchema: z.ZodType< + CreateFunctionalityExternalResource, + z.ZodTypeDef, + unknown +> = z.object({ + remote_id: z.string(), + connection_type: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "remote_id": "remoteId", + "connection_type": "connectionType", + }); +}); + +/** @internal */ +export type CreateFunctionalityExternalResource$Outbound = { + remote_id: string; + connection_type?: string | null | undefined; +}; + +/** @internal */ +export const CreateFunctionalityExternalResource$outboundSchema: z.ZodType< + CreateFunctionalityExternalResource$Outbound, + z.ZodTypeDef, + CreateFunctionalityExternalResource +> = z.object({ + remoteId: z.string(), + connectionType: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + remoteId: "remote_id", + connectionType: "connection_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateFunctionalityExternalResource$ { + /** @deprecated use `CreateFunctionalityExternalResource$inboundSchema` instead. */ + export const inboundSchema = + CreateFunctionalityExternalResource$inboundSchema; + /** @deprecated use `CreateFunctionalityExternalResource$outboundSchema` instead. */ + export const outboundSchema = + CreateFunctionalityExternalResource$outboundSchema; + /** @deprecated use `CreateFunctionalityExternalResource$Outbound` instead. */ + export type Outbound = CreateFunctionalityExternalResource$Outbound; +} + +export function createFunctionalityExternalResourceToJSON( + createFunctionalityExternalResource: CreateFunctionalityExternalResource, +): string { + return JSON.stringify( + CreateFunctionalityExternalResource$outboundSchema.parse( + createFunctionalityExternalResource, + ), + ); +} + +export function createFunctionalityExternalResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateFunctionalityExternalResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateFunctionalityExternalResource' from JSON`, + ); +} + +/** @internal */ +export const CreateFunctionalityLink$inboundSchema: z.ZodType< + CreateFunctionalityLink, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + href_url: z.string(), + icon_url: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "href_url": "hrefUrl", + "icon_url": "iconUrl", + }); +}); + +/** @internal */ +export type CreateFunctionalityLink$Outbound = { + name: string; + href_url: string; + icon_url?: string | null | undefined; +}; + +/** @internal */ +export const CreateFunctionalityLink$outboundSchema: z.ZodType< + CreateFunctionalityLink$Outbound, + z.ZodTypeDef, + CreateFunctionalityLink +> = z.object({ + name: z.string(), + hrefUrl: z.string(), + iconUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + hrefUrl: "href_url", + iconUrl: "icon_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateFunctionalityLink$ { + /** @deprecated use `CreateFunctionalityLink$inboundSchema` instead. */ + export const inboundSchema = CreateFunctionalityLink$inboundSchema; + /** @deprecated use `CreateFunctionalityLink$outboundSchema` instead. */ + export const outboundSchema = CreateFunctionalityLink$outboundSchema; + /** @deprecated use `CreateFunctionalityLink$Outbound` instead. */ + export type Outbound = CreateFunctionalityLink$Outbound; +} + +export function createFunctionalityLinkToJSON( + createFunctionalityLink: CreateFunctionalityLink, +): string { + return JSON.stringify( + CreateFunctionalityLink$outboundSchema.parse(createFunctionalityLink), + ); +} + +export function createFunctionalityLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateFunctionalityLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateFunctionalityLink' from JSON`, + ); +} + +/** @internal */ +export const CreateFunctionalityOwner$inboundSchema: z.ZodType< + CreateFunctionalityOwner, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CreateFunctionalityOwner$Outbound = { + id: string; +}; + +/** @internal */ +export const CreateFunctionalityOwner$outboundSchema: z.ZodType< + CreateFunctionalityOwner$Outbound, + z.ZodTypeDef, + CreateFunctionalityOwner +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateFunctionalityOwner$ { + /** @deprecated use `CreateFunctionalityOwner$inboundSchema` instead. */ + export const inboundSchema = CreateFunctionalityOwner$inboundSchema; + /** @deprecated use `CreateFunctionalityOwner$outboundSchema` instead. */ + export const outboundSchema = CreateFunctionalityOwner$outboundSchema; + /** @deprecated use `CreateFunctionalityOwner$Outbound` instead. */ + export type Outbound = CreateFunctionalityOwner$Outbound; +} + +export function createFunctionalityOwnerToJSON( + createFunctionalityOwner: CreateFunctionalityOwner, +): string { + return JSON.stringify( + CreateFunctionalityOwner$outboundSchema.parse(createFunctionalityOwner), + ); +} + +export function createFunctionalityOwnerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateFunctionalityOwner$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateFunctionalityOwner' from JSON`, + ); +} + +/** @internal */ +export const CreateFunctionalityTeam$inboundSchema: z.ZodType< + CreateFunctionalityTeam, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CreateFunctionalityTeam$Outbound = { + id: string; +}; + +/** @internal */ +export const CreateFunctionalityTeam$outboundSchema: z.ZodType< + CreateFunctionalityTeam$Outbound, + z.ZodTypeDef, + CreateFunctionalityTeam +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateFunctionalityTeam$ { + /** @deprecated use `CreateFunctionalityTeam$inboundSchema` instead. */ + export const inboundSchema = CreateFunctionalityTeam$inboundSchema; + /** @deprecated use `CreateFunctionalityTeam$outboundSchema` instead. */ + export const outboundSchema = CreateFunctionalityTeam$outboundSchema; + /** @deprecated use `CreateFunctionalityTeam$Outbound` instead. */ + export type Outbound = CreateFunctionalityTeam$Outbound; +} + +export function createFunctionalityTeamToJSON( + createFunctionalityTeam: CreateFunctionalityTeam, +): string { + return JSON.stringify( + CreateFunctionalityTeam$outboundSchema.parse(createFunctionalityTeam), + ); +} + +export function createFunctionalityTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateFunctionalityTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateFunctionalityTeam' from JSON`, + ); +} + +/** @internal */ +export const CreateFunctionality$inboundSchema: z.ZodType< + CreateFunctionality, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + services: z.nullable( + z.array(z.lazy(() => CreateFunctionalityService$inboundSchema)), + ).optional(), + labels: z.nullable(z.record(z.string())).optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + external_resources: z.nullable( + z.array(z.lazy(() => CreateFunctionalityExternalResource$inboundSchema)), + ).optional(), + links: z.nullable( + z.array(z.lazy(() => CreateFunctionalityLink$inboundSchema)), + ).optional(), + owner: z.nullable(z.lazy(() => CreateFunctionalityOwner$inboundSchema)) + .optional(), + teams: z.nullable( + z.array(z.lazy(() => CreateFunctionalityTeam$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "alert_on_add": "alertOnAdd", + "auto_add_responding_team": "autoAddRespondingTeam", + "external_resources": "externalResources", + }); +}); + +/** @internal */ +export type CreateFunctionality$Outbound = { + name: string; + description?: string | null | undefined; + services?: Array | null | undefined; + labels?: { [k: string]: string } | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + external_resources?: + | Array + | null + | undefined; + links?: Array | null | undefined; + owner?: CreateFunctionalityOwner$Outbound | null | undefined; + teams?: Array | null | undefined; +}; + +/** @internal */ +export const CreateFunctionality$outboundSchema: z.ZodType< + CreateFunctionality$Outbound, + z.ZodTypeDef, + CreateFunctionality +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + services: z.nullable( + z.array(z.lazy(() => CreateFunctionalityService$outboundSchema)), + ).optional(), + labels: z.nullable(z.record(z.string())).optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + externalResources: z.nullable( + z.array(z.lazy(() => CreateFunctionalityExternalResource$outboundSchema)), + ).optional(), + links: z.nullable( + z.array(z.lazy(() => CreateFunctionalityLink$outboundSchema)), + ).optional(), + owner: z.nullable(z.lazy(() => CreateFunctionalityOwner$outboundSchema)) + .optional(), + teams: z.nullable( + z.array(z.lazy(() => CreateFunctionalityTeam$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + alertOnAdd: "alert_on_add", + autoAddRespondingTeam: "auto_add_responding_team", + externalResources: "external_resources", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateFunctionality$ { + /** @deprecated use `CreateFunctionality$inboundSchema` instead. */ + export const inboundSchema = CreateFunctionality$inboundSchema; + /** @deprecated use `CreateFunctionality$outboundSchema` instead. */ + export const outboundSchema = CreateFunctionality$outboundSchema; + /** @deprecated use `CreateFunctionality$Outbound` instead. */ + export type Outbound = CreateFunctionality$Outbound; +} + +export function createFunctionalityToJSON( + createFunctionality: CreateFunctionality, +): string { + return JSON.stringify( + CreateFunctionality$outboundSchema.parse(createFunctionality), + ); +} + +export function createFunctionalityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateFunctionality$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateFunctionality' from JSON`, + ); +} diff --git a/src/models/components/createincident.ts b/src/models/components/createincident.ts new file mode 100644 index 00000000..c67501fb --- /dev/null +++ b/src/models/components/createincident.ts @@ -0,0 +1,500 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Key:value pairs to track custom data for the incident + */ +export type CreateIncidentLabels = {}; + +export type CreateIncidentImpact1 = { + /** + * The type of impacted infrastructure. One of: environment, functionality, or service + */ + type: string; + /** + * The ID of the impacted infrastructure + */ + id: string; + /** + * The ID of the impact condition. Find these at /v1/severity_matrix/conditions + */ + conditionId: string; +}; + +export type CreateIncidentMilestone = { + /** + * The type/slug of the milestone. Must be one of the currently configured milestones. + */ + type: string; + /** + * An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value + */ + occurredAt: Date; +}; + +export type CustomField = { + /** + * The ID of the custom field you wish to set. + */ + fieldId: string; + /** + * The value you wish to set on the custom field if the type of the field accepts string values + */ + valueString?: string | null | undefined; + /** + * The value you wish to set on the custom field if the type of the field accepts array values + */ + valueArray?: Array | null | undefined; +}; + +/** + * Create a new incident + */ +export type CreateIncident = { + name: string; + summary?: string | null | undefined; + customerImpactSummary?: string | null | undefined; + description?: string | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severityConditionId?: string | null | undefined; + severityImpactId?: string | null | undefined; + /** + * List of alert IDs that this incident should be associated to + */ + alertIds?: Array | null | undefined; + /** + * Key:value pairs to track custom data for the incident + */ + labels?: CreateIncidentLabels | null | undefined; + /** + * List of ids of Runbooks to attach to this incident. Foregoes any conditions these Runbooks may have guarding automatic attachment. + */ + runbookIds?: Array | null | undefined; + /** + * List of tags for the incident + */ + tagList?: Array | null | undefined; + /** + * An array of impacted infrastructure + */ + impacts?: Array | null | undefined; + /** + * An array of milestones to set on an incident. This can be used to create an already-resolved incident. + */ + milestones?: Array | null | undefined; + restricted?: boolean | null | undefined; + /** + * IDs of teams you wish to assign to this incident. + */ + teamIds?: Array | null | undefined; + /** + * An array of custom fields to set on the incident. + */ + customFields?: Array | null | undefined; + externalLinks?: string | null | undefined; + /** + * The ID of the incident type to use as a template when creating the incident. This will copy values from the incident type unless they are being overridden via parameters in this request. + */ + incidentTypeId?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentLabels$inboundSchema: z.ZodType< + CreateIncidentLabels, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CreateIncidentLabels$Outbound = {}; + +/** @internal */ +export const CreateIncidentLabels$outboundSchema: z.ZodType< + CreateIncidentLabels$Outbound, + z.ZodTypeDef, + CreateIncidentLabels +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentLabels$ { + /** @deprecated use `CreateIncidentLabels$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentLabels$inboundSchema; + /** @deprecated use `CreateIncidentLabels$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentLabels$outboundSchema; + /** @deprecated use `CreateIncidentLabels$Outbound` instead. */ + export type Outbound = CreateIncidentLabels$Outbound; +} + +export function createIncidentLabelsToJSON( + createIncidentLabels: CreateIncidentLabels, +): string { + return JSON.stringify( + CreateIncidentLabels$outboundSchema.parse(createIncidentLabels), + ); +} + +export function createIncidentLabelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentLabels' from JSON`, + ); +} + +/** @internal */ +export const CreateIncidentImpact1$inboundSchema: z.ZodType< + CreateIncidentImpact1, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type CreateIncidentImpact1$Outbound = { + type: string; + id: string; + condition_id: string; +}; + +/** @internal */ +export const CreateIncidentImpact1$outboundSchema: z.ZodType< + CreateIncidentImpact1$Outbound, + z.ZodTypeDef, + CreateIncidentImpact1 +> = z.object({ + type: z.string(), + id: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentImpact1$ { + /** @deprecated use `CreateIncidentImpact1$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentImpact1$inboundSchema; + /** @deprecated use `CreateIncidentImpact1$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentImpact1$outboundSchema; + /** @deprecated use `CreateIncidentImpact1$Outbound` instead. */ + export type Outbound = CreateIncidentImpact1$Outbound; +} + +export function createIncidentImpact1ToJSON( + createIncidentImpact1: CreateIncidentImpact1, +): string { + return JSON.stringify( + CreateIncidentImpact1$outboundSchema.parse(createIncidentImpact1), + ); +} + +export function createIncidentImpact1FromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentImpact1$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentImpact1' from JSON`, + ); +} + +/** @internal */ +export const CreateIncidentMilestone$inboundSchema: z.ZodType< + CreateIncidentMilestone, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + occurred_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), +}).transform((v) => { + return remap$(v, { + "occurred_at": "occurredAt", + }); +}); + +/** @internal */ +export type CreateIncidentMilestone$Outbound = { + type: string; + occurred_at: string; +}; + +/** @internal */ +export const CreateIncidentMilestone$outboundSchema: z.ZodType< + CreateIncidentMilestone$Outbound, + z.ZodTypeDef, + CreateIncidentMilestone +> = z.object({ + type: z.string(), + occurredAt: z.date().transform(v => v.toISOString()), +}).transform((v) => { + return remap$(v, { + occurredAt: "occurred_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentMilestone$ { + /** @deprecated use `CreateIncidentMilestone$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentMilestone$inboundSchema; + /** @deprecated use `CreateIncidentMilestone$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentMilestone$outboundSchema; + /** @deprecated use `CreateIncidentMilestone$Outbound` instead. */ + export type Outbound = CreateIncidentMilestone$Outbound; +} + +export function createIncidentMilestoneToJSON( + createIncidentMilestone: CreateIncidentMilestone, +): string { + return JSON.stringify( + CreateIncidentMilestone$outboundSchema.parse(createIncidentMilestone), + ); +} + +export function createIncidentMilestoneFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentMilestone$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentMilestone' from JSON`, + ); +} + +/** @internal */ +export const CustomField$inboundSchema: z.ZodType< + CustomField, + z.ZodTypeDef, + unknown +> = z.object({ + field_id: z.string(), + value_string: z.nullable(z.string()).optional(), + value_array: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "field_id": "fieldId", + "value_string": "valueString", + "value_array": "valueArray", + }); +}); + +/** @internal */ +export type CustomField$Outbound = { + field_id: string; + value_string?: string | null | undefined; + value_array?: Array | null | undefined; +}; + +/** @internal */ +export const CustomField$outboundSchema: z.ZodType< + CustomField$Outbound, + z.ZodTypeDef, + CustomField +> = z.object({ + fieldId: z.string(), + valueString: z.nullable(z.string()).optional(), + valueArray: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + fieldId: "field_id", + valueString: "value_string", + valueArray: "value_array", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CustomField$ { + /** @deprecated use `CustomField$inboundSchema` instead. */ + export const inboundSchema = CustomField$inboundSchema; + /** @deprecated use `CustomField$outboundSchema` instead. */ + export const outboundSchema = CustomField$outboundSchema; + /** @deprecated use `CustomField$Outbound` instead. */ + export type Outbound = CustomField$Outbound; +} + +export function customFieldToJSON(customField: CustomField): string { + return JSON.stringify(CustomField$outboundSchema.parse(customField)); +} + +export function customFieldFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CustomField$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CustomField' from JSON`, + ); +} + +/** @internal */ +export const CreateIncident$inboundSchema: z.ZodType< + CreateIncident, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + summary: z.nullable(z.string()).optional(), + customer_impact_summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severity_condition_id: z.nullable(z.string()).optional(), + severity_impact_id: z.nullable(z.string()).optional(), + alert_ids: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => CreateIncidentLabels$inboundSchema)) + .optional(), + runbook_ids: z.nullable(z.array(z.string())).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + impacts: z.nullable( + z.array(z.lazy(() => CreateIncidentImpact1$inboundSchema)), + ).optional(), + milestones: z.nullable( + z.array(z.lazy(() => CreateIncidentMilestone$inboundSchema)), + ).optional(), + restricted: z.nullable(z.boolean()).optional(), + team_ids: z.nullable(z.array(z.string())).optional(), + custom_fields: z.nullable(z.array(z.lazy(() => CustomField$inboundSchema))) + .optional(), + external_links: z.nullable(z.string()).optional(), + incident_type_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "customer_impact_summary": "customerImpactSummary", + "severity_condition_id": "severityConditionId", + "severity_impact_id": "severityImpactId", + "alert_ids": "alertIds", + "runbook_ids": "runbookIds", + "tag_list": "tagList", + "team_ids": "teamIds", + "custom_fields": "customFields", + "external_links": "externalLinks", + "incident_type_id": "incidentTypeId", + }); +}); + +/** @internal */ +export type CreateIncident$Outbound = { + name: string; + summary?: string | null | undefined; + customer_impact_summary?: string | null | undefined; + description?: string | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severity_condition_id?: string | null | undefined; + severity_impact_id?: string | null | undefined; + alert_ids?: Array | null | undefined; + labels?: CreateIncidentLabels$Outbound | null | undefined; + runbook_ids?: Array | null | undefined; + tag_list?: Array | null | undefined; + impacts?: Array | null | undefined; + milestones?: Array | null | undefined; + restricted?: boolean | null | undefined; + team_ids?: Array | null | undefined; + custom_fields?: Array | null | undefined; + external_links?: string | null | undefined; + incident_type_id?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncident$outboundSchema: z.ZodType< + CreateIncident$Outbound, + z.ZodTypeDef, + CreateIncident +> = z.object({ + name: z.string(), + summary: z.nullable(z.string()).optional(), + customerImpactSummary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severityConditionId: z.nullable(z.string()).optional(), + severityImpactId: z.nullable(z.string()).optional(), + alertIds: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => CreateIncidentLabels$outboundSchema)) + .optional(), + runbookIds: z.nullable(z.array(z.string())).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + impacts: z.nullable( + z.array(z.lazy(() => CreateIncidentImpact1$outboundSchema)), + ).optional(), + milestones: z.nullable( + z.array(z.lazy(() => CreateIncidentMilestone$outboundSchema)), + ).optional(), + restricted: z.nullable(z.boolean()).optional(), + teamIds: z.nullable(z.array(z.string())).optional(), + customFields: z.nullable(z.array(z.lazy(() => CustomField$outboundSchema))) + .optional(), + externalLinks: z.nullable(z.string()).optional(), + incidentTypeId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + customerImpactSummary: "customer_impact_summary", + severityConditionId: "severity_condition_id", + severityImpactId: "severity_impact_id", + alertIds: "alert_ids", + runbookIds: "runbook_ids", + tagList: "tag_list", + teamIds: "team_ids", + customFields: "custom_fields", + externalLinks: "external_links", + incidentTypeId: "incident_type_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncident$ { + /** @deprecated use `CreateIncident$inboundSchema` instead. */ + export const inboundSchema = CreateIncident$inboundSchema; + /** @deprecated use `CreateIncident$outboundSchema` instead. */ + export const outboundSchema = CreateIncident$outboundSchema; + /** @deprecated use `CreateIncident$Outbound` instead. */ + export type Outbound = CreateIncident$Outbound; +} + +export function createIncidentToJSON(createIncident: CreateIncident): string { + return JSON.stringify(CreateIncident$outboundSchema.parse(createIncident)); +} + +export function createIncidentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncident$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncident' from JSON`, + ); +} diff --git a/src/models/components/createincidentchangeevent.ts b/src/models/components/createincidentchangeevent.ts new file mode 100644 index 00000000..aaa1cc7d --- /dev/null +++ b/src/models/components/createincidentchangeevent.ts @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const CreateIncidentChangeEventType = { + Caused: "caused", + Fixed: "fixed", + Suspect: "suspect", + Dismissed: "dismissed", +} as const; +export type CreateIncidentChangeEventType = ClosedEnum< + typeof CreateIncidentChangeEventType +>; + +/** + * Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. + */ +export type CreateIncidentChangeEvent = { + /** + * The ID of the change event to associate + */ + changeEventId: string; + type: CreateIncidentChangeEventType; + /** + * A short description about why this change event is related + */ + why?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentChangeEventType$inboundSchema: z.ZodNativeEnum< + typeof CreateIncidentChangeEventType +> = z.nativeEnum(CreateIncidentChangeEventType); + +/** @internal */ +export const CreateIncidentChangeEventType$outboundSchema: z.ZodNativeEnum< + typeof CreateIncidentChangeEventType +> = CreateIncidentChangeEventType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentChangeEventType$ { + /** @deprecated use `CreateIncidentChangeEventType$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentChangeEventType$inboundSchema; + /** @deprecated use `CreateIncidentChangeEventType$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentChangeEventType$outboundSchema; +} + +/** @internal */ +export const CreateIncidentChangeEvent$inboundSchema: z.ZodType< + CreateIncidentChangeEvent, + z.ZodTypeDef, + unknown +> = z.object({ + change_event_id: z.string(), + type: CreateIncidentChangeEventType$inboundSchema, + why: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "change_event_id": "changeEventId", + }); +}); + +/** @internal */ +export type CreateIncidentChangeEvent$Outbound = { + change_event_id: string; + type: string; + why?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentChangeEvent$outboundSchema: z.ZodType< + CreateIncidentChangeEvent$Outbound, + z.ZodTypeDef, + CreateIncidentChangeEvent +> = z.object({ + changeEventId: z.string(), + type: CreateIncidentChangeEventType$outboundSchema, + why: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + changeEventId: "change_event_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentChangeEvent$ { + /** @deprecated use `CreateIncidentChangeEvent$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentChangeEvent$inboundSchema; + /** @deprecated use `CreateIncidentChangeEvent$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentChangeEvent$outboundSchema; + /** @deprecated use `CreateIncidentChangeEvent$Outbound` instead. */ + export type Outbound = CreateIncidentChangeEvent$Outbound; +} + +export function createIncidentChangeEventToJSON( + createIncidentChangeEvent: CreateIncidentChangeEvent, +): string { + return JSON.stringify( + CreateIncidentChangeEvent$outboundSchema.parse(createIncidentChangeEvent), + ); +} + +export function createIncidentChangeEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentChangeEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentChangeEvent' from JSON`, + ); +} diff --git a/src/models/components/createincidentchatmessage.ts b/src/models/components/createincidentchatmessage.ts new file mode 100644 index 00000000..30ef4f20 --- /dev/null +++ b/src/models/components/createincidentchatmessage.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const VoteDirection = { + Up: "up", + Down: "down", +} as const; +export type VoteDirection = ClosedEnum; + +/** + * Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. + */ +export type CreateIncidentChatMessage = { + body: string; + /** + * ISO8601 timestamp for when the chat message occurred + */ + occurredAt?: Date | null | undefined; + voteDirection?: VoteDirection | null | undefined; +}; + +/** @internal */ +export const VoteDirection$inboundSchema: z.ZodNativeEnum< + typeof VoteDirection +> = z.nativeEnum(VoteDirection); + +/** @internal */ +export const VoteDirection$outboundSchema: z.ZodNativeEnum< + typeof VoteDirection +> = VoteDirection$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace VoteDirection$ { + /** @deprecated use `VoteDirection$inboundSchema` instead. */ + export const inboundSchema = VoteDirection$inboundSchema; + /** @deprecated use `VoteDirection$outboundSchema` instead. */ + export const outboundSchema = VoteDirection$outboundSchema; +} + +/** @internal */ +export const CreateIncidentChatMessage$inboundSchema: z.ZodType< + CreateIncidentChatMessage, + z.ZodTypeDef, + unknown +> = z.object({ + body: z.string(), + occurred_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + vote_direction: z.nullable(VoteDirection$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "occurred_at": "occurredAt", + "vote_direction": "voteDirection", + }); +}); + +/** @internal */ +export type CreateIncidentChatMessage$Outbound = { + body: string; + occurred_at?: string | null | undefined; + vote_direction?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentChatMessage$outboundSchema: z.ZodType< + CreateIncidentChatMessage$Outbound, + z.ZodTypeDef, + CreateIncidentChatMessage +> = z.object({ + body: z.string(), + occurredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + voteDirection: z.nullable(VoteDirection$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + occurredAt: "occurred_at", + voteDirection: "vote_direction", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentChatMessage$ { + /** @deprecated use `CreateIncidentChatMessage$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentChatMessage$inboundSchema; + /** @deprecated use `CreateIncidentChatMessage$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentChatMessage$outboundSchema; + /** @deprecated use `CreateIncidentChatMessage$Outbound` instead. */ + export type Outbound = CreateIncidentChatMessage$Outbound; +} + +export function createIncidentChatMessageToJSON( + createIncidentChatMessage: CreateIncidentChatMessage, +): string { + return JSON.stringify( + CreateIncidentChatMessage$outboundSchema.parse(createIncidentChatMessage), + ); +} + +export function createIncidentChatMessageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentChatMessage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentChatMessage' from JSON`, + ); +} diff --git a/src/models/components/createincidentimpact.ts b/src/models/components/createincidentimpact.ts new file mode 100644 index 00000000..76925315 --- /dev/null +++ b/src/models/components/createincidentimpact.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Add impacted infrastructure to an incident + */ +export type CreateIncidentImpact = { + id: string; + conditionId?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentImpact$inboundSchema: z.ZodType< + CreateIncidentImpact, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + condition_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type CreateIncidentImpact$Outbound = { + id: string; + condition_id?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentImpact$outboundSchema: z.ZodType< + CreateIncidentImpact$Outbound, + z.ZodTypeDef, + CreateIncidentImpact +> = z.object({ + id: z.string(), + conditionId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentImpact$ { + /** @deprecated use `CreateIncidentImpact$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentImpact$inboundSchema; + /** @deprecated use `CreateIncidentImpact$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentImpact$outboundSchema; + /** @deprecated use `CreateIncidentImpact$Outbound` instead. */ + export type Outbound = CreateIncidentImpact$Outbound; +} + +export function createIncidentImpactToJSON( + createIncidentImpact: CreateIncidentImpact, +): string { + return JSON.stringify( + CreateIncidentImpact$outboundSchema.parse(createIncidentImpact), + ); +} + +export function createIncidentImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentImpact' from JSON`, + ); +} diff --git a/src/models/components/createincidentlink.ts b/src/models/components/createincidentlink.ts new file mode 100644 index 00000000..5f270876 --- /dev/null +++ b/src/models/components/createincidentlink.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Allows adding adhoc links to an incident as an attachment + */ +export type CreateIncidentLink = { + displayText?: string | null | undefined; + iconUrl?: string | null | undefined; + href: string; +}; + +/** @internal */ +export const CreateIncidentLink$inboundSchema: z.ZodType< + CreateIncidentLink, + z.ZodTypeDef, + unknown +> = z.object({ + display_text: z.nullable(z.string()).optional(), + icon_url: z.nullable(z.string()).optional(), + href: z.string(), +}).transform((v) => { + return remap$(v, { + "display_text": "displayText", + "icon_url": "iconUrl", + }); +}); + +/** @internal */ +export type CreateIncidentLink$Outbound = { + display_text?: string | null | undefined; + icon_url?: string | null | undefined; + href: string; +}; + +/** @internal */ +export const CreateIncidentLink$outboundSchema: z.ZodType< + CreateIncidentLink$Outbound, + z.ZodTypeDef, + CreateIncidentLink +> = z.object({ + displayText: z.nullable(z.string()).optional(), + iconUrl: z.nullable(z.string()).optional(), + href: z.string(), +}).transform((v) => { + return remap$(v, { + displayText: "display_text", + iconUrl: "icon_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentLink$ { + /** @deprecated use `CreateIncidentLink$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentLink$inboundSchema; + /** @deprecated use `CreateIncidentLink$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentLink$outboundSchema; + /** @deprecated use `CreateIncidentLink$Outbound` instead. */ + export type Outbound = CreateIncidentLink$Outbound; +} + +export function createIncidentLinkToJSON( + createIncidentLink: CreateIncidentLink, +): string { + return JSON.stringify( + CreateIncidentLink$outboundSchema.parse(createIncidentLink), + ); +} + +export function createIncidentLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentLink' from JSON`, + ); +} diff --git a/src/models/components/createincidentnote.ts b/src/models/components/createincidentnote.ts new file mode 100644 index 00000000..fb46ca1b --- /dev/null +++ b/src/models/components/createincidentnote.ts @@ -0,0 +1,211 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const CreateIncidentNoteVisibility = { + PrivateToOrg: "private_to_org", + OpenToPublic: "open_to_public", + InternalStatusPage: "internal_status_page", +} as const; +export type CreateIncidentNoteVisibility = ClosedEnum< + typeof CreateIncidentNoteVisibility +>; + +export type CreateIncidentNoteStatusPage = { + id: string; + integrationSlug: string; +}; + +/** + * Create a new note on for an incident. The visibility field on a note determines where it gets posted. + */ +export type CreateIncidentNote = { + body: string; + /** + * ISO8601 timestamp for when the note occurred + */ + occurredAt?: Date | null | undefined; + visibility?: CreateIncidentNoteVisibility | null | undefined; + statusPages?: Array | null | undefined; +}; + +/** @internal */ +export const CreateIncidentNoteVisibility$inboundSchema: z.ZodNativeEnum< + typeof CreateIncidentNoteVisibility +> = z.nativeEnum(CreateIncidentNoteVisibility); + +/** @internal */ +export const CreateIncidentNoteVisibility$outboundSchema: z.ZodNativeEnum< + typeof CreateIncidentNoteVisibility +> = CreateIncidentNoteVisibility$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentNoteVisibility$ { + /** @deprecated use `CreateIncidentNoteVisibility$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentNoteVisibility$inboundSchema; + /** @deprecated use `CreateIncidentNoteVisibility$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentNoteVisibility$outboundSchema; +} + +/** @internal */ +export const CreateIncidentNoteStatusPage$inboundSchema: z.ZodType< + CreateIncidentNoteStatusPage, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + integration_slug: z.string(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + }); +}); + +/** @internal */ +export type CreateIncidentNoteStatusPage$Outbound = { + id: string; + integration_slug: string; +}; + +/** @internal */ +export const CreateIncidentNoteStatusPage$outboundSchema: z.ZodType< + CreateIncidentNoteStatusPage$Outbound, + z.ZodTypeDef, + CreateIncidentNoteStatusPage +> = z.object({ + id: z.string(), + integrationSlug: z.string(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentNoteStatusPage$ { + /** @deprecated use `CreateIncidentNoteStatusPage$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentNoteStatusPage$inboundSchema; + /** @deprecated use `CreateIncidentNoteStatusPage$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentNoteStatusPage$outboundSchema; + /** @deprecated use `CreateIncidentNoteStatusPage$Outbound` instead. */ + export type Outbound = CreateIncidentNoteStatusPage$Outbound; +} + +export function createIncidentNoteStatusPageToJSON( + createIncidentNoteStatusPage: CreateIncidentNoteStatusPage, +): string { + return JSON.stringify( + CreateIncidentNoteStatusPage$outboundSchema.parse( + createIncidentNoteStatusPage, + ), + ); +} + +export function createIncidentNoteStatusPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentNoteStatusPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentNoteStatusPage' from JSON`, + ); +} + +/** @internal */ +export const CreateIncidentNote$inboundSchema: z.ZodType< + CreateIncidentNote, + z.ZodTypeDef, + unknown +> = z.object({ + body: z.string(), + occurred_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + visibility: z.nullable( + CreateIncidentNoteVisibility$inboundSchema.default("private_to_org"), + ), + status_pages: z.nullable( + z.array(z.lazy(() => CreateIncidentNoteStatusPage$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "occurred_at": "occurredAt", + "status_pages": "statusPages", + }); +}); + +/** @internal */ +export type CreateIncidentNote$Outbound = { + body: string; + occurred_at?: string | null | undefined; + visibility: string | null; + status_pages?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const CreateIncidentNote$outboundSchema: z.ZodType< + CreateIncidentNote$Outbound, + z.ZodTypeDef, + CreateIncidentNote +> = z.object({ + body: z.string(), + occurredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + visibility: z.nullable( + CreateIncidentNoteVisibility$outboundSchema.default("private_to_org"), + ), + statusPages: z.nullable( + z.array(z.lazy(() => CreateIncidentNoteStatusPage$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + occurredAt: "occurred_at", + statusPages: "status_pages", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentNote$ { + /** @deprecated use `CreateIncidentNote$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentNote$inboundSchema; + /** @deprecated use `CreateIncidentNote$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentNote$outboundSchema; + /** @deprecated use `CreateIncidentNote$Outbound` instead. */ + export type Outbound = CreateIncidentNote$Outbound; +} + +export function createIncidentNoteToJSON( + createIncidentNote: CreateIncidentNote, +): string { + return JSON.stringify( + CreateIncidentNote$outboundSchema.parse(createIncidentNote), + ); +} + +export function createIncidentNoteFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentNote$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentNote' from JSON`, + ); +} diff --git a/src/models/components/createincidentrole.ts b/src/models/components/createincidentrole.ts new file mode 100644 index 00000000..8e01a3d1 --- /dev/null +++ b/src/models/components/createincidentrole.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new incident role + */ +export type CreateIncidentRole = { + name: string; + summary: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentRole$inboundSchema: z.ZodType< + CreateIncidentRole, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + summary: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CreateIncidentRole$Outbound = { + name: string; + summary: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentRole$outboundSchema: z.ZodType< + CreateIncidentRole$Outbound, + z.ZodTypeDef, + CreateIncidentRole +> = z.object({ + name: z.string(), + summary: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRole$ { + /** @deprecated use `CreateIncidentRole$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentRole$inboundSchema; + /** @deprecated use `CreateIncidentRole$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentRole$outboundSchema; + /** @deprecated use `CreateIncidentRole$Outbound` instead. */ + export type Outbound = CreateIncidentRole$Outbound; +} + +export function createIncidentRoleToJSON( + createIncidentRole: CreateIncidentRole, +): string { + return JSON.stringify( + CreateIncidentRole$outboundSchema.parse(createIncidentRole), + ); +} + +export function createIncidentRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentRole' from JSON`, + ); +} diff --git a/src/models/components/createincidentroleassignment.ts b/src/models/components/createincidentroleassignment.ts new file mode 100644 index 00000000..b7dfe71f --- /dev/null +++ b/src/models/components/createincidentroleassignment.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Assign a role to a user for this incident + */ +export type CreateIncidentRoleAssignment = { + /** + * The user ID to assign the role to + */ + userId: string; + /** + * The Incident Role ID to assign the role to + */ + incidentRoleId: string; +}; + +/** @internal */ +export const CreateIncidentRoleAssignment$inboundSchema: z.ZodType< + CreateIncidentRoleAssignment, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.string(), + incident_role_id: z.string(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + "incident_role_id": "incidentRoleId", + }); +}); + +/** @internal */ +export type CreateIncidentRoleAssignment$Outbound = { + user_id: string; + incident_role_id: string; +}; + +/** @internal */ +export const CreateIncidentRoleAssignment$outboundSchema: z.ZodType< + CreateIncidentRoleAssignment$Outbound, + z.ZodTypeDef, + CreateIncidentRoleAssignment +> = z.object({ + userId: z.string(), + incidentRoleId: z.string(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + incidentRoleId: "incident_role_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRoleAssignment$ { + /** @deprecated use `CreateIncidentRoleAssignment$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentRoleAssignment$inboundSchema; + /** @deprecated use `CreateIncidentRoleAssignment$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentRoleAssignment$outboundSchema; + /** @deprecated use `CreateIncidentRoleAssignment$Outbound` instead. */ + export type Outbound = CreateIncidentRoleAssignment$Outbound; +} + +export function createIncidentRoleAssignmentToJSON( + createIncidentRoleAssignment: CreateIncidentRoleAssignment, +): string { + return JSON.stringify( + CreateIncidentRoleAssignment$outboundSchema.parse( + createIncidentRoleAssignment, + ), + ); +} + +export function createIncidentRoleAssignmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentRoleAssignment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentRoleAssignment' from JSON`, + ); +} diff --git a/src/models/components/createincidentstatuspage.ts b/src/models/components/createincidentstatuspage.ts new file mode 100644 index 00000000..f4bf5c4f --- /dev/null +++ b/src/models/components/createincidentstatuspage.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Add a status page to an incident. + */ +export type CreateIncidentStatusPage = { + integrationSlug: string; + integrationId: string; + title?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentStatusPage$inboundSchema: z.ZodType< + CreateIncidentStatusPage, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: z.string(), + integration_id: z.string(), + title: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "integration_id": "integrationId", + }); +}); + +/** @internal */ +export type CreateIncidentStatusPage$Outbound = { + integration_slug: string; + integration_id: string; + title?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentStatusPage$outboundSchema: z.ZodType< + CreateIncidentStatusPage$Outbound, + z.ZodTypeDef, + CreateIncidentStatusPage +> = z.object({ + integrationSlug: z.string(), + integrationId: z.string(), + title: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + integrationId: "integration_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentStatusPage$ { + /** @deprecated use `CreateIncidentStatusPage$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentStatusPage$inboundSchema; + /** @deprecated use `CreateIncidentStatusPage$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentStatusPage$outboundSchema; + /** @deprecated use `CreateIncidentStatusPage$Outbound` instead. */ + export type Outbound = CreateIncidentStatusPage$Outbound; +} + +export function createIncidentStatusPageToJSON( + createIncidentStatusPage: CreateIncidentStatusPage, +): string { + return JSON.stringify( + CreateIncidentStatusPage$outboundSchema.parse(createIncidentStatusPage), + ); +} + +export function createIncidentStatusPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentStatusPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentStatusPage' from JSON`, + ); +} diff --git a/src/models/components/createincidenttask.ts b/src/models/components/createincidenttask.ts new file mode 100644 index 00000000..b80d5c42 --- /dev/null +++ b/src/models/components/createincidenttask.ts @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a task + */ +export type CreateIncidentTask = { + /** + * The title of the task. + */ + title: string; + /** + * The state of the task. One of: open, in_progress, cancelled, done + */ + state?: string | null | undefined; + /** + * A description of what the task is for. + */ + description?: string | null | undefined; + /** + * The ID of the user assigned to the task. + */ + assigneeId?: string | null | undefined; + /** + * The due date of the task. Relative values are supported such as '5m' + */ + dueAt?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentTask$inboundSchema: z.ZodType< + CreateIncidentTask, + z.ZodTypeDef, + unknown +> = z.object({ + title: z.string(), + state: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + assignee_id: z.nullable(z.string()).optional(), + due_at: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "assignee_id": "assigneeId", + "due_at": "dueAt", + }); +}); + +/** @internal */ +export type CreateIncidentTask$Outbound = { + title: string; + state?: string | null | undefined; + description?: string | null | undefined; + assignee_id?: string | null | undefined; + due_at?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentTask$outboundSchema: z.ZodType< + CreateIncidentTask$Outbound, + z.ZodTypeDef, + CreateIncidentTask +> = z.object({ + title: z.string(), + state: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + assigneeId: z.nullable(z.string()).optional(), + dueAt: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + assigneeId: "assignee_id", + dueAt: "due_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentTask$ { + /** @deprecated use `CreateIncidentTask$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentTask$inboundSchema; + /** @deprecated use `CreateIncidentTask$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentTask$outboundSchema; + /** @deprecated use `CreateIncidentTask$Outbound` instead. */ + export type Outbound = CreateIncidentTask$Outbound; +} + +export function createIncidentTaskToJSON( + createIncidentTask: CreateIncidentTask, +): string { + return JSON.stringify( + CreateIncidentTask$outboundSchema.parse(createIncidentTask), + ); +} + +export function createIncidentTaskFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentTask$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentTask' from JSON`, + ); +} diff --git a/src/models/components/createincidenttasklist.ts b/src/models/components/createincidenttasklist.ts new file mode 100644 index 00000000..c415f5da --- /dev/null +++ b/src/models/components/createincidenttasklist.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Add all tasks from list to incident + */ +export type CreateIncidentTaskList = { + /** + * The id of the task list. + */ + taskListId: string; + /** + * The ID of the user assigned to the tasks in this list. + */ + assigneeId?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentTaskList$inboundSchema: z.ZodType< + CreateIncidentTaskList, + z.ZodTypeDef, + unknown +> = z.object({ + task_list_id: z.string(), + assignee_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "task_list_id": "taskListId", + "assignee_id": "assigneeId", + }); +}); + +/** @internal */ +export type CreateIncidentTaskList$Outbound = { + task_list_id: string; + assignee_id?: string | null | undefined; +}; + +/** @internal */ +export const CreateIncidentTaskList$outboundSchema: z.ZodType< + CreateIncidentTaskList$Outbound, + z.ZodTypeDef, + CreateIncidentTaskList +> = z.object({ + taskListId: z.string(), + assigneeId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + taskListId: "task_list_id", + assigneeId: "assignee_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentTaskList$ { + /** @deprecated use `CreateIncidentTaskList$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentTaskList$inboundSchema; + /** @deprecated use `CreateIncidentTaskList$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentTaskList$outboundSchema; + /** @deprecated use `CreateIncidentTaskList$Outbound` instead. */ + export type Outbound = CreateIncidentTaskList$Outbound; +} + +export function createIncidentTaskListToJSON( + createIncidentTaskList: CreateIncidentTaskList, +): string { + return JSON.stringify( + CreateIncidentTaskList$outboundSchema.parse(createIncidentTaskList), + ); +} + +export function createIncidentTaskListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentTaskList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentTaskList' from JSON`, + ); +} diff --git a/src/models/components/createincidentteamassignment.ts b/src/models/components/createincidentteamassignment.ts new file mode 100644 index 00000000..e8544301 --- /dev/null +++ b/src/models/components/createincidentteamassignment.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Assign a team for this incident + */ +export type CreateIncidentTeamAssignment = { + /** + * The team ID to associate to the incident + */ + teamId: string; +}; + +/** @internal */ +export const CreateIncidentTeamAssignment$inboundSchema: z.ZodType< + CreateIncidentTeamAssignment, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.string(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + }); +}); + +/** @internal */ +export type CreateIncidentTeamAssignment$Outbound = { + team_id: string; +}; + +/** @internal */ +export const CreateIncidentTeamAssignment$outboundSchema: z.ZodType< + CreateIncidentTeamAssignment$Outbound, + z.ZodTypeDef, + CreateIncidentTeamAssignment +> = z.object({ + teamId: z.string(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentTeamAssignment$ { + /** @deprecated use `CreateIncidentTeamAssignment$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentTeamAssignment$inboundSchema; + /** @deprecated use `CreateIncidentTeamAssignment$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentTeamAssignment$outboundSchema; + /** @deprecated use `CreateIncidentTeamAssignment$Outbound` instead. */ + export type Outbound = CreateIncidentTeamAssignment$Outbound; +} + +export function createIncidentTeamAssignmentToJSON( + createIncidentTeamAssignment: CreateIncidentTeamAssignment, +): string { + return JSON.stringify( + CreateIncidentTeamAssignment$outboundSchema.parse( + createIncidentTeamAssignment, + ), + ); +} + +export function createIncidentTeamAssignmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentTeamAssignment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentTeamAssignment' from JSON`, + ); +} diff --git a/src/models/components/createincidenttype.ts b/src/models/components/createincidenttype.ts new file mode 100644 index 00000000..d0b5237a --- /dev/null +++ b/src/models/components/createincidenttype.ts @@ -0,0 +1,279 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateIncidentTypeImpact = { + /** + * The id of impact + */ + id: string; + /** + * The id of the condition + */ + conditionId: string; +}; + +export type CreateIncidentTypeTemplate = { + description?: string | null | undefined; + customerImpactSummary?: string | null | undefined; + /** + * A labels hash of keys and values + */ + labels?: { [k: string]: string } | null | undefined; + severity?: string | null | undefined; + priority?: string | null | undefined; + /** + * List of tags for the incident + */ + tagList?: Array | null | undefined; + /** + * List of ids of Runbooks to attach to incidents created from this type + */ + runbookIds?: Array | null | undefined; + privateIncident?: boolean | null | undefined; + /** + * List of ids of teams to be assigned to incidents + */ + teamIds?: Array | null | undefined; + /** + * An array of impact/condition combinations + */ + impacts?: Array | null | undefined; +}; + +/** + * Create a new incident type + */ +export type CreateIncidentType = { + name: string; + template: CreateIncidentTypeTemplate; +}; + +/** @internal */ +export const CreateIncidentTypeImpact$inboundSchema: z.ZodType< + CreateIncidentTypeImpact, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type CreateIncidentTypeImpact$Outbound = { + id: string; + condition_id: string; +}; + +/** @internal */ +export const CreateIncidentTypeImpact$outboundSchema: z.ZodType< + CreateIncidentTypeImpact$Outbound, + z.ZodTypeDef, + CreateIncidentTypeImpact +> = z.object({ + id: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentTypeImpact$ { + /** @deprecated use `CreateIncidentTypeImpact$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentTypeImpact$inboundSchema; + /** @deprecated use `CreateIncidentTypeImpact$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentTypeImpact$outboundSchema; + /** @deprecated use `CreateIncidentTypeImpact$Outbound` instead. */ + export type Outbound = CreateIncidentTypeImpact$Outbound; +} + +export function createIncidentTypeImpactToJSON( + createIncidentTypeImpact: CreateIncidentTypeImpact, +): string { + return JSON.stringify( + CreateIncidentTypeImpact$outboundSchema.parse(createIncidentTypeImpact), + ); +} + +export function createIncidentTypeImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentTypeImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentTypeImpact' from JSON`, + ); +} + +/** @internal */ +export const CreateIncidentTypeTemplate$inboundSchema: z.ZodType< + CreateIncidentTypeTemplate, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.nullable(z.string()).optional(), + customer_impact_summary: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + severity: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + runbook_ids: z.nullable(z.array(z.string())).optional(), + private_incident: z.nullable(z.boolean()).optional(), + team_ids: z.nullable(z.array(z.string())).optional(), + impacts: z.nullable( + z.array(z.lazy(() => CreateIncidentTypeImpact$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "customer_impact_summary": "customerImpactSummary", + "tag_list": "tagList", + "runbook_ids": "runbookIds", + "private_incident": "privateIncident", + "team_ids": "teamIds", + }); +}); + +/** @internal */ +export type CreateIncidentTypeTemplate$Outbound = { + description?: string | null | undefined; + customer_impact_summary?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + severity?: string | null | undefined; + priority?: string | null | undefined; + tag_list?: Array | null | undefined; + runbook_ids?: Array | null | undefined; + private_incident?: boolean | null | undefined; + team_ids?: Array | null | undefined; + impacts?: Array | null | undefined; +}; + +/** @internal */ +export const CreateIncidentTypeTemplate$outboundSchema: z.ZodType< + CreateIncidentTypeTemplate$Outbound, + z.ZodTypeDef, + CreateIncidentTypeTemplate +> = z.object({ + description: z.nullable(z.string()).optional(), + customerImpactSummary: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + severity: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + runbookIds: z.nullable(z.array(z.string())).optional(), + privateIncident: z.nullable(z.boolean()).optional(), + teamIds: z.nullable(z.array(z.string())).optional(), + impacts: z.nullable( + z.array(z.lazy(() => CreateIncidentTypeImpact$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + customerImpactSummary: "customer_impact_summary", + tagList: "tag_list", + runbookIds: "runbook_ids", + privateIncident: "private_incident", + teamIds: "team_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentTypeTemplate$ { + /** @deprecated use `CreateIncidentTypeTemplate$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentTypeTemplate$inboundSchema; + /** @deprecated use `CreateIncidentTypeTemplate$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentTypeTemplate$outboundSchema; + /** @deprecated use `CreateIncidentTypeTemplate$Outbound` instead. */ + export type Outbound = CreateIncidentTypeTemplate$Outbound; +} + +export function createIncidentTypeTemplateToJSON( + createIncidentTypeTemplate: CreateIncidentTypeTemplate, +): string { + return JSON.stringify( + CreateIncidentTypeTemplate$outboundSchema.parse(createIncidentTypeTemplate), + ); +} + +export function createIncidentTypeTemplateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentTypeTemplate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentTypeTemplate' from JSON`, + ); +} + +/** @internal */ +export const CreateIncidentType$inboundSchema: z.ZodType< + CreateIncidentType, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + template: z.lazy(() => CreateIncidentTypeTemplate$inboundSchema), +}); + +/** @internal */ +export type CreateIncidentType$Outbound = { + name: string; + template: CreateIncidentTypeTemplate$Outbound; +}; + +/** @internal */ +export const CreateIncidentType$outboundSchema: z.ZodType< + CreateIncidentType$Outbound, + z.ZodTypeDef, + CreateIncidentType +> = z.object({ + name: z.string(), + template: z.lazy(() => CreateIncidentTypeTemplate$outboundSchema), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentType$ { + /** @deprecated use `CreateIncidentType$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentType$inboundSchema; + /** @deprecated use `CreateIncidentType$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentType$outboundSchema; + /** @deprecated use `CreateIncidentType$Outbound` instead. */ + export type Outbound = CreateIncidentType$Outbound; +} + +export function createIncidentTypeToJSON( + createIncidentType: CreateIncidentType, +): string { + return JSON.stringify( + CreateIncidentType$outboundSchema.parse(createIncidentType), + ); +} + +export function createIncidentTypeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentType$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentType' from JSON`, + ); +} diff --git a/src/models/components/createnuncsubscription.ts b/src/models/components/createnuncsubscription.ts new file mode 100644 index 00000000..b3749e53 --- /dev/null +++ b/src/models/components/createnuncsubscription.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Subscribe to status page updates + */ +export type CreateNuncSubscription = { + email: string; +}; + +/** @internal */ +export const CreateNuncSubscription$inboundSchema: z.ZodType< + CreateNuncSubscription, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string(), +}); + +/** @internal */ +export type CreateNuncSubscription$Outbound = { + email: string; +}; + +/** @internal */ +export const CreateNuncSubscription$outboundSchema: z.ZodType< + CreateNuncSubscription$Outbound, + z.ZodTypeDef, + CreateNuncSubscription +> = z.object({ + email: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateNuncSubscription$ { + /** @deprecated use `CreateNuncSubscription$inboundSchema` instead. */ + export const inboundSchema = CreateNuncSubscription$inboundSchema; + /** @deprecated use `CreateNuncSubscription$outboundSchema` instead. */ + export const outboundSchema = CreateNuncSubscription$outboundSchema; + /** @deprecated use `CreateNuncSubscription$Outbound` instead. */ + export type Outbound = CreateNuncSubscription$Outbound; +} + +export function createNuncSubscriptionToJSON( + createNuncSubscription: CreateNuncSubscription, +): string { + return JSON.stringify( + CreateNuncSubscription$outboundSchema.parse(createNuncSubscription), + ); +} + +export function createNuncSubscriptionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateNuncSubscription$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateNuncSubscription' from JSON`, + ); +} diff --git a/src/models/components/createoncallshift.ts b/src/models/components/createoncallshift.ts new file mode 100644 index 00000000..332c5724 --- /dev/null +++ b/src/models/components/createoncallshift.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a Signals on-call shift in a schedule. + */ +export type CreateOnCallShift = { + /** + * The start time of the shift in ISO8601 format. + */ + startTime: string; + /** + * The end time of the shift in ISO8601 format. + */ + endTime: string; + /** + * The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. + */ + userId?: string | null | undefined; +}; + +/** @internal */ +export const CreateOnCallShift$inboundSchema: z.ZodType< + CreateOnCallShift, + z.ZodTypeDef, + unknown +> = z.object({ + start_time: z.string(), + end_time: z.string(), + user_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "start_time": "startTime", + "end_time": "endTime", + "user_id": "userId", + }); +}); + +/** @internal */ +export type CreateOnCallShift$Outbound = { + start_time: string; + end_time: string; + user_id?: string | null | undefined; +}; + +/** @internal */ +export const CreateOnCallShift$outboundSchema: z.ZodType< + CreateOnCallShift$Outbound, + z.ZodTypeDef, + CreateOnCallShift +> = z.object({ + startTime: z.string(), + endTime: z.string(), + userId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + startTime: "start_time", + endTime: "end_time", + userId: "user_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateOnCallShift$ { + /** @deprecated use `CreateOnCallShift$inboundSchema` instead. */ + export const inboundSchema = CreateOnCallShift$inboundSchema; + /** @deprecated use `CreateOnCallShift$outboundSchema` instead. */ + export const outboundSchema = CreateOnCallShift$outboundSchema; + /** @deprecated use `CreateOnCallShift$Outbound` instead. */ + export type Outbound = CreateOnCallShift$Outbound; +} + +export function createOnCallShiftToJSON( + createOnCallShift: CreateOnCallShift, +): string { + return JSON.stringify( + CreateOnCallShift$outboundSchema.parse(createOnCallShift), + ); +} + +export function createOnCallShiftFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateOnCallShift$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateOnCallShift' from JSON`, + ); +} diff --git a/src/models/components/createpostmortemreason.ts b/src/models/components/createpostmortemreason.ts new file mode 100644 index 00000000..23f980e6 --- /dev/null +++ b/src/models/components/createpostmortemreason.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Add a new contributing factor to an incident + */ +export type CreatePostMortemReason = { + summary: string; +}; + +/** @internal */ +export const CreatePostMortemReason$inboundSchema: z.ZodType< + CreatePostMortemReason, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.string(), +}); + +/** @internal */ +export type CreatePostMortemReason$Outbound = { + summary: string; +}; + +/** @internal */ +export const CreatePostMortemReason$outboundSchema: z.ZodType< + CreatePostMortemReason$Outbound, + z.ZodTypeDef, + CreatePostMortemReason +> = z.object({ + summary: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePostMortemReason$ { + /** @deprecated use `CreatePostMortemReason$inboundSchema` instead. */ + export const inboundSchema = CreatePostMortemReason$inboundSchema; + /** @deprecated use `CreatePostMortemReason$outboundSchema` instead. */ + export const outboundSchema = CreatePostMortemReason$outboundSchema; + /** @deprecated use `CreatePostMortemReason$Outbound` instead. */ + export type Outbound = CreatePostMortemReason$Outbound; +} + +export function createPostMortemReasonToJSON( + createPostMortemReason: CreatePostMortemReason, +): string { + return JSON.stringify( + CreatePostMortemReason$outboundSchema.parse(createPostMortemReason), + ); +} + +export function createPostMortemReasonFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePostMortemReason$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePostMortemReason' from JSON`, + ); +} diff --git a/src/models/components/createpostmortemreport.ts b/src/models/components/createpostmortemreport.ts new file mode 100644 index 00000000..de58bc4c --- /dev/null +++ b/src/models/components/createpostmortemreport.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a report + */ +export type CreatePostMortemReport = { + incidentId: string; +}; + +/** @internal */ +export const CreatePostMortemReport$inboundSchema: z.ZodType< + CreatePostMortemReport, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type CreatePostMortemReport$Outbound = { + incident_id: string; +}; + +/** @internal */ +export const CreatePostMortemReport$outboundSchema: z.ZodType< + CreatePostMortemReport$Outbound, + z.ZodTypeDef, + CreatePostMortemReport +> = z.object({ + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePostMortemReport$ { + /** @deprecated use `CreatePostMortemReport$inboundSchema` instead. */ + export const inboundSchema = CreatePostMortemReport$inboundSchema; + /** @deprecated use `CreatePostMortemReport$outboundSchema` instead. */ + export const outboundSchema = CreatePostMortemReport$outboundSchema; + /** @deprecated use `CreatePostMortemReport$Outbound` instead. */ + export type Outbound = CreatePostMortemReport$Outbound; +} + +export function createPostMortemReportToJSON( + createPostMortemReport: CreatePostMortemReport, +): string { + return JSON.stringify( + CreatePostMortemReport$outboundSchema.parse(createPostMortemReport), + ); +} + +export function createPostMortemReportFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePostMortemReport$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePostMortemReport' from JSON`, + ); +} diff --git a/src/models/components/createpriority.ts b/src/models/components/createpriority.ts new file mode 100644 index 00000000..f1467719 --- /dev/null +++ b/src/models/components/createpriority.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new priority + */ +export type CreatePriority = { + slug: string; + description?: string | null | undefined; + default?: boolean | null | undefined; +}; + +/** @internal */ +export const CreatePriority$inboundSchema: z.ZodType< + CreatePriority, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.string(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type CreatePriority$Outbound = { + slug: string; + description?: string | null | undefined; + default?: boolean | null | undefined; +}; + +/** @internal */ +export const CreatePriority$outboundSchema: z.ZodType< + CreatePriority$Outbound, + z.ZodTypeDef, + CreatePriority +> = z.object({ + slug: z.string(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePriority$ { + /** @deprecated use `CreatePriority$inboundSchema` instead. */ + export const inboundSchema = CreatePriority$inboundSchema; + /** @deprecated use `CreatePriority$outboundSchema` instead. */ + export const outboundSchema = CreatePriority$outboundSchema; + /** @deprecated use `CreatePriority$Outbound` instead. */ + export type Outbound = CreatePriority$Outbound; +} + +export function createPriorityToJSON(createPriority: CreatePriority): string { + return JSON.stringify(CreatePriority$outboundSchema.parse(createPriority)); +} + +export function createPriorityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePriority$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePriority' from JSON`, + ); +} diff --git a/src/models/components/createrunbook.ts b/src/models/components/createrunbook.ts new file mode 100644 index 00000000..a57cb56d --- /dev/null +++ b/src/models/components/createrunbook.ts @@ -0,0 +1,463 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Deprecated, but still required. Please just use 'incident' + */ +export const CreateRunbookType = { + Incident: "incident", + General: "general", + Infrastructure: "infrastructure", + IncidentRole: "incident_role", +} as const; +/** + * Deprecated, but still required. Please just use 'incident' + */ +export type CreateRunbookType = ClosedEnum; + +/** + * An object representing a Team that owns the runbook + */ +export type CreateRunbookOwner = { + id: string; +}; + +export type CreateRunbookAttachmentRule = { + /** + * The JSON logic for the attaching the runbook + */ + logic: string; + /** + * The user data for the rule + */ + userData?: string | null | undefined; +}; + +export type CreateRunbookRule = { + /** + * The JSON logic for the rule + */ + logic: string; + /** + * The user data for the rule + */ + userData?: string | null | undefined; +}; + +export type CreateRunbookStep = { + /** + * Name for step + */ + name: string; + /** + * ID of action to use for this step. + */ + actionId: string; + rule?: CreateRunbookRule | null | undefined; +}; + +/** + * Create a new runbook for use with incidents. + */ +export type CreateRunbook = { + name: string; + /** + * Deprecated, but still required. Please just use 'incident' + */ + type: CreateRunbookType; + /** + * Deprecated. Use description + */ + summary?: string | null | undefined; + /** + * A longer description about the Runbook. Supports markdown format + */ + description?: string | null | undefined; + /** + * Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. + */ + autoAttachToRestrictedIncidents?: boolean | null | undefined; + /** + * Whether or not this runbook is a tutorial runbook + */ + tutorial?: boolean | null | undefined; + /** + * An object representing a Team that owns the runbook + */ + owner?: CreateRunbookOwner | null | undefined; + attachmentRule?: CreateRunbookAttachmentRule | null | undefined; + steps?: Array | null | undefined; +}; + +/** @internal */ +export const CreateRunbookType$inboundSchema: z.ZodNativeEnum< + typeof CreateRunbookType +> = z.nativeEnum(CreateRunbookType); + +/** @internal */ +export const CreateRunbookType$outboundSchema: z.ZodNativeEnum< + typeof CreateRunbookType +> = CreateRunbookType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRunbookType$ { + /** @deprecated use `CreateRunbookType$inboundSchema` instead. */ + export const inboundSchema = CreateRunbookType$inboundSchema; + /** @deprecated use `CreateRunbookType$outboundSchema` instead. */ + export const outboundSchema = CreateRunbookType$outboundSchema; +} + +/** @internal */ +export const CreateRunbookOwner$inboundSchema: z.ZodType< + CreateRunbookOwner, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CreateRunbookOwner$Outbound = { + id: string; +}; + +/** @internal */ +export const CreateRunbookOwner$outboundSchema: z.ZodType< + CreateRunbookOwner$Outbound, + z.ZodTypeDef, + CreateRunbookOwner +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRunbookOwner$ { + /** @deprecated use `CreateRunbookOwner$inboundSchema` instead. */ + export const inboundSchema = CreateRunbookOwner$inboundSchema; + /** @deprecated use `CreateRunbookOwner$outboundSchema` instead. */ + export const outboundSchema = CreateRunbookOwner$outboundSchema; + /** @deprecated use `CreateRunbookOwner$Outbound` instead. */ + export type Outbound = CreateRunbookOwner$Outbound; +} + +export function createRunbookOwnerToJSON( + createRunbookOwner: CreateRunbookOwner, +): string { + return JSON.stringify( + CreateRunbookOwner$outboundSchema.parse(createRunbookOwner), + ); +} + +export function createRunbookOwnerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRunbookOwner$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRunbookOwner' from JSON`, + ); +} + +/** @internal */ +export const CreateRunbookAttachmentRule$inboundSchema: z.ZodType< + CreateRunbookAttachmentRule, + z.ZodTypeDef, + unknown +> = z.object({ + logic: z.string(), + user_data: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_data": "userData", + }); +}); + +/** @internal */ +export type CreateRunbookAttachmentRule$Outbound = { + logic: string; + user_data?: string | null | undefined; +}; + +/** @internal */ +export const CreateRunbookAttachmentRule$outboundSchema: z.ZodType< + CreateRunbookAttachmentRule$Outbound, + z.ZodTypeDef, + CreateRunbookAttachmentRule +> = z.object({ + logic: z.string(), + userData: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userData: "user_data", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRunbookAttachmentRule$ { + /** @deprecated use `CreateRunbookAttachmentRule$inboundSchema` instead. */ + export const inboundSchema = CreateRunbookAttachmentRule$inboundSchema; + /** @deprecated use `CreateRunbookAttachmentRule$outboundSchema` instead. */ + export const outboundSchema = CreateRunbookAttachmentRule$outboundSchema; + /** @deprecated use `CreateRunbookAttachmentRule$Outbound` instead. */ + export type Outbound = CreateRunbookAttachmentRule$Outbound; +} + +export function createRunbookAttachmentRuleToJSON( + createRunbookAttachmentRule: CreateRunbookAttachmentRule, +): string { + return JSON.stringify( + CreateRunbookAttachmentRule$outboundSchema.parse( + createRunbookAttachmentRule, + ), + ); +} + +export function createRunbookAttachmentRuleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRunbookAttachmentRule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRunbookAttachmentRule' from JSON`, + ); +} + +/** @internal */ +export const CreateRunbookRule$inboundSchema: z.ZodType< + CreateRunbookRule, + z.ZodTypeDef, + unknown +> = z.object({ + logic: z.string(), + user_data: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_data": "userData", + }); +}); + +/** @internal */ +export type CreateRunbookRule$Outbound = { + logic: string; + user_data?: string | null | undefined; +}; + +/** @internal */ +export const CreateRunbookRule$outboundSchema: z.ZodType< + CreateRunbookRule$Outbound, + z.ZodTypeDef, + CreateRunbookRule +> = z.object({ + logic: z.string(), + userData: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userData: "user_data", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRunbookRule$ { + /** @deprecated use `CreateRunbookRule$inboundSchema` instead. */ + export const inboundSchema = CreateRunbookRule$inboundSchema; + /** @deprecated use `CreateRunbookRule$outboundSchema` instead. */ + export const outboundSchema = CreateRunbookRule$outboundSchema; + /** @deprecated use `CreateRunbookRule$Outbound` instead. */ + export type Outbound = CreateRunbookRule$Outbound; +} + +export function createRunbookRuleToJSON( + createRunbookRule: CreateRunbookRule, +): string { + return JSON.stringify( + CreateRunbookRule$outboundSchema.parse(createRunbookRule), + ); +} + +export function createRunbookRuleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRunbookRule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRunbookRule' from JSON`, + ); +} + +/** @internal */ +export const CreateRunbookStep$inboundSchema: z.ZodType< + CreateRunbookStep, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + action_id: z.string(), + rule: z.nullable(z.lazy(() => CreateRunbookRule$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "action_id": "actionId", + }); +}); + +/** @internal */ +export type CreateRunbookStep$Outbound = { + name: string; + action_id: string; + rule?: CreateRunbookRule$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateRunbookStep$outboundSchema: z.ZodType< + CreateRunbookStep$Outbound, + z.ZodTypeDef, + CreateRunbookStep +> = z.object({ + name: z.string(), + actionId: z.string(), + rule: z.nullable(z.lazy(() => CreateRunbookRule$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + actionId: "action_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRunbookStep$ { + /** @deprecated use `CreateRunbookStep$inboundSchema` instead. */ + export const inboundSchema = CreateRunbookStep$inboundSchema; + /** @deprecated use `CreateRunbookStep$outboundSchema` instead. */ + export const outboundSchema = CreateRunbookStep$outboundSchema; + /** @deprecated use `CreateRunbookStep$Outbound` instead. */ + export type Outbound = CreateRunbookStep$Outbound; +} + +export function createRunbookStepToJSON( + createRunbookStep: CreateRunbookStep, +): string { + return JSON.stringify( + CreateRunbookStep$outboundSchema.parse(createRunbookStep), + ); +} + +export function createRunbookStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRunbookStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRunbookStep' from JSON`, + ); +} + +/** @internal */ +export const CreateRunbook$inboundSchema: z.ZodType< + CreateRunbook, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + type: CreateRunbookType$inboundSchema, + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + auto_attach_to_restricted_incidents: z.nullable(z.boolean()).optional(), + tutorial: z.nullable(z.boolean()).optional(), + owner: z.nullable(z.lazy(() => CreateRunbookOwner$inboundSchema)).optional(), + attachment_rule: z.nullable( + z.lazy(() => CreateRunbookAttachmentRule$inboundSchema), + ).optional(), + steps: z.nullable(z.array(z.lazy(() => CreateRunbookStep$inboundSchema))) + .optional(), +}).transform((v) => { + return remap$(v, { + "auto_attach_to_restricted_incidents": "autoAttachToRestrictedIncidents", + "attachment_rule": "attachmentRule", + }); +}); + +/** @internal */ +export type CreateRunbook$Outbound = { + name: string; + type: string; + summary?: string | null | undefined; + description?: string | null | undefined; + auto_attach_to_restricted_incidents?: boolean | null | undefined; + tutorial?: boolean | null | undefined; + owner?: CreateRunbookOwner$Outbound | null | undefined; + attachment_rule?: CreateRunbookAttachmentRule$Outbound | null | undefined; + steps?: Array | null | undefined; +}; + +/** @internal */ +export const CreateRunbook$outboundSchema: z.ZodType< + CreateRunbook$Outbound, + z.ZodTypeDef, + CreateRunbook +> = z.object({ + name: z.string(), + type: CreateRunbookType$outboundSchema, + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + autoAttachToRestrictedIncidents: z.nullable(z.boolean()).optional(), + tutorial: z.nullable(z.boolean()).optional(), + owner: z.nullable(z.lazy(() => CreateRunbookOwner$outboundSchema)).optional(), + attachmentRule: z.nullable( + z.lazy(() => CreateRunbookAttachmentRule$outboundSchema), + ).optional(), + steps: z.nullable(z.array(z.lazy(() => CreateRunbookStep$outboundSchema))) + .optional(), +}).transform((v) => { + return remap$(v, { + autoAttachToRestrictedIncidents: "auto_attach_to_restricted_incidents", + attachmentRule: "attachment_rule", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRunbook$ { + /** @deprecated use `CreateRunbook$inboundSchema` instead. */ + export const inboundSchema = CreateRunbook$inboundSchema; + /** @deprecated use `CreateRunbook$outboundSchema` instead. */ + export const outboundSchema = CreateRunbook$outboundSchema; + /** @deprecated use `CreateRunbook$Outbound` instead. */ + export type Outbound = CreateRunbook$Outbound; +} + +export function createRunbookToJSON(createRunbook: CreateRunbook): string { + return JSON.stringify(CreateRunbook$outboundSchema.parse(createRunbook)); +} + +export function createRunbookFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRunbook$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRunbook' from JSON`, + ); +} diff --git a/src/models/components/createrunbookexecution.ts b/src/models/components/createrunbookexecution.ts new file mode 100644 index 00000000..70dfb169 --- /dev/null +++ b/src/models/components/createrunbookexecution.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Attaches a runbook to an incident and executes it + */ +export type CreateRunbookExecution = { + /** + * The incident to attach the runbook to. Format must be: `incident/${incidentId}` + */ + executeFor: string; + /** + * ID of runbook to attach + */ + runbookId: string; +}; + +/** @internal */ +export const CreateRunbookExecution$inboundSchema: z.ZodType< + CreateRunbookExecution, + z.ZodTypeDef, + unknown +> = z.object({ + execute_for: z.string(), + runbook_id: z.string(), +}).transform((v) => { + return remap$(v, { + "execute_for": "executeFor", + "runbook_id": "runbookId", + }); +}); + +/** @internal */ +export type CreateRunbookExecution$Outbound = { + execute_for: string; + runbook_id: string; +}; + +/** @internal */ +export const CreateRunbookExecution$outboundSchema: z.ZodType< + CreateRunbookExecution$Outbound, + z.ZodTypeDef, + CreateRunbookExecution +> = z.object({ + executeFor: z.string(), + runbookId: z.string(), +}).transform((v) => { + return remap$(v, { + executeFor: "execute_for", + runbookId: "runbook_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRunbookExecution$ { + /** @deprecated use `CreateRunbookExecution$inboundSchema` instead. */ + export const inboundSchema = CreateRunbookExecution$inboundSchema; + /** @deprecated use `CreateRunbookExecution$outboundSchema` instead. */ + export const outboundSchema = CreateRunbookExecution$outboundSchema; + /** @deprecated use `CreateRunbookExecution$Outbound` instead. */ + export type Outbound = CreateRunbookExecution$Outbound; +} + +export function createRunbookExecutionToJSON( + createRunbookExecution: CreateRunbookExecution, +): string { + return JSON.stringify( + CreateRunbookExecution$outboundSchema.parse(createRunbookExecution), + ); +} + +export function createRunbookExecutionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateRunbookExecution$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRunbookExecution' from JSON`, + ); +} diff --git a/src/models/components/createsavedsearch.ts b/src/models/components/createsavedsearch.ts new file mode 100644 index 00000000..f7eee58f --- /dev/null +++ b/src/models/components/createsavedsearch.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new saved search for a particular resource type + */ +export type CreateSavedSearch = { + name: string; + isPrivate?: boolean | null | undefined; + filterValues: { [k: string]: any }; +}; + +/** @internal */ +export const CreateSavedSearch$inboundSchema: z.ZodType< + CreateSavedSearch, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + is_private: z.nullable(z.boolean()).optional(), + filter_values: z.record(z.any()), +}).transform((v) => { + return remap$(v, { + "is_private": "isPrivate", + "filter_values": "filterValues", + }); +}); + +/** @internal */ +export type CreateSavedSearch$Outbound = { + name: string; + is_private?: boolean | null | undefined; + filter_values: { [k: string]: any }; +}; + +/** @internal */ +export const CreateSavedSearch$outboundSchema: z.ZodType< + CreateSavedSearch$Outbound, + z.ZodTypeDef, + CreateSavedSearch +> = z.object({ + name: z.string(), + isPrivate: z.nullable(z.boolean()).optional(), + filterValues: z.record(z.any()), +}).transform((v) => { + return remap$(v, { + isPrivate: "is_private", + filterValues: "filter_values", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSavedSearch$ { + /** @deprecated use `CreateSavedSearch$inboundSchema` instead. */ + export const inboundSchema = CreateSavedSearch$inboundSchema; + /** @deprecated use `CreateSavedSearch$outboundSchema` instead. */ + export const outboundSchema = CreateSavedSearch$outboundSchema; + /** @deprecated use `CreateSavedSearch$Outbound` instead. */ + export type Outbound = CreateSavedSearch$Outbound; +} + +export function createSavedSearchToJSON( + createSavedSearch: CreateSavedSearch, +): string { + return JSON.stringify( + CreateSavedSearch$outboundSchema.parse(createSavedSearch), + ); +} + +export function createSavedSearchFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSavedSearch$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSavedSearch' from JSON`, + ); +} diff --git a/src/models/components/createscheduledmaintenance.ts b/src/models/components/createscheduledmaintenance.ts new file mode 100644 index 00000000..547bac5e --- /dev/null +++ b/src/models/components/createscheduledmaintenance.ts @@ -0,0 +1,304 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateScheduledMaintenanceStatusPage = { + /** + * The slug identifying the type of status page + */ + integrationSlug?: string | null | undefined; + /** + * The UUID of the status page to display this maintenance on + */ + connectionId: string; +}; + +export type CreateScheduledMaintenanceImpact = { + /** + * The type of impact + */ + type: string; + /** + * The id of impact + */ + id: string; + /** + * The id of the condition + */ + conditionId: string; +}; + +/** + * Create a new scheduled maintenance event + */ +export type CreateScheduledMaintenance = { + name: string; + /** + * ISO8601 timestamp for the start time of the scheduled maintenance + */ + startsAt: Date; + /** + * ISO8601 timestamp for the end time of the scheduled maintenance + */ + endsAt: Date; + summary?: string | null | undefined; + description?: string | null | undefined; + /** + * A json object of label keys and values + */ + labels?: { [k: string]: string } | null | undefined; + /** + * An array of status pages to display this maintenance on + */ + statusPages?: Array | null | undefined; + /** + * An array of impact/condition combinations + */ + impacts?: Array | null | undefined; +}; + +/** @internal */ +export const CreateScheduledMaintenanceStatusPage$inboundSchema: z.ZodType< + CreateScheduledMaintenanceStatusPage, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: z.nullable(z.string()).optional(), + connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type CreateScheduledMaintenanceStatusPage$Outbound = { + integration_slug?: string | null | undefined; + connection_id: string; +}; + +/** @internal */ +export const CreateScheduledMaintenanceStatusPage$outboundSchema: z.ZodType< + CreateScheduledMaintenanceStatusPage$Outbound, + z.ZodTypeDef, + CreateScheduledMaintenanceStatusPage +> = z.object({ + integrationSlug: z.nullable(z.string()).optional(), + connectionId: z.string(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScheduledMaintenanceStatusPage$ { + /** @deprecated use `CreateScheduledMaintenanceStatusPage$inboundSchema` instead. */ + export const inboundSchema = + CreateScheduledMaintenanceStatusPage$inboundSchema; + /** @deprecated use `CreateScheduledMaintenanceStatusPage$outboundSchema` instead. */ + export const outboundSchema = + CreateScheduledMaintenanceStatusPage$outboundSchema; + /** @deprecated use `CreateScheduledMaintenanceStatusPage$Outbound` instead. */ + export type Outbound = CreateScheduledMaintenanceStatusPage$Outbound; +} + +export function createScheduledMaintenanceStatusPageToJSON( + createScheduledMaintenanceStatusPage: CreateScheduledMaintenanceStatusPage, +): string { + return JSON.stringify( + CreateScheduledMaintenanceStatusPage$outboundSchema.parse( + createScheduledMaintenanceStatusPage, + ), + ); +} + +export function createScheduledMaintenanceStatusPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateScheduledMaintenanceStatusPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScheduledMaintenanceStatusPage' from JSON`, + ); +} + +/** @internal */ +export const CreateScheduledMaintenanceImpact$inboundSchema: z.ZodType< + CreateScheduledMaintenanceImpact, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type CreateScheduledMaintenanceImpact$Outbound = { + type: string; + id: string; + condition_id: string; +}; + +/** @internal */ +export const CreateScheduledMaintenanceImpact$outboundSchema: z.ZodType< + CreateScheduledMaintenanceImpact$Outbound, + z.ZodTypeDef, + CreateScheduledMaintenanceImpact +> = z.object({ + type: z.string(), + id: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScheduledMaintenanceImpact$ { + /** @deprecated use `CreateScheduledMaintenanceImpact$inboundSchema` instead. */ + export const inboundSchema = CreateScheduledMaintenanceImpact$inboundSchema; + /** @deprecated use `CreateScheduledMaintenanceImpact$outboundSchema` instead. */ + export const outboundSchema = CreateScheduledMaintenanceImpact$outboundSchema; + /** @deprecated use `CreateScheduledMaintenanceImpact$Outbound` instead. */ + export type Outbound = CreateScheduledMaintenanceImpact$Outbound; +} + +export function createScheduledMaintenanceImpactToJSON( + createScheduledMaintenanceImpact: CreateScheduledMaintenanceImpact, +): string { + return JSON.stringify( + CreateScheduledMaintenanceImpact$outboundSchema.parse( + createScheduledMaintenanceImpact, + ), + ); +} + +export function createScheduledMaintenanceImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScheduledMaintenanceImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScheduledMaintenanceImpact' from JSON`, + ); +} + +/** @internal */ +export const CreateScheduledMaintenance$inboundSchema: z.ZodType< + CreateScheduledMaintenance, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + status_pages: z.nullable( + z.array(z.lazy(() => CreateScheduledMaintenanceStatusPage$inboundSchema)), + ).optional(), + impacts: z.nullable( + z.array(z.lazy(() => CreateScheduledMaintenanceImpact$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "starts_at": "startsAt", + "ends_at": "endsAt", + "status_pages": "statusPages", + }); +}); + +/** @internal */ +export type CreateScheduledMaintenance$Outbound = { + name: string; + starts_at: string; + ends_at: string; + summary?: string | null | undefined; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + status_pages?: + | Array + | null + | undefined; + impacts?: Array | null | undefined; +}; + +/** @internal */ +export const CreateScheduledMaintenance$outboundSchema: z.ZodType< + CreateScheduledMaintenance$Outbound, + z.ZodTypeDef, + CreateScheduledMaintenance +> = z.object({ + name: z.string(), + startsAt: z.date().transform(v => v.toISOString()), + endsAt: z.date().transform(v => v.toISOString()), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + statusPages: z.nullable( + z.array(z.lazy(() => CreateScheduledMaintenanceStatusPage$outboundSchema)), + ).optional(), + impacts: z.nullable( + z.array(z.lazy(() => CreateScheduledMaintenanceImpact$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + startsAt: "starts_at", + endsAt: "ends_at", + statusPages: "status_pages", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScheduledMaintenance$ { + /** @deprecated use `CreateScheduledMaintenance$inboundSchema` instead. */ + export const inboundSchema = CreateScheduledMaintenance$inboundSchema; + /** @deprecated use `CreateScheduledMaintenance$outboundSchema` instead. */ + export const outboundSchema = CreateScheduledMaintenance$outboundSchema; + /** @deprecated use `CreateScheduledMaintenance$Outbound` instead. */ + export type Outbound = CreateScheduledMaintenance$Outbound; +} + +export function createScheduledMaintenanceToJSON( + createScheduledMaintenance: CreateScheduledMaintenance, +): string { + return JSON.stringify( + CreateScheduledMaintenance$outboundSchema.parse(createScheduledMaintenance), + ); +} + +export function createScheduledMaintenanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScheduledMaintenance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScheduledMaintenance' from JSON`, + ); +} diff --git a/src/models/components/createscimgroup.ts b/src/models/components/createscimgroup.ts new file mode 100644 index 00000000..20be693b --- /dev/null +++ b/src/models/components/createscimgroup.ts @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateScimGroupMember = { + /** + * String that represents the user's UUID to assign to the team + */ + value: string; +}; + +/** + * SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. + */ +export type CreateScimGroup = { + /** + * The name of the team being created + */ + displayName: string; + members: Array; +}; + +/** @internal */ +export const CreateScimGroupMember$inboundSchema: z.ZodType< + CreateScimGroupMember, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string(), +}); + +/** @internal */ +export type CreateScimGroupMember$Outbound = { + value: string; +}; + +/** @internal */ +export const CreateScimGroupMember$outboundSchema: z.ZodType< + CreateScimGroupMember$Outbound, + z.ZodTypeDef, + CreateScimGroupMember +> = z.object({ + value: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScimGroupMember$ { + /** @deprecated use `CreateScimGroupMember$inboundSchema` instead. */ + export const inboundSchema = CreateScimGroupMember$inboundSchema; + /** @deprecated use `CreateScimGroupMember$outboundSchema` instead. */ + export const outboundSchema = CreateScimGroupMember$outboundSchema; + /** @deprecated use `CreateScimGroupMember$Outbound` instead. */ + export type Outbound = CreateScimGroupMember$Outbound; +} + +export function createScimGroupMemberToJSON( + createScimGroupMember: CreateScimGroupMember, +): string { + return JSON.stringify( + CreateScimGroupMember$outboundSchema.parse(createScimGroupMember), + ); +} + +export function createScimGroupMemberFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScimGroupMember$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScimGroupMember' from JSON`, + ); +} + +/** @internal */ +export const CreateScimGroup$inboundSchema: z.ZodType< + CreateScimGroup, + z.ZodTypeDef, + unknown +> = z.object({ + displayName: z.string(), + members: z.array(z.lazy(() => CreateScimGroupMember$inboundSchema)), +}); + +/** @internal */ +export type CreateScimGroup$Outbound = { + displayName: string; + members: Array; +}; + +/** @internal */ +export const CreateScimGroup$outboundSchema: z.ZodType< + CreateScimGroup$Outbound, + z.ZodTypeDef, + CreateScimGroup +> = z.object({ + displayName: z.string(), + members: z.array(z.lazy(() => CreateScimGroupMember$outboundSchema)), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScimGroup$ { + /** @deprecated use `CreateScimGroup$inboundSchema` instead. */ + export const inboundSchema = CreateScimGroup$inboundSchema; + /** @deprecated use `CreateScimGroup$outboundSchema` instead. */ + export const outboundSchema = CreateScimGroup$outboundSchema; + /** @deprecated use `CreateScimGroup$Outbound` instead. */ + export type Outbound = CreateScimGroup$Outbound; +} + +export function createScimGroupToJSON( + createScimGroup: CreateScimGroup, +): string { + return JSON.stringify(CreateScimGroup$outboundSchema.parse(createScimGroup)); +} + +export function createScimGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScimGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScimGroup' from JSON`, + ); +} diff --git a/src/models/components/createscimuser.ts b/src/models/components/createscimuser.ts new file mode 100644 index 00000000..6324503f --- /dev/null +++ b/src/models/components/createscimuser.ts @@ -0,0 +1,289 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The components of the user's name + */ +export type CreateScimUserName = { + /** + * The family name of the User, or last name in most Western languages + */ + familyName: string; + /** + * The given name of the User, or first name in most Western languages + */ + givenName: string; +}; + +export type CreateScimUserEmail = { + /** + * String that represents an email address for the User + */ + value: string; + /** + * Boolean which signifies if an email is intended as the primary email for the User + */ + primary: boolean; +}; + +/** + * Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. + */ +export type CreateScimUserRoles = {}; + +/** + * SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. + */ +export type CreateScimUser = { + /** + * A service provider's unique identifier for the user + */ + userName: string; + /** + * The components of the user's name + */ + name: CreateScimUserName; + /** + * Email addresses for the User + */ + emails: Array; + /** + * Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. + */ + roles?: CreateScimUserRoles | null | undefined; + /** + * This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password + */ + password?: string | null | undefined; +}; + +/** @internal */ +export const CreateScimUserName$inboundSchema: z.ZodType< + CreateScimUserName, + z.ZodTypeDef, + unknown +> = z.object({ + familyName: z.string(), + givenName: z.string(), +}); + +/** @internal */ +export type CreateScimUserName$Outbound = { + familyName: string; + givenName: string; +}; + +/** @internal */ +export const CreateScimUserName$outboundSchema: z.ZodType< + CreateScimUserName$Outbound, + z.ZodTypeDef, + CreateScimUserName +> = z.object({ + familyName: z.string(), + givenName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScimUserName$ { + /** @deprecated use `CreateScimUserName$inboundSchema` instead. */ + export const inboundSchema = CreateScimUserName$inboundSchema; + /** @deprecated use `CreateScimUserName$outboundSchema` instead. */ + export const outboundSchema = CreateScimUserName$outboundSchema; + /** @deprecated use `CreateScimUserName$Outbound` instead. */ + export type Outbound = CreateScimUserName$Outbound; +} + +export function createScimUserNameToJSON( + createScimUserName: CreateScimUserName, +): string { + return JSON.stringify( + CreateScimUserName$outboundSchema.parse(createScimUserName), + ); +} + +export function createScimUserNameFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScimUserName$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScimUserName' from JSON`, + ); +} + +/** @internal */ +export const CreateScimUserEmail$inboundSchema: z.ZodType< + CreateScimUserEmail, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string(), + primary: z.boolean(), +}); + +/** @internal */ +export type CreateScimUserEmail$Outbound = { + value: string; + primary: boolean; +}; + +/** @internal */ +export const CreateScimUserEmail$outboundSchema: z.ZodType< + CreateScimUserEmail$Outbound, + z.ZodTypeDef, + CreateScimUserEmail +> = z.object({ + value: z.string(), + primary: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScimUserEmail$ { + /** @deprecated use `CreateScimUserEmail$inboundSchema` instead. */ + export const inboundSchema = CreateScimUserEmail$inboundSchema; + /** @deprecated use `CreateScimUserEmail$outboundSchema` instead. */ + export const outboundSchema = CreateScimUserEmail$outboundSchema; + /** @deprecated use `CreateScimUserEmail$Outbound` instead. */ + export type Outbound = CreateScimUserEmail$Outbound; +} + +export function createScimUserEmailToJSON( + createScimUserEmail: CreateScimUserEmail, +): string { + return JSON.stringify( + CreateScimUserEmail$outboundSchema.parse(createScimUserEmail), + ); +} + +export function createScimUserEmailFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScimUserEmail$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScimUserEmail' from JSON`, + ); +} + +/** @internal */ +export const CreateScimUserRoles$inboundSchema: z.ZodType< + CreateScimUserRoles, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type CreateScimUserRoles$Outbound = {}; + +/** @internal */ +export const CreateScimUserRoles$outboundSchema: z.ZodType< + CreateScimUserRoles$Outbound, + z.ZodTypeDef, + CreateScimUserRoles +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScimUserRoles$ { + /** @deprecated use `CreateScimUserRoles$inboundSchema` instead. */ + export const inboundSchema = CreateScimUserRoles$inboundSchema; + /** @deprecated use `CreateScimUserRoles$outboundSchema` instead. */ + export const outboundSchema = CreateScimUserRoles$outboundSchema; + /** @deprecated use `CreateScimUserRoles$Outbound` instead. */ + export type Outbound = CreateScimUserRoles$Outbound; +} + +export function createScimUserRolesToJSON( + createScimUserRoles: CreateScimUserRoles, +): string { + return JSON.stringify( + CreateScimUserRoles$outboundSchema.parse(createScimUserRoles), + ); +} + +export function createScimUserRolesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScimUserRoles$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScimUserRoles' from JSON`, + ); +} + +/** @internal */ +export const CreateScimUser$inboundSchema: z.ZodType< + CreateScimUser, + z.ZodTypeDef, + unknown +> = z.object({ + userName: z.string(), + name: z.lazy(() => CreateScimUserName$inboundSchema), + emails: z.array(z.lazy(() => CreateScimUserEmail$inboundSchema)), + roles: z.nullable(z.lazy(() => CreateScimUserRoles$inboundSchema)).optional(), + password: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CreateScimUser$Outbound = { + userName: string; + name: CreateScimUserName$Outbound; + emails: Array; + roles?: CreateScimUserRoles$Outbound | null | undefined; + password?: string | null | undefined; +}; + +/** @internal */ +export const CreateScimUser$outboundSchema: z.ZodType< + CreateScimUser$Outbound, + z.ZodTypeDef, + CreateScimUser +> = z.object({ + userName: z.string(), + name: z.lazy(() => CreateScimUserName$outboundSchema), + emails: z.array(z.lazy(() => CreateScimUserEmail$outboundSchema)), + roles: z.nullable(z.lazy(() => CreateScimUserRoles$outboundSchema)) + .optional(), + password: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateScimUser$ { + /** @deprecated use `CreateScimUser$inboundSchema` instead. */ + export const inboundSchema = CreateScimUser$inboundSchema; + /** @deprecated use `CreateScimUser$outboundSchema` instead. */ + export const outboundSchema = CreateScimUser$outboundSchema; + /** @deprecated use `CreateScimUser$Outbound` instead. */ + export type Outbound = CreateScimUser$Outbound; +} + +export function createScimUserToJSON(createScimUser: CreateScimUser): string { + return JSON.stringify(CreateScimUser$outboundSchema.parse(createScimUser)); +} + +export function createScimUserFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateScimUser$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateScimUser' from JSON`, + ); +} diff --git a/src/models/components/createservice.ts b/src/models/components/createservice.ts new file mode 100644 index 00000000..684fa1b7 --- /dev/null +++ b/src/models/components/createservice.ts @@ -0,0 +1,548 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. + */ +export const CreateServiceServiceTier = { + Zero: 0, + One: 1, + Two: 2, + Three: 3, + Four: 4, + Five: 5, +} as const; +/** + * Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. + */ +export type CreateServiceServiceTier = ClosedEnum< + typeof CreateServiceServiceTier +>; + +export type CreateServiceFunctionality = { + /** + * If you are trying to create a new functionality and attach it to this service, set the summary key + */ + summary?: string | null | undefined; + /** + * If you are trying to reuse a functionality, you may set the ID to attach it to the service + */ + id?: string | null | undefined; +}; + +export type CreateServiceLink = { + /** + * Short name used to display and identify this link + */ + name: string; + /** + * URL + */ + hrefUrl: string; + /** + * An optional URL to an icon representing this link + */ + iconUrl?: string | null | undefined; +}; + +/** + * An object representing a Team that owns the service + */ +export type CreateServiceOwner = { + id: string; +}; + +export type CreateServiceTeam = { + id: string; +}; + +export type CreateServiceExternalResource = { + remoteId: string; + /** + * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. + */ + connectionType?: string | null | undefined; +}; + +/** + * Creates a service for the organization, you may also create or attach functionalities to the service on create. + */ +export type CreateService = { + name: string; + description?: string | null | undefined; + /** + * A hash of label keys and values + */ + labels?: { [k: string]: string } | null | undefined; + /** + * Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. + */ + serviceTier?: CreateServiceServiceTier | null | undefined; + /** + * An array of functionalities + */ + functionalities?: Array | null | undefined; + /** + * An array of links to associate with this service + */ + links?: Array | null | undefined; + /** + * An object representing a Team that owns the service + */ + owner?: CreateServiceOwner | null | undefined; + /** + * An array of teams to attach to this service. + */ + teams?: Array | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + /** + * An array of external resources to attach to this service. + */ + externalResources?: Array | null | undefined; +}; + +/** @internal */ +export const CreateServiceServiceTier$inboundSchema: z.ZodNativeEnum< + typeof CreateServiceServiceTier +> = z.nativeEnum(CreateServiceServiceTier); + +/** @internal */ +export const CreateServiceServiceTier$outboundSchema: z.ZodNativeEnum< + typeof CreateServiceServiceTier +> = CreateServiceServiceTier$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceServiceTier$ { + /** @deprecated use `CreateServiceServiceTier$inboundSchema` instead. */ + export const inboundSchema = CreateServiceServiceTier$inboundSchema; + /** @deprecated use `CreateServiceServiceTier$outboundSchema` instead. */ + export const outboundSchema = CreateServiceServiceTier$outboundSchema; +} + +/** @internal */ +export const CreateServiceFunctionality$inboundSchema: z.ZodType< + CreateServiceFunctionality, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CreateServiceFunctionality$Outbound = { + summary?: string | null | undefined; + id?: string | null | undefined; +}; + +/** @internal */ +export const CreateServiceFunctionality$outboundSchema: z.ZodType< + CreateServiceFunctionality$Outbound, + z.ZodTypeDef, + CreateServiceFunctionality +> = z.object({ + summary: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceFunctionality$ { + /** @deprecated use `CreateServiceFunctionality$inboundSchema` instead. */ + export const inboundSchema = CreateServiceFunctionality$inboundSchema; + /** @deprecated use `CreateServiceFunctionality$outboundSchema` instead. */ + export const outboundSchema = CreateServiceFunctionality$outboundSchema; + /** @deprecated use `CreateServiceFunctionality$Outbound` instead. */ + export type Outbound = CreateServiceFunctionality$Outbound; +} + +export function createServiceFunctionalityToJSON( + createServiceFunctionality: CreateServiceFunctionality, +): string { + return JSON.stringify( + CreateServiceFunctionality$outboundSchema.parse(createServiceFunctionality), + ); +} + +export function createServiceFunctionalityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceFunctionality$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceFunctionality' from JSON`, + ); +} + +/** @internal */ +export const CreateServiceLink$inboundSchema: z.ZodType< + CreateServiceLink, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + href_url: z.string(), + icon_url: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "href_url": "hrefUrl", + "icon_url": "iconUrl", + }); +}); + +/** @internal */ +export type CreateServiceLink$Outbound = { + name: string; + href_url: string; + icon_url?: string | null | undefined; +}; + +/** @internal */ +export const CreateServiceLink$outboundSchema: z.ZodType< + CreateServiceLink$Outbound, + z.ZodTypeDef, + CreateServiceLink +> = z.object({ + name: z.string(), + hrefUrl: z.string(), + iconUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + hrefUrl: "href_url", + iconUrl: "icon_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceLink$ { + /** @deprecated use `CreateServiceLink$inboundSchema` instead. */ + export const inboundSchema = CreateServiceLink$inboundSchema; + /** @deprecated use `CreateServiceLink$outboundSchema` instead. */ + export const outboundSchema = CreateServiceLink$outboundSchema; + /** @deprecated use `CreateServiceLink$Outbound` instead. */ + export type Outbound = CreateServiceLink$Outbound; +} + +export function createServiceLinkToJSON( + createServiceLink: CreateServiceLink, +): string { + return JSON.stringify( + CreateServiceLink$outboundSchema.parse(createServiceLink), + ); +} + +export function createServiceLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceLink' from JSON`, + ); +} + +/** @internal */ +export const CreateServiceOwner$inboundSchema: z.ZodType< + CreateServiceOwner, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CreateServiceOwner$Outbound = { + id: string; +}; + +/** @internal */ +export const CreateServiceOwner$outboundSchema: z.ZodType< + CreateServiceOwner$Outbound, + z.ZodTypeDef, + CreateServiceOwner +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceOwner$ { + /** @deprecated use `CreateServiceOwner$inboundSchema` instead. */ + export const inboundSchema = CreateServiceOwner$inboundSchema; + /** @deprecated use `CreateServiceOwner$outboundSchema` instead. */ + export const outboundSchema = CreateServiceOwner$outboundSchema; + /** @deprecated use `CreateServiceOwner$Outbound` instead. */ + export type Outbound = CreateServiceOwner$Outbound; +} + +export function createServiceOwnerToJSON( + createServiceOwner: CreateServiceOwner, +): string { + return JSON.stringify( + CreateServiceOwner$outboundSchema.parse(createServiceOwner), + ); +} + +export function createServiceOwnerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceOwner$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceOwner' from JSON`, + ); +} + +/** @internal */ +export const CreateServiceTeam$inboundSchema: z.ZodType< + CreateServiceTeam, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type CreateServiceTeam$Outbound = { + id: string; +}; + +/** @internal */ +export const CreateServiceTeam$outboundSchema: z.ZodType< + CreateServiceTeam$Outbound, + z.ZodTypeDef, + CreateServiceTeam +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceTeam$ { + /** @deprecated use `CreateServiceTeam$inboundSchema` instead. */ + export const inboundSchema = CreateServiceTeam$inboundSchema; + /** @deprecated use `CreateServiceTeam$outboundSchema` instead. */ + export const outboundSchema = CreateServiceTeam$outboundSchema; + /** @deprecated use `CreateServiceTeam$Outbound` instead. */ + export type Outbound = CreateServiceTeam$Outbound; +} + +export function createServiceTeamToJSON( + createServiceTeam: CreateServiceTeam, +): string { + return JSON.stringify( + CreateServiceTeam$outboundSchema.parse(createServiceTeam), + ); +} + +export function createServiceTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceTeam' from JSON`, + ); +} + +/** @internal */ +export const CreateServiceExternalResource$inboundSchema: z.ZodType< + CreateServiceExternalResource, + z.ZodTypeDef, + unknown +> = z.object({ + remote_id: z.string(), + connection_type: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "remote_id": "remoteId", + "connection_type": "connectionType", + }); +}); + +/** @internal */ +export type CreateServiceExternalResource$Outbound = { + remote_id: string; + connection_type?: string | null | undefined; +}; + +/** @internal */ +export const CreateServiceExternalResource$outboundSchema: z.ZodType< + CreateServiceExternalResource$Outbound, + z.ZodTypeDef, + CreateServiceExternalResource +> = z.object({ + remoteId: z.string(), + connectionType: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + remoteId: "remote_id", + connectionType: "connection_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceExternalResource$ { + /** @deprecated use `CreateServiceExternalResource$inboundSchema` instead. */ + export const inboundSchema = CreateServiceExternalResource$inboundSchema; + /** @deprecated use `CreateServiceExternalResource$outboundSchema` instead. */ + export const outboundSchema = CreateServiceExternalResource$outboundSchema; + /** @deprecated use `CreateServiceExternalResource$Outbound` instead. */ + export type Outbound = CreateServiceExternalResource$Outbound; +} + +export function createServiceExternalResourceToJSON( + createServiceExternalResource: CreateServiceExternalResource, +): string { + return JSON.stringify( + CreateServiceExternalResource$outboundSchema.parse( + createServiceExternalResource, + ), + ); +} + +export function createServiceExternalResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceExternalResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceExternalResource' from JSON`, + ); +} + +/** @internal */ +export const CreateService$inboundSchema: z.ZodType< + CreateService, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + service_tier: z.nullable(CreateServiceServiceTier$inboundSchema).optional(), + functionalities: z.nullable( + z.array(z.lazy(() => CreateServiceFunctionality$inboundSchema)), + ).optional(), + links: z.nullable(z.array(z.lazy(() => CreateServiceLink$inboundSchema))) + .optional(), + owner: z.nullable(z.lazy(() => CreateServiceOwner$inboundSchema)).optional(), + teams: z.nullable(z.array(z.lazy(() => CreateServiceTeam$inboundSchema))) + .optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + external_resources: z.nullable( + z.array(z.lazy(() => CreateServiceExternalResource$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "service_tier": "serviceTier", + "alert_on_add": "alertOnAdd", + "auto_add_responding_team": "autoAddRespondingTeam", + "external_resources": "externalResources", + }); +}); + +/** @internal */ +export type CreateService$Outbound = { + name: string; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + service_tier?: number | null | undefined; + functionalities?: + | Array + | null + | undefined; + links?: Array | null | undefined; + owner?: CreateServiceOwner$Outbound | null | undefined; + teams?: Array | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + external_resources?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const CreateService$outboundSchema: z.ZodType< + CreateService$Outbound, + z.ZodTypeDef, + CreateService +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + serviceTier: z.nullable(CreateServiceServiceTier$outboundSchema).optional(), + functionalities: z.nullable( + z.array(z.lazy(() => CreateServiceFunctionality$outboundSchema)), + ).optional(), + links: z.nullable(z.array(z.lazy(() => CreateServiceLink$outboundSchema))) + .optional(), + owner: z.nullable(z.lazy(() => CreateServiceOwner$outboundSchema)).optional(), + teams: z.nullable(z.array(z.lazy(() => CreateServiceTeam$outboundSchema))) + .optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + externalResources: z.nullable( + z.array(z.lazy(() => CreateServiceExternalResource$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + serviceTier: "service_tier", + alertOnAdd: "alert_on_add", + autoAddRespondingTeam: "auto_add_responding_team", + externalResources: "external_resources", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateService$ { + /** @deprecated use `CreateService$inboundSchema` instead. */ + export const inboundSchema = CreateService$inboundSchema; + /** @deprecated use `CreateService$outboundSchema` instead. */ + export const outboundSchema = CreateService$outboundSchema; + /** @deprecated use `CreateService$Outbound` instead. */ + export type Outbound = CreateService$Outbound; +} + +export function createServiceToJSON(createService: CreateService): string { + return JSON.stringify(CreateService$outboundSchema.parse(createService)); +} + +export function createServiceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateService$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateService' from JSON`, + ); +} diff --git a/src/models/components/createservicechecklistresponse.ts b/src/models/components/createservicechecklistresponse.ts new file mode 100644 index 00000000..41a9521f --- /dev/null +++ b/src/models/components/createservicechecklistresponse.ts @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Creates a response for a checklist item + */ +export type CreateServiceChecklistResponse = { + checkId: string; + /** + * Status of the check. 'true' if it's complete, 'false' if incomplete, or blank if not yet interacted with + */ + status: boolean; +}; + +/** @internal */ +export const CreateServiceChecklistResponse$inboundSchema: z.ZodType< + CreateServiceChecklistResponse, + z.ZodTypeDef, + unknown +> = z.object({ + check_id: z.string(), + status: z.boolean(), +}).transform((v) => { + return remap$(v, { + "check_id": "checkId", + }); +}); + +/** @internal */ +export type CreateServiceChecklistResponse$Outbound = { + check_id: string; + status: boolean; +}; + +/** @internal */ +export const CreateServiceChecklistResponse$outboundSchema: z.ZodType< + CreateServiceChecklistResponse$Outbound, + z.ZodTypeDef, + CreateServiceChecklistResponse +> = z.object({ + checkId: z.string(), + status: z.boolean(), +}).transform((v) => { + return remap$(v, { + checkId: "check_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceChecklistResponse$ { + /** @deprecated use `CreateServiceChecklistResponse$inboundSchema` instead. */ + export const inboundSchema = CreateServiceChecklistResponse$inboundSchema; + /** @deprecated use `CreateServiceChecklistResponse$outboundSchema` instead. */ + export const outboundSchema = CreateServiceChecklistResponse$outboundSchema; + /** @deprecated use `CreateServiceChecklistResponse$Outbound` instead. */ + export type Outbound = CreateServiceChecklistResponse$Outbound; +} + +export function createServiceChecklistResponseToJSON( + createServiceChecklistResponse: CreateServiceChecklistResponse, +): string { + return JSON.stringify( + CreateServiceChecklistResponse$outboundSchema.parse( + createServiceChecklistResponse, + ), + ); +} + +export function createServiceChecklistResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceChecklistResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceChecklistResponse' from JSON`, + ); +} diff --git a/src/models/components/createservicedependency.ts b/src/models/components/createservicedependency.ts new file mode 100644 index 00000000..d4e3f7dd --- /dev/null +++ b/src/models/components/createservicedependency.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Creates a service dependency relationship between two services + */ +export type CreateServiceDependency = { + serviceId: string; + connectedServiceId: string; + /** + * A note to describe the service dependency relationship + */ + notes?: string | null | undefined; +}; + +/** @internal */ +export const CreateServiceDependency$inboundSchema: z.ZodType< + CreateServiceDependency, + z.ZodTypeDef, + unknown +> = z.object({ + service_id: z.string(), + connected_service_id: z.string(), + notes: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "service_id": "serviceId", + "connected_service_id": "connectedServiceId", + }); +}); + +/** @internal */ +export type CreateServiceDependency$Outbound = { + service_id: string; + connected_service_id: string; + notes?: string | null | undefined; +}; + +/** @internal */ +export const CreateServiceDependency$outboundSchema: z.ZodType< + CreateServiceDependency$Outbound, + z.ZodTypeDef, + CreateServiceDependency +> = z.object({ + serviceId: z.string(), + connectedServiceId: z.string(), + notes: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + serviceId: "service_id", + connectedServiceId: "connected_service_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceDependency$ { + /** @deprecated use `CreateServiceDependency$inboundSchema` instead. */ + export const inboundSchema = CreateServiceDependency$inboundSchema; + /** @deprecated use `CreateServiceDependency$outboundSchema` instead. */ + export const outboundSchema = CreateServiceDependency$outboundSchema; + /** @deprecated use `CreateServiceDependency$Outbound` instead. */ + export type Outbound = CreateServiceDependency$Outbound; +} + +export function createServiceDependencyToJSON( + createServiceDependency: CreateServiceDependency, +): string { + return JSON.stringify( + CreateServiceDependency$outboundSchema.parse(createServiceDependency), + ); +} + +export function createServiceDependencyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceDependency$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceDependency' from JSON`, + ); +} diff --git a/src/models/components/createservicelinks.ts b/src/models/components/createservicelinks.ts new file mode 100644 index 00000000..8724b64b --- /dev/null +++ b/src/models/components/createservicelinks.ts @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The name of the service + */ +export const Integration = { + PagerDuty: "pager_duty", + Opsgenie: "opsgenie", + Victorops: "victorops", +} as const; +/** + * The name of the service + */ +export type Integration = ClosedEnum; + +/** + * Creates a service with the appropriate integration for each external service ID passed + */ +export type CreateServiceLinks = { + /** + * ID of the service + */ + externalServiceIds: string; + /** + * ID for the integration. This can be found by going to the edit page for the integration + */ + connectionId: string; + /** + * The name of the service + */ + integration: Integration; +}; + +/** @internal */ +export const Integration$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Integration); + +/** @internal */ +export const Integration$outboundSchema: z.ZodNativeEnum = + Integration$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Integration$ { + /** @deprecated use `Integration$inboundSchema` instead. */ + export const inboundSchema = Integration$inboundSchema; + /** @deprecated use `Integration$outboundSchema` instead. */ + export const outboundSchema = Integration$outboundSchema; +} + +/** @internal */ +export const CreateServiceLinks$inboundSchema: z.ZodType< + CreateServiceLinks, + z.ZodTypeDef, + unknown +> = z.object({ + external_service_ids: z.string(), + connection_id: z.string(), + integration: Integration$inboundSchema, +}).transform((v) => { + return remap$(v, { + "external_service_ids": "externalServiceIds", + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type CreateServiceLinks$Outbound = { + external_service_ids: string; + connection_id: string; + integration: string; +}; + +/** @internal */ +export const CreateServiceLinks$outboundSchema: z.ZodType< + CreateServiceLinks$Outbound, + z.ZodTypeDef, + CreateServiceLinks +> = z.object({ + externalServiceIds: z.string(), + connectionId: z.string(), + integration: Integration$outboundSchema, +}).transform((v) => { + return remap$(v, { + externalServiceIds: "external_service_ids", + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateServiceLinks$ { + /** @deprecated use `CreateServiceLinks$inboundSchema` instead. */ + export const inboundSchema = CreateServiceLinks$inboundSchema; + /** @deprecated use `CreateServiceLinks$outboundSchema` instead. */ + export const outboundSchema = CreateServiceLinks$outboundSchema; + /** @deprecated use `CreateServiceLinks$Outbound` instead. */ + export type Outbound = CreateServiceLinks$Outbound; +} + +export function createServiceLinksToJSON( + createServiceLinks: CreateServiceLinks, +): string { + return JSON.stringify( + CreateServiceLinks$outboundSchema.parse(createServiceLinks), + ); +} + +export function createServiceLinksFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateServiceLinks$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateServiceLinks' from JSON`, + ); +} diff --git a/src/models/components/createseverity.ts b/src/models/components/createseverity.ts new file mode 100644 index 00000000..60f26f6d --- /dev/null +++ b/src/models/components/createseverity.ts @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const CreateSeverityColor = { + Red: "red", + Orange: "orange", + Yellow: "yellow", + Blue: "blue", + Teal: "teal", + Grey: "grey", +} as const; +export type CreateSeverityColor = ClosedEnum; + +/** + * Create a new severity + */ +export type CreateSeverity = { + slug: string; + description?: string | null | undefined; + position?: number | null | undefined; + color?: CreateSeverityColor | null | undefined; +}; + +/** @internal */ +export const CreateSeverityColor$inboundSchema: z.ZodNativeEnum< + typeof CreateSeverityColor +> = z.nativeEnum(CreateSeverityColor); + +/** @internal */ +export const CreateSeverityColor$outboundSchema: z.ZodNativeEnum< + typeof CreateSeverityColor +> = CreateSeverityColor$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSeverityColor$ { + /** @deprecated use `CreateSeverityColor$inboundSchema` instead. */ + export const inboundSchema = CreateSeverityColor$inboundSchema; + /** @deprecated use `CreateSeverityColor$outboundSchema` instead. */ + export const outboundSchema = CreateSeverityColor$outboundSchema; +} + +/** @internal */ +export const CreateSeverity$inboundSchema: z.ZodType< + CreateSeverity, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.string(), + description: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + color: z.nullable(CreateSeverityColor$inboundSchema).optional(), +}); + +/** @internal */ +export type CreateSeverity$Outbound = { + slug: string; + description?: string | null | undefined; + position?: number | null | undefined; + color?: string | null | undefined; +}; + +/** @internal */ +export const CreateSeverity$outboundSchema: z.ZodType< + CreateSeverity$Outbound, + z.ZodTypeDef, + CreateSeverity +> = z.object({ + slug: z.string(), + description: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + color: z.nullable(CreateSeverityColor$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSeverity$ { + /** @deprecated use `CreateSeverity$inboundSchema` instead. */ + export const inboundSchema = CreateSeverity$inboundSchema; + /** @deprecated use `CreateSeverity$outboundSchema` instead. */ + export const outboundSchema = CreateSeverity$outboundSchema; + /** @deprecated use `CreateSeverity$Outbound` instead. */ + export type Outbound = CreateSeverity$Outbound; +} + +export function createSeverityToJSON(createSeverity: CreateSeverity): string { + return JSON.stringify(CreateSeverity$outboundSchema.parse(createSeverity)); +} + +export function createSeverityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSeverity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSeverity' from JSON`, + ); +} diff --git a/src/models/components/createseveritymatrixcondition.ts b/src/models/components/createseveritymatrixcondition.ts new file mode 100644 index 00000000..8f1e6c6d --- /dev/null +++ b/src/models/components/createseveritymatrixcondition.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new condition + */ +export type CreateSeverityMatrixCondition = { + name: string; + /** + * Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition + */ + position?: number | null | undefined; +}; + +/** @internal */ +export const CreateSeverityMatrixCondition$inboundSchema: z.ZodType< + CreateSeverityMatrixCondition, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + position: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type CreateSeverityMatrixCondition$Outbound = { + name: string; + position?: number | null | undefined; +}; + +/** @internal */ +export const CreateSeverityMatrixCondition$outboundSchema: z.ZodType< + CreateSeverityMatrixCondition$Outbound, + z.ZodTypeDef, + CreateSeverityMatrixCondition +> = z.object({ + name: z.string(), + position: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSeverityMatrixCondition$ { + /** @deprecated use `CreateSeverityMatrixCondition$inboundSchema` instead. */ + export const inboundSchema = CreateSeverityMatrixCondition$inboundSchema; + /** @deprecated use `CreateSeverityMatrixCondition$outboundSchema` instead. */ + export const outboundSchema = CreateSeverityMatrixCondition$outboundSchema; + /** @deprecated use `CreateSeverityMatrixCondition$Outbound` instead. */ + export type Outbound = CreateSeverityMatrixCondition$Outbound; +} + +export function createSeverityMatrixConditionToJSON( + createSeverityMatrixCondition: CreateSeverityMatrixCondition, +): string { + return JSON.stringify( + CreateSeverityMatrixCondition$outboundSchema.parse( + createSeverityMatrixCondition, + ), + ); +} + +export function createSeverityMatrixConditionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSeverityMatrixCondition$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSeverityMatrixCondition' from JSON`, + ); +} diff --git a/src/models/components/createseveritymatriximpact.ts b/src/models/components/createseveritymatriximpact.ts new file mode 100644 index 00000000..8838f3d5 --- /dev/null +++ b/src/models/components/createseveritymatriximpact.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new impact + */ +export type CreateSeverityMatrixImpact = { + affectsType: string; + affectsId: string; + position?: number | null | undefined; +}; + +/** @internal */ +export const CreateSeverityMatrixImpact$inboundSchema: z.ZodType< + CreateSeverityMatrixImpact, + z.ZodTypeDef, + unknown +> = z.object({ + affects_type: z.string(), + affects_id: z.string(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "affects_type": "affectsType", + "affects_id": "affectsId", + }); +}); + +/** @internal */ +export type CreateSeverityMatrixImpact$Outbound = { + affects_type: string; + affects_id: string; + position?: number | null | undefined; +}; + +/** @internal */ +export const CreateSeverityMatrixImpact$outboundSchema: z.ZodType< + CreateSeverityMatrixImpact$Outbound, + z.ZodTypeDef, + CreateSeverityMatrixImpact +> = z.object({ + affectsType: z.string(), + affectsId: z.string(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + affectsType: "affects_type", + affectsId: "affects_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSeverityMatrixImpact$ { + /** @deprecated use `CreateSeverityMatrixImpact$inboundSchema` instead. */ + export const inboundSchema = CreateSeverityMatrixImpact$inboundSchema; + /** @deprecated use `CreateSeverityMatrixImpact$outboundSchema` instead. */ + export const outboundSchema = CreateSeverityMatrixImpact$outboundSchema; + /** @deprecated use `CreateSeverityMatrixImpact$Outbound` instead. */ + export type Outbound = CreateSeverityMatrixImpact$Outbound; +} + +export function createSeverityMatrixImpactToJSON( + createSeverityMatrixImpact: CreateSeverityMatrixImpact, +): string { + return JSON.stringify( + CreateSeverityMatrixImpact$outboundSchema.parse(createSeverityMatrixImpact), + ); +} + +export function createSeverityMatrixImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSeverityMatrixImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSeverityMatrixImpact' from JSON`, + ); +} diff --git a/src/models/components/createsignalsemailtarget.ts b/src/models/components/createsignalsemailtarget.ts new file mode 100644 index 00000000..ddbd2377 --- /dev/null +++ b/src/models/components/createsignalsemailtarget.ts @@ -0,0 +1,314 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The type of target that the inbound email will notify when matched. + */ +export const CreateSignalsEmailTargetType = { + Team: "Team", + EntireTeam: "EntireTeam", + EscalationPolicy: "EscalationPolicy", + OnCallSchedule: "OnCallSchedule", + User: "User", + SlackChannel: "SlackChannel", + Webhook: "Webhook", +} as const; +/** + * The type of target that the inbound email will notify when matched. + */ +export type CreateSignalsEmailTargetType = ClosedEnum< + typeof CreateSignalsEmailTargetType +>; + +/** + * The target that the email target will notify. This object must contain a `type` + * + * @remarks + * field that specifies the type of target and an `id` field that specifies the ID of + * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", + * "team", "user", or "slack_channel". + */ +export type CreateSignalsEmailTargetTarget = { + /** + * The type of target that the inbound email will notify when matched. + */ + type: CreateSignalsEmailTargetType; + /** + * The ID of the target that the inbound email will notify when matched. + */ + id: string; +}; + +/** + * Whether or not all rules must match, or if only one rule must match. + */ +export const CreateSignalsEmailTargetRuleMatchingStrategy = { + All: "all", + Any: "any", +} as const; +/** + * Whether or not all rules must match, or if only one rule must match. + */ +export type CreateSignalsEmailTargetRuleMatchingStrategy = ClosedEnum< + typeof CreateSignalsEmailTargetRuleMatchingStrategy +>; + +/** + * Create a Signals email target for a team. + */ +export type CreateSignalsEmailTarget = { + /** + * The email target's name. + */ + name: string; + /** + * The email address that will be listening to events. + */ + slug?: string | null | undefined; + /** + * A detailed description of the email target. + */ + description?: string | null | undefined; + /** + * The target that the email target will notify. This object must contain a `type` + * + * @remarks + * field that specifies the type of target and an `id` field that specifies the ID of + * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", + * "team", "user", or "slack_channel". + */ + target?: CreateSignalsEmailTargetTarget | null | undefined; + /** + * A list of email addresses that are allowed to send events to the target. Must be exact match. + */ + allowedSenders?: Array | null | undefined; + /** + * A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. + */ + rules?: Array | null | undefined; + /** + * Whether or not all rules must match, or if only one rule must match. + */ + ruleMatchingStrategy?: + | CreateSignalsEmailTargetRuleMatchingStrategy + | null + | undefined; + /** + * The CEL expression that defines the status of an incoming email that is sent to the target. + */ + statusCel?: string | null | undefined; + /** + * The CEL expression that defines the level of an incoming email that is sent to the target. + */ + levelCel?: string | null | undefined; +}; + +/** @internal */ +export const CreateSignalsEmailTargetType$inboundSchema: z.ZodNativeEnum< + typeof CreateSignalsEmailTargetType +> = z.nativeEnum(CreateSignalsEmailTargetType); + +/** @internal */ +export const CreateSignalsEmailTargetType$outboundSchema: z.ZodNativeEnum< + typeof CreateSignalsEmailTargetType +> = CreateSignalsEmailTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSignalsEmailTargetType$ { + /** @deprecated use `CreateSignalsEmailTargetType$inboundSchema` instead. */ + export const inboundSchema = CreateSignalsEmailTargetType$inboundSchema; + /** @deprecated use `CreateSignalsEmailTargetType$outboundSchema` instead. */ + export const outboundSchema = CreateSignalsEmailTargetType$outboundSchema; +} + +/** @internal */ +export const CreateSignalsEmailTargetTarget$inboundSchema: z.ZodType< + CreateSignalsEmailTargetTarget, + z.ZodTypeDef, + unknown +> = z.object({ + type: CreateSignalsEmailTargetType$inboundSchema, + id: z.string(), +}); + +/** @internal */ +export type CreateSignalsEmailTargetTarget$Outbound = { + type: string; + id: string; +}; + +/** @internal */ +export const CreateSignalsEmailTargetTarget$outboundSchema: z.ZodType< + CreateSignalsEmailTargetTarget$Outbound, + z.ZodTypeDef, + CreateSignalsEmailTargetTarget +> = z.object({ + type: CreateSignalsEmailTargetType$outboundSchema, + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSignalsEmailTargetTarget$ { + /** @deprecated use `CreateSignalsEmailTargetTarget$inboundSchema` instead. */ + export const inboundSchema = CreateSignalsEmailTargetTarget$inboundSchema; + /** @deprecated use `CreateSignalsEmailTargetTarget$outboundSchema` instead. */ + export const outboundSchema = CreateSignalsEmailTargetTarget$outboundSchema; + /** @deprecated use `CreateSignalsEmailTargetTarget$Outbound` instead. */ + export type Outbound = CreateSignalsEmailTargetTarget$Outbound; +} + +export function createSignalsEmailTargetTargetToJSON( + createSignalsEmailTargetTarget: CreateSignalsEmailTargetTarget, +): string { + return JSON.stringify( + CreateSignalsEmailTargetTarget$outboundSchema.parse( + createSignalsEmailTargetTarget, + ), + ); +} + +export function createSignalsEmailTargetTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSignalsEmailTargetTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSignalsEmailTargetTarget' from JSON`, + ); +} + +/** @internal */ +export const CreateSignalsEmailTargetRuleMatchingStrategy$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreateSignalsEmailTargetRuleMatchingStrategy); + +/** @internal */ +export const CreateSignalsEmailTargetRuleMatchingStrategy$outboundSchema: + z.ZodNativeEnum = + CreateSignalsEmailTargetRuleMatchingStrategy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSignalsEmailTargetRuleMatchingStrategy$ { + /** @deprecated use `CreateSignalsEmailTargetRuleMatchingStrategy$inboundSchema` instead. */ + export const inboundSchema = + CreateSignalsEmailTargetRuleMatchingStrategy$inboundSchema; + /** @deprecated use `CreateSignalsEmailTargetRuleMatchingStrategy$outboundSchema` instead. */ + export const outboundSchema = + CreateSignalsEmailTargetRuleMatchingStrategy$outboundSchema; +} + +/** @internal */ +export const CreateSignalsEmailTarget$inboundSchema: z.ZodType< + CreateSignalsEmailTarget, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + target: z.nullable(z.lazy(() => CreateSignalsEmailTargetTarget$inboundSchema)) + .optional(), + allowed_senders: z.nullable(z.array(z.string())).optional(), + rules: z.nullable(z.array(z.string())).optional(), + rule_matching_strategy: z.nullable( + CreateSignalsEmailTargetRuleMatchingStrategy$inboundSchema, + ).optional(), + status_cel: z.nullable(z.string()).optional(), + level_cel: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "allowed_senders": "allowedSenders", + "rule_matching_strategy": "ruleMatchingStrategy", + "status_cel": "statusCel", + "level_cel": "levelCel", + }); +}); + +/** @internal */ +export type CreateSignalsEmailTarget$Outbound = { + name: string; + slug?: string | null | undefined; + description?: string | null | undefined; + target?: CreateSignalsEmailTargetTarget$Outbound | null | undefined; + allowed_senders?: Array | null | undefined; + rules?: Array | null | undefined; + rule_matching_strategy?: string | null | undefined; + status_cel?: string | null | undefined; + level_cel?: string | null | undefined; +}; + +/** @internal */ +export const CreateSignalsEmailTarget$outboundSchema: z.ZodType< + CreateSignalsEmailTarget$Outbound, + z.ZodTypeDef, + CreateSignalsEmailTarget +> = z.object({ + name: z.string(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + target: z.nullable( + z.lazy(() => CreateSignalsEmailTargetTarget$outboundSchema), + ).optional(), + allowedSenders: z.nullable(z.array(z.string())).optional(), + rules: z.nullable(z.array(z.string())).optional(), + ruleMatchingStrategy: z.nullable( + CreateSignalsEmailTargetRuleMatchingStrategy$outboundSchema, + ).optional(), + statusCel: z.nullable(z.string()).optional(), + levelCel: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + allowedSenders: "allowed_senders", + ruleMatchingStrategy: "rule_matching_strategy", + statusCel: "status_cel", + levelCel: "level_cel", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSignalsEmailTarget$ { + /** @deprecated use `CreateSignalsEmailTarget$inboundSchema` instead. */ + export const inboundSchema = CreateSignalsEmailTarget$inboundSchema; + /** @deprecated use `CreateSignalsEmailTarget$outboundSchema` instead. */ + export const outboundSchema = CreateSignalsEmailTarget$outboundSchema; + /** @deprecated use `CreateSignalsEmailTarget$Outbound` instead. */ + export type Outbound = CreateSignalsEmailTarget$Outbound; +} + +export function createSignalsEmailTargetToJSON( + createSignalsEmailTarget: CreateSignalsEmailTarget, +): string { + return JSON.stringify( + CreateSignalsEmailTarget$outboundSchema.parse(createSignalsEmailTarget), + ); +} + +export function createSignalsEmailTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSignalsEmailTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSignalsEmailTarget' from JSON`, + ); +} diff --git a/src/models/components/createsignalswebhooktarget.ts b/src/models/components/createsignalswebhooktarget.ts new file mode 100644 index 00000000..0ca00143 --- /dev/null +++ b/src/models/components/createsignalswebhooktarget.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a Signals webhook target. + */ +export type CreateSignalsWebhookTarget = { + /** + * The webhook target's name. + */ + name: string; + /** + * An optional detailed description of the webhook target. + */ + description?: string | null | undefined; + /** + * The URL that the webhook target will notify. + */ + url: string; + /** + * An optional secret we will provide in the `FH-Signature` header + * + * @remarks + * when sending a payload to the webhook target. This key will not be + * shown in any response once configured. + */ + signingKey?: string | null | undefined; +}; + +/** @internal */ +export const CreateSignalsWebhookTarget$inboundSchema: z.ZodType< + CreateSignalsWebhookTarget, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + url: z.string(), + signing_key: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "signing_key": "signingKey", + }); +}); + +/** @internal */ +export type CreateSignalsWebhookTarget$Outbound = { + name: string; + description?: string | null | undefined; + url: string; + signing_key?: string | null | undefined; +}; + +/** @internal */ +export const CreateSignalsWebhookTarget$outboundSchema: z.ZodType< + CreateSignalsWebhookTarget$Outbound, + z.ZodTypeDef, + CreateSignalsWebhookTarget +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + url: z.string(), + signingKey: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + signingKey: "signing_key", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSignalsWebhookTarget$ { + /** @deprecated use `CreateSignalsWebhookTarget$inboundSchema` instead. */ + export const inboundSchema = CreateSignalsWebhookTarget$inboundSchema; + /** @deprecated use `CreateSignalsWebhookTarget$outboundSchema` instead. */ + export const outboundSchema = CreateSignalsWebhookTarget$outboundSchema; + /** @deprecated use `CreateSignalsWebhookTarget$Outbound` instead. */ + export type Outbound = CreateSignalsWebhookTarget$Outbound; +} + +export function createSignalsWebhookTargetToJSON( + createSignalsWebhookTarget: CreateSignalsWebhookTarget, +): string { + return JSON.stringify( + CreateSignalsWebhookTarget$outboundSchema.parse(createSignalsWebhookTarget), + ); +} + +export function createSignalsWebhookTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSignalsWebhookTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSignalsWebhookTarget' from JSON`, + ); +} diff --git a/src/models/components/createstatusupdatetemplate.ts b/src/models/components/createstatusupdatetemplate.ts new file mode 100644 index 00000000..ede77ff3 --- /dev/null +++ b/src/models/components/createstatusupdatetemplate.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a status update template for your organization + */ +export type CreateStatusUpdateTemplate = { + name: string; + body: string; +}; + +/** @internal */ +export const CreateStatusUpdateTemplate$inboundSchema: z.ZodType< + CreateStatusUpdateTemplate, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + body: z.string(), +}); + +/** @internal */ +export type CreateStatusUpdateTemplate$Outbound = { + name: string; + body: string; +}; + +/** @internal */ +export const CreateStatusUpdateTemplate$outboundSchema: z.ZodType< + CreateStatusUpdateTemplate$Outbound, + z.ZodTypeDef, + CreateStatusUpdateTemplate +> = z.object({ + name: z.string(), + body: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateStatusUpdateTemplate$ { + /** @deprecated use `CreateStatusUpdateTemplate$inboundSchema` instead. */ + export const inboundSchema = CreateStatusUpdateTemplate$inboundSchema; + /** @deprecated use `CreateStatusUpdateTemplate$outboundSchema` instead. */ + export const outboundSchema = CreateStatusUpdateTemplate$outboundSchema; + /** @deprecated use `CreateStatusUpdateTemplate$Outbound` instead. */ + export type Outbound = CreateStatusUpdateTemplate$Outbound; +} + +export function createStatusUpdateTemplateToJSON( + createStatusUpdateTemplate: CreateStatusUpdateTemplate, +): string { + return JSON.stringify( + CreateStatusUpdateTemplate$outboundSchema.parse(createStatusUpdateTemplate), + ); +} + +export function createStatusUpdateTemplateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateStatusUpdateTemplate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateStatusUpdateTemplate' from JSON`, + ); +} diff --git a/src/models/components/createtasklist.ts b/src/models/components/createtasklist.ts new file mode 100644 index 00000000..4585ce21 --- /dev/null +++ b/src/models/components/createtasklist.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateTaskListTaskListItem = { + /** + * A summary of the task + */ + summary: string; + /** + * A long-form description for the task if additional context is helpful + */ + description?: string | null | undefined; +}; + +/** + * Creates a new task list + */ +export type CreateTaskList = { + name: string; + description?: string | null | undefined; + taskListItems: Array; +}; + +/** @internal */ +export const CreateTaskListTaskListItem$inboundSchema: z.ZodType< + CreateTaskListTaskListItem, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CreateTaskListTaskListItem$Outbound = { + summary: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const CreateTaskListTaskListItem$outboundSchema: z.ZodType< + CreateTaskListTaskListItem$Outbound, + z.ZodTypeDef, + CreateTaskListTaskListItem +> = z.object({ + summary: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTaskListTaskListItem$ { + /** @deprecated use `CreateTaskListTaskListItem$inboundSchema` instead. */ + export const inboundSchema = CreateTaskListTaskListItem$inboundSchema; + /** @deprecated use `CreateTaskListTaskListItem$outboundSchema` instead. */ + export const outboundSchema = CreateTaskListTaskListItem$outboundSchema; + /** @deprecated use `CreateTaskListTaskListItem$Outbound` instead. */ + export type Outbound = CreateTaskListTaskListItem$Outbound; +} + +export function createTaskListTaskListItemToJSON( + createTaskListTaskListItem: CreateTaskListTaskListItem, +): string { + return JSON.stringify( + CreateTaskListTaskListItem$outboundSchema.parse(createTaskListTaskListItem), + ); +} + +export function createTaskListTaskListItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTaskListTaskListItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTaskListTaskListItem' from JSON`, + ); +} + +/** @internal */ +export const CreateTaskList$inboundSchema: z.ZodType< + CreateTaskList, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + task_list_items: z.array( + z.lazy(() => CreateTaskListTaskListItem$inboundSchema), + ), +}).transform((v) => { + return remap$(v, { + "task_list_items": "taskListItems", + }); +}); + +/** @internal */ +export type CreateTaskList$Outbound = { + name: string; + description?: string | null | undefined; + task_list_items: Array; +}; + +/** @internal */ +export const CreateTaskList$outboundSchema: z.ZodType< + CreateTaskList$Outbound, + z.ZodTypeDef, + CreateTaskList +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + taskListItems: z.array( + z.lazy(() => CreateTaskListTaskListItem$outboundSchema), + ), +}).transform((v) => { + return remap$(v, { + taskListItems: "task_list_items", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTaskList$ { + /** @deprecated use `CreateTaskList$inboundSchema` instead. */ + export const inboundSchema = CreateTaskList$inboundSchema; + /** @deprecated use `CreateTaskList$outboundSchema` instead. */ + export const outboundSchema = CreateTaskList$outboundSchema; + /** @deprecated use `CreateTaskList$Outbound` instead. */ + export type Outbound = CreateTaskList$Outbound; +} + +export function createTaskListToJSON(createTaskList: CreateTaskList): string { + return JSON.stringify(CreateTaskList$outboundSchema.parse(createTaskList)); +} + +export function createTaskListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTaskList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTaskList' from JSON`, + ); +} diff --git a/src/models/components/createteam.ts b/src/models/components/createteam.ts new file mode 100644 index 00000000..ec19a4d3 --- /dev/null +++ b/src/models/components/createteam.ts @@ -0,0 +1,277 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * MS Teams channel identity for channel associated with this team + */ +export type CreateTeamMsTeamsChannel = { + channelId: string; + msTeamId: string; +}; + +export type CreateTeamMembership = { + userId?: string | null | undefined; + scheduleId?: string | null | undefined; + /** + * An incident role ID that this user will automatically assigned if this team is assigned to an incident + */ + incidentRoleId?: string | null | undefined; +}; + +/** + * Create a new team + */ +export type CreateTeam = { + name: string; + description?: string | null | undefined; + slug?: string | null | undefined; + /** + * The Slack channel ID associated with this team. This may be the reference in FireHydrant's system (i.e. UUID) or the ID value from Slack (e.g. C1234567890). + * + * @remarks + */ + slackChannelId?: string | null | undefined; + /** + * MS Teams channel identity for channel associated with this team + */ + msTeamsChannel?: CreateTeamMsTeamsChannel | null | undefined; + memberships?: Array | null | undefined; + /** + * A list of email addresses to invite to join the organization and automatically add to this team. If an email already has a pending invitation, the team will be added to their existing invitation. + */ + inviteEmails?: Array | null | undefined; +}; + +/** @internal */ +export const CreateTeamMsTeamsChannel$inboundSchema: z.ZodType< + CreateTeamMsTeamsChannel, + z.ZodTypeDef, + unknown +> = z.object({ + channel_id: z.string(), + ms_team_id: z.string(), +}).transform((v) => { + return remap$(v, { + "channel_id": "channelId", + "ms_team_id": "msTeamId", + }); +}); + +/** @internal */ +export type CreateTeamMsTeamsChannel$Outbound = { + channel_id: string; + ms_team_id: string; +}; + +/** @internal */ +export const CreateTeamMsTeamsChannel$outboundSchema: z.ZodType< + CreateTeamMsTeamsChannel$Outbound, + z.ZodTypeDef, + CreateTeamMsTeamsChannel +> = z.object({ + channelId: z.string(), + msTeamId: z.string(), +}).transform((v) => { + return remap$(v, { + channelId: "channel_id", + msTeamId: "ms_team_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamMsTeamsChannel$ { + /** @deprecated use `CreateTeamMsTeamsChannel$inboundSchema` instead. */ + export const inboundSchema = CreateTeamMsTeamsChannel$inboundSchema; + /** @deprecated use `CreateTeamMsTeamsChannel$outboundSchema` instead. */ + export const outboundSchema = CreateTeamMsTeamsChannel$outboundSchema; + /** @deprecated use `CreateTeamMsTeamsChannel$Outbound` instead. */ + export type Outbound = CreateTeamMsTeamsChannel$Outbound; +} + +export function createTeamMsTeamsChannelToJSON( + createTeamMsTeamsChannel: CreateTeamMsTeamsChannel, +): string { + return JSON.stringify( + CreateTeamMsTeamsChannel$outboundSchema.parse(createTeamMsTeamsChannel), + ); +} + +export function createTeamMsTeamsChannelFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamMsTeamsChannel$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamMsTeamsChannel' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamMembership$inboundSchema: z.ZodType< + CreateTeamMembership, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.nullable(z.string()).optional(), + schedule_id: z.nullable(z.string()).optional(), + incident_role_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + "schedule_id": "scheduleId", + "incident_role_id": "incidentRoleId", + }); +}); + +/** @internal */ +export type CreateTeamMembership$Outbound = { + user_id?: string | null | undefined; + schedule_id?: string | null | undefined; + incident_role_id?: string | null | undefined; +}; + +/** @internal */ +export const CreateTeamMembership$outboundSchema: z.ZodType< + CreateTeamMembership$Outbound, + z.ZodTypeDef, + CreateTeamMembership +> = z.object({ + userId: z.nullable(z.string()).optional(), + scheduleId: z.nullable(z.string()).optional(), + incidentRoleId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + scheduleId: "schedule_id", + incidentRoleId: "incident_role_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamMembership$ { + /** @deprecated use `CreateTeamMembership$inboundSchema` instead. */ + export const inboundSchema = CreateTeamMembership$inboundSchema; + /** @deprecated use `CreateTeamMembership$outboundSchema` instead. */ + export const outboundSchema = CreateTeamMembership$outboundSchema; + /** @deprecated use `CreateTeamMembership$Outbound` instead. */ + export type Outbound = CreateTeamMembership$Outbound; +} + +export function createTeamMembershipToJSON( + createTeamMembership: CreateTeamMembership, +): string { + return JSON.stringify( + CreateTeamMembership$outboundSchema.parse(createTeamMembership), + ); +} + +export function createTeamMembershipFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamMembership$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamMembership' from JSON`, + ); +} + +/** @internal */ +export const CreateTeam$inboundSchema: z.ZodType< + CreateTeam, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + slack_channel_id: z.nullable(z.string()).optional(), + ms_teams_channel: z.nullable( + z.lazy(() => CreateTeamMsTeamsChannel$inboundSchema), + ).optional(), + memberships: z.nullable( + z.array(z.lazy(() => CreateTeamMembership$inboundSchema)), + ).optional(), + invite_emails: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "slack_channel_id": "slackChannelId", + "ms_teams_channel": "msTeamsChannel", + "invite_emails": "inviteEmails", + }); +}); + +/** @internal */ +export type CreateTeam$Outbound = { + name: string; + description?: string | null | undefined; + slug?: string | null | undefined; + slack_channel_id?: string | null | undefined; + ms_teams_channel?: CreateTeamMsTeamsChannel$Outbound | null | undefined; + memberships?: Array | null | undefined; + invite_emails?: Array | null | undefined; +}; + +/** @internal */ +export const CreateTeam$outboundSchema: z.ZodType< + CreateTeam$Outbound, + z.ZodTypeDef, + CreateTeam +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + slackChannelId: z.nullable(z.string()).optional(), + msTeamsChannel: z.nullable( + z.lazy(() => CreateTeamMsTeamsChannel$outboundSchema), + ).optional(), + memberships: z.nullable( + z.array(z.lazy(() => CreateTeamMembership$outboundSchema)), + ).optional(), + inviteEmails: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + slackChannelId: "slack_channel_id", + msTeamsChannel: "ms_teams_channel", + inviteEmails: "invite_emails", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeam$ { + /** @deprecated use `CreateTeam$inboundSchema` instead. */ + export const inboundSchema = CreateTeam$inboundSchema; + /** @deprecated use `CreateTeam$outboundSchema` instead. */ + export const outboundSchema = CreateTeam$outboundSchema; + /** @deprecated use `CreateTeam$Outbound` instead. */ + export type Outbound = CreateTeam$Outbound; +} + +export function createTeamToJSON(createTeam: CreateTeam): string { + return JSON.stringify(CreateTeam$outboundSchema.parse(createTeam)); +} + +export function createTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeam' from JSON`, + ); +} diff --git a/src/models/components/createteamescalationpolicy.ts b/src/models/components/createteamescalationpolicy.ts new file mode 100644 index 00000000..cd71d5cc --- /dev/null +++ b/src/models/components/createteamescalationpolicy.ts @@ -0,0 +1,1243 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The type of target that the step will notify. + */ +export const CreateTeamEscalationPolicyType = { + OnCallSchedule: "OnCallSchedule", + User: "User", + SlackChannel: "SlackChannel", + EntireTeam: "EntireTeam", + Webhook: "Webhook", +} as const; +/** + * The type of target that the step will notify. + */ +export type CreateTeamEscalationPolicyType = ClosedEnum< + typeof CreateTeamEscalationPolicyType +>; + +export type CreateTeamEscalationPolicyTarget = { + /** + * The type of target that the step will notify. + */ + type: CreateTeamEscalationPolicyType; + /** + * The ID of the target that the step will notify. + */ + id: string; +}; + +/** + * The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + */ +export const CreateTeamEscalationPolicyDistributionType = { + Unspecified: "unspecified", + RoundRobinByAlert: "round_robin_by_alert", + RoundRobinByEscalationPolicy: "round_robin_by_escalation_policy", +} as const; +/** + * The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + */ +export type CreateTeamEscalationPolicyDistributionType = ClosedEnum< + typeof CreateTeamEscalationPolicyDistributionType +>; + +export type CreateTeamEscalationPolicyStep = { + /** + * A list of targets that the step will notify. You can specify up to 15 targets per step. + */ + targets: Array; + /** + * An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. + */ + timeout: string; + /** + * The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + */ + distributionType?: + | CreateTeamEscalationPolicyDistributionType + | null + | undefined; + /** + * A list of priorities (HIGH, MEDIUM, LOW) to which the step applies when using a dynamic escalation policy. + */ + priorities?: Array | null | undefined; +}; + +/** + * The type of target to which the policy will hand off. + */ +export const CreateTeamEscalationPolicyTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +/** + * The type of target to which the policy will hand off. + */ +export type CreateTeamEscalationPolicyTargetType = ClosedEnum< + typeof CreateTeamEscalationPolicyTargetType +>; + +/** + * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. + */ +export type CreateTeamEscalationPolicyHandoffStep = { + /** + * The type of target to which the policy will hand off. + */ + targetType: CreateTeamEscalationPolicyTargetType; + /** + * The ID of the target to which the policy will hand off. + */ + targetId: string; +}; + +export const CreateTeamEscalationPolicyHighTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +export type CreateTeamEscalationPolicyHighTargetType = ClosedEnum< + typeof CreateTeamEscalationPolicyHighTargetType +>; + +/** + * Handoff step for HIGH priority alerts + */ +export type CreateTeamEscalationPolicyHighHandoffStep = { + targetType: CreateTeamEscalationPolicyHighTargetType; + targetId: string; +}; + +/** + * Settings for HIGH priority alerts + */ +export type CreateTeamEscalationPolicyHigh = { + /** + * Number of repetitions for HIGH priority alerts + */ + repetitions?: number | null | undefined; + /** + * Handoff step for HIGH priority alerts + */ + handoffStep?: CreateTeamEscalationPolicyHighHandoffStep | null | undefined; +}; + +export const CreateTeamEscalationPolicyMediumTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +export type CreateTeamEscalationPolicyMediumTargetType = ClosedEnum< + typeof CreateTeamEscalationPolicyMediumTargetType +>; + +/** + * Handoff step for MEDIUM priority alerts + */ +export type CreateTeamEscalationPolicyMediumHandoffStep = { + targetType: CreateTeamEscalationPolicyMediumTargetType; + targetId: string; +}; + +/** + * Settings for MEDIUM priority alerts + */ +export type CreateTeamEscalationPolicyMedium = { + /** + * Number of repetitions for MEDIUM priority alerts + */ + repetitions?: number | null | undefined; + /** + * Handoff step for MEDIUM priority alerts + */ + handoffStep?: CreateTeamEscalationPolicyMediumHandoffStep | null | undefined; +}; + +export const CreateTeamEscalationPolicyLowTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +export type CreateTeamEscalationPolicyLowTargetType = ClosedEnum< + typeof CreateTeamEscalationPolicyLowTargetType +>; + +/** + * Handoff step for LOW priority alerts + */ +export type CreateTeamEscalationPolicyLowHandoffStep = { + targetType: CreateTeamEscalationPolicyLowTargetType; + targetId: string; +}; + +/** + * Settings for LOW priority alerts + */ +export type CreateTeamEscalationPolicyLow = { + /** + * Number of repetitions for LOW priority alerts + */ + repetitions?: number | null | undefined; + /** + * Handoff step for LOW priority alerts + */ + handoffStep?: CreateTeamEscalationPolicyLowHandoffStep | null | undefined; +}; + +/** + * Priority-specific settings for dynamic escalation policies + */ +export type CreateTeamEscalationPolicyPrioritizedSettings = { + /** + * Settings for HIGH priority alerts + */ + high?: CreateTeamEscalationPolicyHigh | null | undefined; + /** + * Settings for MEDIUM priority alerts + */ + medium?: CreateTeamEscalationPolicyMedium | null | undefined; + /** + * Settings for LOW priority alerts + */ + low?: CreateTeamEscalationPolicyLow | null | undefined; +}; + +/** + * Create a Signals escalation policy for a team. + */ +export type CreateTeamEscalationPolicy = { + /** + * The escalation policy's name. + */ + name: string; + /** + * A detailed description of the escalation policy. + */ + description?: string | null | undefined; + /** + * The number of times that the escalation policy should repeat before an alert is dropped. + */ + repetitions?: number | null | undefined; + /** + * Whether this escalation policy should be the default for the team. + */ + default?: boolean | null | undefined; + /** + * The strategy for handling steps in the escalation policy. Can be "static" or "dynamic_by_priority". + */ + stepStrategy?: string | null | undefined; + /** + * A list of steps that define how an alert should escalate through the policy. + */ + steps: Array; + /** + * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. + */ + handoffStep?: CreateTeamEscalationPolicyHandoffStep | null | undefined; + /** + * Priority-specific settings for dynamic escalation policies + */ + prioritizedSettings?: + | CreateTeamEscalationPolicyPrioritizedSettings + | null + | undefined; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyType$inboundSchema: z.ZodNativeEnum< + typeof CreateTeamEscalationPolicyType +> = z.nativeEnum(CreateTeamEscalationPolicyType); + +/** @internal */ +export const CreateTeamEscalationPolicyType$outboundSchema: z.ZodNativeEnum< + typeof CreateTeamEscalationPolicyType +> = CreateTeamEscalationPolicyType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyType$ { + /** @deprecated use `CreateTeamEscalationPolicyType$inboundSchema` instead. */ + export const inboundSchema = CreateTeamEscalationPolicyType$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyType$outboundSchema` instead. */ + export const outboundSchema = CreateTeamEscalationPolicyType$outboundSchema; +} + +/** @internal */ +export const CreateTeamEscalationPolicyTarget$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyTarget, + z.ZodTypeDef, + unknown +> = z.object({ + type: CreateTeamEscalationPolicyType$inboundSchema, + id: z.string(), +}); + +/** @internal */ +export type CreateTeamEscalationPolicyTarget$Outbound = { + type: string; + id: string; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyTarget$outboundSchema: z.ZodType< + CreateTeamEscalationPolicyTarget$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyTarget +> = z.object({ + type: CreateTeamEscalationPolicyType$outboundSchema, + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyTarget$ { + /** @deprecated use `CreateTeamEscalationPolicyTarget$inboundSchema` instead. */ + export const inboundSchema = CreateTeamEscalationPolicyTarget$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyTarget$outboundSchema` instead. */ + export const outboundSchema = CreateTeamEscalationPolicyTarget$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyTarget$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyTarget$Outbound; +} + +export function createTeamEscalationPolicyTargetToJSON( + createTeamEscalationPolicyTarget: CreateTeamEscalationPolicyTarget, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyTarget$outboundSchema.parse( + createTeamEscalationPolicyTarget, + ), + ); +} + +export function createTeamEscalationPolicyTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamEscalationPolicyTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamEscalationPolicyTarget' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyDistributionType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreateTeamEscalationPolicyDistributionType); + +/** @internal */ +export const CreateTeamEscalationPolicyDistributionType$outboundSchema: + z.ZodNativeEnum = + CreateTeamEscalationPolicyDistributionType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyDistributionType$ { + /** @deprecated use `CreateTeamEscalationPolicyDistributionType$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyDistributionType$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyDistributionType$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyDistributionType$outboundSchema; +} + +/** @internal */ +export const CreateTeamEscalationPolicyStep$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyStep, + z.ZodTypeDef, + unknown +> = z.object({ + targets: z.array( + z.lazy(() => CreateTeamEscalationPolicyTarget$inboundSchema), + ), + timeout: z.string(), + distribution_type: z.nullable( + CreateTeamEscalationPolicyDistributionType$inboundSchema, + ).optional(), + priorities: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "distribution_type": "distributionType", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicyStep$Outbound = { + targets: Array; + timeout: string; + distribution_type?: string | null | undefined; + priorities?: Array | null | undefined; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyStep$outboundSchema: z.ZodType< + CreateTeamEscalationPolicyStep$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyStep +> = z.object({ + targets: z.array( + z.lazy(() => CreateTeamEscalationPolicyTarget$outboundSchema), + ), + timeout: z.string(), + distributionType: z.nullable( + CreateTeamEscalationPolicyDistributionType$outboundSchema, + ).optional(), + priorities: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + distributionType: "distribution_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyStep$ { + /** @deprecated use `CreateTeamEscalationPolicyStep$inboundSchema` instead. */ + export const inboundSchema = CreateTeamEscalationPolicyStep$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyStep$outboundSchema` instead. */ + export const outboundSchema = CreateTeamEscalationPolicyStep$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyStep$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyStep$Outbound; +} + +export function createTeamEscalationPolicyStepToJSON( + createTeamEscalationPolicyStep: CreateTeamEscalationPolicyStep, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyStep$outboundSchema.parse( + createTeamEscalationPolicyStep, + ), + ); +} + +export function createTeamEscalationPolicyStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamEscalationPolicyStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamEscalationPolicyStep' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyTargetType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + CreateTeamEscalationPolicyTargetType, + ); + +/** @internal */ +export const CreateTeamEscalationPolicyTargetType$outboundSchema: + z.ZodNativeEnum = + CreateTeamEscalationPolicyTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyTargetType$ { + /** @deprecated use `CreateTeamEscalationPolicyTargetType$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyTargetType$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyTargetType$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyTargetType$outboundSchema; +} + +/** @internal */ +export const CreateTeamEscalationPolicyHandoffStep$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyHandoffStep, + z.ZodTypeDef, + unknown +> = z.object({ + target_type: CreateTeamEscalationPolicyTargetType$inboundSchema, + target_id: z.string(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicyHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyHandoffStep$outboundSchema: z.ZodType< + CreateTeamEscalationPolicyHandoffStep$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyHandoffStep +> = z.object({ + targetType: CreateTeamEscalationPolicyTargetType$outboundSchema, + targetId: z.string(), +}).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyHandoffStep$ { + /** @deprecated use `CreateTeamEscalationPolicyHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyHandoffStep$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyHandoffStep$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyHandoffStep$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyHandoffStep$Outbound; +} + +export function createTeamEscalationPolicyHandoffStepToJSON( + createTeamEscalationPolicyHandoffStep: CreateTeamEscalationPolicyHandoffStep, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyHandoffStep$outboundSchema.parse( + createTeamEscalationPolicyHandoffStep, + ), + ); +} + +export function createTeamEscalationPolicyHandoffStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateTeamEscalationPolicyHandoffStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamEscalationPolicyHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyHighTargetType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreateTeamEscalationPolicyHighTargetType); + +/** @internal */ +export const CreateTeamEscalationPolicyHighTargetType$outboundSchema: + z.ZodNativeEnum = + CreateTeamEscalationPolicyHighTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyHighTargetType$ { + /** @deprecated use `CreateTeamEscalationPolicyHighTargetType$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyHighTargetType$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyHighTargetType$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyHighTargetType$outboundSchema; +} + +/** @internal */ +export const CreateTeamEscalationPolicyHighHandoffStep$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyHighHandoffStep, + z.ZodTypeDef, + unknown +> = z.object({ + target_type: CreateTeamEscalationPolicyHighTargetType$inboundSchema, + target_id: z.string(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicyHighHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyHighHandoffStep$outboundSchema: + z.ZodType< + CreateTeamEscalationPolicyHighHandoffStep$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyHighHandoffStep + > = z.object({ + targetType: CreateTeamEscalationPolicyHighTargetType$outboundSchema, + targetId: z.string(), + }).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyHighHandoffStep$ { + /** @deprecated use `CreateTeamEscalationPolicyHighHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyHighHandoffStep$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyHighHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyHighHandoffStep$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyHighHandoffStep$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyHighHandoffStep$Outbound; +} + +export function createTeamEscalationPolicyHighHandoffStepToJSON( + createTeamEscalationPolicyHighHandoffStep: + CreateTeamEscalationPolicyHighHandoffStep, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyHighHandoffStep$outboundSchema.parse( + createTeamEscalationPolicyHighHandoffStep, + ), + ); +} + +export function createTeamEscalationPolicyHighHandoffStepFromJSON( + jsonString: string, +): SafeParseResult< + CreateTeamEscalationPolicyHighHandoffStep, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateTeamEscalationPolicyHighHandoffStep$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateTeamEscalationPolicyHighHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyHigh$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyHigh, + z.ZodTypeDef, + unknown +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoff_step: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyHighHandoffStep$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_step": "handoffStep", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicyHigh$Outbound = { + repetitions?: number | null | undefined; + handoff_step?: + | CreateTeamEscalationPolicyHighHandoffStep$Outbound + | null + | undefined; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyHigh$outboundSchema: z.ZodType< + CreateTeamEscalationPolicyHigh$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyHigh +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoffStep: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyHighHandoffStep$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + handoffStep: "handoff_step", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyHigh$ { + /** @deprecated use `CreateTeamEscalationPolicyHigh$inboundSchema` instead. */ + export const inboundSchema = CreateTeamEscalationPolicyHigh$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyHigh$outboundSchema` instead. */ + export const outboundSchema = CreateTeamEscalationPolicyHigh$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyHigh$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyHigh$Outbound; +} + +export function createTeamEscalationPolicyHighToJSON( + createTeamEscalationPolicyHigh: CreateTeamEscalationPolicyHigh, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyHigh$outboundSchema.parse( + createTeamEscalationPolicyHigh, + ), + ); +} + +export function createTeamEscalationPolicyHighFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamEscalationPolicyHigh$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamEscalationPolicyHigh' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyMediumTargetType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreateTeamEscalationPolicyMediumTargetType); + +/** @internal */ +export const CreateTeamEscalationPolicyMediumTargetType$outboundSchema: + z.ZodNativeEnum = + CreateTeamEscalationPolicyMediumTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyMediumTargetType$ { + /** @deprecated use `CreateTeamEscalationPolicyMediumTargetType$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyMediumTargetType$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyMediumTargetType$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyMediumTargetType$outboundSchema; +} + +/** @internal */ +export const CreateTeamEscalationPolicyMediumHandoffStep$inboundSchema: + z.ZodType< + CreateTeamEscalationPolicyMediumHandoffStep, + z.ZodTypeDef, + unknown + > = z.object({ + target_type: CreateTeamEscalationPolicyMediumTargetType$inboundSchema, + target_id: z.string(), + }).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); + }); + +/** @internal */ +export type CreateTeamEscalationPolicyMediumHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyMediumHandoffStep$outboundSchema: + z.ZodType< + CreateTeamEscalationPolicyMediumHandoffStep$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyMediumHandoffStep + > = z.object({ + targetType: CreateTeamEscalationPolicyMediumTargetType$outboundSchema, + targetId: z.string(), + }).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyMediumHandoffStep$ { + /** @deprecated use `CreateTeamEscalationPolicyMediumHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyMediumHandoffStep$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyMediumHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyMediumHandoffStep$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyMediumHandoffStep$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyMediumHandoffStep$Outbound; +} + +export function createTeamEscalationPolicyMediumHandoffStepToJSON( + createTeamEscalationPolicyMediumHandoffStep: + CreateTeamEscalationPolicyMediumHandoffStep, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyMediumHandoffStep$outboundSchema.parse( + createTeamEscalationPolicyMediumHandoffStep, + ), + ); +} + +export function createTeamEscalationPolicyMediumHandoffStepFromJSON( + jsonString: string, +): SafeParseResult< + CreateTeamEscalationPolicyMediumHandoffStep, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateTeamEscalationPolicyMediumHandoffStep$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateTeamEscalationPolicyMediumHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyMedium$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyMedium, + z.ZodTypeDef, + unknown +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoff_step: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyMediumHandoffStep$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_step": "handoffStep", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicyMedium$Outbound = { + repetitions?: number | null | undefined; + handoff_step?: + | CreateTeamEscalationPolicyMediumHandoffStep$Outbound + | null + | undefined; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyMedium$outboundSchema: z.ZodType< + CreateTeamEscalationPolicyMedium$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyMedium +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoffStep: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyMediumHandoffStep$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + handoffStep: "handoff_step", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyMedium$ { + /** @deprecated use `CreateTeamEscalationPolicyMedium$inboundSchema` instead. */ + export const inboundSchema = CreateTeamEscalationPolicyMedium$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyMedium$outboundSchema` instead. */ + export const outboundSchema = CreateTeamEscalationPolicyMedium$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyMedium$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyMedium$Outbound; +} + +export function createTeamEscalationPolicyMediumToJSON( + createTeamEscalationPolicyMedium: CreateTeamEscalationPolicyMedium, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyMedium$outboundSchema.parse( + createTeamEscalationPolicyMedium, + ), + ); +} + +export function createTeamEscalationPolicyMediumFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamEscalationPolicyMedium$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamEscalationPolicyMedium' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyLowTargetType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreateTeamEscalationPolicyLowTargetType); + +/** @internal */ +export const CreateTeamEscalationPolicyLowTargetType$outboundSchema: + z.ZodNativeEnum = + CreateTeamEscalationPolicyLowTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyLowTargetType$ { + /** @deprecated use `CreateTeamEscalationPolicyLowTargetType$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyLowTargetType$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyLowTargetType$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyLowTargetType$outboundSchema; +} + +/** @internal */ +export const CreateTeamEscalationPolicyLowHandoffStep$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyLowHandoffStep, + z.ZodTypeDef, + unknown +> = z.object({ + target_type: CreateTeamEscalationPolicyLowTargetType$inboundSchema, + target_id: z.string(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicyLowHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyLowHandoffStep$outboundSchema: z.ZodType< + CreateTeamEscalationPolicyLowHandoffStep$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyLowHandoffStep +> = z.object({ + targetType: CreateTeamEscalationPolicyLowTargetType$outboundSchema, + targetId: z.string(), +}).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyLowHandoffStep$ { + /** @deprecated use `CreateTeamEscalationPolicyLowHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyLowHandoffStep$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyLowHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyLowHandoffStep$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyLowHandoffStep$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyLowHandoffStep$Outbound; +} + +export function createTeamEscalationPolicyLowHandoffStepToJSON( + createTeamEscalationPolicyLowHandoffStep: + CreateTeamEscalationPolicyLowHandoffStep, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyLowHandoffStep$outboundSchema.parse( + createTeamEscalationPolicyLowHandoffStep, + ), + ); +} + +export function createTeamEscalationPolicyLowHandoffStepFromJSON( + jsonString: string, +): SafeParseResult< + CreateTeamEscalationPolicyLowHandoffStep, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateTeamEscalationPolicyLowHandoffStep$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateTeamEscalationPolicyLowHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyLow$inboundSchema: z.ZodType< + CreateTeamEscalationPolicyLow, + z.ZodTypeDef, + unknown +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoff_step: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyLowHandoffStep$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_step": "handoffStep", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicyLow$Outbound = { + repetitions?: number | null | undefined; + handoff_step?: + | CreateTeamEscalationPolicyLowHandoffStep$Outbound + | null + | undefined; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyLow$outboundSchema: z.ZodType< + CreateTeamEscalationPolicyLow$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyLow +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoffStep: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyLowHandoffStep$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + handoffStep: "handoff_step", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyLow$ { + /** @deprecated use `CreateTeamEscalationPolicyLow$inboundSchema` instead. */ + export const inboundSchema = CreateTeamEscalationPolicyLow$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyLow$outboundSchema` instead. */ + export const outboundSchema = CreateTeamEscalationPolicyLow$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyLow$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyLow$Outbound; +} + +export function createTeamEscalationPolicyLowToJSON( + createTeamEscalationPolicyLow: CreateTeamEscalationPolicyLow, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyLow$outboundSchema.parse( + createTeamEscalationPolicyLow, + ), + ); +} + +export function createTeamEscalationPolicyLowFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamEscalationPolicyLow$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamEscalationPolicyLow' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicyPrioritizedSettings$inboundSchema: + z.ZodType< + CreateTeamEscalationPolicyPrioritizedSettings, + z.ZodTypeDef, + unknown + > = z.object({ + high: z.nullable(z.lazy(() => CreateTeamEscalationPolicyHigh$inboundSchema)) + .optional(), + medium: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyMedium$inboundSchema), + ).optional(), + low: z.nullable(z.lazy(() => CreateTeamEscalationPolicyLow$inboundSchema)) + .optional(), + }); + +/** @internal */ +export type CreateTeamEscalationPolicyPrioritizedSettings$Outbound = { + high?: CreateTeamEscalationPolicyHigh$Outbound | null | undefined; + medium?: CreateTeamEscalationPolicyMedium$Outbound | null | undefined; + low?: CreateTeamEscalationPolicyLow$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateTeamEscalationPolicyPrioritizedSettings$outboundSchema: + z.ZodType< + CreateTeamEscalationPolicyPrioritizedSettings$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicyPrioritizedSettings + > = z.object({ + high: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyHigh$outboundSchema), + ).optional(), + medium: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyMedium$outboundSchema), + ).optional(), + low: z.nullable(z.lazy(() => CreateTeamEscalationPolicyLow$outboundSchema)) + .optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicyPrioritizedSettings$ { + /** @deprecated use `CreateTeamEscalationPolicyPrioritizedSettings$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamEscalationPolicyPrioritizedSettings$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyPrioritizedSettings$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamEscalationPolicyPrioritizedSettings$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicyPrioritizedSettings$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicyPrioritizedSettings$Outbound; +} + +export function createTeamEscalationPolicyPrioritizedSettingsToJSON( + createTeamEscalationPolicyPrioritizedSettings: + CreateTeamEscalationPolicyPrioritizedSettings, +): string { + return JSON.stringify( + CreateTeamEscalationPolicyPrioritizedSettings$outboundSchema.parse( + createTeamEscalationPolicyPrioritizedSettings, + ), + ); +} + +export function createTeamEscalationPolicyPrioritizedSettingsFromJSON( + jsonString: string, +): SafeParseResult< + CreateTeamEscalationPolicyPrioritizedSettings, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateTeamEscalationPolicyPrioritizedSettings$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateTeamEscalationPolicyPrioritizedSettings' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamEscalationPolicy$inboundSchema: z.ZodType< + CreateTeamEscalationPolicy, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + repetitions: z.nullable(z.number().int().default(0)), + default: z.nullable(z.boolean().default(false)), + step_strategy: z.nullable(z.string()).optional(), + steps: z.array(z.lazy(() => CreateTeamEscalationPolicyStep$inboundSchema)), + handoff_step: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyHandoffStep$inboundSchema), + ).optional(), + prioritized_settings: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyPrioritizedSettings$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "step_strategy": "stepStrategy", + "handoff_step": "handoffStep", + "prioritized_settings": "prioritizedSettings", + }); +}); + +/** @internal */ +export type CreateTeamEscalationPolicy$Outbound = { + name: string; + description?: string | null | undefined; + repetitions: number | null; + default: boolean | null; + step_strategy?: string | null | undefined; + steps: Array; + handoff_step?: + | CreateTeamEscalationPolicyHandoffStep$Outbound + | null + | undefined; + prioritized_settings?: + | CreateTeamEscalationPolicyPrioritizedSettings$Outbound + | null + | undefined; +}; + +/** @internal */ +export const CreateTeamEscalationPolicy$outboundSchema: z.ZodType< + CreateTeamEscalationPolicy$Outbound, + z.ZodTypeDef, + CreateTeamEscalationPolicy +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + repetitions: z.nullable(z.number().int().default(0)), + default: z.nullable(z.boolean().default(false)), + stepStrategy: z.nullable(z.string()).optional(), + steps: z.array(z.lazy(() => CreateTeamEscalationPolicyStep$outboundSchema)), + handoffStep: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyHandoffStep$outboundSchema), + ).optional(), + prioritizedSettings: z.nullable( + z.lazy(() => CreateTeamEscalationPolicyPrioritizedSettings$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + stepStrategy: "step_strategy", + handoffStep: "handoff_step", + prioritizedSettings: "prioritized_settings", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamEscalationPolicy$ { + /** @deprecated use `CreateTeamEscalationPolicy$inboundSchema` instead. */ + export const inboundSchema = CreateTeamEscalationPolicy$inboundSchema; + /** @deprecated use `CreateTeamEscalationPolicy$outboundSchema` instead. */ + export const outboundSchema = CreateTeamEscalationPolicy$outboundSchema; + /** @deprecated use `CreateTeamEscalationPolicy$Outbound` instead. */ + export type Outbound = CreateTeamEscalationPolicy$Outbound; +} + +export function createTeamEscalationPolicyToJSON( + createTeamEscalationPolicy: CreateTeamEscalationPolicy, +): string { + return JSON.stringify( + CreateTeamEscalationPolicy$outboundSchema.parse(createTeamEscalationPolicy), + ); +} + +export function createTeamEscalationPolicyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamEscalationPolicy$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamEscalationPolicy' from JSON`, + ); +} diff --git a/src/models/components/createteamoncallschedule.ts b/src/models/components/createteamoncallschedule.ts new file mode 100644 index 00000000..0b55ed5f --- /dev/null +++ b/src/models/components/createteamoncallschedule.ts @@ -0,0 +1,596 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateTeamOnCallScheduleMember = { + /** + * The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule + * + * @remarks + * multiple times to construct more complex rotations, and you can specify a `null` user ID to create + * unassigned slots in the rotation. + */ + userId?: string | null | undefined; +}; + +/** + * The type of strategy. Must be one of "daily", "weekly", or "custom". + */ +export const CreateTeamOnCallScheduleType = { + Daily: "daily", + Weekly: "weekly", + Custom: "custom", +} as const; +/** + * The type of strategy. Must be one of "daily", "weekly", or "custom". + */ +export type CreateTeamOnCallScheduleType = ClosedEnum< + typeof CreateTeamOnCallScheduleType +>; + +/** + * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + */ +export const CreateTeamOnCallScheduleHandoffDay = { + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", +} as const; +/** + * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + */ +export type CreateTeamOnCallScheduleHandoffDay = ClosedEnum< + typeof CreateTeamOnCallScheduleHandoffDay +>; + +/** + * An object that specifies how the schedule's on-call shifts should be generated. + */ +export type CreateTeamOnCallScheduleStrategy = { + /** + * The type of strategy. Must be one of "daily", "weekly", or "custom". + */ + type: CreateTeamOnCallScheduleType; + /** + * An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". + */ + handoffTime?: string | null | undefined; + /** + * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + */ + handoffDay?: CreateTeamOnCallScheduleHandoffDay | null | undefined; + /** + * An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". + */ + shiftDuration?: string | null | undefined; +}; + +/** + * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export const CreateTeamOnCallScheduleStartDay = { + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", +} as const; +/** + * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export type CreateTeamOnCallScheduleStartDay = ClosedEnum< + typeof CreateTeamOnCallScheduleStartDay +>; + +/** + * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export const CreateTeamOnCallScheduleEndDay = { + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", +} as const; +/** + * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export type CreateTeamOnCallScheduleEndDay = ClosedEnum< + typeof CreateTeamOnCallScheduleEndDay +>; + +export type CreateTeamOnCallScheduleRestriction = { + /** + * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + */ + startDay: CreateTeamOnCallScheduleStartDay; + /** + * An ISO8601 time string specifying when the restriction should start. + */ + startTime: string; + /** + * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + */ + endDay: CreateTeamOnCallScheduleEndDay; + /** + * An ISO8601 time string specifying when the restriction should end. + */ + endTime: string; +}; + +/** + * Create a Signals on-call schedule for a team. + */ +export type CreateTeamOnCallSchedule = { + /** + * The on-call schedule's name. + */ + name: string; + /** + * A detailed description of the on-call schedule. + */ + description?: string | null | undefined; + /** + * The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. + */ + timeZone: string; + /** + * The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. + */ + slackUserGroupId?: string | null | undefined; + /** + * An ordered list of objects that specify members of the on-call schedule's rotation. + */ + members?: Array | null | undefined; + /** + * An object that specifies how the schedule's on-call shifts should be generated. + */ + strategy: CreateTeamOnCallScheduleStrategy; + /** + * A list of objects that restrict the schedule to speccific on-call periods. + */ + restrictions?: Array | null | undefined; + /** + * An ISO8601 time string specifying when the schedule's first shift should start. This value is only used if the schedule's strategy is "custom". + */ + startTime?: string | null | undefined; + /** + * A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. + */ + color?: string | null | undefined; + /** + * This parameter is deprecated; use `members` instead. + */ + memberIds?: Array | null | undefined; +}; + +/** @internal */ +export const CreateTeamOnCallScheduleMember$inboundSchema: z.ZodType< + CreateTeamOnCallScheduleMember, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + }); +}); + +/** @internal */ +export type CreateTeamOnCallScheduleMember$Outbound = { + user_id?: string | null | undefined; +}; + +/** @internal */ +export const CreateTeamOnCallScheduleMember$outboundSchema: z.ZodType< + CreateTeamOnCallScheduleMember$Outbound, + z.ZodTypeDef, + CreateTeamOnCallScheduleMember +> = z.object({ + userId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallScheduleMember$ { + /** @deprecated use `CreateTeamOnCallScheduleMember$inboundSchema` instead. */ + export const inboundSchema = CreateTeamOnCallScheduleMember$inboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleMember$outboundSchema` instead. */ + export const outboundSchema = CreateTeamOnCallScheduleMember$outboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleMember$Outbound` instead. */ + export type Outbound = CreateTeamOnCallScheduleMember$Outbound; +} + +export function createTeamOnCallScheduleMemberToJSON( + createTeamOnCallScheduleMember: CreateTeamOnCallScheduleMember, +): string { + return JSON.stringify( + CreateTeamOnCallScheduleMember$outboundSchema.parse( + createTeamOnCallScheduleMember, + ), + ); +} + +export function createTeamOnCallScheduleMemberFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamOnCallScheduleMember$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamOnCallScheduleMember' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamOnCallScheduleType$inboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleType +> = z.nativeEnum(CreateTeamOnCallScheduleType); + +/** @internal */ +export const CreateTeamOnCallScheduleType$outboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleType +> = CreateTeamOnCallScheduleType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallScheduleType$ { + /** @deprecated use `CreateTeamOnCallScheduleType$inboundSchema` instead. */ + export const inboundSchema = CreateTeamOnCallScheduleType$inboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleType$outboundSchema` instead. */ + export const outboundSchema = CreateTeamOnCallScheduleType$outboundSchema; +} + +/** @internal */ +export const CreateTeamOnCallScheduleHandoffDay$inboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleHandoffDay +> = z.nativeEnum(CreateTeamOnCallScheduleHandoffDay); + +/** @internal */ +export const CreateTeamOnCallScheduleHandoffDay$outboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleHandoffDay +> = CreateTeamOnCallScheduleHandoffDay$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallScheduleHandoffDay$ { + /** @deprecated use `CreateTeamOnCallScheduleHandoffDay$inboundSchema` instead. */ + export const inboundSchema = CreateTeamOnCallScheduleHandoffDay$inboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleHandoffDay$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamOnCallScheduleHandoffDay$outboundSchema; +} + +/** @internal */ +export const CreateTeamOnCallScheduleStrategy$inboundSchema: z.ZodType< + CreateTeamOnCallScheduleStrategy, + z.ZodTypeDef, + unknown +> = z.object({ + type: CreateTeamOnCallScheduleType$inboundSchema, + handoff_time: z.nullable(z.string()).optional(), + handoff_day: z.nullable(CreateTeamOnCallScheduleHandoffDay$inboundSchema) + .optional(), + shift_duration: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_time": "handoffTime", + "handoff_day": "handoffDay", + "shift_duration": "shiftDuration", + }); +}); + +/** @internal */ +export type CreateTeamOnCallScheduleStrategy$Outbound = { + type: string; + handoff_time?: string | null | undefined; + handoff_day?: string | null | undefined; + shift_duration?: string | null | undefined; +}; + +/** @internal */ +export const CreateTeamOnCallScheduleStrategy$outboundSchema: z.ZodType< + CreateTeamOnCallScheduleStrategy$Outbound, + z.ZodTypeDef, + CreateTeamOnCallScheduleStrategy +> = z.object({ + type: CreateTeamOnCallScheduleType$outboundSchema, + handoffTime: z.nullable(z.string()).optional(), + handoffDay: z.nullable(CreateTeamOnCallScheduleHandoffDay$outboundSchema) + .optional(), + shiftDuration: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + handoffTime: "handoff_time", + handoffDay: "handoff_day", + shiftDuration: "shift_duration", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallScheduleStrategy$ { + /** @deprecated use `CreateTeamOnCallScheduleStrategy$inboundSchema` instead. */ + export const inboundSchema = CreateTeamOnCallScheduleStrategy$inboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleStrategy$outboundSchema` instead. */ + export const outboundSchema = CreateTeamOnCallScheduleStrategy$outboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleStrategy$Outbound` instead. */ + export type Outbound = CreateTeamOnCallScheduleStrategy$Outbound; +} + +export function createTeamOnCallScheduleStrategyToJSON( + createTeamOnCallScheduleStrategy: CreateTeamOnCallScheduleStrategy, +): string { + return JSON.stringify( + CreateTeamOnCallScheduleStrategy$outboundSchema.parse( + createTeamOnCallScheduleStrategy, + ), + ); +} + +export function createTeamOnCallScheduleStrategyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamOnCallScheduleStrategy$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamOnCallScheduleStrategy' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamOnCallScheduleStartDay$inboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleStartDay +> = z.nativeEnum(CreateTeamOnCallScheduleStartDay); + +/** @internal */ +export const CreateTeamOnCallScheduleStartDay$outboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleStartDay +> = CreateTeamOnCallScheduleStartDay$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallScheduleStartDay$ { + /** @deprecated use `CreateTeamOnCallScheduleStartDay$inboundSchema` instead. */ + export const inboundSchema = CreateTeamOnCallScheduleStartDay$inboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleStartDay$outboundSchema` instead. */ + export const outboundSchema = CreateTeamOnCallScheduleStartDay$outboundSchema; +} + +/** @internal */ +export const CreateTeamOnCallScheduleEndDay$inboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleEndDay +> = z.nativeEnum(CreateTeamOnCallScheduleEndDay); + +/** @internal */ +export const CreateTeamOnCallScheduleEndDay$outboundSchema: z.ZodNativeEnum< + typeof CreateTeamOnCallScheduleEndDay +> = CreateTeamOnCallScheduleEndDay$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallScheduleEndDay$ { + /** @deprecated use `CreateTeamOnCallScheduleEndDay$inboundSchema` instead. */ + export const inboundSchema = CreateTeamOnCallScheduleEndDay$inboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleEndDay$outboundSchema` instead. */ + export const outboundSchema = CreateTeamOnCallScheduleEndDay$outboundSchema; +} + +/** @internal */ +export const CreateTeamOnCallScheduleRestriction$inboundSchema: z.ZodType< + CreateTeamOnCallScheduleRestriction, + z.ZodTypeDef, + unknown +> = z.object({ + start_day: CreateTeamOnCallScheduleStartDay$inboundSchema, + start_time: z.string(), + end_day: CreateTeamOnCallScheduleEndDay$inboundSchema, + end_time: z.string(), +}).transform((v) => { + return remap$(v, { + "start_day": "startDay", + "start_time": "startTime", + "end_day": "endDay", + "end_time": "endTime", + }); +}); + +/** @internal */ +export type CreateTeamOnCallScheduleRestriction$Outbound = { + start_day: string; + start_time: string; + end_day: string; + end_time: string; +}; + +/** @internal */ +export const CreateTeamOnCallScheduleRestriction$outboundSchema: z.ZodType< + CreateTeamOnCallScheduleRestriction$Outbound, + z.ZodTypeDef, + CreateTeamOnCallScheduleRestriction +> = z.object({ + startDay: CreateTeamOnCallScheduleStartDay$outboundSchema, + startTime: z.string(), + endDay: CreateTeamOnCallScheduleEndDay$outboundSchema, + endTime: z.string(), +}).transform((v) => { + return remap$(v, { + startDay: "start_day", + startTime: "start_time", + endDay: "end_day", + endTime: "end_time", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallScheduleRestriction$ { + /** @deprecated use `CreateTeamOnCallScheduleRestriction$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamOnCallScheduleRestriction$inboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleRestriction$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamOnCallScheduleRestriction$outboundSchema; + /** @deprecated use `CreateTeamOnCallScheduleRestriction$Outbound` instead. */ + export type Outbound = CreateTeamOnCallScheduleRestriction$Outbound; +} + +export function createTeamOnCallScheduleRestrictionToJSON( + createTeamOnCallScheduleRestriction: CreateTeamOnCallScheduleRestriction, +): string { + return JSON.stringify( + CreateTeamOnCallScheduleRestriction$outboundSchema.parse( + createTeamOnCallScheduleRestriction, + ), + ); +} + +export function createTeamOnCallScheduleRestrictionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateTeamOnCallScheduleRestriction$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamOnCallScheduleRestriction' from JSON`, + ); +} + +/** @internal */ +export const CreateTeamOnCallSchedule$inboundSchema: z.ZodType< + CreateTeamOnCallSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + time_zone: z.string(), + slack_user_group_id: z.nullable(z.string()).optional(), + members: z.nullable( + z.array(z.lazy(() => CreateTeamOnCallScheduleMember$inboundSchema)), + ).optional(), + strategy: z.lazy(() => CreateTeamOnCallScheduleStrategy$inboundSchema), + restrictions: z.nullable( + z.array(z.lazy(() => CreateTeamOnCallScheduleRestriction$inboundSchema)), + ).optional(), + start_time: z.nullable(z.string()).optional(), + color: z.nullable(z.string()).optional(), + member_ids: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "time_zone": "timeZone", + "slack_user_group_id": "slackUserGroupId", + "start_time": "startTime", + "member_ids": "memberIds", + }); +}); + +/** @internal */ +export type CreateTeamOnCallSchedule$Outbound = { + name: string; + description?: string | null | undefined; + time_zone: string; + slack_user_group_id?: string | null | undefined; + members?: Array | null | undefined; + strategy: CreateTeamOnCallScheduleStrategy$Outbound; + restrictions?: + | Array + | null + | undefined; + start_time?: string | null | undefined; + color?: string | null | undefined; + member_ids?: Array | null | undefined; +}; + +/** @internal */ +export const CreateTeamOnCallSchedule$outboundSchema: z.ZodType< + CreateTeamOnCallSchedule$Outbound, + z.ZodTypeDef, + CreateTeamOnCallSchedule +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), + timeZone: z.string(), + slackUserGroupId: z.nullable(z.string()).optional(), + members: z.nullable( + z.array(z.lazy(() => CreateTeamOnCallScheduleMember$outboundSchema)), + ).optional(), + strategy: z.lazy(() => CreateTeamOnCallScheduleStrategy$outboundSchema), + restrictions: z.nullable( + z.array(z.lazy(() => CreateTeamOnCallScheduleRestriction$outboundSchema)), + ).optional(), + startTime: z.nullable(z.string()).optional(), + color: z.nullable(z.string()).optional(), + memberIds: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + timeZone: "time_zone", + slackUserGroupId: "slack_user_group_id", + startTime: "start_time", + memberIds: "member_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamOnCallSchedule$ { + /** @deprecated use `CreateTeamOnCallSchedule$inboundSchema` instead. */ + export const inboundSchema = CreateTeamOnCallSchedule$inboundSchema; + /** @deprecated use `CreateTeamOnCallSchedule$outboundSchema` instead. */ + export const outboundSchema = CreateTeamOnCallSchedule$outboundSchema; + /** @deprecated use `CreateTeamOnCallSchedule$Outbound` instead. */ + export type Outbound = CreateTeamOnCallSchedule$Outbound; +} + +export function createTeamOnCallScheduleToJSON( + createTeamOnCallSchedule: CreateTeamOnCallSchedule, +): string { + return JSON.stringify( + CreateTeamOnCallSchedule$outboundSchema.parse(createTeamOnCallSchedule), + ); +} + +export function createTeamOnCallScheduleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamOnCallSchedule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamOnCallSchedule' from JSON`, + ); +} diff --git a/src/models/components/createteamsignalrule.ts b/src/models/components/createteamsignalrule.ts new file mode 100644 index 00000000..917b045c --- /dev/null +++ b/src/models/components/createteamsignalrule.ts @@ -0,0 +1,269 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The type of target that the rule will notify when matched. + */ +export const CreateTeamSignalRuleTargetType = { + EscalationPolicy: "EscalationPolicy", + OnCallSchedule: "OnCallSchedule", + User: "User", + Webhook: "Webhook", + SlackChannel: "SlackChannel", +} as const; +/** + * The type of target that the rule will notify when matched. + */ +export type CreateTeamSignalRuleTargetType = ClosedEnum< + typeof CreateTeamSignalRuleTargetType +>; + +/** + * A notification priority that will be set on the resulting alert (default: HIGH) + */ +export const CreateTeamSignalRuleNotificationPriorityOverride = { + High: "HIGH", + Medium: "MEDIUM", + Low: "LOW", + Unknown: "", +} as const; +/** + * A notification priority that will be set on the resulting alert (default: HIGH) + */ +export type CreateTeamSignalRuleNotificationPriorityOverride = ClosedEnum< + typeof CreateTeamSignalRuleNotificationPriorityOverride +>; + +/** + * Determines when an incident should be created when this rule is matched + */ +export const CreateTeamSignalRuleCreateIncidentConditionWhen = { + WhenUnspecified: "WHEN_UNSPECIFIED", + WhenAlways: "WHEN_ALWAYS", +} as const; +/** + * Determines when an incident should be created when this rule is matched + */ +export type CreateTeamSignalRuleCreateIncidentConditionWhen = ClosedEnum< + typeof CreateTeamSignalRuleCreateIncidentConditionWhen +>; + +/** + * Create a Signals rule for a team. + */ +export type CreateTeamSignalRule = { + /** + * The rule's name. + */ + name: string; + /** + * The CEL expression that defines the rule. + */ + expression: string; + /** + * The type of target that the rule will notify when matched. + */ + targetType: CreateTeamSignalRuleTargetType; + /** + * The ID of the target that the rule will notify when matched. + */ + targetId: string; + /** + * The ID of an incident type that should be used when an alert is promoted to an incident + */ + incidentTypeId?: string | null | undefined; + /** + * A notification priority that will be set on the resulting alert (default: HIGH) + */ + notificationPriorityOverride?: + | CreateTeamSignalRuleNotificationPriorityOverride + | null + | undefined; + /** + * Determines when an incident should be created when this rule is matched + */ + createIncidentConditionWhen?: + | CreateTeamSignalRuleCreateIncidentConditionWhen + | null + | undefined; + /** + * The amount of time alerts created from this rule will be deduplicated + */ + deduplicationExpiry?: string | null | undefined; +}; + +/** @internal */ +export const CreateTeamSignalRuleTargetType$inboundSchema: z.ZodNativeEnum< + typeof CreateTeamSignalRuleTargetType +> = z.nativeEnum(CreateTeamSignalRuleTargetType); + +/** @internal */ +export const CreateTeamSignalRuleTargetType$outboundSchema: z.ZodNativeEnum< + typeof CreateTeamSignalRuleTargetType +> = CreateTeamSignalRuleTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamSignalRuleTargetType$ { + /** @deprecated use `CreateTeamSignalRuleTargetType$inboundSchema` instead. */ + export const inboundSchema = CreateTeamSignalRuleTargetType$inboundSchema; + /** @deprecated use `CreateTeamSignalRuleTargetType$outboundSchema` instead. */ + export const outboundSchema = CreateTeamSignalRuleTargetType$outboundSchema; +} + +/** @internal */ +export const CreateTeamSignalRuleNotificationPriorityOverride$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreateTeamSignalRuleNotificationPriorityOverride); + +/** @internal */ +export const CreateTeamSignalRuleNotificationPriorityOverride$outboundSchema: + z.ZodNativeEnum = + CreateTeamSignalRuleNotificationPriorityOverride$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamSignalRuleNotificationPriorityOverride$ { + /** @deprecated use `CreateTeamSignalRuleNotificationPriorityOverride$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamSignalRuleNotificationPriorityOverride$inboundSchema; + /** @deprecated use `CreateTeamSignalRuleNotificationPriorityOverride$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamSignalRuleNotificationPriorityOverride$outboundSchema; +} + +/** @internal */ +export const CreateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(CreateTeamSignalRuleCreateIncidentConditionWhen); + +/** @internal */ +export const CreateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema: + z.ZodNativeEnum = + CreateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamSignalRuleCreateIncidentConditionWhen$ { + /** @deprecated use `CreateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema` instead. */ + export const inboundSchema = + CreateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema; + /** @deprecated use `CreateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema` instead. */ + export const outboundSchema = + CreateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema; +} + +/** @internal */ +export const CreateTeamSignalRule$inboundSchema: z.ZodType< + CreateTeamSignalRule, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + expression: z.string(), + target_type: CreateTeamSignalRuleTargetType$inboundSchema, + target_id: z.string(), + incident_type_id: z.nullable(z.string()).optional(), + notification_priority_override: z.nullable( + CreateTeamSignalRuleNotificationPriorityOverride$inboundSchema, + ).optional(), + create_incident_condition_when: z.nullable( + CreateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema, + ).optional(), + deduplication_expiry: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + "incident_type_id": "incidentTypeId", + "notification_priority_override": "notificationPriorityOverride", + "create_incident_condition_when": "createIncidentConditionWhen", + "deduplication_expiry": "deduplicationExpiry", + }); +}); + +/** @internal */ +export type CreateTeamSignalRule$Outbound = { + name: string; + expression: string; + target_type: string; + target_id: string; + incident_type_id?: string | null | undefined; + notification_priority_override?: string | null | undefined; + create_incident_condition_when?: string | null | undefined; + deduplication_expiry?: string | null | undefined; +}; + +/** @internal */ +export const CreateTeamSignalRule$outboundSchema: z.ZodType< + CreateTeamSignalRule$Outbound, + z.ZodTypeDef, + CreateTeamSignalRule +> = z.object({ + name: z.string(), + expression: z.string(), + targetType: CreateTeamSignalRuleTargetType$outboundSchema, + targetId: z.string(), + incidentTypeId: z.nullable(z.string()).optional(), + notificationPriorityOverride: z.nullable( + CreateTeamSignalRuleNotificationPriorityOverride$outboundSchema, + ).optional(), + createIncidentConditionWhen: z.nullable( + CreateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema, + ).optional(), + deduplicationExpiry: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + incidentTypeId: "incident_type_id", + notificationPriorityOverride: "notification_priority_override", + createIncidentConditionWhen: "create_incident_condition_when", + deduplicationExpiry: "deduplication_expiry", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTeamSignalRule$ { + /** @deprecated use `CreateTeamSignalRule$inboundSchema` instead. */ + export const inboundSchema = CreateTeamSignalRule$inboundSchema; + /** @deprecated use `CreateTeamSignalRule$outboundSchema` instead. */ + export const outboundSchema = CreateTeamSignalRule$outboundSchema; + /** @deprecated use `CreateTeamSignalRule$Outbound` instead. */ + export type Outbound = CreateTeamSignalRule$Outbound; +} + +export function createTeamSignalRuleToJSON( + createTeamSignalRule: CreateTeamSignalRule, +): string { + return JSON.stringify( + CreateTeamSignalRule$outboundSchema.parse(createTeamSignalRule), + ); +} + +export function createTeamSignalRuleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTeamSignalRule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTeamSignalRule' from JSON`, + ); +} diff --git a/src/models/components/createticket.ts b/src/models/components/createticket.ts new file mode 100644 index 00000000..8de07bb4 --- /dev/null +++ b/src/models/components/createticket.ts @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Creates a ticket for a project + */ +export type CreateTicket = { + summary: string; + /** + * Which incident this ticket is related to, in the format of 'incident/UUID' + */ + relatedTo?: string | null | undefined; + projectId?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + type?: string | null | undefined; + priorityId?: string | null | undefined; + /** + * List of tags for the ticket + */ + tagList?: Array | null | undefined; + /** + * The remote URL for an existing ticket in a supported and configured ticketing integration + */ + remoteUrl?: string | null | undefined; +}; + +/** @internal */ +export const CreateTicket$inboundSchema: z.ZodType< + CreateTicket, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.string(), + related_to: z.nullable(z.string()).optional(), + project_id: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + priority_id: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + remote_url: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "related_to": "relatedTo", + "project_id": "projectId", + "priority_id": "priorityId", + "tag_list": "tagList", + "remote_url": "remoteUrl", + }); +}); + +/** @internal */ +export type CreateTicket$Outbound = { + summary: string; + related_to?: string | null | undefined; + project_id?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + type?: string | null | undefined; + priority_id?: string | null | undefined; + tag_list?: Array | null | undefined; + remote_url?: string | null | undefined; +}; + +/** @internal */ +export const CreateTicket$outboundSchema: z.ZodType< + CreateTicket$Outbound, + z.ZodTypeDef, + CreateTicket +> = z.object({ + summary: z.string(), + relatedTo: z.nullable(z.string()).optional(), + projectId: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + priorityId: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + remoteUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + relatedTo: "related_to", + projectId: "project_id", + priorityId: "priority_id", + tagList: "tag_list", + remoteUrl: "remote_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTicket$ { + /** @deprecated use `CreateTicket$inboundSchema` instead. */ + export const inboundSchema = CreateTicket$inboundSchema; + /** @deprecated use `CreateTicket$outboundSchema` instead. */ + export const outboundSchema = CreateTicket$outboundSchema; + /** @deprecated use `CreateTicket$Outbound` instead. */ + export type Outbound = CreateTicket$Outbound; +} + +export function createTicketToJSON(createTicket: CreateTicket): string { + return JSON.stringify(CreateTicket$outboundSchema.parse(createTicket)); +} + +export function createTicketFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTicket$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTicket' from JSON`, + ); +} diff --git a/src/models/components/createticketingpriority.ts b/src/models/components/createticketingpriority.ts new file mode 100644 index 00000000..743855d7 --- /dev/null +++ b/src/models/components/createticketingpriority.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a single ticketing priority + */ +export type CreateTicketingPriority = { + name: string; + /** + * The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, that priority and all priorities following it will automatically be moved down the list to make room for the new priority. + */ + position?: number | null | undefined; +}; + +/** @internal */ +export const CreateTicketingPriority$inboundSchema: z.ZodType< + CreateTicketingPriority, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + position: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type CreateTicketingPriority$Outbound = { + name: string; + position?: number | null | undefined; +}; + +/** @internal */ +export const CreateTicketingPriority$outboundSchema: z.ZodType< + CreateTicketingPriority$Outbound, + z.ZodTypeDef, + CreateTicketingPriority +> = z.object({ + name: z.string(), + position: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTicketingPriority$ { + /** @deprecated use `CreateTicketingPriority$inboundSchema` instead. */ + export const inboundSchema = CreateTicketingPriority$inboundSchema; + /** @deprecated use `CreateTicketingPriority$outboundSchema` instead. */ + export const outboundSchema = CreateTicketingPriority$outboundSchema; + /** @deprecated use `CreateTicketingPriority$Outbound` instead. */ + export type Outbound = CreateTicketingPriority$Outbound; +} + +export function createTicketingPriorityToJSON( + createTicketingPriority: CreateTicketingPriority, +): string { + return JSON.stringify( + CreateTicketingPriority$outboundSchema.parse(createTicketingPriority), + ); +} + +export function createTicketingPriorityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTicketingPriority$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTicketingPriority' from JSON`, + ); +} diff --git a/src/models/components/createwebhook.ts b/src/models/components/createwebhook.ts new file mode 100644 index 00000000..39640595 --- /dev/null +++ b/src/models/components/createwebhook.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Create a new webhook + */ +export type CreateWebhook = { + url: string; +}; + +/** @internal */ +export const CreateWebhook$inboundSchema: z.ZodType< + CreateWebhook, + z.ZodTypeDef, + unknown +> = z.object({ + url: z.string(), +}); + +/** @internal */ +export type CreateWebhook$Outbound = { + url: string; +}; + +/** @internal */ +export const CreateWebhook$outboundSchema: z.ZodType< + CreateWebhook$Outbound, + z.ZodTypeDef, + CreateWebhook +> = z.object({ + url: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateWebhook$ { + /** @deprecated use `CreateWebhook$inboundSchema` instead. */ + export const inboundSchema = CreateWebhook$inboundSchema; + /** @deprecated use `CreateWebhook$outboundSchema` instead. */ + export const outboundSchema = CreateWebhook$outboundSchema; + /** @deprecated use `CreateWebhook$Outbound` instead. */ + export type Outbound = CreateWebhook$Outbound; +} + +export function createWebhookToJSON(createWebhook: CreateWebhook): string { + return JSON.stringify(CreateWebhook$outboundSchema.parse(createWebhook)); +} + +export function createWebhookFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateWebhook$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateWebhook' from JSON`, + ); +} diff --git a/src/models/components/currentuserentity.ts b/src/models/components/currentuserentity.ts index 16f1ca1f..de040e3e 100644 --- a/src/models/components/currentuserentity.ts +++ b/src/models/components/currentuserentity.ts @@ -18,15 +18,15 @@ import { * CurrentUserEntity model */ export type CurrentUserEntity = { - id?: string | undefined; - name?: string | undefined; - source?: string | undefined; - email?: string | undefined; - role?: string | undefined; - teams?: Array | undefined; - organizationId?: string | undefined; - organizationName?: string | undefined; - accountId?: number | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; + role?: string | null | undefined; + teams?: Array | null | undefined; + organizationId?: string | null | undefined; + organizationName?: string | null | undefined; + accountId?: number | null | undefined; }; /** @internal */ @@ -35,15 +35,15 @@ export const CurrentUserEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - source: z.string().optional(), - email: z.string().optional(), - role: z.string().optional(), - teams: z.array(SuccinctEntity$inboundSchema).optional(), - organization_id: z.string().optional(), - organization_name: z.string().optional(), - account_id: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + role: z.nullable(z.string()).optional(), + teams: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + organization_id: z.nullable(z.string()).optional(), + organization_name: z.nullable(z.string()).optional(), + account_id: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "organization_id": "organizationId", @@ -54,15 +54,15 @@ export const CurrentUserEntity$inboundSchema: z.ZodType< /** @internal */ export type CurrentUserEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - source?: string | undefined; - email?: string | undefined; - role?: string | undefined; - teams?: Array | undefined; - organization_id?: string | undefined; - organization_name?: string | undefined; - account_id?: number | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; + role?: string | null | undefined; + teams?: Array | null | undefined; + organization_id?: string | null | undefined; + organization_name?: string | null | undefined; + account_id?: number | null | undefined; }; /** @internal */ @@ -71,15 +71,15 @@ export const CurrentUserEntity$outboundSchema: z.ZodType< z.ZodTypeDef, CurrentUserEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - source: z.string().optional(), - email: z.string().optional(), - role: z.string().optional(), - teams: z.array(SuccinctEntity$outboundSchema).optional(), - organizationId: z.string().optional(), - organizationName: z.string().optional(), - accountId: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + role: z.nullable(z.string()).optional(), + teams: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + organizationId: z.nullable(z.string()).optional(), + organizationName: z.nullable(z.string()).optional(), + accountId: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { organizationId: "organization_id", diff --git a/src/models/components/customfieldsfieldvalue.ts b/src/models/components/customfieldsfieldvalue.ts index fff34ad2..1cf14828 100644 --- a/src/models/components/customfieldsfieldvalue.ts +++ b/src/models/components/customfieldsfieldvalue.ts @@ -9,15 +9,15 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CustomFieldsFieldValue = { - name?: string | undefined; - valueType?: string | undefined; - displayName?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - fieldId?: string | undefined; - valueArray?: string | undefined; - valueString?: string | undefined; - value?: string | undefined; + name?: string | null | undefined; + valueType?: string | null | undefined; + displayName?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + fieldId?: string | null | undefined; + valueArray?: Array | null | undefined; + valueString?: string | null | undefined; + value?: string | null | undefined; }; /** @internal */ @@ -26,15 +26,15 @@ export const CustomFieldsFieldValue$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - name: z.string().optional(), - value_type: z.string().optional(), - display_name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - field_id: z.string().optional(), - value_array: z.string().optional(), - value_string: z.string().optional(), - value: z.string().optional(), + name: z.nullable(z.string()).optional(), + value_type: z.nullable(z.string()).optional(), + display_name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + field_id: z.nullable(z.string()).optional(), + value_array: z.nullable(z.array(z.string())).optional(), + value_string: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "value_type": "valueType", @@ -47,15 +47,15 @@ export const CustomFieldsFieldValue$inboundSchema: z.ZodType< /** @internal */ export type CustomFieldsFieldValue$Outbound = { - name?: string | undefined; - value_type?: string | undefined; - display_name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - field_id?: string | undefined; - value_array?: string | undefined; - value_string?: string | undefined; - value?: string | undefined; + name?: string | null | undefined; + value_type?: string | null | undefined; + display_name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + field_id?: string | null | undefined; + value_array?: Array | null | undefined; + value_string?: string | null | undefined; + value?: string | null | undefined; }; /** @internal */ @@ -64,15 +64,15 @@ export const CustomFieldsFieldValue$outboundSchema: z.ZodType< z.ZodTypeDef, CustomFieldsFieldValue > = z.object({ - name: z.string().optional(), - valueType: z.string().optional(), - displayName: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - fieldId: z.string().optional(), - valueArray: z.string().optional(), - valueString: z.string().optional(), - value: z.string().optional(), + name: z.nullable(z.string()).optional(), + valueType: z.nullable(z.string()).optional(), + displayName: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + fieldId: z.nullable(z.string()).optional(), + valueArray: z.nullable(z.array(z.string())).optional(), + valueString: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { valueType: "value_type", diff --git a/src/models/components/debugsignalsexpression.ts b/src/models/components/debugsignalsexpression.ts new file mode 100644 index 00000000..7d34ffac --- /dev/null +++ b/src/models/components/debugsignalsexpression.ts @@ -0,0 +1,338 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type Annotations = {}; + +export type Image = { + src?: string | null | undefined; + alt?: string | null | undefined; +}; + +export type DebugSignalsExpressionLink = { + href?: string | null | undefined; + text?: string | null | undefined; +}; + +export type Signal = { + id?: string | null | undefined; + organizationId?: string | null | undefined; + summary?: string | null | undefined; + body?: string | null | undefined; + level?: string | null | undefined; + annotations?: Annotations | null | undefined; + tags?: Array | null | undefined; + images?: Array | null | undefined; + links?: Array | null | undefined; +}; + +/** + * Debug Signals expressions + */ +export type DebugSignalsExpression = { + /** + * CEL expression + */ + expression: string; + /** + * List of signals to evaluate rule expression against + */ + signals: Array; +}; + +/** @internal */ +export const Annotations$inboundSchema: z.ZodType< + Annotations, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type Annotations$Outbound = {}; + +/** @internal */ +export const Annotations$outboundSchema: z.ZodType< + Annotations$Outbound, + z.ZodTypeDef, + Annotations +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Annotations$ { + /** @deprecated use `Annotations$inboundSchema` instead. */ + export const inboundSchema = Annotations$inboundSchema; + /** @deprecated use `Annotations$outboundSchema` instead. */ + export const outboundSchema = Annotations$outboundSchema; + /** @deprecated use `Annotations$Outbound` instead. */ + export type Outbound = Annotations$Outbound; +} + +export function annotationsToJSON(annotations: Annotations): string { + return JSON.stringify(Annotations$outboundSchema.parse(annotations)); +} + +export function annotationsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Annotations$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Annotations' from JSON`, + ); +} + +/** @internal */ +export const Image$inboundSchema: z.ZodType = z + .object({ + src: z.nullable(z.string()).optional(), + alt: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type Image$Outbound = { + src?: string | null | undefined; + alt?: string | null | undefined; +}; + +/** @internal */ +export const Image$outboundSchema: z.ZodType< + Image$Outbound, + z.ZodTypeDef, + Image +> = z.object({ + src: z.nullable(z.string()).optional(), + alt: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Image$ { + /** @deprecated use `Image$inboundSchema` instead. */ + export const inboundSchema = Image$inboundSchema; + /** @deprecated use `Image$outboundSchema` instead. */ + export const outboundSchema = Image$outboundSchema; + /** @deprecated use `Image$Outbound` instead. */ + export type Outbound = Image$Outbound; +} + +export function imageToJSON(image: Image): string { + return JSON.stringify(Image$outboundSchema.parse(image)); +} + +export function imageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Image$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Image' from JSON`, + ); +} + +/** @internal */ +export const DebugSignalsExpressionLink$inboundSchema: z.ZodType< + DebugSignalsExpressionLink, + z.ZodTypeDef, + unknown +> = z.object({ + href: z.nullable(z.string()).optional(), + text: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type DebugSignalsExpressionLink$Outbound = { + href?: string | null | undefined; + text?: string | null | undefined; +}; + +/** @internal */ +export const DebugSignalsExpressionLink$outboundSchema: z.ZodType< + DebugSignalsExpressionLink$Outbound, + z.ZodTypeDef, + DebugSignalsExpressionLink +> = z.object({ + href: z.nullable(z.string()).optional(), + text: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DebugSignalsExpressionLink$ { + /** @deprecated use `DebugSignalsExpressionLink$inboundSchema` instead. */ + export const inboundSchema = DebugSignalsExpressionLink$inboundSchema; + /** @deprecated use `DebugSignalsExpressionLink$outboundSchema` instead. */ + export const outboundSchema = DebugSignalsExpressionLink$outboundSchema; + /** @deprecated use `DebugSignalsExpressionLink$Outbound` instead. */ + export type Outbound = DebugSignalsExpressionLink$Outbound; +} + +export function debugSignalsExpressionLinkToJSON( + debugSignalsExpressionLink: DebugSignalsExpressionLink, +): string { + return JSON.stringify( + DebugSignalsExpressionLink$outboundSchema.parse(debugSignalsExpressionLink), + ); +} + +export function debugSignalsExpressionLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DebugSignalsExpressionLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DebugSignalsExpressionLink' from JSON`, + ); +} + +/** @internal */ +export const Signal$inboundSchema: z.ZodType = z + .object({ + id: z.nullable(z.string()).optional(), + organization_id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + level: z.nullable(z.string()).optional(), + annotations: z.nullable(z.lazy(() => Annotations$inboundSchema)).optional(), + tags: z.nullable(z.array(z.string())).optional(), + images: z.nullable(z.array(z.lazy(() => Image$inboundSchema))).optional(), + links: z.nullable( + z.array(z.lazy(() => DebugSignalsExpressionLink$inboundSchema)), + ).optional(), + }).transform((v) => { + return remap$(v, { + "organization_id": "organizationId", + }); + }); + +/** @internal */ +export type Signal$Outbound = { + id?: string | null | undefined; + organization_id?: string | null | undefined; + summary?: string | null | undefined; + body?: string | null | undefined; + level?: string | null | undefined; + annotations?: Annotations$Outbound | null | undefined; + tags?: Array | null | undefined; + images?: Array | null | undefined; + links?: Array | null | undefined; +}; + +/** @internal */ +export const Signal$outboundSchema: z.ZodType< + Signal$Outbound, + z.ZodTypeDef, + Signal +> = z.object({ + id: z.nullable(z.string()).optional(), + organizationId: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + level: z.nullable(z.string()).optional(), + annotations: z.nullable(z.lazy(() => Annotations$outboundSchema)).optional(), + tags: z.nullable(z.array(z.string())).optional(), + images: z.nullable(z.array(z.lazy(() => Image$outboundSchema))).optional(), + links: z.nullable( + z.array(z.lazy(() => DebugSignalsExpressionLink$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + organizationId: "organization_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Signal$ { + /** @deprecated use `Signal$inboundSchema` instead. */ + export const inboundSchema = Signal$inboundSchema; + /** @deprecated use `Signal$outboundSchema` instead. */ + export const outboundSchema = Signal$outboundSchema; + /** @deprecated use `Signal$Outbound` instead. */ + export type Outbound = Signal$Outbound; +} + +export function signalToJSON(signal: Signal): string { + return JSON.stringify(Signal$outboundSchema.parse(signal)); +} + +export function signalFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Signal$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Signal' from JSON`, + ); +} + +/** @internal */ +export const DebugSignalsExpression$inboundSchema: z.ZodType< + DebugSignalsExpression, + z.ZodTypeDef, + unknown +> = z.object({ + expression: z.string(), + signals: z.array(z.lazy(() => Signal$inboundSchema)), +}); + +/** @internal */ +export type DebugSignalsExpression$Outbound = { + expression: string; + signals: Array; +}; + +/** @internal */ +export const DebugSignalsExpression$outboundSchema: z.ZodType< + DebugSignalsExpression$Outbound, + z.ZodTypeDef, + DebugSignalsExpression +> = z.object({ + expression: z.string(), + signals: z.array(z.lazy(() => Signal$outboundSchema)), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DebugSignalsExpression$ { + /** @deprecated use `DebugSignalsExpression$inboundSchema` instead. */ + export const inboundSchema = DebugSignalsExpression$inboundSchema; + /** @deprecated use `DebugSignalsExpression$outboundSchema` instead. */ + export const outboundSchema = DebugSignalsExpression$outboundSchema; + /** @deprecated use `DebugSignalsExpression$Outbound` instead. */ + export type Outbound = DebugSignalsExpression$Outbound; +} + +export function debugSignalsExpressionToJSON( + debugSignalsExpression: DebugSignalsExpression, +): string { + return JSON.stringify( + DebugSignalsExpression$outboundSchema.parse(debugSignalsExpression), + ); +} + +export function debugSignalsExpressionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DebugSignalsExpression$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DebugSignalsExpression' from JSON`, + ); +} diff --git a/src/models/components/entitlemententity.ts b/src/models/components/entitlemententity.ts index 353a0c30..758e7814 100644 --- a/src/models/components/entitlemententity.ts +++ b/src/models/components/entitlemententity.ts @@ -18,14 +18,14 @@ export const Tier = { export type Tier = ClosedEnum; export type EntitlementEntity = { - currentCount?: number | undefined; - errors?: Array | undefined; - exists?: boolean | undefined; - available?: boolean | undefined; - maximum?: number | undefined; - name?: string | undefined; - slug?: string | undefined; - tier?: Tier | undefined; + currentCount?: number | null | undefined; + errors?: Array | null | undefined; + exists?: boolean | null | undefined; + available?: boolean | null | undefined; + maximum?: number | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + tier?: Tier | null | undefined; }; /** @internal */ @@ -54,14 +54,14 @@ export const EntitlementEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - current_count: z.number().int().optional(), - errors: z.array(z.string()).optional(), - exists: z.boolean().optional(), - available: z.boolean().optional(), - maximum: z.number().int().optional(), - name: z.string().optional(), - slug: z.string().optional(), - tier: Tier$inboundSchema.optional(), + current_count: z.nullable(z.number().int()).optional(), + errors: z.nullable(z.array(z.string())).optional(), + exists: z.nullable(z.boolean()).optional(), + available: z.nullable(z.boolean()).optional(), + maximum: z.nullable(z.number().int()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + tier: z.nullable(Tier$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "current_count": "currentCount", @@ -70,14 +70,14 @@ export const EntitlementEntity$inboundSchema: z.ZodType< /** @internal */ export type EntitlementEntity$Outbound = { - current_count?: number | undefined; - errors?: Array | undefined; - exists?: boolean | undefined; - available?: boolean | undefined; - maximum?: number | undefined; - name?: string | undefined; - slug?: string | undefined; - tier?: string | undefined; + current_count?: number | null | undefined; + errors?: Array | null | undefined; + exists?: boolean | null | undefined; + available?: boolean | null | undefined; + maximum?: number | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + tier?: string | null | undefined; }; /** @internal */ @@ -86,14 +86,14 @@ export const EntitlementEntity$outboundSchema: z.ZodType< z.ZodTypeDef, EntitlementEntity > = z.object({ - currentCount: z.number().int().optional(), - errors: z.array(z.string()).optional(), - exists: z.boolean().optional(), - available: z.boolean().optional(), - maximum: z.number().int().optional(), - name: z.string().optional(), - slug: z.string().optional(), - tier: Tier$outboundSchema.optional(), + currentCount: z.nullable(z.number().int()).optional(), + errors: z.nullable(z.array(z.string())).optional(), + exists: z.nullable(z.boolean()).optional(), + available: z.nullable(z.boolean()).optional(), + maximum: z.nullable(z.number().int()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + tier: z.nullable(Tier$outboundSchema).optional(), }).transform((v) => { return remap$(v, { currentCount: "current_count", diff --git a/src/models/components/entitlemententitypaginated.ts b/src/models/components/entitlemententitypaginated.ts index a410a1ce..f3856766 100644 --- a/src/models/components/entitlemententitypaginated.ts +++ b/src/models/components/entitlemententitypaginated.ts @@ -13,18 +13,18 @@ import { EntitlementEntity$outboundSchema, } from "./entitlemententity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * EntitlementEntityPaginated model */ export type EntitlementEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const EntitlementEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(EntitlementEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(EntitlementEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type EntitlementEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const EntitlementEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, EntitlementEntityPaginated > = z.object({ - data: z.array(EntitlementEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(EntitlementEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/environmententryentity.ts b/src/models/components/environmententryentity.ts index 36912d74..6a9b0c91 100644 --- a/src/models/components/environmententryentity.ts +++ b/src/models/components/environmententryentity.ts @@ -21,35 +21,35 @@ export type EnvironmentEntryEntity = { /** * UUID of the Environment */ - id?: string | undefined; + id?: string | null | undefined; /** * Name of the Environment */ - name?: string | undefined; + name?: string | null | undefined; /** * Slug of the Environment */ - slug?: string | undefined; + slug?: string | null | undefined; /** * Description of the Environment */ - description?: string | undefined; + description?: string | null | undefined; /** * The time the environment was updated */ - updatedAt?: Date | undefined; + updatedAt?: Date | null | undefined; /** * The time the environment was created */ - createdAt?: Date | undefined; + createdAt?: Date | null | undefined; /** * List of active incident guids */ - activeIncidents?: string | undefined; + activeIncidents?: Array | null | undefined; /** * Information about known linkages to representations of services outside of FireHydrant. */ - externalResources?: Array | undefined; + externalResources?: Array | null | undefined; }; /** @internal */ @@ -58,16 +58,19 @@ export const EnvironmentEntryEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + active_incidents: z.nullable(z.array(z.string())).optional(), + external_resources: z.nullable(z.array(ExternalResourceEntity$inboundSchema)) .optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - active_incidents: z.string().optional(), - external_resources: z.array(ExternalResourceEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "updated_at": "updatedAt", @@ -79,14 +82,17 @@ export const EnvironmentEntryEntity$inboundSchema: z.ZodType< /** @internal */ export type EnvironmentEntryEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - updated_at?: string | undefined; - created_at?: string | undefined; - active_incidents?: string | undefined; - external_resources?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + updated_at?: string | null | undefined; + created_at?: string | null | undefined; + active_incidents?: Array | null | undefined; + external_resources?: + | Array + | null + | undefined; }; /** @internal */ @@ -95,14 +101,15 @@ export const EnvironmentEntryEntity$outboundSchema: z.ZodType< z.ZodTypeDef, EnvironmentEntryEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - activeIncidents: z.string().optional(), - externalResources: z.array(ExternalResourceEntity$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + activeIncidents: z.nullable(z.array(z.string())).optional(), + externalResources: z.nullable(z.array(ExternalResourceEntity$outboundSchema)) + .optional(), }).transform((v) => { return remap$(v, { updatedAt: "updated_at", diff --git a/src/models/components/environmententryentitypaginated.ts b/src/models/components/environmententryentitypaginated.ts index 35cc9466..4372021a 100644 --- a/src/models/components/environmententryentitypaginated.ts +++ b/src/models/components/environmententryentitypaginated.ts @@ -13,18 +13,18 @@ import { EnvironmentEntryEntity$outboundSchema, } from "./environmententryentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * EnvironmentEntryEntityPaginated model */ export type EnvironmentEntryEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const EnvironmentEntryEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(EnvironmentEntryEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(EnvironmentEntryEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type EnvironmentEntryEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const EnvironmentEntryEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, EnvironmentEntryEntityPaginated > = z.object({ - data: z.array(EnvironmentEntryEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(EnvironmentEntryEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/eventgenericchatmessageentity.ts b/src/models/components/eventgenericchatmessageentity.ts index 28475f19..c5bff324 100644 --- a/src/models/components/eventgenericchatmessageentity.ts +++ b/src/models/components/eventgenericchatmessageentity.ts @@ -12,9 +12,9 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Event_GenericChatMessageEntity model */ export type EventGenericChatMessageEntity = { - id?: string | undefined; - body?: string | undefined; - createdAt?: Date | undefined; + id?: string | null | undefined; + body?: string | null | undefined; + createdAt?: Date | null | undefined; }; /** @internal */ @@ -23,10 +23,11 @@ export const EventGenericChatMessageEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - body: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -35,9 +36,9 @@ export const EventGenericChatMessageEntity$inboundSchema: z.ZodType< /** @internal */ export type EventGenericChatMessageEntity$Outbound = { - id?: string | undefined; - body?: string | undefined; - created_at?: string | undefined; + id?: string | null | undefined; + body?: string | null | undefined; + created_at?: string | null | undefined; }; /** @internal */ @@ -46,9 +47,9 @@ export const EventGenericChatMessageEntity$outboundSchema: z.ZodType< z.ZodTypeDef, EventGenericChatMessageEntity > = z.object({ - id: z.string().optional(), - body: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/eventnoteentity.ts b/src/models/components/eventnoteentity.ts index a0a1e900..7e2ba4b3 100644 --- a/src/models/components/eventnoteentity.ts +++ b/src/models/components/eventnoteentity.ts @@ -24,11 +24,11 @@ import { * Event_NoteEntity model */ export type EventNoteEntity = { - id?: string | undefined; - body?: string | undefined; - createdAt?: Date | undefined; - statusPages?: Array | undefined; - conversations?: Array | undefined; + id?: string | null | undefined; + body?: string | null | undefined; + createdAt?: Date | null | undefined; + statusPages?: Array | null | undefined; + conversations?: Array | null | undefined; }; /** @internal */ @@ -37,13 +37,16 @@ export const EventNoteEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - body: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - status_pages: z.array(IncidentsStatusPageEntity$inboundSchema).optional(), - conversations: z.array(ConversationsAPIEntitiesReference$inboundSchema) + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + status_pages: z.nullable(z.array(IncidentsStatusPageEntity$inboundSchema)) .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -53,11 +56,14 @@ export const EventNoteEntity$inboundSchema: z.ZodType< /** @internal */ export type EventNoteEntity$Outbound = { - id?: string | undefined; - body?: string | undefined; - created_at?: string | undefined; - status_pages?: Array | undefined; - conversations?: Array | undefined; + id?: string | null | undefined; + body?: string | null | undefined; + created_at?: string | null | undefined; + status_pages?: Array | null | undefined; + conversations?: + | Array + | null + | undefined; }; /** @internal */ @@ -66,12 +72,14 @@ export const EventNoteEntity$outboundSchema: z.ZodType< z.ZodTypeDef, EventNoteEntity > = z.object({ - id: z.string().optional(), - body: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - statusPages: z.array(IncidentsStatusPageEntity$outboundSchema).optional(), - conversations: z.array(ConversationsAPIEntitiesReference$outboundSchema) + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + statusPages: z.nullable(z.array(IncidentsStatusPageEntity$outboundSchema)) .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/externalresourceentity.ts b/src/models/components/externalresourceentity.ts index 4d5c09ff..9d537597 100644 --- a/src/models/components/externalresourceentity.ts +++ b/src/models/components/externalresourceentity.ts @@ -9,14 +9,15 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ExternalResourceEntity = { - connectionType?: string | undefined; - connectionName?: string | undefined; - connectionId?: string | undefined; - remoteId?: string | undefined; - remoteUrl?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - name?: string | undefined; + connectionType?: string | null | undefined; + connectionName?: string | null | undefined; + connectionFullFaviconUrl?: string | null | undefined; + connectionId?: string | null | undefined; + remoteId?: string | null | undefined; + remoteUrl?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -25,20 +26,24 @@ export const ExternalResourceEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - connection_type: z.string().optional(), - connection_name: z.string().optional(), - connection_id: z.string().optional(), - remote_id: z.string().optional(), - remote_url: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - name: z.string().optional(), + connection_type: z.nullable(z.string()).optional(), + connection_name: z.nullable(z.string()).optional(), + connection_full_favicon_url: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + remote_id: z.nullable(z.string()).optional(), + remote_url: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "connection_type": "connectionType", "connection_name": "connectionName", + "connection_full_favicon_url": "connectionFullFaviconUrl", "connection_id": "connectionId", "remote_id": "remoteId", "remote_url": "remoteUrl", @@ -49,14 +54,15 @@ export const ExternalResourceEntity$inboundSchema: z.ZodType< /** @internal */ export type ExternalResourceEntity$Outbound = { - connection_type?: string | undefined; - connection_name?: string | undefined; - connection_id?: string | undefined; - remote_id?: string | undefined; - remote_url?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - name?: string | undefined; + connection_type?: string | null | undefined; + connection_name?: string | null | undefined; + connection_full_favicon_url?: string | null | undefined; + connection_id?: string | null | undefined; + remote_id?: string | null | undefined; + remote_url?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -65,18 +71,20 @@ export const ExternalResourceEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ExternalResourceEntity > = z.object({ - connectionType: z.string().optional(), - connectionName: z.string().optional(), - connectionId: z.string().optional(), - remoteId: z.string().optional(), - remoteUrl: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - name: z.string().optional(), + connectionType: z.nullable(z.string()).optional(), + connectionName: z.nullable(z.string()).optional(), + connectionFullFaviconUrl: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + remoteId: z.nullable(z.string()).optional(), + remoteUrl: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { connectionType: "connection_type", connectionName: "connection_name", + connectionFullFaviconUrl: "connection_full_favicon_url", connectionId: "connection_id", remoteId: "remote_id", remoteUrl: "remote_url", diff --git a/src/models/components/fhtypesgenericentity.ts b/src/models/components/fhtypesgenericentity.ts deleted file mode 100644 index f5f11151..00000000 --- a/src/models/components/fhtypesgenericentity.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type FHTypesGenericEntity = { - type?: string | undefined; - value?: string | undefined; - label?: string | undefined; -}; - -/** @internal */ -export const FHTypesGenericEntity$inboundSchema: z.ZodType< - FHTypesGenericEntity, - z.ZodTypeDef, - unknown -> = z.object({ - type: z.string().optional(), - value: z.string().optional(), - label: z.string().optional(), -}); - -/** @internal */ -export type FHTypesGenericEntity$Outbound = { - type?: string | undefined; - value?: string | undefined; - label?: string | undefined; -}; - -/** @internal */ -export const FHTypesGenericEntity$outboundSchema: z.ZodType< - FHTypesGenericEntity$Outbound, - z.ZodTypeDef, - FHTypesGenericEntity -> = z.object({ - type: z.string().optional(), - value: z.string().optional(), - label: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FHTypesGenericEntity$ { - /** @deprecated use `FHTypesGenericEntity$inboundSchema` instead. */ - export const inboundSchema = FHTypesGenericEntity$inboundSchema; - /** @deprecated use `FHTypesGenericEntity$outboundSchema` instead. */ - export const outboundSchema = FHTypesGenericEntity$outboundSchema; - /** @deprecated use `FHTypesGenericEntity$Outbound` instead. */ - export type Outbound = FHTypesGenericEntity$Outbound; -} - -export function fhTypesGenericEntityToJSON( - fhTypesGenericEntity: FHTypesGenericEntity, -): string { - return JSON.stringify( - FHTypesGenericEntity$outboundSchema.parse(fhTypesGenericEntity), - ); -} - -export function fhTypesGenericEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => FHTypesGenericEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'FHTypesGenericEntity' from JSON`, - ); -} diff --git a/src/models/components/fieldmappingfieldmapentity.ts b/src/models/components/fieldmappingfieldmapentity.ts index a8f3ada7..7403947f 100644 --- a/src/models/components/fieldmappingfieldmapentity.ts +++ b/src/models/components/fieldmappingfieldmapentity.ts @@ -14,14 +14,14 @@ export type Body = {}; * FieldMapping_FieldMapEntity model */ export type FieldMappingFieldMapEntity = { - id?: string | undefined; - connectionId?: string | undefined; - connectionType?: string | undefined; - entityId?: string | undefined; - entityType?: string | undefined; - body?: Body | undefined; - availableFieldsUrl?: string | undefined; - dataBagUrl?: string | undefined; + id?: string | null | undefined; + connectionId?: string | null | undefined; + connectionType?: string | null | undefined; + entityId?: string | null | undefined; + entityType?: string | null | undefined; + body?: Body | null | undefined; + availableFieldsUrl?: string | null | undefined; + dataBagUrl?: string | null | undefined; }; /** @internal */ @@ -68,14 +68,14 @@ export const FieldMappingFieldMapEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - connection_id: z.string().optional(), - connection_type: z.string().optional(), - entity_id: z.string().optional(), - entity_type: z.string().optional(), - body: z.lazy(() => Body$inboundSchema).optional(), - available_fields_url: z.string().optional(), - data_bag_url: z.string().optional(), + id: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + connection_type: z.nullable(z.string()).optional(), + entity_id: z.nullable(z.string()).optional(), + entity_type: z.nullable(z.string()).optional(), + body: z.nullable(z.lazy(() => Body$inboundSchema)).optional(), + available_fields_url: z.nullable(z.string()).optional(), + data_bag_url: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "connection_id": "connectionId", @@ -89,14 +89,14 @@ export const FieldMappingFieldMapEntity$inboundSchema: z.ZodType< /** @internal */ export type FieldMappingFieldMapEntity$Outbound = { - id?: string | undefined; - connection_id?: string | undefined; - connection_type?: string | undefined; - entity_id?: string | undefined; - entity_type?: string | undefined; - body?: Body$Outbound | undefined; - available_fields_url?: string | undefined; - data_bag_url?: string | undefined; + id?: string | null | undefined; + connection_id?: string | null | undefined; + connection_type?: string | null | undefined; + entity_id?: string | null | undefined; + entity_type?: string | null | undefined; + body?: Body$Outbound | null | undefined; + available_fields_url?: string | null | undefined; + data_bag_url?: string | null | undefined; }; /** @internal */ @@ -105,14 +105,14 @@ export const FieldMappingFieldMapEntity$outboundSchema: z.ZodType< z.ZodTypeDef, FieldMappingFieldMapEntity > = z.object({ - id: z.string().optional(), - connectionId: z.string().optional(), - connectionType: z.string().optional(), - entityId: z.string().optional(), - entityType: z.string().optional(), - body: z.lazy(() => Body$outboundSchema).optional(), - availableFieldsUrl: z.string().optional(), - dataBagUrl: z.string().optional(), + id: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + connectionType: z.nullable(z.string()).optional(), + entityId: z.nullable(z.string()).optional(), + entityType: z.nullable(z.string()).optional(), + body: z.nullable(z.lazy(() => Body$outboundSchema)).optional(), + availableFieldsUrl: z.nullable(z.string()).optional(), + dataBagUrl: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { connectionId: "connection_id", diff --git a/src/models/components/fieldmappingmappablefieldentity.ts b/src/models/components/fieldmappingmappablefieldentity.ts index 5cb9314f..4f5797b6 100644 --- a/src/models/components/fieldmappingmappablefieldentity.ts +++ b/src/models/components/fieldmappingmappablefieldentity.ts @@ -15,27 +15,27 @@ export type FieldMappingMappableFieldEntity = { /** * The ID of the field */ - value?: string | undefined; + value?: string | null | undefined; /** * The human-readable name of the field */ - label?: string | undefined; + label?: string | null | undefined; /** * The allowed type of the field */ - type?: string | undefined; + type?: string | null | undefined; /** * The allowed values of the field */ - allowedValues?: string | undefined; + allowedValues?: Array | null | undefined; /** * If the field is required to be mapped */ - required?: string | undefined; + required?: string | null | undefined; /** * Short, inline documentation for the present field */ - helpText?: string | undefined; + helpText?: string | null | undefined; }; /** @internal */ @@ -44,12 +44,12 @@ export const FieldMappingMappableFieldEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - value: z.string().optional(), - label: z.string().optional(), - type: z.string().optional(), - allowed_values: z.string().optional(), - required: z.string().optional(), - help_text: z.string().optional(), + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + allowed_values: z.nullable(z.array(z.string())).optional(), + required: z.nullable(z.string()).optional(), + help_text: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "allowed_values": "allowedValues", @@ -59,12 +59,12 @@ export const FieldMappingMappableFieldEntity$inboundSchema: z.ZodType< /** @internal */ export type FieldMappingMappableFieldEntity$Outbound = { - value?: string | undefined; - label?: string | undefined; - type?: string | undefined; - allowed_values?: string | undefined; - required?: string | undefined; - help_text?: string | undefined; + value?: string | null | undefined; + label?: string | null | undefined; + type?: string | null | undefined; + allowed_values?: Array | null | undefined; + required?: string | null | undefined; + help_text?: string | null | undefined; }; /** @internal */ @@ -73,12 +73,12 @@ export const FieldMappingMappableFieldEntity$outboundSchema: z.ZodType< z.ZodTypeDef, FieldMappingMappableFieldEntity > = z.object({ - value: z.string().optional(), - label: z.string().optional(), - type: z.string().optional(), - allowedValues: z.string().optional(), - required: z.string().optional(), - helpText: z.string().optional(), + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + allowedValues: z.nullable(z.array(z.string())).optional(), + required: z.nullable(z.string()).optional(), + helpText: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { allowedValues: "allowed_values", diff --git a/src/models/components/formconfigurationentity.ts b/src/models/components/formconfigurationentity.ts new file mode 100644 index 00000000..5b1707ca --- /dev/null +++ b/src/models/components/formconfigurationentity.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * FormConfigurationEntity model + */ +export type FormConfigurationEntity = { + fields?: string | null | undefined; + /** + * Whether to show incident types on the declaration form + */ + showIncidentTypes?: boolean | null | undefined; +}; + +/** @internal */ +export const FormConfigurationEntity$inboundSchema: z.ZodType< + FormConfigurationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + fields: z.nullable(z.string()).optional(), + show_incident_types: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "show_incident_types": "showIncidentTypes", + }); +}); + +/** @internal */ +export type FormConfigurationEntity$Outbound = { + fields?: string | null | undefined; + show_incident_types?: boolean | null | undefined; +}; + +/** @internal */ +export const FormConfigurationEntity$outboundSchema: z.ZodType< + FormConfigurationEntity$Outbound, + z.ZodTypeDef, + FormConfigurationEntity +> = z.object({ + fields: z.nullable(z.string()).optional(), + showIncidentTypes: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + showIncidentTypes: "show_incident_types", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace FormConfigurationEntity$ { + /** @deprecated use `FormConfigurationEntity$inboundSchema` instead. */ + export const inboundSchema = FormConfigurationEntity$inboundSchema; + /** @deprecated use `FormConfigurationEntity$outboundSchema` instead. */ + export const outboundSchema = FormConfigurationEntity$outboundSchema; + /** @deprecated use `FormConfigurationEntity$Outbound` instead. */ + export type Outbound = FormConfigurationEntity$Outbound; +} + +export function formConfigurationEntityToJSON( + formConfigurationEntity: FormConfigurationEntity, +): string { + return JSON.stringify( + FormConfigurationEntity$outboundSchema.parse(formConfigurationEntity), + ); +} + +export function formConfigurationEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FormConfigurationEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FormConfigurationEntity' from JSON`, + ); +} diff --git a/src/models/components/functionalityentity.ts b/src/models/components/functionalityentity.ts index 370e10ef..fddc3020 100644 --- a/src/models/components/functionalityentity.ts +++ b/src/models/components/functionalityentity.ts @@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; import { ExternalResourceEntity, ExternalResourceEntity$inboundSchema, @@ -25,6 +19,18 @@ import { LinksEntity$Outbound, LinksEntity$outboundSchema, } from "./linksentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; import { ServiceEntityLite, ServiceEntityLite$inboundSchema, @@ -47,40 +53,40 @@ export type FunctionalityEntityLabels = {}; * FunctionalityEntity model */ export type FunctionalityEntity = { - id?: string | undefined; - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; /** * An object of label key and values */ - labels?: FunctionalityEntityLabels | undefined; + labels?: FunctionalityEntityLabels | null | undefined; /** * List of active incident guids */ - activeIncidents?: Array | undefined; + activeIncidents?: Array | null | undefined; /** * List of links attached to this functionality. */ - links?: Array | undefined; - owner?: TeamEntityLite | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; - updatedBy?: AuthorEntity | undefined; + links?: Array | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; /** * Services this functionality provides */ - services?: Array | undefined; + services?: Array | null | undefined; /** * Information about known linkages to representations of services outside of FireHydrant. */ - externalResources?: Array | undefined; + externalResources?: Array | null | undefined; /** * List of teams attached to the functionality */ - teams?: Array | undefined; + teams?: Array | null | undefined; }; /** @internal */ @@ -137,24 +143,28 @@ export const FunctionalityEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + labels: z.nullable(z.lazy(() => FunctionalityEntityLabels$inboundSchema)) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + active_incidents: z.nullable(z.array(z.string())).optional(), + links: z.nullable(z.array(LinksEntity$inboundSchema)).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + services: z.nullable(z.array(ServiceEntityLite$inboundSchema)).optional(), + external_resources: z.nullable(z.array(ExternalResourceEntity$inboundSchema)) .optional(), - labels: z.lazy(() => FunctionalityEntityLabels$inboundSchema).optional(), - active_incidents: z.array(z.string()).optional(), - links: z.array(LinksEntity$inboundSchema).optional(), - owner: TeamEntityLite$inboundSchema.optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - updated_by: AuthorEntity$inboundSchema.optional(), - services: z.array(ServiceEntityLite$inboundSchema).optional(), - external_resources: z.array(ExternalResourceEntity$inboundSchema).optional(), - teams: z.array(TeamEntityLite$inboundSchema).optional(), + teams: z.nullable(z.array(TeamEntityLite$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -169,22 +179,25 @@ export const FunctionalityEntity$inboundSchema: z.ZodType< /** @internal */ export type FunctionalityEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - labels?: FunctionalityEntityLabels$Outbound | undefined; - active_incidents?: Array | undefined; - links?: Array | undefined; - owner?: TeamEntityLite$Outbound | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - updated_by?: AuthorEntity$Outbound | undefined; - services?: Array | undefined; - external_resources?: Array | undefined; - teams?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + labels?: FunctionalityEntityLabels$Outbound | null | undefined; + active_incidents?: Array | null | undefined; + links?: Array | null | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; + services?: Array | null | undefined; + external_resources?: + | Array + | null + | undefined; + teams?: Array | null | undefined; }; /** @internal */ @@ -193,22 +206,24 @@ export const FunctionalityEntity$outboundSchema: z.ZodType< z.ZodTypeDef, FunctionalityEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - labels: z.lazy(() => FunctionalityEntityLabels$outboundSchema).optional(), - activeIncidents: z.array(z.string()).optional(), - links: z.array(LinksEntity$outboundSchema).optional(), - owner: TeamEntityLite$outboundSchema.optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - updatedBy: AuthorEntity$outboundSchema.optional(), - services: z.array(ServiceEntityLite$outboundSchema).optional(), - externalResources: z.array(ExternalResourceEntity$outboundSchema).optional(), - teams: z.array(TeamEntityLite$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + labels: z.nullable(z.lazy(() => FunctionalityEntityLabels$outboundSchema)) + .optional(), + activeIncidents: z.nullable(z.array(z.string())).optional(), + links: z.nullable(z.array(LinksEntity$outboundSchema)).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + services: z.nullable(z.array(ServiceEntityLite$outboundSchema)).optional(), + externalResources: z.nullable(z.array(ExternalResourceEntity$outboundSchema)) + .optional(), + teams: z.nullable(z.array(TeamEntityLite$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/functionalityentitylite.ts b/src/models/components/functionalityentitylite.ts index 1e8b3c36..0596f9c5 100644 --- a/src/models/components/functionalityentitylite.ts +++ b/src/models/components/functionalityentitylite.ts @@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; import { LinksEntity, LinksEntity$inboundSchema, @@ -20,11 +14,17 @@ import { LinksEntity$outboundSchema, } from "./linksentity.js"; import { - TeamEntityLite, - TeamEntityLite$inboundSchema, - TeamEntityLite$Outbound, - TeamEntityLite$outboundSchema, -} from "./teamentitylite.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; /** * An object of label key and values @@ -32,28 +32,28 @@ import { export type FunctionalityEntityLiteLabels = {}; export type FunctionalityEntityLite = { - id?: string | undefined; - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; /** * An object of label key and values */ - labels?: FunctionalityEntityLiteLabels | undefined; + labels?: FunctionalityEntityLiteLabels | null | undefined; /** * List of active incident guids */ - activeIncidents?: Array | undefined; + activeIncidents?: Array | null | undefined; /** * List of links attached to this functionality. */ - links?: Array | undefined; - owner?: TeamEntityLite | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; - updatedBy?: AuthorEntity | undefined; + links?: Array | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; }; /** @internal */ @@ -112,21 +112,24 @@ export const FunctionalityEntityLite$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + labels: z.nullable(z.lazy(() => FunctionalityEntityLiteLabels$inboundSchema)) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - labels: z.lazy(() => FunctionalityEntityLiteLabels$inboundSchema).optional(), - active_incidents: z.array(z.string()).optional(), - links: z.array(LinksEntity$inboundSchema).optional(), - owner: TeamEntityLite$inboundSchema.optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - updated_by: AuthorEntity$inboundSchema.optional(), + active_incidents: z.nullable(z.array(z.string())).optional(), + links: z.nullable(z.array(LinksEntity$inboundSchema)).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -140,19 +143,19 @@ export const FunctionalityEntityLite$inboundSchema: z.ZodType< /** @internal */ export type FunctionalityEntityLite$Outbound = { - id?: string | undefined; - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - labels?: FunctionalityEntityLiteLabels$Outbound | undefined; - active_incidents?: Array | undefined; - links?: Array | undefined; - owner?: TeamEntityLite$Outbound | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - updated_by?: AuthorEntity$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + labels?: FunctionalityEntityLiteLabels$Outbound | null | undefined; + active_incidents?: Array | null | undefined; + links?: Array | null | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; }; /** @internal */ @@ -161,19 +164,20 @@ export const FunctionalityEntityLite$outboundSchema: z.ZodType< z.ZodTypeDef, FunctionalityEntityLite > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - labels: z.lazy(() => FunctionalityEntityLiteLabels$outboundSchema).optional(), - activeIncidents: z.array(z.string()).optional(), - links: z.array(LinksEntity$outboundSchema).optional(), - owner: TeamEntityLite$outboundSchema.optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - updatedBy: AuthorEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + labels: z.nullable(z.lazy(() => FunctionalityEntityLiteLabels$outboundSchema)) + .optional(), + activeIncidents: z.nullable(z.array(z.string())).optional(), + links: z.nullable(z.array(LinksEntity$outboundSchema)).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/functionalityentitypaginated.ts b/src/models/components/functionalityentitypaginated.ts index 81a5ed92..02ed62e2 100644 --- a/src/models/components/functionalityentitypaginated.ts +++ b/src/models/components/functionalityentitypaginated.ts @@ -13,18 +13,18 @@ import { FunctionalityEntity$outboundSchema, } from "./functionalityentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * FunctionalityEntityPaginated model */ export type FunctionalityEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const FunctionalityEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(FunctionalityEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(FunctionalityEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type FunctionalityEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const FunctionalityEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, FunctionalityEntityPaginated > = z.object({ - data: z.array(FunctionalityEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(FunctionalityEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/functionalitywithallservicesentity.ts b/src/models/components/functionalitywithallservicesentity.ts new file mode 100644 index 00000000..d697ec5a --- /dev/null +++ b/src/models/components/functionalitywithallservicesentity.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ServiceEntity, + ServiceEntity$inboundSchema, + ServiceEntity$Outbound, + ServiceEntity$outboundSchema, +} from "./serviceentity.js"; + +/** + * FunctionalityWithAllServicesEntity model + */ +export type FunctionalityWithAllServicesEntity = { + /** + * Services this functionality provides + */ + services?: Array | null | undefined; +}; + +/** @internal */ +export const FunctionalityWithAllServicesEntity$inboundSchema: z.ZodType< + FunctionalityWithAllServicesEntity, + z.ZodTypeDef, + unknown +> = z.object({ + services: z.nullable(z.array(ServiceEntity$inboundSchema)).optional(), +}); + +/** @internal */ +export type FunctionalityWithAllServicesEntity$Outbound = { + services?: Array | null | undefined; +}; + +/** @internal */ +export const FunctionalityWithAllServicesEntity$outboundSchema: z.ZodType< + FunctionalityWithAllServicesEntity$Outbound, + z.ZodTypeDef, + FunctionalityWithAllServicesEntity +> = z.object({ + services: z.nullable(z.array(ServiceEntity$outboundSchema)).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace FunctionalityWithAllServicesEntity$ { + /** @deprecated use `FunctionalityWithAllServicesEntity$inboundSchema` instead. */ + export const inboundSchema = FunctionalityWithAllServicesEntity$inboundSchema; + /** @deprecated use `FunctionalityWithAllServicesEntity$outboundSchema` instead. */ + export const outboundSchema = + FunctionalityWithAllServicesEntity$outboundSchema; + /** @deprecated use `FunctionalityWithAllServicesEntity$Outbound` instead. */ + export type Outbound = FunctionalityWithAllServicesEntity$Outbound; +} + +export function functionalityWithAllServicesEntityToJSON( + functionalityWithAllServicesEntity: FunctionalityWithAllServicesEntity, +): string { + return JSON.stringify( + FunctionalityWithAllServicesEntity$outboundSchema.parse( + functionalityWithAllServicesEntity, + ), + ); +} + +export function functionalityWithAllServicesEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + FunctionalityWithAllServicesEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FunctionalityWithAllServicesEntity' from JSON`, + ); +} diff --git a/src/models/components/importsimportableresourceentity.ts b/src/models/components/importsimportableresourceentity.ts deleted file mode 100644 index ad6a6b64..00000000 --- a/src/models/components/importsimportableresourceentity.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ImportsImportErrorEntity, - ImportsImportErrorEntity$inboundSchema, - ImportsImportErrorEntity$Outbound, - ImportsImportErrorEntity$outboundSchema, -} from "./importsimporterrorentity.js"; - -export const ImportsImportableResourceEntityState = { - Selected: "selected", - Skipped: "skipped", - Imported: "imported", - Errored: "errored", -} as const; -export type ImportsImportableResourceEntityState = ClosedEnum< - typeof ImportsImportableResourceEntityState ->; - -export type ImportsImportableResourceEntity = { - importErrors?: Array | undefined; - importedAt?: Date | undefined; - remoteId?: string | undefined; - state?: ImportsImportableResourceEntityState | undefined; -}; - -/** @internal */ -export const ImportsImportableResourceEntityState$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - ImportsImportableResourceEntityState, - ); - -/** @internal */ -export const ImportsImportableResourceEntityState$outboundSchema: - z.ZodNativeEnum = - ImportsImportableResourceEntityState$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ImportsImportableResourceEntityState$ { - /** @deprecated use `ImportsImportableResourceEntityState$inboundSchema` instead. */ - export const inboundSchema = - ImportsImportableResourceEntityState$inboundSchema; - /** @deprecated use `ImportsImportableResourceEntityState$outboundSchema` instead. */ - export const outboundSchema = - ImportsImportableResourceEntityState$outboundSchema; -} - -/** @internal */ -export const ImportsImportableResourceEntity$inboundSchema: z.ZodType< - ImportsImportableResourceEntity, - z.ZodTypeDef, - unknown -> = z.object({ - import_errors: z.array(ImportsImportErrorEntity$inboundSchema).optional(), - imported_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - remote_id: z.string().optional(), - state: ImportsImportableResourceEntityState$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "import_errors": "importErrors", - "imported_at": "importedAt", - "remote_id": "remoteId", - }); -}); - -/** @internal */ -export type ImportsImportableResourceEntity$Outbound = { - import_errors?: Array | undefined; - imported_at?: string | undefined; - remote_id?: string | undefined; - state?: string | undefined; -}; - -/** @internal */ -export const ImportsImportableResourceEntity$outboundSchema: z.ZodType< - ImportsImportableResourceEntity$Outbound, - z.ZodTypeDef, - ImportsImportableResourceEntity -> = z.object({ - importErrors: z.array(ImportsImportErrorEntity$outboundSchema).optional(), - importedAt: z.date().transform(v => v.toISOString()).optional(), - remoteId: z.string().optional(), - state: ImportsImportableResourceEntityState$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - importErrors: "import_errors", - importedAt: "imported_at", - remoteId: "remote_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ImportsImportableResourceEntity$ { - /** @deprecated use `ImportsImportableResourceEntity$inboundSchema` instead. */ - export const inboundSchema = ImportsImportableResourceEntity$inboundSchema; - /** @deprecated use `ImportsImportableResourceEntity$outboundSchema` instead. */ - export const outboundSchema = ImportsImportableResourceEntity$outboundSchema; - /** @deprecated use `ImportsImportableResourceEntity$Outbound` instead. */ - export type Outbound = ImportsImportableResourceEntity$Outbound; -} - -export function importsImportableResourceEntityToJSON( - importsImportableResourceEntity: ImportsImportableResourceEntity, -): string { - return JSON.stringify( - ImportsImportableResourceEntity$outboundSchema.parse( - importsImportableResourceEntity, - ), - ); -} - -export function importsImportableResourceEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ImportsImportableResourceEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ImportsImportableResourceEntity' from JSON`, - ); -} diff --git a/src/models/components/importsimportentity.ts b/src/models/components/importsimportentity.ts index c98a8140..a5841bde 100644 --- a/src/models/components/importsimportentity.ts +++ b/src/models/components/importsimportentity.ts @@ -9,40 +9,44 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const State = { +export const ImportsImportEntityState = { Preprocessing: "preprocessing", ReadyForImport: "ready_for_import", Importing: "importing", Completed: "completed", + Failed: "failed", } as const; -export type State = ClosedEnum; +export type ImportsImportEntityState = ClosedEnum< + typeof ImportsImportEntityState +>; /** * Imports_ImportEntity model */ export type ImportsImportEntity = { - state?: State | undefined; - updatedAt?: Date | undefined; + state?: ImportsImportEntityState | null | undefined; + updatedAt?: Date | null | undefined; }; /** @internal */ -export const State$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - State, -); +export const ImportsImportEntityState$inboundSchema: z.ZodNativeEnum< + typeof ImportsImportEntityState +> = z.nativeEnum(ImportsImportEntityState); /** @internal */ -export const State$outboundSchema: z.ZodNativeEnum = - State$inboundSchema; +export const ImportsImportEntityState$outboundSchema: z.ZodNativeEnum< + typeof ImportsImportEntityState +> = ImportsImportEntityState$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace State$ { - /** @deprecated use `State$inboundSchema` instead. */ - export const inboundSchema = State$inboundSchema; - /** @deprecated use `State$outboundSchema` instead. */ - export const outboundSchema = State$outboundSchema; +export namespace ImportsImportEntityState$ { + /** @deprecated use `ImportsImportEntityState$inboundSchema` instead. */ + export const inboundSchema = ImportsImportEntityState$inboundSchema; + /** @deprecated use `ImportsImportEntityState$outboundSchema` instead. */ + export const outboundSchema = ImportsImportEntityState$outboundSchema; } /** @internal */ @@ -51,9 +55,10 @@ export const ImportsImportEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - state: State$inboundSchema.optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + state: z.nullable(ImportsImportEntityState$inboundSchema).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "updated_at": "updatedAt", @@ -62,8 +67,8 @@ export const ImportsImportEntity$inboundSchema: z.ZodType< /** @internal */ export type ImportsImportEntity$Outbound = { - state?: string | undefined; - updated_at?: string | undefined; + state?: string | null | undefined; + updated_at?: string | null | undefined; }; /** @internal */ @@ -72,8 +77,8 @@ export const ImportsImportEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ImportsImportEntity > = z.object({ - state: State$outboundSchema.optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + state: z.nullable(ImportsImportEntityState$outboundSchema).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { updatedAt: "updated_at", diff --git a/src/models/components/importsimporterrorentity.ts b/src/models/components/importsimporterrorentity.ts index ce21f16c..ec586799 100644 --- a/src/models/components/importsimporterrorentity.ts +++ b/src/models/components/importsimporterrorentity.ts @@ -8,11 +8,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - ImportsImportErrorEntityResourceEntity, - ImportsImportErrorEntityResourceEntity$inboundSchema, - ImportsImportErrorEntityResourceEntity$Outbound, - ImportsImportErrorEntityResourceEntity$outboundSchema, -} from "./importsimporterrorentityresourceentity.js"; + NullableImportsImportErrorEntityResourceEntity, + NullableImportsImportErrorEntityResourceEntity$inboundSchema, + NullableImportsImportErrorEntityResourceEntity$Outbound, + NullableImportsImportErrorEntityResourceEntity$outboundSchema, +} from "./nullableimportsimporterrorentityresourceentity.js"; /** * Additional error data @@ -20,14 +20,14 @@ import { export type ImportsImportErrorEntityData = {}; export type ImportsImportErrorEntity = { - id?: string | undefined; - message?: string | undefined; - createdAt?: Date | undefined; + id?: string | null | undefined; + message?: string | null | undefined; + createdAt?: Date | null | undefined; /** * Additional error data */ - data?: ImportsImportErrorEntityData | undefined; - resource?: ImportsImportErrorEntityResourceEntity | undefined; + data?: ImportsImportErrorEntityData | null | undefined; + resource?: NullableImportsImportErrorEntityResourceEntity | null | undefined; }; /** @internal */ @@ -86,12 +86,16 @@ export const ImportsImportErrorEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - message: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + data: z.nullable(z.lazy(() => ImportsImportErrorEntityData$inboundSchema)) .optional(), - data: z.lazy(() => ImportsImportErrorEntityData$inboundSchema).optional(), - resource: ImportsImportErrorEntityResourceEntity$inboundSchema.optional(), + resource: z.nullable( + NullableImportsImportErrorEntityResourceEntity$inboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -100,11 +104,14 @@ export const ImportsImportErrorEntity$inboundSchema: z.ZodType< /** @internal */ export type ImportsImportErrorEntity$Outbound = { - id?: string | undefined; - message?: string | undefined; - created_at?: string | undefined; - data?: ImportsImportErrorEntityData$Outbound | undefined; - resource?: ImportsImportErrorEntityResourceEntity$Outbound | undefined; + id?: string | null | undefined; + message?: string | null | undefined; + created_at?: string | null | undefined; + data?: ImportsImportErrorEntityData$Outbound | null | undefined; + resource?: + | NullableImportsImportErrorEntityResourceEntity$Outbound + | null + | undefined; }; /** @internal */ @@ -113,11 +120,14 @@ export const ImportsImportErrorEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ImportsImportErrorEntity > = z.object({ - id: z.string().optional(), - message: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - data: z.lazy(() => ImportsImportErrorEntityData$outboundSchema).optional(), - resource: ImportsImportErrorEntityResourceEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + data: z.nullable(z.lazy(() => ImportsImportErrorEntityData$outboundSchema)) + .optional(), + resource: z.nullable( + NullableImportsImportErrorEntityResourceEntity$outboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/importsimporterrorentityresourceentity.ts b/src/models/components/importsimporterrorentityresourceentity.ts deleted file mode 100644 index f6e3cc20..00000000 --- a/src/models/components/importsimporterrorentityresourceentity.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ImportsImportErrorEntityResourceEntity = { - resourceId?: string | undefined; - resourceType?: string | undefined; - name?: string | undefined; -}; - -/** @internal */ -export const ImportsImportErrorEntityResourceEntity$inboundSchema: z.ZodType< - ImportsImportErrorEntityResourceEntity, - z.ZodTypeDef, - unknown -> = z.object({ - resource_id: z.string().optional(), - resource_type: z.string().optional(), - name: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "resource_id": "resourceId", - "resource_type": "resourceType", - }); -}); - -/** @internal */ -export type ImportsImportErrorEntityResourceEntity$Outbound = { - resource_id?: string | undefined; - resource_type?: string | undefined; - name?: string | undefined; -}; - -/** @internal */ -export const ImportsImportErrorEntityResourceEntity$outboundSchema: z.ZodType< - ImportsImportErrorEntityResourceEntity$Outbound, - z.ZodTypeDef, - ImportsImportErrorEntityResourceEntity -> = z.object({ - resourceId: z.string().optional(), - resourceType: z.string().optional(), - name: z.string().optional(), -}).transform((v) => { - return remap$(v, { - resourceId: "resource_id", - resourceType: "resource_type", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ImportsImportErrorEntityResourceEntity$ { - /** @deprecated use `ImportsImportErrorEntityResourceEntity$inboundSchema` instead. */ - export const inboundSchema = - ImportsImportErrorEntityResourceEntity$inboundSchema; - /** @deprecated use `ImportsImportErrorEntityResourceEntity$outboundSchema` instead. */ - export const outboundSchema = - ImportsImportErrorEntityResourceEntity$outboundSchema; - /** @deprecated use `ImportsImportErrorEntityResourceEntity$Outbound` instead. */ - export type Outbound = ImportsImportErrorEntityResourceEntity$Outbound; -} - -export function importsImportErrorEntityResourceEntityToJSON( - importsImportErrorEntityResourceEntity: - ImportsImportErrorEntityResourceEntity, -): string { - return JSON.stringify( - ImportsImportErrorEntityResourceEntity$outboundSchema.parse( - importsImportErrorEntityResourceEntity, - ), - ); -} - -export function importsImportErrorEntityResourceEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ImportsImportErrorEntityResourceEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ImportsImportErrorEntityResourceEntity' from JSON`, - ); -} diff --git a/src/models/components/incidentattachmententity.ts b/src/models/components/incidentattachmententity.ts index 4e2ba848..66c5e098 100644 --- a/src/models/components/incidentattachmententity.ts +++ b/src/models/components/incidentattachmententity.ts @@ -26,18 +26,18 @@ export type Versions = {}; * IncidentAttachmentEntity model */ export type IncidentAttachmentEntity = { - fileName?: string | undefined; - fileContentType?: string | undefined; - signedUrl?: string | undefined; - mediaType?: string | undefined; - description?: string | undefined; - externalId?: string | undefined; - fileSize?: number | undefined; - status?: IncidentAttachmentEntityStatus | undefined; + fileName?: string | null | undefined; + fileContentType?: string | null | undefined; + signedUrl?: string | null | undefined; + mediaType?: string | null | undefined; + description?: string | null | undefined; + externalId?: string | null | undefined; + fileSize?: number | null | undefined; + status?: IncidentAttachmentEntityStatus | null | undefined; /** * An object with keys that designate a specific version or size of the attachment */ - versions?: Versions | undefined; + versions?: Versions | null | undefined; }; /** @internal */ @@ -111,15 +111,15 @@ export const IncidentAttachmentEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - file_name: z.string().optional(), - file_content_type: z.string().optional(), - signed_url: z.string().optional(), - media_type: z.string().optional(), - description: z.string().optional(), - external_id: z.string().optional(), - file_size: z.number().int().optional(), - status: IncidentAttachmentEntityStatus$inboundSchema.optional(), - versions: z.lazy(() => Versions$inboundSchema).optional(), + file_name: z.nullable(z.string()).optional(), + file_content_type: z.nullable(z.string()).optional(), + signed_url: z.nullable(z.string()).optional(), + media_type: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), + file_size: z.nullable(z.number().int()).optional(), + status: z.nullable(IncidentAttachmentEntityStatus$inboundSchema).optional(), + versions: z.nullable(z.lazy(() => Versions$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "file_name": "fileName", @@ -133,15 +133,15 @@ export const IncidentAttachmentEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentAttachmentEntity$Outbound = { - file_name?: string | undefined; - file_content_type?: string | undefined; - signed_url?: string | undefined; - media_type?: string | undefined; - description?: string | undefined; - external_id?: string | undefined; - file_size?: number | undefined; - status?: string | undefined; - versions?: Versions$Outbound | undefined; + file_name?: string | null | undefined; + file_content_type?: string | null | undefined; + signed_url?: string | null | undefined; + media_type?: string | null | undefined; + description?: string | null | undefined; + external_id?: string | null | undefined; + file_size?: number | null | undefined; + status?: string | null | undefined; + versions?: Versions$Outbound | null | undefined; }; /** @internal */ @@ -150,15 +150,15 @@ export const IncidentAttachmentEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentAttachmentEntity > = z.object({ - fileName: z.string().optional(), - fileContentType: z.string().optional(), - signedUrl: z.string().optional(), - mediaType: z.string().optional(), - description: z.string().optional(), - externalId: z.string().optional(), - fileSize: z.number().int().optional(), - status: IncidentAttachmentEntityStatus$outboundSchema.optional(), - versions: z.lazy(() => Versions$outboundSchema).optional(), + fileName: z.nullable(z.string()).optional(), + fileContentType: z.nullable(z.string()).optional(), + signedUrl: z.nullable(z.string()).optional(), + mediaType: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), + fileSize: z.nullable(z.number().int()).optional(), + status: z.nullable(IncidentAttachmentEntityStatus$outboundSchema).optional(), + versions: z.nullable(z.lazy(() => Versions$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { fileName: "file_name", diff --git a/src/models/components/incidententity.ts b/src/models/components/incidententity.ts index 1aba9673..2dc0be4f 100644 --- a/src/models/components/incidententity.ts +++ b/src/models/components/incidententity.ts @@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; import { ConversationsAPIEntitiesReference, ConversationsAPIEntitiesReference$inboundSchema, @@ -25,12 +19,6 @@ import { CustomFieldsFieldValue$Outbound, CustomFieldsFieldValue$outboundSchema, } from "./customfieldsfieldvalue.js"; -import { - EventNoteEntity, - EventNoteEntity$inboundSchema, - EventNoteEntity$Outbound, - EventNoteEntity$outboundSchema, -} from "./eventnoteentity.js"; import { IncidentEntityFieldRequirementEntity, IncidentEntityFieldRequirementEntity$inboundSchema, @@ -49,12 +37,6 @@ import { IncidentsConferenceBridgeEntity$Outbound, IncidentsConferenceBridgeEntity$outboundSchema, } from "./incidentsconferencebridgeentity.js"; -import { - IncidentsContextObjectEntity, - IncidentsContextObjectEntity$inboundSchema, - IncidentsContextObjectEntity$Outbound, - IncidentsContextObjectEntity$outboundSchema, -} from "./incidentscontextobjectentity.js"; import { IncidentsImpactEntity, IncidentsImpactEntity$inboundSchema, @@ -98,23 +80,47 @@ import { IncidentsTeamAssignmentEntityLite$outboundSchema, } from "./incidentsteamassignmententitylite.js"; import { - OrganizationEntity, - OrganizationEntity$inboundSchema, - OrganizationEntity$Outbound, - OrganizationEntity$outboundSchema, -} from "./organizationentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableEventNoteEntity, + NullableEventNoteEntity$inboundSchema, + NullableEventNoteEntity$Outbound, + NullableEventNoteEntity$outboundSchema, +} from "./nullableeventnoteentity.js"; +import { + NullableIncidentsContextObjectEntity, + NullableIncidentsContextObjectEntity$inboundSchema, + NullableIncidentsContextObjectEntity$Outbound, + NullableIncidentsContextObjectEntity$outboundSchema, +} from "./nullableincidentscontextobjectentity.js"; +import { + NullableOrganizationEntity, + NullableOrganizationEntity$inboundSchema, + NullableOrganizationEntity$Outbound, + NullableOrganizationEntity$outboundSchema, +} from "./nullableorganizationentity.js"; import { - SeverityMatrixConditionEntity, - SeverityMatrixConditionEntity$inboundSchema, - SeverityMatrixConditionEntity$Outbound, - SeverityMatrixConditionEntity$outboundSchema, -} from "./severitymatrixconditionentity.js"; + NullableSeverityMatrixConditionEntity, + NullableSeverityMatrixConditionEntity$inboundSchema, + NullableSeverityMatrixConditionEntity$Outbound, + NullableSeverityMatrixConditionEntity$outboundSchema, +} from "./nullableseveritymatrixconditionentity.js"; import { - SeverityMatrixImpactEntity, - SeverityMatrixImpactEntity$inboundSchema, - SeverityMatrixImpactEntity$Outbound, - SeverityMatrixImpactEntity$outboundSchema, -} from "./severitymatriximpactentity.js"; + NullableSeverityMatrixImpactEntity, + NullableSeverityMatrixImpactEntity$inboundSchema, + NullableSeverityMatrixImpactEntity$Outbound, + NullableSeverityMatrixImpactEntity$outboundSchema, +} from "./nullableseveritymatriximpactentity.js"; +import { + NullableTicketingTicketEntity, + NullableTicketingTicketEntity$inboundSchema, + NullableTicketingTicketEntity$Outbound, + NullableTicketingTicketEntity$outboundSchema, +} from "./nullableticketingticketentity.js"; import { SuccinctEntity, SuccinctEntity$inboundSchema, @@ -133,7 +139,7 @@ import { */ export type IncidentEntityLabels = {}; -export type RetroExports = {}; +export type IncidentEntityRetroExport = {}; /** * IncidentEntity model @@ -142,106 +148,101 @@ export type IncidentEntity = { /** * UUID of the Incident */ - id?: string | undefined; + id?: string | null | undefined; /** * Name of the incident */ - name?: string | undefined; + name?: string | null | undefined; /** * The time the incident was opened */ - createdAt?: Date | undefined; + createdAt?: Date | null | undefined; /** * The time the incident started */ - startedAt?: Date | undefined; + startedAt?: Date | null | undefined; /** * The time the incident was archived */ - discardedAt?: Date | undefined; - summary?: string | undefined; - customerImpactSummary?: string | undefined; - description?: string | undefined; + discardedAt?: Date | null | undefined; + summary?: string | null | undefined; + customerImpactSummary?: string | null | undefined; + description?: string | null | undefined; /** * The type/slug of the current milestone. Will be one of the currently configured milestones for the given incident. */ - currentMilestone?: string | undefined; + currentMilestone?: string | null | undefined; /** * Incident number */ - number?: number | undefined; - priority?: string | undefined; - severity?: string | undefined; - severityColor?: string | undefined; - severityImpact?: string | undefined; - severityCondition?: string | undefined; - tagList?: Array | undefined; - /** - * SeverityMatrix_ImpactEntity model - */ - severityImpactObject?: SeverityMatrixImpactEntity | undefined; - /** - * SeverityMatrix_ConditionEntity model - */ - severityConditionObject?: SeverityMatrixConditionEntity | undefined; - privateId?: string | undefined; - organizationId?: string | undefined; + number?: number | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severityColor?: string | null | undefined; + severityImpact?: string | null | undefined; + severityCondition?: string | null | undefined; + tagList?: Array | null | undefined; + severityImpactObject?: NullableSeverityMatrixImpactEntity | null | undefined; + severityConditionObject?: + | NullableSeverityMatrixConditionEntity + | null + | undefined; + privateId?: string | null | undefined; + organizationId?: string | null | undefined; /** * DEPRECATED: Please use lifecycle phases instead */ - milestones?: Array | undefined; - lifecyclePhases?: Array | undefined; + milestones?: Array | null | undefined; + lifecyclePhases?: Array | null | undefined; lifecycleMeasurements?: | Array + | null | undefined; - active?: boolean | undefined; + active?: boolean | null | undefined; /** * A key/value of labels */ - labels?: IncidentEntityLabels | undefined; - roleAssignments?: Array | undefined; - statusPages?: Array | undefined; - incidentUrl?: string | undefined; - privateStatusPageUrl?: string | undefined; - organization?: OrganizationEntity | undefined; - customersImpacted?: number | undefined; - monetaryImpact?: number | undefined; - monetaryImpactCents?: number | undefined; - lastUpdate?: string | undefined; - /** - * Event_NoteEntity model - */ - lastNote?: EventNoteEntity | undefined; - reportId?: string | undefined; - aiIncidentSummary?: string | undefined; - services?: Array | undefined; - environments?: Array | undefined; - functionalities?: Array | undefined; - channelName?: string | undefined; - channelReference?: string | undefined; - channelId?: string | undefined; + labels?: IncidentEntityLabels | null | undefined; + roleAssignments?: Array | null | undefined; + statusPages?: Array | null | undefined; + incidentUrl?: string | null | undefined; + privateStatusPageUrl?: string | null | undefined; + organization?: NullableOrganizationEntity | null | undefined; + customersImpacted?: number | null | undefined; + monetaryImpact?: number | null | undefined; + monetaryImpactCents?: number | null | undefined; + lastUpdate?: string | null | undefined; + lastNote?: NullableEventNoteEntity | null | undefined; + reportId?: string | null | undefined; + aiIncidentSummary?: string | null | undefined; + services?: Array | null | undefined; + environments?: Array | null | undefined; + functionalities?: Array | null | undefined; + channelName?: string | null | undefined; + channelReference?: string | null | undefined; + channelId?: string | null | undefined; /** * inoperative: 0, operational: 1, archived: 2 */ - channelStatus?: string | undefined; - incidentTickets?: Array | undefined; - /** - * Ticketing_TicketEntity model - */ - ticket?: TicketingTicketEntity | undefined; - impacts?: Array | undefined; - conferenceBridges?: Array | undefined; - incidentChannels?: Array | undefined; + channelStatus?: string | null | undefined; + incidentTickets?: Array | null | undefined; + ticket?: NullableTicketingTicketEntity | null | undefined; + impacts?: Array | null | undefined; + conferenceBridges?: Array | null | undefined; + incidentChannels?: Array | null | undefined; /** * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity */ - retroExports?: Array | undefined; - createdBy?: AuthorEntity | undefined; - contextObject?: IncidentsContextObjectEntity | undefined; - teamAssignments?: Array | undefined; - conversations?: Array | undefined; - customFields?: Array | undefined; - fieldRequirements?: Array | undefined; + retroExports?: Array | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + contextObject?: NullableIncidentsContextObjectEntity | null | undefined; + teamAssignments?: Array | null | undefined; + conversations?: Array | null | undefined; + customFields?: Array | null | undefined; + fieldRequirements?: + | Array + | null + | undefined; }; /** @internal */ @@ -293,46 +294,50 @@ export function incidentEntityLabelsFromJSON( } /** @internal */ -export const RetroExports$inboundSchema: z.ZodType< - RetroExports, +export const IncidentEntityRetroExport$inboundSchema: z.ZodType< + IncidentEntityRetroExport, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type RetroExports$Outbound = {}; +export type IncidentEntityRetroExport$Outbound = {}; /** @internal */ -export const RetroExports$outboundSchema: z.ZodType< - RetroExports$Outbound, +export const IncidentEntityRetroExport$outboundSchema: z.ZodType< + IncidentEntityRetroExport$Outbound, z.ZodTypeDef, - RetroExports + IncidentEntityRetroExport > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace RetroExports$ { - /** @deprecated use `RetroExports$inboundSchema` instead. */ - export const inboundSchema = RetroExports$inboundSchema; - /** @deprecated use `RetroExports$outboundSchema` instead. */ - export const outboundSchema = RetroExports$outboundSchema; - /** @deprecated use `RetroExports$Outbound` instead. */ - export type Outbound = RetroExports$Outbound; +export namespace IncidentEntityRetroExport$ { + /** @deprecated use `IncidentEntityRetroExport$inboundSchema` instead. */ + export const inboundSchema = IncidentEntityRetroExport$inboundSchema; + /** @deprecated use `IncidentEntityRetroExport$outboundSchema` instead. */ + export const outboundSchema = IncidentEntityRetroExport$outboundSchema; + /** @deprecated use `IncidentEntityRetroExport$Outbound` instead. */ + export type Outbound = IncidentEntityRetroExport$Outbound; } -export function retroExportsToJSON(retroExports: RetroExports): string { - return JSON.stringify(RetroExports$outboundSchema.parse(retroExports)); +export function incidentEntityRetroExportToJSON( + incidentEntityRetroExport: IncidentEntityRetroExport, +): string { + return JSON.stringify( + IncidentEntityRetroExport$outboundSchema.parse(incidentEntityRetroExport), + ); } -export function retroExportsFromJSON( +export function incidentEntityRetroExportFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => RetroExports$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RetroExports' from JSON`, + (x) => IncidentEntityRetroExport$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IncidentEntityRetroExport' from JSON`, ); } @@ -342,75 +347,94 @@ export const IncidentEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + started_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + discarded_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + summary: z.nullable(z.string()).optional(), + customer_impact_summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + current_milestone: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severity_color: z.nullable(z.string()).optional(), + severity_impact: z.nullable(z.string()).optional(), + severity_condition: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + severity_impact_object: z.nullable( + NullableSeverityMatrixImpactEntity$inboundSchema, + ).optional(), + severity_condition_object: z.nullable( + NullableSeverityMatrixConditionEntity$inboundSchema, + ).optional(), + private_id: z.nullable(z.string()).optional(), + organization_id: z.nullable(z.string()).optional(), + milestones: z.nullable(z.array(IncidentsMilestoneEntity$inboundSchema)) .optional(), - started_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + lifecycle_phases: z.nullable( + z.array(IncidentsLifecyclePhaseEntity$inboundSchema), + ).optional(), + lifecycle_measurements: z.nullable( + z.array(IncidentsLifecycleMeasurementEntity$inboundSchema), + ).optional(), + active: z.nullable(z.boolean()).optional(), + labels: z.nullable(z.lazy(() => IncidentEntityLabels$inboundSchema)) .optional(), - discarded_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) + role_assignments: z.nullable( + z.array(IncidentsRoleAssignmentEntity$inboundSchema), ).optional(), - summary: z.string().optional(), - customer_impact_summary: z.string().optional(), - description: z.string().optional(), - current_milestone: z.string().optional(), - number: z.number().int().optional(), - priority: z.string().optional(), - severity: z.string().optional(), - severity_color: z.string().optional(), - severity_impact: z.string().optional(), - severity_condition: z.string().optional(), - tag_list: z.array(z.string()).optional(), - severity_impact_object: SeverityMatrixImpactEntity$inboundSchema.optional(), - severity_condition_object: SeverityMatrixConditionEntity$inboundSchema + status_pages: z.nullable(z.array(IncidentsStatusPageEntity$inboundSchema)) .optional(), - private_id: z.string().optional(), - organization_id: z.string().optional(), - milestones: z.array(IncidentsMilestoneEntity$inboundSchema).optional(), - lifecycle_phases: z.array(IncidentsLifecyclePhaseEntity$inboundSchema) + incident_url: z.nullable(z.string()).optional(), + private_status_page_url: z.nullable(z.string()).optional(), + organization: z.nullable(NullableOrganizationEntity$inboundSchema).optional(), + customers_impacted: z.nullable(z.number().int()).optional(), + monetary_impact: z.nullable(z.number().int()).optional(), + monetary_impact_cents: z.nullable(z.number().int()).optional(), + last_update: z.nullable(z.string()).optional(), + last_note: z.nullable(NullableEventNoteEntity$inboundSchema).optional(), + report_id: z.nullable(z.string()).optional(), + ai_incident_summary: z.nullable(z.string()).optional(), + services: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + environments: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + functionalities: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + channel_name: z.nullable(z.string()).optional(), + channel_reference: z.nullable(z.string()).optional(), + channel_id: z.nullable(z.string()).optional(), + channel_status: z.nullable(z.string()).optional(), + incident_tickets: z.nullable(z.array(TicketingTicketEntity$inboundSchema)) .optional(), - lifecycle_measurements: z.array( - IncidentsLifecycleMeasurementEntity$inboundSchema, + ticket: z.nullable(NullableTicketingTicketEntity$inboundSchema).optional(), + impacts: z.nullable(z.array(IncidentsImpactEntity$inboundSchema)).optional(), + conference_bridges: z.nullable( + z.array(IncidentsConferenceBridgeEntity$inboundSchema), ).optional(), - active: z.boolean().optional(), - labels: z.lazy(() => IncidentEntityLabels$inboundSchema).optional(), - role_assignments: z.array(IncidentsRoleAssignmentEntity$inboundSchema) + incident_channels: z.nullable(z.array(IncidentsChannelEntity$inboundSchema)) .optional(), - status_pages: z.array(IncidentsStatusPageEntity$inboundSchema).optional(), - incident_url: z.string().optional(), - private_status_page_url: z.string().optional(), - organization: OrganizationEntity$inboundSchema.optional(), - customers_impacted: z.number().int().optional(), - monetary_impact: z.number().int().optional(), - monetary_impact_cents: z.number().int().optional(), - last_update: z.string().optional(), - last_note: EventNoteEntity$inboundSchema.optional(), - report_id: z.string().optional(), - ai_incident_summary: z.string().optional(), - services: z.array(SuccinctEntity$inboundSchema).optional(), - environments: z.array(SuccinctEntity$inboundSchema).optional(), - functionalities: z.array(SuccinctEntity$inboundSchema).optional(), - channel_name: z.string().optional(), - channel_reference: z.string().optional(), - channel_id: z.string().optional(), - channel_status: z.string().optional(), - incident_tickets: z.array(TicketingTicketEntity$inboundSchema).optional(), - ticket: TicketingTicketEntity$inboundSchema.optional(), - impacts: z.array(IncidentsImpactEntity$inboundSchema).optional(), - conference_bridges: z.array(IncidentsConferenceBridgeEntity$inboundSchema) - .optional(), - incident_channels: z.array(IncidentsChannelEntity$inboundSchema).optional(), - retro_exports: z.array(z.lazy(() => RetroExports$inboundSchema)).optional(), - created_by: AuthorEntity$inboundSchema.optional(), - context_object: IncidentsContextObjectEntity$inboundSchema.optional(), - team_assignments: z.array(IncidentsTeamAssignmentEntityLite$inboundSchema) + retro_exports: z.nullable( + z.array(z.lazy(() => IncidentEntityRetroExport$inboundSchema)), + ).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + context_object: z.nullable(NullableIncidentsContextObjectEntity$inboundSchema) .optional(), - conversations: z.array(ConversationsAPIEntitiesReference$inboundSchema) + team_assignments: z.nullable( + z.array(IncidentsTeamAssignmentEntityLite$inboundSchema), + ).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), + custom_fields: z.nullable(z.array(CustomFieldsFieldValue$inboundSchema)) .optional(), - custom_fields: z.array(CustomFieldsFieldValue$inboundSchema).optional(), - field_requirements: z.array( - IncidentEntityFieldRequirementEntity$inboundSchema, + field_requirements: z.nullable( + z.array(IncidentEntityFieldRequirementEntity$inboundSchema), ).optional(), }).transform((v) => { return remap$(v, { @@ -458,71 +482,91 @@ export const IncidentEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - created_at?: string | undefined; - started_at?: string | undefined; - discarded_at?: string | undefined; - summary?: string | undefined; - customer_impact_summary?: string | undefined; - description?: string | undefined; - current_milestone?: string | undefined; - number?: number | undefined; - priority?: string | undefined; - severity?: string | undefined; - severity_color?: string | undefined; - severity_impact?: string | undefined; - severity_condition?: string | undefined; - tag_list?: Array | undefined; - severity_impact_object?: SeverityMatrixImpactEntity$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + created_at?: string | null | undefined; + started_at?: string | null | undefined; + discarded_at?: string | null | undefined; + summary?: string | null | undefined; + customer_impact_summary?: string | null | undefined; + description?: string | null | undefined; + current_milestone?: string | null | undefined; + number?: number | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severity_color?: string | null | undefined; + severity_impact?: string | null | undefined; + severity_condition?: string | null | undefined; + tag_list?: Array | null | undefined; + severity_impact_object?: + | NullableSeverityMatrixImpactEntity$Outbound + | null + | undefined; severity_condition_object?: - | SeverityMatrixConditionEntity$Outbound + | NullableSeverityMatrixConditionEntity$Outbound + | null + | undefined; + private_id?: string | null | undefined; + organization_id?: string | null | undefined; + milestones?: Array | null | undefined; + lifecycle_phases?: + | Array + | null | undefined; - private_id?: string | undefined; - organization_id?: string | undefined; - milestones?: Array | undefined; - lifecycle_phases?: Array | undefined; lifecycle_measurements?: | Array + | null | undefined; - active?: boolean | undefined; - labels?: IncidentEntityLabels$Outbound | undefined; - role_assignments?: Array | undefined; - status_pages?: Array | undefined; - incident_url?: string | undefined; - private_status_page_url?: string | undefined; - organization?: OrganizationEntity$Outbound | undefined; - customers_impacted?: number | undefined; - monetary_impact?: number | undefined; - monetary_impact_cents?: number | undefined; - last_update?: string | undefined; - last_note?: EventNoteEntity$Outbound | undefined; - report_id?: string | undefined; - ai_incident_summary?: string | undefined; - services?: Array | undefined; - environments?: Array | undefined; - functionalities?: Array | undefined; - channel_name?: string | undefined; - channel_reference?: string | undefined; - channel_id?: string | undefined; - channel_status?: string | undefined; - incident_tickets?: Array | undefined; - ticket?: TicketingTicketEntity$Outbound | undefined; - impacts?: Array | undefined; + active?: boolean | null | undefined; + labels?: IncidentEntityLabels$Outbound | null | undefined; + role_assignments?: + | Array + | null + | undefined; + status_pages?: Array | null | undefined; + incident_url?: string | null | undefined; + private_status_page_url?: string | null | undefined; + organization?: NullableOrganizationEntity$Outbound | null | undefined; + customers_impacted?: number | null | undefined; + monetary_impact?: number | null | undefined; + monetary_impact_cents?: number | null | undefined; + last_update?: string | null | undefined; + last_note?: NullableEventNoteEntity$Outbound | null | undefined; + report_id?: string | null | undefined; + ai_incident_summary?: string | null | undefined; + services?: Array | null | undefined; + environments?: Array | null | undefined; + functionalities?: Array | null | undefined; + channel_name?: string | null | undefined; + channel_reference?: string | null | undefined; + channel_id?: string | null | undefined; + channel_status?: string | null | undefined; + incident_tickets?: Array | null | undefined; + ticket?: NullableTicketingTicketEntity$Outbound | null | undefined; + impacts?: Array | null | undefined; conference_bridges?: | Array + | null + | undefined; + incident_channels?: Array | null | undefined; + retro_exports?: Array | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + context_object?: + | NullableIncidentsContextObjectEntity$Outbound + | null | undefined; - incident_channels?: Array | undefined; - retro_exports?: Array | undefined; - created_by?: AuthorEntity$Outbound | undefined; - context_object?: IncidentsContextObjectEntity$Outbound | undefined; team_assignments?: | Array + | null + | undefined; + conversations?: + | Array + | null | undefined; - conversations?: Array | undefined; - custom_fields?: Array | undefined; + custom_fields?: Array | null | undefined; field_requirements?: | Array + | null | undefined; }; @@ -532,71 +576,90 @@ export const IncidentEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - startedAt: z.date().transform(v => v.toISOString()).optional(), - discardedAt: z.date().transform(v => v.toISOString()).optional(), - summary: z.string().optional(), - customerImpactSummary: z.string().optional(), - description: z.string().optional(), - currentMilestone: z.string().optional(), - number: z.number().int().optional(), - priority: z.string().optional(), - severity: z.string().optional(), - severityColor: z.string().optional(), - severityImpact: z.string().optional(), - severityCondition: z.string().optional(), - tagList: z.array(z.string()).optional(), - severityImpactObject: SeverityMatrixImpactEntity$outboundSchema.optional(), - severityConditionObject: SeverityMatrixConditionEntity$outboundSchema + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + startedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + discardedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + summary: z.nullable(z.string()).optional(), + customerImpactSummary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + currentMilestone: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severityColor: z.nullable(z.string()).optional(), + severityImpact: z.nullable(z.string()).optional(), + severityCondition: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + severityImpactObject: z.nullable( + NullableSeverityMatrixImpactEntity$outboundSchema, + ).optional(), + severityConditionObject: z.nullable( + NullableSeverityMatrixConditionEntity$outboundSchema, + ).optional(), + privateId: z.nullable(z.string()).optional(), + organizationId: z.nullable(z.string()).optional(), + milestones: z.nullable(z.array(IncidentsMilestoneEntity$outboundSchema)) .optional(), - privateId: z.string().optional(), - organizationId: z.string().optional(), - milestones: z.array(IncidentsMilestoneEntity$outboundSchema).optional(), - lifecyclePhases: z.array(IncidentsLifecyclePhaseEntity$outboundSchema) + lifecyclePhases: z.nullable( + z.array(IncidentsLifecyclePhaseEntity$outboundSchema), + ).optional(), + lifecycleMeasurements: z.nullable( + z.array(IncidentsLifecycleMeasurementEntity$outboundSchema), + ).optional(), + active: z.nullable(z.boolean()).optional(), + labels: z.nullable(z.lazy(() => IncidentEntityLabels$outboundSchema)) .optional(), - lifecycleMeasurements: z.array( - IncidentsLifecycleMeasurementEntity$outboundSchema, + roleAssignments: z.nullable( + z.array(IncidentsRoleAssignmentEntity$outboundSchema), ).optional(), - active: z.boolean().optional(), - labels: z.lazy(() => IncidentEntityLabels$outboundSchema).optional(), - roleAssignments: z.array(IncidentsRoleAssignmentEntity$outboundSchema) + statusPages: z.nullable(z.array(IncidentsStatusPageEntity$outboundSchema)) + .optional(), + incidentUrl: z.nullable(z.string()).optional(), + privateStatusPageUrl: z.nullable(z.string()).optional(), + organization: z.nullable(NullableOrganizationEntity$outboundSchema) .optional(), - statusPages: z.array(IncidentsStatusPageEntity$outboundSchema).optional(), - incidentUrl: z.string().optional(), - privateStatusPageUrl: z.string().optional(), - organization: OrganizationEntity$outboundSchema.optional(), - customersImpacted: z.number().int().optional(), - monetaryImpact: z.number().int().optional(), - monetaryImpactCents: z.number().int().optional(), - lastUpdate: z.string().optional(), - lastNote: EventNoteEntity$outboundSchema.optional(), - reportId: z.string().optional(), - aiIncidentSummary: z.string().optional(), - services: z.array(SuccinctEntity$outboundSchema).optional(), - environments: z.array(SuccinctEntity$outboundSchema).optional(), - functionalities: z.array(SuccinctEntity$outboundSchema).optional(), - channelName: z.string().optional(), - channelReference: z.string().optional(), - channelId: z.string().optional(), - channelStatus: z.string().optional(), - incidentTickets: z.array(TicketingTicketEntity$outboundSchema).optional(), - ticket: TicketingTicketEntity$outboundSchema.optional(), - impacts: z.array(IncidentsImpactEntity$outboundSchema).optional(), - conferenceBridges: z.array(IncidentsConferenceBridgeEntity$outboundSchema) + customersImpacted: z.nullable(z.number().int()).optional(), + monetaryImpact: z.nullable(z.number().int()).optional(), + monetaryImpactCents: z.nullable(z.number().int()).optional(), + lastUpdate: z.nullable(z.string()).optional(), + lastNote: z.nullable(NullableEventNoteEntity$outboundSchema).optional(), + reportId: z.nullable(z.string()).optional(), + aiIncidentSummary: z.nullable(z.string()).optional(), + services: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + environments: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + functionalities: z.nullable(z.array(SuccinctEntity$outboundSchema)) .optional(), - incidentChannels: z.array(IncidentsChannelEntity$outboundSchema).optional(), - retroExports: z.array(z.lazy(() => RetroExports$outboundSchema)).optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - contextObject: IncidentsContextObjectEntity$outboundSchema.optional(), - teamAssignments: z.array(IncidentsTeamAssignmentEntityLite$outboundSchema) + channelName: z.nullable(z.string()).optional(), + channelReference: z.nullable(z.string()).optional(), + channelId: z.nullable(z.string()).optional(), + channelStatus: z.nullable(z.string()).optional(), + incidentTickets: z.nullable(z.array(TicketingTicketEntity$outboundSchema)) .optional(), - conversations: z.array(ConversationsAPIEntitiesReference$outboundSchema) + ticket: z.nullable(NullableTicketingTicketEntity$outboundSchema).optional(), + impacts: z.nullable(z.array(IncidentsImpactEntity$outboundSchema)).optional(), + conferenceBridges: z.nullable( + z.array(IncidentsConferenceBridgeEntity$outboundSchema), + ).optional(), + incidentChannels: z.nullable(z.array(IncidentsChannelEntity$outboundSchema)) + .optional(), + retroExports: z.nullable( + z.array(z.lazy(() => IncidentEntityRetroExport$outboundSchema)), + ).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + contextObject: z.nullable(NullableIncidentsContextObjectEntity$outboundSchema) + .optional(), + teamAssignments: z.nullable( + z.array(IncidentsTeamAssignmentEntityLite$outboundSchema), + ).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), + customFields: z.nullable(z.array(CustomFieldsFieldValue$outboundSchema)) .optional(), - customFields: z.array(CustomFieldsFieldValue$outboundSchema).optional(), - fieldRequirements: z.array( - IncidentEntityFieldRequirementEntity$outboundSchema, + fieldRequirements: z.nullable( + z.array(IncidentEntityFieldRequirementEntity$outboundSchema), ).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/components/incidententityfieldrequiremententity.ts b/src/models/components/incidententityfieldrequiremententity.ts index 213c5d61..118a21e8 100644 --- a/src/models/components/incidententityfieldrequiremententity.ts +++ b/src/models/components/incidententityfieldrequiremententity.ts @@ -12,11 +12,11 @@ export type IncidentEntityFieldRequirementEntity = { /** * A unique identifier for the field. */ - fieldId?: string | undefined; + fieldId?: string | null | undefined; /** * The milestone at which this field is required. If null, this field is always required. */ - requiredAtMilestoneId?: string | undefined; + requiredAtMilestoneId?: string | null | undefined; }; /** @internal */ @@ -25,8 +25,8 @@ export const IncidentEntityFieldRequirementEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - field_id: z.string().optional(), - required_at_milestone_id: z.string().optional(), + field_id: z.nullable(z.string()).optional(), + required_at_milestone_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "field_id": "fieldId", @@ -36,8 +36,8 @@ export const IncidentEntityFieldRequirementEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentEntityFieldRequirementEntity$Outbound = { - field_id?: string | undefined; - required_at_milestone_id?: string | undefined; + field_id?: string | null | undefined; + required_at_milestone_id?: string | null | undefined; }; /** @internal */ @@ -46,8 +46,8 @@ export const IncidentEntityFieldRequirementEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentEntityFieldRequirementEntity > = z.object({ - fieldId: z.string().optional(), - requiredAtMilestoneId: z.string().optional(), + fieldId: z.nullable(z.string()).optional(), + requiredAtMilestoneId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { fieldId: "field_id", diff --git a/src/models/components/incidententitypaginated.ts b/src/models/components/incidententitypaginated.ts index 32142e9e..7ae9414c 100644 --- a/src/models/components/incidententitypaginated.ts +++ b/src/models/components/incidententitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentEntity$outboundSchema, } from "./incidententity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * IncidentEntityPaginated model */ export type IncidentEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const IncidentEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentEntityPaginated > = z.object({ - data: z.array(IncidentEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentevententity.ts b/src/models/components/incidentevententity.ts index c1cc820c..2e9e83df 100644 --- a/src/models/components/incidentevententity.ts +++ b/src/models/components/incidentevententity.ts @@ -8,12 +8,6 @@ import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; import { ConversationsAPIEntitiesReference, ConversationsAPIEntitiesReference$inboundSchema, @@ -21,44 +15,49 @@ import { ConversationsAPIEntitiesReference$outboundSchema, } from "./conversationsapientitiesreference.js"; import { - VotesEntity, - VotesEntity$inboundSchema, - VotesEntity$Outbound, - VotesEntity$outboundSchema, -} from "./votesentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableVotesEntity, + NullableVotesEntity$inboundSchema, + NullableVotesEntity$Outbound, + NullableVotesEntity$outboundSchema, +} from "./nullablevotesentity.js"; /** * Can be one of: NoteEntity, TourStepEntity, RootCauseEntity, ChangeTypeEntity, RoleUpdateEntity, TaskUpdateEntity, AlertLinkedEntity, ChatMessageEntity, AddTaskListEntity, ImpactUpdateEntity, TicketUpdateEntity, GeneralUpdateEntity, ChangelogEntryEntity, IncidentStatusEntity, TeamAssignmentEntity, BulkUpdateEntity */ export type IncidentEventEntityData = {}; -export const Visibility = { +export const IncidentEventEntityVisibility = { PrivateToOrg: "private_to_org", OpenToPublic: "open_to_public", InternalStatusPage: "internal_status_page", } as const; -export type Visibility = ClosedEnum; +export type IncidentEventEntityVisibility = ClosedEnum< + typeof IncidentEventEntityVisibility +>; /** * IncidentEventEntity model */ export type IncidentEventEntity = { - id?: string | undefined; - incidentId?: string | undefined; - type?: string | undefined; - context?: string | undefined; + id?: string | null | undefined; + incidentId?: string | null | undefined; + type?: string | null | undefined; + context?: string | null | undefined; /** * Can be one of: NoteEntity, TourStepEntity, RootCauseEntity, ChangeTypeEntity, RoleUpdateEntity, TaskUpdateEntity, AlertLinkedEntity, ChatMessageEntity, AddTaskListEntity, ImpactUpdateEntity, TicketUpdateEntity, GeneralUpdateEntity, ChangelogEntryEntity, IncidentStatusEntity, TeamAssignmentEntity, BulkUpdateEntity */ - data?: IncidentEventEntityData | undefined; - occurredAt?: Date | undefined; - visibility?: Visibility | undefined; - author?: AuthorEntity | undefined; - /** - * VotesEntity model - */ - votes?: VotesEntity | undefined; - conversations?: Array | undefined; + data?: IncidentEventEntityData | null | undefined; + occurredAt?: Date | null | undefined; + visibility?: IncidentEventEntityVisibility | null | undefined; + author?: NullableAuthorEntity | null | undefined; + votes?: NullableVotesEntity | null | undefined; + conversations?: Array | null | undefined; }; /** @internal */ @@ -110,22 +109,24 @@ export function incidentEventEntityDataFromJSON( } /** @internal */ -export const Visibility$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Visibility); +export const IncidentEventEntityVisibility$inboundSchema: z.ZodNativeEnum< + typeof IncidentEventEntityVisibility +> = z.nativeEnum(IncidentEventEntityVisibility); /** @internal */ -export const Visibility$outboundSchema: z.ZodNativeEnum = - Visibility$inboundSchema; +export const IncidentEventEntityVisibility$outboundSchema: z.ZodNativeEnum< + typeof IncidentEventEntityVisibility +> = IncidentEventEntityVisibility$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Visibility$ { - /** @deprecated use `Visibility$inboundSchema` instead. */ - export const inboundSchema = Visibility$inboundSchema; - /** @deprecated use `Visibility$outboundSchema` instead. */ - export const outboundSchema = Visibility$outboundSchema; +export namespace IncidentEventEntityVisibility$ { + /** @deprecated use `IncidentEventEntityVisibility$inboundSchema` instead. */ + export const inboundSchema = IncidentEventEntityVisibility$inboundSchema; + /** @deprecated use `IncidentEventEntityVisibility$outboundSchema` instead. */ + export const outboundSchema = IncidentEventEntityVisibility$outboundSchema; } /** @internal */ @@ -134,18 +135,22 @@ export const IncidentEventEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - incident_id: z.string().optional(), - type: z.string().optional(), - context: z.string().optional(), - data: z.lazy(() => IncidentEventEntityData$inboundSchema).optional(), - occurred_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + incident_id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + context: z.nullable(z.string()).optional(), + data: z.nullable(z.lazy(() => IncidentEventEntityData$inboundSchema)) .optional(), - visibility: Visibility$inboundSchema.optional(), - author: AuthorEntity$inboundSchema.optional(), - votes: VotesEntity$inboundSchema.optional(), - conversations: z.array(ConversationsAPIEntitiesReference$inboundSchema) + occurred_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + visibility: z.nullable(IncidentEventEntityVisibility$inboundSchema) .optional(), + author: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + votes: z.nullable(NullableVotesEntity$inboundSchema).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", @@ -155,16 +160,19 @@ export const IncidentEventEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentEventEntity$Outbound = { - id?: string | undefined; - incident_id?: string | undefined; - type?: string | undefined; - context?: string | undefined; - data?: IncidentEventEntityData$Outbound | undefined; - occurred_at?: string | undefined; - visibility?: string | undefined; - author?: AuthorEntity$Outbound | undefined; - votes?: VotesEntity$Outbound | undefined; - conversations?: Array | undefined; + id?: string | null | undefined; + incident_id?: string | null | undefined; + type?: string | null | undefined; + context?: string | null | undefined; + data?: IncidentEventEntityData$Outbound | null | undefined; + occurred_at?: string | null | undefined; + visibility?: string | null | undefined; + author?: NullableAuthorEntity$Outbound | null | undefined; + votes?: NullableVotesEntity$Outbound | null | undefined; + conversations?: + | Array + | null + | undefined; }; /** @internal */ @@ -173,17 +181,20 @@ export const IncidentEventEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentEventEntity > = z.object({ - id: z.string().optional(), - incidentId: z.string().optional(), - type: z.string().optional(), - context: z.string().optional(), - data: z.lazy(() => IncidentEventEntityData$outboundSchema).optional(), - occurredAt: z.date().transform(v => v.toISOString()).optional(), - visibility: Visibility$outboundSchema.optional(), - author: AuthorEntity$outboundSchema.optional(), - votes: VotesEntity$outboundSchema.optional(), - conversations: z.array(ConversationsAPIEntitiesReference$outboundSchema) + id: z.nullable(z.string()).optional(), + incidentId: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + context: z.nullable(z.string()).optional(), + data: z.nullable(z.lazy(() => IncidentEventEntityData$outboundSchema)) + .optional(), + occurredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + visibility: z.nullable(IncidentEventEntityVisibility$outboundSchema) .optional(), + author: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + votes: z.nullable(NullableVotesEntity$outboundSchema).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { incidentId: "incident_id", diff --git a/src/models/components/incidentevententitypaginated.ts b/src/models/components/incidentevententitypaginated.ts index c69ec03d..e5b75e65 100644 --- a/src/models/components/incidentevententitypaginated.ts +++ b/src/models/components/incidentevententitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentEventEntity$outboundSchema, } from "./incidentevententity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * IncidentEventEntityPaginated model */ export type IncidentEventEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentEventEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentEventEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentEventEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentEventEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const IncidentEventEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentEventEntityPaginated > = z.object({ - data: z.array(IncidentEventEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentEventEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentimpactentity.ts b/src/models/components/incidentimpactentity.ts index 7a83730c..087caa4f 100644 --- a/src/models/components/incidentimpactentity.ts +++ b/src/models/components/incidentimpactentity.ts @@ -7,19 +7,19 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - SuccinctEntity, - SuccinctEntity$inboundSchema, - SuccinctEntity$Outbound, - SuccinctEntity$outboundSchema, -} from "./succinctentity.js"; + NullableSuccinctEntity, + NullableSuccinctEntity$inboundSchema, + NullableSuccinctEntity$Outbound, + NullableSuccinctEntity$outboundSchema, +} from "./nullablesuccinctentity.js"; /** * IncidentImpactEntity model */ export type IncidentImpactEntity = { - id?: string | undefined; - type?: string | undefined; - infrastructure?: SuccinctEntity | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + infrastructure?: NullableSuccinctEntity | null | undefined; }; /** @internal */ @@ -28,16 +28,16 @@ export const IncidentImpactEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - infrastructure: SuccinctEntity$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + infrastructure: z.nullable(NullableSuccinctEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentImpactEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - infrastructure?: SuccinctEntity$Outbound | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + infrastructure?: NullableSuccinctEntity$Outbound | null | undefined; }; /** @internal */ @@ -46,9 +46,9 @@ export const IncidentImpactEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentImpactEntity > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - infrastructure: SuccinctEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + infrastructure: z.nullable(NullableSuccinctEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentimpactentitypaginated.ts b/src/models/components/incidentimpactentitypaginated.ts index a867c176..d620ccc1 100644 --- a/src/models/components/incidentimpactentitypaginated.ts +++ b/src/models/components/incidentimpactentitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentImpactEntity$outboundSchema, } from "./incidentimpactentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * IncidentImpactEntityPaginated model */ export type IncidentImpactEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentImpactEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentImpactEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentImpactEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentImpactEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const IncidentImpactEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentImpactEntityPaginated > = z.object({ - data: z.array(IncidentImpactEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentImpactEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentroleentity.ts b/src/models/components/incidentroleentity.ts index 7eb4a2c3..235be6a4 100644 --- a/src/models/components/incidentroleentity.ts +++ b/src/models/components/incidentroleentity.ts @@ -12,13 +12,13 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * IncidentRoleEntity model */ export type IncidentRoleEntity = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - discardedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + discardedAt?: Date | null | undefined; }; /** @internal */ @@ -27,16 +27,18 @@ export const IncidentRoleEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - discarded_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + discarded_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), }).transform((v) => { return remap$(v, { @@ -48,13 +50,13 @@ export const IncidentRoleEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentRoleEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - discarded_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + discarded_at?: string | null | undefined; }; /** @internal */ @@ -63,13 +65,13 @@ export const IncidentRoleEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentRoleEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - discardedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + discardedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/incidentroleentitypaginated.ts b/src/models/components/incidentroleentitypaginated.ts index d35308d3..f9a3e7b4 100644 --- a/src/models/components/incidentroleentitypaginated.ts +++ b/src/models/components/incidentroleentitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentRoleEntity$outboundSchema, } from "./incidentroleentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * IncidentRoleEntityPaginated model */ export type IncidentRoleEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentRoleEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentRoleEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentRoleEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentRoleEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const IncidentRoleEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentRoleEntityPaginated > = z.object({ - data: z.array(IncidentRoleEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentRoleEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentsalertentity.ts b/src/models/components/incidentsalertentity.ts index da0593b3..60a1d836 100644 --- a/src/models/components/incidentsalertentity.ts +++ b/src/models/components/incidentsalertentity.ts @@ -7,25 +7,22 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AlertsAlertEntity, - AlertsAlertEntity$inboundSchema, - AlertsAlertEntity$Outbound, - AlertsAlertEntity$outboundSchema, -} from "./alertsalertentity.js"; + NullableAlertsAlertEntity, + NullableAlertsAlertEntity$inboundSchema, + NullableAlertsAlertEntity$Outbound, + NullableAlertsAlertEntity$outboundSchema, +} from "./nullablealertsalertentity.js"; /** * Incidents_AlertEntity model */ export type IncidentsAlertEntity = { - id?: string | undefined; - /** - * Alerts_AlertEntity model - */ - alert?: AlertsAlertEntity | undefined; + id?: string | null | undefined; + alert?: NullableAlertsAlertEntity | null | undefined; /** * whether or not this is the primary alert for this incident */ - primary?: boolean | undefined; + primary?: boolean | null | undefined; }; /** @internal */ @@ -34,16 +31,16 @@ export const IncidentsAlertEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - alert: AlertsAlertEntity$inboundSchema.optional(), - primary: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + alert: z.nullable(NullableAlertsAlertEntity$inboundSchema).optional(), + primary: z.nullable(z.boolean()).optional(), }); /** @internal */ export type IncidentsAlertEntity$Outbound = { - id?: string | undefined; - alert?: AlertsAlertEntity$Outbound | undefined; - primary?: boolean | undefined; + id?: string | null | undefined; + alert?: NullableAlertsAlertEntity$Outbound | null | undefined; + primary?: boolean | null | undefined; }; /** @internal */ @@ -52,9 +49,9 @@ export const IncidentsAlertEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsAlertEntity > = z.object({ - id: z.string().optional(), - alert: AlertsAlertEntity$outboundSchema.optional(), - primary: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + alert: z.nullable(NullableAlertsAlertEntity$outboundSchema).optional(), + primary: z.nullable(z.boolean()).optional(), }); /** diff --git a/src/models/components/incidentsalertentitypaginated.ts b/src/models/components/incidentsalertentitypaginated.ts index cb68db38..b9d7188c 100644 --- a/src/models/components/incidentsalertentitypaginated.ts +++ b/src/models/components/incidentsalertentitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentsAlertEntity$outboundSchema, } from "./incidentsalertentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Incidents_AlertEntityPaginated model */ export type IncidentsAlertEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentsAlertEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentsAlertEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentsAlertEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentsAlertEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const IncidentsAlertEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsAlertEntityPaginated > = z.object({ - data: z.array(IncidentsAlertEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentsAlertEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentschannelentity.ts b/src/models/components/incidentschannelentity.ts index 82634633..92eec9fc 100644 --- a/src/models/components/incidentschannelentity.ts +++ b/src/models/components/incidentschannelentity.ts @@ -12,14 +12,14 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Incidents_ChannelEntity model */ export type IncidentsChannelEntity = { - id?: string | undefined; - name?: string | undefined; - source?: string | undefined; - sourceName?: string | undefined; - sourceId?: string | undefined; - url?: string | undefined; - iconUrl?: string | undefined; - status?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + sourceName?: string | null | undefined; + sourceId?: string | null | undefined; + url?: string | null | undefined; + iconUrl?: string | null | undefined; + status?: string | null | undefined; }; /** @internal */ @@ -28,14 +28,14 @@ export const IncidentsChannelEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - source: z.string().optional(), - source_name: z.string().optional(), - source_id: z.string().optional(), - url: z.string().optional(), - icon_url: z.string().optional(), - status: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + source_name: z.nullable(z.string()).optional(), + source_id: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + icon_url: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "source_name": "sourceName", @@ -46,14 +46,14 @@ export const IncidentsChannelEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentsChannelEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - source?: string | undefined; - source_name?: string | undefined; - source_id?: string | undefined; - url?: string | undefined; - icon_url?: string | undefined; - status?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + source_name?: string | null | undefined; + source_id?: string | null | undefined; + url?: string | null | undefined; + icon_url?: string | null | undefined; + status?: string | null | undefined; }; /** @internal */ @@ -62,14 +62,14 @@ export const IncidentsChannelEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsChannelEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - source: z.string().optional(), - sourceName: z.string().optional(), - sourceId: z.string().optional(), - url: z.string().optional(), - iconUrl: z.string().optional(), - status: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + sourceName: z.nullable(z.string()).optional(), + sourceId: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + iconUrl: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { sourceName: "source_name", diff --git a/src/models/components/incidentsconferencebridgeentity.ts b/src/models/components/incidentsconferencebridgeentity.ts index a9ab55bb..34ac175e 100644 --- a/src/models/components/incidentsconferencebridgeentity.ts +++ b/src/models/components/incidentsconferencebridgeentity.ts @@ -3,75 +3,91 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type IncidentsConferenceBridgeEntityAttachments = {}; +export type IncidentsConferenceBridgeEntityAttachment = {}; +/** + * Incidents_ConferenceBridgeEntity model + */ export type IncidentsConferenceBridgeEntity = { - id?: string | undefined; + id?: string | null | undefined; /** * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity */ - attachments?: Array | undefined; + attachments?: + | Array + | null + | undefined; + hasTranslatedTranscripts?: boolean | null | undefined; + /** + * A list of language codes that have translated transcripts for this conference bridge + */ + languageCodes?: Array | null | undefined; + transcriptionStatus?: string | null | undefined; + transcriptionSubCode?: string | null | undefined; }; /** @internal */ -export const IncidentsConferenceBridgeEntityAttachments$inboundSchema: - z.ZodType = - z.object({}); +export const IncidentsConferenceBridgeEntityAttachment$inboundSchema: z.ZodType< + IncidentsConferenceBridgeEntityAttachment, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ -export type IncidentsConferenceBridgeEntityAttachments$Outbound = {}; +export type IncidentsConferenceBridgeEntityAttachment$Outbound = {}; /** @internal */ -export const IncidentsConferenceBridgeEntityAttachments$outboundSchema: +export const IncidentsConferenceBridgeEntityAttachment$outboundSchema: z.ZodType< - IncidentsConferenceBridgeEntityAttachments$Outbound, + IncidentsConferenceBridgeEntityAttachment$Outbound, z.ZodTypeDef, - IncidentsConferenceBridgeEntityAttachments + IncidentsConferenceBridgeEntityAttachment > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace IncidentsConferenceBridgeEntityAttachments$ { - /** @deprecated use `IncidentsConferenceBridgeEntityAttachments$inboundSchema` instead. */ +export namespace IncidentsConferenceBridgeEntityAttachment$ { + /** @deprecated use `IncidentsConferenceBridgeEntityAttachment$inboundSchema` instead. */ export const inboundSchema = - IncidentsConferenceBridgeEntityAttachments$inboundSchema; - /** @deprecated use `IncidentsConferenceBridgeEntityAttachments$outboundSchema` instead. */ + IncidentsConferenceBridgeEntityAttachment$inboundSchema; + /** @deprecated use `IncidentsConferenceBridgeEntityAttachment$outboundSchema` instead. */ export const outboundSchema = - IncidentsConferenceBridgeEntityAttachments$outboundSchema; - /** @deprecated use `IncidentsConferenceBridgeEntityAttachments$Outbound` instead. */ - export type Outbound = IncidentsConferenceBridgeEntityAttachments$Outbound; + IncidentsConferenceBridgeEntityAttachment$outboundSchema; + /** @deprecated use `IncidentsConferenceBridgeEntityAttachment$Outbound` instead. */ + export type Outbound = IncidentsConferenceBridgeEntityAttachment$Outbound; } -export function incidentsConferenceBridgeEntityAttachmentsToJSON( - incidentsConferenceBridgeEntityAttachments: - IncidentsConferenceBridgeEntityAttachments, +export function incidentsConferenceBridgeEntityAttachmentToJSON( + incidentsConferenceBridgeEntityAttachment: + IncidentsConferenceBridgeEntityAttachment, ): string { return JSON.stringify( - IncidentsConferenceBridgeEntityAttachments$outboundSchema.parse( - incidentsConferenceBridgeEntityAttachments, + IncidentsConferenceBridgeEntityAttachment$outboundSchema.parse( + incidentsConferenceBridgeEntityAttachment, ), ); } -export function incidentsConferenceBridgeEntityAttachmentsFromJSON( +export function incidentsConferenceBridgeEntityAttachmentFromJSON( jsonString: string, ): SafeParseResult< - IncidentsConferenceBridgeEntityAttachments, + IncidentsConferenceBridgeEntityAttachment, SDKValidationError > { return safeParse( jsonString, (x) => - IncidentsConferenceBridgeEntityAttachments$inboundSchema.parse( + IncidentsConferenceBridgeEntityAttachment$inboundSchema.parse( JSON.parse(x), ), - `Failed to parse 'IncidentsConferenceBridgeEntityAttachments' from JSON`, + `Failed to parse 'IncidentsConferenceBridgeEntityAttachment' from JSON`, ); } @@ -81,18 +97,36 @@ export const IncidentsConferenceBridgeEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - attachments: z.array( - z.lazy(() => IncidentsConferenceBridgeEntityAttachments$inboundSchema), + id: z.nullable(z.string()).optional(), + attachments: z.nullable( + z.array( + z.lazy(() => IncidentsConferenceBridgeEntityAttachment$inboundSchema), + ), ).optional(), + has_translated_transcripts: z.nullable(z.boolean()).optional(), + language_codes: z.nullable(z.array(z.string())).optional(), + transcription_status: z.nullable(z.string()).optional(), + transcription_sub_code: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "has_translated_transcripts": "hasTranslatedTranscripts", + "language_codes": "languageCodes", + "transcription_status": "transcriptionStatus", + "transcription_sub_code": "transcriptionSubCode", + }); }); /** @internal */ export type IncidentsConferenceBridgeEntity$Outbound = { - id?: string | undefined; + id?: string | null | undefined; attachments?: - | Array + | Array + | null | undefined; + has_translated_transcripts?: boolean | null | undefined; + language_codes?: Array | null | undefined; + transcription_status?: string | null | undefined; + transcription_sub_code?: string | null | undefined; }; /** @internal */ @@ -101,10 +135,23 @@ export const IncidentsConferenceBridgeEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsConferenceBridgeEntity > = z.object({ - id: z.string().optional(), - attachments: z.array( - z.lazy(() => IncidentsConferenceBridgeEntityAttachments$outboundSchema), + id: z.nullable(z.string()).optional(), + attachments: z.nullable( + z.array(z.lazy(() => + IncidentsConferenceBridgeEntityAttachment$outboundSchema + )), ).optional(), + hasTranslatedTranscripts: z.nullable(z.boolean()).optional(), + languageCodes: z.nullable(z.array(z.string())).optional(), + transcriptionStatus: z.nullable(z.string()).optional(), + transcriptionSubCode: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + hasTranslatedTranscripts: "has_translated_transcripts", + languageCodes: "language_codes", + transcriptionStatus: "transcription_status", + transcriptionSubCode: "transcription_sub_code", + }); }); /** diff --git a/src/models/components/incidentscontextobjectentity.ts b/src/models/components/incidentscontextobjectentity.ts deleted file mode 100644 index ee4036eb..00000000 --- a/src/models/components/incidentscontextobjectentity.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type IncidentsContextObjectEntity = { - objectType?: string | undefined; - objectId?: string | undefined; - contextTag?: string | undefined; - contextDescription?: string | undefined; -}; - -/** @internal */ -export const IncidentsContextObjectEntity$inboundSchema: z.ZodType< - IncidentsContextObjectEntity, - z.ZodTypeDef, - unknown -> = z.object({ - object_type: z.string().optional(), - object_id: z.string().optional(), - context_tag: z.string().optional(), - context_description: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "object_type": "objectType", - "object_id": "objectId", - "context_tag": "contextTag", - "context_description": "contextDescription", - }); -}); - -/** @internal */ -export type IncidentsContextObjectEntity$Outbound = { - object_type?: string | undefined; - object_id?: string | undefined; - context_tag?: string | undefined; - context_description?: string | undefined; -}; - -/** @internal */ -export const IncidentsContextObjectEntity$outboundSchema: z.ZodType< - IncidentsContextObjectEntity$Outbound, - z.ZodTypeDef, - IncidentsContextObjectEntity -> = z.object({ - objectType: z.string().optional(), - objectId: z.string().optional(), - contextTag: z.string().optional(), - contextDescription: z.string().optional(), -}).transform((v) => { - return remap$(v, { - objectType: "object_type", - objectId: "object_id", - contextTag: "context_tag", - contextDescription: "context_description", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IncidentsContextObjectEntity$ { - /** @deprecated use `IncidentsContextObjectEntity$inboundSchema` instead. */ - export const inboundSchema = IncidentsContextObjectEntity$inboundSchema; - /** @deprecated use `IncidentsContextObjectEntity$outboundSchema` instead. */ - export const outboundSchema = IncidentsContextObjectEntity$outboundSchema; - /** @deprecated use `IncidentsContextObjectEntity$Outbound` instead. */ - export type Outbound = IncidentsContextObjectEntity$Outbound; -} - -export function incidentsContextObjectEntityToJSON( - incidentsContextObjectEntity: IncidentsContextObjectEntity, -): string { - return JSON.stringify( - IncidentsContextObjectEntity$outboundSchema.parse( - incidentsContextObjectEntity, - ), - ); -} - -export function incidentsContextObjectEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => IncidentsContextObjectEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IncidentsContextObjectEntity' from JSON`, - ); -} diff --git a/src/models/components/incidentsexportretrospectivesresultentity.ts b/src/models/components/incidentsexportretrospectivesresultentity.ts new file mode 100644 index 00000000..0e5a7984 --- /dev/null +++ b/src/models/components/incidentsexportretrospectivesresultentity.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableExternalResourceEntity, + NullableExternalResourceEntity$inboundSchema, + NullableExternalResourceEntity$Outbound, + NullableExternalResourceEntity$outboundSchema, +} from "./nullableexternalresourceentity.js"; + +/** + * Incidents_ExportRetrospectivesResultEntity model + */ +export type IncidentsExportRetrospectivesResultEntity = { + externalResource?: NullableExternalResourceEntity | null | undefined; +}; + +/** @internal */ +export const IncidentsExportRetrospectivesResultEntity$inboundSchema: z.ZodType< + IncidentsExportRetrospectivesResultEntity, + z.ZodTypeDef, + unknown +> = z.object({ + external_resource: z.nullable(NullableExternalResourceEntity$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "external_resource": "externalResource", + }); +}); + +/** @internal */ +export type IncidentsExportRetrospectivesResultEntity$Outbound = { + external_resource?: + | NullableExternalResourceEntity$Outbound + | null + | undefined; +}; + +/** @internal */ +export const IncidentsExportRetrospectivesResultEntity$outboundSchema: + z.ZodType< + IncidentsExportRetrospectivesResultEntity$Outbound, + z.ZodTypeDef, + IncidentsExportRetrospectivesResultEntity + > = z.object({ + externalResource: z.nullable(NullableExternalResourceEntity$outboundSchema) + .optional(), + }).transform((v) => { + return remap$(v, { + externalResource: "external_resource", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IncidentsExportRetrospectivesResultEntity$ { + /** @deprecated use `IncidentsExportRetrospectivesResultEntity$inboundSchema` instead. */ + export const inboundSchema = + IncidentsExportRetrospectivesResultEntity$inboundSchema; + /** @deprecated use `IncidentsExportRetrospectivesResultEntity$outboundSchema` instead. */ + export const outboundSchema = + IncidentsExportRetrospectivesResultEntity$outboundSchema; + /** @deprecated use `IncidentsExportRetrospectivesResultEntity$Outbound` instead. */ + export type Outbound = IncidentsExportRetrospectivesResultEntity$Outbound; +} + +export function incidentsExportRetrospectivesResultEntityToJSON( + incidentsExportRetrospectivesResultEntity: + IncidentsExportRetrospectivesResultEntity, +): string { + return JSON.stringify( + IncidentsExportRetrospectivesResultEntity$outboundSchema.parse( + incidentsExportRetrospectivesResultEntity, + ), + ); +} + +export function incidentsExportRetrospectivesResultEntityFromJSON( + jsonString: string, +): SafeParseResult< + IncidentsExportRetrospectivesResultEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IncidentsExportRetrospectivesResultEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IncidentsExportRetrospectivesResultEntity' from JSON`, + ); +} diff --git a/src/models/components/incidentsimpactentity.ts b/src/models/components/incidentsimpactentity.ts index 5124d8f5..bbe0d0f8 100644 --- a/src/models/components/incidentsimpactentity.ts +++ b/src/models/components/incidentsimpactentity.ts @@ -14,19 +14,20 @@ import { ConversationsAPIEntitiesReference$outboundSchema, } from "./conversationsapientitiesreference.js"; import { - SeverityMatrixConditionEntity, - SeverityMatrixConditionEntity$inboundSchema, - SeverityMatrixConditionEntity$Outbound, - SeverityMatrixConditionEntity$outboundSchema, -} from "./severitymatrixconditionentity.js"; + NullableSeverityMatrixConditionEntity, + NullableSeverityMatrixConditionEntity$inboundSchema, + NullableSeverityMatrixConditionEntity$Outbound, + NullableSeverityMatrixConditionEntity$outboundSchema, +} from "./nullableseveritymatrixconditionentity.js"; import { - SuccinctEntity, - SuccinctEntity$inboundSchema, - SuccinctEntity$Outbound, - SuccinctEntity$outboundSchema, -} from "./succinctentity.js"; + NullableSuccinctEntity, + NullableSuccinctEntity$inboundSchema, + NullableSuccinctEntity$Outbound, + NullableSuccinctEntity$outboundSchema, +} from "./nullablesuccinctentity.js"; export const IncidentsImpactEntityType = { + Customer: "customer", Environment: "environment", Functionality: "functionality", Service: "service", @@ -36,14 +37,11 @@ export type IncidentsImpactEntityType = ClosedEnum< >; export type IncidentsImpactEntity = { - id?: string | undefined; - type?: IncidentsImpactEntityType | undefined; - impact?: SuccinctEntity | undefined; - /** - * SeverityMatrix_ConditionEntity model - */ - condition?: SeverityMatrixConditionEntity | undefined; - conversations?: Array | undefined; + id?: string | null | undefined; + type?: IncidentsImpactEntityType | null | undefined; + impact?: NullableSuccinctEntity | null | undefined; + condition?: NullableSeverityMatrixConditionEntity | null | undefined; + conversations?: Array | null | undefined; }; /** @internal */ @@ -73,21 +71,26 @@ export const IncidentsImpactEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - type: IncidentsImpactEntityType$inboundSchema.optional(), - impact: SuccinctEntity$inboundSchema.optional(), - condition: SeverityMatrixConditionEntity$inboundSchema.optional(), - conversations: z.array(ConversationsAPIEntitiesReference$inboundSchema) + id: z.nullable(z.string()).optional(), + type: z.nullable(IncidentsImpactEntityType$inboundSchema).optional(), + impact: z.nullable(NullableSuccinctEntity$inboundSchema).optional(), + condition: z.nullable(NullableSeverityMatrixConditionEntity$inboundSchema) .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), }); /** @internal */ export type IncidentsImpactEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - impact?: SuccinctEntity$Outbound | undefined; - condition?: SeverityMatrixConditionEntity$Outbound | undefined; - conversations?: Array | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + impact?: NullableSuccinctEntity$Outbound | null | undefined; + condition?: NullableSeverityMatrixConditionEntity$Outbound | null | undefined; + conversations?: + | Array + | null + | undefined; }; /** @internal */ @@ -96,12 +99,14 @@ export const IncidentsImpactEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsImpactEntity > = z.object({ - id: z.string().optional(), - type: IncidentsImpactEntityType$outboundSchema.optional(), - impact: SuccinctEntity$outboundSchema.optional(), - condition: SeverityMatrixConditionEntity$outboundSchema.optional(), - conversations: z.array(ConversationsAPIEntitiesReference$outboundSchema) + id: z.nullable(z.string()).optional(), + type: z.nullable(IncidentsImpactEntityType$outboundSchema).optional(), + impact: z.nullable(NullableSuccinctEntity$outboundSchema).optional(), + condition: z.nullable(NullableSeverityMatrixConditionEntity$outboundSchema) .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), }); /** diff --git a/src/models/components/incidentslifecyclemeasuremententity.ts b/src/models/components/incidentslifecyclemeasuremententity.ts index d18a94b3..bb14a5d5 100644 --- a/src/models/components/incidentslifecyclemeasuremententity.ts +++ b/src/models/components/incidentslifecyclemeasuremententity.ts @@ -9,14 +9,14 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IncidentsLifecycleMeasurementEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - startsAtMilestone?: string | undefined; - endsAtMilestone?: string | undefined; - value?: string | undefined; - calculatedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + startsAtMilestone?: string | null | undefined; + endsAtMilestone?: string | null | undefined; + value?: string | null | undefined; + calculatedAt?: Date | null | undefined; }; /** @internal */ @@ -25,15 +25,15 @@ export const IncidentsLifecycleMeasurementEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - starts_at_milestone: z.string().optional(), - ends_at_milestone: z.string().optional(), - value: z.string().optional(), - calculated_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + starts_at_milestone: z.nullable(z.string()).optional(), + ends_at_milestone: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + calculated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), }).transform((v) => { return remap$(v, { @@ -45,14 +45,14 @@ export const IncidentsLifecycleMeasurementEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentsLifecycleMeasurementEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - starts_at_milestone?: string | undefined; - ends_at_milestone?: string | undefined; - value?: string | undefined; - calculated_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + starts_at_milestone?: string | null | undefined; + ends_at_milestone?: string | null | undefined; + value?: string | null | undefined; + calculated_at?: string | null | undefined; }; /** @internal */ @@ -61,14 +61,14 @@ export const IncidentsLifecycleMeasurementEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsLifecycleMeasurementEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - startsAtMilestone: z.string().optional(), - endsAtMilestone: z.string().optional(), - value: z.string().optional(), - calculatedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + startsAtMilestone: z.nullable(z.string()).optional(), + endsAtMilestone: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + calculatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { startsAtMilestone: "starts_at_milestone", diff --git a/src/models/components/incidentslifecyclemilestoneentity.ts b/src/models/components/incidentslifecyclemilestoneentity.ts index 0178ccf8..53a29123 100644 --- a/src/models/components/incidentslifecyclemilestoneentity.ts +++ b/src/models/components/incidentslifecyclemilestoneentity.ts @@ -8,22 +8,22 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; export type IncidentsLifecycleMilestoneEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - position?: number | undefined; - occurredAt?: Date | undefined; - duration?: string | undefined; - updatedBy?: AuthorEntity | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + position?: number | null | undefined; + occurredAt?: Date | null | undefined; + duration?: string | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; + updatedAt?: Date | null | undefined; }; /** @internal */ @@ -32,17 +32,19 @@ export const IncidentsLifecycleMilestoneEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - position: z.number().int().optional(), - occurred_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - duration: z.string().optional(), - updated_by: AuthorEntity$inboundSchema.optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + occurred_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + duration: z.nullable(z.string()).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "occurred_at": "occurredAt", @@ -53,15 +55,15 @@ export const IncidentsLifecycleMilestoneEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentsLifecycleMilestoneEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - position?: number | undefined; - occurred_at?: string | undefined; - duration?: string | undefined; - updated_by?: AuthorEntity$Outbound | undefined; - updated_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + position?: number | null | undefined; + occurred_at?: string | null | undefined; + duration?: string | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; + updated_at?: string | null | undefined; }; /** @internal */ @@ -70,15 +72,15 @@ export const IncidentsLifecycleMilestoneEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsLifecycleMilestoneEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - position: z.number().int().optional(), - occurredAt: z.date().transform(v => v.toISOString()).optional(), - duration: z.string().optional(), - updatedBy: AuthorEntity$outboundSchema.optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + occurredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + duration: z.nullable(z.string()).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { occurredAt: "occurred_at", diff --git a/src/models/components/incidentslifecyclephaseentity.ts b/src/models/components/incidentslifecyclephaseentity.ts index ec6f257e..b6ce5220 100644 --- a/src/models/components/incidentslifecyclephaseentity.ts +++ b/src/models/components/incidentslifecyclephaseentity.ts @@ -14,12 +14,12 @@ import { } from "./incidentslifecyclemilestoneentity.js"; export type IncidentsLifecyclePhaseEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - type?: string | undefined; - position?: number | undefined; - milestones?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + position?: number | null | undefined; + milestones?: Array | null | undefined; }; /** @internal */ @@ -28,23 +28,27 @@ export const IncidentsLifecyclePhaseEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - position: z.number().int().optional(), - milestones: z.array(IncidentsLifecycleMilestoneEntity$inboundSchema) - .optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + milestones: z.nullable( + z.array(IncidentsLifecycleMilestoneEntity$inboundSchema), + ).optional(), }); /** @internal */ export type IncidentsLifecyclePhaseEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - type?: string | undefined; - position?: number | undefined; - milestones?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + position?: number | null | undefined; + milestones?: + | Array + | null + | undefined; }; /** @internal */ @@ -53,13 +57,14 @@ export const IncidentsLifecyclePhaseEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsLifecyclePhaseEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - position: z.number().int().optional(), - milestones: z.array(IncidentsLifecycleMilestoneEntity$outboundSchema) - .optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + milestones: z.nullable( + z.array(IncidentsLifecycleMilestoneEntity$outboundSchema), + ).optional(), }); /** diff --git a/src/models/components/incidentsmilestoneentity.ts b/src/models/components/incidentsmilestoneentity.ts index 066597e3..ff8f2652 100644 --- a/src/models/components/incidentsmilestoneentity.ts +++ b/src/models/components/incidentsmilestoneentity.ts @@ -9,18 +9,18 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IncidentsMilestoneEntity = { - id?: string | undefined; + id?: string | null | undefined; /** * The milestone's type. This will be one of the currently configured milestones for the given incident. */ - type?: string | undefined; + type?: string | null | undefined; /** * How long the incident spent in this milestones, in ISO 8601 Duration Format. This will be null if the milestone is the incident's current milestone. */ - duration?: string | undefined; - occurredAt?: Date | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + duration?: string | null | undefined; + occurredAt?: Date | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; }; /** @internal */ @@ -29,15 +29,18 @@ export const IncidentsMilestoneEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - duration: z.string().optional(), - occurred_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + duration: z.nullable(z.string()).optional(), + occurred_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "occurred_at": "occurredAt", @@ -48,12 +51,12 @@ export const IncidentsMilestoneEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentsMilestoneEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - duration?: string | undefined; - occurred_at?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + duration?: string | null | undefined; + occurred_at?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; }; /** @internal */ @@ -62,12 +65,12 @@ export const IncidentsMilestoneEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsMilestoneEntity > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - duration: z.string().optional(), - occurredAt: z.date().transform(v => v.toISOString()).optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + duration: z.nullable(z.string()).optional(), + occurredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { occurredAt: "occurred_at", diff --git a/src/models/components/incidentsmilestoneentitypaginated.ts b/src/models/components/incidentsmilestoneentitypaginated.ts index fa36457e..54473c81 100644 --- a/src/models/components/incidentsmilestoneentitypaginated.ts +++ b/src/models/components/incidentsmilestoneentitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentsMilestoneEntity$outboundSchema, } from "./incidentsmilestoneentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Incidents_MilestoneEntityPaginated model */ export type IncidentsMilestoneEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentsMilestoneEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentsMilestoneEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentsMilestoneEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentsMilestoneEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const IncidentsMilestoneEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsMilestoneEntityPaginated > = z.object({ - data: z.array(IncidentsMilestoneEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentsMilestoneEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentsrelatedchangeevententity.ts b/src/models/components/incidentsrelatedchangeevententity.ts index bf59a1ba..f01b4d59 100644 --- a/src/models/components/incidentsrelatedchangeevententity.ts +++ b/src/models/components/incidentsrelatedchangeevententity.ts @@ -9,17 +9,17 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; import { - ChangeEventEntity, - ChangeEventEntity$inboundSchema, - ChangeEventEntity$Outbound, - ChangeEventEntity$outboundSchema, -} from "./changeevententity.js"; + NullableChangeEventEntity, + NullableChangeEventEntity$inboundSchema, + NullableChangeEventEntity$Outbound, + NullableChangeEventEntity$outboundSchema, +} from "./nullablechangeevententity.js"; export const IncidentsRelatedChangeEventEntityType = { Caused: "caused", @@ -35,20 +35,17 @@ export type IncidentsRelatedChangeEventEntityType = ClosedEnum< * Incidents_RelatedChangeEventEntity model */ export type IncidentsRelatedChangeEventEntity = { - id?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; /** * The reason why this change event is related to this incident */ - why?: string | undefined; - type?: IncidentsRelatedChangeEventEntityType | undefined; - /** - * ChangeEventEntity model - */ - changeEvent?: ChangeEventEntity | undefined; - incidentId?: string | undefined; - createdBy?: AuthorEntity | undefined; + why?: string | null | undefined; + type?: IncidentsRelatedChangeEventEntityType | null | undefined; + changeEvent?: NullableChangeEventEntity | null | undefined; + incidentId?: string | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; }; /** @internal */ @@ -81,16 +78,19 @@ export const IncidentsRelatedChangeEventEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + why: z.nullable(z.string()).optional(), + type: z.nullable(IncidentsRelatedChangeEventEntityType$inboundSchema) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - why: z.string().optional(), - type: IncidentsRelatedChangeEventEntityType$inboundSchema.optional(), - change_event: ChangeEventEntity$inboundSchema.optional(), - incident_id: z.string().optional(), - created_by: AuthorEntity$inboundSchema.optional(), + change_event: z.nullable(NullableChangeEventEntity$inboundSchema).optional(), + incident_id: z.nullable(z.string()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -103,14 +103,14 @@ export const IncidentsRelatedChangeEventEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentsRelatedChangeEventEntity$Outbound = { - id?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - why?: string | undefined; - type?: string | undefined; - change_event?: ChangeEventEntity$Outbound | undefined; - incident_id?: string | undefined; - created_by?: AuthorEntity$Outbound | undefined; + id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + why?: string | null | undefined; + type?: string | null | undefined; + change_event?: NullableChangeEventEntity$Outbound | null | undefined; + incident_id?: string | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; }; /** @internal */ @@ -119,14 +119,15 @@ export const IncidentsRelatedChangeEventEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsRelatedChangeEventEntity > = z.object({ - id: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - why: z.string().optional(), - type: IncidentsRelatedChangeEventEntityType$outboundSchema.optional(), - changeEvent: ChangeEventEntity$outboundSchema.optional(), - incidentId: z.string().optional(), - createdBy: AuthorEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + why: z.nullable(z.string()).optional(), + type: z.nullable(IncidentsRelatedChangeEventEntityType$outboundSchema) + .optional(), + changeEvent: z.nullable(NullableChangeEventEntity$outboundSchema).optional(), + incidentId: z.nullable(z.string()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/incidentsrelatedchangeevententitypaginated.ts b/src/models/components/incidentsrelatedchangeevententitypaginated.ts index b6de5cb3..b4a2a042 100644 --- a/src/models/components/incidentsrelatedchangeevententitypaginated.ts +++ b/src/models/components/incidentsrelatedchangeevententitypaginated.ts @@ -13,32 +13,33 @@ import { IncidentsRelatedChangeEventEntity$outboundSchema, } from "./incidentsrelatedchangeevententity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Incidents_RelatedChangeEventEntityPaginated model */ export type IncidentsRelatedChangeEventEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ export const IncidentsRelatedChangeEventEntityPaginated$inboundSchema: z.ZodType = z.object({ - data: z.array(IncidentsRelatedChangeEventEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentsRelatedChangeEventEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentsRelatedChangeEventEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -48,8 +49,9 @@ export const IncidentsRelatedChangeEventEntityPaginated$outboundSchema: z.ZodTypeDef, IncidentsRelatedChangeEventEntityPaginated > = z.object({ - data: z.array(IncidentsRelatedChangeEventEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentsRelatedChangeEventEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentsrelationshipsentity.ts b/src/models/components/incidentsrelationshipsentity.ts index e5ab5f7b..a71a9953 100644 --- a/src/models/components/incidentsrelationshipsentity.ts +++ b/src/models/components/incidentsrelationshipsentity.ts @@ -6,6 +6,12 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullablePublicApiv1IncidentsSuccinctEntity, + NullablePublicApiv1IncidentsSuccinctEntity$inboundSchema, + NullablePublicApiv1IncidentsSuccinctEntity$Outbound, + NullablePublicApiv1IncidentsSuccinctEntity$outboundSchema, +} from "./nullablepublicapiv1incidentssuccinctentity.js"; import { PublicApiv1IncidentsSuccinctEntity, PublicApiv1IncidentsSuccinctEntity$inboundSchema, @@ -17,15 +23,15 @@ import { * Incidents_RelationshipsEntity model */ export type IncidentsRelationshipsEntity = { - parent?: PublicApiv1IncidentsSuccinctEntity | undefined; + parent?: NullablePublicApiv1IncidentsSuccinctEntity | null | undefined; /** * The root incident's child incidents. */ - children?: Array | undefined; + children?: Array | null | undefined; /** * A list of incidents that share the root incident's parent. */ - siblings?: Array | undefined; + siblings?: Array | null | undefined; }; /** @internal */ @@ -34,18 +40,30 @@ export const IncidentsRelationshipsEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - parent: PublicApiv1IncidentsSuccinctEntity$inboundSchema.optional(), - children: z.array(PublicApiv1IncidentsSuccinctEntity$inboundSchema) - .optional(), - siblings: z.array(PublicApiv1IncidentsSuccinctEntity$inboundSchema) + parent: z.nullable(NullablePublicApiv1IncidentsSuccinctEntity$inboundSchema) .optional(), + children: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$inboundSchema), + ).optional(), + siblings: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$inboundSchema), + ).optional(), }); /** @internal */ export type IncidentsRelationshipsEntity$Outbound = { - parent?: PublicApiv1IncidentsSuccinctEntity$Outbound | undefined; - children?: Array | undefined; - siblings?: Array | undefined; + parent?: + | NullablePublicApiv1IncidentsSuccinctEntity$Outbound + | null + | undefined; + children?: + | Array + | null + | undefined; + siblings?: + | Array + | null + | undefined; }; /** @internal */ @@ -54,11 +72,14 @@ export const IncidentsRelationshipsEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsRelationshipsEntity > = z.object({ - parent: PublicApiv1IncidentsSuccinctEntity$outboundSchema.optional(), - children: z.array(PublicApiv1IncidentsSuccinctEntity$outboundSchema) - .optional(), - siblings: z.array(PublicApiv1IncidentsSuccinctEntity$outboundSchema) + parent: z.nullable(NullablePublicApiv1IncidentsSuccinctEntity$outboundSchema) .optional(), + children: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$outboundSchema), + ).optional(), + siblings: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$outboundSchema), + ).optional(), }); /** diff --git a/src/models/components/incidentsretrospectiveentity.ts b/src/models/components/incidentsretrospectiveentity.ts new file mode 100644 index 00000000..7e63c3d0 --- /dev/null +++ b/src/models/components/incidentsretrospectiveentity.ts @@ -0,0 +1,128 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IncidentsRetrospectiveEntitySectionEntity, + IncidentsRetrospectiveEntitySectionEntity$inboundSchema, + IncidentsRetrospectiveEntitySectionEntity$Outbound, + IncidentsRetrospectiveEntitySectionEntity$outboundSchema, +} from "./incidentsretrospectiveentitysectionentity.js"; +import { + IncidentsRetrospectiveFieldEntity, + IncidentsRetrospectiveFieldEntity$inboundSchema, + IncidentsRetrospectiveFieldEntity$Outbound, + IncidentsRetrospectiveFieldEntity$outboundSchema, +} from "./incidentsretrospectivefieldentity.js"; + +/** + * Incidents_RetrospectiveEntity model + */ +export type IncidentsRetrospectiveEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + sections?: + | Array + | null + | undefined; + isHidden?: boolean | null | undefined; + fields?: Array | null | undefined; + exports?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveEntity$inboundSchema: z.ZodType< + IncidentsRetrospectiveEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + sections: z.nullable( + z.array(IncidentsRetrospectiveEntitySectionEntity$inboundSchema), + ).optional(), + is_hidden: z.nullable(z.boolean()).optional(), + fields: z.nullable(z.array(IncidentsRetrospectiveFieldEntity$inboundSchema)) + .optional(), + exports: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "is_hidden": "isHidden", + }); +}); + +/** @internal */ +export type IncidentsRetrospectiveEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + sections?: + | Array + | null + | undefined; + is_hidden?: boolean | null | undefined; + fields?: Array | null | undefined; + exports?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveEntity$outboundSchema: z.ZodType< + IncidentsRetrospectiveEntity$Outbound, + z.ZodTypeDef, + IncidentsRetrospectiveEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + sections: z.nullable( + z.array(IncidentsRetrospectiveEntitySectionEntity$outboundSchema), + ).optional(), + isHidden: z.nullable(z.boolean()).optional(), + fields: z.nullable(z.array(IncidentsRetrospectiveFieldEntity$outboundSchema)) + .optional(), + exports: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + isHidden: "is_hidden", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IncidentsRetrospectiveEntity$ { + /** @deprecated use `IncidentsRetrospectiveEntity$inboundSchema` instead. */ + export const inboundSchema = IncidentsRetrospectiveEntity$inboundSchema; + /** @deprecated use `IncidentsRetrospectiveEntity$outboundSchema` instead. */ + export const outboundSchema = IncidentsRetrospectiveEntity$outboundSchema; + /** @deprecated use `IncidentsRetrospectiveEntity$Outbound` instead. */ + export type Outbound = IncidentsRetrospectiveEntity$Outbound; +} + +export function incidentsRetrospectiveEntityToJSON( + incidentsRetrospectiveEntity: IncidentsRetrospectiveEntity, +): string { + return JSON.stringify( + IncidentsRetrospectiveEntity$outboundSchema.parse( + incidentsRetrospectiveEntity, + ), + ); +} + +export function incidentsRetrospectiveEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IncidentsRetrospectiveEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IncidentsRetrospectiveEntity' from JSON`, + ); +} diff --git a/src/models/components/incidentsretrospectiveentitypaginated.ts b/src/models/components/incidentsretrospectiveentitypaginated.ts new file mode 100644 index 00000000..cc15a305 --- /dev/null +++ b/src/models/components/incidentsretrospectiveentitypaginated.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IncidentsRetrospectiveEntity, + IncidentsRetrospectiveEntity$inboundSchema, + IncidentsRetrospectiveEntity$Outbound, + IncidentsRetrospectiveEntity$outboundSchema, +} from "./incidentsretrospectiveentity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; + +/** + * Incidents_RetrospectiveEntityPaginated model + */ +export type IncidentsRetrospectiveEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveEntityPaginated$inboundSchema: z.ZodType< + IncidentsRetrospectiveEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.array(IncidentsRetrospectiveEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), +}); + +/** @internal */ +export type IncidentsRetrospectiveEntityPaginated$Outbound = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveEntityPaginated$outboundSchema: z.ZodType< + IncidentsRetrospectiveEntityPaginated$Outbound, + z.ZodTypeDef, + IncidentsRetrospectiveEntityPaginated +> = z.object({ + data: z.nullable(z.array(IncidentsRetrospectiveEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IncidentsRetrospectiveEntityPaginated$ { + /** @deprecated use `IncidentsRetrospectiveEntityPaginated$inboundSchema` instead. */ + export const inboundSchema = + IncidentsRetrospectiveEntityPaginated$inboundSchema; + /** @deprecated use `IncidentsRetrospectiveEntityPaginated$outboundSchema` instead. */ + export const outboundSchema = + IncidentsRetrospectiveEntityPaginated$outboundSchema; + /** @deprecated use `IncidentsRetrospectiveEntityPaginated$Outbound` instead. */ + export type Outbound = IncidentsRetrospectiveEntityPaginated$Outbound; +} + +export function incidentsRetrospectiveEntityPaginatedToJSON( + incidentsRetrospectiveEntityPaginated: IncidentsRetrospectiveEntityPaginated, +): string { + return JSON.stringify( + IncidentsRetrospectiveEntityPaginated$outboundSchema.parse( + incidentsRetrospectiveEntityPaginated, + ), + ); +} + +export function incidentsRetrospectiveEntityPaginatedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + IncidentsRetrospectiveEntityPaginated$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IncidentsRetrospectiveEntityPaginated' from JSON`, + ); +} diff --git a/src/models/components/incidentsretrospectiveentitysectionentity.ts b/src/models/components/incidentsretrospectiveentitysectionentity.ts new file mode 100644 index 00000000..ba136ccf --- /dev/null +++ b/src/models/components/incidentsretrospectiveentitysectionentity.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type IncidentsRetrospectiveEntitySectionEntity = { + slug?: string | null | undefined; + elements?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveEntitySectionEntity$inboundSchema: z.ZodType< + IncidentsRetrospectiveEntitySectionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.nullable(z.string()).optional(), + elements: z.nullable(z.array(z.string())).optional(), +}); + +/** @internal */ +export type IncidentsRetrospectiveEntitySectionEntity$Outbound = { + slug?: string | null | undefined; + elements?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveEntitySectionEntity$outboundSchema: + z.ZodType< + IncidentsRetrospectiveEntitySectionEntity$Outbound, + z.ZodTypeDef, + IncidentsRetrospectiveEntitySectionEntity + > = z.object({ + slug: z.nullable(z.string()).optional(), + elements: z.nullable(z.array(z.string())).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IncidentsRetrospectiveEntitySectionEntity$ { + /** @deprecated use `IncidentsRetrospectiveEntitySectionEntity$inboundSchema` instead. */ + export const inboundSchema = + IncidentsRetrospectiveEntitySectionEntity$inboundSchema; + /** @deprecated use `IncidentsRetrospectiveEntitySectionEntity$outboundSchema` instead. */ + export const outboundSchema = + IncidentsRetrospectiveEntitySectionEntity$outboundSchema; + /** @deprecated use `IncidentsRetrospectiveEntitySectionEntity$Outbound` instead. */ + export type Outbound = IncidentsRetrospectiveEntitySectionEntity$Outbound; +} + +export function incidentsRetrospectiveEntitySectionEntityToJSON( + incidentsRetrospectiveEntitySectionEntity: + IncidentsRetrospectiveEntitySectionEntity, +): string { + return JSON.stringify( + IncidentsRetrospectiveEntitySectionEntity$outboundSchema.parse( + incidentsRetrospectiveEntitySectionEntity, + ), + ); +} + +export function incidentsRetrospectiveEntitySectionEntityFromJSON( + jsonString: string, +): SafeParseResult< + IncidentsRetrospectiveEntitySectionEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IncidentsRetrospectiveEntitySectionEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IncidentsRetrospectiveEntitySectionEntity' from JSON`, + ); +} diff --git a/src/models/components/incidentsretrospectivefieldentity.ts b/src/models/components/incidentsretrospectivefieldentity.ts new file mode 100644 index 00000000..7eacbb35 --- /dev/null +++ b/src/models/components/incidentsretrospectivefieldentity.ts @@ -0,0 +1,154 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const IncidentsRetrospectiveFieldEntityType = { + Text: "text", + SingleSelect: "single_select", + MultiSelect: "multi_select", + Numeric: "numeric", + Datetime: "datetime", + DynamicInputGroup: "dynamic_input_group", + Markdown: "markdown", + MarkdownText: "markdown_text", +} as const; +export type IncidentsRetrospectiveFieldEntityType = ClosedEnum< + typeof IncidentsRetrospectiveFieldEntityType +>; + +/** + * Incidents_RetrospectiveFieldEntity model + */ +export type IncidentsRetrospectiveFieldEntity = { + id?: string | null | undefined; + label?: string | null | undefined; + type?: IncidentsRetrospectiveFieldEntityType | null | undefined; + helpText?: string | null | undefined; + permissibleValues?: Array | null | undefined; + isRequired?: boolean | null | undefined; + value?: string | null | undefined; + schema?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveFieldEntityType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + IncidentsRetrospectiveFieldEntityType, + ); + +/** @internal */ +export const IncidentsRetrospectiveFieldEntityType$outboundSchema: + z.ZodNativeEnum = + IncidentsRetrospectiveFieldEntityType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IncidentsRetrospectiveFieldEntityType$ { + /** @deprecated use `IncidentsRetrospectiveFieldEntityType$inboundSchema` instead. */ + export const inboundSchema = + IncidentsRetrospectiveFieldEntityType$inboundSchema; + /** @deprecated use `IncidentsRetrospectiveFieldEntityType$outboundSchema` instead. */ + export const outboundSchema = + IncidentsRetrospectiveFieldEntityType$outboundSchema; +} + +/** @internal */ +export const IncidentsRetrospectiveFieldEntity$inboundSchema: z.ZodType< + IncidentsRetrospectiveFieldEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(IncidentsRetrospectiveFieldEntityType$inboundSchema) + .optional(), + help_text: z.nullable(z.string()).optional(), + permissible_values: z.nullable(z.array(z.string())).optional(), + is_required: z.nullable(z.boolean()).optional(), + value: z.nullable(z.string()).optional(), + schema: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "help_text": "helpText", + "permissible_values": "permissibleValues", + "is_required": "isRequired", + }); +}); + +/** @internal */ +export type IncidentsRetrospectiveFieldEntity$Outbound = { + id?: string | null | undefined; + label?: string | null | undefined; + type?: string | null | undefined; + help_text?: string | null | undefined; + permissible_values?: Array | null | undefined; + is_required?: boolean | null | undefined; + value?: string | null | undefined; + schema?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsRetrospectiveFieldEntity$outboundSchema: z.ZodType< + IncidentsRetrospectiveFieldEntity$Outbound, + z.ZodTypeDef, + IncidentsRetrospectiveFieldEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(IncidentsRetrospectiveFieldEntityType$outboundSchema) + .optional(), + helpText: z.nullable(z.string()).optional(), + permissibleValues: z.nullable(z.array(z.string())).optional(), + isRequired: z.nullable(z.boolean()).optional(), + value: z.nullable(z.string()).optional(), + schema: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + helpText: "help_text", + permissibleValues: "permissible_values", + isRequired: "is_required", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IncidentsRetrospectiveFieldEntity$ { + /** @deprecated use `IncidentsRetrospectiveFieldEntity$inboundSchema` instead. */ + export const inboundSchema = IncidentsRetrospectiveFieldEntity$inboundSchema; + /** @deprecated use `IncidentsRetrospectiveFieldEntity$outboundSchema` instead. */ + export const outboundSchema = + IncidentsRetrospectiveFieldEntity$outboundSchema; + /** @deprecated use `IncidentsRetrospectiveFieldEntity$Outbound` instead. */ + export type Outbound = IncidentsRetrospectiveFieldEntity$Outbound; +} + +export function incidentsRetrospectiveFieldEntityToJSON( + incidentsRetrospectiveFieldEntity: IncidentsRetrospectiveFieldEntity, +): string { + return JSON.stringify( + IncidentsRetrospectiveFieldEntity$outboundSchema.parse( + incidentsRetrospectiveFieldEntity, + ), + ); +} + +export function incidentsRetrospectiveFieldEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IncidentsRetrospectiveFieldEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IncidentsRetrospectiveFieldEntity' from JSON`, + ); +} diff --git a/src/models/components/incidentsroleassignmententity.ts b/src/models/components/incidentsroleassignmententity.ts index e4b6e510..5cfbd6ac 100644 --- a/src/models/components/incidentsroleassignmententity.ts +++ b/src/models/components/incidentsroleassignmententity.ts @@ -9,59 +9,59 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IncidentRoleEntity, - IncidentRoleEntity$inboundSchema, - IncidentRoleEntity$Outbound, - IncidentRoleEntity$outboundSchema, -} from "./incidentroleentity.js"; + NullableIncidentRoleEntity, + NullableIncidentRoleEntity$inboundSchema, + NullableIncidentRoleEntity$Outbound, + NullableIncidentRoleEntity$outboundSchema, +} from "./nullableincidentroleentity.js"; import { - UserEntity, - UserEntity$inboundSchema, - UserEntity$Outbound, - UserEntity$outboundSchema, -} from "./userentity.js"; + NullableUserEntity, + NullableUserEntity$inboundSchema, + NullableUserEntity$Outbound, + NullableUserEntity$outboundSchema, +} from "./nullableuserentity.js"; -export const Status = { +export const IncidentsRoleAssignmentEntityStatus = { Active: "active", Inactive: "inactive", } as const; -export type Status = ClosedEnum; +export type IncidentsRoleAssignmentEntityStatus = ClosedEnum< + typeof IncidentsRoleAssignmentEntityStatus +>; /** * Incidents_RoleAssignmentEntity model */ export type IncidentsRoleAssignmentEntity = { - id?: string | undefined; - status?: Status | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - /** - * IncidentRoleEntity model - */ - incidentRole?: IncidentRoleEntity | undefined; - /** - * UserEntity model - */ - user?: UserEntity | undefined; + id?: string | null | undefined; + status?: IncidentsRoleAssignmentEntityStatus | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + incidentRole?: NullableIncidentRoleEntity | null | undefined; + user?: NullableUserEntity | null | undefined; }; /** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Status); +export const IncidentsRoleAssignmentEntityStatus$inboundSchema: z.ZodNativeEnum< + typeof IncidentsRoleAssignmentEntityStatus +> = z.nativeEnum(IncidentsRoleAssignmentEntityStatus); /** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = - Status$inboundSchema; +export const IncidentsRoleAssignmentEntityStatus$outboundSchema: + z.ZodNativeEnum = + IncidentsRoleAssignmentEntityStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; +export namespace IncidentsRoleAssignmentEntityStatus$ { + /** @deprecated use `IncidentsRoleAssignmentEntityStatus$inboundSchema` instead. */ + export const inboundSchema = + IncidentsRoleAssignmentEntityStatus$inboundSchema; + /** @deprecated use `IncidentsRoleAssignmentEntityStatus$outboundSchema` instead. */ + export const outboundSchema = + IncidentsRoleAssignmentEntityStatus$outboundSchema; } /** @internal */ @@ -70,14 +70,18 @@ export const IncidentsRoleAssignmentEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - status: Status$inboundSchema.optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + status: z.nullable(IncidentsRoleAssignmentEntityStatus$inboundSchema) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + incident_role: z.nullable(NullableIncidentRoleEntity$inboundSchema) .optional(), - incident_role: IncidentRoleEntity$inboundSchema.optional(), - user: UserEntity$inboundSchema.optional(), + user: z.nullable(NullableUserEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -88,12 +92,12 @@ export const IncidentsRoleAssignmentEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentsRoleAssignmentEntity$Outbound = { - id?: string | undefined; - status?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - incident_role?: IncidentRoleEntity$Outbound | undefined; - user?: UserEntity$Outbound | undefined; + id?: string | null | undefined; + status?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + incident_role?: NullableIncidentRoleEntity$Outbound | null | undefined; + user?: NullableUserEntity$Outbound | null | undefined; }; /** @internal */ @@ -102,12 +106,14 @@ export const IncidentsRoleAssignmentEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsRoleAssignmentEntity > = z.object({ - id: z.string().optional(), - status: Status$outboundSchema.optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - incidentRole: IncidentRoleEntity$outboundSchema.optional(), - user: UserEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + status: z.nullable(IncidentsRoleAssignmentEntityStatus$outboundSchema) + .optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + incidentRole: z.nullable(NullableIncidentRoleEntity$outboundSchema) + .optional(), + user: z.nullable(NullableUserEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/incidentsroleassignmententitypaginated.ts b/src/models/components/incidentsroleassignmententitypaginated.ts index 8fce7e24..f95b5533 100644 --- a/src/models/components/incidentsroleassignmententitypaginated.ts +++ b/src/models/components/incidentsroleassignmententitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentsRoleAssignmentEntity$outboundSchema, } from "./incidentsroleassignmententity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Incidents_RoleAssignmentEntityPaginated model */ export type IncidentsRoleAssignmentEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,15 @@ export const IncidentsRoleAssignmentEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentsRoleAssignmentEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentsRoleAssignmentEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentsRoleAssignmentEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +50,9 @@ export const IncidentsRoleAssignmentEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsRoleAssignmentEntityPaginated > = z.object({ - data: z.array(IncidentsRoleAssignmentEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentsRoleAssignmentEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentsshareretrospectivesresultentity.ts b/src/models/components/incidentsshareretrospectivesresultentity.ts new file mode 100644 index 00000000..24b524da --- /dev/null +++ b/src/models/components/incidentsshareretrospectivesresultentity.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Incidents_ShareRetrospectivesResultEntity model + */ +export type IncidentsShareRetrospectivesResultEntity = { + /** + * The IDs of the retrospectives that were shared. + */ + retrospectiveIds?: Array | null | undefined; + /** + * The IDs of the users with whom the retrospectives were shared. + */ + userIds?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsShareRetrospectivesResultEntity$inboundSchema: z.ZodType< + IncidentsShareRetrospectivesResultEntity, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_ids: z.nullable(z.array(z.string())).optional(), + user_ids: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "retrospective_ids": "retrospectiveIds", + "user_ids": "userIds", + }); +}); + +/** @internal */ +export type IncidentsShareRetrospectivesResultEntity$Outbound = { + retrospective_ids?: Array | null | undefined; + user_ids?: Array | null | undefined; +}; + +/** @internal */ +export const IncidentsShareRetrospectivesResultEntity$outboundSchema: z.ZodType< + IncidentsShareRetrospectivesResultEntity$Outbound, + z.ZodTypeDef, + IncidentsShareRetrospectivesResultEntity +> = z.object({ + retrospectiveIds: z.nullable(z.array(z.string())).optional(), + userIds: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + retrospectiveIds: "retrospective_ids", + userIds: "user_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IncidentsShareRetrospectivesResultEntity$ { + /** @deprecated use `IncidentsShareRetrospectivesResultEntity$inboundSchema` instead. */ + export const inboundSchema = + IncidentsShareRetrospectivesResultEntity$inboundSchema; + /** @deprecated use `IncidentsShareRetrospectivesResultEntity$outboundSchema` instead. */ + export const outboundSchema = + IncidentsShareRetrospectivesResultEntity$outboundSchema; + /** @deprecated use `IncidentsShareRetrospectivesResultEntity$Outbound` instead. */ + export type Outbound = IncidentsShareRetrospectivesResultEntity$Outbound; +} + +export function incidentsShareRetrospectivesResultEntityToJSON( + incidentsShareRetrospectivesResultEntity: + IncidentsShareRetrospectivesResultEntity, +): string { + return JSON.stringify( + IncidentsShareRetrospectivesResultEntity$outboundSchema.parse( + incidentsShareRetrospectivesResultEntity, + ), + ); +} + +export function incidentsShareRetrospectivesResultEntityFromJSON( + jsonString: string, +): SafeParseResult< + IncidentsShareRetrospectivesResultEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IncidentsShareRetrospectivesResultEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IncidentsShareRetrospectivesResultEntity' from JSON`, + ); +} diff --git a/src/models/components/incidentsstatuspageentity.ts b/src/models/components/incidentsstatuspageentity.ts index 914d8d25..2a38c509 100644 --- a/src/models/components/incidentsstatuspageentity.ts +++ b/src/models/components/incidentsstatuspageentity.ts @@ -8,22 +8,22 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IntegrationEntity, - IntegrationEntity$inboundSchema, - IntegrationEntity$Outbound, - IntegrationEntity$outboundSchema, -} from "./integrationentity.js"; + NullableIntegrationEntity, + NullableIntegrationEntity$inboundSchema, + NullableIntegrationEntity$Outbound, + NullableIntegrationEntity$outboundSchema, +} from "./nullableintegrationentity.js"; /** * Incidents_StatusPageEntity model */ export type IncidentsStatusPageEntity = { - id?: string | undefined; - url?: string | undefined; - externalId?: string | undefined; - name?: string | undefined; - displayName?: string | undefined; - integration?: IntegrationEntity | undefined; + id?: string | null | undefined; + url?: string | null | undefined; + externalId?: string | null | undefined; + name?: string | null | undefined; + displayName?: string | null | undefined; + integration?: NullableIntegrationEntity | null | undefined; }; /** @internal */ @@ -32,12 +32,12 @@ export const IncidentsStatusPageEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - url: z.string().optional(), - external_id: z.string().optional(), - name: z.string().optional(), - display_name: z.string().optional(), - integration: IntegrationEntity$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + display_name: z.nullable(z.string()).optional(), + integration: z.nullable(NullableIntegrationEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "external_id": "externalId", @@ -47,12 +47,12 @@ export const IncidentsStatusPageEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentsStatusPageEntity$Outbound = { - id?: string | undefined; - url?: string | undefined; - external_id?: string | undefined; - name?: string | undefined; - display_name?: string | undefined; - integration?: IntegrationEntity$Outbound | undefined; + id?: string | null | undefined; + url?: string | null | undefined; + external_id?: string | null | undefined; + name?: string | null | undefined; + display_name?: string | null | undefined; + integration?: NullableIntegrationEntity$Outbound | null | undefined; }; /** @internal */ @@ -61,12 +61,12 @@ export const IncidentsStatusPageEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsStatusPageEntity > = z.object({ - id: z.string().optional(), - url: z.string().optional(), - externalId: z.string().optional(), - name: z.string().optional(), - displayName: z.string().optional(), - integration: IntegrationEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + displayName: z.nullable(z.string()).optional(), + integration: z.nullable(NullableIntegrationEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { externalId: "external_id", diff --git a/src/models/components/incidentsstatuspageentitypaginated.ts b/src/models/components/incidentsstatuspageentitypaginated.ts index e31093e0..3c9d9305 100644 --- a/src/models/components/incidentsstatuspageentitypaginated.ts +++ b/src/models/components/incidentsstatuspageentitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentsStatusPageEntity$outboundSchema, } from "./incidentsstatuspageentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Incidents_StatusPageEntityPaginated model */ export type IncidentsStatusPageEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentsStatusPageEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentsStatusPageEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentsStatusPageEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentsStatusPageEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,9 @@ export const IncidentsStatusPageEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsStatusPageEntityPaginated > = z.object({ - data: z.array(IncidentsStatusPageEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentsStatusPageEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidentsteamassignmententitylite.ts b/src/models/components/incidentsteamassignmententitylite.ts index 67158787..5cf23a28 100644 --- a/src/models/components/incidentsteamassignmententitylite.ts +++ b/src/models/components/incidentsteamassignmententitylite.ts @@ -8,18 +8,18 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - TeamEntityLite, - TeamEntityLite$inboundSchema, - TeamEntityLite$Outbound, - TeamEntityLite$outboundSchema, -} from "./teamentitylite.js"; + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; export type IncidentsTeamAssignmentEntityLite = { - id?: string | undefined; - status?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - team?: TeamEntityLite | undefined; + id?: string | null | undefined; + status?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + team?: NullableTeamEntityLite | null | undefined; }; /** @internal */ @@ -28,13 +28,15 @@ export const IncidentsTeamAssignmentEntityLite$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - status: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - team: TeamEntityLite$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + team: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -44,11 +46,11 @@ export const IncidentsTeamAssignmentEntityLite$inboundSchema: z.ZodType< /** @internal */ export type IncidentsTeamAssignmentEntityLite$Outbound = { - id?: string | undefined; - status?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - team?: TeamEntityLite$Outbound | undefined; + id?: string | null | undefined; + status?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + team?: NullableTeamEntityLite$Outbound | null | undefined; }; /** @internal */ @@ -57,11 +59,11 @@ export const IncidentsTeamAssignmentEntityLite$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentsTeamAssignmentEntityLite > = z.object({ - id: z.string().optional(), - status: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - team: TeamEntityLite$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + team: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/incidenttypeentity.ts b/src/models/components/incidenttypeentity.ts index 3954f587..138e3b06 100644 --- a/src/models/components/incidenttypeentity.ts +++ b/src/models/components/incidenttypeentity.ts @@ -8,28 +8,31 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IncidentTypeEntityTemplateEntity, - IncidentTypeEntityTemplateEntity$inboundSchema, - IncidentTypeEntityTemplateEntity$Outbound, - IncidentTypeEntityTemplateEntity$outboundSchema, -} from "./incidenttypeentitytemplateentity.js"; + NullableIncidentTypeEntityTemplateEntity, + NullableIncidentTypeEntityTemplateEntity$inboundSchema, + NullableIncidentTypeEntityTemplateEntity$Outbound, + NullableIncidentTypeEntityTemplateEntity$outboundSchema, +} from "./nullableincidenttypeentitytemplateentity.js"; import { - IncidentTypeEntityTemplateValuesEntity, - IncidentTypeEntityTemplateValuesEntity$inboundSchema, - IncidentTypeEntityTemplateValuesEntity$Outbound, - IncidentTypeEntityTemplateValuesEntity$outboundSchema, -} from "./incidenttypeentitytemplatevaluesentity.js"; + NullableIncidentTypeEntityTemplateValuesEntity, + NullableIncidentTypeEntityTemplateValuesEntity$inboundSchema, + NullableIncidentTypeEntityTemplateValuesEntity$Outbound, + NullableIncidentTypeEntityTemplateValuesEntity$outboundSchema, +} from "./nullableincidenttypeentitytemplatevaluesentity.js"; /** * IncidentTypeEntity model */ export type IncidentTypeEntity = { - id?: string | undefined; - name?: string | undefined; - template?: IncidentTypeEntityTemplateEntity | undefined; - templateValues?: IncidentTypeEntityTemplateValuesEntity | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + template?: NullableIncidentTypeEntityTemplateEntity | null | undefined; + templateValues?: + | NullableIncidentTypeEntityTemplateValuesEntity + | null + | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; }; /** @internal */ @@ -38,15 +41,19 @@ export const IncidentTypeEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - template: IncidentTypeEntityTemplateEntity$inboundSchema.optional(), - template_values: IncidentTypeEntityTemplateValuesEntity$inboundSchema - .optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + template: z.nullable(NullableIncidentTypeEntityTemplateEntity$inboundSchema) .optional(), + template_values: z.nullable( + NullableIncidentTypeEntityTemplateValuesEntity$inboundSchema, + ).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "template_values": "templateValues", @@ -57,12 +64,18 @@ export const IncidentTypeEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentTypeEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - template?: IncidentTypeEntityTemplateEntity$Outbound | undefined; - template_values?: IncidentTypeEntityTemplateValuesEntity$Outbound | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + template?: + | NullableIncidentTypeEntityTemplateEntity$Outbound + | null + | undefined; + template_values?: + | NullableIncidentTypeEntityTemplateValuesEntity$Outbound + | null + | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; }; /** @internal */ @@ -71,13 +84,15 @@ export const IncidentTypeEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentTypeEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - template: IncidentTypeEntityTemplateEntity$outboundSchema.optional(), - templateValues: IncidentTypeEntityTemplateValuesEntity$outboundSchema + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + template: z.nullable(NullableIncidentTypeEntityTemplateEntity$outboundSchema) .optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + templateValues: z.nullable( + NullableIncidentTypeEntityTemplateValuesEntity$outboundSchema, + ).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { templateValues: "template_values", diff --git a/src/models/components/incidenttypeentitypaginated.ts b/src/models/components/incidenttypeentitypaginated.ts index 7ceefaf9..0a09b039 100644 --- a/src/models/components/incidenttypeentitypaginated.ts +++ b/src/models/components/incidenttypeentitypaginated.ts @@ -13,18 +13,18 @@ import { IncidentTypeEntity$outboundSchema, } from "./incidenttypeentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * IncidentTypeEntityPaginated model */ export type IncidentTypeEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const IncidentTypeEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IncidentTypeEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IncidentTypeEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IncidentTypeEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const IncidentTypeEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentTypeEntityPaginated > = z.object({ - data: z.array(IncidentTypeEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IncidentTypeEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/incidenttypeentitytemplateentity.ts b/src/models/components/incidenttypeentitytemplateentity.ts deleted file mode 100644 index 9bbc2b4a..00000000 --- a/src/models/components/incidenttypeentitytemplateentity.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - IncidentTypeEntityTemplateImpactEntity, - IncidentTypeEntityTemplateImpactEntity$inboundSchema, - IncidentTypeEntityTemplateImpactEntity$Outbound, - IncidentTypeEntityTemplateImpactEntity$outboundSchema, -} from "./incidenttypeentitytemplateimpactentity.js"; - -/** - * Arbitrary key:value pairs of labels for your incidents. - */ -export type IncidentTypeEntityTemplateEntityLabels = {}; - -export type IncidentTypeEntityTemplateEntity = { - incidentName?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - customerImpactSummary?: string | undefined; - /** - * Arbitrary key:value pairs of labels for your incidents. - */ - labels?: IncidentTypeEntityTemplateEntityLabels | undefined; - severity?: string | undefined; - priority?: string | undefined; - tagList?: Array | undefined; - runbookIds?: Array | undefined; - teamIds?: Array | undefined; - privateIncident?: boolean | undefined; - customFields?: string | undefined; - impacts?: Array | undefined; -}; - -/** @internal */ -export const IncidentTypeEntityTemplateEntityLabels$inboundSchema: z.ZodType< - IncidentTypeEntityTemplateEntityLabels, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type IncidentTypeEntityTemplateEntityLabels$Outbound = {}; - -/** @internal */ -export const IncidentTypeEntityTemplateEntityLabels$outboundSchema: z.ZodType< - IncidentTypeEntityTemplateEntityLabels$Outbound, - z.ZodTypeDef, - IncidentTypeEntityTemplateEntityLabels -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IncidentTypeEntityTemplateEntityLabels$ { - /** @deprecated use `IncidentTypeEntityTemplateEntityLabels$inboundSchema` instead. */ - export const inboundSchema = - IncidentTypeEntityTemplateEntityLabels$inboundSchema; - /** @deprecated use `IncidentTypeEntityTemplateEntityLabels$outboundSchema` instead. */ - export const outboundSchema = - IncidentTypeEntityTemplateEntityLabels$outboundSchema; - /** @deprecated use `IncidentTypeEntityTemplateEntityLabels$Outbound` instead. */ - export type Outbound = IncidentTypeEntityTemplateEntityLabels$Outbound; -} - -export function incidentTypeEntityTemplateEntityLabelsToJSON( - incidentTypeEntityTemplateEntityLabels: - IncidentTypeEntityTemplateEntityLabels, -): string { - return JSON.stringify( - IncidentTypeEntityTemplateEntityLabels$outboundSchema.parse( - incidentTypeEntityTemplateEntityLabels, - ), - ); -} - -export function incidentTypeEntityTemplateEntityLabelsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - IncidentTypeEntityTemplateEntityLabels$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IncidentTypeEntityTemplateEntityLabels' from JSON`, - ); -} - -/** @internal */ -export const IncidentTypeEntityTemplateEntity$inboundSchema: z.ZodType< - IncidentTypeEntityTemplateEntity, - z.ZodTypeDef, - unknown -> = z.object({ - incident_name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - customer_impact_summary: z.string().optional(), - labels: z.lazy(() => IncidentTypeEntityTemplateEntityLabels$inboundSchema) - .optional(), - severity: z.string().optional(), - priority: z.string().optional(), - tag_list: z.array(z.string()).optional(), - runbook_ids: z.array(z.string()).optional(), - team_ids: z.array(z.string()).optional(), - private_incident: z.boolean().optional(), - custom_fields: z.string().optional(), - impacts: z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "incident_name": "incidentName", - "customer_impact_summary": "customerImpactSummary", - "tag_list": "tagList", - "runbook_ids": "runbookIds", - "team_ids": "teamIds", - "private_incident": "privateIncident", - "custom_fields": "customFields", - }); -}); - -/** @internal */ -export type IncidentTypeEntityTemplateEntity$Outbound = { - incident_name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - customer_impact_summary?: string | undefined; - labels?: IncidentTypeEntityTemplateEntityLabels$Outbound | undefined; - severity?: string | undefined; - priority?: string | undefined; - tag_list?: Array | undefined; - runbook_ids?: Array | undefined; - team_ids?: Array | undefined; - private_incident?: boolean | undefined; - custom_fields?: string | undefined; - impacts?: Array | undefined; -}; - -/** @internal */ -export const IncidentTypeEntityTemplateEntity$outboundSchema: z.ZodType< - IncidentTypeEntityTemplateEntity$Outbound, - z.ZodTypeDef, - IncidentTypeEntityTemplateEntity -> = z.object({ - incidentName: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - customerImpactSummary: z.string().optional(), - labels: z.lazy(() => IncidentTypeEntityTemplateEntityLabels$outboundSchema) - .optional(), - severity: z.string().optional(), - priority: z.string().optional(), - tagList: z.array(z.string()).optional(), - runbookIds: z.array(z.string()).optional(), - teamIds: z.array(z.string()).optional(), - privateIncident: z.boolean().optional(), - customFields: z.string().optional(), - impacts: z.array(IncidentTypeEntityTemplateImpactEntity$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - incidentName: "incident_name", - customerImpactSummary: "customer_impact_summary", - tagList: "tag_list", - runbookIds: "runbook_ids", - teamIds: "team_ids", - privateIncident: "private_incident", - customFields: "custom_fields", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IncidentTypeEntityTemplateEntity$ { - /** @deprecated use `IncidentTypeEntityTemplateEntity$inboundSchema` instead. */ - export const inboundSchema = IncidentTypeEntityTemplateEntity$inboundSchema; - /** @deprecated use `IncidentTypeEntityTemplateEntity$outboundSchema` instead. */ - export const outboundSchema = IncidentTypeEntityTemplateEntity$outboundSchema; - /** @deprecated use `IncidentTypeEntityTemplateEntity$Outbound` instead. */ - export type Outbound = IncidentTypeEntityTemplateEntity$Outbound; -} - -export function incidentTypeEntityTemplateEntityToJSON( - incidentTypeEntityTemplateEntity: IncidentTypeEntityTemplateEntity, -): string { - return JSON.stringify( - IncidentTypeEntityTemplateEntity$outboundSchema.parse( - incidentTypeEntityTemplateEntity, - ), - ); -} - -export function incidentTypeEntityTemplateEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => IncidentTypeEntityTemplateEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IncidentTypeEntityTemplateEntity' from JSON`, - ); -} diff --git a/src/models/components/incidenttypeentitytemplateimpactentity.ts b/src/models/components/incidenttypeentitytemplateimpactentity.ts index 0ee43618..7721fa6b 100644 --- a/src/models/components/incidenttypeentitytemplateimpactentity.ts +++ b/src/models/components/incidenttypeentitytemplateimpactentity.ts @@ -9,39 +9,45 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const Type = { +export const IncidentTypeEntityTemplateImpactEntityType = { + Customer: "customer", Environment: "environment", Functionality: "functionality", Service: "service", } as const; -export type Type = ClosedEnum; +export type IncidentTypeEntityTemplateImpactEntityType = ClosedEnum< + typeof IncidentTypeEntityTemplateImpactEntityType +>; export type IncidentTypeEntityTemplateImpactEntity = { - id?: string | undefined; - name?: string | undefined; - conditionId?: string | undefined; - conditionName?: string | undefined; - type?: Type | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + conditionId?: string | null | undefined; + conditionName?: string | null | undefined; + type?: IncidentTypeEntityTemplateImpactEntityType | null | undefined; }; /** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Type, -); +export const IncidentTypeEntityTemplateImpactEntityType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(IncidentTypeEntityTemplateImpactEntityType); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = - Type$inboundSchema; +export const IncidentTypeEntityTemplateImpactEntityType$outboundSchema: + z.ZodNativeEnum = + IncidentTypeEntityTemplateImpactEntityType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; +export namespace IncidentTypeEntityTemplateImpactEntityType$ { + /** @deprecated use `IncidentTypeEntityTemplateImpactEntityType$inboundSchema` instead. */ + export const inboundSchema = + IncidentTypeEntityTemplateImpactEntityType$inboundSchema; + /** @deprecated use `IncidentTypeEntityTemplateImpactEntityType$outboundSchema` instead. */ + export const outboundSchema = + IncidentTypeEntityTemplateImpactEntityType$outboundSchema; } /** @internal */ @@ -50,11 +56,12 @@ export const IncidentTypeEntityTemplateImpactEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - condition_id: z.string().optional(), - condition_name: z.string().optional(), - type: Type$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + condition_id: z.nullable(z.string()).optional(), + condition_name: z.nullable(z.string()).optional(), + type: z.nullable(IncidentTypeEntityTemplateImpactEntityType$inboundSchema) + .optional(), }).transform((v) => { return remap$(v, { "condition_id": "conditionId", @@ -64,11 +71,11 @@ export const IncidentTypeEntityTemplateImpactEntity$inboundSchema: z.ZodType< /** @internal */ export type IncidentTypeEntityTemplateImpactEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - condition_id?: string | undefined; - condition_name?: string | undefined; - type?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + condition_id?: string | null | undefined; + condition_name?: string | null | undefined; + type?: string | null | undefined; }; /** @internal */ @@ -77,11 +84,12 @@ export const IncidentTypeEntityTemplateImpactEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IncidentTypeEntityTemplateImpactEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - conditionId: z.string().optional(), - conditionName: z.string().optional(), - type: Type$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + conditionId: z.nullable(z.string()).optional(), + conditionName: z.nullable(z.string()).optional(), + type: z.nullable(IncidentTypeEntityTemplateImpactEntityType$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { conditionId: "condition_id", diff --git a/src/models/components/incidenttypeentitytemplatevaluesentity.ts b/src/models/components/incidenttypeentitytemplatevaluesentity.ts deleted file mode 100644 index f8d6d0d9..00000000 --- a/src/models/components/incidenttypeentitytemplatevaluesentity.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - IncidentTypeEntityTemplateImpactEntity, - IncidentTypeEntityTemplateImpactEntity$inboundSchema, - IncidentTypeEntityTemplateImpactEntity$Outbound, - IncidentTypeEntityTemplateImpactEntity$outboundSchema, -} from "./incidenttypeentitytemplateimpactentity.js"; -import { - TeamEntity, - TeamEntity$inboundSchema, - TeamEntity$Outbound, - TeamEntity$outboundSchema, -} from "./teamentity.js"; - -/** - * A hash mapping runbook IDs to runbook names. - */ -export type Runbooks = {}; - -export type IncidentTypeEntityTemplateValuesEntity = { - services?: Array | undefined; - functionalities?: Array | undefined; - environments?: Array | undefined; - /** - * A hash mapping runbook IDs to runbook names. - */ - runbooks?: Runbooks | undefined; - teams?: Array | undefined; -}; - -/** @internal */ -export const Runbooks$inboundSchema: z.ZodType< - Runbooks, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type Runbooks$Outbound = {}; - -/** @internal */ -export const Runbooks$outboundSchema: z.ZodType< - Runbooks$Outbound, - z.ZodTypeDef, - Runbooks -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Runbooks$ { - /** @deprecated use `Runbooks$inboundSchema` instead. */ - export const inboundSchema = Runbooks$inboundSchema; - /** @deprecated use `Runbooks$outboundSchema` instead. */ - export const outboundSchema = Runbooks$outboundSchema; - /** @deprecated use `Runbooks$Outbound` instead. */ - export type Outbound = Runbooks$Outbound; -} - -export function runbooksToJSON(runbooks: Runbooks): string { - return JSON.stringify(Runbooks$outboundSchema.parse(runbooks)); -} - -export function runbooksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Runbooks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Runbooks' from JSON`, - ); -} - -/** @internal */ -export const IncidentTypeEntityTemplateValuesEntity$inboundSchema: z.ZodType< - IncidentTypeEntityTemplateValuesEntity, - z.ZodTypeDef, - unknown -> = z.object({ - services: z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema) - .optional(), - functionalities: z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema) - .optional(), - environments: z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema) - .optional(), - runbooks: z.lazy(() => Runbooks$inboundSchema).optional(), - teams: z.array(TeamEntity$inboundSchema).optional(), -}); - -/** @internal */ -export type IncidentTypeEntityTemplateValuesEntity$Outbound = { - services?: Array | undefined; - functionalities?: - | Array - | undefined; - environments?: - | Array - | undefined; - runbooks?: Runbooks$Outbound | undefined; - teams?: Array | undefined; -}; - -/** @internal */ -export const IncidentTypeEntityTemplateValuesEntity$outboundSchema: z.ZodType< - IncidentTypeEntityTemplateValuesEntity$Outbound, - z.ZodTypeDef, - IncidentTypeEntityTemplateValuesEntity -> = z.object({ - services: z.array(IncidentTypeEntityTemplateImpactEntity$outboundSchema) - .optional(), - functionalities: z.array( - IncidentTypeEntityTemplateImpactEntity$outboundSchema, - ).optional(), - environments: z.array(IncidentTypeEntityTemplateImpactEntity$outboundSchema) - .optional(), - runbooks: z.lazy(() => Runbooks$outboundSchema).optional(), - teams: z.array(TeamEntity$outboundSchema).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IncidentTypeEntityTemplateValuesEntity$ { - /** @deprecated use `IncidentTypeEntityTemplateValuesEntity$inboundSchema` instead. */ - export const inboundSchema = - IncidentTypeEntityTemplateValuesEntity$inboundSchema; - /** @deprecated use `IncidentTypeEntityTemplateValuesEntity$outboundSchema` instead. */ - export const outboundSchema = - IncidentTypeEntityTemplateValuesEntity$outboundSchema; - /** @deprecated use `IncidentTypeEntityTemplateValuesEntity$Outbound` instead. */ - export type Outbound = IncidentTypeEntityTemplateValuesEntity$Outbound; -} - -export function incidentTypeEntityTemplateValuesEntityToJSON( - incidentTypeEntityTemplateValuesEntity: - IncidentTypeEntityTemplateValuesEntity, -): string { - return JSON.stringify( - IncidentTypeEntityTemplateValuesEntity$outboundSchema.parse( - incidentTypeEntityTemplateValuesEntity, - ), - ); -} - -export function incidentTypeEntityTemplateValuesEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - IncidentTypeEntityTemplateValuesEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IncidentTypeEntityTemplateValuesEntity' from JSON`, - ); -} diff --git a/src/models/components/index.ts b/src/models/components/index.ts index eb3d0435..1ea05a1a 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -2,33 +2,90 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./actorentity.js"; +export * from "./aientitiesincidentsummaryentity.js"; export * from "./aientitiespreferencesentity.js"; export * from "./alertsalertentity.js"; export * from "./alertsalertentitypaginated.js"; export * from "./alertsprocessinglogentryentity.js"; export * from "./alertsprocessinglogentryentitypaginated.js"; +export * from "./alertssirenalertentity.js"; export * from "./alertssirenevententity.js"; export * from "./attachmentslinkentity.js"; export * from "./attachmentslinkentitypaginated.js"; +export * from "./attachmentstypedattachmententity.js"; +export * from "./attachmentstypedattachmententitypaginated.js"; +export * from "./audiencesentitiesaudienceentity.js"; +export * from "./audiencesentitiesaudiencesummariesentity.js"; +export * from "./audiencesentitiesdetailentity.js"; export * from "./authorentity.js"; -export * from "./calendarsevententity.js"; +export * from "./bulkupdateincidentmilestones.js"; export * from "./changeentity.js"; export * from "./changeevententity.js"; export * from "./changeeventslimentity.js"; export * from "./changeeventslimentitypaginated.js"; export * from "./changeidentityentity.js"; export * from "./changeidentityentitypaginated.js"; -export * from "./changesevents.js"; export * from "./changetypeentity.js"; export * from "./changetypeentitypaginated.js"; export * from "./checklistcheckentity.js"; export * from "./checklisttemplateentity.js"; export * from "./checklisttemplateentitypaginated.js"; -export * from "./conversationsapientitieschannel.js"; export * from "./conversationsapientitiesreference.js"; +export * from "./convertincidenttask.js"; +export * from "./createchange.js"; +export * from "./createchangeevent.js"; +export * from "./createchangeidentity.js"; +export * from "./createchecklisttemplate.js"; +export * from "./createcomment.js"; +export * from "./createcommentreaction.js"; +export * from "./createcustomfielddefinition.js"; +export * from "./createenvironment.js"; +export * from "./createfunctionality.js"; +export * from "./createincident.js"; +export * from "./createincidentchangeevent.js"; +export * from "./createincidentchatmessage.js"; +export * from "./createincidentimpact.js"; +export * from "./createincidentlink.js"; +export * from "./createincidentnote.js"; +export * from "./createincidentrole.js"; +export * from "./createincidentroleassignment.js"; +export * from "./createincidentstatuspage.js"; +export * from "./createincidenttask.js"; +export * from "./createincidenttasklist.js"; +export * from "./createincidentteamassignment.js"; +export * from "./createincidenttype.js"; +export * from "./createnuncsubscription.js"; +export * from "./createoncallshift.js"; +export * from "./createpostmortemreason.js"; +export * from "./createpostmortemreport.js"; +export * from "./createpriority.js"; +export * from "./createrunbook.js"; +export * from "./createrunbookexecution.js"; +export * from "./createsavedsearch.js"; +export * from "./createscheduledmaintenance.js"; +export * from "./createscimgroup.js"; +export * from "./createscimuser.js"; +export * from "./createservice.js"; +export * from "./createservicechecklistresponse.js"; +export * from "./createservicedependency.js"; +export * from "./createservicelinks.js"; +export * from "./createseverity.js"; +export * from "./createseveritymatrixcondition.js"; +export * from "./createseveritymatriximpact.js"; +export * from "./createsignalsemailtarget.js"; +export * from "./createsignalswebhooktarget.js"; +export * from "./createstatusupdatetemplate.js"; +export * from "./createtasklist.js"; +export * from "./createteam.js"; +export * from "./createteamescalationpolicy.js"; +export * from "./createteamoncallschedule.js"; +export * from "./createteamsignalrule.js"; +export * from "./createticket.js"; +export * from "./createticketingpriority.js"; +export * from "./createwebhook.js"; export * from "./currentuserentity.js"; export * from "./customfieldsfieldvalue.js"; +export * from "./debugsignalsexpression.js"; export * from "./entitlemententity.js"; export * from "./entitlemententitypaginated.js"; export * from "./environmententryentity.js"; @@ -36,16 +93,15 @@ export * from "./environmententryentitypaginated.js"; export * from "./eventgenericchatmessageentity.js"; export * from "./eventnoteentity.js"; export * from "./externalresourceentity.js"; -export * from "./fhtypesgenericentity.js"; export * from "./fieldmappingfieldmapentity.js"; export * from "./fieldmappingmappablefieldentity.js"; +export * from "./formconfigurationentity.js"; export * from "./functionalityentity.js"; export * from "./functionalityentitylite.js"; export * from "./functionalityentitypaginated.js"; -export * from "./importsimportableresourceentity.js"; +export * from "./functionalitywithallservicesentity.js"; export * from "./importsimportentity.js"; export * from "./importsimporterrorentity.js"; -export * from "./importsimporterrorentityresourceentity.js"; export * from "./incidentattachmententity.js"; export * from "./incidententity.js"; export * from "./incidententityfieldrequiremententity.js"; @@ -60,7 +116,7 @@ export * from "./incidentsalertentity.js"; export * from "./incidentsalertentitypaginated.js"; export * from "./incidentschannelentity.js"; export * from "./incidentsconferencebridgeentity.js"; -export * from "./incidentscontextobjectentity.js"; +export * from "./incidentsexportretrospectivesresultentity.js"; export * from "./incidentsimpactentity.js"; export * from "./incidentslifecyclemeasuremententity.js"; export * from "./incidentslifecyclemilestoneentity.js"; @@ -70,201 +126,157 @@ export * from "./incidentsmilestoneentitypaginated.js"; export * from "./incidentsrelatedchangeevententity.js"; export * from "./incidentsrelatedchangeevententitypaginated.js"; export * from "./incidentsrelationshipsentity.js"; +export * from "./incidentsretrospectiveentity.js"; +export * from "./incidentsretrospectiveentitypaginated.js"; +export * from "./incidentsretrospectiveentitysectionentity.js"; +export * from "./incidentsretrospectivefieldentity.js"; export * from "./incidentsroleassignmententity.js"; export * from "./incidentsroleassignmententitypaginated.js"; +export * from "./incidentsshareretrospectivesresultentity.js"; export * from "./incidentsstatuspageentity.js"; export * from "./incidentsstatuspageentitypaginated.js"; export * from "./incidentsteamassignmententitylite.js"; export * from "./incidenttypeentity.js"; export * from "./incidenttypeentitypaginated.js"; -export * from "./incidenttypeentitytemplateentity.js"; export * from "./incidenttypeentitytemplateimpactentity.js"; -export * from "./incidenttypeentitytemplatevaluesentity.js"; export * from "./infrastructuresearchentity.js"; -export * from "./integrationentity.js"; +export * from "./ingestcatalogdata.js"; +export * from "./integrationsauthedproviderentitypaginated.js"; export * from "./integrationsawscloudtrailbatchentity.js"; export * from "./integrationsawscloudtrailbatchentitypaginated.js"; export * from "./integrationsawsconnectionentity.js"; export * from "./integrationsawsconnectionentitypaginated.js"; export * from "./integrationsconfluencecloudspacekeyentity.js"; export * from "./integrationsconnectionentity.js"; +export * from "./integrationsconnectionentitypaginated.js"; +export * from "./integrationsconnectionstatusentity.js"; export * from "./integrationsintegrationentity.js"; -export * from "./integrationsintegrationentitylogoentity.js"; -export * from "./integrationsmicrosoftteamsv2channelentity.js"; -export * from "./integrationsslackslackchannelentity.js"; +export * from "./integrationsintegrationentitypaginated.js"; +export * from "./integrationsslackusergroupentity.js"; +export * from "./integrationsslackworkspaceentity.js"; export * from "./integrationsstatuspageconditionentity.js"; export * from "./integrationsstatuspageconnectionentity.js"; export * from "./integrationsstatuspageconnectionentitypaginated.js"; export * from "./integrationsstatuspagemilestonemappingentity.js"; +export * from "./integrationsstatuspagepageentity.js"; export * from "./integrationsstatuspageseverityentity.js"; +export * from "./integrationszendesksearchticketspaginatedentity.js"; +export * from "./integrationszendesksupportissueentity.js"; export * from "./lifecyclesmilestoneentity.js"; export * from "./lifecyclesphaseentity.js"; export * from "./lifecyclesphaseentitylist.js"; export * from "./linksentity.js"; -export * from "./mediaimageentity.js"; export * from "./membershipentity.js"; export * from "./metricsinfrastructurelistentity.js"; export * from "./metricsinfrastructuremetricsentity.js"; export * from "./metricsmetricsentity.js"; -export * from "./metricsmetricsentitysortentity.js"; export * from "./metricsretrospectiveentity.js"; export * from "./metricsretrospectiveentitydataentity.js"; -export * from "./metricsretrospectiveentitysummaryentity.js"; -export * from "./nunccomponententity.js"; -export * from "./nunccomponentgroupentity.js"; -export * from "./nuncconditionentity.js"; +export * from "./nullableactorentity.js"; +export * from "./nullablealertsalertentity.js"; +export * from "./nullableattachmentslinkentity.js"; +export * from "./nullableauthorentity.js"; +export * from "./nullablecalendarsevententity.js"; +export * from "./nullablechangeevententity.js"; +export * from "./nullableconversationsapientitieschannel.js"; +export * from "./nullableeventnoteentity.js"; +export * from "./nullableexternalresourceentity.js"; +export * from "./nullablefhtypesgenericentity.js"; +export * from "./nullableimportsimportableresourceentity.js"; +export * from "./nullableimportsimporterrorentityresourceentity.js"; +export * from "./nullableincidententity.js"; +export * from "./nullableincidentroleentity.js"; +export * from "./nullableincidentsconferencebridgeentity.js"; +export * from "./nullableincidentscontextobjectentity.js"; +export * from "./nullableincidenttypeentitytemplateentity.js"; +export * from "./nullableincidenttypeentitytemplatevaluesentity.js"; +export * from "./nullableintegrationentity.js"; +export * from "./nullableintegrationsawsconnectionentity.js"; +export * from "./nullableintegrationsconnectionentity.js"; +export * from "./nullableintegrationsintegrationentity.js"; +export * from "./nullableintegrationsintegrationentitylogoentity.js"; +export * from "./nullableintegrationsmicrosoftteamsv2channelentity.js"; +export * from "./nullableintegrationsslackslackchannelentity.js"; +export * from "./nullableintegrationszendesksupportissueentitycustomerentity.js"; +export * from "./nullablemediaimageentity.js"; +export * from "./nullablemetricsmetricsentitysortentity.js"; +export * from "./nullablemetricsretrospectiveentitysummaryentity.js"; +export * from "./nullablenunccomponententity.js"; +export * from "./nullablenunccomponentgroupentity.js"; +export * from "./nullablenuncconditionentity.js"; +export * from "./nullableorganizationentity.js"; +export * from "./nullablepaginationentity.js"; +export * from "./nullablepostmortemsquestionentity.js"; +export * from "./nullablepublicapiv1incidentssuccinctentity.js"; +export * from "./nullablerulesruleentity.js"; +export * from "./nullablerunbooksactionconfigentity.js"; +export * from "./nullablerunbooksactionsentity.js"; +export * from "./nullablerunbookselementdynamicselectentity.js"; +export * from "./nullablerunbookselementdynamicselectentityselectoptionentity.js"; +export * from "./nullablerunbookselemententity.js"; +export * from "./nullablerunbookselementinputentity.js"; +export * from "./nullablerunbookselementmarkdownentity.js"; +export * from "./nullablerunbookselementtextareaentity.js"; +export * from "./nullablerunbooksexecutionentityexecutedforentity.js"; +export * from "./nullablerunbooksexecutionstepentity.js"; +export * from "./nullablerunbooksexecutionstepexecutionentity.js"; +export * from "./nullablerunbookstepentity.js"; +export * from "./nullablerunbookswebhookdeliveryentity.js"; +export * from "./nullablescheduleentity.js"; +export * from "./nullableserviceentity.js"; +export * from "./nullableseveritymatrixconditionentity.js"; +export * from "./nullableseveritymatriximpactentity.js"; +export * from "./nullablesignalsapiruleentity.js"; +export * from "./nullablesignalsapitargetentity.js"; +export * from "./nullablesignalsapitransposerentity.js"; +export * from "./nullableslimrunbookentity.js"; +export * from "./nullablesuccinctentity.js"; +export * from "./nullabletasklistitementity.js"; +export * from "./nullableteamentitylite.js"; +export * from "./nullableticketingpriorityentity.js"; +export * from "./nullableticketingprojectconfigentity.js"; +export * from "./nullableticketingprojectfieldmapcaseselseentity.js"; +export * from "./nullableticketingprojectfieldmapentity.js"; +export * from "./nullableticketingprojectfieldmapexternalvalueentity.js"; +export * from "./nullableticketingticketentity.js"; +export * from "./nullableuserentity.js"; +export * from "./nullablevotesentity.js"; export * from "./nuncconnectionentity.js"; export * from "./nuncconnectionentitypaginated.js"; export * from "./nuncemailsubscribersentity.js"; export * from "./nuncnuncsubscription.js"; -export * from "./organizationentity.js"; export * from "./organizationscustomfielddefinitionentity.js"; -export * from "./paginationentity.js"; -export * from "./patchv1changeschangeid.js"; -export * from "./patchv1changeschangeididentitiesidentityid.js"; -export * from "./patchv1changeseventschangeeventid.js"; -export * from "./patchv1checklisttemplatesid.js"; -export * from "./patchv1conversationsconversationidcommentscommentid.js"; -export * from "./patchv1customfieldsdefinitionsfieldid.js"; -export * from "./patchv1environmentsenvironmentid.js"; -export * from "./patchv1functionalitiesfunctionalityid.js"; -export * from "./patchv1incidentrolesincidentroleid.js"; -export * from "./patchv1incidentsincidentid.js"; -export * from "./patchv1incidentsincidentidalertsincidentalertidprimary.js"; -export * from "./patchv1incidentsincidentideventseventidvotes.js"; -export * from "./patchv1incidentsincidentidgenericchatmessagesmessageid.js"; -export * from "./patchv1incidentsincidentidimpact.js"; -export * from "./patchv1incidentsincidentidnotesnoteid.js"; -export * from "./patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.js"; -export * from "./patchv1incidentsincidentidtaskstaskid.js"; -export * from "./patchv1incidenttypesid.js"; -export * from "./patchv1integrationsawscloudtrailbatchesid.js"; -export * from "./patchv1integrationsawsconnectionsid.js"; -export * from "./patchv1integrationsstatuspageconnectionsconnectionid.js"; -export * from "./patchv1nuncconnectionsnuncconnectionidlinkslinkid.js"; -export * from "./patchv1postmortemsreportsreportid.js"; -export * from "./patchv1postmortemsreportsreportidfieldsfieldid.js"; -export * from "./patchv1postmortemsreportsreportidreasonsreasonid.js"; -export * from "./patchv1prioritiespriorityslug.js"; -export * from "./patchv1runbooksexecutionsexecutionidstepsstepidvotes.js"; -export * from "./patchv1runbooksexecutionsexecutionidvotes.js"; -export * from "./patchv1savedsearchesresourcetypesavedsearchid.js"; -export * from "./patchv1scheduledmaintenancesscheduledmaintenanceid.js"; -export * from "./patchv1scimv2usersid.js"; -export * from "./patchv1servicedependenciesservicedependencyid.js"; -export * from "./patchv1servicesserviceid.js"; -export * from "./patchv1severitiesseverityslug.js"; -export * from "./patchv1severitymatrix.js"; -export * from "./patchv1severitymatrixconditionsconditionid.js"; -export * from "./patchv1severitymatriximpactsimpactid.js"; -export * from "./patchv1signalsemailtargetsid.js"; -export * from "./patchv1signalswebhooktargetsid.js"; -export * from "./patchv1statusupdatetemplatesstatusupdatetemplateid.js"; -export * from "./patchv1taskliststasklistid.js"; -export * from "./patchv1teamsteamid.js"; -export * from "./patchv1teamsteamidescalationpoliciesid.js"; -export * from "./patchv1teamsteamidoncallschedulesscheduleid.js"; -export * from "./patchv1teamsteamidoncallschedulesscheduleidshiftsid.js"; -export * from "./patchv1teamsteamidsignalrulesid.js"; -export * from "./patchv1ticketingprioritiesid.js"; -export * from "./patchv1ticketingticketsticketid.js"; -export * from "./patchv1webhookswebhookid.js"; +export * from "./patchscimuser.js"; export * from "./pongentity.js"; export * from "./postmortemspostmortemreportentity.js"; export * from "./postmortemspostmortemreportentitypaginated.js"; -export * from "./postmortemsquestionentity.js"; export * from "./postmortemsquestiontypeentity.js"; export * from "./postmortemsquestiontypeentitypaginated.js"; export * from "./postmortemsreasonentity.js"; export * from "./postmortemsreasonentitypaginated.js"; export * from "./postmortemssectionfieldentity.js"; -export * from "./postv1catalogscatalogidingest.js"; -export * from "./postv1changes.js"; -export * from "./postv1changeschangeididentities.js"; -export * from "./postv1checklisttemplates.js"; -export * from "./postv1conversationsconversationidcomments.js"; -export * from "./postv1conversationsconversationidcommentscommentidreactions.js"; -export * from "./postv1customfieldsdefinitions.js"; -export * from "./postv1environments.js"; -export * from "./postv1functionalities.js"; -export * from "./postv1incidentroles.js"; -export * from "./postv1incidents.js"; -export * from "./postv1incidentsincidentidgenericchatmessages.js"; -export * from "./postv1incidentsincidentidimpacttype.js"; -export * from "./postv1incidentsincidentidlinks.js"; -export * from "./postv1incidentsincidentidnotes.js"; -export * from "./postv1incidentsincidentidrelatedchangeevents.js"; -export * from "./postv1incidentsincidentidroleassignments.js"; -export * from "./postv1incidentsincidentidstatuspages.js"; -export * from "./postv1incidentsincidentidtasklists.js"; -export * from "./postv1incidentsincidentidtasks.js"; -export * from "./postv1incidentsincidentidtaskstaskidconvert.js"; -export * from "./postv1incidentsincidentidteamassignments.js"; -export * from "./postv1incidenttypes.js"; -export * from "./postv1nuncsubscriptions.js"; -export * from "./postv1postmortemsreports.js"; -export * from "./postv1postmortemsreportsreportidpublish.js"; -export * from "./postv1postmortemsreportsreportidreasons.js"; -export * from "./postv1priorities.js"; -export * from "./postv1runbooks.js"; -export * from "./postv1runbooksexecutions.js"; -export * from "./postv1savedsearchesresourcetype.js"; -export * from "./postv1scheduledmaintenances.js"; -export * from "./postv1scimv2groups.js"; -export * from "./postv1scimv2users.js"; -export * from "./postv1servicedependencies.js"; -export * from "./postv1services.js"; -export * from "./postv1servicesserviceidchecklistresponsechecklistid.js"; -export * from "./postv1servicesservicelinks.js"; -export * from "./postv1severities.js"; -export * from "./postv1severitymatrixconditions.js"; -export * from "./postv1severitymatriximpacts.js"; -export * from "./postv1signalsdebugger.js"; -export * from "./postv1signalsemailtargets.js"; -export * from "./postv1signalswebhooktargets.js"; -export * from "./postv1statusupdatetemplates.js"; -export * from "./postv1tasklists.js"; -export * from "./postv1teams.js"; -export * from "./postv1teamsteamidescalationpolicies.js"; -export * from "./postv1teamsteamidoncallschedules.js"; -export * from "./postv1teamsteamidoncallschedulesscheduleidshifts.js"; -export * from "./postv1teamsteamidsignalrules.js"; -export * from "./postv1ticketingpriorities.js"; -export * from "./postv1ticketingtickets.js"; -export * from "./postv1webhooks.js"; export * from "./priorityentity.js"; +export * from "./publicapiv1bootstrapentity.js"; export * from "./publicapiv1incidentssuccinctentity.js"; export * from "./publicapiv1incidentstranscriptentity.js"; -export * from "./putv1incidentsincidentidimpact.js"; -export * from "./putv1incidentsincidentidlinkslinkid.js"; -export * from "./putv1incidentsincidentidmilestonesbulkupdate.js"; -export * from "./putv1postmortemsquestions.js"; -export * from "./putv1postmortemsreportsreportidreasonsorder.js"; -export * from "./putv1runbooksexecutionsexecutionidstepsstepid.js"; -export * from "./putv1runbooksrunbookid.js"; -export * from "./putv1scimv2groupsid.js"; -export * from "./putv1scimv2usersid.js"; +export * from "./publicapiv1integrationsauthedproviderentity.js"; +export * from "./publicapiv1similarincidententity.js"; +export * from "./publishpostmortemreport.js"; +export * from "./reorderpostmortemreasons.js"; export * from "./reportentity.js"; export * from "./reportsbucketentity.js"; export * from "./reportsdatapointentity.js"; -export * from "./rulesruleentity.js"; +export * from "./retrospectivesfieldentity.js"; +export * from "./retrospectivesindextemplateentity.js"; +export * from "./retrospectivesindextemplateentitypaginated.js"; +export * from "./retrospectivestemplateentity.js"; +export * from "./retrospectivestemplateentityincidentsectionentity.js"; export * from "./runbookentity.js"; -export * from "./runbooksactionconfigentity.js"; export * from "./runbooksactionsentity.js"; export * from "./runbooksactionsentitypaginated.js"; -export * from "./runbookselementdynamicselectentity.js"; export * from "./runbookselementdynamicselectentityselectoptionentity.js"; -export * from "./runbookselemententity.js"; -export * from "./runbookselementinputentity.js"; -export * from "./runbookselementmarkdownentity.js"; -export * from "./runbookselementtextareaentity.js"; export * from "./runbooksexecutionentity.js"; -export * from "./runbooksexecutionentityexecutedforentity.js"; export * from "./runbooksexecutionentitypaginated.js"; -export * from "./runbooksexecutionstepentity.js"; -export * from "./runbooksexecutionstepexecutionentity.js"; -export * from "./runbookstepentity.js"; -export * from "./runbookswebhookdeliveryentity.js"; export * from "./savedsearchentity.js"; export * from "./scheduledmaintenanceentity.js"; export * from "./scheduledmaintenancesimpactentity.js"; @@ -288,8 +300,8 @@ export * from "./severitymatriximpactentity.js"; export * from "./severitymatrixitementity.js"; export * from "./severitymatrixseveritymatrixentity.js"; export * from "./signalsapiingestkeyentity.js"; -export * from "./signalsapiruleentity.js"; -export * from "./signalsapitargetentity.js"; +export * from "./signalsapitransposerlistentity.js"; +export * from "./similarincidententitypaginated.js"; export * from "./slimrunbookentity.js"; export * from "./statusupdatetemplateentity.js"; export * from "./succinctentity.js"; @@ -298,7 +310,6 @@ export * from "./tagentitypaginated.js"; export * from "./taskentity.js"; export * from "./taskentitypaginated.js"; export * from "./tasklistentity.js"; -export * from "./tasklistitementity.js"; export * from "./teamentity.js"; export * from "./teamentitylite.js"; export * from "./teamentitypaginated.js"; @@ -306,12 +317,67 @@ export * from "./ticketingfieldmapsmappablefieldentity.js"; export * from "./ticketingpriorityentity.js"; export * from "./ticketingprojectconfigentity.js"; export * from "./ticketingprojectfieldmapbodyentity.js"; -export * from "./ticketingprojectfieldmapcaseselseentity.js"; export * from "./ticketingprojectfieldmapcasesentity.js"; export * from "./ticketingprojectfieldmapentity.js"; -export * from "./ticketingprojectfieldmapexternalvalueentity.js"; +export * from "./ticketingprojectinboundfieldmapentity.js"; +export * from "./ticketingprojectinboundmappablefieldentity.js"; export * from "./ticketingprojectsprojectlistitementity.js"; export * from "./ticketingticketentity.js"; +export * from "./updateawscloudtrailbatch.js"; +export * from "./updateawsconnection.js"; +export * from "./updatechange.js"; +export * from "./updatechangeevent.js"; +export * from "./updatechangeidentity.js"; +export * from "./updatechecklisttemplate.js"; +export * from "./updatecomment.js"; +export * from "./updatecustomfielddefinition.js"; +export * from "./updateenvironment.js"; +export * from "./updatefunctionality.js"; +export * from "./updateincident.js"; +export * from "./updateincidentalertprimary.js"; +export * from "./updateincidentchangeevent.js"; +export * from "./updateincidentchatmessage.js"; +export * from "./updateincidentimpactpatch.js"; +export * from "./updateincidentimpactput.js"; +export * from "./updateincidentlink.js"; +export * from "./updateincidentnote.js"; +export * from "./updateincidentretrospective.js"; +export * from "./updateincidentretrospectivefield.js"; +export * from "./updateincidentrole.js"; +export * from "./updateincidenttask.js"; +export * from "./updateincidenttype.js"; +export * from "./updatenunclink.js"; +export * from "./updateoncallshift.js"; +export * from "./updatepostmortemfield.js"; +export * from "./updatepostmortemquestions.js"; +export * from "./updatepostmortemreason.js"; +export * from "./updatepostmortemreport.js"; +export * from "./updatepriority.js"; +export * from "./updaterunbook.js"; +export * from "./updaterunbookexecutionstep.js"; +export * from "./updatesavedsearch.js"; +export * from "./updatescheduledmaintenance.js"; +export * from "./updatescimgroup.js"; +export * from "./updatescimuser.js"; +export * from "./updateservice.js"; +export * from "./updateservicedependency.js"; +export * from "./updateseverity.js"; +export * from "./updateseveritymatrix.js"; +export * from "./updateseveritymatrixcondition.js"; +export * from "./updateseveritymatriximpact.js"; +export * from "./updatesignalsemailtarget.js"; +export * from "./updatesignalswebhooktarget.js"; +export * from "./updatestatuspageconnection.js"; +export * from "./updatestatusupdatetemplate.js"; +export * from "./updatetasklist.js"; +export * from "./updateteam.js"; +export * from "./updateteamescalationpolicy.js"; +export * from "./updateteamoncallschedule.js"; +export * from "./updateteamsignalrule.js"; +export * from "./updateticket.js"; +export * from "./updateticketingpriority.js"; +export * from "./updatevote.js"; +export * from "./updatewebhook.js"; export * from "./userentity.js"; export * from "./userentitypaginated.js"; export * from "./votesentity.js"; diff --git a/src/models/components/infrastructuresearchentity.ts b/src/models/components/infrastructuresearchentity.ts index e7c408f8..d0f6c26e 100644 --- a/src/models/components/infrastructuresearchentity.ts +++ b/src/models/components/infrastructuresearchentity.ts @@ -11,8 +11,8 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * InfrastructureSearchEntity model */ export type InfrastructureSearchEntity = { - type?: string | undefined; - infrastructure?: string | undefined; + type?: string | null | undefined; + infrastructure?: string | null | undefined; }; /** @internal */ @@ -21,14 +21,14 @@ export const InfrastructureSearchEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - type: z.string().optional(), - infrastructure: z.string().optional(), + type: z.nullable(z.string()).optional(), + infrastructure: z.nullable(z.string()).optional(), }); /** @internal */ export type InfrastructureSearchEntity$Outbound = { - type?: string | undefined; - infrastructure?: string | undefined; + type?: string | null | undefined; + infrastructure?: string | null | undefined; }; /** @internal */ @@ -37,8 +37,8 @@ export const InfrastructureSearchEntity$outboundSchema: z.ZodType< z.ZodTypeDef, InfrastructureSearchEntity > = z.object({ - type: z.string().optional(), - infrastructure: z.string().optional(), + type: z.nullable(z.string()).optional(), + infrastructure: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/ingestcatalogdata.ts b/src/models/components/ingestcatalogdata.ts new file mode 100644 index 00000000..ec96f01b --- /dev/null +++ b/src/models/components/ingestcatalogdata.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Encoding for submitted data + */ +export const Encoding = { + TextYaml: "text/yaml", + ApplicationXYaml: "application/x-yaml", + ApplicationJson: "application/json", +} as const; +/** + * Encoding for submitted data + */ +export type Encoding = ClosedEnum; + +/** + * Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. + */ +export type IngestCatalogData = { + /** + * Encoding for submitted data + */ + encoding: Encoding; + /** + * Service data + */ + data: string; +}; + +/** @internal */ +export const Encoding$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Encoding); + +/** @internal */ +export const Encoding$outboundSchema: z.ZodNativeEnum = + Encoding$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Encoding$ { + /** @deprecated use `Encoding$inboundSchema` instead. */ + export const inboundSchema = Encoding$inboundSchema; + /** @deprecated use `Encoding$outboundSchema` instead. */ + export const outboundSchema = Encoding$outboundSchema; +} + +/** @internal */ +export const IngestCatalogData$inboundSchema: z.ZodType< + IngestCatalogData, + z.ZodTypeDef, + unknown +> = z.object({ + encoding: Encoding$inboundSchema, + data: z.string(), +}); + +/** @internal */ +export type IngestCatalogData$Outbound = { + encoding: string; + data: string; +}; + +/** @internal */ +export const IngestCatalogData$outboundSchema: z.ZodType< + IngestCatalogData$Outbound, + z.ZodTypeDef, + IngestCatalogData +> = z.object({ + encoding: Encoding$outboundSchema, + data: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IngestCatalogData$ { + /** @deprecated use `IngestCatalogData$inboundSchema` instead. */ + export const inboundSchema = IngestCatalogData$inboundSchema; + /** @deprecated use `IngestCatalogData$outboundSchema` instead. */ + export const outboundSchema = IngestCatalogData$outboundSchema; + /** @deprecated use `IngestCatalogData$Outbound` instead. */ + export type Outbound = IngestCatalogData$Outbound; +} + +export function ingestCatalogDataToJSON( + ingestCatalogData: IngestCatalogData, +): string { + return JSON.stringify( + IngestCatalogData$outboundSchema.parse(ingestCatalogData), + ); +} + +export function ingestCatalogDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IngestCatalogData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IngestCatalogData' from JSON`, + ); +} diff --git a/src/models/components/integrationentity.ts b/src/models/components/integrationentity.ts deleted file mode 100644 index 4718d03b..00000000 --- a/src/models/components/integrationentity.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type IntegrationEntity = { - id?: string | undefined; - integrationName?: string | undefined; - integrationSlug?: string | undefined; - displayName?: string | undefined; - createdAt?: Date | undefined; -}; - -/** @internal */ -export const IntegrationEntity$inboundSchema: z.ZodType< - IntegrationEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - integration_name: z.string().optional(), - integration_slug: z.string().optional(), - display_name: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), -}).transform((v) => { - return remap$(v, { - "integration_name": "integrationName", - "integration_slug": "integrationSlug", - "display_name": "displayName", - "created_at": "createdAt", - }); -}); - -/** @internal */ -export type IntegrationEntity$Outbound = { - id?: string | undefined; - integration_name?: string | undefined; - integration_slug?: string | undefined; - display_name?: string | undefined; - created_at?: string | undefined; -}; - -/** @internal */ -export const IntegrationEntity$outboundSchema: z.ZodType< - IntegrationEntity$Outbound, - z.ZodTypeDef, - IntegrationEntity -> = z.object({ - id: z.string().optional(), - integrationName: z.string().optional(), - integrationSlug: z.string().optional(), - displayName: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), -}).transform((v) => { - return remap$(v, { - integrationName: "integration_name", - integrationSlug: "integration_slug", - displayName: "display_name", - createdAt: "created_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IntegrationEntity$ { - /** @deprecated use `IntegrationEntity$inboundSchema` instead. */ - export const inboundSchema = IntegrationEntity$inboundSchema; - /** @deprecated use `IntegrationEntity$outboundSchema` instead. */ - export const outboundSchema = IntegrationEntity$outboundSchema; - /** @deprecated use `IntegrationEntity$Outbound` instead. */ - export type Outbound = IntegrationEntity$Outbound; -} - -export function integrationEntityToJSON( - integrationEntity: IntegrationEntity, -): string { - return JSON.stringify( - IntegrationEntity$outboundSchema.parse(integrationEntity), - ); -} - -export function integrationEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => IntegrationEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IntegrationEntity' from JSON`, - ); -} diff --git a/src/models/components/integrationsauthedproviderentitypaginated.ts b/src/models/components/integrationsauthedproviderentitypaginated.ts new file mode 100644 index 00000000..6b8182df --- /dev/null +++ b/src/models/components/integrationsauthedproviderentitypaginated.ts @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; +import { + PublicApiv1IntegrationsAuthedProviderEntity, + PublicApiv1IntegrationsAuthedProviderEntity$inboundSchema, + PublicApiv1IntegrationsAuthedProviderEntity$Outbound, + PublicApiv1IntegrationsAuthedProviderEntity$outboundSchema, +} from "./publicapiv1integrationsauthedproviderentity.js"; + +/** + * Integrations_AuthedProviderEntityPaginated model + */ +export type IntegrationsAuthedProviderEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const IntegrationsAuthedProviderEntityPaginated$inboundSchema: z.ZodType< + IntegrationsAuthedProviderEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable( + z.array(PublicApiv1IntegrationsAuthedProviderEntity$inboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), +}); + +/** @internal */ +export type IntegrationsAuthedProviderEntityPaginated$Outbound = { + data?: + | Array + | null + | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const IntegrationsAuthedProviderEntityPaginated$outboundSchema: + z.ZodType< + IntegrationsAuthedProviderEntityPaginated$Outbound, + z.ZodTypeDef, + IntegrationsAuthedProviderEntityPaginated + > = z.object({ + data: z.nullable( + z.array(PublicApiv1IntegrationsAuthedProviderEntity$outboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsAuthedProviderEntityPaginated$ { + /** @deprecated use `IntegrationsAuthedProviderEntityPaginated$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsAuthedProviderEntityPaginated$inboundSchema; + /** @deprecated use `IntegrationsAuthedProviderEntityPaginated$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsAuthedProviderEntityPaginated$outboundSchema; + /** @deprecated use `IntegrationsAuthedProviderEntityPaginated$Outbound` instead. */ + export type Outbound = IntegrationsAuthedProviderEntityPaginated$Outbound; +} + +export function integrationsAuthedProviderEntityPaginatedToJSON( + integrationsAuthedProviderEntityPaginated: + IntegrationsAuthedProviderEntityPaginated, +): string { + return JSON.stringify( + IntegrationsAuthedProviderEntityPaginated$outboundSchema.parse( + integrationsAuthedProviderEntityPaginated, + ), + ); +} + +export function integrationsAuthedProviderEntityPaginatedFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsAuthedProviderEntityPaginated, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsAuthedProviderEntityPaginated$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsAuthedProviderEntityPaginated' from JSON`, + ); +} diff --git a/src/models/components/integrationsawscloudtrailbatchentity.ts b/src/models/components/integrationsawscloudtrailbatchentity.ts index 2f922522..aca50b42 100644 --- a/src/models/components/integrationsawscloudtrailbatchentity.ts +++ b/src/models/components/integrationsawscloudtrailbatchentity.ts @@ -9,11 +9,11 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IntegrationsAwsConnectionEntity, - IntegrationsAwsConnectionEntity$inboundSchema, - IntegrationsAwsConnectionEntity$Outbound, - IntegrationsAwsConnectionEntity$outboundSchema, -} from "./integrationsawsconnectionentity.js"; + NullableIntegrationsAwsConnectionEntity, + NullableIntegrationsAwsConnectionEntity$inboundSchema, + NullableIntegrationsAwsConnectionEntity$Outbound, + NullableIntegrationsAwsConnectionEntity$outboundSchema, +} from "./nullableintegrationsawsconnectionentity.js"; export const IntegrationsAwsCloudtrailBatchEntityStatus = { InProgress: "in_progress", @@ -30,16 +30,13 @@ export type IntegrationsAwsCloudtrailBatchEntityStatus = ClosedEnum< * Integrations_Aws_CloudtrailBatchEntity model */ export type IntegrationsAwsCloudtrailBatchEntity = { - id?: string | undefined; - eventsCreated?: number | undefined; - status?: IntegrationsAwsCloudtrailBatchEntityStatus | undefined; - startsAt?: Date | undefined; - endsAt?: Date | undefined; - /** - * Integrations_Aws_ConnectionEntity model - */ - connection?: IntegrationsAwsConnectionEntity | undefined; - createdAt?: Date | undefined; + id?: string | null | undefined; + eventsCreated?: number | null | undefined; + status?: IntegrationsAwsCloudtrailBatchEntityStatus | null | undefined; + startsAt?: Date | null | undefined; + endsAt?: Date | null | undefined; + connection?: NullableIntegrationsAwsConnectionEntity | null | undefined; + createdAt?: Date | null | undefined; }; /** @internal */ @@ -71,16 +68,21 @@ export const IntegrationsAwsCloudtrailBatchEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - events_created: z.number().int().optional(), - status: IntegrationsAwsCloudtrailBatchEntityStatus$inboundSchema.optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + events_created: z.nullable(z.number().int()).optional(), + status: z.nullable(IntegrationsAwsCloudtrailBatchEntityStatus$inboundSchema) .optional(), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - connection: IntegrationsAwsConnectionEntity$inboundSchema.optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + connection: z.nullable(NullableIntegrationsAwsConnectionEntity$inboundSchema) .optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "events_created": "eventsCreated", @@ -92,13 +94,16 @@ export const IntegrationsAwsCloudtrailBatchEntity$inboundSchema: z.ZodType< /** @internal */ export type IntegrationsAwsCloudtrailBatchEntity$Outbound = { - id?: string | undefined; - events_created?: number | undefined; - status?: string | undefined; - starts_at?: string | undefined; - ends_at?: string | undefined; - connection?: IntegrationsAwsConnectionEntity$Outbound | undefined; - created_at?: string | undefined; + id?: string | null | undefined; + events_created?: number | null | undefined; + status?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + connection?: + | NullableIntegrationsAwsConnectionEntity$Outbound + | null + | undefined; + created_at?: string | null | undefined; }; /** @internal */ @@ -107,13 +112,15 @@ export const IntegrationsAwsCloudtrailBatchEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsAwsCloudtrailBatchEntity > = z.object({ - id: z.string().optional(), - eventsCreated: z.number().int().optional(), - status: IntegrationsAwsCloudtrailBatchEntityStatus$outboundSchema.optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), - endsAt: z.date().transform(v => v.toISOString()).optional(), - connection: IntegrationsAwsConnectionEntity$outboundSchema.optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + eventsCreated: z.nullable(z.number().int()).optional(), + status: z.nullable(IntegrationsAwsCloudtrailBatchEntityStatus$outboundSchema) + .optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + connection: z.nullable(NullableIntegrationsAwsConnectionEntity$outboundSchema) + .optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { eventsCreated: "events_created", diff --git a/src/models/components/integrationsawscloudtrailbatchentitypaginated.ts b/src/models/components/integrationsawscloudtrailbatchentitypaginated.ts index 5ebca2d0..80c128e6 100644 --- a/src/models/components/integrationsawscloudtrailbatchentitypaginated.ts +++ b/src/models/components/integrationsawscloudtrailbatchentitypaginated.ts @@ -13,18 +13,18 @@ import { IntegrationsAwsCloudtrailBatchEntity$outboundSchema, } from "./integrationsawscloudtrailbatchentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Integrations_Aws_CloudtrailBatchEntityPaginated model */ export type IntegrationsAwsCloudtrailBatchEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -34,15 +34,19 @@ export const IntegrationsAwsCloudtrailBatchEntityPaginated$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - data: z.array(IntegrationsAwsCloudtrailBatchEntity$inboundSchema) - .optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable( + z.array(IntegrationsAwsCloudtrailBatchEntity$inboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IntegrationsAwsCloudtrailBatchEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: + | Array + | null + | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -52,9 +56,10 @@ export const IntegrationsAwsCloudtrailBatchEntityPaginated$outboundSchema: z.ZodTypeDef, IntegrationsAwsCloudtrailBatchEntityPaginated > = z.object({ - data: z.array(IntegrationsAwsCloudtrailBatchEntity$outboundSchema) - .optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable( + z.array(IntegrationsAwsCloudtrailBatchEntity$outboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/integrationsawsconnectionentity.ts b/src/models/components/integrationsawsconnectionentity.ts index 54c17b2c..dcab61c7 100644 --- a/src/models/components/integrationsawsconnectionentity.ts +++ b/src/models/components/integrationsawsconnectionentity.ts @@ -9,50 +9,57 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const ConnectionStatus = { +export const IntegrationsAwsConnectionEntityConnectionStatus = { PendingSetup: "pending_setup", RoleAssumed: "role_assumed", CantAssumeRole: "cant_assume_role", InvalidPermissions: "invalid_permissions", Validated: "validated", } as const; -export type ConnectionStatus = ClosedEnum; +export type IntegrationsAwsConnectionEntityConnectionStatus = ClosedEnum< + typeof IntegrationsAwsConnectionEntityConnectionStatus +>; /** * Integrations_Aws_ConnectionEntity model */ export type IntegrationsAwsConnectionEntity = { - id?: string | undefined; - awsAccountId?: string | undefined; - targetArn?: string | undefined; - externalId?: string | undefined; - connectionStatus?: ConnectionStatus | undefined; - statusText?: string | undefined; - statusDescription?: string | undefined; - environmentId?: string | undefined; - environmentName?: string | undefined; - regions?: Array | undefined; + id?: string | null | undefined; + awsAccountId?: string | null | undefined; + targetArn?: string | null | undefined; + externalId?: string | null | undefined; + connectionStatus?: + | IntegrationsAwsConnectionEntityConnectionStatus + | null + | undefined; + statusText?: string | null | undefined; + statusDescription?: string | null | undefined; + environmentId?: string | null | undefined; + environmentName?: string | null | undefined; + regions?: Array | null | undefined; }; /** @internal */ -export const ConnectionStatus$inboundSchema: z.ZodNativeEnum< - typeof ConnectionStatus -> = z.nativeEnum(ConnectionStatus); +export const IntegrationsAwsConnectionEntityConnectionStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(IntegrationsAwsConnectionEntityConnectionStatus); /** @internal */ -export const ConnectionStatus$outboundSchema: z.ZodNativeEnum< - typeof ConnectionStatus -> = ConnectionStatus$inboundSchema; +export const IntegrationsAwsConnectionEntityConnectionStatus$outboundSchema: + z.ZodNativeEnum = + IntegrationsAwsConnectionEntityConnectionStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ConnectionStatus$ { - /** @deprecated use `ConnectionStatus$inboundSchema` instead. */ - export const inboundSchema = ConnectionStatus$inboundSchema; - /** @deprecated use `ConnectionStatus$outboundSchema` instead. */ - export const outboundSchema = ConnectionStatus$outboundSchema; +export namespace IntegrationsAwsConnectionEntityConnectionStatus$ { + /** @deprecated use `IntegrationsAwsConnectionEntityConnectionStatus$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsAwsConnectionEntityConnectionStatus$inboundSchema; + /** @deprecated use `IntegrationsAwsConnectionEntityConnectionStatus$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsAwsConnectionEntityConnectionStatus$outboundSchema; } /** @internal */ @@ -61,16 +68,18 @@ export const IntegrationsAwsConnectionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - aws_account_id: z.string().optional(), - target_arn: z.string().optional(), - external_id: z.string().optional(), - connection_status: ConnectionStatus$inboundSchema.optional(), - status_text: z.string().optional(), - status_description: z.string().optional(), - environment_id: z.string().optional(), - environment_name: z.string().optional(), - regions: z.array(z.string()).optional(), + id: z.nullable(z.string()).optional(), + aws_account_id: z.nullable(z.string()).optional(), + target_arn: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), + connection_status: z.nullable( + IntegrationsAwsConnectionEntityConnectionStatus$inboundSchema, + ).optional(), + status_text: z.nullable(z.string()).optional(), + status_description: z.nullable(z.string()).optional(), + environment_id: z.nullable(z.string()).optional(), + environment_name: z.nullable(z.string()).optional(), + regions: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "aws_account_id": "awsAccountId", @@ -86,16 +95,16 @@ export const IntegrationsAwsConnectionEntity$inboundSchema: z.ZodType< /** @internal */ export type IntegrationsAwsConnectionEntity$Outbound = { - id?: string | undefined; - aws_account_id?: string | undefined; - target_arn?: string | undefined; - external_id?: string | undefined; - connection_status?: string | undefined; - status_text?: string | undefined; - status_description?: string | undefined; - environment_id?: string | undefined; - environment_name?: string | undefined; - regions?: Array | undefined; + id?: string | null | undefined; + aws_account_id?: string | null | undefined; + target_arn?: string | null | undefined; + external_id?: string | null | undefined; + connection_status?: string | null | undefined; + status_text?: string | null | undefined; + status_description?: string | null | undefined; + environment_id?: string | null | undefined; + environment_name?: string | null | undefined; + regions?: Array | null | undefined; }; /** @internal */ @@ -104,16 +113,18 @@ export const IntegrationsAwsConnectionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsAwsConnectionEntity > = z.object({ - id: z.string().optional(), - awsAccountId: z.string().optional(), - targetArn: z.string().optional(), - externalId: z.string().optional(), - connectionStatus: ConnectionStatus$outboundSchema.optional(), - statusText: z.string().optional(), - statusDescription: z.string().optional(), - environmentId: z.string().optional(), - environmentName: z.string().optional(), - regions: z.array(z.string()).optional(), + id: z.nullable(z.string()).optional(), + awsAccountId: z.nullable(z.string()).optional(), + targetArn: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), + connectionStatus: z.nullable( + IntegrationsAwsConnectionEntityConnectionStatus$outboundSchema, + ).optional(), + statusText: z.nullable(z.string()).optional(), + statusDescription: z.nullable(z.string()).optional(), + environmentId: z.nullable(z.string()).optional(), + environmentName: z.nullable(z.string()).optional(), + regions: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { awsAccountId: "aws_account_id", diff --git a/src/models/components/integrationsawsconnectionentitypaginated.ts b/src/models/components/integrationsawsconnectionentitypaginated.ts index 6576f7bf..3bbc94e5 100644 --- a/src/models/components/integrationsawsconnectionentitypaginated.ts +++ b/src/models/components/integrationsawsconnectionentitypaginated.ts @@ -13,18 +13,18 @@ import { IntegrationsAwsConnectionEntity$outboundSchema, } from "./integrationsawsconnectionentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Integrations_Aws_ConnectionEntityPaginated model */ export type IntegrationsAwsConnectionEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,15 @@ export const IntegrationsAwsConnectionEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(IntegrationsAwsConnectionEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(IntegrationsAwsConnectionEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IntegrationsAwsConnectionEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +50,9 @@ export const IntegrationsAwsConnectionEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsAwsConnectionEntityPaginated > = z.object({ - data: z.array(IntegrationsAwsConnectionEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(IntegrationsAwsConnectionEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/integrationsconfluencecloudspacekeyentity.ts b/src/models/components/integrationsconfluencecloudspacekeyentity.ts index f9c95fa7..75ba1f29 100644 --- a/src/models/components/integrationsconfluencecloudspacekeyentity.ts +++ b/src/models/components/integrationsconfluencecloudspacekeyentity.ts @@ -11,8 +11,8 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Integrations_ConfluenceCloud_SpaceKeyEntity model */ export type IntegrationsConfluenceCloudSpaceKeyEntity = { - key?: string | undefined; - name?: string | undefined; + key?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -21,14 +21,14 @@ export const IntegrationsConfluenceCloudSpaceKeyEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - key: z.string().optional(), - name: z.string().optional(), + key: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }); /** @internal */ export type IntegrationsConfluenceCloudSpaceKeyEntity$Outbound = { - key?: string | undefined; - name?: string | undefined; + key?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -38,8 +38,8 @@ export const IntegrationsConfluenceCloudSpaceKeyEntity$outboundSchema: z.ZodTypeDef, IntegrationsConfluenceCloudSpaceKeyEntity > = z.object({ - key: z.string().optional(), - name: z.string().optional(), + key: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/integrationsconnectionentity.ts b/src/models/components/integrationsconnectionentity.ts index f525c348..da9c2627 100644 --- a/src/models/components/integrationsconnectionentity.ts +++ b/src/models/components/integrationsconnectionentity.ts @@ -8,72 +8,87 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; /** * Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. */ -export type Details = {}; +export type IntegrationsConnectionEntityDetails = {}; +/** + * Integrations_ConnectionEntity model + */ export type IntegrationsConnectionEntity = { - id?: string | undefined; - integrationSlug?: string | undefined; - integrationId?: string | undefined; - displayName?: string | undefined; - configurationUrl?: string | undefined; - authorizedBy?: string | undefined; - authorizedById?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + integrationSlug?: string | null | undefined; + integrationId?: string | null | undefined; + displayName?: string | null | undefined; + configurationUrl?: string | null | undefined; + authorizedBy?: string | null | undefined; + authorizedById?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; /** * Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. */ - details?: Details | undefined; - defaultAuthorizedActor?: AuthorEntity | undefined; + details?: IntegrationsConnectionEntityDetails | null | undefined; + defaultAuthorizedActor?: NullableAuthorEntity | null | undefined; }; /** @internal */ -export const Details$inboundSchema: z.ZodType = - z.object({}); +export const IntegrationsConnectionEntityDetails$inboundSchema: z.ZodType< + IntegrationsConnectionEntityDetails, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ -export type Details$Outbound = {}; +export type IntegrationsConnectionEntityDetails$Outbound = {}; /** @internal */ -export const Details$outboundSchema: z.ZodType< - Details$Outbound, +export const IntegrationsConnectionEntityDetails$outboundSchema: z.ZodType< + IntegrationsConnectionEntityDetails$Outbound, z.ZodTypeDef, - Details + IntegrationsConnectionEntityDetails > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Details$ { - /** @deprecated use `Details$inboundSchema` instead. */ - export const inboundSchema = Details$inboundSchema; - /** @deprecated use `Details$outboundSchema` instead. */ - export const outboundSchema = Details$outboundSchema; - /** @deprecated use `Details$Outbound` instead. */ - export type Outbound = Details$Outbound; +export namespace IntegrationsConnectionEntityDetails$ { + /** @deprecated use `IntegrationsConnectionEntityDetails$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsConnectionEntityDetails$inboundSchema; + /** @deprecated use `IntegrationsConnectionEntityDetails$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsConnectionEntityDetails$outboundSchema; + /** @deprecated use `IntegrationsConnectionEntityDetails$Outbound` instead. */ + export type Outbound = IntegrationsConnectionEntityDetails$Outbound; } -export function detailsToJSON(details: Details): string { - return JSON.stringify(Details$outboundSchema.parse(details)); +export function integrationsConnectionEntityDetailsToJSON( + integrationsConnectionEntityDetails: IntegrationsConnectionEntityDetails, +): string { + return JSON.stringify( + IntegrationsConnectionEntityDetails$outboundSchema.parse( + integrationsConnectionEntityDetails, + ), + ); } -export function detailsFromJSON( +export function integrationsConnectionEntityDetailsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Details$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Details' from JSON`, + (x) => + IntegrationsConnectionEntityDetails$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsConnectionEntityDetails' from JSON`, ); } @@ -83,19 +98,24 @@ export const IntegrationsConnectionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - integration_slug: z.string().optional(), - integration_id: z.string().optional(), - display_name: z.string().optional(), - configuration_url: z.string().optional(), - authorized_by: z.string().optional(), - authorized_by_id: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + integration_slug: z.nullable(z.string()).optional(), + integration_id: z.nullable(z.string()).optional(), + display_name: z.nullable(z.string()).optional(), + configuration_url: z.nullable(z.string()).optional(), + authorized_by: z.nullable(z.string()).optional(), + authorized_by_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + details: z.nullable( + z.lazy(() => IntegrationsConnectionEntityDetails$inboundSchema), + ).optional(), + default_authorized_actor: z.nullable(NullableAuthorEntity$inboundSchema) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - details: z.lazy(() => Details$inboundSchema).optional(), - default_authorized_actor: AuthorEntity$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "integration_slug": "integrationSlug", @@ -112,17 +132,17 @@ export const IntegrationsConnectionEntity$inboundSchema: z.ZodType< /** @internal */ export type IntegrationsConnectionEntity$Outbound = { - id?: string | undefined; - integration_slug?: string | undefined; - integration_id?: string | undefined; - display_name?: string | undefined; - configuration_url?: string | undefined; - authorized_by?: string | undefined; - authorized_by_id?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - details?: Details$Outbound | undefined; - default_authorized_actor?: AuthorEntity$Outbound | undefined; + id?: string | null | undefined; + integration_slug?: string | null | undefined; + integration_id?: string | null | undefined; + display_name?: string | null | undefined; + configuration_url?: string | null | undefined; + authorized_by?: string | null | undefined; + authorized_by_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + details?: IntegrationsConnectionEntityDetails$Outbound | null | undefined; + default_authorized_actor?: NullableAuthorEntity$Outbound | null | undefined; }; /** @internal */ @@ -131,17 +151,20 @@ export const IntegrationsConnectionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsConnectionEntity > = z.object({ - id: z.string().optional(), - integrationSlug: z.string().optional(), - integrationId: z.string().optional(), - displayName: z.string().optional(), - configurationUrl: z.string().optional(), - authorizedBy: z.string().optional(), - authorizedById: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - details: z.lazy(() => Details$outboundSchema).optional(), - defaultAuthorizedActor: AuthorEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + integrationSlug: z.nullable(z.string()).optional(), + integrationId: z.nullable(z.string()).optional(), + displayName: z.nullable(z.string()).optional(), + configurationUrl: z.nullable(z.string()).optional(), + authorizedBy: z.nullable(z.string()).optional(), + authorizedById: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + details: z.nullable( + z.lazy(() => IntegrationsConnectionEntityDetails$outboundSchema), + ).optional(), + defaultAuthorizedActor: z.nullable(NullableAuthorEntity$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { integrationSlug: "integration_slug", diff --git a/src/models/components/integrationsconnectionentitypaginated.ts b/src/models/components/integrationsconnectionentitypaginated.ts new file mode 100644 index 00000000..85ae66b0 --- /dev/null +++ b/src/models/components/integrationsconnectionentitypaginated.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IntegrationsConnectionEntity, + IntegrationsConnectionEntity$inboundSchema, + IntegrationsConnectionEntity$Outbound, + IntegrationsConnectionEntity$outboundSchema, +} from "./integrationsconnectionentity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; + +/** + * Integrations_ConnectionEntityPaginated model + */ +export type IntegrationsConnectionEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const IntegrationsConnectionEntityPaginated$inboundSchema: z.ZodType< + IntegrationsConnectionEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.array(IntegrationsConnectionEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), +}); + +/** @internal */ +export type IntegrationsConnectionEntityPaginated$Outbound = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const IntegrationsConnectionEntityPaginated$outboundSchema: z.ZodType< + IntegrationsConnectionEntityPaginated$Outbound, + z.ZodTypeDef, + IntegrationsConnectionEntityPaginated +> = z.object({ + data: z.nullable(z.array(IntegrationsConnectionEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsConnectionEntityPaginated$ { + /** @deprecated use `IntegrationsConnectionEntityPaginated$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsConnectionEntityPaginated$inboundSchema; + /** @deprecated use `IntegrationsConnectionEntityPaginated$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsConnectionEntityPaginated$outboundSchema; + /** @deprecated use `IntegrationsConnectionEntityPaginated$Outbound` instead. */ + export type Outbound = IntegrationsConnectionEntityPaginated$Outbound; +} + +export function integrationsConnectionEntityPaginatedToJSON( + integrationsConnectionEntityPaginated: IntegrationsConnectionEntityPaginated, +): string { + return JSON.stringify( + IntegrationsConnectionEntityPaginated$outboundSchema.parse( + integrationsConnectionEntityPaginated, + ), + ); +} + +export function integrationsConnectionEntityPaginatedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + IntegrationsConnectionEntityPaginated$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsConnectionEntityPaginated' from JSON`, + ); +} diff --git a/src/models/components/integrationsconnectionstatusentity.ts b/src/models/components/integrationsconnectionstatusentity.ts new file mode 100644 index 00000000..79b7ea1b --- /dev/null +++ b/src/models/components/integrationsconnectionstatusentity.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; + +export const IntegrationsConnectionStatusEntityStatus = { + Ok: "ok", + Info: "info", + Warning: "warning", + Error: "error", +} as const; +export type IntegrationsConnectionStatusEntityStatus = ClosedEnum< + typeof IntegrationsConnectionStatusEntityStatus +>; + +/** + * Additional unstructured data about the status check. + */ +export type IntegrationsConnectionStatusEntityData = {}; + +/** + * Integrations_ConnectionStatusEntity model + */ +export type IntegrationsConnectionStatusEntity = { + checkedAt?: Date | null | undefined; + status?: IntegrationsConnectionStatusEntityStatus | null | undefined; + message?: string | null | undefined; + checkType?: string | null | undefined; + errorType?: string | null | undefined; + integrationSlug?: string | null | undefined; + connectionId?: string | null | undefined; + /** + * Additional unstructured data about the status check. + */ + data?: IntegrationsConnectionStatusEntityData | null | undefined; + performedBy?: NullableAuthorEntity | null | undefined; +}; + +/** @internal */ +export const IntegrationsConnectionStatusEntityStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(IntegrationsConnectionStatusEntityStatus); + +/** @internal */ +export const IntegrationsConnectionStatusEntityStatus$outboundSchema: + z.ZodNativeEnum = + IntegrationsConnectionStatusEntityStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsConnectionStatusEntityStatus$ { + /** @deprecated use `IntegrationsConnectionStatusEntityStatus$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsConnectionStatusEntityStatus$inboundSchema; + /** @deprecated use `IntegrationsConnectionStatusEntityStatus$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsConnectionStatusEntityStatus$outboundSchema; +} + +/** @internal */ +export const IntegrationsConnectionStatusEntityData$inboundSchema: z.ZodType< + IntegrationsConnectionStatusEntityData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type IntegrationsConnectionStatusEntityData$Outbound = {}; + +/** @internal */ +export const IntegrationsConnectionStatusEntityData$outboundSchema: z.ZodType< + IntegrationsConnectionStatusEntityData$Outbound, + z.ZodTypeDef, + IntegrationsConnectionStatusEntityData +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsConnectionStatusEntityData$ { + /** @deprecated use `IntegrationsConnectionStatusEntityData$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsConnectionStatusEntityData$inboundSchema; + /** @deprecated use `IntegrationsConnectionStatusEntityData$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsConnectionStatusEntityData$outboundSchema; + /** @deprecated use `IntegrationsConnectionStatusEntityData$Outbound` instead. */ + export type Outbound = IntegrationsConnectionStatusEntityData$Outbound; +} + +export function integrationsConnectionStatusEntityDataToJSON( + integrationsConnectionStatusEntityData: + IntegrationsConnectionStatusEntityData, +): string { + return JSON.stringify( + IntegrationsConnectionStatusEntityData$outboundSchema.parse( + integrationsConnectionStatusEntityData, + ), + ); +} + +export function integrationsConnectionStatusEntityDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + IntegrationsConnectionStatusEntityData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsConnectionStatusEntityData' from JSON`, + ); +} + +/** @internal */ +export const IntegrationsConnectionStatusEntity$inboundSchema: z.ZodType< + IntegrationsConnectionStatusEntity, + z.ZodTypeDef, + unknown +> = z.object({ + checked_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + status: z.nullable(IntegrationsConnectionStatusEntityStatus$inboundSchema) + .optional(), + message: z.nullable(z.string()).optional(), + check_type: z.nullable(z.string()).optional(), + error_type: z.nullable(z.string()).optional(), + integration_slug: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + data: z.nullable( + z.lazy(() => IntegrationsConnectionStatusEntityData$inboundSchema), + ).optional(), + performed_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "checked_at": "checkedAt", + "check_type": "checkType", + "error_type": "errorType", + "integration_slug": "integrationSlug", + "connection_id": "connectionId", + "performed_by": "performedBy", + }); +}); + +/** @internal */ +export type IntegrationsConnectionStatusEntity$Outbound = { + checked_at?: string | null | undefined; + status?: string | null | undefined; + message?: string | null | undefined; + check_type?: string | null | undefined; + error_type?: string | null | undefined; + integration_slug?: string | null | undefined; + connection_id?: string | null | undefined; + data?: IntegrationsConnectionStatusEntityData$Outbound | null | undefined; + performed_by?: NullableAuthorEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const IntegrationsConnectionStatusEntity$outboundSchema: z.ZodType< + IntegrationsConnectionStatusEntity$Outbound, + z.ZodTypeDef, + IntegrationsConnectionStatusEntity +> = z.object({ + checkedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + status: z.nullable(IntegrationsConnectionStatusEntityStatus$outboundSchema) + .optional(), + message: z.nullable(z.string()).optional(), + checkType: z.nullable(z.string()).optional(), + errorType: z.nullable(z.string()).optional(), + integrationSlug: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + data: z.nullable( + z.lazy(() => IntegrationsConnectionStatusEntityData$outboundSchema), + ).optional(), + performedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + checkedAt: "checked_at", + checkType: "check_type", + errorType: "error_type", + integrationSlug: "integration_slug", + connectionId: "connection_id", + performedBy: "performed_by", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsConnectionStatusEntity$ { + /** @deprecated use `IntegrationsConnectionStatusEntity$inboundSchema` instead. */ + export const inboundSchema = IntegrationsConnectionStatusEntity$inboundSchema; + /** @deprecated use `IntegrationsConnectionStatusEntity$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsConnectionStatusEntity$outboundSchema; + /** @deprecated use `IntegrationsConnectionStatusEntity$Outbound` instead. */ + export type Outbound = IntegrationsConnectionStatusEntity$Outbound; +} + +export function integrationsConnectionStatusEntityToJSON( + integrationsConnectionStatusEntity: IntegrationsConnectionStatusEntity, +): string { + return JSON.stringify( + IntegrationsConnectionStatusEntity$outboundSchema.parse( + integrationsConnectionStatusEntity, + ), + ); +} + +export function integrationsConnectionStatusEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + IntegrationsConnectionStatusEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsConnectionStatusEntity' from JSON`, + ); +} diff --git a/src/models/components/integrationsintegrationentity.ts b/src/models/components/integrationsintegrationentity.ts index 7e36ac4b..a6d60e74 100644 --- a/src/models/components/integrationsintegrationentity.ts +++ b/src/models/components/integrationsintegrationentity.ts @@ -8,34 +8,34 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IntegrationsConnectionEntity, - IntegrationsConnectionEntity$inboundSchema, - IntegrationsConnectionEntity$Outbound, - IntegrationsConnectionEntity$outboundSchema, -} from "./integrationsconnectionentity.js"; + NullableIntegrationsConnectionEntity, + NullableIntegrationsConnectionEntity$inboundSchema, + NullableIntegrationsConnectionEntity$Outbound, + NullableIntegrationsConnectionEntity$outboundSchema, +} from "./nullableintegrationsconnectionentity.js"; import { - IntegrationsIntegrationEntityLogoEntity, - IntegrationsIntegrationEntityLogoEntity$inboundSchema, - IntegrationsIntegrationEntityLogoEntity$Outbound, - IntegrationsIntegrationEntityLogoEntity$outboundSchema, -} from "./integrationsintegrationentitylogoentity.js"; + NullableIntegrationsIntegrationEntityLogoEntity, + NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema, + NullableIntegrationsIntegrationEntityLogoEntity$Outbound, + NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema, +} from "./nullableintegrationsintegrationentitylogoentity.js"; /** * Integrations_IntegrationEntity model */ export type IntegrationsIntegrationEntity = { - id?: string | undefined; - slug?: string | undefined; - name?: string | undefined; - description?: string | undefined; - setupUrl?: string | undefined; - createdAt?: Date | undefined; - connections?: IntegrationsConnectionEntity | undefined; - enabled?: boolean | undefined; - installed?: boolean | undefined; - deprecated?: boolean | undefined; - logo?: IntegrationsIntegrationEntityLogoEntity | undefined; - natIp?: string | undefined; + id?: string | null | undefined; + slug?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + setupUrl?: string | null | undefined; + createdAt?: Date | null | undefined; + connections?: NullableIntegrationsConnectionEntity | null | undefined; + enabled?: boolean | null | undefined; + installed?: boolean | null | undefined; + deprecated?: boolean | null | undefined; + logo?: NullableIntegrationsIntegrationEntityLogoEntity | null | undefined; + natIp?: string | null | undefined; }; /** @internal */ @@ -44,19 +44,23 @@ export const IntegrationsIntegrationEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - slug: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - setup_url: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + setup_url: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + connections: z.nullable(NullableIntegrationsConnectionEntity$inboundSchema) .optional(), - connections: IntegrationsConnectionEntity$inboundSchema.optional(), - enabled: z.boolean().optional(), - installed: z.boolean().optional(), - deprecated: z.boolean().optional(), - logo: IntegrationsIntegrationEntityLogoEntity$inboundSchema.optional(), - nat_ip: z.string().optional(), + enabled: z.nullable(z.boolean()).optional(), + installed: z.nullable(z.boolean()).optional(), + deprecated: z.nullable(z.boolean()).optional(), + logo: z.nullable( + NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema, + ).optional(), + nat_ip: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "setup_url": "setupUrl", @@ -67,18 +71,24 @@ export const IntegrationsIntegrationEntity$inboundSchema: z.ZodType< /** @internal */ export type IntegrationsIntegrationEntity$Outbound = { - id?: string | undefined; - slug?: string | undefined; - name?: string | undefined; - description?: string | undefined; - setup_url?: string | undefined; - created_at?: string | undefined; - connections?: IntegrationsConnectionEntity$Outbound | undefined; - enabled?: boolean | undefined; - installed?: boolean | undefined; - deprecated?: boolean | undefined; - logo?: IntegrationsIntegrationEntityLogoEntity$Outbound | undefined; - nat_ip?: string | undefined; + id?: string | null | undefined; + slug?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + setup_url?: string | null | undefined; + created_at?: string | null | undefined; + connections?: + | NullableIntegrationsConnectionEntity$Outbound + | null + | undefined; + enabled?: boolean | null | undefined; + installed?: boolean | null | undefined; + deprecated?: boolean | null | undefined; + logo?: + | NullableIntegrationsIntegrationEntityLogoEntity$Outbound + | null + | undefined; + nat_ip?: string | null | undefined; }; /** @internal */ @@ -87,18 +97,21 @@ export const IntegrationsIntegrationEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsIntegrationEntity > = z.object({ - id: z.string().optional(), - slug: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - setupUrl: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - connections: IntegrationsConnectionEntity$outboundSchema.optional(), - enabled: z.boolean().optional(), - installed: z.boolean().optional(), - deprecated: z.boolean().optional(), - logo: IntegrationsIntegrationEntityLogoEntity$outboundSchema.optional(), - natIp: z.string().optional(), + id: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + setupUrl: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + connections: z.nullable(NullableIntegrationsConnectionEntity$outboundSchema) + .optional(), + enabled: z.nullable(z.boolean()).optional(), + installed: z.nullable(z.boolean()).optional(), + deprecated: z.nullable(z.boolean()).optional(), + logo: z.nullable( + NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema, + ).optional(), + natIp: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { setupUrl: "setup_url", diff --git a/src/models/components/integrationsintegrationentitylogoentity.ts b/src/models/components/integrationsintegrationentitylogoentity.ts deleted file mode 100644 index 27d03bcb..00000000 --- a/src/models/components/integrationsintegrationentitylogoentity.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type IntegrationsIntegrationEntityLogoEntity = { - logoUrl?: string | undefined; -}; - -/** @internal */ -export const IntegrationsIntegrationEntityLogoEntity$inboundSchema: z.ZodType< - IntegrationsIntegrationEntityLogoEntity, - z.ZodTypeDef, - unknown -> = z.object({ - logo_url: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "logo_url": "logoUrl", - }); -}); - -/** @internal */ -export type IntegrationsIntegrationEntityLogoEntity$Outbound = { - logo_url?: string | undefined; -}; - -/** @internal */ -export const IntegrationsIntegrationEntityLogoEntity$outboundSchema: z.ZodType< - IntegrationsIntegrationEntityLogoEntity$Outbound, - z.ZodTypeDef, - IntegrationsIntegrationEntityLogoEntity -> = z.object({ - logoUrl: z.string().optional(), -}).transform((v) => { - return remap$(v, { - logoUrl: "logo_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IntegrationsIntegrationEntityLogoEntity$ { - /** @deprecated use `IntegrationsIntegrationEntityLogoEntity$inboundSchema` instead. */ - export const inboundSchema = - IntegrationsIntegrationEntityLogoEntity$inboundSchema; - /** @deprecated use `IntegrationsIntegrationEntityLogoEntity$outboundSchema` instead. */ - export const outboundSchema = - IntegrationsIntegrationEntityLogoEntity$outboundSchema; - /** @deprecated use `IntegrationsIntegrationEntityLogoEntity$Outbound` instead. */ - export type Outbound = IntegrationsIntegrationEntityLogoEntity$Outbound; -} - -export function integrationsIntegrationEntityLogoEntityToJSON( - integrationsIntegrationEntityLogoEntity: - IntegrationsIntegrationEntityLogoEntity, -): string { - return JSON.stringify( - IntegrationsIntegrationEntityLogoEntity$outboundSchema.parse( - integrationsIntegrationEntityLogoEntity, - ), - ); -} - -export function integrationsIntegrationEntityLogoEntityFromJSON( - jsonString: string, -): SafeParseResult< - IntegrationsIntegrationEntityLogoEntity, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - IntegrationsIntegrationEntityLogoEntity$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'IntegrationsIntegrationEntityLogoEntity' from JSON`, - ); -} diff --git a/src/models/components/integrationsintegrationentitypaginated.ts b/src/models/components/integrationsintegrationentitypaginated.ts new file mode 100644 index 00000000..c4344fa0 --- /dev/null +++ b/src/models/components/integrationsintegrationentitypaginated.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IntegrationsIntegrationEntity, + IntegrationsIntegrationEntity$inboundSchema, + IntegrationsIntegrationEntity$Outbound, + IntegrationsIntegrationEntity$outboundSchema, +} from "./integrationsintegrationentity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; + +/** + * Integrations_IntegrationEntityPaginated model + */ +export type IntegrationsIntegrationEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const IntegrationsIntegrationEntityPaginated$inboundSchema: z.ZodType< + IntegrationsIntegrationEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.array(IntegrationsIntegrationEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), +}); + +/** @internal */ +export type IntegrationsIntegrationEntityPaginated$Outbound = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const IntegrationsIntegrationEntityPaginated$outboundSchema: z.ZodType< + IntegrationsIntegrationEntityPaginated$Outbound, + z.ZodTypeDef, + IntegrationsIntegrationEntityPaginated +> = z.object({ + data: z.nullable(z.array(IntegrationsIntegrationEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsIntegrationEntityPaginated$ { + /** @deprecated use `IntegrationsIntegrationEntityPaginated$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsIntegrationEntityPaginated$inboundSchema; + /** @deprecated use `IntegrationsIntegrationEntityPaginated$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsIntegrationEntityPaginated$outboundSchema; + /** @deprecated use `IntegrationsIntegrationEntityPaginated$Outbound` instead. */ + export type Outbound = IntegrationsIntegrationEntityPaginated$Outbound; +} + +export function integrationsIntegrationEntityPaginatedToJSON( + integrationsIntegrationEntityPaginated: + IntegrationsIntegrationEntityPaginated, +): string { + return JSON.stringify( + IntegrationsIntegrationEntityPaginated$outboundSchema.parse( + integrationsIntegrationEntityPaginated, + ), + ); +} + +export function integrationsIntegrationEntityPaginatedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + IntegrationsIntegrationEntityPaginated$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsIntegrationEntityPaginated' from JSON`, + ); +} diff --git a/src/models/components/integrationsmicrosoftteamsv2channelentity.ts b/src/models/components/integrationsmicrosoftteamsv2channelentity.ts deleted file mode 100644 index 9ff346da..00000000 --- a/src/models/components/integrationsmicrosoftteamsv2channelentity.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - IncidentEntity, - IncidentEntity$inboundSchema, - IncidentEntity$Outbound, - IncidentEntity$outboundSchema, -} from "./incidententity.js"; - -export type IntegrationsMicrosoftTeamsV2ChannelEntity = { - id?: string | undefined; - channelId?: string | undefined; - channelName?: string | undefined; - msTeamId?: string | undefined; - teamName?: string | undefined; - channelUrl?: string | undefined; - status?: string | undefined; - /** - * IncidentEntity model - */ - incident?: IncidentEntity | undefined; -}; - -/** @internal */ -export const IntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema: z.ZodType< - IntegrationsMicrosoftTeamsV2ChannelEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - channel_id: z.string().optional(), - channel_name: z.string().optional(), - ms_team_id: z.string().optional(), - team_name: z.string().optional(), - channel_url: z.string().optional(), - status: z.string().optional(), - incident: IncidentEntity$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "channel_id": "channelId", - "channel_name": "channelName", - "ms_team_id": "msTeamId", - "team_name": "teamName", - "channel_url": "channelUrl", - }); -}); - -/** @internal */ -export type IntegrationsMicrosoftTeamsV2ChannelEntity$Outbound = { - id?: string | undefined; - channel_id?: string | undefined; - channel_name?: string | undefined; - ms_team_id?: string | undefined; - team_name?: string | undefined; - channel_url?: string | undefined; - status?: string | undefined; - incident?: IncidentEntity$Outbound | undefined; -}; - -/** @internal */ -export const IntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema: - z.ZodType< - IntegrationsMicrosoftTeamsV2ChannelEntity$Outbound, - z.ZodTypeDef, - IntegrationsMicrosoftTeamsV2ChannelEntity - > = z.object({ - id: z.string().optional(), - channelId: z.string().optional(), - channelName: z.string().optional(), - msTeamId: z.string().optional(), - teamName: z.string().optional(), - channelUrl: z.string().optional(), - status: z.string().optional(), - incident: IncidentEntity$outboundSchema.optional(), - }).transform((v) => { - return remap$(v, { - channelId: "channel_id", - channelName: "channel_name", - msTeamId: "ms_team_id", - teamName: "team_name", - channelUrl: "channel_url", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IntegrationsMicrosoftTeamsV2ChannelEntity$ { - /** @deprecated use `IntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema` instead. */ - export const inboundSchema = - IntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema; - /** @deprecated use `IntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema` instead. */ - export const outboundSchema = - IntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema; - /** @deprecated use `IntegrationsMicrosoftTeamsV2ChannelEntity$Outbound` instead. */ - export type Outbound = IntegrationsMicrosoftTeamsV2ChannelEntity$Outbound; -} - -export function integrationsMicrosoftTeamsV2ChannelEntityToJSON( - integrationsMicrosoftTeamsV2ChannelEntity: - IntegrationsMicrosoftTeamsV2ChannelEntity, -): string { - return JSON.stringify( - IntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema.parse( - integrationsMicrosoftTeamsV2ChannelEntity, - ), - ); -} - -export function integrationsMicrosoftTeamsV2ChannelEntityFromJSON( - jsonString: string, -): SafeParseResult< - IntegrationsMicrosoftTeamsV2ChannelEntity, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - IntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'IntegrationsMicrosoftTeamsV2ChannelEntity' from JSON`, - ); -} diff --git a/src/models/components/integrationsslackslackchannelentity.ts b/src/models/components/integrationsslackslackchannelentity.ts deleted file mode 100644 index 3e65c1ec..00000000 --- a/src/models/components/integrationsslackslackchannelentity.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type IntegrationsSlackSlackChannelEntity = { - id?: string | undefined; - name?: string | undefined; - slackChannelId?: string | undefined; -}; - -/** @internal */ -export const IntegrationsSlackSlackChannelEntity$inboundSchema: z.ZodType< - IntegrationsSlackSlackChannelEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slack_channel_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "slack_channel_id": "slackChannelId", - }); -}); - -/** @internal */ -export type IntegrationsSlackSlackChannelEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - slack_channel_id?: string | undefined; -}; - -/** @internal */ -export const IntegrationsSlackSlackChannelEntity$outboundSchema: z.ZodType< - IntegrationsSlackSlackChannelEntity$Outbound, - z.ZodTypeDef, - IntegrationsSlackSlackChannelEntity -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slackChannelId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - slackChannelId: "slack_channel_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IntegrationsSlackSlackChannelEntity$ { - /** @deprecated use `IntegrationsSlackSlackChannelEntity$inboundSchema` instead. */ - export const inboundSchema = - IntegrationsSlackSlackChannelEntity$inboundSchema; - /** @deprecated use `IntegrationsSlackSlackChannelEntity$outboundSchema` instead. */ - export const outboundSchema = - IntegrationsSlackSlackChannelEntity$outboundSchema; - /** @deprecated use `IntegrationsSlackSlackChannelEntity$Outbound` instead. */ - export type Outbound = IntegrationsSlackSlackChannelEntity$Outbound; -} - -export function integrationsSlackSlackChannelEntityToJSON( - integrationsSlackSlackChannelEntity: IntegrationsSlackSlackChannelEntity, -): string { - return JSON.stringify( - IntegrationsSlackSlackChannelEntity$outboundSchema.parse( - integrationsSlackSlackChannelEntity, - ), - ); -} - -export function integrationsSlackSlackChannelEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - IntegrationsSlackSlackChannelEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'IntegrationsSlackSlackChannelEntity' from JSON`, - ); -} diff --git a/src/models/components/integrationsslackusergroupentity.ts b/src/models/components/integrationsslackusergroupentity.ts new file mode 100644 index 00000000..48f1cc62 --- /dev/null +++ b/src/models/components/integrationsslackusergroupentity.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Integrations_Slack_UsergroupEntity model + */ +export type IntegrationsSlackUsergroupEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + handle?: string | null | undefined; + isDisabled?: boolean | null | undefined; +}; + +/** @internal */ +export const IntegrationsSlackUsergroupEntity$inboundSchema: z.ZodType< + IntegrationsSlackUsergroupEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + handle: z.nullable(z.string()).optional(), + is_disabled: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "is_disabled": "isDisabled", + }); +}); + +/** @internal */ +export type IntegrationsSlackUsergroupEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + handle?: string | null | undefined; + is_disabled?: boolean | null | undefined; +}; + +/** @internal */ +export const IntegrationsSlackUsergroupEntity$outboundSchema: z.ZodType< + IntegrationsSlackUsergroupEntity$Outbound, + z.ZodTypeDef, + IntegrationsSlackUsergroupEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + handle: z.nullable(z.string()).optional(), + isDisabled: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + isDisabled: "is_disabled", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsSlackUsergroupEntity$ { + /** @deprecated use `IntegrationsSlackUsergroupEntity$inboundSchema` instead. */ + export const inboundSchema = IntegrationsSlackUsergroupEntity$inboundSchema; + /** @deprecated use `IntegrationsSlackUsergroupEntity$outboundSchema` instead. */ + export const outboundSchema = IntegrationsSlackUsergroupEntity$outboundSchema; + /** @deprecated use `IntegrationsSlackUsergroupEntity$Outbound` instead. */ + export type Outbound = IntegrationsSlackUsergroupEntity$Outbound; +} + +export function integrationsSlackUsergroupEntityToJSON( + integrationsSlackUsergroupEntity: IntegrationsSlackUsergroupEntity, +): string { + return JSON.stringify( + IntegrationsSlackUsergroupEntity$outboundSchema.parse( + integrationsSlackUsergroupEntity, + ), + ); +} + +export function integrationsSlackUsergroupEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IntegrationsSlackUsergroupEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsSlackUsergroupEntity' from JSON`, + ); +} diff --git a/src/models/components/integrationsslackworkspaceentity.ts b/src/models/components/integrationsslackworkspaceentity.ts new file mode 100644 index 00000000..e6ac89d6 --- /dev/null +++ b/src/models/components/integrationsslackworkspaceentity.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Integrations_Slack_WorkspaceEntity model + */ +export type IntegrationsSlackWorkspaceEntity = { + id?: string | null | undefined; + teamId?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const IntegrationsSlackWorkspaceEntity$inboundSchema: z.ZodType< + IntegrationsSlackWorkspaceEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + team_id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + }); +}); + +/** @internal */ +export type IntegrationsSlackWorkspaceEntity$Outbound = { + id?: string | null | undefined; + team_id?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const IntegrationsSlackWorkspaceEntity$outboundSchema: z.ZodType< + IntegrationsSlackWorkspaceEntity$Outbound, + z.ZodTypeDef, + IntegrationsSlackWorkspaceEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + teamId: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsSlackWorkspaceEntity$ { + /** @deprecated use `IntegrationsSlackWorkspaceEntity$inboundSchema` instead. */ + export const inboundSchema = IntegrationsSlackWorkspaceEntity$inboundSchema; + /** @deprecated use `IntegrationsSlackWorkspaceEntity$outboundSchema` instead. */ + export const outboundSchema = IntegrationsSlackWorkspaceEntity$outboundSchema; + /** @deprecated use `IntegrationsSlackWorkspaceEntity$Outbound` instead. */ + export type Outbound = IntegrationsSlackWorkspaceEntity$Outbound; +} + +export function integrationsSlackWorkspaceEntityToJSON( + integrationsSlackWorkspaceEntity: IntegrationsSlackWorkspaceEntity, +): string { + return JSON.stringify( + IntegrationsSlackWorkspaceEntity$outboundSchema.parse( + integrationsSlackWorkspaceEntity, + ), + ); +} + +export function integrationsSlackWorkspaceEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IntegrationsSlackWorkspaceEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsSlackWorkspaceEntity' from JSON`, + ); +} diff --git a/src/models/components/integrationsstatuspageconditionentity.ts b/src/models/components/integrationsstatuspageconditionentity.ts index 3d55b9f9..417cc879 100644 --- a/src/models/components/integrationsstatuspageconditionentity.ts +++ b/src/models/components/integrationsstatuspageconditionentity.ts @@ -18,9 +18,9 @@ export const StatuspageioCondition = { export type StatuspageioCondition = ClosedEnum; export type IntegrationsStatuspageConditionEntity = { - conditionId?: string | undefined; - conditionName?: string | undefined; - statuspageioCondition?: StatuspageioCondition | undefined; + conditionId?: string | null | undefined; + conditionName?: string | null | undefined; + statuspageioCondition?: StatuspageioCondition | null | undefined; }; /** @internal */ @@ -50,9 +50,10 @@ export const IntegrationsStatuspageConditionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - condition_id: z.string().optional(), - condition_name: z.string().optional(), - statuspageio_condition: StatuspageioCondition$inboundSchema.optional(), + condition_id: z.nullable(z.string()).optional(), + condition_name: z.nullable(z.string()).optional(), + statuspageio_condition: z.nullable(StatuspageioCondition$inboundSchema) + .optional(), }).transform((v) => { return remap$(v, { "condition_id": "conditionId", @@ -63,9 +64,9 @@ export const IntegrationsStatuspageConditionEntity$inboundSchema: z.ZodType< /** @internal */ export type IntegrationsStatuspageConditionEntity$Outbound = { - condition_id?: string | undefined; - condition_name?: string | undefined; - statuspageio_condition?: string | undefined; + condition_id?: string | null | undefined; + condition_name?: string | null | undefined; + statuspageio_condition?: string | null | undefined; }; /** @internal */ @@ -74,9 +75,10 @@ export const IntegrationsStatuspageConditionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsStatuspageConditionEntity > = z.object({ - conditionId: z.string().optional(), - conditionName: z.string().optional(), - statuspageioCondition: StatuspageioCondition$outboundSchema.optional(), + conditionId: z.nullable(z.string()).optional(), + conditionName: z.nullable(z.string()).optional(), + statuspageioCondition: z.nullable(StatuspageioCondition$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { conditionId: "condition_id", diff --git a/src/models/components/integrationsstatuspageconnectionentity.ts b/src/models/components/integrationsstatuspageconnectionentity.ts index 0082307e..a6d5ced5 100644 --- a/src/models/components/integrationsstatuspageconnectionentity.ts +++ b/src/models/components/integrationsstatuspageconnectionentity.ts @@ -30,13 +30,14 @@ import { * Integrations_Statuspage_ConnectionEntity model */ export type IntegrationsStatuspageConnectionEntity = { - id?: string | undefined; - pageName?: string | undefined; - pageId?: string | undefined; - conditions?: Array | undefined; - severities?: Array | undefined; + id?: string | null | undefined; + pageName?: string | null | undefined; + pageId?: string | null | undefined; + conditions?: Array | null | undefined; + severities?: Array | null | undefined; milestoneMappings?: | Array + | null | undefined; }; @@ -46,15 +47,17 @@ export const IntegrationsStatuspageConnectionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - page_name: z.string().optional(), - page_id: z.string().optional(), - conditions: z.array(IntegrationsStatuspageConditionEntity$inboundSchema) - .optional(), - severities: z.array(IntegrationsStatuspageSeverityEntity$inboundSchema) - .optional(), - milestone_mappings: z.array( - IntegrationsStatuspageMilestoneMappingEntity$inboundSchema, + id: z.nullable(z.string()).optional(), + page_name: z.nullable(z.string()).optional(), + page_id: z.nullable(z.string()).optional(), + conditions: z.nullable( + z.array(IntegrationsStatuspageConditionEntity$inboundSchema), + ).optional(), + severities: z.nullable( + z.array(IntegrationsStatuspageSeverityEntity$inboundSchema), + ).optional(), + milestone_mappings: z.nullable( + z.array(IntegrationsStatuspageMilestoneMappingEntity$inboundSchema), ).optional(), }).transform((v) => { return remap$(v, { @@ -66,15 +69,20 @@ export const IntegrationsStatuspageConnectionEntity$inboundSchema: z.ZodType< /** @internal */ export type IntegrationsStatuspageConnectionEntity$Outbound = { - id?: string | undefined; - page_name?: string | undefined; - page_id?: string | undefined; + id?: string | null | undefined; + page_name?: string | null | undefined; + page_id?: string | null | undefined; conditions?: | Array + | null + | undefined; + severities?: + | Array + | null | undefined; - severities?: Array | undefined; milestone_mappings?: | Array + | null | undefined; }; @@ -84,15 +92,17 @@ export const IntegrationsStatuspageConnectionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsStatuspageConnectionEntity > = z.object({ - id: z.string().optional(), - pageName: z.string().optional(), - pageId: z.string().optional(), - conditions: z.array(IntegrationsStatuspageConditionEntity$outboundSchema) - .optional(), - severities: z.array(IntegrationsStatuspageSeverityEntity$outboundSchema) - .optional(), - milestoneMappings: z.array( - IntegrationsStatuspageMilestoneMappingEntity$outboundSchema, + id: z.nullable(z.string()).optional(), + pageName: z.nullable(z.string()).optional(), + pageId: z.nullable(z.string()).optional(), + conditions: z.nullable( + z.array(IntegrationsStatuspageConditionEntity$outboundSchema), + ).optional(), + severities: z.nullable( + z.array(IntegrationsStatuspageSeverityEntity$outboundSchema), + ).optional(), + milestoneMappings: z.nullable( + z.array(IntegrationsStatuspageMilestoneMappingEntity$outboundSchema), ).optional(), }).transform((v) => { return remap$(v, { diff --git a/src/models/components/integrationsstatuspageconnectionentitypaginated.ts b/src/models/components/integrationsstatuspageconnectionentitypaginated.ts index 63b4773d..fa49e46a 100644 --- a/src/models/components/integrationsstatuspageconnectionentitypaginated.ts +++ b/src/models/components/integrationsstatuspageconnectionentitypaginated.ts @@ -13,18 +13,18 @@ import { IntegrationsStatuspageConnectionEntity$outboundSchema, } from "./integrationsstatuspageconnectionentity.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; /** * Integrations_Statuspage_ConnectionEntityPaginated model */ export type IntegrationsStatuspageConnectionEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -34,15 +34,19 @@ export const IntegrationsStatuspageConnectionEntityPaginated$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - data: z.array(IntegrationsStatuspageConnectionEntity$inboundSchema) - .optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable( + z.array(IntegrationsStatuspageConnectionEntity$inboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type IntegrationsStatuspageConnectionEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: + | Array + | null + | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -52,9 +56,10 @@ export const IntegrationsStatuspageConnectionEntityPaginated$outboundSchema: z.ZodTypeDef, IntegrationsStatuspageConnectionEntityPaginated > = z.object({ - data: z.array(IntegrationsStatuspageConnectionEntity$outboundSchema) - .optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable( + z.array(IntegrationsStatuspageConnectionEntity$outboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/integrationsstatuspagemilestonemappingentity.ts b/src/models/components/integrationsstatuspagemilestonemappingentity.ts index 94b0f01f..1104f829 100644 --- a/src/models/components/integrationsstatuspagemilestonemappingentity.ts +++ b/src/models/components/integrationsstatuspagemilestonemappingentity.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IntegrationsStatuspageMilestoneMappingEntity = { - milestoneId?: string | undefined; - status?: string | undefined; + milestoneId?: string | null | undefined; + status?: string | null | undefined; }; /** @internal */ @@ -20,8 +20,8 @@ export const IntegrationsStatuspageMilestoneMappingEntity$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - milestone_id: z.string().optional(), - status: z.string().optional(), + milestone_id: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "milestone_id": "milestoneId", @@ -30,8 +30,8 @@ export const IntegrationsStatuspageMilestoneMappingEntity$inboundSchema: /** @internal */ export type IntegrationsStatuspageMilestoneMappingEntity$Outbound = { - milestone_id?: string | undefined; - status?: string | undefined; + milestone_id?: string | null | undefined; + status?: string | null | undefined; }; /** @internal */ @@ -41,8 +41,8 @@ export const IntegrationsStatuspageMilestoneMappingEntity$outboundSchema: z.ZodTypeDef, IntegrationsStatuspageMilestoneMappingEntity > = z.object({ - milestoneId: z.string().optional(), - status: z.string().optional(), + milestoneId: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { milestoneId: "milestone_id", diff --git a/src/models/components/integrationsstatuspagepageentity.ts b/src/models/components/integrationsstatuspagepageentity.ts new file mode 100644 index 00000000..49e21ca1 --- /dev/null +++ b/src/models/components/integrationsstatuspagepageentity.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Integrations_Statuspage_PageEntity model + */ +export type IntegrationsStatuspagePageEntity = { + id?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const IntegrationsStatuspagePageEntity$inboundSchema: z.ZodType< + IntegrationsStatuspagePageEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type IntegrationsStatuspagePageEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const IntegrationsStatuspagePageEntity$outboundSchema: z.ZodType< + IntegrationsStatuspagePageEntity$Outbound, + z.ZodTypeDef, + IntegrationsStatuspagePageEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsStatuspagePageEntity$ { + /** @deprecated use `IntegrationsStatuspagePageEntity$inboundSchema` instead. */ + export const inboundSchema = IntegrationsStatuspagePageEntity$inboundSchema; + /** @deprecated use `IntegrationsStatuspagePageEntity$outboundSchema` instead. */ + export const outboundSchema = IntegrationsStatuspagePageEntity$outboundSchema; + /** @deprecated use `IntegrationsStatuspagePageEntity$Outbound` instead. */ + export type Outbound = IntegrationsStatuspagePageEntity$Outbound; +} + +export function integrationsStatuspagePageEntityToJSON( + integrationsStatuspagePageEntity: IntegrationsStatuspagePageEntity, +): string { + return JSON.stringify( + IntegrationsStatuspagePageEntity$outboundSchema.parse( + integrationsStatuspagePageEntity, + ), + ); +} + +export function integrationsStatuspagePageEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => IntegrationsStatuspagePageEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsStatuspagePageEntity' from JSON`, + ); +} diff --git a/src/models/components/integrationsstatuspageseverityentity.ts b/src/models/components/integrationsstatuspageseverityentity.ts index ec0d87bc..99f18f3c 100644 --- a/src/models/components/integrationsstatuspageseverityentity.ts +++ b/src/models/components/integrationsstatuspageseverityentity.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IntegrationsStatuspageSeverityEntity = { - severitySlug?: string | undefined; - remoteStatus?: string | undefined; + severitySlug?: string | null | undefined; + remoteStatus?: string | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const IntegrationsStatuspageSeverityEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - severity_slug: z.string().optional(), - remote_status: z.string().optional(), + severity_slug: z.nullable(z.string()).optional(), + remote_status: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "severity_slug": "severitySlug", @@ -30,8 +30,8 @@ export const IntegrationsStatuspageSeverityEntity$inboundSchema: z.ZodType< /** @internal */ export type IntegrationsStatuspageSeverityEntity$Outbound = { - severity_slug?: string | undefined; - remote_status?: string | undefined; + severity_slug?: string | null | undefined; + remote_status?: string | null | undefined; }; /** @internal */ @@ -40,8 +40,8 @@ export const IntegrationsStatuspageSeverityEntity$outboundSchema: z.ZodType< z.ZodTypeDef, IntegrationsStatuspageSeverityEntity > = z.object({ - severitySlug: z.string().optional(), - remoteStatus: z.string().optional(), + severitySlug: z.nullable(z.string()).optional(), + remoteStatus: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { severitySlug: "severity_slug", diff --git a/src/models/components/integrationszendesksearchticketspaginatedentity.ts b/src/models/components/integrationszendesksearchticketspaginatedentity.ts new file mode 100644 index 00000000..b4a30d9e --- /dev/null +++ b/src/models/components/integrationszendesksearchticketspaginatedentity.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IntegrationsZendeskSupportIssueEntity, + IntegrationsZendeskSupportIssueEntity$inboundSchema, + IntegrationsZendeskSupportIssueEntity$Outbound, + IntegrationsZendeskSupportIssueEntity$outboundSchema, +} from "./integrationszendesksupportissueentity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; + +/** + * Integrations_Zendesk_SearchTickets_PaginatedEntity model + */ +export type IntegrationsZendeskSearchTicketsPaginatedEntity = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const IntegrationsZendeskSearchTicketsPaginatedEntity$inboundSchema: + z.ZodType< + IntegrationsZendeskSearchTicketsPaginatedEntity, + z.ZodTypeDef, + unknown + > = z.object({ + data: z.nullable( + z.array(IntegrationsZendeskSupportIssueEntity$inboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), + }); + +/** @internal */ +export type IntegrationsZendeskSearchTicketsPaginatedEntity$Outbound = { + data?: + | Array + | null + | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const IntegrationsZendeskSearchTicketsPaginatedEntity$outboundSchema: + z.ZodType< + IntegrationsZendeskSearchTicketsPaginatedEntity$Outbound, + z.ZodTypeDef, + IntegrationsZendeskSearchTicketsPaginatedEntity + > = z.object({ + data: z.nullable( + z.array(IntegrationsZendeskSupportIssueEntity$outboundSchema), + ).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsZendeskSearchTicketsPaginatedEntity$ { + /** @deprecated use `IntegrationsZendeskSearchTicketsPaginatedEntity$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsZendeskSearchTicketsPaginatedEntity$inboundSchema; + /** @deprecated use `IntegrationsZendeskSearchTicketsPaginatedEntity$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsZendeskSearchTicketsPaginatedEntity$outboundSchema; + /** @deprecated use `IntegrationsZendeskSearchTicketsPaginatedEntity$Outbound` instead. */ + export type Outbound = + IntegrationsZendeskSearchTicketsPaginatedEntity$Outbound; +} + +export function integrationsZendeskSearchTicketsPaginatedEntityToJSON( + integrationsZendeskSearchTicketsPaginatedEntity: + IntegrationsZendeskSearchTicketsPaginatedEntity, +): string { + return JSON.stringify( + IntegrationsZendeskSearchTicketsPaginatedEntity$outboundSchema.parse( + integrationsZendeskSearchTicketsPaginatedEntity, + ), + ); +} + +export function integrationsZendeskSearchTicketsPaginatedEntityFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsZendeskSearchTicketsPaginatedEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsZendeskSearchTicketsPaginatedEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsZendeskSearchTicketsPaginatedEntity' from JSON`, + ); +} diff --git a/src/models/components/integrationszendesksupportissueentity.ts b/src/models/components/integrationszendesksupportissueentity.ts new file mode 100644 index 00000000..25a9e3f5 --- /dev/null +++ b/src/models/components/integrationszendesksupportissueentity.ts @@ -0,0 +1,234 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IncidentEntity, + IncidentEntity$inboundSchema, + IncidentEntity$Outbound, + IncidentEntity$outboundSchema, +} from "./incidententity.js"; +import { + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity, + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$inboundSchema, + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$Outbound, + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$outboundSchema, +} from "./nullableintegrationszendesksupportissueentitycustomerentity.js"; + +/** + * Raw data associated with this issue from originating system. + */ +export type IntegrationsZendeskSupportIssueEntityData = {}; + +export type IntegrationsZendeskSupportIssueEntity = { + /** + * The ID of this support issue in the system that originated this issue, eg Zendesk. + */ + remoteId?: string | null | undefined; + /** + * Title or name of this issue. + */ + title?: string | null | undefined; + /** + * Longer description of the issue. + */ + description?: string | null | undefined; + /** + * Browser-accessible url for this issue in the originating system, eg Zendesk. + */ + remoteUrl?: string | null | undefined; + /** + * Raw data associated with this issue from originating system. + */ + data?: IntegrationsZendeskSupportIssueEntityData | null | undefined; + /** + * Attachment information for this issue. + */ + attachments?: string | null | undefined; + customers?: + | NullableIntegrationsZendeskSupportIssueEntityCustomerEntity + | null + | undefined; + priority?: string | null | undefined; + attachedIncidents?: Array | null | undefined; + /** + * Type designator for this entity + */ + type?: string | null | undefined; +}; + +/** @internal */ +export const IntegrationsZendeskSupportIssueEntityData$inboundSchema: z.ZodType< + IntegrationsZendeskSupportIssueEntityData, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type IntegrationsZendeskSupportIssueEntityData$Outbound = {}; + +/** @internal */ +export const IntegrationsZendeskSupportIssueEntityData$outboundSchema: + z.ZodType< + IntegrationsZendeskSupportIssueEntityData$Outbound, + z.ZodTypeDef, + IntegrationsZendeskSupportIssueEntityData + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsZendeskSupportIssueEntityData$ { + /** @deprecated use `IntegrationsZendeskSupportIssueEntityData$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsZendeskSupportIssueEntityData$inboundSchema; + /** @deprecated use `IntegrationsZendeskSupportIssueEntityData$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsZendeskSupportIssueEntityData$outboundSchema; + /** @deprecated use `IntegrationsZendeskSupportIssueEntityData$Outbound` instead. */ + export type Outbound = IntegrationsZendeskSupportIssueEntityData$Outbound; +} + +export function integrationsZendeskSupportIssueEntityDataToJSON( + integrationsZendeskSupportIssueEntityData: + IntegrationsZendeskSupportIssueEntityData, +): string { + return JSON.stringify( + IntegrationsZendeskSupportIssueEntityData$outboundSchema.parse( + integrationsZendeskSupportIssueEntityData, + ), + ); +} + +export function integrationsZendeskSupportIssueEntityDataFromJSON( + jsonString: string, +): SafeParseResult< + IntegrationsZendeskSupportIssueEntityData, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + IntegrationsZendeskSupportIssueEntityData$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'IntegrationsZendeskSupportIssueEntityData' from JSON`, + ); +} + +/** @internal */ +export const IntegrationsZendeskSupportIssueEntity$inboundSchema: z.ZodType< + IntegrationsZendeskSupportIssueEntity, + z.ZodTypeDef, + unknown +> = z.object({ + remote_id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + remote_url: z.nullable(z.string()).optional(), + data: z.nullable( + z.lazy(() => IntegrationsZendeskSupportIssueEntityData$inboundSchema), + ).optional(), + attachments: z.nullable(z.string()).optional(), + customers: z.nullable( + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$inboundSchema, + ).optional(), + priority: z.nullable(z.string()).optional(), + attached_incidents: z.nullable(z.array(IncidentEntity$inboundSchema)) + .optional(), + type: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "remote_id": "remoteId", + "remote_url": "remoteUrl", + "attached_incidents": "attachedIncidents", + }); +}); + +/** @internal */ +export type IntegrationsZendeskSupportIssueEntity$Outbound = { + remote_id?: string | null | undefined; + title?: string | null | undefined; + description?: string | null | undefined; + remote_url?: string | null | undefined; + data?: IntegrationsZendeskSupportIssueEntityData$Outbound | null | undefined; + attachments?: string | null | undefined; + customers?: + | NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$Outbound + | null + | undefined; + priority?: string | null | undefined; + attached_incidents?: Array | null | undefined; + type?: string | null | undefined; +}; + +/** @internal */ +export const IntegrationsZendeskSupportIssueEntity$outboundSchema: z.ZodType< + IntegrationsZendeskSupportIssueEntity$Outbound, + z.ZodTypeDef, + IntegrationsZendeskSupportIssueEntity +> = z.object({ + remoteId: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + remoteUrl: z.nullable(z.string()).optional(), + data: z.nullable( + z.lazy(() => IntegrationsZendeskSupportIssueEntityData$outboundSchema), + ).optional(), + attachments: z.nullable(z.string()).optional(), + customers: z.nullable( + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$outboundSchema, + ).optional(), + priority: z.nullable(z.string()).optional(), + attachedIncidents: z.nullable(z.array(IncidentEntity$outboundSchema)) + .optional(), + type: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + remoteId: "remote_id", + remoteUrl: "remote_url", + attachedIncidents: "attached_incidents", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationsZendeskSupportIssueEntity$ { + /** @deprecated use `IntegrationsZendeskSupportIssueEntity$inboundSchema` instead. */ + export const inboundSchema = + IntegrationsZendeskSupportIssueEntity$inboundSchema; + /** @deprecated use `IntegrationsZendeskSupportIssueEntity$outboundSchema` instead. */ + export const outboundSchema = + IntegrationsZendeskSupportIssueEntity$outboundSchema; + /** @deprecated use `IntegrationsZendeskSupportIssueEntity$Outbound` instead. */ + export type Outbound = IntegrationsZendeskSupportIssueEntity$Outbound; +} + +export function integrationsZendeskSupportIssueEntityToJSON( + integrationsZendeskSupportIssueEntity: IntegrationsZendeskSupportIssueEntity, +): string { + return JSON.stringify( + IntegrationsZendeskSupportIssueEntity$outboundSchema.parse( + integrationsZendeskSupportIssueEntity, + ), + ); +} + +export function integrationsZendeskSupportIssueEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + IntegrationsZendeskSupportIssueEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'IntegrationsZendeskSupportIssueEntity' from JSON`, + ); +} diff --git a/src/models/components/lifecyclesmilestoneentity.ts b/src/models/components/lifecyclesmilestoneentity.ts index 85ba8124..6a6bb35e 100644 --- a/src/models/components/lifecyclesmilestoneentity.ts +++ b/src/models/components/lifecyclesmilestoneentity.ts @@ -8,22 +8,23 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; export type LifecyclesMilestoneEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - position?: number | undefined; - createdBy?: AuthorEntity | undefined; - updatedBy?: AuthorEntity | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + autoAssignTimestampOnCreate?: string | null | undefined; + position?: number | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; }; /** @internal */ @@ -32,19 +33,23 @@ export const LifecyclesMilestoneEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - position: z.number().int().optional(), - created_by: AuthorEntity$inboundSchema.optional(), - updated_by: AuthorEntity$inboundSchema.optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + auto_assign_timestamp_on_create: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { + "auto_assign_timestamp_on_create": "autoAssignTimestampOnCreate", "created_by": "createdBy", "updated_by": "updatedBy", "created_at": "createdAt", @@ -54,15 +59,16 @@ export const LifecyclesMilestoneEntity$inboundSchema: z.ZodType< /** @internal */ export type LifecyclesMilestoneEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - position?: number | undefined; - created_by?: AuthorEntity$Outbound | undefined; - updated_by?: AuthorEntity$Outbound | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + auto_assign_timestamp_on_create?: string | null | undefined; + position?: number | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; }; /** @internal */ @@ -71,17 +77,19 @@ export const LifecyclesMilestoneEntity$outboundSchema: z.ZodType< z.ZodTypeDef, LifecyclesMilestoneEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - position: z.number().int().optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - updatedBy: AuthorEntity$outboundSchema.optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + autoAssignTimestampOnCreate: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { + autoAssignTimestampOnCreate: "auto_assign_timestamp_on_create", createdBy: "created_by", updatedBy: "updated_by", createdAt: "created_at", diff --git a/src/models/components/lifecyclesphaseentity.ts b/src/models/components/lifecyclesphaseentity.ts index 8b36a434..e53b84f0 100644 --- a/src/models/components/lifecyclesphaseentity.ts +++ b/src/models/components/lifecyclesphaseentity.ts @@ -17,12 +17,12 @@ import { * Lifecycles_PhaseEntity model */ export type LifecyclesPhaseEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - type?: string | undefined; - position?: number | undefined; - milestones?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + position?: number | null | undefined; + milestones?: Array | null | undefined; }; /** @internal */ @@ -31,22 +31,23 @@ export const LifecyclesPhaseEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - position: z.number().int().optional(), - milestones: z.array(LifecyclesMilestoneEntity$inboundSchema).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + milestones: z.nullable(z.array(LifecyclesMilestoneEntity$inboundSchema)) + .optional(), }); /** @internal */ export type LifecyclesPhaseEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - type?: string | undefined; - position?: number | undefined; - milestones?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + position?: number | null | undefined; + milestones?: Array | null | undefined; }; /** @internal */ @@ -55,12 +56,13 @@ export const LifecyclesPhaseEntity$outboundSchema: z.ZodType< z.ZodTypeDef, LifecyclesPhaseEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - position: z.number().int().optional(), - milestones: z.array(LifecyclesMilestoneEntity$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + milestones: z.nullable(z.array(LifecyclesMilestoneEntity$outboundSchema)) + .optional(), }); /** diff --git a/src/models/components/lifecyclesphaseentitylist.ts b/src/models/components/lifecyclesphaseentitylist.ts index a76a15f9..37e0b1be 100644 --- a/src/models/components/lifecyclesphaseentitylist.ts +++ b/src/models/components/lifecyclesphaseentitylist.ts @@ -17,7 +17,7 @@ import { * Lifecycles_PhaseEntityList model */ export type LifecyclesPhaseEntityList = { - data?: Array | undefined; + data?: Array | null | undefined; }; /** @internal */ @@ -26,12 +26,12 @@ export const LifecyclesPhaseEntityList$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(LifecyclesPhaseEntity$inboundSchema).optional(), + data: z.nullable(z.array(LifecyclesPhaseEntity$inboundSchema)).optional(), }); /** @internal */ export type LifecyclesPhaseEntityList$Outbound = { - data?: Array | undefined; + data?: Array | null | undefined; }; /** @internal */ @@ -40,7 +40,7 @@ export const LifecyclesPhaseEntityList$outboundSchema: z.ZodType< z.ZodTypeDef, LifecyclesPhaseEntityList > = z.object({ - data: z.array(LifecyclesPhaseEntity$outboundSchema).optional(), + data: z.nullable(z.array(LifecyclesPhaseEntity$outboundSchema)).optional(), }); /** diff --git a/src/models/components/linksentity.ts b/src/models/components/linksentity.ts index 6f19505c..b0ef295c 100644 --- a/src/models/components/linksentity.ts +++ b/src/models/components/linksentity.ts @@ -9,10 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type LinksEntity = { - id?: string | undefined; - hrefUrl?: string | undefined; - iconUrl?: string | undefined; - name?: string | undefined; + id?: string | null | undefined; + hrefUrl?: string | null | undefined; + iconUrl?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -21,10 +21,10 @@ export const LinksEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - href_url: z.string().optional(), - icon_url: z.string().optional(), - name: z.string().optional(), + id: z.nullable(z.string()).optional(), + href_url: z.nullable(z.string()).optional(), + icon_url: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "href_url": "hrefUrl", @@ -34,10 +34,10 @@ export const LinksEntity$inboundSchema: z.ZodType< /** @internal */ export type LinksEntity$Outbound = { - id?: string | undefined; - href_url?: string | undefined; - icon_url?: string | undefined; - name?: string | undefined; + id?: string | null | undefined; + href_url?: string | null | undefined; + icon_url?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -46,10 +46,10 @@ export const LinksEntity$outboundSchema: z.ZodType< z.ZodTypeDef, LinksEntity > = z.object({ - id: z.string().optional(), - hrefUrl: z.string().optional(), - iconUrl: z.string().optional(), - name: z.string().optional(), + id: z.nullable(z.string()).optional(), + hrefUrl: z.nullable(z.string()).optional(), + iconUrl: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { hrefUrl: "href_url", diff --git a/src/models/components/mediaimageentity.ts b/src/models/components/mediaimageentity.ts deleted file mode 100644 index 51e4ef7b..00000000 --- a/src/models/components/mediaimageentity.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * An object with keys that can have different versions of an image - */ -export type VersionsUrls = {}; - -export type MediaImageEntity = { - originalUrl?: string | undefined; - /** - * An object with keys that can have different versions of an image - */ - versionsUrls?: VersionsUrls | undefined; -}; - -/** @internal */ -export const VersionsUrls$inboundSchema: z.ZodType< - VersionsUrls, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type VersionsUrls$Outbound = {}; - -/** @internal */ -export const VersionsUrls$outboundSchema: z.ZodType< - VersionsUrls$Outbound, - z.ZodTypeDef, - VersionsUrls -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VersionsUrls$ { - /** @deprecated use `VersionsUrls$inboundSchema` instead. */ - export const inboundSchema = VersionsUrls$inboundSchema; - /** @deprecated use `VersionsUrls$outboundSchema` instead. */ - export const outboundSchema = VersionsUrls$outboundSchema; - /** @deprecated use `VersionsUrls$Outbound` instead. */ - export type Outbound = VersionsUrls$Outbound; -} - -export function versionsUrlsToJSON(versionsUrls: VersionsUrls): string { - return JSON.stringify(VersionsUrls$outboundSchema.parse(versionsUrls)); -} - -export function versionsUrlsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => VersionsUrls$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'VersionsUrls' from JSON`, - ); -} - -/** @internal */ -export const MediaImageEntity$inboundSchema: z.ZodType< - MediaImageEntity, - z.ZodTypeDef, - unknown -> = z.object({ - original_url: z.string().optional(), - versions_urls: z.lazy(() => VersionsUrls$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "original_url": "originalUrl", - "versions_urls": "versionsUrls", - }); -}); - -/** @internal */ -export type MediaImageEntity$Outbound = { - original_url?: string | undefined; - versions_urls?: VersionsUrls$Outbound | undefined; -}; - -/** @internal */ -export const MediaImageEntity$outboundSchema: z.ZodType< - MediaImageEntity$Outbound, - z.ZodTypeDef, - MediaImageEntity -> = z.object({ - originalUrl: z.string().optional(), - versionsUrls: z.lazy(() => VersionsUrls$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - originalUrl: "original_url", - versionsUrls: "versions_urls", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MediaImageEntity$ { - /** @deprecated use `MediaImageEntity$inboundSchema` instead. */ - export const inboundSchema = MediaImageEntity$inboundSchema; - /** @deprecated use `MediaImageEntity$outboundSchema` instead. */ - export const outboundSchema = MediaImageEntity$outboundSchema; - /** @deprecated use `MediaImageEntity$Outbound` instead. */ - export type Outbound = MediaImageEntity$Outbound; -} - -export function mediaImageEntityToJSON( - mediaImageEntity: MediaImageEntity, -): string { - return JSON.stringify( - MediaImageEntity$outboundSchema.parse(mediaImageEntity), - ); -} - -export function mediaImageEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MediaImageEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MediaImageEntity' from JSON`, - ); -} diff --git a/src/models/components/membershipentity.ts b/src/models/components/membershipentity.ts index 5fd13c3c..37dd2eee 100644 --- a/src/models/components/membershipentity.ts +++ b/src/models/components/membershipentity.ts @@ -8,41 +8,35 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IncidentRoleEntity, - IncidentRoleEntity$inboundSchema, - IncidentRoleEntity$Outbound, - IncidentRoleEntity$outboundSchema, -} from "./incidentroleentity.js"; + NullableIncidentRoleEntity, + NullableIncidentRoleEntity$inboundSchema, + NullableIncidentRoleEntity$Outbound, + NullableIncidentRoleEntity$outboundSchema, +} from "./nullableincidentroleentity.js"; import { - ScheduleEntity, - ScheduleEntity$inboundSchema, - ScheduleEntity$Outbound, - ScheduleEntity$outboundSchema, -} from "./scheduleentity.js"; + NullableScheduleEntity, + NullableScheduleEntity$inboundSchema, + NullableScheduleEntity$Outbound, + NullableScheduleEntity$outboundSchema, +} from "./nullablescheduleentity.js"; import { - SuccinctEntity, - SuccinctEntity$inboundSchema, - SuccinctEntity$Outbound, - SuccinctEntity$outboundSchema, -} from "./succinctentity.js"; + NullableSuccinctEntity, + NullableSuccinctEntity$inboundSchema, + NullableSuccinctEntity$Outbound, + NullableSuccinctEntity$outboundSchema, +} from "./nullablesuccinctentity.js"; import { - UserEntity, - UserEntity$inboundSchema, - UserEntity$Outbound, - UserEntity$outboundSchema, -} from "./userentity.js"; + NullableUserEntity, + NullableUserEntity$inboundSchema, + NullableUserEntity$Outbound, + NullableUserEntity$outboundSchema, +} from "./nullableuserentity.js"; export type MembershipEntity = { - /** - * UserEntity model - */ - user?: UserEntity | undefined; - schedule?: ScheduleEntity | undefined; - signalsOnCallSchedule?: SuccinctEntity | undefined; - /** - * IncidentRoleEntity model - */ - defaultIncidentRole?: IncidentRoleEntity | undefined; + user?: NullableUserEntity | null | undefined; + schedule?: NullableScheduleEntity | null | undefined; + signalsOnCallSchedule?: NullableSuccinctEntity | null | undefined; + defaultIncidentRole?: NullableIncidentRoleEntity | null | undefined; }; /** @internal */ @@ -51,10 +45,12 @@ export const MembershipEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - user: UserEntity$inboundSchema.optional(), - schedule: ScheduleEntity$inboundSchema.optional(), - signals_on_call_schedule: SuccinctEntity$inboundSchema.optional(), - default_incident_role: IncidentRoleEntity$inboundSchema.optional(), + user: z.nullable(NullableUserEntity$inboundSchema).optional(), + schedule: z.nullable(NullableScheduleEntity$inboundSchema).optional(), + signals_on_call_schedule: z.nullable(NullableSuccinctEntity$inboundSchema) + .optional(), + default_incident_role: z.nullable(NullableIncidentRoleEntity$inboundSchema) + .optional(), }).transform((v) => { return remap$(v, { "signals_on_call_schedule": "signalsOnCallSchedule", @@ -64,10 +60,13 @@ export const MembershipEntity$inboundSchema: z.ZodType< /** @internal */ export type MembershipEntity$Outbound = { - user?: UserEntity$Outbound | undefined; - schedule?: ScheduleEntity$Outbound | undefined; - signals_on_call_schedule?: SuccinctEntity$Outbound | undefined; - default_incident_role?: IncidentRoleEntity$Outbound | undefined; + user?: NullableUserEntity$Outbound | null | undefined; + schedule?: NullableScheduleEntity$Outbound | null | undefined; + signals_on_call_schedule?: NullableSuccinctEntity$Outbound | null | undefined; + default_incident_role?: + | NullableIncidentRoleEntity$Outbound + | null + | undefined; }; /** @internal */ @@ -76,10 +75,12 @@ export const MembershipEntity$outboundSchema: z.ZodType< z.ZodTypeDef, MembershipEntity > = z.object({ - user: UserEntity$outboundSchema.optional(), - schedule: ScheduleEntity$outboundSchema.optional(), - signalsOnCallSchedule: SuccinctEntity$outboundSchema.optional(), - defaultIncidentRole: IncidentRoleEntity$outboundSchema.optional(), + user: z.nullable(NullableUserEntity$outboundSchema).optional(), + schedule: z.nullable(NullableScheduleEntity$outboundSchema).optional(), + signalsOnCallSchedule: z.nullable(NullableSuccinctEntity$outboundSchema) + .optional(), + defaultIncidentRole: z.nullable(NullableIncidentRoleEntity$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { signalsOnCallSchedule: "signals_on_call_schedule", diff --git a/src/models/components/metricsinfrastructurelistentity.ts b/src/models/components/metricsinfrastructurelistentity.ts index b4dd4bbd..47617338 100644 --- a/src/models/components/metricsinfrastructurelistentity.ts +++ b/src/models/components/metricsinfrastructurelistentity.ts @@ -20,7 +20,7 @@ export type MetricsInfrastructureListEntity = { /** * List of infrastructure metrics */ - data?: Array | undefined; + data?: Array | null | undefined; }; /** @internal */ @@ -29,12 +29,13 @@ export const MetricsInfrastructureListEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(MetricsInfrastructureMetricsEntity$inboundSchema).optional(), + data: z.nullable(z.array(MetricsInfrastructureMetricsEntity$inboundSchema)) + .optional(), }); /** @internal */ export type MetricsInfrastructureListEntity$Outbound = { - data?: Array | undefined; + data?: Array | null | undefined; }; /** @internal */ @@ -43,7 +44,8 @@ export const MetricsInfrastructureListEntity$outboundSchema: z.ZodType< z.ZodTypeDef, MetricsInfrastructureListEntity > = z.object({ - data: z.array(MetricsInfrastructureMetricsEntity$outboundSchema).optional(), + data: z.nullable(z.array(MetricsInfrastructureMetricsEntity$outboundSchema)) + .optional(), }); /** diff --git a/src/models/components/metricsinfrastructuremetricsentity.ts b/src/models/components/metricsinfrastructuremetricsentity.ts index e8805d79..01376ffa 100644 --- a/src/models/components/metricsinfrastructuremetricsentity.ts +++ b/src/models/components/metricsinfrastructuremetricsentity.ts @@ -15,35 +15,35 @@ export type MetricsInfrastructureMetricsEntity = { /** * The UUID of the component */ - id?: string | undefined; + id?: string | null | undefined; /** * The name of the component */ - name?: string | undefined; + name?: string | null | undefined; /** * Mean Time To Detection (seconds) for all incidents for this component in this time period */ - mttd?: number | undefined; + mttd?: number | null | undefined; /** * Mean Time To Acknowledgement (seconds) for all incidents for this component in this time period */ - mtta?: number | undefined; + mtta?: number | null | undefined; /** * Mean Time To Mitigation (seconds) for all incidents for this component in this time period */ - mttm?: number | undefined; + mttm?: number | null | undefined; /** * Mean Time To Resolution (seconds) for all incidents for this component in this time period */ - mttr?: number | undefined; + mttr?: number | null | undefined; /** * Number of incidents in this time period for this component */ - count?: number | undefined; + count?: number | null | undefined; /** * Total time (seconds) the component was impacted (MTTR x Incident Count) */ - totalTime?: number | undefined; + totalTime?: number | null | undefined; }; /** @internal */ @@ -52,14 +52,14 @@ export const MetricsInfrastructureMetricsEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - mttd: z.number().int().optional(), - mtta: z.number().int().optional(), - mttm: z.number().int().optional(), - mttr: z.number().int().optional(), - count: z.number().int().optional(), - total_time: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + mttd: z.nullable(z.number().int()).optional(), + mtta: z.nullable(z.number().int()).optional(), + mttm: z.nullable(z.number().int()).optional(), + mttr: z.nullable(z.number().int()).optional(), + count: z.nullable(z.number().int()).optional(), + total_time: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "total_time": "totalTime", @@ -68,14 +68,14 @@ export const MetricsInfrastructureMetricsEntity$inboundSchema: z.ZodType< /** @internal */ export type MetricsInfrastructureMetricsEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - mttd?: number | undefined; - mtta?: number | undefined; - mttm?: number | undefined; - mttr?: number | undefined; - count?: number | undefined; - total_time?: number | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + mttd?: number | null | undefined; + mtta?: number | null | undefined; + mttm?: number | null | undefined; + mttr?: number | null | undefined; + count?: number | null | undefined; + total_time?: number | null | undefined; }; /** @internal */ @@ -84,14 +84,14 @@ export const MetricsInfrastructureMetricsEntity$outboundSchema: z.ZodType< z.ZodTypeDef, MetricsInfrastructureMetricsEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - mttd: z.number().int().optional(), - mtta: z.number().int().optional(), - mttm: z.number().int().optional(), - mttr: z.number().int().optional(), - count: z.number().int().optional(), - totalTime: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + mttd: z.nullable(z.number().int()).optional(), + mtta: z.nullable(z.number().int()).optional(), + mttm: z.nullable(z.number().int()).optional(), + mttr: z.nullable(z.number().int()).optional(), + count: z.nullable(z.number().int()).optional(), + totalTime: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { totalTime: "total_time", diff --git a/src/models/components/metricsmetricsentity.ts b/src/models/components/metricsmetricsentity.ts index db8f72d0..1cf0513c 100644 --- a/src/models/components/metricsmetricsentity.ts +++ b/src/models/components/metricsmetricsentity.ts @@ -8,33 +8,33 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - MetricsMetricsEntitySortEntity, - MetricsMetricsEntitySortEntity$inboundSchema, - MetricsMetricsEntitySortEntity$Outbound, - MetricsMetricsEntitySortEntity$outboundSchema, -} from "./metricsmetricsentitysortentity.js"; + NullableMetricsMetricsEntitySortEntity, + NullableMetricsMetricsEntitySortEntity$inboundSchema, + NullableMetricsMetricsEntitySortEntity$Outbound, + NullableMetricsMetricsEntitySortEntity$outboundSchema, +} from "./nullablemetricsmetricsentitysortentity.js"; export type DisplayInformation = {}; -export type Buckets = {}; +export type Bucket = {}; /** * Metrics_MetricsEntity model */ export type MetricsMetricsEntity = { - type?: string | undefined; + type?: string | null | undefined; /** * The field by which the metrics are grouped. Can be one of: total, severity, priority, functionality, service, environment, or user. */ - by?: string | undefined; + by?: string | null | undefined; /** * The size of returned buckets. Can be one of: day, week, month, or all_time. */ - bucketSize?: number | undefined; - displayInformation?: DisplayInformation | undefined; - keys?: Array | undefined; - buckets?: Array | undefined; - sort?: MetricsMetricsEntitySortEntity | undefined; + bucketSize?: number | null | undefined; + displayInformation?: DisplayInformation | null | undefined; + keys?: Array | null | undefined; + buckets?: Array | null | undefined; + sort?: NullableMetricsMetricsEntitySortEntity | null | undefined; }; /** @internal */ @@ -86,43 +86,43 @@ export function displayInformationFromJSON( } /** @internal */ -export const Buckets$inboundSchema: z.ZodType = - z.object({}); +export const Bucket$inboundSchema: z.ZodType = z + .object({}); /** @internal */ -export type Buckets$Outbound = {}; +export type Bucket$Outbound = {}; /** @internal */ -export const Buckets$outboundSchema: z.ZodType< - Buckets$Outbound, +export const Bucket$outboundSchema: z.ZodType< + Bucket$Outbound, z.ZodTypeDef, - Buckets + Bucket > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Buckets$ { - /** @deprecated use `Buckets$inboundSchema` instead. */ - export const inboundSchema = Buckets$inboundSchema; - /** @deprecated use `Buckets$outboundSchema` instead. */ - export const outboundSchema = Buckets$outboundSchema; - /** @deprecated use `Buckets$Outbound` instead. */ - export type Outbound = Buckets$Outbound; +export namespace Bucket$ { + /** @deprecated use `Bucket$inboundSchema` instead. */ + export const inboundSchema = Bucket$inboundSchema; + /** @deprecated use `Bucket$outboundSchema` instead. */ + export const outboundSchema = Bucket$outboundSchema; + /** @deprecated use `Bucket$Outbound` instead. */ + export type Outbound = Bucket$Outbound; } -export function bucketsToJSON(buckets: Buckets): string { - return JSON.stringify(Buckets$outboundSchema.parse(buckets)); +export function bucketToJSON(bucket: Bucket): string { + return JSON.stringify(Bucket$outboundSchema.parse(bucket)); } -export function bucketsFromJSON( +export function bucketFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Buckets$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Buckets' from JSON`, + (x) => Bucket$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Bucket' from JSON`, ); } @@ -132,14 +132,16 @@ export const MetricsMetricsEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - type: z.string().optional(), - by: z.string().optional(), - bucket_size: z.number().int().optional(), - display_information: z.lazy(() => DisplayInformation$inboundSchema) + type: z.nullable(z.string()).optional(), + by: z.nullable(z.string()).optional(), + bucket_size: z.nullable(z.number().int()).optional(), + display_information: z.nullable( + z.lazy(() => DisplayInformation$inboundSchema), + ).optional(), + keys: z.nullable(z.array(z.string())).optional(), + buckets: z.nullable(z.array(z.lazy(() => Bucket$inboundSchema))).optional(), + sort: z.nullable(NullableMetricsMetricsEntitySortEntity$inboundSchema) .optional(), - keys: z.array(z.string()).optional(), - buckets: z.array(z.lazy(() => Buckets$inboundSchema)).optional(), - sort: MetricsMetricsEntitySortEntity$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "bucket_size": "bucketSize", @@ -149,13 +151,13 @@ export const MetricsMetricsEntity$inboundSchema: z.ZodType< /** @internal */ export type MetricsMetricsEntity$Outbound = { - type?: string | undefined; - by?: string | undefined; - bucket_size?: number | undefined; - display_information?: DisplayInformation$Outbound | undefined; - keys?: Array | undefined; - buckets?: Array | undefined; - sort?: MetricsMetricsEntitySortEntity$Outbound | undefined; + type?: string | null | undefined; + by?: string | null | undefined; + bucket_size?: number | null | undefined; + display_information?: DisplayInformation$Outbound | null | undefined; + keys?: Array | null | undefined; + buckets?: Array | null | undefined; + sort?: NullableMetricsMetricsEntitySortEntity$Outbound | null | undefined; }; /** @internal */ @@ -164,14 +166,16 @@ export const MetricsMetricsEntity$outboundSchema: z.ZodType< z.ZodTypeDef, MetricsMetricsEntity > = z.object({ - type: z.string().optional(), - by: z.string().optional(), - bucketSize: z.number().int().optional(), - displayInformation: z.lazy(() => DisplayInformation$outboundSchema) + type: z.nullable(z.string()).optional(), + by: z.nullable(z.string()).optional(), + bucketSize: z.nullable(z.number().int()).optional(), + displayInformation: z.nullable( + z.lazy(() => DisplayInformation$outboundSchema), + ).optional(), + keys: z.nullable(z.array(z.string())).optional(), + buckets: z.nullable(z.array(z.lazy(() => Bucket$outboundSchema))).optional(), + sort: z.nullable(NullableMetricsMetricsEntitySortEntity$outboundSchema) .optional(), - keys: z.array(z.string()).optional(), - buckets: z.array(z.lazy(() => Buckets$outboundSchema)).optional(), - sort: MetricsMetricsEntitySortEntity$outboundSchema.optional(), }).transform((v) => { return remap$(v, { bucketSize: "bucket_size", diff --git a/src/models/components/metricsmetricsentitysortentity.ts b/src/models/components/metricsmetricsentitysortentity.ts deleted file mode 100644 index 01f1ec5d..00000000 --- a/src/models/components/metricsmetricsentitysortentity.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type MetricsMetricsEntitySortEntity = { - field?: string | undefined; - direction?: string | undefined; - limit?: number | undefined; -}; - -/** @internal */ -export const MetricsMetricsEntitySortEntity$inboundSchema: z.ZodType< - MetricsMetricsEntitySortEntity, - z.ZodTypeDef, - unknown -> = z.object({ - field: z.string().optional(), - direction: z.string().optional(), - limit: z.number().int().optional(), -}); - -/** @internal */ -export type MetricsMetricsEntitySortEntity$Outbound = { - field?: string | undefined; - direction?: string | undefined; - limit?: number | undefined; -}; - -/** @internal */ -export const MetricsMetricsEntitySortEntity$outboundSchema: z.ZodType< - MetricsMetricsEntitySortEntity$Outbound, - z.ZodTypeDef, - MetricsMetricsEntitySortEntity -> = z.object({ - field: z.string().optional(), - direction: z.string().optional(), - limit: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MetricsMetricsEntitySortEntity$ { - /** @deprecated use `MetricsMetricsEntitySortEntity$inboundSchema` instead. */ - export const inboundSchema = MetricsMetricsEntitySortEntity$inboundSchema; - /** @deprecated use `MetricsMetricsEntitySortEntity$outboundSchema` instead. */ - export const outboundSchema = MetricsMetricsEntitySortEntity$outboundSchema; - /** @deprecated use `MetricsMetricsEntitySortEntity$Outbound` instead. */ - export type Outbound = MetricsMetricsEntitySortEntity$Outbound; -} - -export function metricsMetricsEntitySortEntityToJSON( - metricsMetricsEntitySortEntity: MetricsMetricsEntitySortEntity, -): string { - return JSON.stringify( - MetricsMetricsEntitySortEntity$outboundSchema.parse( - metricsMetricsEntitySortEntity, - ), - ); -} - -export function metricsMetricsEntitySortEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MetricsMetricsEntitySortEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MetricsMetricsEntitySortEntity' from JSON`, - ); -} diff --git a/src/models/components/metricsretrospectiveentity.ts b/src/models/components/metricsretrospectiveentity.ts index c2aadb37..b5d16337 100644 --- a/src/models/components/metricsretrospectiveentity.ts +++ b/src/models/components/metricsretrospectiveentity.ts @@ -13,18 +13,18 @@ import { MetricsRetrospectiveEntityDataEntity$outboundSchema, } from "./metricsretrospectiveentitydataentity.js"; import { - MetricsRetrospectiveEntitySummaryEntity, - MetricsRetrospectiveEntitySummaryEntity$inboundSchema, - MetricsRetrospectiveEntitySummaryEntity$Outbound, - MetricsRetrospectiveEntitySummaryEntity$outboundSchema, -} from "./metricsretrospectiveentitysummaryentity.js"; + NullableMetricsRetrospectiveEntitySummaryEntity, + NullableMetricsRetrospectiveEntitySummaryEntity$inboundSchema, + NullableMetricsRetrospectiveEntitySummaryEntity$Outbound, + NullableMetricsRetrospectiveEntitySummaryEntity$outboundSchema, +} from "./nullablemetricsretrospectiveentitysummaryentity.js"; /** * Metrics_RetrospectiveEntity model */ export type MetricsRetrospectiveEntity = { - data?: Array | undefined; - summary?: MetricsRetrospectiveEntitySummaryEntity | undefined; + data?: Array | null | undefined; + summary?: NullableMetricsRetrospectiveEntitySummaryEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,23 @@ export const MetricsRetrospectiveEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(MetricsRetrospectiveEntityDataEntity$inboundSchema).optional(), - summary: MetricsRetrospectiveEntitySummaryEntity$inboundSchema.optional(), + data: z.nullable(z.array(MetricsRetrospectiveEntityDataEntity$inboundSchema)) + .optional(), + summary: z.nullable( + NullableMetricsRetrospectiveEntitySummaryEntity$inboundSchema, + ).optional(), }); /** @internal */ export type MetricsRetrospectiveEntity$Outbound = { - data?: Array | undefined; - summary?: MetricsRetrospectiveEntitySummaryEntity$Outbound | undefined; + data?: + | Array + | null + | undefined; + summary?: + | NullableMetricsRetrospectiveEntitySummaryEntity$Outbound + | null + | undefined; }; /** @internal */ @@ -49,8 +58,11 @@ export const MetricsRetrospectiveEntity$outboundSchema: z.ZodType< z.ZodTypeDef, MetricsRetrospectiveEntity > = z.object({ - data: z.array(MetricsRetrospectiveEntityDataEntity$outboundSchema).optional(), - summary: MetricsRetrospectiveEntitySummaryEntity$outboundSchema.optional(), + data: z.nullable(z.array(MetricsRetrospectiveEntityDataEntity$outboundSchema)) + .optional(), + summary: z.nullable( + NullableMetricsRetrospectiveEntitySummaryEntity$outboundSchema, + ).optional(), }); /** diff --git a/src/models/components/metricsretrospectiveentitydataentity.ts b/src/models/components/metricsretrospectiveentitydataentity.ts index 5c068961..8e697fcf 100644 --- a/src/models/components/metricsretrospectiveentitydataentity.ts +++ b/src/models/components/metricsretrospectiveentitydataentity.ts @@ -8,8 +8,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type MetricsRetrospectiveEntityDataEntity = { - x?: string | undefined; - y?: number | undefined; + x?: string | null | undefined; + y?: number | null | undefined; }; /** @internal */ @@ -18,14 +18,14 @@ export const MetricsRetrospectiveEntityDataEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - x: z.string().optional(), - y: z.number().optional(), + x: z.nullable(z.string()).optional(), + y: z.nullable(z.number()).optional(), }); /** @internal */ export type MetricsRetrospectiveEntityDataEntity$Outbound = { - x?: string | undefined; - y?: number | undefined; + x?: string | null | undefined; + y?: number | null | undefined; }; /** @internal */ @@ -34,8 +34,8 @@ export const MetricsRetrospectiveEntityDataEntity$outboundSchema: z.ZodType< z.ZodTypeDef, MetricsRetrospectiveEntityDataEntity > = z.object({ - x: z.string().optional(), - y: z.number().optional(), + x: z.nullable(z.string()).optional(), + y: z.nullable(z.number()).optional(), }); /** diff --git a/src/models/components/metricsretrospectiveentitysummaryentity.ts b/src/models/components/metricsretrospectiveentitysummaryentity.ts deleted file mode 100644 index 24bb0e55..00000000 --- a/src/models/components/metricsretrospectiveentitysummaryentity.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type MetricsRetrospectiveEntitySummaryEntity = { - completed?: number | undefined; - total?: number | undefined; - incomplete?: number | undefined; - mean?: number | undefined; - shortest?: number | undefined; - longest?: number | undefined; - completionPercentage?: number | undefined; -}; - -/** @internal */ -export const MetricsRetrospectiveEntitySummaryEntity$inboundSchema: z.ZodType< - MetricsRetrospectiveEntitySummaryEntity, - z.ZodTypeDef, - unknown -> = z.object({ - completed: z.number().int().optional(), - total: z.number().int().optional(), - incomplete: z.number().int().optional(), - mean: z.number().optional(), - shortest: z.number().optional(), - longest: z.number().optional(), - completion_percentage: z.number().optional(), -}).transform((v) => { - return remap$(v, { - "completion_percentage": "completionPercentage", - }); -}); - -/** @internal */ -export type MetricsRetrospectiveEntitySummaryEntity$Outbound = { - completed?: number | undefined; - total?: number | undefined; - incomplete?: number | undefined; - mean?: number | undefined; - shortest?: number | undefined; - longest?: number | undefined; - completion_percentage?: number | undefined; -}; - -/** @internal */ -export const MetricsRetrospectiveEntitySummaryEntity$outboundSchema: z.ZodType< - MetricsRetrospectiveEntitySummaryEntity$Outbound, - z.ZodTypeDef, - MetricsRetrospectiveEntitySummaryEntity -> = z.object({ - completed: z.number().int().optional(), - total: z.number().int().optional(), - incomplete: z.number().int().optional(), - mean: z.number().optional(), - shortest: z.number().optional(), - longest: z.number().optional(), - completionPercentage: z.number().optional(), -}).transform((v) => { - return remap$(v, { - completionPercentage: "completion_percentage", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MetricsRetrospectiveEntitySummaryEntity$ { - /** @deprecated use `MetricsRetrospectiveEntitySummaryEntity$inboundSchema` instead. */ - export const inboundSchema = - MetricsRetrospectiveEntitySummaryEntity$inboundSchema; - /** @deprecated use `MetricsRetrospectiveEntitySummaryEntity$outboundSchema` instead. */ - export const outboundSchema = - MetricsRetrospectiveEntitySummaryEntity$outboundSchema; - /** @deprecated use `MetricsRetrospectiveEntitySummaryEntity$Outbound` instead. */ - export type Outbound = MetricsRetrospectiveEntitySummaryEntity$Outbound; -} - -export function metricsRetrospectiveEntitySummaryEntityToJSON( - metricsRetrospectiveEntitySummaryEntity: - MetricsRetrospectiveEntitySummaryEntity, -): string { - return JSON.stringify( - MetricsRetrospectiveEntitySummaryEntity$outboundSchema.parse( - metricsRetrospectiveEntitySummaryEntity, - ), - ); -} - -export function metricsRetrospectiveEntitySummaryEntityFromJSON( - jsonString: string, -): SafeParseResult< - MetricsRetrospectiveEntitySummaryEntity, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - MetricsRetrospectiveEntitySummaryEntity$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'MetricsRetrospectiveEntitySummaryEntity' from JSON`, - ); -} diff --git a/src/models/components/nullableactorentity.ts b/src/models/components/nullableactorentity.ts new file mode 100644 index 00000000..73ae0066 --- /dev/null +++ b/src/models/components/nullableactorentity.ts @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const NullableActorEntityType = { + FirehydrantUser: "firehydrant_user", + FirehydrantBot: "firehydrant_bot", + Alertmanager: "alertmanager", + Asana: "asana", + Aws: "aws", + Bugsnag: "bugsnag", + Checkly: "checkly", + CustomAlerts: "custom_alerts", + Datadog: "datadog", + Shortcut: "shortcut", + NewRelic: "new_relic", + Nunc: "nunc", + Github: "github", + Giphy: "giphy", + GoogleMeet: "google_meet", + GoogleCalendar: "google_calendar", + MicrosoftTeams: "microsoft_teams", + MicrosoftTeamsV2: "microsoft_teams_v2", + Webex: "webex", + JiraCloud: "jira_cloud", + JiraOnprem: "jira_onprem", + Opsgenie: "opsgenie", + PagerDuty: "pager_duty", + Honeycomb: "honeycomb", + Patchy: "patchy", + ServiceNow: "service_now", + Signals: "signals", + Slack: "slack", + Statuspage: "statuspage", + Victorops: "victorops", + Zendesk: "zendesk", + Zoom: "zoom", + ConfluenceCloud: "confluence_cloud", + GoogleDocs: "google_docs", + ZoomV2: "zoom_v2", + Linear: "linear", + Cortex: "cortex", +} as const; +export type NullableActorEntityType = ClosedEnum< + typeof NullableActorEntityType +>; + +export type NullableActorEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + email?: string | null | undefined; + type?: NullableActorEntityType | null | undefined; +}; + +/** @internal */ +export const NullableActorEntityType$inboundSchema: z.ZodNativeEnum< + typeof NullableActorEntityType +> = z.nativeEnum(NullableActorEntityType); + +/** @internal */ +export const NullableActorEntityType$outboundSchema: z.ZodNativeEnum< + typeof NullableActorEntityType +> = NullableActorEntityType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableActorEntityType$ { + /** @deprecated use `NullableActorEntityType$inboundSchema` instead. */ + export const inboundSchema = NullableActorEntityType$inboundSchema; + /** @deprecated use `NullableActorEntityType$outboundSchema` instead. */ + export const outboundSchema = NullableActorEntityType$outboundSchema; +} + +/** @internal */ +export const NullableActorEntity$inboundSchema: z.ZodType< + NullableActorEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + type: z.nullable(NullableActorEntityType$inboundSchema).optional(), +}); + +/** @internal */ +export type NullableActorEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + email?: string | null | undefined; + type?: string | null | undefined; +}; + +/** @internal */ +export const NullableActorEntity$outboundSchema: z.ZodType< + NullableActorEntity$Outbound, + z.ZodTypeDef, + NullableActorEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + type: z.nullable(NullableActorEntityType$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableActorEntity$ { + /** @deprecated use `NullableActorEntity$inboundSchema` instead. */ + export const inboundSchema = NullableActorEntity$inboundSchema; + /** @deprecated use `NullableActorEntity$outboundSchema` instead. */ + export const outboundSchema = NullableActorEntity$outboundSchema; + /** @deprecated use `NullableActorEntity$Outbound` instead. */ + export type Outbound = NullableActorEntity$Outbound; +} + +export function nullableActorEntityToJSON( + nullableActorEntity: NullableActorEntity, +): string { + return JSON.stringify( + NullableActorEntity$outboundSchema.parse(nullableActorEntity), + ); +} + +export function nullableActorEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableActorEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableActorEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablealertsalertentity.ts b/src/models/components/nullablealertsalertentity.ts new file mode 100644 index 00000000..84e47ca4 --- /dev/null +++ b/src/models/components/nullablealertsalertentity.ts @@ -0,0 +1,350 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AlertsSirenAlertEntity, + AlertsSirenAlertEntity$inboundSchema, + AlertsSirenAlertEntity$Outbound, + AlertsSirenAlertEntity$outboundSchema, +} from "./alertssirenalertentity.js"; +import { + AlertsSirenEventEntity, + AlertsSirenEventEntity$inboundSchema, + AlertsSirenEventEntity$Outbound, + AlertsSirenEventEntity$outboundSchema, +} from "./alertssirenevententity.js"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$inboundSchema, + ConversationsAPIEntitiesReference$Outbound, + ConversationsAPIEntitiesReference$outboundSchema, +} from "./conversationsapientitiesreference.js"; +import { + NullableSignalsAPIRuleEntity, + NullableSignalsAPIRuleEntity$inboundSchema, + NullableSignalsAPIRuleEntity$Outbound, + NullableSignalsAPIRuleEntity$outboundSchema, +} from "./nullablesignalsapiruleentity.js"; +import { + NullableSignalsAPITargetEntity, + NullableSignalsAPITargetEntity$inboundSchema, + NullableSignalsAPITargetEntity$Outbound, + NullableSignalsAPITargetEntity$outboundSchema, +} from "./nullablesignalsapitargetentity.js"; +import { + PublicApiv1IncidentsSuccinctEntity, + PublicApiv1IncidentsSuccinctEntity$inboundSchema, + PublicApiv1IncidentsSuccinctEntity$Outbound, + PublicApiv1IncidentsSuccinctEntity$outboundSchema, +} from "./publicapiv1incidentssuccinctentity.js"; +import { + SuccinctEntity, + SuccinctEntity$inboundSchema, + SuccinctEntity$Outbound, + SuccinctEntity$outboundSchema, +} from "./succinctentity.js"; + +/** + * Arbitrary key:value pairs of labels. + */ +export type NullableAlertsAlertEntityLabels = {}; + +/** + * Alerts_AlertEntity model + */ +export type NullableAlertsAlertEntity = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + priority?: string | null | undefined; + integrationName?: string | null | undefined; + startsAt?: Date | null | undefined; + endsAt?: Date | null | undefined; + durationMs?: number | null | undefined; + durationIso8601?: string | null | undefined; + status?: string | null | undefined; + remoteId?: string | null | undefined; + remoteUrl?: string | null | undefined; + /** + * Arbitrary key:value pairs of labels. + */ + labels?: NullableAlertsAlertEntityLabels | null | undefined; + environments?: Array | null | undefined; + services?: Array | null | undefined; + tags?: Array | null | undefined; + sourceIcon?: string | null | undefined; + signalId?: string | null | undefined; + signalRule?: NullableSignalsAPIRuleEntity | null | undefined; + signalTarget?: NullableSignalsAPITargetEntity | null | undefined; + teamName?: string | null | undefined; + teamId?: string | null | undefined; + position?: number | null | undefined; + incidents?: Array | null | undefined; + events?: Array | null | undefined; + isExpired?: boolean | null | undefined; + parentAlerts?: Array | null | undefined; + childAlerts?: Array | null | undefined; + conversations?: Array | null | undefined; +}; + +/** @internal */ +export const NullableAlertsAlertEntityLabels$inboundSchema: z.ZodType< + NullableAlertsAlertEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableAlertsAlertEntityLabels$Outbound = {}; + +/** @internal */ +export const NullableAlertsAlertEntityLabels$outboundSchema: z.ZodType< + NullableAlertsAlertEntityLabels$Outbound, + z.ZodTypeDef, + NullableAlertsAlertEntityLabels +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableAlertsAlertEntityLabels$ { + /** @deprecated use `NullableAlertsAlertEntityLabels$inboundSchema` instead. */ + export const inboundSchema = NullableAlertsAlertEntityLabels$inboundSchema; + /** @deprecated use `NullableAlertsAlertEntityLabels$outboundSchema` instead. */ + export const outboundSchema = NullableAlertsAlertEntityLabels$outboundSchema; + /** @deprecated use `NullableAlertsAlertEntityLabels$Outbound` instead. */ + export type Outbound = NullableAlertsAlertEntityLabels$Outbound; +} + +export function nullableAlertsAlertEntityLabelsToJSON( + nullableAlertsAlertEntityLabels: NullableAlertsAlertEntityLabels, +): string { + return JSON.stringify( + NullableAlertsAlertEntityLabels$outboundSchema.parse( + nullableAlertsAlertEntityLabels, + ), + ); +} + +export function nullableAlertsAlertEntityLabelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableAlertsAlertEntityLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableAlertsAlertEntityLabels' from JSON`, + ); +} + +/** @internal */ +export const NullableAlertsAlertEntity$inboundSchema: z.ZodType< + NullableAlertsAlertEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + integration_name: z.nullable(z.string()).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + duration_ms: z.nullable(z.number().int()).optional(), + duration_iso8601: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + remote_id: z.nullable(z.string()).optional(), + remote_url: z.nullable(z.string()).optional(), + labels: z.nullable( + z.lazy(() => NullableAlertsAlertEntityLabels$inboundSchema), + ).optional(), + environments: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + services: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + tags: z.nullable(z.array(z.string())).optional(), + source_icon: z.nullable(z.string()).optional(), + signal_id: z.nullable(z.string()).optional(), + signal_rule: z.nullable(NullableSignalsAPIRuleEntity$inboundSchema) + .optional(), + signal_target: z.nullable(NullableSignalsAPITargetEntity$inboundSchema) + .optional(), + team_name: z.nullable(z.string()).optional(), + team_id: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + incidents: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$inboundSchema), + ).optional(), + events: z.nullable(z.array(AlertsSirenEventEntity$inboundSchema)).optional(), + is_expired: z.nullable(z.boolean()).optional(), + parent_alerts: z.nullable(z.array(AlertsSirenAlertEntity$inboundSchema)) + .optional(), + child_alerts: z.nullable(z.array(AlertsSirenAlertEntity$inboundSchema)) + .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "integration_name": "integrationName", + "starts_at": "startsAt", + "ends_at": "endsAt", + "duration_ms": "durationMs", + "duration_iso8601": "durationIso8601", + "remote_id": "remoteId", + "remote_url": "remoteUrl", + "source_icon": "sourceIcon", + "signal_id": "signalId", + "signal_rule": "signalRule", + "signal_target": "signalTarget", + "team_name": "teamName", + "team_id": "teamId", + "is_expired": "isExpired", + "parent_alerts": "parentAlerts", + "child_alerts": "childAlerts", + }); +}); + +/** @internal */ +export type NullableAlertsAlertEntity$Outbound = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + priority?: string | null | undefined; + integration_name?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + duration_ms?: number | null | undefined; + duration_iso8601?: string | null | undefined; + status?: string | null | undefined; + remote_id?: string | null | undefined; + remote_url?: string | null | undefined; + labels?: NullableAlertsAlertEntityLabels$Outbound | null | undefined; + environments?: Array | null | undefined; + services?: Array | null | undefined; + tags?: Array | null | undefined; + source_icon?: string | null | undefined; + signal_id?: string | null | undefined; + signal_rule?: NullableSignalsAPIRuleEntity$Outbound | null | undefined; + signal_target?: NullableSignalsAPITargetEntity$Outbound | null | undefined; + team_name?: string | null | undefined; + team_id?: string | null | undefined; + position?: number | null | undefined; + incidents?: + | Array + | null + | undefined; + events?: Array | null | undefined; + is_expired?: boolean | null | undefined; + parent_alerts?: Array | null | undefined; + child_alerts?: Array | null | undefined; + conversations?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullableAlertsAlertEntity$outboundSchema: z.ZodType< + NullableAlertsAlertEntity$Outbound, + z.ZodTypeDef, + NullableAlertsAlertEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + integrationName: z.nullable(z.string()).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + durationMs: z.nullable(z.number().int()).optional(), + durationIso8601: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + remoteId: z.nullable(z.string()).optional(), + remoteUrl: z.nullable(z.string()).optional(), + labels: z.nullable( + z.lazy(() => NullableAlertsAlertEntityLabels$outboundSchema), + ).optional(), + environments: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + services: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + tags: z.nullable(z.array(z.string())).optional(), + sourceIcon: z.nullable(z.string()).optional(), + signalId: z.nullable(z.string()).optional(), + signalRule: z.nullable(NullableSignalsAPIRuleEntity$outboundSchema) + .optional(), + signalTarget: z.nullable(NullableSignalsAPITargetEntity$outboundSchema) + .optional(), + teamName: z.nullable(z.string()).optional(), + teamId: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + incidents: z.nullable( + z.array(PublicApiv1IncidentsSuccinctEntity$outboundSchema), + ).optional(), + events: z.nullable(z.array(AlertsSirenEventEntity$outboundSchema)).optional(), + isExpired: z.nullable(z.boolean()).optional(), + parentAlerts: z.nullable(z.array(AlertsSirenAlertEntity$outboundSchema)) + .optional(), + childAlerts: z.nullable(z.array(AlertsSirenAlertEntity$outboundSchema)) + .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + integrationName: "integration_name", + startsAt: "starts_at", + endsAt: "ends_at", + durationMs: "duration_ms", + durationIso8601: "duration_iso8601", + remoteId: "remote_id", + remoteUrl: "remote_url", + sourceIcon: "source_icon", + signalId: "signal_id", + signalRule: "signal_rule", + signalTarget: "signal_target", + teamName: "team_name", + teamId: "team_id", + isExpired: "is_expired", + parentAlerts: "parent_alerts", + childAlerts: "child_alerts", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableAlertsAlertEntity$ { + /** @deprecated use `NullableAlertsAlertEntity$inboundSchema` instead. */ + export const inboundSchema = NullableAlertsAlertEntity$inboundSchema; + /** @deprecated use `NullableAlertsAlertEntity$outboundSchema` instead. */ + export const outboundSchema = NullableAlertsAlertEntity$outboundSchema; + /** @deprecated use `NullableAlertsAlertEntity$Outbound` instead. */ + export type Outbound = NullableAlertsAlertEntity$Outbound; +} + +export function nullableAlertsAlertEntityToJSON( + nullableAlertsAlertEntity: NullableAlertsAlertEntity, +): string { + return JSON.stringify( + NullableAlertsAlertEntity$outboundSchema.parse(nullableAlertsAlertEntity), + ); +} + +export function nullableAlertsAlertEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableAlertsAlertEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableAlertsAlertEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableattachmentslinkentity.ts b/src/models/components/nullableattachmentslinkentity.ts new file mode 100644 index 00000000..5fd67cdd --- /dev/null +++ b/src/models/components/nullableattachmentslinkentity.ts @@ -0,0 +1,114 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Attachments_LinkEntity model + */ +export type NullableAttachmentsLinkEntity = { + id?: string | null | undefined; + type?: string | null | undefined; + displayText?: string | null | undefined; + hrefUrl?: string | null | undefined; + iconUrl?: string | null | undefined; + /** + * Link can be edited + */ + editable?: boolean | null | undefined; + /** + * Link can be deleted + */ + deletable?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableAttachmentsLinkEntity$inboundSchema: z.ZodType< + NullableAttachmentsLinkEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + display_text: z.nullable(z.string()).optional(), + href_url: z.nullable(z.string()).optional(), + icon_url: z.nullable(z.string()).optional(), + editable: z.nullable(z.boolean()).optional(), + deletable: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "display_text": "displayText", + "href_url": "hrefUrl", + "icon_url": "iconUrl", + }); +}); + +/** @internal */ +export type NullableAttachmentsLinkEntity$Outbound = { + id?: string | null | undefined; + type?: string | null | undefined; + display_text?: string | null | undefined; + href_url?: string | null | undefined; + icon_url?: string | null | undefined; + editable?: boolean | null | undefined; + deletable?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableAttachmentsLinkEntity$outboundSchema: z.ZodType< + NullableAttachmentsLinkEntity$Outbound, + z.ZodTypeDef, + NullableAttachmentsLinkEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + displayText: z.nullable(z.string()).optional(), + hrefUrl: z.nullable(z.string()).optional(), + iconUrl: z.nullable(z.string()).optional(), + editable: z.nullable(z.boolean()).optional(), + deletable: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + displayText: "display_text", + hrefUrl: "href_url", + iconUrl: "icon_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableAttachmentsLinkEntity$ { + /** @deprecated use `NullableAttachmentsLinkEntity$inboundSchema` instead. */ + export const inboundSchema = NullableAttachmentsLinkEntity$inboundSchema; + /** @deprecated use `NullableAttachmentsLinkEntity$outboundSchema` instead. */ + export const outboundSchema = NullableAttachmentsLinkEntity$outboundSchema; + /** @deprecated use `NullableAttachmentsLinkEntity$Outbound` instead. */ + export type Outbound = NullableAttachmentsLinkEntity$Outbound; +} + +export function nullableAttachmentsLinkEntityToJSON( + nullableAttachmentsLinkEntity: NullableAttachmentsLinkEntity, +): string { + return JSON.stringify( + NullableAttachmentsLinkEntity$outboundSchema.parse( + nullableAttachmentsLinkEntity, + ), + ); +} + +export function nullableAttachmentsLinkEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableAttachmentsLinkEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableAttachmentsLinkEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableauthorentity.ts b/src/models/components/nullableauthorentity.ts new file mode 100644 index 00000000..9f4b4632 --- /dev/null +++ b/src/models/components/nullableauthorentity.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableAuthorEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; +}; + +/** @internal */ +export const NullableAuthorEntity$inboundSchema: z.ZodType< + NullableAuthorEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NullableAuthorEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; +}; + +/** @internal */ +export const NullableAuthorEntity$outboundSchema: z.ZodType< + NullableAuthorEntity$Outbound, + z.ZodTypeDef, + NullableAuthorEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + source: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableAuthorEntity$ { + /** @deprecated use `NullableAuthorEntity$inboundSchema` instead. */ + export const inboundSchema = NullableAuthorEntity$inboundSchema; + /** @deprecated use `NullableAuthorEntity$outboundSchema` instead. */ + export const outboundSchema = NullableAuthorEntity$outboundSchema; + /** @deprecated use `NullableAuthorEntity$Outbound` instead. */ + export type Outbound = NullableAuthorEntity$Outbound; +} + +export function nullableAuthorEntityToJSON( + nullableAuthorEntity: NullableAuthorEntity, +): string { + return JSON.stringify( + NullableAuthorEntity$outboundSchema.parse(nullableAuthorEntity), + ); +} + +export function nullableAuthorEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableAuthorEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableAuthorEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablecalendarsevententity.ts b/src/models/components/nullablecalendarsevententity.ts new file mode 100644 index 00000000..4d8ba8d0 --- /dev/null +++ b/src/models/components/nullablecalendarsevententity.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableCalendarsEventEntity = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + startsAt?: string | null | undefined; + endsAt?: string | null | undefined; + createdAt?: string | null | undefined; + updatedAt?: string | null | undefined; + providerUrl?: string | null | undefined; + providerIconUrl?: string | null | undefined; +}; + +/** @internal */ +export const NullableCalendarsEventEntity$inboundSchema: z.ZodType< + NullableCalendarsEventEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + starts_at: z.nullable(z.string()).optional(), + ends_at: z.nullable(z.string()).optional(), + created_at: z.nullable(z.string()).optional(), + updated_at: z.nullable(z.string()).optional(), + provider_url: z.nullable(z.string()).optional(), + provider_icon_url: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "starts_at": "startsAt", + "ends_at": "endsAt", + "created_at": "createdAt", + "updated_at": "updatedAt", + "provider_url": "providerUrl", + "provider_icon_url": "providerIconUrl", + }); +}); + +/** @internal */ +export type NullableCalendarsEventEntity$Outbound = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + provider_url?: string | null | undefined; + provider_icon_url?: string | null | undefined; +}; + +/** @internal */ +export const NullableCalendarsEventEntity$outboundSchema: z.ZodType< + NullableCalendarsEventEntity$Outbound, + z.ZodTypeDef, + NullableCalendarsEventEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + startsAt: z.nullable(z.string()).optional(), + endsAt: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.string()).optional(), + updatedAt: z.nullable(z.string()).optional(), + providerUrl: z.nullable(z.string()).optional(), + providerIconUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + startsAt: "starts_at", + endsAt: "ends_at", + createdAt: "created_at", + updatedAt: "updated_at", + providerUrl: "provider_url", + providerIconUrl: "provider_icon_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableCalendarsEventEntity$ { + /** @deprecated use `NullableCalendarsEventEntity$inboundSchema` instead. */ + export const inboundSchema = NullableCalendarsEventEntity$inboundSchema; + /** @deprecated use `NullableCalendarsEventEntity$outboundSchema` instead. */ + export const outboundSchema = NullableCalendarsEventEntity$outboundSchema; + /** @deprecated use `NullableCalendarsEventEntity$Outbound` instead. */ + export type Outbound = NullableCalendarsEventEntity$Outbound; +} + +export function nullableCalendarsEventEntityToJSON( + nullableCalendarsEventEntity: NullableCalendarsEventEntity, +): string { + return JSON.stringify( + NullableCalendarsEventEntity$outboundSchema.parse( + nullableCalendarsEventEntity, + ), + ); +} + +export function nullableCalendarsEventEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableCalendarsEventEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableCalendarsEventEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablechangeevententity.ts b/src/models/components/nullablechangeevententity.ts new file mode 100644 index 00000000..82ae657f --- /dev/null +++ b/src/models/components/nullablechangeevententity.ts @@ -0,0 +1,325 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AuthorEntity, + AuthorEntity$inboundSchema, + AuthorEntity$Outbound, + AuthorEntity$outboundSchema, +} from "./authorentity.js"; +import { + ChangeEntity, + ChangeEntity$inboundSchema, + ChangeEntity$Outbound, + ChangeEntity$outboundSchema, +} from "./changeentity.js"; +import { + ChangeIdentityEntity, + ChangeIdentityEntity$inboundSchema, + ChangeIdentityEntity$Outbound, + ChangeIdentityEntity$outboundSchema, +} from "./changeidentityentity.js"; +import { + EnvironmentEntryEntity, + EnvironmentEntryEntity$inboundSchema, + EnvironmentEntryEntity$Outbound, + EnvironmentEntryEntity$outboundSchema, +} from "./environmententryentity.js"; +import { + ServiceEntityLite, + ServiceEntityLite$inboundSchema, + ServiceEntityLite$Outbound, + ServiceEntityLite$outboundSchema, +} from "./serviceentitylite.js"; + +export type NullableChangeEventEntityAttachment = {}; + +/** + * An object of label key and values + */ +export type NullableChangeEventEntityLabels = {}; + +/** + * ChangeEventEntity model + */ +export type NullableChangeEventEntity = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + externalId?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + startsAt?: Date | null | undefined; + endsAt?: Date | null | undefined; + durationMs?: number | null | undefined; + durationIso8601?: string | null | undefined; + environments?: Array | null | undefined; + relatedChanges?: Array | null | undefined; + identities?: Array | null | undefined; + authors?: Array | null | undefined; + /** + * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity + */ + attachments?: Array | null | undefined; + /** + * An object of label key and values + */ + labels?: NullableChangeEventEntityLabels | null | undefined; + services?: Array | null | undefined; +}; + +/** @internal */ +export const NullableChangeEventEntityAttachment$inboundSchema: z.ZodType< + NullableChangeEventEntityAttachment, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableChangeEventEntityAttachment$Outbound = {}; + +/** @internal */ +export const NullableChangeEventEntityAttachment$outboundSchema: z.ZodType< + NullableChangeEventEntityAttachment$Outbound, + z.ZodTypeDef, + NullableChangeEventEntityAttachment +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableChangeEventEntityAttachment$ { + /** @deprecated use `NullableChangeEventEntityAttachment$inboundSchema` instead. */ + export const inboundSchema = + NullableChangeEventEntityAttachment$inboundSchema; + /** @deprecated use `NullableChangeEventEntityAttachment$outboundSchema` instead. */ + export const outboundSchema = + NullableChangeEventEntityAttachment$outboundSchema; + /** @deprecated use `NullableChangeEventEntityAttachment$Outbound` instead. */ + export type Outbound = NullableChangeEventEntityAttachment$Outbound; +} + +export function nullableChangeEventEntityAttachmentToJSON( + nullableChangeEventEntityAttachment: NullableChangeEventEntityAttachment, +): string { + return JSON.stringify( + NullableChangeEventEntityAttachment$outboundSchema.parse( + nullableChangeEventEntityAttachment, + ), + ); +} + +export function nullableChangeEventEntityAttachmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableChangeEventEntityAttachment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableChangeEventEntityAttachment' from JSON`, + ); +} + +/** @internal */ +export const NullableChangeEventEntityLabels$inboundSchema: z.ZodType< + NullableChangeEventEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableChangeEventEntityLabels$Outbound = {}; + +/** @internal */ +export const NullableChangeEventEntityLabels$outboundSchema: z.ZodType< + NullableChangeEventEntityLabels$Outbound, + z.ZodTypeDef, + NullableChangeEventEntityLabels +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableChangeEventEntityLabels$ { + /** @deprecated use `NullableChangeEventEntityLabels$inboundSchema` instead. */ + export const inboundSchema = NullableChangeEventEntityLabels$inboundSchema; + /** @deprecated use `NullableChangeEventEntityLabels$outboundSchema` instead. */ + export const outboundSchema = NullableChangeEventEntityLabels$outboundSchema; + /** @deprecated use `NullableChangeEventEntityLabels$Outbound` instead. */ + export type Outbound = NullableChangeEventEntityLabels$Outbound; +} + +export function nullableChangeEventEntityLabelsToJSON( + nullableChangeEventEntityLabels: NullableChangeEventEntityLabels, +): string { + return JSON.stringify( + NullableChangeEventEntityLabels$outboundSchema.parse( + nullableChangeEventEntityLabels, + ), + ); +} + +export function nullableChangeEventEntityLabelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableChangeEventEntityLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableChangeEventEntityLabels' from JSON`, + ); +} + +/** @internal */ +export const NullableChangeEventEntity$inboundSchema: z.ZodType< + NullableChangeEventEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + duration_ms: z.nullable(z.number().int()).optional(), + duration_iso8601: z.nullable(z.string()).optional(), + environments: z.nullable(z.array(EnvironmentEntryEntity$inboundSchema)) + .optional(), + related_changes: z.nullable(z.array(ChangeEntity$inboundSchema)).optional(), + identities: z.nullable(z.array(ChangeIdentityEntity$inboundSchema)) + .optional(), + authors: z.nullable(z.array(AuthorEntity$inboundSchema)).optional(), + attachments: z.nullable( + z.array(z.lazy(() => NullableChangeEventEntityAttachment$inboundSchema)), + ).optional(), + labels: z.nullable( + z.lazy(() => NullableChangeEventEntityLabels$inboundSchema), + ).optional(), + services: z.nullable(z.array(ServiceEntityLite$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "external_id": "externalId", + "created_at": "createdAt", + "updated_at": "updatedAt", + "starts_at": "startsAt", + "ends_at": "endsAt", + "duration_ms": "durationMs", + "duration_iso8601": "durationIso8601", + "related_changes": "relatedChanges", + }); +}); + +/** @internal */ +export type NullableChangeEventEntity$Outbound = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + external_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + duration_ms?: number | null | undefined; + duration_iso8601?: string | null | undefined; + environments?: Array | null | undefined; + related_changes?: Array | null | undefined; + identities?: Array | null | undefined; + authors?: Array | null | undefined; + attachments?: + | Array + | null + | undefined; + labels?: NullableChangeEventEntityLabels$Outbound | null | undefined; + services?: Array | null | undefined; +}; + +/** @internal */ +export const NullableChangeEventEntity$outboundSchema: z.ZodType< + NullableChangeEventEntity$Outbound, + z.ZodTypeDef, + NullableChangeEventEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + durationMs: z.nullable(z.number().int()).optional(), + durationIso8601: z.nullable(z.string()).optional(), + environments: z.nullable(z.array(EnvironmentEntryEntity$outboundSchema)) + .optional(), + relatedChanges: z.nullable(z.array(ChangeEntity$outboundSchema)).optional(), + identities: z.nullable(z.array(ChangeIdentityEntity$outboundSchema)) + .optional(), + authors: z.nullable(z.array(AuthorEntity$outboundSchema)).optional(), + attachments: z.nullable( + z.array(z.lazy(() => NullableChangeEventEntityAttachment$outboundSchema)), + ).optional(), + labels: z.nullable( + z.lazy(() => NullableChangeEventEntityLabels$outboundSchema), + ).optional(), + services: z.nullable(z.array(ServiceEntityLite$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + externalId: "external_id", + createdAt: "created_at", + updatedAt: "updated_at", + startsAt: "starts_at", + endsAt: "ends_at", + durationMs: "duration_ms", + durationIso8601: "duration_iso8601", + relatedChanges: "related_changes", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableChangeEventEntity$ { + /** @deprecated use `NullableChangeEventEntity$inboundSchema` instead. */ + export const inboundSchema = NullableChangeEventEntity$inboundSchema; + /** @deprecated use `NullableChangeEventEntity$outboundSchema` instead. */ + export const outboundSchema = NullableChangeEventEntity$outboundSchema; + /** @deprecated use `NullableChangeEventEntity$Outbound` instead. */ + export type Outbound = NullableChangeEventEntity$Outbound; +} + +export function nullableChangeEventEntityToJSON( + nullableChangeEventEntity: NullableChangeEventEntity, +): string { + return JSON.stringify( + NullableChangeEventEntity$outboundSchema.parse(nullableChangeEventEntity), + ); +} + +export function nullableChangeEventEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableChangeEventEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableChangeEventEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableconversationsapientitieschannel.ts b/src/models/components/nullableconversationsapientitieschannel.ts new file mode 100644 index 00000000..87e3a46d --- /dev/null +++ b/src/models/components/nullableconversationsapientitieschannel.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableConversationsAPIEntitiesChannel = { + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableConversationsAPIEntitiesChannel$inboundSchema: z.ZodType< + NullableConversationsAPIEntitiesChannel, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NullableConversationsAPIEntitiesChannel$Outbound = { + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableConversationsAPIEntitiesChannel$outboundSchema: z.ZodType< + NullableConversationsAPIEntitiesChannel$Outbound, + z.ZodTypeDef, + NullableConversationsAPIEntitiesChannel +> = z.object({ + name: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableConversationsAPIEntitiesChannel$ { + /** @deprecated use `NullableConversationsAPIEntitiesChannel$inboundSchema` instead. */ + export const inboundSchema = + NullableConversationsAPIEntitiesChannel$inboundSchema; + /** @deprecated use `NullableConversationsAPIEntitiesChannel$outboundSchema` instead. */ + export const outboundSchema = + NullableConversationsAPIEntitiesChannel$outboundSchema; + /** @deprecated use `NullableConversationsAPIEntitiesChannel$Outbound` instead. */ + export type Outbound = NullableConversationsAPIEntitiesChannel$Outbound; +} + +export function nullableConversationsAPIEntitiesChannelToJSON( + nullableConversationsAPIEntitiesChannel: + NullableConversationsAPIEntitiesChannel, +): string { + return JSON.stringify( + NullableConversationsAPIEntitiesChannel$outboundSchema.parse( + nullableConversationsAPIEntitiesChannel, + ), + ); +} + +export function nullableConversationsAPIEntitiesChannelFromJSON( + jsonString: string, +): SafeParseResult< + NullableConversationsAPIEntitiesChannel, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableConversationsAPIEntitiesChannel$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableConversationsAPIEntitiesChannel' from JSON`, + ); +} diff --git a/src/models/components/nullableeventnoteentity.ts b/src/models/components/nullableeventnoteentity.ts new file mode 100644 index 00000000..b5eb8f2f --- /dev/null +++ b/src/models/components/nullableeventnoteentity.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$inboundSchema, + ConversationsAPIEntitiesReference$Outbound, + ConversationsAPIEntitiesReference$outboundSchema, +} from "./conversationsapientitiesreference.js"; +import { + IncidentsStatusPageEntity, + IncidentsStatusPageEntity$inboundSchema, + IncidentsStatusPageEntity$Outbound, + IncidentsStatusPageEntity$outboundSchema, +} from "./incidentsstatuspageentity.js"; + +/** + * Event_NoteEntity model + */ +export type NullableEventNoteEntity = { + id?: string | null | undefined; + body?: string | null | undefined; + createdAt?: Date | null | undefined; + statusPages?: Array | null | undefined; + conversations?: Array | null | undefined; +}; + +/** @internal */ +export const NullableEventNoteEntity$inboundSchema: z.ZodType< + NullableEventNoteEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + status_pages: z.nullable(z.array(IncidentsStatusPageEntity$inboundSchema)) + .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "status_pages": "statusPages", + }); +}); + +/** @internal */ +export type NullableEventNoteEntity$Outbound = { + id?: string | null | undefined; + body?: string | null | undefined; + created_at?: string | null | undefined; + status_pages?: Array | null | undefined; + conversations?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullableEventNoteEntity$outboundSchema: z.ZodType< + NullableEventNoteEntity$Outbound, + z.ZodTypeDef, + NullableEventNoteEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + statusPages: z.nullable(z.array(IncidentsStatusPageEntity$outboundSchema)) + .optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + statusPages: "status_pages", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableEventNoteEntity$ { + /** @deprecated use `NullableEventNoteEntity$inboundSchema` instead. */ + export const inboundSchema = NullableEventNoteEntity$inboundSchema; + /** @deprecated use `NullableEventNoteEntity$outboundSchema` instead. */ + export const outboundSchema = NullableEventNoteEntity$outboundSchema; + /** @deprecated use `NullableEventNoteEntity$Outbound` instead. */ + export type Outbound = NullableEventNoteEntity$Outbound; +} + +export function nullableEventNoteEntityToJSON( + nullableEventNoteEntity: NullableEventNoteEntity, +): string { + return JSON.stringify( + NullableEventNoteEntity$outboundSchema.parse(nullableEventNoteEntity), + ); +} + +export function nullableEventNoteEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableEventNoteEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableEventNoteEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableexternalresourceentity.ts b/src/models/components/nullableexternalresourceentity.ts new file mode 100644 index 00000000..9d1549bf --- /dev/null +++ b/src/models/components/nullableexternalresourceentity.ts @@ -0,0 +1,127 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableExternalResourceEntity = { + connectionType?: string | null | undefined; + connectionName?: string | null | undefined; + connectionFullFaviconUrl?: string | null | undefined; + connectionId?: string | null | undefined; + remoteId?: string | null | undefined; + remoteUrl?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableExternalResourceEntity$inboundSchema: z.ZodType< + NullableExternalResourceEntity, + z.ZodTypeDef, + unknown +> = z.object({ + connection_type: z.nullable(z.string()).optional(), + connection_name: z.nullable(z.string()).optional(), + connection_full_favicon_url: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + remote_id: z.nullable(z.string()).optional(), + remote_url: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + name: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "connection_type": "connectionType", + "connection_name": "connectionName", + "connection_full_favicon_url": "connectionFullFaviconUrl", + "connection_id": "connectionId", + "remote_id": "remoteId", + "remote_url": "remoteUrl", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +/** @internal */ +export type NullableExternalResourceEntity$Outbound = { + connection_type?: string | null | undefined; + connection_name?: string | null | undefined; + connection_full_favicon_url?: string | null | undefined; + connection_id?: string | null | undefined; + remote_id?: string | null | undefined; + remote_url?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableExternalResourceEntity$outboundSchema: z.ZodType< + NullableExternalResourceEntity$Outbound, + z.ZodTypeDef, + NullableExternalResourceEntity +> = z.object({ + connectionType: z.nullable(z.string()).optional(), + connectionName: z.nullable(z.string()).optional(), + connectionFullFaviconUrl: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + remoteId: z.nullable(z.string()).optional(), + remoteUrl: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + name: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + connectionType: "connection_type", + connectionName: "connection_name", + connectionFullFaviconUrl: "connection_full_favicon_url", + connectionId: "connection_id", + remoteId: "remote_id", + remoteUrl: "remote_url", + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableExternalResourceEntity$ { + /** @deprecated use `NullableExternalResourceEntity$inboundSchema` instead. */ + export const inboundSchema = NullableExternalResourceEntity$inboundSchema; + /** @deprecated use `NullableExternalResourceEntity$outboundSchema` instead. */ + export const outboundSchema = NullableExternalResourceEntity$outboundSchema; + /** @deprecated use `NullableExternalResourceEntity$Outbound` instead. */ + export type Outbound = NullableExternalResourceEntity$Outbound; +} + +export function nullableExternalResourceEntityToJSON( + nullableExternalResourceEntity: NullableExternalResourceEntity, +): string { + return JSON.stringify( + NullableExternalResourceEntity$outboundSchema.parse( + nullableExternalResourceEntity, + ), + ); +} + +export function nullableExternalResourceEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableExternalResourceEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableExternalResourceEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablefhtypesgenericentity.ts b/src/models/components/nullablefhtypesgenericentity.ts new file mode 100644 index 00000000..5c50882c --- /dev/null +++ b/src/models/components/nullablefhtypesgenericentity.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableFHTypesGenericEntity = { + type?: string | null | undefined; + value?: string | null | undefined; + label?: string | null | undefined; +}; + +/** @internal */ +export const NullableFHTypesGenericEntity$inboundSchema: z.ZodType< + NullableFHTypesGenericEntity, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NullableFHTypesGenericEntity$Outbound = { + type?: string | null | undefined; + value?: string | null | undefined; + label?: string | null | undefined; +}; + +/** @internal */ +export const NullableFHTypesGenericEntity$outboundSchema: z.ZodType< + NullableFHTypesGenericEntity$Outbound, + z.ZodTypeDef, + NullableFHTypesGenericEntity +> = z.object({ + type: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableFHTypesGenericEntity$ { + /** @deprecated use `NullableFHTypesGenericEntity$inboundSchema` instead. */ + export const inboundSchema = NullableFHTypesGenericEntity$inboundSchema; + /** @deprecated use `NullableFHTypesGenericEntity$outboundSchema` instead. */ + export const outboundSchema = NullableFHTypesGenericEntity$outboundSchema; + /** @deprecated use `NullableFHTypesGenericEntity$Outbound` instead. */ + export type Outbound = NullableFHTypesGenericEntity$Outbound; +} + +export function nullableFHTypesGenericEntityToJSON( + nullableFHTypesGenericEntity: NullableFHTypesGenericEntity, +): string { + return JSON.stringify( + NullableFHTypesGenericEntity$outboundSchema.parse( + nullableFHTypesGenericEntity, + ), + ); +} + +export function nullableFHTypesGenericEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableFHTypesGenericEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableFHTypesGenericEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableimportsimportableresourceentity.ts b/src/models/components/nullableimportsimportableresourceentity.ts new file mode 100644 index 00000000..08dd489a --- /dev/null +++ b/src/models/components/nullableimportsimportableresourceentity.ts @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ImportsImportErrorEntity, + ImportsImportErrorEntity$inboundSchema, + ImportsImportErrorEntity$Outbound, + ImportsImportErrorEntity$outboundSchema, +} from "./importsimporterrorentity.js"; + +export const NullableImportsImportableResourceEntityState = { + Selected: "selected", + Skipped: "skipped", + Imported: "imported", + Errored: "errored", +} as const; +export type NullableImportsImportableResourceEntityState = ClosedEnum< + typeof NullableImportsImportableResourceEntityState +>; + +export type NullableImportsImportableResourceEntity = { + importErrors?: Array | null | undefined; + importedAt?: Date | null | undefined; + remoteId?: string | null | undefined; + state?: NullableImportsImportableResourceEntityState | null | undefined; +}; + +/** @internal */ +export const NullableImportsImportableResourceEntityState$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(NullableImportsImportableResourceEntityState); + +/** @internal */ +export const NullableImportsImportableResourceEntityState$outboundSchema: + z.ZodNativeEnum = + NullableImportsImportableResourceEntityState$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableImportsImportableResourceEntityState$ { + /** @deprecated use `NullableImportsImportableResourceEntityState$inboundSchema` instead. */ + export const inboundSchema = + NullableImportsImportableResourceEntityState$inboundSchema; + /** @deprecated use `NullableImportsImportableResourceEntityState$outboundSchema` instead. */ + export const outboundSchema = + NullableImportsImportableResourceEntityState$outboundSchema; +} + +/** @internal */ +export const NullableImportsImportableResourceEntity$inboundSchema: z.ZodType< + NullableImportsImportableResourceEntity, + z.ZodTypeDef, + unknown +> = z.object({ + import_errors: z.nullable(z.array(ImportsImportErrorEntity$inboundSchema)) + .optional(), + imported_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + remote_id: z.nullable(z.string()).optional(), + state: z.nullable(NullableImportsImportableResourceEntityState$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "import_errors": "importErrors", + "imported_at": "importedAt", + "remote_id": "remoteId", + }); +}); + +/** @internal */ +export type NullableImportsImportableResourceEntity$Outbound = { + import_errors?: Array | null | undefined; + imported_at?: string | null | undefined; + remote_id?: string | null | undefined; + state?: string | null | undefined; +}; + +/** @internal */ +export const NullableImportsImportableResourceEntity$outboundSchema: z.ZodType< + NullableImportsImportableResourceEntity$Outbound, + z.ZodTypeDef, + NullableImportsImportableResourceEntity +> = z.object({ + importErrors: z.nullable(z.array(ImportsImportErrorEntity$outboundSchema)) + .optional(), + importedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + remoteId: z.nullable(z.string()).optional(), + state: z.nullable(NullableImportsImportableResourceEntityState$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + importErrors: "import_errors", + importedAt: "imported_at", + remoteId: "remote_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableImportsImportableResourceEntity$ { + /** @deprecated use `NullableImportsImportableResourceEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableImportsImportableResourceEntity$inboundSchema; + /** @deprecated use `NullableImportsImportableResourceEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableImportsImportableResourceEntity$outboundSchema; + /** @deprecated use `NullableImportsImportableResourceEntity$Outbound` instead. */ + export type Outbound = NullableImportsImportableResourceEntity$Outbound; +} + +export function nullableImportsImportableResourceEntityToJSON( + nullableImportsImportableResourceEntity: + NullableImportsImportableResourceEntity, +): string { + return JSON.stringify( + NullableImportsImportableResourceEntity$outboundSchema.parse( + nullableImportsImportableResourceEntity, + ), + ); +} + +export function nullableImportsImportableResourceEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableImportsImportableResourceEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableImportsImportableResourceEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableImportsImportableResourceEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableimportsimporterrorentityresourceentity.ts b/src/models/components/nullableimportsimporterrorentityresourceentity.ts new file mode 100644 index 00000000..dbc4d2aa --- /dev/null +++ b/src/models/components/nullableimportsimporterrorentityresourceentity.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableImportsImportErrorEntityResourceEntity = { + resourceId?: string | null | undefined; + resourceType?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableImportsImportErrorEntityResourceEntity$inboundSchema: + z.ZodType< + NullableImportsImportErrorEntityResourceEntity, + z.ZodTypeDef, + unknown + > = z.object({ + resource_id: z.nullable(z.string()).optional(), + resource_type: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + "resource_id": "resourceId", + "resource_type": "resourceType", + }); + }); + +/** @internal */ +export type NullableImportsImportErrorEntityResourceEntity$Outbound = { + resource_id?: string | null | undefined; + resource_type?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableImportsImportErrorEntityResourceEntity$outboundSchema: + z.ZodType< + NullableImportsImportErrorEntityResourceEntity$Outbound, + z.ZodTypeDef, + NullableImportsImportErrorEntityResourceEntity + > = z.object({ + resourceId: z.nullable(z.string()).optional(), + resourceType: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + resourceId: "resource_id", + resourceType: "resource_type", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableImportsImportErrorEntityResourceEntity$ { + /** @deprecated use `NullableImportsImportErrorEntityResourceEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableImportsImportErrorEntityResourceEntity$inboundSchema; + /** @deprecated use `NullableImportsImportErrorEntityResourceEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableImportsImportErrorEntityResourceEntity$outboundSchema; + /** @deprecated use `NullableImportsImportErrorEntityResourceEntity$Outbound` instead. */ + export type Outbound = + NullableImportsImportErrorEntityResourceEntity$Outbound; +} + +export function nullableImportsImportErrorEntityResourceEntityToJSON( + nullableImportsImportErrorEntityResourceEntity: + NullableImportsImportErrorEntityResourceEntity, +): string { + return JSON.stringify( + NullableImportsImportErrorEntityResourceEntity$outboundSchema.parse( + nullableImportsImportErrorEntityResourceEntity, + ), + ); +} + +export function nullableImportsImportErrorEntityResourceEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableImportsImportErrorEntityResourceEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableImportsImportErrorEntityResourceEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableImportsImportErrorEntityResourceEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableincidententity.ts b/src/models/components/nullableincidententity.ts new file mode 100644 index 00000000..547261cc --- /dev/null +++ b/src/models/components/nullableincidententity.ts @@ -0,0 +1,745 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$inboundSchema, + ConversationsAPIEntitiesReference$Outbound, + ConversationsAPIEntitiesReference$outboundSchema, +} from "./conversationsapientitiesreference.js"; +import { + CustomFieldsFieldValue, + CustomFieldsFieldValue$inboundSchema, + CustomFieldsFieldValue$Outbound, + CustomFieldsFieldValue$outboundSchema, +} from "./customfieldsfieldvalue.js"; +import { + IncidentEntityFieldRequirementEntity, + IncidentEntityFieldRequirementEntity$inboundSchema, + IncidentEntityFieldRequirementEntity$Outbound, + IncidentEntityFieldRequirementEntity$outboundSchema, +} from "./incidententityfieldrequiremententity.js"; +import { + IncidentsChannelEntity, + IncidentsChannelEntity$inboundSchema, + IncidentsChannelEntity$Outbound, + IncidentsChannelEntity$outboundSchema, +} from "./incidentschannelentity.js"; +import { + IncidentsConferenceBridgeEntity, + IncidentsConferenceBridgeEntity$inboundSchema, + IncidentsConferenceBridgeEntity$Outbound, + IncidentsConferenceBridgeEntity$outboundSchema, +} from "./incidentsconferencebridgeentity.js"; +import { + IncidentsImpactEntity, + IncidentsImpactEntity$inboundSchema, + IncidentsImpactEntity$Outbound, + IncidentsImpactEntity$outboundSchema, +} from "./incidentsimpactentity.js"; +import { + IncidentsLifecycleMeasurementEntity, + IncidentsLifecycleMeasurementEntity$inboundSchema, + IncidentsLifecycleMeasurementEntity$Outbound, + IncidentsLifecycleMeasurementEntity$outboundSchema, +} from "./incidentslifecyclemeasuremententity.js"; +import { + IncidentsLifecyclePhaseEntity, + IncidentsLifecyclePhaseEntity$inboundSchema, + IncidentsLifecyclePhaseEntity$Outbound, + IncidentsLifecyclePhaseEntity$outboundSchema, +} from "./incidentslifecyclephaseentity.js"; +import { + IncidentsMilestoneEntity, + IncidentsMilestoneEntity$inboundSchema, + IncidentsMilestoneEntity$Outbound, + IncidentsMilestoneEntity$outboundSchema, +} from "./incidentsmilestoneentity.js"; +import { + IncidentsRoleAssignmentEntity, + IncidentsRoleAssignmentEntity$inboundSchema, + IncidentsRoleAssignmentEntity$Outbound, + IncidentsRoleAssignmentEntity$outboundSchema, +} from "./incidentsroleassignmententity.js"; +import { + IncidentsStatusPageEntity, + IncidentsStatusPageEntity$inboundSchema, + IncidentsStatusPageEntity$Outbound, + IncidentsStatusPageEntity$outboundSchema, +} from "./incidentsstatuspageentity.js"; +import { + IncidentsTeamAssignmentEntityLite, + IncidentsTeamAssignmentEntityLite$inboundSchema, + IncidentsTeamAssignmentEntityLite$Outbound, + IncidentsTeamAssignmentEntityLite$outboundSchema, +} from "./incidentsteamassignmententitylite.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableEventNoteEntity, + NullableEventNoteEntity$inboundSchema, + NullableEventNoteEntity$Outbound, + NullableEventNoteEntity$outboundSchema, +} from "./nullableeventnoteentity.js"; +import { + NullableIncidentsContextObjectEntity, + NullableIncidentsContextObjectEntity$inboundSchema, + NullableIncidentsContextObjectEntity$Outbound, + NullableIncidentsContextObjectEntity$outboundSchema, +} from "./nullableincidentscontextobjectentity.js"; +import { + NullableOrganizationEntity, + NullableOrganizationEntity$inboundSchema, + NullableOrganizationEntity$Outbound, + NullableOrganizationEntity$outboundSchema, +} from "./nullableorganizationentity.js"; +import { + NullableSeverityMatrixConditionEntity, + NullableSeverityMatrixConditionEntity$inboundSchema, + NullableSeverityMatrixConditionEntity$Outbound, + NullableSeverityMatrixConditionEntity$outboundSchema, +} from "./nullableseveritymatrixconditionentity.js"; +import { + NullableSeverityMatrixImpactEntity, + NullableSeverityMatrixImpactEntity$inboundSchema, + NullableSeverityMatrixImpactEntity$Outbound, + NullableSeverityMatrixImpactEntity$outboundSchema, +} from "./nullableseveritymatriximpactentity.js"; +import { + NullableTicketingTicketEntity, + NullableTicketingTicketEntity$inboundSchema, + NullableTicketingTicketEntity$Outbound, + NullableTicketingTicketEntity$outboundSchema, +} from "./nullableticketingticketentity.js"; +import { + SuccinctEntity, + SuccinctEntity$inboundSchema, + SuccinctEntity$Outbound, + SuccinctEntity$outboundSchema, +} from "./succinctentity.js"; +import { + TicketingTicketEntity, + TicketingTicketEntity$inboundSchema, + TicketingTicketEntity$Outbound, + TicketingTicketEntity$outboundSchema, +} from "./ticketingticketentity.js"; + +/** + * A key/value of labels + */ +export type NullableIncidentEntityLabels = {}; + +export type NullableIncidentEntityRetroExport = {}; + +/** + * IncidentEntity model + */ +export type NullableIncidentEntity = { + /** + * UUID of the Incident + */ + id?: string | null | undefined; + /** + * Name of the incident + */ + name?: string | null | undefined; + /** + * The time the incident was opened + */ + createdAt?: Date | null | undefined; + /** + * The time the incident started + */ + startedAt?: Date | null | undefined; + /** + * The time the incident was archived + */ + discardedAt?: Date | null | undefined; + summary?: string | null | undefined; + customerImpactSummary?: string | null | undefined; + description?: string | null | undefined; + /** + * The type/slug of the current milestone. Will be one of the currently configured milestones for the given incident. + */ + currentMilestone?: string | null | undefined; + /** + * Incident number + */ + number?: number | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severityColor?: string | null | undefined; + severityImpact?: string | null | undefined; + severityCondition?: string | null | undefined; + tagList?: Array | null | undefined; + severityImpactObject?: NullableSeverityMatrixImpactEntity | null | undefined; + severityConditionObject?: + | NullableSeverityMatrixConditionEntity + | null + | undefined; + privateId?: string | null | undefined; + organizationId?: string | null | undefined; + /** + * DEPRECATED: Please use lifecycle phases instead + */ + milestones?: Array | null | undefined; + lifecyclePhases?: Array | null | undefined; + lifecycleMeasurements?: + | Array + | null + | undefined; + active?: boolean | null | undefined; + /** + * A key/value of labels + */ + labels?: NullableIncidentEntityLabels | null | undefined; + roleAssignments?: Array | null | undefined; + statusPages?: Array | null | undefined; + incidentUrl?: string | null | undefined; + privateStatusPageUrl?: string | null | undefined; + organization?: NullableOrganizationEntity | null | undefined; + customersImpacted?: number | null | undefined; + monetaryImpact?: number | null | undefined; + monetaryImpactCents?: number | null | undefined; + lastUpdate?: string | null | undefined; + lastNote?: NullableEventNoteEntity | null | undefined; + reportId?: string | null | undefined; + aiIncidentSummary?: string | null | undefined; + services?: Array | null | undefined; + environments?: Array | null | undefined; + functionalities?: Array | null | undefined; + channelName?: string | null | undefined; + channelReference?: string | null | undefined; + channelId?: string | null | undefined; + /** + * inoperative: 0, operational: 1, archived: 2 + */ + channelStatus?: string | null | undefined; + incidentTickets?: Array | null | undefined; + ticket?: NullableTicketingTicketEntity | null | undefined; + impacts?: Array | null | undefined; + conferenceBridges?: Array | null | undefined; + incidentChannels?: Array | null | undefined; + /** + * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity + */ + retroExports?: Array | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + contextObject?: NullableIncidentsContextObjectEntity | null | undefined; + teamAssignments?: Array | null | undefined; + conversations?: Array | null | undefined; + customFields?: Array | null | undefined; + fieldRequirements?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullableIncidentEntityLabels$inboundSchema: z.ZodType< + NullableIncidentEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableIncidentEntityLabels$Outbound = {}; + +/** @internal */ +export const NullableIncidentEntityLabels$outboundSchema: z.ZodType< + NullableIncidentEntityLabels$Outbound, + z.ZodTypeDef, + NullableIncidentEntityLabels +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentEntityLabels$ { + /** @deprecated use `NullableIncidentEntityLabels$inboundSchema` instead. */ + export const inboundSchema = NullableIncidentEntityLabels$inboundSchema; + /** @deprecated use `NullableIncidentEntityLabels$outboundSchema` instead. */ + export const outboundSchema = NullableIncidentEntityLabels$outboundSchema; + /** @deprecated use `NullableIncidentEntityLabels$Outbound` instead. */ + export type Outbound = NullableIncidentEntityLabels$Outbound; +} + +export function nullableIncidentEntityLabelsToJSON( + nullableIncidentEntityLabels: NullableIncidentEntityLabels, +): string { + return JSON.stringify( + NullableIncidentEntityLabels$outboundSchema.parse( + nullableIncidentEntityLabels, + ), + ); +} + +export function nullableIncidentEntityLabelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableIncidentEntityLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIncidentEntityLabels' from JSON`, + ); +} + +/** @internal */ +export const NullableIncidentEntityRetroExport$inboundSchema: z.ZodType< + NullableIncidentEntityRetroExport, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableIncidentEntityRetroExport$Outbound = {}; + +/** @internal */ +export const NullableIncidentEntityRetroExport$outboundSchema: z.ZodType< + NullableIncidentEntityRetroExport$Outbound, + z.ZodTypeDef, + NullableIncidentEntityRetroExport +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentEntityRetroExport$ { + /** @deprecated use `NullableIncidentEntityRetroExport$inboundSchema` instead. */ + export const inboundSchema = NullableIncidentEntityRetroExport$inboundSchema; + /** @deprecated use `NullableIncidentEntityRetroExport$outboundSchema` instead. */ + export const outboundSchema = + NullableIncidentEntityRetroExport$outboundSchema; + /** @deprecated use `NullableIncidentEntityRetroExport$Outbound` instead. */ + export type Outbound = NullableIncidentEntityRetroExport$Outbound; +} + +export function nullableIncidentEntityRetroExportToJSON( + nullableIncidentEntityRetroExport: NullableIncidentEntityRetroExport, +): string { + return JSON.stringify( + NullableIncidentEntityRetroExport$outboundSchema.parse( + nullableIncidentEntityRetroExport, + ), + ); +} + +export function nullableIncidentEntityRetroExportFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableIncidentEntityRetroExport$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIncidentEntityRetroExport' from JSON`, + ); +} + +/** @internal */ +export const NullableIncidentEntity$inboundSchema: z.ZodType< + NullableIncidentEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + started_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + discarded_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + summary: z.nullable(z.string()).optional(), + customer_impact_summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + current_milestone: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severity_color: z.nullable(z.string()).optional(), + severity_impact: z.nullable(z.string()).optional(), + severity_condition: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + severity_impact_object: z.nullable( + NullableSeverityMatrixImpactEntity$inboundSchema, + ).optional(), + severity_condition_object: z.nullable( + NullableSeverityMatrixConditionEntity$inboundSchema, + ).optional(), + private_id: z.nullable(z.string()).optional(), + organization_id: z.nullable(z.string()).optional(), + milestones: z.nullable(z.array(IncidentsMilestoneEntity$inboundSchema)) + .optional(), + lifecycle_phases: z.nullable( + z.array(IncidentsLifecyclePhaseEntity$inboundSchema), + ).optional(), + lifecycle_measurements: z.nullable( + z.array(IncidentsLifecycleMeasurementEntity$inboundSchema), + ).optional(), + active: z.nullable(z.boolean()).optional(), + labels: z.nullable(z.lazy(() => NullableIncidentEntityLabels$inboundSchema)) + .optional(), + role_assignments: z.nullable( + z.array(IncidentsRoleAssignmentEntity$inboundSchema), + ).optional(), + status_pages: z.nullable(z.array(IncidentsStatusPageEntity$inboundSchema)) + .optional(), + incident_url: z.nullable(z.string()).optional(), + private_status_page_url: z.nullable(z.string()).optional(), + organization: z.nullable(NullableOrganizationEntity$inboundSchema).optional(), + customers_impacted: z.nullable(z.number().int()).optional(), + monetary_impact: z.nullable(z.number().int()).optional(), + monetary_impact_cents: z.nullable(z.number().int()).optional(), + last_update: z.nullable(z.string()).optional(), + last_note: z.nullable(NullableEventNoteEntity$inboundSchema).optional(), + report_id: z.nullable(z.string()).optional(), + ai_incident_summary: z.nullable(z.string()).optional(), + services: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + environments: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + functionalities: z.nullable(z.array(SuccinctEntity$inboundSchema)).optional(), + channel_name: z.nullable(z.string()).optional(), + channel_reference: z.nullable(z.string()).optional(), + channel_id: z.nullable(z.string()).optional(), + channel_status: z.nullable(z.string()).optional(), + incident_tickets: z.nullable(z.array(TicketingTicketEntity$inboundSchema)) + .optional(), + ticket: z.nullable(NullableTicketingTicketEntity$inboundSchema).optional(), + impacts: z.nullable(z.array(IncidentsImpactEntity$inboundSchema)).optional(), + conference_bridges: z.nullable( + z.array(IncidentsConferenceBridgeEntity$inboundSchema), + ).optional(), + incident_channels: z.nullable(z.array(IncidentsChannelEntity$inboundSchema)) + .optional(), + retro_exports: z.nullable( + z.array(z.lazy(() => NullableIncidentEntityRetroExport$inboundSchema)), + ).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + context_object: z.nullable(NullableIncidentsContextObjectEntity$inboundSchema) + .optional(), + team_assignments: z.nullable( + z.array(IncidentsTeamAssignmentEntityLite$inboundSchema), + ).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), + custom_fields: z.nullable(z.array(CustomFieldsFieldValue$inboundSchema)) + .optional(), + field_requirements: z.nullable( + z.array(IncidentEntityFieldRequirementEntity$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "started_at": "startedAt", + "discarded_at": "discardedAt", + "customer_impact_summary": "customerImpactSummary", + "current_milestone": "currentMilestone", + "severity_color": "severityColor", + "severity_impact": "severityImpact", + "severity_condition": "severityCondition", + "tag_list": "tagList", + "severity_impact_object": "severityImpactObject", + "severity_condition_object": "severityConditionObject", + "private_id": "privateId", + "organization_id": "organizationId", + "lifecycle_phases": "lifecyclePhases", + "lifecycle_measurements": "lifecycleMeasurements", + "role_assignments": "roleAssignments", + "status_pages": "statusPages", + "incident_url": "incidentUrl", + "private_status_page_url": "privateStatusPageUrl", + "customers_impacted": "customersImpacted", + "monetary_impact": "monetaryImpact", + "monetary_impact_cents": "monetaryImpactCents", + "last_update": "lastUpdate", + "last_note": "lastNote", + "report_id": "reportId", + "ai_incident_summary": "aiIncidentSummary", + "channel_name": "channelName", + "channel_reference": "channelReference", + "channel_id": "channelId", + "channel_status": "channelStatus", + "incident_tickets": "incidentTickets", + "conference_bridges": "conferenceBridges", + "incident_channels": "incidentChannels", + "retro_exports": "retroExports", + "created_by": "createdBy", + "context_object": "contextObject", + "team_assignments": "teamAssignments", + "custom_fields": "customFields", + "field_requirements": "fieldRequirements", + }); +}); + +/** @internal */ +export type NullableIncidentEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + created_at?: string | null | undefined; + started_at?: string | null | undefined; + discarded_at?: string | null | undefined; + summary?: string | null | undefined; + customer_impact_summary?: string | null | undefined; + description?: string | null | undefined; + current_milestone?: string | null | undefined; + number?: number | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severity_color?: string | null | undefined; + severity_impact?: string | null | undefined; + severity_condition?: string | null | undefined; + tag_list?: Array | null | undefined; + severity_impact_object?: + | NullableSeverityMatrixImpactEntity$Outbound + | null + | undefined; + severity_condition_object?: + | NullableSeverityMatrixConditionEntity$Outbound + | null + | undefined; + private_id?: string | null | undefined; + organization_id?: string | null | undefined; + milestones?: Array | null | undefined; + lifecycle_phases?: + | Array + | null + | undefined; + lifecycle_measurements?: + | Array + | null + | undefined; + active?: boolean | null | undefined; + labels?: NullableIncidentEntityLabels$Outbound | null | undefined; + role_assignments?: + | Array + | null + | undefined; + status_pages?: Array | null | undefined; + incident_url?: string | null | undefined; + private_status_page_url?: string | null | undefined; + organization?: NullableOrganizationEntity$Outbound | null | undefined; + customers_impacted?: number | null | undefined; + monetary_impact?: number | null | undefined; + monetary_impact_cents?: number | null | undefined; + last_update?: string | null | undefined; + last_note?: NullableEventNoteEntity$Outbound | null | undefined; + report_id?: string | null | undefined; + ai_incident_summary?: string | null | undefined; + services?: Array | null | undefined; + environments?: Array | null | undefined; + functionalities?: Array | null | undefined; + channel_name?: string | null | undefined; + channel_reference?: string | null | undefined; + channel_id?: string | null | undefined; + channel_status?: string | null | undefined; + incident_tickets?: Array | null | undefined; + ticket?: NullableTicketingTicketEntity$Outbound | null | undefined; + impacts?: Array | null | undefined; + conference_bridges?: + | Array + | null + | undefined; + incident_channels?: Array | null | undefined; + retro_exports?: + | Array + | null + | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + context_object?: + | NullableIncidentsContextObjectEntity$Outbound + | null + | undefined; + team_assignments?: + | Array + | null + | undefined; + conversations?: + | Array + | null + | undefined; + custom_fields?: Array | null | undefined; + field_requirements?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullableIncidentEntity$outboundSchema: z.ZodType< + NullableIncidentEntity$Outbound, + z.ZodTypeDef, + NullableIncidentEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + startedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + discardedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + summary: z.nullable(z.string()).optional(), + customerImpactSummary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + currentMilestone: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severityColor: z.nullable(z.string()).optional(), + severityImpact: z.nullable(z.string()).optional(), + severityCondition: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + severityImpactObject: z.nullable( + NullableSeverityMatrixImpactEntity$outboundSchema, + ).optional(), + severityConditionObject: z.nullable( + NullableSeverityMatrixConditionEntity$outboundSchema, + ).optional(), + privateId: z.nullable(z.string()).optional(), + organizationId: z.nullable(z.string()).optional(), + milestones: z.nullable(z.array(IncidentsMilestoneEntity$outboundSchema)) + .optional(), + lifecyclePhases: z.nullable( + z.array(IncidentsLifecyclePhaseEntity$outboundSchema), + ).optional(), + lifecycleMeasurements: z.nullable( + z.array(IncidentsLifecycleMeasurementEntity$outboundSchema), + ).optional(), + active: z.nullable(z.boolean()).optional(), + labels: z.nullable(z.lazy(() => NullableIncidentEntityLabels$outboundSchema)) + .optional(), + roleAssignments: z.nullable( + z.array(IncidentsRoleAssignmentEntity$outboundSchema), + ).optional(), + statusPages: z.nullable(z.array(IncidentsStatusPageEntity$outboundSchema)) + .optional(), + incidentUrl: z.nullable(z.string()).optional(), + privateStatusPageUrl: z.nullable(z.string()).optional(), + organization: z.nullable(NullableOrganizationEntity$outboundSchema) + .optional(), + customersImpacted: z.nullable(z.number().int()).optional(), + monetaryImpact: z.nullable(z.number().int()).optional(), + monetaryImpactCents: z.nullable(z.number().int()).optional(), + lastUpdate: z.nullable(z.string()).optional(), + lastNote: z.nullable(NullableEventNoteEntity$outboundSchema).optional(), + reportId: z.nullable(z.string()).optional(), + aiIncidentSummary: z.nullable(z.string()).optional(), + services: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + environments: z.nullable(z.array(SuccinctEntity$outboundSchema)).optional(), + functionalities: z.nullable(z.array(SuccinctEntity$outboundSchema)) + .optional(), + channelName: z.nullable(z.string()).optional(), + channelReference: z.nullable(z.string()).optional(), + channelId: z.nullable(z.string()).optional(), + channelStatus: z.nullable(z.string()).optional(), + incidentTickets: z.nullable(z.array(TicketingTicketEntity$outboundSchema)) + .optional(), + ticket: z.nullable(NullableTicketingTicketEntity$outboundSchema).optional(), + impacts: z.nullable(z.array(IncidentsImpactEntity$outboundSchema)).optional(), + conferenceBridges: z.nullable( + z.array(IncidentsConferenceBridgeEntity$outboundSchema), + ).optional(), + incidentChannels: z.nullable(z.array(IncidentsChannelEntity$outboundSchema)) + .optional(), + retroExports: z.nullable( + z.array(z.lazy(() => NullableIncidentEntityRetroExport$outboundSchema)), + ).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + contextObject: z.nullable(NullableIncidentsContextObjectEntity$outboundSchema) + .optional(), + teamAssignments: z.nullable( + z.array(IncidentsTeamAssignmentEntityLite$outboundSchema), + ).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), + customFields: z.nullable(z.array(CustomFieldsFieldValue$outboundSchema)) + .optional(), + fieldRequirements: z.nullable( + z.array(IncidentEntityFieldRequirementEntity$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + startedAt: "started_at", + discardedAt: "discarded_at", + customerImpactSummary: "customer_impact_summary", + currentMilestone: "current_milestone", + severityColor: "severity_color", + severityImpact: "severity_impact", + severityCondition: "severity_condition", + tagList: "tag_list", + severityImpactObject: "severity_impact_object", + severityConditionObject: "severity_condition_object", + privateId: "private_id", + organizationId: "organization_id", + lifecyclePhases: "lifecycle_phases", + lifecycleMeasurements: "lifecycle_measurements", + roleAssignments: "role_assignments", + statusPages: "status_pages", + incidentUrl: "incident_url", + privateStatusPageUrl: "private_status_page_url", + customersImpacted: "customers_impacted", + monetaryImpact: "monetary_impact", + monetaryImpactCents: "monetary_impact_cents", + lastUpdate: "last_update", + lastNote: "last_note", + reportId: "report_id", + aiIncidentSummary: "ai_incident_summary", + channelName: "channel_name", + channelReference: "channel_reference", + channelId: "channel_id", + channelStatus: "channel_status", + incidentTickets: "incident_tickets", + conferenceBridges: "conference_bridges", + incidentChannels: "incident_channels", + retroExports: "retro_exports", + createdBy: "created_by", + contextObject: "context_object", + teamAssignments: "team_assignments", + customFields: "custom_fields", + fieldRequirements: "field_requirements", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentEntity$ { + /** @deprecated use `NullableIncidentEntity$inboundSchema` instead. */ + export const inboundSchema = NullableIncidentEntity$inboundSchema; + /** @deprecated use `NullableIncidentEntity$outboundSchema` instead. */ + export const outboundSchema = NullableIncidentEntity$outboundSchema; + /** @deprecated use `NullableIncidentEntity$Outbound` instead. */ + export type Outbound = NullableIncidentEntity$Outbound; +} + +export function nullableIncidentEntityToJSON( + nullableIncidentEntity: NullableIncidentEntity, +): string { + return JSON.stringify( + NullableIncidentEntity$outboundSchema.parse(nullableIncidentEntity), + ); +} + +export function nullableIncidentEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableIncidentEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIncidentEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableincidentroleentity.ts b/src/models/components/nullableincidentroleentity.ts new file mode 100644 index 00000000..3d9a7712 --- /dev/null +++ b/src/models/components/nullableincidentroleentity.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * IncidentRoleEntity model + */ +export type NullableIncidentRoleEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + discardedAt?: Date | null | undefined; +}; + +/** @internal */ +export const NullableIncidentRoleEntity$inboundSchema: z.ZodType< + NullableIncidentRoleEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + discarded_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "updated_at": "updatedAt", + "discarded_at": "discardedAt", + }); +}); + +/** @internal */ +export type NullableIncidentRoleEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + discarded_at?: string | null | undefined; +}; + +/** @internal */ +export const NullableIncidentRoleEntity$outboundSchema: z.ZodType< + NullableIncidentRoleEntity$Outbound, + z.ZodTypeDef, + NullableIncidentRoleEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + discardedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + updatedAt: "updated_at", + discardedAt: "discarded_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentRoleEntity$ { + /** @deprecated use `NullableIncidentRoleEntity$inboundSchema` instead. */ + export const inboundSchema = NullableIncidentRoleEntity$inboundSchema; + /** @deprecated use `NullableIncidentRoleEntity$outboundSchema` instead. */ + export const outboundSchema = NullableIncidentRoleEntity$outboundSchema; + /** @deprecated use `NullableIncidentRoleEntity$Outbound` instead. */ + export type Outbound = NullableIncidentRoleEntity$Outbound; +} + +export function nullableIncidentRoleEntityToJSON( + nullableIncidentRoleEntity: NullableIncidentRoleEntity, +): string { + return JSON.stringify( + NullableIncidentRoleEntity$outboundSchema.parse(nullableIncidentRoleEntity), + ); +} + +export function nullableIncidentRoleEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableIncidentRoleEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIncidentRoleEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableincidentsconferencebridgeentity.ts b/src/models/components/nullableincidentsconferencebridgeentity.ts new file mode 100644 index 00000000..273d1783 --- /dev/null +++ b/src/models/components/nullableincidentsconferencebridgeentity.ts @@ -0,0 +1,199 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableIncidentsConferenceBridgeEntityAttachment = {}; + +/** + * Incidents_ConferenceBridgeEntity model + */ +export type NullableIncidentsConferenceBridgeEntity = { + id?: string | null | undefined; + /** + * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity + */ + attachments?: + | Array + | null + | undefined; + hasTranslatedTranscripts?: boolean | null | undefined; + /** + * A list of language codes that have translated transcripts for this conference bridge + */ + languageCodes?: Array | null | undefined; + transcriptionStatus?: string | null | undefined; + transcriptionSubCode?: string | null | undefined; +}; + +/** @internal */ +export const NullableIncidentsConferenceBridgeEntityAttachment$inboundSchema: + z.ZodType< + NullableIncidentsConferenceBridgeEntityAttachment, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type NullableIncidentsConferenceBridgeEntityAttachment$Outbound = {}; + +/** @internal */ +export const NullableIncidentsConferenceBridgeEntityAttachment$outboundSchema: + z.ZodType< + NullableIncidentsConferenceBridgeEntityAttachment$Outbound, + z.ZodTypeDef, + NullableIncidentsConferenceBridgeEntityAttachment + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentsConferenceBridgeEntityAttachment$ { + /** @deprecated use `NullableIncidentsConferenceBridgeEntityAttachment$inboundSchema` instead. */ + export const inboundSchema = + NullableIncidentsConferenceBridgeEntityAttachment$inboundSchema; + /** @deprecated use `NullableIncidentsConferenceBridgeEntityAttachment$outboundSchema` instead. */ + export const outboundSchema = + NullableIncidentsConferenceBridgeEntityAttachment$outboundSchema; + /** @deprecated use `NullableIncidentsConferenceBridgeEntityAttachment$Outbound` instead. */ + export type Outbound = + NullableIncidentsConferenceBridgeEntityAttachment$Outbound; +} + +export function nullableIncidentsConferenceBridgeEntityAttachmentToJSON( + nullableIncidentsConferenceBridgeEntityAttachment: + NullableIncidentsConferenceBridgeEntityAttachment, +): string { + return JSON.stringify( + NullableIncidentsConferenceBridgeEntityAttachment$outboundSchema.parse( + nullableIncidentsConferenceBridgeEntityAttachment, + ), + ); +} + +export function nullableIncidentsConferenceBridgeEntityAttachmentFromJSON( + jsonString: string, +): SafeParseResult< + NullableIncidentsConferenceBridgeEntityAttachment, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIncidentsConferenceBridgeEntityAttachment$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIncidentsConferenceBridgeEntityAttachment' from JSON`, + ); +} + +/** @internal */ +export const NullableIncidentsConferenceBridgeEntity$inboundSchema: z.ZodType< + NullableIncidentsConferenceBridgeEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + attachments: z.nullable( + z.array(z.lazy(() => + NullableIncidentsConferenceBridgeEntityAttachment$inboundSchema + )), + ).optional(), + has_translated_transcripts: z.nullable(z.boolean()).optional(), + language_codes: z.nullable(z.array(z.string())).optional(), + transcription_status: z.nullable(z.string()).optional(), + transcription_sub_code: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "has_translated_transcripts": "hasTranslatedTranscripts", + "language_codes": "languageCodes", + "transcription_status": "transcriptionStatus", + "transcription_sub_code": "transcriptionSubCode", + }); +}); + +/** @internal */ +export type NullableIncidentsConferenceBridgeEntity$Outbound = { + id?: string | null | undefined; + attachments?: + | Array + | null + | undefined; + has_translated_transcripts?: boolean | null | undefined; + language_codes?: Array | null | undefined; + transcription_status?: string | null | undefined; + transcription_sub_code?: string | null | undefined; +}; + +/** @internal */ +export const NullableIncidentsConferenceBridgeEntity$outboundSchema: z.ZodType< + NullableIncidentsConferenceBridgeEntity$Outbound, + z.ZodTypeDef, + NullableIncidentsConferenceBridgeEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + attachments: z.nullable( + z.array(z.lazy(() => + NullableIncidentsConferenceBridgeEntityAttachment$outboundSchema + )), + ).optional(), + hasTranslatedTranscripts: z.nullable(z.boolean()).optional(), + languageCodes: z.nullable(z.array(z.string())).optional(), + transcriptionStatus: z.nullable(z.string()).optional(), + transcriptionSubCode: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + hasTranslatedTranscripts: "has_translated_transcripts", + languageCodes: "language_codes", + transcriptionStatus: "transcription_status", + transcriptionSubCode: "transcription_sub_code", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentsConferenceBridgeEntity$ { + /** @deprecated use `NullableIncidentsConferenceBridgeEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIncidentsConferenceBridgeEntity$inboundSchema; + /** @deprecated use `NullableIncidentsConferenceBridgeEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIncidentsConferenceBridgeEntity$outboundSchema; + /** @deprecated use `NullableIncidentsConferenceBridgeEntity$Outbound` instead. */ + export type Outbound = NullableIncidentsConferenceBridgeEntity$Outbound; +} + +export function nullableIncidentsConferenceBridgeEntityToJSON( + nullableIncidentsConferenceBridgeEntity: + NullableIncidentsConferenceBridgeEntity, +): string { + return JSON.stringify( + NullableIncidentsConferenceBridgeEntity$outboundSchema.parse( + nullableIncidentsConferenceBridgeEntity, + ), + ); +} + +export function nullableIncidentsConferenceBridgeEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIncidentsConferenceBridgeEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIncidentsConferenceBridgeEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIncidentsConferenceBridgeEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableincidentscontextobjectentity.ts b/src/models/components/nullableincidentscontextobjectentity.ts new file mode 100644 index 00000000..02b9d45f --- /dev/null +++ b/src/models/components/nullableincidentscontextobjectentity.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableIncidentsContextObjectEntity = { + objectType?: string | null | undefined; + objectId?: string | null | undefined; + contextTag?: string | null | undefined; + contextDescription?: string | null | undefined; +}; + +/** @internal */ +export const NullableIncidentsContextObjectEntity$inboundSchema: z.ZodType< + NullableIncidentsContextObjectEntity, + z.ZodTypeDef, + unknown +> = z.object({ + object_type: z.nullable(z.string()).optional(), + object_id: z.nullable(z.string()).optional(), + context_tag: z.nullable(z.string()).optional(), + context_description: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "object_type": "objectType", + "object_id": "objectId", + "context_tag": "contextTag", + "context_description": "contextDescription", + }); +}); + +/** @internal */ +export type NullableIncidentsContextObjectEntity$Outbound = { + object_type?: string | null | undefined; + object_id?: string | null | undefined; + context_tag?: string | null | undefined; + context_description?: string | null | undefined; +}; + +/** @internal */ +export const NullableIncidentsContextObjectEntity$outboundSchema: z.ZodType< + NullableIncidentsContextObjectEntity$Outbound, + z.ZodTypeDef, + NullableIncidentsContextObjectEntity +> = z.object({ + objectType: z.nullable(z.string()).optional(), + objectId: z.nullable(z.string()).optional(), + contextTag: z.nullable(z.string()).optional(), + contextDescription: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + objectType: "object_type", + objectId: "object_id", + contextTag: "context_tag", + contextDescription: "context_description", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentsContextObjectEntity$ { + /** @deprecated use `NullableIncidentsContextObjectEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIncidentsContextObjectEntity$inboundSchema; + /** @deprecated use `NullableIncidentsContextObjectEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIncidentsContextObjectEntity$outboundSchema; + /** @deprecated use `NullableIncidentsContextObjectEntity$Outbound` instead. */ + export type Outbound = NullableIncidentsContextObjectEntity$Outbound; +} + +export function nullableIncidentsContextObjectEntityToJSON( + nullableIncidentsContextObjectEntity: NullableIncidentsContextObjectEntity, +): string { + return JSON.stringify( + NullableIncidentsContextObjectEntity$outboundSchema.parse( + nullableIncidentsContextObjectEntity, + ), + ); +} + +export function nullableIncidentsContextObjectEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableIncidentsContextObjectEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIncidentsContextObjectEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableincidenttypeentitytemplateentity.ts b/src/models/components/nullableincidenttypeentitytemplateentity.ts new file mode 100644 index 00000000..1a8f5f17 --- /dev/null +++ b/src/models/components/nullableincidenttypeentitytemplateentity.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IncidentTypeEntityTemplateImpactEntity, + IncidentTypeEntityTemplateImpactEntity$inboundSchema, + IncidentTypeEntityTemplateImpactEntity$Outbound, + IncidentTypeEntityTemplateImpactEntity$outboundSchema, +} from "./incidenttypeentitytemplateimpactentity.js"; + +/** + * Arbitrary key:value pairs of labels for your incidents. + */ +export type NullableIncidentTypeEntityTemplateEntityLabels = {}; + +export type NullableIncidentTypeEntityTemplateEntity = { + incidentName?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + customerImpactSummary?: string | null | undefined; + /** + * Arbitrary key:value pairs of labels for your incidents. + */ + labels?: NullableIncidentTypeEntityTemplateEntityLabels | null | undefined; + severity?: string | null | undefined; + priority?: string | null | undefined; + tagList?: Array | null | undefined; + runbookIds?: Array | null | undefined; + teamIds?: Array | null | undefined; + privateIncident?: boolean | null | undefined; + customFields?: string | null | undefined; + impacts?: Array | null | undefined; +}; + +/** @internal */ +export const NullableIncidentTypeEntityTemplateEntityLabels$inboundSchema: + z.ZodType< + NullableIncidentTypeEntityTemplateEntityLabels, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type NullableIncidentTypeEntityTemplateEntityLabels$Outbound = {}; + +/** @internal */ +export const NullableIncidentTypeEntityTemplateEntityLabels$outboundSchema: + z.ZodType< + NullableIncidentTypeEntityTemplateEntityLabels$Outbound, + z.ZodTypeDef, + NullableIncidentTypeEntityTemplateEntityLabels + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentTypeEntityTemplateEntityLabels$ { + /** @deprecated use `NullableIncidentTypeEntityTemplateEntityLabels$inboundSchema` instead. */ + export const inboundSchema = + NullableIncidentTypeEntityTemplateEntityLabels$inboundSchema; + /** @deprecated use `NullableIncidentTypeEntityTemplateEntityLabels$outboundSchema` instead. */ + export const outboundSchema = + NullableIncidentTypeEntityTemplateEntityLabels$outboundSchema; + /** @deprecated use `NullableIncidentTypeEntityTemplateEntityLabels$Outbound` instead. */ + export type Outbound = + NullableIncidentTypeEntityTemplateEntityLabels$Outbound; +} + +export function nullableIncidentTypeEntityTemplateEntityLabelsToJSON( + nullableIncidentTypeEntityTemplateEntityLabels: + NullableIncidentTypeEntityTemplateEntityLabels, +): string { + return JSON.stringify( + NullableIncidentTypeEntityTemplateEntityLabels$outboundSchema.parse( + nullableIncidentTypeEntityTemplateEntityLabels, + ), + ); +} + +export function nullableIncidentTypeEntityTemplateEntityLabelsFromJSON( + jsonString: string, +): SafeParseResult< + NullableIncidentTypeEntityTemplateEntityLabels, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIncidentTypeEntityTemplateEntityLabels$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIncidentTypeEntityTemplateEntityLabels' from JSON`, + ); +} + +/** @internal */ +export const NullableIncidentTypeEntityTemplateEntity$inboundSchema: z.ZodType< + NullableIncidentTypeEntityTemplateEntity, + z.ZodTypeDef, + unknown +> = z.object({ + incident_name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + customer_impact_summary: z.nullable(z.string()).optional(), + labels: z.nullable( + z.lazy(() => NullableIncidentTypeEntityTemplateEntityLabels$inboundSchema), + ).optional(), + severity: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + runbook_ids: z.nullable(z.array(z.string())).optional(), + team_ids: z.nullable(z.array(z.string())).optional(), + private_incident: z.nullable(z.boolean()).optional(), + custom_fields: z.nullable(z.string()).optional(), + impacts: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "incident_name": "incidentName", + "customer_impact_summary": "customerImpactSummary", + "tag_list": "tagList", + "runbook_ids": "runbookIds", + "team_ids": "teamIds", + "private_incident": "privateIncident", + "custom_fields": "customFields", + }); +}); + +/** @internal */ +export type NullableIncidentTypeEntityTemplateEntity$Outbound = { + incident_name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + customer_impact_summary?: string | null | undefined; + labels?: + | NullableIncidentTypeEntityTemplateEntityLabels$Outbound + | null + | undefined; + severity?: string | null | undefined; + priority?: string | null | undefined; + tag_list?: Array | null | undefined; + runbook_ids?: Array | null | undefined; + team_ids?: Array | null | undefined; + private_incident?: boolean | null | undefined; + custom_fields?: string | null | undefined; + impacts?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullableIncidentTypeEntityTemplateEntity$outboundSchema: z.ZodType< + NullableIncidentTypeEntityTemplateEntity$Outbound, + z.ZodTypeDef, + NullableIncidentTypeEntityTemplateEntity +> = z.object({ + incidentName: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + customerImpactSummary: z.nullable(z.string()).optional(), + labels: z.nullable( + z.lazy(() => NullableIncidentTypeEntityTemplateEntityLabels$outboundSchema), + ).optional(), + severity: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + runbookIds: z.nullable(z.array(z.string())).optional(), + teamIds: z.nullable(z.array(z.string())).optional(), + privateIncident: z.nullable(z.boolean()).optional(), + customFields: z.nullable(z.string()).optional(), + impacts: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + incidentName: "incident_name", + customerImpactSummary: "customer_impact_summary", + tagList: "tag_list", + runbookIds: "runbook_ids", + teamIds: "team_ids", + privateIncident: "private_incident", + customFields: "custom_fields", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentTypeEntityTemplateEntity$ { + /** @deprecated use `NullableIncidentTypeEntityTemplateEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIncidentTypeEntityTemplateEntity$inboundSchema; + /** @deprecated use `NullableIncidentTypeEntityTemplateEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIncidentTypeEntityTemplateEntity$outboundSchema; + /** @deprecated use `NullableIncidentTypeEntityTemplateEntity$Outbound` instead. */ + export type Outbound = NullableIncidentTypeEntityTemplateEntity$Outbound; +} + +export function nullableIncidentTypeEntityTemplateEntityToJSON( + nullableIncidentTypeEntityTemplateEntity: + NullableIncidentTypeEntityTemplateEntity, +): string { + return JSON.stringify( + NullableIncidentTypeEntityTemplateEntity$outboundSchema.parse( + nullableIncidentTypeEntityTemplateEntity, + ), + ); +} + +export function nullableIncidentTypeEntityTemplateEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIncidentTypeEntityTemplateEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIncidentTypeEntityTemplateEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIncidentTypeEntityTemplateEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableincidenttypeentitytemplatevaluesentity.ts b/src/models/components/nullableincidenttypeentitytemplatevaluesentity.ts new file mode 100644 index 00000000..39b95ec3 --- /dev/null +++ b/src/models/components/nullableincidenttypeentitytemplatevaluesentity.ts @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + IncidentTypeEntityTemplateImpactEntity, + IncidentTypeEntityTemplateImpactEntity$inboundSchema, + IncidentTypeEntityTemplateImpactEntity$Outbound, + IncidentTypeEntityTemplateImpactEntity$outboundSchema, +} from "./incidenttypeentitytemplateimpactentity.js"; +import { + TeamEntity, + TeamEntity$inboundSchema, + TeamEntity$Outbound, + TeamEntity$outboundSchema, +} from "./teamentity.js"; + +/** + * A hash mapping runbook IDs to runbook names. + */ +export type Runbooks = {}; + +export type NullableIncidentTypeEntityTemplateValuesEntity = { + services?: Array | null | undefined; + functionalities?: + | Array + | null + | undefined; + environments?: + | Array + | null + | undefined; + /** + * A hash mapping runbook IDs to runbook names. + */ + runbooks?: Runbooks | null | undefined; + teams?: Array | null | undefined; +}; + +/** @internal */ +export const Runbooks$inboundSchema: z.ZodType< + Runbooks, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type Runbooks$Outbound = {}; + +/** @internal */ +export const Runbooks$outboundSchema: z.ZodType< + Runbooks$Outbound, + z.ZodTypeDef, + Runbooks +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Runbooks$ { + /** @deprecated use `Runbooks$inboundSchema` instead. */ + export const inboundSchema = Runbooks$inboundSchema; + /** @deprecated use `Runbooks$outboundSchema` instead. */ + export const outboundSchema = Runbooks$outboundSchema; + /** @deprecated use `Runbooks$Outbound` instead. */ + export type Outbound = Runbooks$Outbound; +} + +export function runbooksToJSON(runbooks: Runbooks): string { + return JSON.stringify(Runbooks$outboundSchema.parse(runbooks)); +} + +export function runbooksFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Runbooks$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Runbooks' from JSON`, + ); +} + +/** @internal */ +export const NullableIncidentTypeEntityTemplateValuesEntity$inboundSchema: + z.ZodType< + NullableIncidentTypeEntityTemplateValuesEntity, + z.ZodTypeDef, + unknown + > = z.object({ + services: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema), + ).optional(), + functionalities: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema), + ).optional(), + environments: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$inboundSchema), + ).optional(), + runbooks: z.nullable(z.lazy(() => Runbooks$inboundSchema)).optional(), + teams: z.nullable(z.array(TeamEntity$inboundSchema)).optional(), + }); + +/** @internal */ +export type NullableIncidentTypeEntityTemplateValuesEntity$Outbound = { + services?: + | Array + | null + | undefined; + functionalities?: + | Array + | null + | undefined; + environments?: + | Array + | null + | undefined; + runbooks?: Runbooks$Outbound | null | undefined; + teams?: Array | null | undefined; +}; + +/** @internal */ +export const NullableIncidentTypeEntityTemplateValuesEntity$outboundSchema: + z.ZodType< + NullableIncidentTypeEntityTemplateValuesEntity$Outbound, + z.ZodTypeDef, + NullableIncidentTypeEntityTemplateValuesEntity + > = z.object({ + services: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$outboundSchema), + ).optional(), + functionalities: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$outboundSchema), + ).optional(), + environments: z.nullable( + z.array(IncidentTypeEntityTemplateImpactEntity$outboundSchema), + ).optional(), + runbooks: z.nullable(z.lazy(() => Runbooks$outboundSchema)).optional(), + teams: z.nullable(z.array(TeamEntity$outboundSchema)).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIncidentTypeEntityTemplateValuesEntity$ { + /** @deprecated use `NullableIncidentTypeEntityTemplateValuesEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIncidentTypeEntityTemplateValuesEntity$inboundSchema; + /** @deprecated use `NullableIncidentTypeEntityTemplateValuesEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIncidentTypeEntityTemplateValuesEntity$outboundSchema; + /** @deprecated use `NullableIncidentTypeEntityTemplateValuesEntity$Outbound` instead. */ + export type Outbound = + NullableIncidentTypeEntityTemplateValuesEntity$Outbound; +} + +export function nullableIncidentTypeEntityTemplateValuesEntityToJSON( + nullableIncidentTypeEntityTemplateValuesEntity: + NullableIncidentTypeEntityTemplateValuesEntity, +): string { + return JSON.stringify( + NullableIncidentTypeEntityTemplateValuesEntity$outboundSchema.parse( + nullableIncidentTypeEntityTemplateValuesEntity, + ), + ); +} + +export function nullableIncidentTypeEntityTemplateValuesEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIncidentTypeEntityTemplateValuesEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIncidentTypeEntityTemplateValuesEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIncidentTypeEntityTemplateValuesEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationentity.ts b/src/models/components/nullableintegrationentity.ts new file mode 100644 index 00000000..9f61704c --- /dev/null +++ b/src/models/components/nullableintegrationentity.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableIntegrationEntity = { + id?: string | null | undefined; + integrationName?: string | null | undefined; + integrationSlug?: string | null | undefined; + displayName?: string | null | undefined; + createdAt?: Date | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationEntity$inboundSchema: z.ZodType< + NullableIntegrationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + integration_name: z.nullable(z.string()).optional(), + integration_slug: z.nullable(z.string()).optional(), + display_name: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "integration_name": "integrationName", + "integration_slug": "integrationSlug", + "display_name": "displayName", + "created_at": "createdAt", + }); +}); + +/** @internal */ +export type NullableIntegrationEntity$Outbound = { + id?: string | null | undefined; + integration_name?: string | null | undefined; + integration_slug?: string | null | undefined; + display_name?: string | null | undefined; + created_at?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationEntity$outboundSchema: z.ZodType< + NullableIntegrationEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + integrationName: z.nullable(z.string()).optional(), + integrationSlug: z.nullable(z.string()).optional(), + displayName: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + integrationName: "integration_name", + integrationSlug: "integration_slug", + displayName: "display_name", + createdAt: "created_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationEntity$ { + /** @deprecated use `NullableIntegrationEntity$inboundSchema` instead. */ + export const inboundSchema = NullableIntegrationEntity$inboundSchema; + /** @deprecated use `NullableIntegrationEntity$outboundSchema` instead. */ + export const outboundSchema = NullableIntegrationEntity$outboundSchema; + /** @deprecated use `NullableIntegrationEntity$Outbound` instead. */ + export type Outbound = NullableIntegrationEntity$Outbound; +} + +export function nullableIntegrationEntityToJSON( + nullableIntegrationEntity: NullableIntegrationEntity, +): string { + return JSON.stringify( + NullableIntegrationEntity$outboundSchema.parse(nullableIntegrationEntity), + ); +} + +export function nullableIntegrationEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableIntegrationEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIntegrationEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationsawsconnectionentity.ts b/src/models/components/nullableintegrationsawsconnectionentity.ts new file mode 100644 index 00000000..fbfe97a0 --- /dev/null +++ b/src/models/components/nullableintegrationsawsconnectionentity.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const NullableIntegrationsAwsConnectionEntityConnectionStatus = { + PendingSetup: "pending_setup", + RoleAssumed: "role_assumed", + CantAssumeRole: "cant_assume_role", + InvalidPermissions: "invalid_permissions", + Validated: "validated", +} as const; +export type NullableIntegrationsAwsConnectionEntityConnectionStatus = + ClosedEnum; + +/** + * Integrations_Aws_ConnectionEntity model + */ +export type NullableIntegrationsAwsConnectionEntity = { + id?: string | null | undefined; + awsAccountId?: string | null | undefined; + targetArn?: string | null | undefined; + externalId?: string | null | undefined; + connectionStatus?: + | NullableIntegrationsAwsConnectionEntityConnectionStatus + | null + | undefined; + statusText?: string | null | undefined; + statusDescription?: string | null | undefined; + environmentId?: string | null | undefined; + environmentName?: string | null | undefined; + regions?: Array | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsAwsConnectionEntityConnectionStatus$inboundSchema: + z.ZodNativeEnum< + typeof NullableIntegrationsAwsConnectionEntityConnectionStatus + > = z.nativeEnum(NullableIntegrationsAwsConnectionEntityConnectionStatus); + +/** @internal */ +export const NullableIntegrationsAwsConnectionEntityConnectionStatus$outboundSchema: + z.ZodNativeEnum< + typeof NullableIntegrationsAwsConnectionEntityConnectionStatus + > = NullableIntegrationsAwsConnectionEntityConnectionStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsAwsConnectionEntityConnectionStatus$ { + /** @deprecated use `NullableIntegrationsAwsConnectionEntityConnectionStatus$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsAwsConnectionEntityConnectionStatus$inboundSchema; + /** @deprecated use `NullableIntegrationsAwsConnectionEntityConnectionStatus$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsAwsConnectionEntityConnectionStatus$outboundSchema; +} + +/** @internal */ +export const NullableIntegrationsAwsConnectionEntity$inboundSchema: z.ZodType< + NullableIntegrationsAwsConnectionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + aws_account_id: z.nullable(z.string()).optional(), + target_arn: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), + connection_status: z.nullable( + NullableIntegrationsAwsConnectionEntityConnectionStatus$inboundSchema, + ).optional(), + status_text: z.nullable(z.string()).optional(), + status_description: z.nullable(z.string()).optional(), + environment_id: z.nullable(z.string()).optional(), + environment_name: z.nullable(z.string()).optional(), + regions: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "aws_account_id": "awsAccountId", + "target_arn": "targetArn", + "external_id": "externalId", + "connection_status": "connectionStatus", + "status_text": "statusText", + "status_description": "statusDescription", + "environment_id": "environmentId", + "environment_name": "environmentName", + }); +}); + +/** @internal */ +export type NullableIntegrationsAwsConnectionEntity$Outbound = { + id?: string | null | undefined; + aws_account_id?: string | null | undefined; + target_arn?: string | null | undefined; + external_id?: string | null | undefined; + connection_status?: string | null | undefined; + status_text?: string | null | undefined; + status_description?: string | null | undefined; + environment_id?: string | null | undefined; + environment_name?: string | null | undefined; + regions?: Array | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsAwsConnectionEntity$outboundSchema: z.ZodType< + NullableIntegrationsAwsConnectionEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationsAwsConnectionEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + awsAccountId: z.nullable(z.string()).optional(), + targetArn: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), + connectionStatus: z.nullable( + NullableIntegrationsAwsConnectionEntityConnectionStatus$outboundSchema, + ).optional(), + statusText: z.nullable(z.string()).optional(), + statusDescription: z.nullable(z.string()).optional(), + environmentId: z.nullable(z.string()).optional(), + environmentName: z.nullable(z.string()).optional(), + regions: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + awsAccountId: "aws_account_id", + targetArn: "target_arn", + externalId: "external_id", + connectionStatus: "connection_status", + statusText: "status_text", + statusDescription: "status_description", + environmentId: "environment_id", + environmentName: "environment_name", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsAwsConnectionEntity$ { + /** @deprecated use `NullableIntegrationsAwsConnectionEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsAwsConnectionEntity$inboundSchema; + /** @deprecated use `NullableIntegrationsAwsConnectionEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsAwsConnectionEntity$outboundSchema; + /** @deprecated use `NullableIntegrationsAwsConnectionEntity$Outbound` instead. */ + export type Outbound = NullableIntegrationsAwsConnectionEntity$Outbound; +} + +export function nullableIntegrationsAwsConnectionEntityToJSON( + nullableIntegrationsAwsConnectionEntity: + NullableIntegrationsAwsConnectionEntity, +): string { + return JSON.stringify( + NullableIntegrationsAwsConnectionEntity$outboundSchema.parse( + nullableIntegrationsAwsConnectionEntity, + ), + ); +} + +export function nullableIntegrationsAwsConnectionEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIntegrationsAwsConnectionEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIntegrationsAwsConnectionEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIntegrationsAwsConnectionEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationsconnectionentity.ts b/src/models/components/nullableintegrationsconnectionentity.ts new file mode 100644 index 00000000..15737017 --- /dev/null +++ b/src/models/components/nullableintegrationsconnectionentity.ts @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; + +/** + * Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. + */ +export type NullableIntegrationsConnectionEntityDetails = {}; + +/** + * Integrations_ConnectionEntity model + */ +export type NullableIntegrationsConnectionEntity = { + id?: string | null | undefined; + integrationSlug?: string | null | undefined; + integrationId?: string | null | undefined; + displayName?: string | null | undefined; + configurationUrl?: string | null | undefined; + authorizedBy?: string | null | undefined; + authorizedById?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + /** + * Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity. + */ + details?: NullableIntegrationsConnectionEntityDetails | null | undefined; + defaultAuthorizedActor?: NullableAuthorEntity | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsConnectionEntityDetails$inboundSchema: + z.ZodType< + NullableIntegrationsConnectionEntityDetails, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type NullableIntegrationsConnectionEntityDetails$Outbound = {}; + +/** @internal */ +export const NullableIntegrationsConnectionEntityDetails$outboundSchema: + z.ZodType< + NullableIntegrationsConnectionEntityDetails$Outbound, + z.ZodTypeDef, + NullableIntegrationsConnectionEntityDetails + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsConnectionEntityDetails$ { + /** @deprecated use `NullableIntegrationsConnectionEntityDetails$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsConnectionEntityDetails$inboundSchema; + /** @deprecated use `NullableIntegrationsConnectionEntityDetails$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsConnectionEntityDetails$outboundSchema; + /** @deprecated use `NullableIntegrationsConnectionEntityDetails$Outbound` instead. */ + export type Outbound = NullableIntegrationsConnectionEntityDetails$Outbound; +} + +export function nullableIntegrationsConnectionEntityDetailsToJSON( + nullableIntegrationsConnectionEntityDetails: + NullableIntegrationsConnectionEntityDetails, +): string { + return JSON.stringify( + NullableIntegrationsConnectionEntityDetails$outboundSchema.parse( + nullableIntegrationsConnectionEntityDetails, + ), + ); +} + +export function nullableIntegrationsConnectionEntityDetailsFromJSON( + jsonString: string, +): SafeParseResult< + NullableIntegrationsConnectionEntityDetails, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIntegrationsConnectionEntityDetails$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIntegrationsConnectionEntityDetails' from JSON`, + ); +} + +/** @internal */ +export const NullableIntegrationsConnectionEntity$inboundSchema: z.ZodType< + NullableIntegrationsConnectionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + integration_slug: z.nullable(z.string()).optional(), + integration_id: z.nullable(z.string()).optional(), + display_name: z.nullable(z.string()).optional(), + configuration_url: z.nullable(z.string()).optional(), + authorized_by: z.nullable(z.string()).optional(), + authorized_by_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + details: z.nullable( + z.lazy(() => NullableIntegrationsConnectionEntityDetails$inboundSchema), + ).optional(), + default_authorized_actor: z.nullable(NullableAuthorEntity$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "integration_id": "integrationId", + "display_name": "displayName", + "configuration_url": "configurationUrl", + "authorized_by": "authorizedBy", + "authorized_by_id": "authorizedById", + "created_at": "createdAt", + "updated_at": "updatedAt", + "default_authorized_actor": "defaultAuthorizedActor", + }); +}); + +/** @internal */ +export type NullableIntegrationsConnectionEntity$Outbound = { + id?: string | null | undefined; + integration_slug?: string | null | undefined; + integration_id?: string | null | undefined; + display_name?: string | null | undefined; + configuration_url?: string | null | undefined; + authorized_by?: string | null | undefined; + authorized_by_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + details?: + | NullableIntegrationsConnectionEntityDetails$Outbound + | null + | undefined; + default_authorized_actor?: NullableAuthorEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsConnectionEntity$outboundSchema: z.ZodType< + NullableIntegrationsConnectionEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationsConnectionEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + integrationSlug: z.nullable(z.string()).optional(), + integrationId: z.nullable(z.string()).optional(), + displayName: z.nullable(z.string()).optional(), + configurationUrl: z.nullable(z.string()).optional(), + authorizedBy: z.nullable(z.string()).optional(), + authorizedById: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + details: z.nullable( + z.lazy(() => NullableIntegrationsConnectionEntityDetails$outboundSchema), + ).optional(), + defaultAuthorizedActor: z.nullable(NullableAuthorEntity$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + integrationId: "integration_id", + displayName: "display_name", + configurationUrl: "configuration_url", + authorizedBy: "authorized_by", + authorizedById: "authorized_by_id", + createdAt: "created_at", + updatedAt: "updated_at", + defaultAuthorizedActor: "default_authorized_actor", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsConnectionEntity$ { + /** @deprecated use `NullableIntegrationsConnectionEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsConnectionEntity$inboundSchema; + /** @deprecated use `NullableIntegrationsConnectionEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsConnectionEntity$outboundSchema; + /** @deprecated use `NullableIntegrationsConnectionEntity$Outbound` instead. */ + export type Outbound = NullableIntegrationsConnectionEntity$Outbound; +} + +export function nullableIntegrationsConnectionEntityToJSON( + nullableIntegrationsConnectionEntity: NullableIntegrationsConnectionEntity, +): string { + return JSON.stringify( + NullableIntegrationsConnectionEntity$outboundSchema.parse( + nullableIntegrationsConnectionEntity, + ), + ); +} + +export function nullableIntegrationsConnectionEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableIntegrationsConnectionEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIntegrationsConnectionEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationsintegrationentity.ts b/src/models/components/nullableintegrationsintegrationentity.ts new file mode 100644 index 00000000..89f1eb1c --- /dev/null +++ b/src/models/components/nullableintegrationsintegrationentity.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableIntegrationsConnectionEntity, + NullableIntegrationsConnectionEntity$inboundSchema, + NullableIntegrationsConnectionEntity$Outbound, + NullableIntegrationsConnectionEntity$outboundSchema, +} from "./nullableintegrationsconnectionentity.js"; +import { + NullableIntegrationsIntegrationEntityLogoEntity, + NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema, + NullableIntegrationsIntegrationEntityLogoEntity$Outbound, + NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema, +} from "./nullableintegrationsintegrationentitylogoentity.js"; + +/** + * Integrations_IntegrationEntity model + */ +export type NullableIntegrationsIntegrationEntity = { + id?: string | null | undefined; + slug?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + setupUrl?: string | null | undefined; + createdAt?: Date | null | undefined; + connections?: NullableIntegrationsConnectionEntity | null | undefined; + enabled?: boolean | null | undefined; + installed?: boolean | null | undefined; + deprecated?: boolean | null | undefined; + logo?: NullableIntegrationsIntegrationEntityLogoEntity | null | undefined; + natIp?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsIntegrationEntity$inboundSchema: z.ZodType< + NullableIntegrationsIntegrationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + setup_url: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + connections: z.nullable(NullableIntegrationsConnectionEntity$inboundSchema) + .optional(), + enabled: z.nullable(z.boolean()).optional(), + installed: z.nullable(z.boolean()).optional(), + deprecated: z.nullable(z.boolean()).optional(), + logo: z.nullable( + NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema, + ).optional(), + nat_ip: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "setup_url": "setupUrl", + "created_at": "createdAt", + "nat_ip": "natIp", + }); +}); + +/** @internal */ +export type NullableIntegrationsIntegrationEntity$Outbound = { + id?: string | null | undefined; + slug?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + setup_url?: string | null | undefined; + created_at?: string | null | undefined; + connections?: + | NullableIntegrationsConnectionEntity$Outbound + | null + | undefined; + enabled?: boolean | null | undefined; + installed?: boolean | null | undefined; + deprecated?: boolean | null | undefined; + logo?: + | NullableIntegrationsIntegrationEntityLogoEntity$Outbound + | null + | undefined; + nat_ip?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsIntegrationEntity$outboundSchema: z.ZodType< + NullableIntegrationsIntegrationEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationsIntegrationEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + setupUrl: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + connections: z.nullable(NullableIntegrationsConnectionEntity$outboundSchema) + .optional(), + enabled: z.nullable(z.boolean()).optional(), + installed: z.nullable(z.boolean()).optional(), + deprecated: z.nullable(z.boolean()).optional(), + logo: z.nullable( + NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema, + ).optional(), + natIp: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + setupUrl: "setup_url", + createdAt: "created_at", + natIp: "nat_ip", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsIntegrationEntity$ { + /** @deprecated use `NullableIntegrationsIntegrationEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsIntegrationEntity$inboundSchema; + /** @deprecated use `NullableIntegrationsIntegrationEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsIntegrationEntity$outboundSchema; + /** @deprecated use `NullableIntegrationsIntegrationEntity$Outbound` instead. */ + export type Outbound = NullableIntegrationsIntegrationEntity$Outbound; +} + +export function nullableIntegrationsIntegrationEntityToJSON( + nullableIntegrationsIntegrationEntity: NullableIntegrationsIntegrationEntity, +): string { + return JSON.stringify( + NullableIntegrationsIntegrationEntity$outboundSchema.parse( + nullableIntegrationsIntegrationEntity, + ), + ); +} + +export function nullableIntegrationsIntegrationEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableIntegrationsIntegrationEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableIntegrationsIntegrationEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationsintegrationentitylogoentity.ts b/src/models/components/nullableintegrationsintegrationentitylogoentity.ts new file mode 100644 index 00000000..d07aa469 --- /dev/null +++ b/src/models/components/nullableintegrationsintegrationentitylogoentity.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableIntegrationsIntegrationEntityLogoEntity = { + logoUrl?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema: + z.ZodType< + NullableIntegrationsIntegrationEntityLogoEntity, + z.ZodTypeDef, + unknown + > = z.object({ + logo_url: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + "logo_url": "logoUrl", + }); + }); + +/** @internal */ +export type NullableIntegrationsIntegrationEntityLogoEntity$Outbound = { + logo_url?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema: + z.ZodType< + NullableIntegrationsIntegrationEntityLogoEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationsIntegrationEntityLogoEntity + > = z.object({ + logoUrl: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + logoUrl: "logo_url", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsIntegrationEntityLogoEntity$ { + /** @deprecated use `NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema; + /** @deprecated use `NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema; + /** @deprecated use `NullableIntegrationsIntegrationEntityLogoEntity$Outbound` instead. */ + export type Outbound = + NullableIntegrationsIntegrationEntityLogoEntity$Outbound; +} + +export function nullableIntegrationsIntegrationEntityLogoEntityToJSON( + nullableIntegrationsIntegrationEntityLogoEntity: + NullableIntegrationsIntegrationEntityLogoEntity, +): string { + return JSON.stringify( + NullableIntegrationsIntegrationEntityLogoEntity$outboundSchema.parse( + nullableIntegrationsIntegrationEntityLogoEntity, + ), + ); +} + +export function nullableIntegrationsIntegrationEntityLogoEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIntegrationsIntegrationEntityLogoEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIntegrationsIntegrationEntityLogoEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIntegrationsIntegrationEntityLogoEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationsmicrosoftteamsv2channelentity.ts b/src/models/components/nullableintegrationsmicrosoftteamsv2channelentity.ts new file mode 100644 index 00000000..6789dd19 --- /dev/null +++ b/src/models/components/nullableintegrationsmicrosoftteamsv2channelentity.ts @@ -0,0 +1,131 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableIncidentEntity, + NullableIncidentEntity$inboundSchema, + NullableIncidentEntity$Outbound, + NullableIncidentEntity$outboundSchema, +} from "./nullableincidententity.js"; + +export type NullableIntegrationsMicrosoftTeamsV2ChannelEntity = { + id?: string | null | undefined; + channelId?: string | null | undefined; + channelName?: string | null | undefined; + msTeamId?: string | null | undefined; + teamName?: string | null | undefined; + channelUrl?: string | null | undefined; + status?: string | null | undefined; + incident?: NullableIncidentEntity | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema: + z.ZodType< + NullableIntegrationsMicrosoftTeamsV2ChannelEntity, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.nullable(z.string()).optional(), + channel_id: z.nullable(z.string()).optional(), + channel_name: z.nullable(z.string()).optional(), + ms_team_id: z.nullable(z.string()).optional(), + team_name: z.nullable(z.string()).optional(), + channel_url: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + incident: z.nullable(NullableIncidentEntity$inboundSchema).optional(), + }).transform((v) => { + return remap$(v, { + "channel_id": "channelId", + "channel_name": "channelName", + "ms_team_id": "msTeamId", + "team_name": "teamName", + "channel_url": "channelUrl", + }); + }); + +/** @internal */ +export type NullableIntegrationsMicrosoftTeamsV2ChannelEntity$Outbound = { + id?: string | null | undefined; + channel_id?: string | null | undefined; + channel_name?: string | null | undefined; + ms_team_id?: string | null | undefined; + team_name?: string | null | undefined; + channel_url?: string | null | undefined; + status?: string | null | undefined; + incident?: NullableIncidentEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema: + z.ZodType< + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationsMicrosoftTeamsV2ChannelEntity + > = z.object({ + id: z.nullable(z.string()).optional(), + channelId: z.nullable(z.string()).optional(), + channelName: z.nullable(z.string()).optional(), + msTeamId: z.nullable(z.string()).optional(), + teamName: z.nullable(z.string()).optional(), + channelUrl: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + incident: z.nullable(NullableIncidentEntity$outboundSchema).optional(), + }).transform((v) => { + return remap$(v, { + channelId: "channel_id", + channelName: "channel_name", + msTeamId: "ms_team_id", + teamName: "team_name", + channelUrl: "channel_url", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsMicrosoftTeamsV2ChannelEntity$ { + /** @deprecated use `NullableIntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema; + /** @deprecated use `NullableIntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema; + /** @deprecated use `NullableIntegrationsMicrosoftTeamsV2ChannelEntity$Outbound` instead. */ + export type Outbound = + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$Outbound; +} + +export function nullableIntegrationsMicrosoftTeamsV2ChannelEntityToJSON( + nullableIntegrationsMicrosoftTeamsV2ChannelEntity: + NullableIntegrationsMicrosoftTeamsV2ChannelEntity, +): string { + return JSON.stringify( + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema.parse( + nullableIntegrationsMicrosoftTeamsV2ChannelEntity, + ), + ); +} + +export function nullableIntegrationsMicrosoftTeamsV2ChannelEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIntegrationsMicrosoftTeamsV2ChannelEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIntegrationsMicrosoftTeamsV2ChannelEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationsslackslackchannelentity.ts b/src/models/components/nullableintegrationsslackslackchannelentity.ts new file mode 100644 index 00000000..457fe971 --- /dev/null +++ b/src/models/components/nullableintegrationsslackslackchannelentity.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableIntegrationsSlackSlackChannelEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + slackChannelId?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsSlackSlackChannelEntity$inboundSchema: + z.ZodType< + NullableIntegrationsSlackSlackChannelEntity, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slack_channel_id: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + "slack_channel_id": "slackChannelId", + }); + }); + +/** @internal */ +export type NullableIntegrationsSlackSlackChannelEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + slack_channel_id?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsSlackSlackChannelEntity$outboundSchema: + z.ZodType< + NullableIntegrationsSlackSlackChannelEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationsSlackSlackChannelEntity + > = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slackChannelId: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + slackChannelId: "slack_channel_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsSlackSlackChannelEntity$ { + /** @deprecated use `NullableIntegrationsSlackSlackChannelEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsSlackSlackChannelEntity$inboundSchema; + /** @deprecated use `NullableIntegrationsSlackSlackChannelEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsSlackSlackChannelEntity$outboundSchema; + /** @deprecated use `NullableIntegrationsSlackSlackChannelEntity$Outbound` instead. */ + export type Outbound = NullableIntegrationsSlackSlackChannelEntity$Outbound; +} + +export function nullableIntegrationsSlackSlackChannelEntityToJSON( + nullableIntegrationsSlackSlackChannelEntity: + NullableIntegrationsSlackSlackChannelEntity, +): string { + return JSON.stringify( + NullableIntegrationsSlackSlackChannelEntity$outboundSchema.parse( + nullableIntegrationsSlackSlackChannelEntity, + ), + ); +} + +export function nullableIntegrationsSlackSlackChannelEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIntegrationsSlackSlackChannelEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIntegrationsSlackSlackChannelEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableIntegrationsSlackSlackChannelEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableintegrationszendesksupportissueentitycustomerentity.ts b/src/models/components/nullableintegrationszendesksupportissueentitycustomerentity.ts new file mode 100644 index 00000000..70370dfd --- /dev/null +++ b/src/models/components/nullableintegrationszendesksupportissueentitycustomerentity.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableIntegrationsZendeskSupportIssueEntityCustomerEntity = { + /** + * UUID of the Customer + */ + id?: string | null | undefined; + /** + * Name of the Customer + */ + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$inboundSchema: + z.ZodType< + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$Outbound = + { + id?: string | null | undefined; + name?: string | null | undefined; + }; + +/** @internal */ +export const NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$outboundSchema: + z.ZodType< + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$Outbound, + z.ZodTypeDef, + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity + > = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$ { + /** @deprecated use `NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$inboundSchema; + /** @deprecated use `NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$outboundSchema; + /** @deprecated use `NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$Outbound` instead. */ + export type Outbound = + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$Outbound; +} + +export function nullableIntegrationsZendeskSupportIssueEntityCustomerEntityToJSON( + nullableIntegrationsZendeskSupportIssueEntityCustomerEntity: + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity, +): string { + return JSON.stringify( + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$outboundSchema + .parse(nullableIntegrationsZendeskSupportIssueEntityCustomerEntity), + ); +} + +export function nullableIntegrationsZendeskSupportIssueEntityCustomerEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableIntegrationsZendeskSupportIssueEntityCustomerEntity$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NullableIntegrationsZendeskSupportIssueEntityCustomerEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablemediaimageentity.ts b/src/models/components/nullablemediaimageentity.ts new file mode 100644 index 00000000..04211979 --- /dev/null +++ b/src/models/components/nullablemediaimageentity.ts @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * An object with keys that can have different versions of an image + */ +export type VersionsUrls = {}; + +export type NullableMediaImageEntity = { + originalUrl?: string | null | undefined; + /** + * An object with keys that can have different versions of an image + */ + versionsUrls?: VersionsUrls | null | undefined; +}; + +/** @internal */ +export const VersionsUrls$inboundSchema: z.ZodType< + VersionsUrls, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type VersionsUrls$Outbound = {}; + +/** @internal */ +export const VersionsUrls$outboundSchema: z.ZodType< + VersionsUrls$Outbound, + z.ZodTypeDef, + VersionsUrls +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace VersionsUrls$ { + /** @deprecated use `VersionsUrls$inboundSchema` instead. */ + export const inboundSchema = VersionsUrls$inboundSchema; + /** @deprecated use `VersionsUrls$outboundSchema` instead. */ + export const outboundSchema = VersionsUrls$outboundSchema; + /** @deprecated use `VersionsUrls$Outbound` instead. */ + export type Outbound = VersionsUrls$Outbound; +} + +export function versionsUrlsToJSON(versionsUrls: VersionsUrls): string { + return JSON.stringify(VersionsUrls$outboundSchema.parse(versionsUrls)); +} + +export function versionsUrlsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VersionsUrls$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VersionsUrls' from JSON`, + ); +} + +/** @internal */ +export const NullableMediaImageEntity$inboundSchema: z.ZodType< + NullableMediaImageEntity, + z.ZodTypeDef, + unknown +> = z.object({ + original_url: z.nullable(z.string()).optional(), + versions_urls: z.nullable(z.lazy(() => VersionsUrls$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "original_url": "originalUrl", + "versions_urls": "versionsUrls", + }); +}); + +/** @internal */ +export type NullableMediaImageEntity$Outbound = { + original_url?: string | null | undefined; + versions_urls?: VersionsUrls$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableMediaImageEntity$outboundSchema: z.ZodType< + NullableMediaImageEntity$Outbound, + z.ZodTypeDef, + NullableMediaImageEntity +> = z.object({ + originalUrl: z.nullable(z.string()).optional(), + versionsUrls: z.nullable(z.lazy(() => VersionsUrls$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + originalUrl: "original_url", + versionsUrls: "versions_urls", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableMediaImageEntity$ { + /** @deprecated use `NullableMediaImageEntity$inboundSchema` instead. */ + export const inboundSchema = NullableMediaImageEntity$inboundSchema; + /** @deprecated use `NullableMediaImageEntity$outboundSchema` instead. */ + export const outboundSchema = NullableMediaImageEntity$outboundSchema; + /** @deprecated use `NullableMediaImageEntity$Outbound` instead. */ + export type Outbound = NullableMediaImageEntity$Outbound; +} + +export function nullableMediaImageEntityToJSON( + nullableMediaImageEntity: NullableMediaImageEntity, +): string { + return JSON.stringify( + NullableMediaImageEntity$outboundSchema.parse(nullableMediaImageEntity), + ); +} + +export function nullableMediaImageEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableMediaImageEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableMediaImageEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablemetricsmetricsentitysortentity.ts b/src/models/components/nullablemetricsmetricsentitysortentity.ts new file mode 100644 index 00000000..89d9cfc0 --- /dev/null +++ b/src/models/components/nullablemetricsmetricsentitysortentity.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableMetricsMetricsEntitySortEntity = { + field?: string | null | undefined; + direction?: string | null | undefined; + limit?: number | null | undefined; +}; + +/** @internal */ +export const NullableMetricsMetricsEntitySortEntity$inboundSchema: z.ZodType< + NullableMetricsMetricsEntitySortEntity, + z.ZodTypeDef, + unknown +> = z.object({ + field: z.nullable(z.string()).optional(), + direction: z.nullable(z.string()).optional(), + limit: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type NullableMetricsMetricsEntitySortEntity$Outbound = { + field?: string | null | undefined; + direction?: string | null | undefined; + limit?: number | null | undefined; +}; + +/** @internal */ +export const NullableMetricsMetricsEntitySortEntity$outboundSchema: z.ZodType< + NullableMetricsMetricsEntitySortEntity$Outbound, + z.ZodTypeDef, + NullableMetricsMetricsEntitySortEntity +> = z.object({ + field: z.nullable(z.string()).optional(), + direction: z.nullable(z.string()).optional(), + limit: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableMetricsMetricsEntitySortEntity$ { + /** @deprecated use `NullableMetricsMetricsEntitySortEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableMetricsMetricsEntitySortEntity$inboundSchema; + /** @deprecated use `NullableMetricsMetricsEntitySortEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableMetricsMetricsEntitySortEntity$outboundSchema; + /** @deprecated use `NullableMetricsMetricsEntitySortEntity$Outbound` instead. */ + export type Outbound = NullableMetricsMetricsEntitySortEntity$Outbound; +} + +export function nullableMetricsMetricsEntitySortEntityToJSON( + nullableMetricsMetricsEntitySortEntity: + NullableMetricsMetricsEntitySortEntity, +): string { + return JSON.stringify( + NullableMetricsMetricsEntitySortEntity$outboundSchema.parse( + nullableMetricsMetricsEntitySortEntity, + ), + ); +} + +export function nullableMetricsMetricsEntitySortEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableMetricsMetricsEntitySortEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableMetricsMetricsEntitySortEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablemetricsretrospectiveentitysummaryentity.ts b/src/models/components/nullablemetricsretrospectiveentitysummaryentity.ts new file mode 100644 index 00000000..c2c91fdc --- /dev/null +++ b/src/models/components/nullablemetricsretrospectiveentitysummaryentity.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableMetricsRetrospectiveEntitySummaryEntity = { + completed?: number | null | undefined; + total?: number | null | undefined; + incomplete?: number | null | undefined; + mean?: number | null | undefined; + shortest?: number | null | undefined; + longest?: number | null | undefined; + completionPercentage?: number | null | undefined; +}; + +/** @internal */ +export const NullableMetricsRetrospectiveEntitySummaryEntity$inboundSchema: + z.ZodType< + NullableMetricsRetrospectiveEntitySummaryEntity, + z.ZodTypeDef, + unknown + > = z.object({ + completed: z.nullable(z.number().int()).optional(), + total: z.nullable(z.number().int()).optional(), + incomplete: z.nullable(z.number().int()).optional(), + mean: z.nullable(z.number()).optional(), + shortest: z.nullable(z.number()).optional(), + longest: z.nullable(z.number()).optional(), + completion_percentage: z.nullable(z.number()).optional(), + }).transform((v) => { + return remap$(v, { + "completion_percentage": "completionPercentage", + }); + }); + +/** @internal */ +export type NullableMetricsRetrospectiveEntitySummaryEntity$Outbound = { + completed?: number | null | undefined; + total?: number | null | undefined; + incomplete?: number | null | undefined; + mean?: number | null | undefined; + shortest?: number | null | undefined; + longest?: number | null | undefined; + completion_percentage?: number | null | undefined; +}; + +/** @internal */ +export const NullableMetricsRetrospectiveEntitySummaryEntity$outboundSchema: + z.ZodType< + NullableMetricsRetrospectiveEntitySummaryEntity$Outbound, + z.ZodTypeDef, + NullableMetricsRetrospectiveEntitySummaryEntity + > = z.object({ + completed: z.nullable(z.number().int()).optional(), + total: z.nullable(z.number().int()).optional(), + incomplete: z.nullable(z.number().int()).optional(), + mean: z.nullable(z.number()).optional(), + shortest: z.nullable(z.number()).optional(), + longest: z.nullable(z.number()).optional(), + completionPercentage: z.nullable(z.number()).optional(), + }).transform((v) => { + return remap$(v, { + completionPercentage: "completion_percentage", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableMetricsRetrospectiveEntitySummaryEntity$ { + /** @deprecated use `NullableMetricsRetrospectiveEntitySummaryEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableMetricsRetrospectiveEntitySummaryEntity$inboundSchema; + /** @deprecated use `NullableMetricsRetrospectiveEntitySummaryEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableMetricsRetrospectiveEntitySummaryEntity$outboundSchema; + /** @deprecated use `NullableMetricsRetrospectiveEntitySummaryEntity$Outbound` instead. */ + export type Outbound = + NullableMetricsRetrospectiveEntitySummaryEntity$Outbound; +} + +export function nullableMetricsRetrospectiveEntitySummaryEntityToJSON( + nullableMetricsRetrospectiveEntitySummaryEntity: + NullableMetricsRetrospectiveEntitySummaryEntity, +): string { + return JSON.stringify( + NullableMetricsRetrospectiveEntitySummaryEntity$outboundSchema.parse( + nullableMetricsRetrospectiveEntitySummaryEntity, + ), + ); +} + +export function nullableMetricsRetrospectiveEntitySummaryEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableMetricsRetrospectiveEntitySummaryEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableMetricsRetrospectiveEntitySummaryEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableMetricsRetrospectiveEntitySummaryEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablenunccomponententity.ts b/src/models/components/nullablenunccomponententity.ts new file mode 100644 index 00000000..d93ea317 --- /dev/null +++ b/src/models/components/nullablenunccomponententity.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableNuncComponentEntity = { + infrastructureType?: string | null | undefined; + infrastructureId?: string | null | undefined; + label?: string | null | undefined; + position?: number | null | undefined; + componentGroupId?: string | null | undefined; +}; + +/** @internal */ +export const NullableNuncComponentEntity$inboundSchema: z.ZodType< + NullableNuncComponentEntity, + z.ZodTypeDef, + unknown +> = z.object({ + infrastructure_type: z.nullable(z.string()).optional(), + infrastructure_id: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + component_group_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "infrastructure_type": "infrastructureType", + "infrastructure_id": "infrastructureId", + "component_group_id": "componentGroupId", + }); +}); + +/** @internal */ +export type NullableNuncComponentEntity$Outbound = { + infrastructure_type?: string | null | undefined; + infrastructure_id?: string | null | undefined; + label?: string | null | undefined; + position?: number | null | undefined; + component_group_id?: string | null | undefined; +}; + +/** @internal */ +export const NullableNuncComponentEntity$outboundSchema: z.ZodType< + NullableNuncComponentEntity$Outbound, + z.ZodTypeDef, + NullableNuncComponentEntity +> = z.object({ + infrastructureType: z.nullable(z.string()).optional(), + infrastructureId: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + componentGroupId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + infrastructureType: "infrastructure_type", + infrastructureId: "infrastructure_id", + componentGroupId: "component_group_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableNuncComponentEntity$ { + /** @deprecated use `NullableNuncComponentEntity$inboundSchema` instead. */ + export const inboundSchema = NullableNuncComponentEntity$inboundSchema; + /** @deprecated use `NullableNuncComponentEntity$outboundSchema` instead. */ + export const outboundSchema = NullableNuncComponentEntity$outboundSchema; + /** @deprecated use `NullableNuncComponentEntity$Outbound` instead. */ + export type Outbound = NullableNuncComponentEntity$Outbound; +} + +export function nullableNuncComponentEntityToJSON( + nullableNuncComponentEntity: NullableNuncComponentEntity, +): string { + return JSON.stringify( + NullableNuncComponentEntity$outboundSchema.parse( + nullableNuncComponentEntity, + ), + ); +} + +export function nullableNuncComponentEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableNuncComponentEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableNuncComponentEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablenunccomponentgroupentity.ts b/src/models/components/nullablenunccomponentgroupentity.ts new file mode 100644 index 00000000..66d80937 --- /dev/null +++ b/src/models/components/nullablenunccomponentgroupentity.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableNuncComponentGroupEntity = { + id?: string | null | undefined; + componentGroupId?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const NullableNuncComponentGroupEntity$inboundSchema: z.ZodType< + NullableNuncComponentGroupEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + component_group_id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "component_group_id": "componentGroupId", + }); +}); + +/** @internal */ +export type NullableNuncComponentGroupEntity$Outbound = { + id?: string | null | undefined; + component_group_id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const NullableNuncComponentGroupEntity$outboundSchema: z.ZodType< + NullableNuncComponentGroupEntity$Outbound, + z.ZodTypeDef, + NullableNuncComponentGroupEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + componentGroupId: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + componentGroupId: "component_group_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableNuncComponentGroupEntity$ { + /** @deprecated use `NullableNuncComponentGroupEntity$inboundSchema` instead. */ + export const inboundSchema = NullableNuncComponentGroupEntity$inboundSchema; + /** @deprecated use `NullableNuncComponentGroupEntity$outboundSchema` instead. */ + export const outboundSchema = NullableNuncComponentGroupEntity$outboundSchema; + /** @deprecated use `NullableNuncComponentGroupEntity$Outbound` instead. */ + export type Outbound = NullableNuncComponentGroupEntity$Outbound; +} + +export function nullableNuncComponentGroupEntityToJSON( + nullableNuncComponentGroupEntity: NullableNuncComponentGroupEntity, +): string { + return JSON.stringify( + NullableNuncComponentGroupEntity$outboundSchema.parse( + nullableNuncComponentGroupEntity, + ), + ); +} + +export function nullableNuncComponentGroupEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableNuncComponentGroupEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableNuncComponentGroupEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablenuncconditionentity.ts b/src/models/components/nullablenuncconditionentity.ts new file mode 100644 index 00000000..b6110ab9 --- /dev/null +++ b/src/models/components/nullablenuncconditionentity.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableNuncConditionEntity = { + nuncCondition?: string | null | undefined; + conditionName?: string | null | undefined; + conditionId?: string | null | undefined; +}; + +/** @internal */ +export const NullableNuncConditionEntity$inboundSchema: z.ZodType< + NullableNuncConditionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_condition: z.nullable(z.string()).optional(), + condition_name: z.nullable(z.string()).optional(), + condition_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "nunc_condition": "nuncCondition", + "condition_name": "conditionName", + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type NullableNuncConditionEntity$Outbound = { + nunc_condition?: string | null | undefined; + condition_name?: string | null | undefined; + condition_id?: string | null | undefined; +}; + +/** @internal */ +export const NullableNuncConditionEntity$outboundSchema: z.ZodType< + NullableNuncConditionEntity$Outbound, + z.ZodTypeDef, + NullableNuncConditionEntity +> = z.object({ + nuncCondition: z.nullable(z.string()).optional(), + conditionName: z.nullable(z.string()).optional(), + conditionId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + nuncCondition: "nunc_condition", + conditionName: "condition_name", + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableNuncConditionEntity$ { + /** @deprecated use `NullableNuncConditionEntity$inboundSchema` instead. */ + export const inboundSchema = NullableNuncConditionEntity$inboundSchema; + /** @deprecated use `NullableNuncConditionEntity$outboundSchema` instead. */ + export const outboundSchema = NullableNuncConditionEntity$outboundSchema; + /** @deprecated use `NullableNuncConditionEntity$Outbound` instead. */ + export type Outbound = NullableNuncConditionEntity$Outbound; +} + +export function nullableNuncConditionEntityToJSON( + nullableNuncConditionEntity: NullableNuncConditionEntity, +): string { + return JSON.stringify( + NullableNuncConditionEntity$outboundSchema.parse( + nullableNuncConditionEntity, + ), + ); +} + +export function nullableNuncConditionEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableNuncConditionEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableNuncConditionEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableorganizationentity.ts b/src/models/components/nullableorganizationentity.ts new file mode 100644 index 00000000..db78856e --- /dev/null +++ b/src/models/components/nullableorganizationentity.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableOrganizationEntity = { + name?: string | null | undefined; + id?: string | null | undefined; +}; + +/** @internal */ +export const NullableOrganizationEntity$inboundSchema: z.ZodType< + NullableOrganizationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NullableOrganizationEntity$Outbound = { + name?: string | null | undefined; + id?: string | null | undefined; +}; + +/** @internal */ +export const NullableOrganizationEntity$outboundSchema: z.ZodType< + NullableOrganizationEntity$Outbound, + z.ZodTypeDef, + NullableOrganizationEntity +> = z.object({ + name: z.nullable(z.string()).optional(), + id: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableOrganizationEntity$ { + /** @deprecated use `NullableOrganizationEntity$inboundSchema` instead. */ + export const inboundSchema = NullableOrganizationEntity$inboundSchema; + /** @deprecated use `NullableOrganizationEntity$outboundSchema` instead. */ + export const outboundSchema = NullableOrganizationEntity$outboundSchema; + /** @deprecated use `NullableOrganizationEntity$Outbound` instead. */ + export type Outbound = NullableOrganizationEntity$Outbound; +} + +export function nullableOrganizationEntityToJSON( + nullableOrganizationEntity: NullableOrganizationEntity, +): string { + return JSON.stringify( + NullableOrganizationEntity$outboundSchema.parse(nullableOrganizationEntity), + ); +} + +export function nullableOrganizationEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableOrganizationEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableOrganizationEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablepaginationentity.ts b/src/models/components/nullablepaginationentity.ts new file mode 100644 index 00000000..389baff4 --- /dev/null +++ b/src/models/components/nullablepaginationentity.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullablePaginationEntity = { + count?: number | null | undefined; + page?: number | null | undefined; + items?: number | null | undefined; + pages?: number | null | undefined; + last?: number | null | undefined; + prev?: number | null | undefined; + next?: number | null | undefined; +}; + +/** @internal */ +export const NullablePaginationEntity$inboundSchema: z.ZodType< + NullablePaginationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + count: z.nullable(z.number().int()).optional(), + page: z.nullable(z.number().int()).optional(), + items: z.nullable(z.number().int()).optional(), + pages: z.nullable(z.number().int()).optional(), + last: z.nullable(z.number().int()).optional(), + prev: z.nullable(z.number().int()).optional(), + next: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type NullablePaginationEntity$Outbound = { + count?: number | null | undefined; + page?: number | null | undefined; + items?: number | null | undefined; + pages?: number | null | undefined; + last?: number | null | undefined; + prev?: number | null | undefined; + next?: number | null | undefined; +}; + +/** @internal */ +export const NullablePaginationEntity$outboundSchema: z.ZodType< + NullablePaginationEntity$Outbound, + z.ZodTypeDef, + NullablePaginationEntity +> = z.object({ + count: z.nullable(z.number().int()).optional(), + page: z.nullable(z.number().int()).optional(), + items: z.nullable(z.number().int()).optional(), + pages: z.nullable(z.number().int()).optional(), + last: z.nullable(z.number().int()).optional(), + prev: z.nullable(z.number().int()).optional(), + next: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullablePaginationEntity$ { + /** @deprecated use `NullablePaginationEntity$inboundSchema` instead. */ + export const inboundSchema = NullablePaginationEntity$inboundSchema; + /** @deprecated use `NullablePaginationEntity$outboundSchema` instead. */ + export const outboundSchema = NullablePaginationEntity$outboundSchema; + /** @deprecated use `NullablePaginationEntity$Outbound` instead. */ + export type Outbound = NullablePaginationEntity$Outbound; +} + +export function nullablePaginationEntityToJSON( + nullablePaginationEntity: NullablePaginationEntity, +): string { + return JSON.stringify( + NullablePaginationEntity$outboundSchema.parse(nullablePaginationEntity), + ); +} + +export function nullablePaginationEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullablePaginationEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullablePaginationEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablepostmortemsquestionentity.ts b/src/models/components/nullablepostmortemsquestionentity.ts new file mode 100644 index 00000000..b753437e --- /dev/null +++ b/src/models/components/nullablepostmortemsquestionentity.ts @@ -0,0 +1,127 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$inboundSchema, + ConversationsAPIEntitiesReference$Outbound, + ConversationsAPIEntitiesReference$outboundSchema, +} from "./conversationsapientitiesreference.js"; + +export type NullablePostMortemsQuestionEntity = { + id?: string | null | undefined; + title?: string | null | undefined; + body?: string | null | undefined; + tooltip?: string | null | undefined; + kind?: string | null | undefined; + questionTypeId?: string | null | undefined; + isRequired?: boolean | null | undefined; + availableOptions?: Array | null | undefined; + conversations?: Array | null | undefined; +}; + +/** @internal */ +export const NullablePostMortemsQuestionEntity$inboundSchema: z.ZodType< + NullablePostMortemsQuestionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + tooltip: z.nullable(z.string()).optional(), + kind: z.nullable(z.string()).optional(), + question_type_id: z.nullable(z.string()).optional(), + is_required: z.nullable(z.boolean()).optional(), + available_options: z.nullable(z.array(z.string())).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "question_type_id": "questionTypeId", + "is_required": "isRequired", + "available_options": "availableOptions", + }); +}); + +/** @internal */ +export type NullablePostMortemsQuestionEntity$Outbound = { + id?: string | null | undefined; + title?: string | null | undefined; + body?: string | null | undefined; + tooltip?: string | null | undefined; + kind?: string | null | undefined; + question_type_id?: string | null | undefined; + is_required?: boolean | null | undefined; + available_options?: Array | null | undefined; + conversations?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullablePostMortemsQuestionEntity$outboundSchema: z.ZodType< + NullablePostMortemsQuestionEntity$Outbound, + z.ZodTypeDef, + NullablePostMortemsQuestionEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + tooltip: z.nullable(z.string()).optional(), + kind: z.nullable(z.string()).optional(), + questionTypeId: z.nullable(z.string()).optional(), + isRequired: z.nullable(z.boolean()).optional(), + availableOptions: z.nullable(z.array(z.string())).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + questionTypeId: "question_type_id", + isRequired: "is_required", + availableOptions: "available_options", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullablePostMortemsQuestionEntity$ { + /** @deprecated use `NullablePostMortemsQuestionEntity$inboundSchema` instead. */ + export const inboundSchema = NullablePostMortemsQuestionEntity$inboundSchema; + /** @deprecated use `NullablePostMortemsQuestionEntity$outboundSchema` instead. */ + export const outboundSchema = + NullablePostMortemsQuestionEntity$outboundSchema; + /** @deprecated use `NullablePostMortemsQuestionEntity$Outbound` instead. */ + export type Outbound = NullablePostMortemsQuestionEntity$Outbound; +} + +export function nullablePostMortemsQuestionEntityToJSON( + nullablePostMortemsQuestionEntity: NullablePostMortemsQuestionEntity, +): string { + return JSON.stringify( + NullablePostMortemsQuestionEntity$outboundSchema.parse( + nullablePostMortemsQuestionEntity, + ), + ); +} + +export function nullablePostMortemsQuestionEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullablePostMortemsQuestionEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullablePostMortemsQuestionEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablepublicapiv1incidentssuccinctentity.ts b/src/models/components/nullablepublicapiv1incidentssuccinctentity.ts new file mode 100644 index 00000000..6627b311 --- /dev/null +++ b/src/models/components/nullablepublicapiv1incidentssuccinctentity.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullablePublicApiv1IncidentsSuccinctEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + number?: number | null | undefined; +}; + +/** @internal */ +export const NullablePublicApiv1IncidentsSuccinctEntity$inboundSchema: + z.ZodType = + z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), + }); + +/** @internal */ +export type NullablePublicApiv1IncidentsSuccinctEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + number?: number | null | undefined; +}; + +/** @internal */ +export const NullablePublicApiv1IncidentsSuccinctEntity$outboundSchema: + z.ZodType< + NullablePublicApiv1IncidentsSuccinctEntity$Outbound, + z.ZodTypeDef, + NullablePublicApiv1IncidentsSuccinctEntity + > = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullablePublicApiv1IncidentsSuccinctEntity$ { + /** @deprecated use `NullablePublicApiv1IncidentsSuccinctEntity$inboundSchema` instead. */ + export const inboundSchema = + NullablePublicApiv1IncidentsSuccinctEntity$inboundSchema; + /** @deprecated use `NullablePublicApiv1IncidentsSuccinctEntity$outboundSchema` instead. */ + export const outboundSchema = + NullablePublicApiv1IncidentsSuccinctEntity$outboundSchema; + /** @deprecated use `NullablePublicApiv1IncidentsSuccinctEntity$Outbound` instead. */ + export type Outbound = NullablePublicApiv1IncidentsSuccinctEntity$Outbound; +} + +export function nullablePublicAPIV1IncidentsSuccinctEntityToJSON( + nullablePublicApiv1IncidentsSuccinctEntity: + NullablePublicApiv1IncidentsSuccinctEntity, +): string { + return JSON.stringify( + NullablePublicApiv1IncidentsSuccinctEntity$outboundSchema.parse( + nullablePublicApiv1IncidentsSuccinctEntity, + ), + ); +} + +export function nullablePublicAPIV1IncidentsSuccinctEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullablePublicApiv1IncidentsSuccinctEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullablePublicApiv1IncidentsSuccinctEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullablePublicApiv1IncidentsSuccinctEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerulesruleentity.ts b/src/models/components/nullablerulesruleentity.ts new file mode 100644 index 00000000..3a004c85 --- /dev/null +++ b/src/models/components/nullablerulesruleentity.ts @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableFHTypesGenericEntity, + NullableFHTypesGenericEntity$inboundSchema, + NullableFHTypesGenericEntity$Outbound, + NullableFHTypesGenericEntity$outboundSchema, +} from "./nullablefhtypesgenericentity.js"; + +/** + * An unstructured object of key/value pairs describing the logic for applying the rule. + */ +export type NullableRulesRuleEntityLogic = {}; + +export type NullableRulesRuleEntity = { + /** + * An unstructured object of key/value pairs describing the logic for applying the rule. + */ + logic?: NullableRulesRuleEntityLogic | null | undefined; + userData?: NullableFHTypesGenericEntity | null | undefined; +}; + +/** @internal */ +export const NullableRulesRuleEntityLogic$inboundSchema: z.ZodType< + NullableRulesRuleEntityLogic, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableRulesRuleEntityLogic$Outbound = {}; + +/** @internal */ +export const NullableRulesRuleEntityLogic$outboundSchema: z.ZodType< + NullableRulesRuleEntityLogic$Outbound, + z.ZodTypeDef, + NullableRulesRuleEntityLogic +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRulesRuleEntityLogic$ { + /** @deprecated use `NullableRulesRuleEntityLogic$inboundSchema` instead. */ + export const inboundSchema = NullableRulesRuleEntityLogic$inboundSchema; + /** @deprecated use `NullableRulesRuleEntityLogic$outboundSchema` instead. */ + export const outboundSchema = NullableRulesRuleEntityLogic$outboundSchema; + /** @deprecated use `NullableRulesRuleEntityLogic$Outbound` instead. */ + export type Outbound = NullableRulesRuleEntityLogic$Outbound; +} + +export function nullableRulesRuleEntityLogicToJSON( + nullableRulesRuleEntityLogic: NullableRulesRuleEntityLogic, +): string { + return JSON.stringify( + NullableRulesRuleEntityLogic$outboundSchema.parse( + nullableRulesRuleEntityLogic, + ), + ); +} + +export function nullableRulesRuleEntityLogicFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableRulesRuleEntityLogic$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRulesRuleEntityLogic' from JSON`, + ); +} + +/** @internal */ +export const NullableRulesRuleEntity$inboundSchema: z.ZodType< + NullableRulesRuleEntity, + z.ZodTypeDef, + unknown +> = z.object({ + logic: z.nullable(z.lazy(() => NullableRulesRuleEntityLogic$inboundSchema)) + .optional(), + user_data: z.nullable(NullableFHTypesGenericEntity$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "user_data": "userData", + }); +}); + +/** @internal */ +export type NullableRulesRuleEntity$Outbound = { + logic?: NullableRulesRuleEntityLogic$Outbound | null | undefined; + user_data?: NullableFHTypesGenericEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableRulesRuleEntity$outboundSchema: z.ZodType< + NullableRulesRuleEntity$Outbound, + z.ZodTypeDef, + NullableRulesRuleEntity +> = z.object({ + logic: z.nullable(z.lazy(() => NullableRulesRuleEntityLogic$outboundSchema)) + .optional(), + userData: z.nullable(NullableFHTypesGenericEntity$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + userData: "user_data", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRulesRuleEntity$ { + /** @deprecated use `NullableRulesRuleEntity$inboundSchema` instead. */ + export const inboundSchema = NullableRulesRuleEntity$inboundSchema; + /** @deprecated use `NullableRulesRuleEntity$outboundSchema` instead. */ + export const outboundSchema = NullableRulesRuleEntity$outboundSchema; + /** @deprecated use `NullableRulesRuleEntity$Outbound` instead. */ + export type Outbound = NullableRulesRuleEntity$Outbound; +} + +export function nullableRulesRuleEntityToJSON( + nullableRulesRuleEntity: NullableRulesRuleEntity, +): string { + return JSON.stringify( + NullableRulesRuleEntity$outboundSchema.parse(nullableRulesRuleEntity), + ); +} + +export function nullableRulesRuleEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableRulesRuleEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRulesRuleEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbooksactionconfigentity.ts b/src/models/components/nullablerunbooksactionconfigentity.ts new file mode 100644 index 00000000..dcad4181 --- /dev/null +++ b/src/models/components/nullablerunbooksactionconfigentity.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableRunbooksElementEntity, + NullableRunbooksElementEntity$inboundSchema, + NullableRunbooksElementEntity$Outbound, + NullableRunbooksElementEntity$outboundSchema, +} from "./nullablerunbookselemententity.js"; + +export type NullableRunbooksActionConfigEntity = { + elements?: NullableRunbooksElementEntity | null | undefined; + /** + * Location of documentation for this action + */ + documentationUrl?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksActionConfigEntity$inboundSchema: z.ZodType< + NullableRunbooksActionConfigEntity, + z.ZodTypeDef, + unknown +> = z.object({ + elements: z.nullable(NullableRunbooksElementEntity$inboundSchema).optional(), + documentation_url: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "documentation_url": "documentationUrl", + }); +}); + +/** @internal */ +export type NullableRunbooksActionConfigEntity$Outbound = { + elements?: NullableRunbooksElementEntity$Outbound | null | undefined; + documentation_url?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksActionConfigEntity$outboundSchema: z.ZodType< + NullableRunbooksActionConfigEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksActionConfigEntity +> = z.object({ + elements: z.nullable(NullableRunbooksElementEntity$outboundSchema).optional(), + documentationUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + documentationUrl: "documentation_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksActionConfigEntity$ { + /** @deprecated use `NullableRunbooksActionConfigEntity$inboundSchema` instead. */ + export const inboundSchema = NullableRunbooksActionConfigEntity$inboundSchema; + /** @deprecated use `NullableRunbooksActionConfigEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksActionConfigEntity$outboundSchema; + /** @deprecated use `NullableRunbooksActionConfigEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksActionConfigEntity$Outbound; +} + +export function nullableRunbooksActionConfigEntityToJSON( + nullableRunbooksActionConfigEntity: NullableRunbooksActionConfigEntity, +): string { + return JSON.stringify( + NullableRunbooksActionConfigEntity$outboundSchema.parse( + nullableRunbooksActionConfigEntity, + ), + ); +} + +export function nullableRunbooksActionConfigEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableRunbooksActionConfigEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksActionConfigEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbooksactionsentity.ts b/src/models/components/nullablerunbooksactionsentity.ts new file mode 100644 index 00000000..54c8bc4a --- /dev/null +++ b/src/models/components/nullablerunbooksactionsentity.ts @@ -0,0 +1,377 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableIntegrationsIntegrationEntity, + NullableIntegrationsIntegrationEntity$inboundSchema, + NullableIntegrationsIntegrationEntity$Outbound, + NullableIntegrationsIntegrationEntity$outboundSchema, +} from "./nullableintegrationsintegrationentity.js"; +import { + NullableRunbooksActionConfigEntity, + NullableRunbooksActionConfigEntity$inboundSchema, + NullableRunbooksActionConfigEntity$Outbound, + NullableRunbooksActionConfigEntity$outboundSchema, +} from "./nullablerunbooksactionconfigentity.js"; + +export type NullableRunbooksActionsEntityPrerequisites = {}; + +export type NullableRunbooksActionsEntityDefaultLogic = {}; + +export type NullableRunbooksActionsEntityDefaultRuleData = {}; + +export type NullableRunbooksActionsEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + config?: NullableRunbooksActionConfigEntity | null | undefined; + category?: string | null | undefined; + prerequisites?: NullableRunbooksActionsEntityPrerequisites | null | undefined; + integration?: NullableIntegrationsIntegrationEntity | null | undefined; + supportedRunbookTypes?: Array | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + automatable?: boolean | null | undefined; + rerunnable?: boolean | null | undefined; + repeatable?: boolean | null | undefined; + defaultLogic?: NullableRunbooksActionsEntityDefaultLogic | null | undefined; + defaultRuleData?: + | NullableRunbooksActionsEntityDefaultRuleData + | null + | undefined; +}; + +/** @internal */ +export const NullableRunbooksActionsEntityPrerequisites$inboundSchema: + z.ZodType = + z.object({}); + +/** @internal */ +export type NullableRunbooksActionsEntityPrerequisites$Outbound = {}; + +/** @internal */ +export const NullableRunbooksActionsEntityPrerequisites$outboundSchema: + z.ZodType< + NullableRunbooksActionsEntityPrerequisites$Outbound, + z.ZodTypeDef, + NullableRunbooksActionsEntityPrerequisites + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksActionsEntityPrerequisites$ { + /** @deprecated use `NullableRunbooksActionsEntityPrerequisites$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksActionsEntityPrerequisites$inboundSchema; + /** @deprecated use `NullableRunbooksActionsEntityPrerequisites$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksActionsEntityPrerequisites$outboundSchema; + /** @deprecated use `NullableRunbooksActionsEntityPrerequisites$Outbound` instead. */ + export type Outbound = NullableRunbooksActionsEntityPrerequisites$Outbound; +} + +export function nullableRunbooksActionsEntityPrerequisitesToJSON( + nullableRunbooksActionsEntityPrerequisites: + NullableRunbooksActionsEntityPrerequisites, +): string { + return JSON.stringify( + NullableRunbooksActionsEntityPrerequisites$outboundSchema.parse( + nullableRunbooksActionsEntityPrerequisites, + ), + ); +} + +export function nullableRunbooksActionsEntityPrerequisitesFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksActionsEntityPrerequisites, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksActionsEntityPrerequisites$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksActionsEntityPrerequisites' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbooksActionsEntityDefaultLogic$inboundSchema: z.ZodType< + NullableRunbooksActionsEntityDefaultLogic, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableRunbooksActionsEntityDefaultLogic$Outbound = {}; + +/** @internal */ +export const NullableRunbooksActionsEntityDefaultLogic$outboundSchema: + z.ZodType< + NullableRunbooksActionsEntityDefaultLogic$Outbound, + z.ZodTypeDef, + NullableRunbooksActionsEntityDefaultLogic + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksActionsEntityDefaultLogic$ { + /** @deprecated use `NullableRunbooksActionsEntityDefaultLogic$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksActionsEntityDefaultLogic$inboundSchema; + /** @deprecated use `NullableRunbooksActionsEntityDefaultLogic$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksActionsEntityDefaultLogic$outboundSchema; + /** @deprecated use `NullableRunbooksActionsEntityDefaultLogic$Outbound` instead. */ + export type Outbound = NullableRunbooksActionsEntityDefaultLogic$Outbound; +} + +export function nullableRunbooksActionsEntityDefaultLogicToJSON( + nullableRunbooksActionsEntityDefaultLogic: + NullableRunbooksActionsEntityDefaultLogic, +): string { + return JSON.stringify( + NullableRunbooksActionsEntityDefaultLogic$outboundSchema.parse( + nullableRunbooksActionsEntityDefaultLogic, + ), + ); +} + +export function nullableRunbooksActionsEntityDefaultLogicFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksActionsEntityDefaultLogic, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksActionsEntityDefaultLogic$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksActionsEntityDefaultLogic' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbooksActionsEntityDefaultRuleData$inboundSchema: + z.ZodType< + NullableRunbooksActionsEntityDefaultRuleData, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type NullableRunbooksActionsEntityDefaultRuleData$Outbound = {}; + +/** @internal */ +export const NullableRunbooksActionsEntityDefaultRuleData$outboundSchema: + z.ZodType< + NullableRunbooksActionsEntityDefaultRuleData$Outbound, + z.ZodTypeDef, + NullableRunbooksActionsEntityDefaultRuleData + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksActionsEntityDefaultRuleData$ { + /** @deprecated use `NullableRunbooksActionsEntityDefaultRuleData$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksActionsEntityDefaultRuleData$inboundSchema; + /** @deprecated use `NullableRunbooksActionsEntityDefaultRuleData$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksActionsEntityDefaultRuleData$outboundSchema; + /** @deprecated use `NullableRunbooksActionsEntityDefaultRuleData$Outbound` instead. */ + export type Outbound = NullableRunbooksActionsEntityDefaultRuleData$Outbound; +} + +export function nullableRunbooksActionsEntityDefaultRuleDataToJSON( + nullableRunbooksActionsEntityDefaultRuleData: + NullableRunbooksActionsEntityDefaultRuleData, +): string { + return JSON.stringify( + NullableRunbooksActionsEntityDefaultRuleData$outboundSchema.parse( + nullableRunbooksActionsEntityDefaultRuleData, + ), + ); +} + +export function nullableRunbooksActionsEntityDefaultRuleDataFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksActionsEntityDefaultRuleData, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksActionsEntityDefaultRuleData$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksActionsEntityDefaultRuleData' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbooksActionsEntity$inboundSchema: z.ZodType< + NullableRunbooksActionsEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + config: z.nullable(NullableRunbooksActionConfigEntity$inboundSchema) + .optional(), + category: z.nullable(z.string()).optional(), + prerequisites: z.nullable( + z.lazy(() => NullableRunbooksActionsEntityPrerequisites$inboundSchema), + ).optional(), + integration: z.nullable(NullableIntegrationsIntegrationEntity$inboundSchema) + .optional(), + supported_runbook_types: z.nullable(z.array(z.string())).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + automatable: z.nullable(z.boolean()).optional(), + rerunnable: z.nullable(z.boolean()).optional(), + repeatable: z.nullable(z.boolean()).optional(), + default_logic: z.nullable( + z.lazy(() => NullableRunbooksActionsEntityDefaultLogic$inboundSchema), + ).optional(), + default_rule_data: z.nullable( + z.lazy(() => NullableRunbooksActionsEntityDefaultRuleData$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "supported_runbook_types": "supportedRunbookTypes", + "created_at": "createdAt", + "updated_at": "updatedAt", + "default_logic": "defaultLogic", + "default_rule_data": "defaultRuleData", + }); +}); + +/** @internal */ +export type NullableRunbooksActionsEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + config?: NullableRunbooksActionConfigEntity$Outbound | null | undefined; + category?: string | null | undefined; + prerequisites?: + | NullableRunbooksActionsEntityPrerequisites$Outbound + | null + | undefined; + integration?: + | NullableIntegrationsIntegrationEntity$Outbound + | null + | undefined; + supported_runbook_types?: Array | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + automatable?: boolean | null | undefined; + rerunnable?: boolean | null | undefined; + repeatable?: boolean | null | undefined; + default_logic?: + | NullableRunbooksActionsEntityDefaultLogic$Outbound + | null + | undefined; + default_rule_data?: + | NullableRunbooksActionsEntityDefaultRuleData$Outbound + | null + | undefined; +}; + +/** @internal */ +export const NullableRunbooksActionsEntity$outboundSchema: z.ZodType< + NullableRunbooksActionsEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksActionsEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + config: z.nullable(NullableRunbooksActionConfigEntity$outboundSchema) + .optional(), + category: z.nullable(z.string()).optional(), + prerequisites: z.nullable( + z.lazy(() => NullableRunbooksActionsEntityPrerequisites$outboundSchema), + ).optional(), + integration: z.nullable(NullableIntegrationsIntegrationEntity$outboundSchema) + .optional(), + supportedRunbookTypes: z.nullable(z.array(z.string())).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + automatable: z.nullable(z.boolean()).optional(), + rerunnable: z.nullable(z.boolean()).optional(), + repeatable: z.nullable(z.boolean()).optional(), + defaultLogic: z.nullable( + z.lazy(() => NullableRunbooksActionsEntityDefaultLogic$outboundSchema), + ).optional(), + defaultRuleData: z.nullable( + z.lazy(() => NullableRunbooksActionsEntityDefaultRuleData$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + supportedRunbookTypes: "supported_runbook_types", + createdAt: "created_at", + updatedAt: "updated_at", + defaultLogic: "default_logic", + defaultRuleData: "default_rule_data", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksActionsEntity$ { + /** @deprecated use `NullableRunbooksActionsEntity$inboundSchema` instead. */ + export const inboundSchema = NullableRunbooksActionsEntity$inboundSchema; + /** @deprecated use `NullableRunbooksActionsEntity$outboundSchema` instead. */ + export const outboundSchema = NullableRunbooksActionsEntity$outboundSchema; + /** @deprecated use `NullableRunbooksActionsEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksActionsEntity$Outbound; +} + +export function nullableRunbooksActionsEntityToJSON( + nullableRunbooksActionsEntity: NullableRunbooksActionsEntity, +): string { + return JSON.stringify( + NullableRunbooksActionsEntity$outboundSchema.parse( + nullableRunbooksActionsEntity, + ), + ); +} + +export function nullableRunbooksActionsEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableRunbooksActionsEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksActionsEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookselementdynamicselectentity.ts b/src/models/components/nullablerunbookselementdynamicselectentity.ts new file mode 100644 index 00000000..fd0fee85 --- /dev/null +++ b/src/models/components/nullablerunbookselementdynamicselectentity.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity, + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema, + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound, + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema, +} from "./nullablerunbookselementdynamicselectentityselectoptionentity.js"; +import { + RunbooksElementDynamicSelectEntitySelectOptionEntity, + RunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema, + RunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound, + RunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema, +} from "./runbookselementdynamicselectentityselectoptionentity.js"; + +export type NullableRunbooksElementDynamicSelectEntity = { + label?: string | null | undefined; + placeholder?: string | null | undefined; + asyncUrl?: string | null | undefined; + required?: boolean | null | undefined; + clearable?: boolean | null | undefined; + isMulti?: boolean | null | undefined; + defaultValue?: + | NullableRunbooksElementDynamicSelectEntitySelectOptionEntity + | null + | undefined; + options?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementDynamicSelectEntity$inboundSchema: + z.ZodType = + z.object({ + label: z.nullable(z.string()).optional(), + placeholder: z.nullable(z.string()).optional(), + async_url: z.nullable(z.string()).optional(), + required: z.nullable(z.boolean()).optional(), + clearable: z.nullable(z.boolean()).optional(), + is_multi: z.nullable(z.boolean()).optional(), + default_value: z.nullable( + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema, + ).optional(), + options: z.nullable( + z.array( + RunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema, + ), + ).optional(), + }).transform((v) => { + return remap$(v, { + "async_url": "asyncUrl", + "is_multi": "isMulti", + "default_value": "defaultValue", + }); + }); + +/** @internal */ +export type NullableRunbooksElementDynamicSelectEntity$Outbound = { + label?: string | null | undefined; + placeholder?: string | null | undefined; + async_url?: string | null | undefined; + required?: boolean | null | undefined; + clearable?: boolean | null | undefined; + is_multi?: boolean | null | undefined; + default_value?: + | NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound + | null + | undefined; + options?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementDynamicSelectEntity$outboundSchema: + z.ZodType< + NullableRunbooksElementDynamicSelectEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksElementDynamicSelectEntity + > = z.object({ + label: z.nullable(z.string()).optional(), + placeholder: z.nullable(z.string()).optional(), + asyncUrl: z.nullable(z.string()).optional(), + required: z.nullable(z.boolean()).optional(), + clearable: z.nullable(z.boolean()).optional(), + isMulti: z.nullable(z.boolean()).optional(), + defaultValue: z.nullable( + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema, + ).optional(), + options: z.nullable( + z.array( + RunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema, + ), + ).optional(), + }).transform((v) => { + return remap$(v, { + asyncUrl: "async_url", + isMulti: "is_multi", + defaultValue: "default_value", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksElementDynamicSelectEntity$ { + /** @deprecated use `NullableRunbooksElementDynamicSelectEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksElementDynamicSelectEntity$inboundSchema; + /** @deprecated use `NullableRunbooksElementDynamicSelectEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksElementDynamicSelectEntity$outboundSchema; + /** @deprecated use `NullableRunbooksElementDynamicSelectEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksElementDynamicSelectEntity$Outbound; +} + +export function nullableRunbooksElementDynamicSelectEntityToJSON( + nullableRunbooksElementDynamicSelectEntity: + NullableRunbooksElementDynamicSelectEntity, +): string { + return JSON.stringify( + NullableRunbooksElementDynamicSelectEntity$outboundSchema.parse( + nullableRunbooksElementDynamicSelectEntity, + ), + ); +} + +export function nullableRunbooksElementDynamicSelectEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksElementDynamicSelectEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksElementDynamicSelectEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksElementDynamicSelectEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookselementdynamicselectentityselectoptionentity.ts b/src/models/components/nullablerunbookselementdynamicselectentityselectoptionentity.ts new file mode 100644 index 00000000..d3393e9c --- /dev/null +++ b/src/models/components/nullablerunbookselementdynamicselectentityselectoptionentity.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableRunbooksElementDynamicSelectEntitySelectOptionEntity = { + label?: string | null | undefined; + value?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema: + z.ZodType< + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity, + z.ZodTypeDef, + unknown + > = z.object({ + label: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound = + { + label?: string | null | undefined; + value?: string | null | undefined; + }; + +/** @internal */ +export const NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema: + z.ZodType< + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity + > = z.object({ + label: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$ { + /** @deprecated use `NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema; + /** @deprecated use `NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema; + /** @deprecated use `NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound` instead. */ + export type Outbound = + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound; +} + +export function nullableRunbooksElementDynamicSelectEntitySelectOptionEntityToJSON( + nullableRunbooksElementDynamicSelectEntitySelectOptionEntity: + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity, +): string { + return JSON.stringify( + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema + .parse(nullableRunbooksElementDynamicSelectEntitySelectOptionEntity), + ); +} + +export function nullableRunbooksElementDynamicSelectEntitySelectOptionEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema + .parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksElementDynamicSelectEntitySelectOptionEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookselemententity.ts b/src/models/components/nullablerunbookselemententity.ts new file mode 100644 index 00000000..7e4687f3 --- /dev/null +++ b/src/models/components/nullablerunbookselemententity.ts @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableRunbooksElementDynamicSelectEntity, + NullableRunbooksElementDynamicSelectEntity$inboundSchema, + NullableRunbooksElementDynamicSelectEntity$Outbound, + NullableRunbooksElementDynamicSelectEntity$outboundSchema, +} from "./nullablerunbookselementdynamicselectentity.js"; +import { + NullableRunbooksElementInputEntity, + NullableRunbooksElementInputEntity$inboundSchema, + NullableRunbooksElementInputEntity$Outbound, + NullableRunbooksElementInputEntity$outboundSchema, +} from "./nullablerunbookselementinputentity.js"; +import { + NullableRunbooksElementMarkdownEntity, + NullableRunbooksElementMarkdownEntity$inboundSchema, + NullableRunbooksElementMarkdownEntity$Outbound, + NullableRunbooksElementMarkdownEntity$outboundSchema, +} from "./nullablerunbookselementmarkdownentity.js"; +import { + NullableRunbooksElementTextareaEntity, + NullableRunbooksElementTextareaEntity$inboundSchema, + NullableRunbooksElementTextareaEntity$Outbound, + NullableRunbooksElementTextareaEntity$outboundSchema, +} from "./nullablerunbookselementtextareaentity.js"; + +export type NullableRunbooksElementEntity = { + id?: string | null | undefined; + type?: string | null | undefined; + markdown?: NullableRunbooksElementMarkdownEntity | null | undefined; + textarea?: NullableRunbooksElementTextareaEntity | null | undefined; + input?: NullableRunbooksElementInputEntity | null | undefined; + plainText?: NullableRunbooksElementMarkdownEntity | null | undefined; + dynamicSelect?: NullableRunbooksElementDynamicSelectEntity | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementEntity$inboundSchema: z.ZodType< + NullableRunbooksElementEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + markdown: z.nullable(NullableRunbooksElementMarkdownEntity$inboundSchema) + .optional(), + textarea: z.nullable(NullableRunbooksElementTextareaEntity$inboundSchema) + .optional(), + input: z.nullable(NullableRunbooksElementInputEntity$inboundSchema) + .optional(), + plain_text: z.nullable(NullableRunbooksElementMarkdownEntity$inboundSchema) + .optional(), + dynamic_select: z.nullable( + NullableRunbooksElementDynamicSelectEntity$inboundSchema, + ).optional(), +}).transform((v) => { + return remap$(v, { + "plain_text": "plainText", + "dynamic_select": "dynamicSelect", + }); +}); + +/** @internal */ +export type NullableRunbooksElementEntity$Outbound = { + id?: string | null | undefined; + type?: string | null | undefined; + markdown?: NullableRunbooksElementMarkdownEntity$Outbound | null | undefined; + textarea?: NullableRunbooksElementTextareaEntity$Outbound | null | undefined; + input?: NullableRunbooksElementInputEntity$Outbound | null | undefined; + plain_text?: + | NullableRunbooksElementMarkdownEntity$Outbound + | null + | undefined; + dynamic_select?: + | NullableRunbooksElementDynamicSelectEntity$Outbound + | null + | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementEntity$outboundSchema: z.ZodType< + NullableRunbooksElementEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksElementEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + markdown: z.nullable(NullableRunbooksElementMarkdownEntity$outboundSchema) + .optional(), + textarea: z.nullable(NullableRunbooksElementTextareaEntity$outboundSchema) + .optional(), + input: z.nullable(NullableRunbooksElementInputEntity$outboundSchema) + .optional(), + plainText: z.nullable(NullableRunbooksElementMarkdownEntity$outboundSchema) + .optional(), + dynamicSelect: z.nullable( + NullableRunbooksElementDynamicSelectEntity$outboundSchema, + ).optional(), +}).transform((v) => { + return remap$(v, { + plainText: "plain_text", + dynamicSelect: "dynamic_select", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksElementEntity$ { + /** @deprecated use `NullableRunbooksElementEntity$inboundSchema` instead. */ + export const inboundSchema = NullableRunbooksElementEntity$inboundSchema; + /** @deprecated use `NullableRunbooksElementEntity$outboundSchema` instead. */ + export const outboundSchema = NullableRunbooksElementEntity$outboundSchema; + /** @deprecated use `NullableRunbooksElementEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksElementEntity$Outbound; +} + +export function nullableRunbooksElementEntityToJSON( + nullableRunbooksElementEntity: NullableRunbooksElementEntity, +): string { + return JSON.stringify( + NullableRunbooksElementEntity$outboundSchema.parse( + nullableRunbooksElementEntity, + ), + ); +} + +export function nullableRunbooksElementEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableRunbooksElementEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksElementEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookselementinputentity.ts b/src/models/components/nullablerunbookselementinputentity.ts new file mode 100644 index 00000000..129ccdb4 --- /dev/null +++ b/src/models/components/nullablerunbookselementinputentity.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableRunbooksElementInputEntity = { + label?: string | null | undefined; + placeholder?: string | null | undefined; + defaultValue?: string | null | undefined; + required?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementInputEntity$inboundSchema: z.ZodType< + NullableRunbooksElementInputEntity, + z.ZodTypeDef, + unknown +> = z.object({ + label: z.nullable(z.string()).optional(), + placeholder: z.nullable(z.string()).optional(), + default_value: z.nullable(z.string()).optional(), + required: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "default_value": "defaultValue", + }); +}); + +/** @internal */ +export type NullableRunbooksElementInputEntity$Outbound = { + label?: string | null | undefined; + placeholder?: string | null | undefined; + default_value?: string | null | undefined; + required?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementInputEntity$outboundSchema: z.ZodType< + NullableRunbooksElementInputEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksElementInputEntity +> = z.object({ + label: z.nullable(z.string()).optional(), + placeholder: z.nullable(z.string()).optional(), + defaultValue: z.nullable(z.string()).optional(), + required: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + defaultValue: "default_value", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksElementInputEntity$ { + /** @deprecated use `NullableRunbooksElementInputEntity$inboundSchema` instead. */ + export const inboundSchema = NullableRunbooksElementInputEntity$inboundSchema; + /** @deprecated use `NullableRunbooksElementInputEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksElementInputEntity$outboundSchema; + /** @deprecated use `NullableRunbooksElementInputEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksElementInputEntity$Outbound; +} + +export function nullableRunbooksElementInputEntityToJSON( + nullableRunbooksElementInputEntity: NullableRunbooksElementInputEntity, +): string { + return JSON.stringify( + NullableRunbooksElementInputEntity$outboundSchema.parse( + nullableRunbooksElementInputEntity, + ), + ); +} + +export function nullableRunbooksElementInputEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableRunbooksElementInputEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksElementInputEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookselementmarkdownentity.ts b/src/models/components/nullablerunbookselementmarkdownentity.ts new file mode 100644 index 00000000..1a2e2d54 --- /dev/null +++ b/src/models/components/nullablerunbookselementmarkdownentity.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableRunbooksElementMarkdownEntity = { + text?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementMarkdownEntity$inboundSchema: z.ZodType< + NullableRunbooksElementMarkdownEntity, + z.ZodTypeDef, + unknown +> = z.object({ + text: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NullableRunbooksElementMarkdownEntity$Outbound = { + text?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementMarkdownEntity$outboundSchema: z.ZodType< + NullableRunbooksElementMarkdownEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksElementMarkdownEntity +> = z.object({ + text: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksElementMarkdownEntity$ { + /** @deprecated use `NullableRunbooksElementMarkdownEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksElementMarkdownEntity$inboundSchema; + /** @deprecated use `NullableRunbooksElementMarkdownEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksElementMarkdownEntity$outboundSchema; + /** @deprecated use `NullableRunbooksElementMarkdownEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksElementMarkdownEntity$Outbound; +} + +export function nullableRunbooksElementMarkdownEntityToJSON( + nullableRunbooksElementMarkdownEntity: NullableRunbooksElementMarkdownEntity, +): string { + return JSON.stringify( + NullableRunbooksElementMarkdownEntity$outboundSchema.parse( + nullableRunbooksElementMarkdownEntity, + ), + ); +} + +export function nullableRunbooksElementMarkdownEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableRunbooksElementMarkdownEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksElementMarkdownEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookselementtextareaentity.ts b/src/models/components/nullablerunbookselementtextareaentity.ts new file mode 100644 index 00000000..027cff42 --- /dev/null +++ b/src/models/components/nullablerunbookselementtextareaentity.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableRunbooksElementTextareaEntity = { + label?: string | null | undefined; + placeholder?: string | null | undefined; + defaultValue?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementTextareaEntity$inboundSchema: z.ZodType< + NullableRunbooksElementTextareaEntity, + z.ZodTypeDef, + unknown +> = z.object({ + label: z.nullable(z.string()).optional(), + placeholder: z.nullable(z.string()).optional(), + default_value: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "default_value": "defaultValue", + }); +}); + +/** @internal */ +export type NullableRunbooksElementTextareaEntity$Outbound = { + label?: string | null | undefined; + placeholder?: string | null | undefined; + default_value?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksElementTextareaEntity$outboundSchema: z.ZodType< + NullableRunbooksElementTextareaEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksElementTextareaEntity +> = z.object({ + label: z.nullable(z.string()).optional(), + placeholder: z.nullable(z.string()).optional(), + defaultValue: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + defaultValue: "default_value", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksElementTextareaEntity$ { + /** @deprecated use `NullableRunbooksElementTextareaEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksElementTextareaEntity$inboundSchema; + /** @deprecated use `NullableRunbooksElementTextareaEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksElementTextareaEntity$outboundSchema; + /** @deprecated use `NullableRunbooksElementTextareaEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksElementTextareaEntity$Outbound; +} + +export function nullableRunbooksElementTextareaEntityToJSON( + nullableRunbooksElementTextareaEntity: NullableRunbooksElementTextareaEntity, +): string { + return JSON.stringify( + NullableRunbooksElementTextareaEntity$outboundSchema.parse( + nullableRunbooksElementTextareaEntity, + ), + ); +} + +export function nullableRunbooksElementTextareaEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableRunbooksElementTextareaEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksElementTextareaEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbooksexecutionentityexecutedforentity.ts b/src/models/components/nullablerunbooksexecutionentityexecutedforentity.ts new file mode 100644 index 00000000..35f42f44 --- /dev/null +++ b/src/models/components/nullablerunbooksexecutionentityexecutedforentity.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableRunbooksExecutionEntityExecutedForEntity = { + id?: string | null | undefined; + type?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksExecutionEntityExecutedForEntity$inboundSchema: + z.ZodType< + NullableRunbooksExecutionEntityExecutedForEntity, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type NullableRunbooksExecutionEntityExecutedForEntity$Outbound = { + id?: string | null | undefined; + type?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksExecutionEntityExecutedForEntity$outboundSchema: + z.ZodType< + NullableRunbooksExecutionEntityExecutedForEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksExecutionEntityExecutedForEntity + > = z.object({ + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksExecutionEntityExecutedForEntity$ { + /** @deprecated use `NullableRunbooksExecutionEntityExecutedForEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksExecutionEntityExecutedForEntity$inboundSchema; + /** @deprecated use `NullableRunbooksExecutionEntityExecutedForEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksExecutionEntityExecutedForEntity$outboundSchema; + /** @deprecated use `NullableRunbooksExecutionEntityExecutedForEntity$Outbound` instead. */ + export type Outbound = + NullableRunbooksExecutionEntityExecutedForEntity$Outbound; +} + +export function nullableRunbooksExecutionEntityExecutedForEntityToJSON( + nullableRunbooksExecutionEntityExecutedForEntity: + NullableRunbooksExecutionEntityExecutedForEntity, +): string { + return JSON.stringify( + NullableRunbooksExecutionEntityExecutedForEntity$outboundSchema.parse( + nullableRunbooksExecutionEntityExecutedForEntity, + ), + ); +} + +export function nullableRunbooksExecutionEntityExecutedForEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksExecutionEntityExecutedForEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksExecutionEntityExecutedForEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksExecutionEntityExecutedForEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbooksexecutionstepentity.ts b/src/models/components/nullablerunbooksexecutionstepentity.ts new file mode 100644 index 00000000..a4ea907a --- /dev/null +++ b/src/models/components/nullablerunbooksexecutionstepentity.ts @@ -0,0 +1,354 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableIncidentsConferenceBridgeEntity, + NullableIncidentsConferenceBridgeEntity$inboundSchema, + NullableIncidentsConferenceBridgeEntity$Outbound, + NullableIncidentsConferenceBridgeEntity$outboundSchema, +} from "./nullableincidentsconferencebridgeentity.js"; +import { + NullableRulesRuleEntity, + NullableRulesRuleEntity$inboundSchema, + NullableRulesRuleEntity$Outbound, + NullableRulesRuleEntity$outboundSchema, +} from "./nullablerulesruleentity.js"; +import { + NullableRunbooksExecutionStepExecutionEntity, + NullableRunbooksExecutionStepExecutionEntity$inboundSchema, + NullableRunbooksExecutionStepExecutionEntity$Outbound, + NullableRunbooksExecutionStepExecutionEntity$outboundSchema, +} from "./nullablerunbooksexecutionstepexecutionentity.js"; + +export type NullableRunbooksExecutionStepEntityConfig = {}; + +export type NullableRunbooksExecutionStepEntityStepElement = {}; + +export type NullableRunbooksExecutionStepEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + actionSlug?: string | null | undefined; + actionType?: string | null | undefined; + integrationName?: string | null | undefined; + integrationSlug?: string | null | undefined; + automatic?: boolean | null | undefined; + config?: NullableRunbooksExecutionStepEntityConfig | null | undefined; + stepElements?: + | Array + | null + | undefined; + executable?: boolean | null | undefined; + repeats?: boolean | null | undefined; + /** + * ISO8601 formatted duration string + */ + repeatsDuration?: string | null | undefined; + repeatsAt?: Date | null | undefined; + hasBeenRerun?: boolean | null | undefined; + hasBeenRetried?: boolean | null | undefined; + execution?: NullableRunbooksExecutionStepExecutionEntity | null | undefined; + repeatable?: boolean | null | undefined; + conferenceBridge?: NullableIncidentsConferenceBridgeEntity | null | undefined; + rule?: NullableRulesRuleEntity | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksExecutionStepEntityConfig$inboundSchema: z.ZodType< + NullableRunbooksExecutionStepEntityConfig, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableRunbooksExecutionStepEntityConfig$Outbound = {}; + +/** @internal */ +export const NullableRunbooksExecutionStepEntityConfig$outboundSchema: + z.ZodType< + NullableRunbooksExecutionStepEntityConfig$Outbound, + z.ZodTypeDef, + NullableRunbooksExecutionStepEntityConfig + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksExecutionStepEntityConfig$ { + /** @deprecated use `NullableRunbooksExecutionStepEntityConfig$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksExecutionStepEntityConfig$inboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepEntityConfig$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksExecutionStepEntityConfig$outboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepEntityConfig$Outbound` instead. */ + export type Outbound = NullableRunbooksExecutionStepEntityConfig$Outbound; +} + +export function nullableRunbooksExecutionStepEntityConfigToJSON( + nullableRunbooksExecutionStepEntityConfig: + NullableRunbooksExecutionStepEntityConfig, +): string { + return JSON.stringify( + NullableRunbooksExecutionStepEntityConfig$outboundSchema.parse( + nullableRunbooksExecutionStepEntityConfig, + ), + ); +} + +export function nullableRunbooksExecutionStepEntityConfigFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksExecutionStepEntityConfig, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksExecutionStepEntityConfig$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksExecutionStepEntityConfig' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbooksExecutionStepEntityStepElement$inboundSchema: + z.ZodType< + NullableRunbooksExecutionStepEntityStepElement, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type NullableRunbooksExecutionStepEntityStepElement$Outbound = {}; + +/** @internal */ +export const NullableRunbooksExecutionStepEntityStepElement$outboundSchema: + z.ZodType< + NullableRunbooksExecutionStepEntityStepElement$Outbound, + z.ZodTypeDef, + NullableRunbooksExecutionStepEntityStepElement + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksExecutionStepEntityStepElement$ { + /** @deprecated use `NullableRunbooksExecutionStepEntityStepElement$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksExecutionStepEntityStepElement$inboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepEntityStepElement$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksExecutionStepEntityStepElement$outboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepEntityStepElement$Outbound` instead. */ + export type Outbound = + NullableRunbooksExecutionStepEntityStepElement$Outbound; +} + +export function nullableRunbooksExecutionStepEntityStepElementToJSON( + nullableRunbooksExecutionStepEntityStepElement: + NullableRunbooksExecutionStepEntityStepElement, +): string { + return JSON.stringify( + NullableRunbooksExecutionStepEntityStepElement$outboundSchema.parse( + nullableRunbooksExecutionStepEntityStepElement, + ), + ); +} + +export function nullableRunbooksExecutionStepEntityStepElementFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksExecutionStepEntityStepElement, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksExecutionStepEntityStepElement$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksExecutionStepEntityStepElement' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbooksExecutionStepEntity$inboundSchema: z.ZodType< + NullableRunbooksExecutionStepEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + action_slug: z.nullable(z.string()).optional(), + action_type: z.nullable(z.string()).optional(), + integration_name: z.nullable(z.string()).optional(), + integration_slug: z.nullable(z.string()).optional(), + automatic: z.nullable(z.boolean()).optional(), + config: z.nullable( + z.lazy(() => NullableRunbooksExecutionStepEntityConfig$inboundSchema), + ).optional(), + step_elements: z.nullable( + z.array(z.lazy(() => + NullableRunbooksExecutionStepEntityStepElement$inboundSchema + )), + ).optional(), + executable: z.nullable(z.boolean()).optional(), + repeats: z.nullable(z.boolean()).optional(), + repeats_duration: z.nullable(z.string()).optional(), + repeats_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + has_been_rerun: z.nullable(z.boolean()).optional(), + has_been_retried: z.nullable(z.boolean()).optional(), + execution: z.nullable( + NullableRunbooksExecutionStepExecutionEntity$inboundSchema, + ).optional(), + repeatable: z.nullable(z.boolean()).optional(), + conference_bridge: z.nullable( + NullableIncidentsConferenceBridgeEntity$inboundSchema, + ).optional(), + rule: z.nullable(NullableRulesRuleEntity$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "action_slug": "actionSlug", + "action_type": "actionType", + "integration_name": "integrationName", + "integration_slug": "integrationSlug", + "step_elements": "stepElements", + "repeats_duration": "repeatsDuration", + "repeats_at": "repeatsAt", + "has_been_rerun": "hasBeenRerun", + "has_been_retried": "hasBeenRetried", + "conference_bridge": "conferenceBridge", + }); +}); + +/** @internal */ +export type NullableRunbooksExecutionStepEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + action_slug?: string | null | undefined; + action_type?: string | null | undefined; + integration_name?: string | null | undefined; + integration_slug?: string | null | undefined; + automatic?: boolean | null | undefined; + config?: + | NullableRunbooksExecutionStepEntityConfig$Outbound + | null + | undefined; + step_elements?: + | Array + | null + | undefined; + executable?: boolean | null | undefined; + repeats?: boolean | null | undefined; + repeats_duration?: string | null | undefined; + repeats_at?: string | null | undefined; + has_been_rerun?: boolean | null | undefined; + has_been_retried?: boolean | null | undefined; + execution?: + | NullableRunbooksExecutionStepExecutionEntity$Outbound + | null + | undefined; + repeatable?: boolean | null | undefined; + conference_bridge?: + | NullableIncidentsConferenceBridgeEntity$Outbound + | null + | undefined; + rule?: NullableRulesRuleEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksExecutionStepEntity$outboundSchema: z.ZodType< + NullableRunbooksExecutionStepEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksExecutionStepEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + actionSlug: z.nullable(z.string()).optional(), + actionType: z.nullable(z.string()).optional(), + integrationName: z.nullable(z.string()).optional(), + integrationSlug: z.nullable(z.string()).optional(), + automatic: z.nullable(z.boolean()).optional(), + config: z.nullable( + z.lazy(() => NullableRunbooksExecutionStepEntityConfig$outboundSchema), + ).optional(), + stepElements: z.nullable( + z.array(z.lazy(() => + NullableRunbooksExecutionStepEntityStepElement$outboundSchema + )), + ).optional(), + executable: z.nullable(z.boolean()).optional(), + repeats: z.nullable(z.boolean()).optional(), + repeatsDuration: z.nullable(z.string()).optional(), + repeatsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + hasBeenRerun: z.nullable(z.boolean()).optional(), + hasBeenRetried: z.nullable(z.boolean()).optional(), + execution: z.nullable( + NullableRunbooksExecutionStepExecutionEntity$outboundSchema, + ).optional(), + repeatable: z.nullable(z.boolean()).optional(), + conferenceBridge: z.nullable( + NullableIncidentsConferenceBridgeEntity$outboundSchema, + ).optional(), + rule: z.nullable(NullableRulesRuleEntity$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + actionSlug: "action_slug", + actionType: "action_type", + integrationName: "integration_name", + integrationSlug: "integration_slug", + stepElements: "step_elements", + repeatsDuration: "repeats_duration", + repeatsAt: "repeats_at", + hasBeenRerun: "has_been_rerun", + hasBeenRetried: "has_been_retried", + conferenceBridge: "conference_bridge", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksExecutionStepEntity$ { + /** @deprecated use `NullableRunbooksExecutionStepEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksExecutionStepEntity$inboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksExecutionStepEntity$outboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksExecutionStepEntity$Outbound; +} + +export function nullableRunbooksExecutionStepEntityToJSON( + nullableRunbooksExecutionStepEntity: NullableRunbooksExecutionStepEntity, +): string { + return JSON.stringify( + NullableRunbooksExecutionStepEntity$outboundSchema.parse( + nullableRunbooksExecutionStepEntity, + ), + ); +} + +export function nullableRunbooksExecutionStepEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableRunbooksExecutionStepEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksExecutionStepEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbooksexecutionstepexecutionentity.ts b/src/models/components/nullablerunbooksexecutionstepexecutionentity.ts new file mode 100644 index 00000000..3f1cccd7 --- /dev/null +++ b/src/models/components/nullablerunbooksexecutionstepexecutionentity.ts @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableActorEntity, + NullableActorEntity$inboundSchema, + NullableActorEntity$Outbound, + NullableActorEntity$outboundSchema, +} from "./nullableactorentity.js"; +import { + NullableRunbooksWebhookDeliveryEntity, + NullableRunbooksWebhookDeliveryEntity$inboundSchema, + NullableRunbooksWebhookDeliveryEntity$Outbound, + NullableRunbooksWebhookDeliveryEntity$outboundSchema, +} from "./nullablerunbookswebhookdeliveryentity.js"; + +export const NullableRunbooksExecutionStepExecutionEntityState = { + Initial: "initial", + Pending: "pending", + Scheduled: "scheduled", + Started: "started", + Dismissed: "dismissed", + Completed: "completed", + Errored: "errored", +} as const; +export type NullableRunbooksExecutionStepExecutionEntityState = ClosedEnum< + typeof NullableRunbooksExecutionStepExecutionEntityState +>; + +export type NullableRunbooksExecutionStepExecutionEntityData = {}; + +export type NullableRunbooksExecutionStepExecutionEntity = { + state?: NullableRunbooksExecutionStepExecutionEntityState | null | undefined; + data?: NullableRunbooksExecutionStepExecutionEntityData | null | undefined; + performedBy?: NullableActorEntity | null | undefined; + performedAt?: Date | null | undefined; + scheduledFor?: Date | null | undefined; + error?: string | null | undefined; + webhookDelivery?: NullableRunbooksWebhookDeliveryEntity | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksExecutionStepExecutionEntityState$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(NullableRunbooksExecutionStepExecutionEntityState); + +/** @internal */ +export const NullableRunbooksExecutionStepExecutionEntityState$outboundSchema: + z.ZodNativeEnum = + NullableRunbooksExecutionStepExecutionEntityState$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksExecutionStepExecutionEntityState$ { + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntityState$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksExecutionStepExecutionEntityState$inboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntityState$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksExecutionStepExecutionEntityState$outboundSchema; +} + +/** @internal */ +export const NullableRunbooksExecutionStepExecutionEntityData$inboundSchema: + z.ZodType< + NullableRunbooksExecutionStepExecutionEntityData, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type NullableRunbooksExecutionStepExecutionEntityData$Outbound = {}; + +/** @internal */ +export const NullableRunbooksExecutionStepExecutionEntityData$outboundSchema: + z.ZodType< + NullableRunbooksExecutionStepExecutionEntityData$Outbound, + z.ZodTypeDef, + NullableRunbooksExecutionStepExecutionEntityData + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksExecutionStepExecutionEntityData$ { + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntityData$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksExecutionStepExecutionEntityData$inboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntityData$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksExecutionStepExecutionEntityData$outboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntityData$Outbound` instead. */ + export type Outbound = + NullableRunbooksExecutionStepExecutionEntityData$Outbound; +} + +export function nullableRunbooksExecutionStepExecutionEntityDataToJSON( + nullableRunbooksExecutionStepExecutionEntityData: + NullableRunbooksExecutionStepExecutionEntityData, +): string { + return JSON.stringify( + NullableRunbooksExecutionStepExecutionEntityData$outboundSchema.parse( + nullableRunbooksExecutionStepExecutionEntityData, + ), + ); +} + +export function nullableRunbooksExecutionStepExecutionEntityDataFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksExecutionStepExecutionEntityData, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksExecutionStepExecutionEntityData$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksExecutionStepExecutionEntityData' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbooksExecutionStepExecutionEntity$inboundSchema: + z.ZodType< + NullableRunbooksExecutionStepExecutionEntity, + z.ZodTypeDef, + unknown + > = z.object({ + state: z.nullable( + NullableRunbooksExecutionStepExecutionEntityState$inboundSchema, + ).optional(), + data: z.nullable( + z.lazy(() => + NullableRunbooksExecutionStepExecutionEntityData$inboundSchema + ), + ).optional(), + performed_by: z.nullable(NullableActorEntity$inboundSchema).optional(), + performed_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + scheduled_for: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + error: z.nullable(z.string()).optional(), + webhook_delivery: z.nullable( + NullableRunbooksWebhookDeliveryEntity$inboundSchema, + ).optional(), + }).transform((v) => { + return remap$(v, { + "performed_by": "performedBy", + "performed_at": "performedAt", + "scheduled_for": "scheduledFor", + "webhook_delivery": "webhookDelivery", + }); + }); + +/** @internal */ +export type NullableRunbooksExecutionStepExecutionEntity$Outbound = { + state?: string | null | undefined; + data?: + | NullableRunbooksExecutionStepExecutionEntityData$Outbound + | null + | undefined; + performed_by?: NullableActorEntity$Outbound | null | undefined; + performed_at?: string | null | undefined; + scheduled_for?: string | null | undefined; + error?: string | null | undefined; + webhook_delivery?: + | NullableRunbooksWebhookDeliveryEntity$Outbound + | null + | undefined; +}; + +/** @internal */ +export const NullableRunbooksExecutionStepExecutionEntity$outboundSchema: + z.ZodType< + NullableRunbooksExecutionStepExecutionEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksExecutionStepExecutionEntity + > = z.object({ + state: z.nullable( + NullableRunbooksExecutionStepExecutionEntityState$outboundSchema, + ).optional(), + data: z.nullable( + z.lazy(() => + NullableRunbooksExecutionStepExecutionEntityData$outboundSchema + ), + ).optional(), + performedBy: z.nullable(NullableActorEntity$outboundSchema).optional(), + performedAt: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + scheduledFor: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + error: z.nullable(z.string()).optional(), + webhookDelivery: z.nullable( + NullableRunbooksWebhookDeliveryEntity$outboundSchema, + ).optional(), + }).transform((v) => { + return remap$(v, { + performedBy: "performed_by", + performedAt: "performed_at", + scheduledFor: "scheduled_for", + webhookDelivery: "webhook_delivery", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksExecutionStepExecutionEntity$ { + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksExecutionStepExecutionEntity$inboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksExecutionStepExecutionEntity$outboundSchema; + /** @deprecated use `NullableRunbooksExecutionStepExecutionEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksExecutionStepExecutionEntity$Outbound; +} + +export function nullableRunbooksExecutionStepExecutionEntityToJSON( + nullableRunbooksExecutionStepExecutionEntity: + NullableRunbooksExecutionStepExecutionEntity, +): string { + return JSON.stringify( + NullableRunbooksExecutionStepExecutionEntity$outboundSchema.parse( + nullableRunbooksExecutionStepExecutionEntity, + ), + ); +} + +export function nullableRunbooksExecutionStepExecutionEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableRunbooksExecutionStepExecutionEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableRunbooksExecutionStepExecutionEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableRunbooksExecutionStepExecutionEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookstepentity.ts b/src/models/components/nullablerunbookstepentity.ts new file mode 100644 index 00000000..e16743db --- /dev/null +++ b/src/models/components/nullablerunbookstepentity.ts @@ -0,0 +1,341 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableRulesRuleEntity, + NullableRulesRuleEntity$inboundSchema, + NullableRulesRuleEntity$Outbound, + NullableRulesRuleEntity$outboundSchema, +} from "./nullablerulesruleentity.js"; +import { + NullableRunbooksActionsEntity, + NullableRunbooksActionsEntity$inboundSchema, + NullableRunbooksActionsEntity$Outbound, + NullableRunbooksActionsEntity$outboundSchema, +} from "./nullablerunbooksactionsentity.js"; +import { + NullableVotesEntity, + NullableVotesEntity$inboundSchema, + NullableVotesEntity$Outbound, + NullableVotesEntity$outboundSchema, +} from "./nullablevotesentity.js"; + +/** + * An unstructured object of key/value pairs describing the config settings for the step. + */ +export type NullableRunbookStepEntityConfig = {}; + +export type ActionElement = {}; + +export type NullableRunbookStepEntityStepElement = {}; + +export type NullableRunbookStepEntity = { + name?: string | null | undefined; + actionId?: string | null | undefined; + stepId?: string | null | undefined; + /** + * An unstructured object of key/value pairs describing the config settings for the step. + */ + config?: NullableRunbookStepEntityConfig | null | undefined; + /** + * A list of action elements + */ + actionElements?: Array | null | undefined; + /** + * A list of step elements + */ + stepElements?: Array | null | undefined; + automatic?: boolean | null | undefined; + delayDuration?: Date | null | undefined; + action?: NullableRunbooksActionsEntity | null | undefined; + reruns?: boolean | null | undefined; + repeats?: boolean | null | undefined; + repeatsDuration?: Date | null | undefined; + votes?: NullableVotesEntity | null | undefined; + rule?: NullableRulesRuleEntity | null | undefined; +}; + +/** @internal */ +export const NullableRunbookStepEntityConfig$inboundSchema: z.ZodType< + NullableRunbookStepEntityConfig, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableRunbookStepEntityConfig$Outbound = {}; + +/** @internal */ +export const NullableRunbookStepEntityConfig$outboundSchema: z.ZodType< + NullableRunbookStepEntityConfig$Outbound, + z.ZodTypeDef, + NullableRunbookStepEntityConfig +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbookStepEntityConfig$ { + /** @deprecated use `NullableRunbookStepEntityConfig$inboundSchema` instead. */ + export const inboundSchema = NullableRunbookStepEntityConfig$inboundSchema; + /** @deprecated use `NullableRunbookStepEntityConfig$outboundSchema` instead. */ + export const outboundSchema = NullableRunbookStepEntityConfig$outboundSchema; + /** @deprecated use `NullableRunbookStepEntityConfig$Outbound` instead. */ + export type Outbound = NullableRunbookStepEntityConfig$Outbound; +} + +export function nullableRunbookStepEntityConfigToJSON( + nullableRunbookStepEntityConfig: NullableRunbookStepEntityConfig, +): string { + return JSON.stringify( + NullableRunbookStepEntityConfig$outboundSchema.parse( + nullableRunbookStepEntityConfig, + ), + ); +} + +export function nullableRunbookStepEntityConfigFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableRunbookStepEntityConfig$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbookStepEntityConfig' from JSON`, + ); +} + +/** @internal */ +export const ActionElement$inboundSchema: z.ZodType< + ActionElement, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type ActionElement$Outbound = {}; + +/** @internal */ +export const ActionElement$outboundSchema: z.ZodType< + ActionElement$Outbound, + z.ZodTypeDef, + ActionElement +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ActionElement$ { + /** @deprecated use `ActionElement$inboundSchema` instead. */ + export const inboundSchema = ActionElement$inboundSchema; + /** @deprecated use `ActionElement$outboundSchema` instead. */ + export const outboundSchema = ActionElement$outboundSchema; + /** @deprecated use `ActionElement$Outbound` instead. */ + export type Outbound = ActionElement$Outbound; +} + +export function actionElementToJSON(actionElement: ActionElement): string { + return JSON.stringify(ActionElement$outboundSchema.parse(actionElement)); +} + +export function actionElementFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ActionElement$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ActionElement' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbookStepEntityStepElement$inboundSchema: z.ZodType< + NullableRunbookStepEntityStepElement, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableRunbookStepEntityStepElement$Outbound = {}; + +/** @internal */ +export const NullableRunbookStepEntityStepElement$outboundSchema: z.ZodType< + NullableRunbookStepEntityStepElement$Outbound, + z.ZodTypeDef, + NullableRunbookStepEntityStepElement +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbookStepEntityStepElement$ { + /** @deprecated use `NullableRunbookStepEntityStepElement$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbookStepEntityStepElement$inboundSchema; + /** @deprecated use `NullableRunbookStepEntityStepElement$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbookStepEntityStepElement$outboundSchema; + /** @deprecated use `NullableRunbookStepEntityStepElement$Outbound` instead. */ + export type Outbound = NullableRunbookStepEntityStepElement$Outbound; +} + +export function nullableRunbookStepEntityStepElementToJSON( + nullableRunbookStepEntityStepElement: NullableRunbookStepEntityStepElement, +): string { + return JSON.stringify( + NullableRunbookStepEntityStepElement$outboundSchema.parse( + nullableRunbookStepEntityStepElement, + ), + ); +} + +export function nullableRunbookStepEntityStepElementFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableRunbookStepEntityStepElement$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbookStepEntityStepElement' from JSON`, + ); +} + +/** @internal */ +export const NullableRunbookStepEntity$inboundSchema: z.ZodType< + NullableRunbookStepEntity, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + action_id: z.nullable(z.string()).optional(), + step_id: z.nullable(z.string()).optional(), + config: z.nullable( + z.lazy(() => NullableRunbookStepEntityConfig$inboundSchema), + ).optional(), + action_elements: z.nullable( + z.array(z.lazy(() => ActionElement$inboundSchema)), + ).optional(), + step_elements: z.nullable( + z.array(z.lazy(() => NullableRunbookStepEntityStepElement$inboundSchema)), + ).optional(), + automatic: z.nullable(z.boolean()).optional(), + delay_duration: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + action: z.nullable(NullableRunbooksActionsEntity$inboundSchema).optional(), + reruns: z.nullable(z.boolean()).optional(), + repeats: z.nullable(z.boolean()).optional(), + repeats_duration: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + votes: z.nullable(NullableVotesEntity$inboundSchema).optional(), + rule: z.nullable(NullableRulesRuleEntity$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "action_id": "actionId", + "step_id": "stepId", + "action_elements": "actionElements", + "step_elements": "stepElements", + "delay_duration": "delayDuration", + "repeats_duration": "repeatsDuration", + }); +}); + +/** @internal */ +export type NullableRunbookStepEntity$Outbound = { + name?: string | null | undefined; + action_id?: string | null | undefined; + step_id?: string | null | undefined; + config?: NullableRunbookStepEntityConfig$Outbound | null | undefined; + action_elements?: Array | null | undefined; + step_elements?: + | Array + | null + | undefined; + automatic?: boolean | null | undefined; + delay_duration?: string | null | undefined; + action?: NullableRunbooksActionsEntity$Outbound | null | undefined; + reruns?: boolean | null | undefined; + repeats?: boolean | null | undefined; + repeats_duration?: string | null | undefined; + votes?: NullableVotesEntity$Outbound | null | undefined; + rule?: NullableRulesRuleEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableRunbookStepEntity$outboundSchema: z.ZodType< + NullableRunbookStepEntity$Outbound, + z.ZodTypeDef, + NullableRunbookStepEntity +> = z.object({ + name: z.nullable(z.string()).optional(), + actionId: z.nullable(z.string()).optional(), + stepId: z.nullable(z.string()).optional(), + config: z.nullable( + z.lazy(() => NullableRunbookStepEntityConfig$outboundSchema), + ).optional(), + actionElements: z.nullable( + z.array(z.lazy(() => ActionElement$outboundSchema)), + ).optional(), + stepElements: z.nullable( + z.array(z.lazy(() => NullableRunbookStepEntityStepElement$outboundSchema)), + ).optional(), + automatic: z.nullable(z.boolean()).optional(), + delayDuration: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + action: z.nullable(NullableRunbooksActionsEntity$outboundSchema).optional(), + reruns: z.nullable(z.boolean()).optional(), + repeats: z.nullable(z.boolean()).optional(), + repeatsDuration: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + votes: z.nullable(NullableVotesEntity$outboundSchema).optional(), + rule: z.nullable(NullableRulesRuleEntity$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + actionId: "action_id", + stepId: "step_id", + actionElements: "action_elements", + stepElements: "step_elements", + delayDuration: "delay_duration", + repeatsDuration: "repeats_duration", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbookStepEntity$ { + /** @deprecated use `NullableRunbookStepEntity$inboundSchema` instead. */ + export const inboundSchema = NullableRunbookStepEntity$inboundSchema; + /** @deprecated use `NullableRunbookStepEntity$outboundSchema` instead. */ + export const outboundSchema = NullableRunbookStepEntity$outboundSchema; + /** @deprecated use `NullableRunbookStepEntity$Outbound` instead. */ + export type Outbound = NullableRunbookStepEntity$Outbound; +} + +export function nullableRunbookStepEntityToJSON( + nullableRunbookStepEntity: NullableRunbookStepEntity, +): string { + return JSON.stringify( + NullableRunbookStepEntity$outboundSchema.parse(nullableRunbookStepEntity), + ); +} + +export function nullableRunbookStepEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableRunbookStepEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbookStepEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablerunbookswebhookdeliveryentity.ts b/src/models/components/nullablerunbookswebhookdeliveryentity.ts new file mode 100644 index 00000000..aa520b7c --- /dev/null +++ b/src/models/components/nullablerunbookswebhookdeliveryentity.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableRunbooksWebhookDeliveryEntity = { + headers?: string | null | undefined; + statusCode?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksWebhookDeliveryEntity$inboundSchema: z.ZodType< + NullableRunbooksWebhookDeliveryEntity, + z.ZodTypeDef, + unknown +> = z.object({ + headers: z.nullable(z.string()).optional(), + status_code: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "status_code": "statusCode", + }); +}); + +/** @internal */ +export type NullableRunbooksWebhookDeliveryEntity$Outbound = { + headers?: string | null | undefined; + status_code?: string | null | undefined; +}; + +/** @internal */ +export const NullableRunbooksWebhookDeliveryEntity$outboundSchema: z.ZodType< + NullableRunbooksWebhookDeliveryEntity$Outbound, + z.ZodTypeDef, + NullableRunbooksWebhookDeliveryEntity +> = z.object({ + headers: z.nullable(z.string()).optional(), + statusCode: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + statusCode: "status_code", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableRunbooksWebhookDeliveryEntity$ { + /** @deprecated use `NullableRunbooksWebhookDeliveryEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableRunbooksWebhookDeliveryEntity$inboundSchema; + /** @deprecated use `NullableRunbooksWebhookDeliveryEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableRunbooksWebhookDeliveryEntity$outboundSchema; + /** @deprecated use `NullableRunbooksWebhookDeliveryEntity$Outbound` instead. */ + export type Outbound = NullableRunbooksWebhookDeliveryEntity$Outbound; +} + +export function nullableRunbooksWebhookDeliveryEntityToJSON( + nullableRunbooksWebhookDeliveryEntity: NullableRunbooksWebhookDeliveryEntity, +): string { + return JSON.stringify( + NullableRunbooksWebhookDeliveryEntity$outboundSchema.parse( + nullableRunbooksWebhookDeliveryEntity, + ), + ); +} + +export function nullableRunbooksWebhookDeliveryEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableRunbooksWebhookDeliveryEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableRunbooksWebhookDeliveryEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablescheduleentity.ts b/src/models/components/nullablescheduleentity.ts new file mode 100644 index 00000000..36e36cf8 --- /dev/null +++ b/src/models/components/nullablescheduleentity.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableScheduleEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + integration?: string | null | undefined; + discarded?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableScheduleEntity$inboundSchema: z.ZodType< + NullableScheduleEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + integration: z.nullable(z.string()).optional(), + discarded: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type NullableScheduleEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + integration?: string | null | undefined; + discarded?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableScheduleEntity$outboundSchema: z.ZodType< + NullableScheduleEntity$Outbound, + z.ZodTypeDef, + NullableScheduleEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + integration: z.nullable(z.string()).optional(), + discarded: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableScheduleEntity$ { + /** @deprecated use `NullableScheduleEntity$inboundSchema` instead. */ + export const inboundSchema = NullableScheduleEntity$inboundSchema; + /** @deprecated use `NullableScheduleEntity$outboundSchema` instead. */ + export const outboundSchema = NullableScheduleEntity$outboundSchema; + /** @deprecated use `NullableScheduleEntity$Outbound` instead. */ + export type Outbound = NullableScheduleEntity$Outbound; +} + +export function nullableScheduleEntityToJSON( + nullableScheduleEntity: NullableScheduleEntity, +): string { + return JSON.stringify( + NullableScheduleEntity$outboundSchema.parse(nullableScheduleEntity), + ); +} + +export function nullableScheduleEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableScheduleEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableScheduleEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableserviceentity.ts b/src/models/components/nullableserviceentity.ts new file mode 100644 index 00000000..b51ebe96 --- /dev/null +++ b/src/models/components/nullableserviceentity.ts @@ -0,0 +1,416 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + ChecklistTemplateEntity, + ChecklistTemplateEntity$inboundSchema, + ChecklistTemplateEntity$Outbound, + ChecklistTemplateEntity$outboundSchema, +} from "./checklisttemplateentity.js"; +import { + ExternalResourceEntity, + ExternalResourceEntity$inboundSchema, + ExternalResourceEntity$Outbound, + ExternalResourceEntity$outboundSchema, +} from "./externalresourceentity.js"; +import { + FunctionalityEntity, + FunctionalityEntity$inboundSchema, + FunctionalityEntity$Outbound, + FunctionalityEntity$outboundSchema, +} from "./functionalityentity.js"; +import { + LinksEntity, + LinksEntity$inboundSchema, + LinksEntity$Outbound, + LinksEntity$outboundSchema, +} from "./linksentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableImportsImportableResourceEntity, + NullableImportsImportableResourceEntity$inboundSchema, + NullableImportsImportableResourceEntity$Outbound, + NullableImportsImportableResourceEntity$outboundSchema, +} from "./nullableimportsimportableresourceentity.js"; +import { + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; +import { + TeamEntityLite, + TeamEntityLite$inboundSchema, + TeamEntityLite$Outbound, + TeamEntityLite$outboundSchema, +} from "./teamentitylite.js"; + +/** + * An object of label key and values + */ +export type NullableServiceEntityLabels = {}; + +/** + * Indicates the settings of the catalog that manages this service + */ +export type NullableServiceEntityManagedBySettings = {}; + +/** + * ServiceEntity model + */ +export type NullableServiceEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + serviceTier?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + allowedParams?: Array | null | undefined; + /** + * An object of label key and values + */ + labels?: NullableServiceEntityLabels | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + /** + * List of active incident guids + */ + activeIncidents?: Array | null | undefined; + /** + * List of checklists associated with a service + */ + checklists?: Array | null | undefined; + completedChecks?: number | null | undefined; + /** + * Information about known linkages to representations of services outside of FireHydrant. + */ + externalResources?: Array | null | undefined; + /** + * List of functionalities attached to the service + */ + functionalities?: Array | null | undefined; + lastImport?: NullableImportsImportableResourceEntity | null | undefined; + /** + * List of links attached to this service. + */ + links?: Array | null | undefined; + /** + * If set, this field indicates that the service is managed by an integration and thus cannot be set manually + */ + managedBy?: string | null | undefined; + /** + * Indicates the settings of the catalog that manages this service + */ + managedBySettings?: NullableServiceEntityManagedBySettings | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; + serviceChecklistUpdatedAt?: Date | null | undefined; + /** + * List of teams attached to the service + */ + teams?: Array | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; +}; + +/** @internal */ +export const NullableServiceEntityLabels$inboundSchema: z.ZodType< + NullableServiceEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableServiceEntityLabels$Outbound = {}; + +/** @internal */ +export const NullableServiceEntityLabels$outboundSchema: z.ZodType< + NullableServiceEntityLabels$Outbound, + z.ZodTypeDef, + NullableServiceEntityLabels +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableServiceEntityLabels$ { + /** @deprecated use `NullableServiceEntityLabels$inboundSchema` instead. */ + export const inboundSchema = NullableServiceEntityLabels$inboundSchema; + /** @deprecated use `NullableServiceEntityLabels$outboundSchema` instead. */ + export const outboundSchema = NullableServiceEntityLabels$outboundSchema; + /** @deprecated use `NullableServiceEntityLabels$Outbound` instead. */ + export type Outbound = NullableServiceEntityLabels$Outbound; +} + +export function nullableServiceEntityLabelsToJSON( + nullableServiceEntityLabels: NullableServiceEntityLabels, +): string { + return JSON.stringify( + NullableServiceEntityLabels$outboundSchema.parse( + nullableServiceEntityLabels, + ), + ); +} + +export function nullableServiceEntityLabelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableServiceEntityLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableServiceEntityLabels' from JSON`, + ); +} + +/** @internal */ +export const NullableServiceEntityManagedBySettings$inboundSchema: z.ZodType< + NullableServiceEntityManagedBySettings, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableServiceEntityManagedBySettings$Outbound = {}; + +/** @internal */ +export const NullableServiceEntityManagedBySettings$outboundSchema: z.ZodType< + NullableServiceEntityManagedBySettings$Outbound, + z.ZodTypeDef, + NullableServiceEntityManagedBySettings +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableServiceEntityManagedBySettings$ { + /** @deprecated use `NullableServiceEntityManagedBySettings$inboundSchema` instead. */ + export const inboundSchema = + NullableServiceEntityManagedBySettings$inboundSchema; + /** @deprecated use `NullableServiceEntityManagedBySettings$outboundSchema` instead. */ + export const outboundSchema = + NullableServiceEntityManagedBySettings$outboundSchema; + /** @deprecated use `NullableServiceEntityManagedBySettings$Outbound` instead. */ + export type Outbound = NullableServiceEntityManagedBySettings$Outbound; +} + +export function nullableServiceEntityManagedBySettingsToJSON( + nullableServiceEntityManagedBySettings: + NullableServiceEntityManagedBySettings, +): string { + return JSON.stringify( + NullableServiceEntityManagedBySettings$outboundSchema.parse( + nullableServiceEntityManagedBySettings, + ), + ); +} + +export function nullableServiceEntityManagedBySettingsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableServiceEntityManagedBySettings$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableServiceEntityManagedBySettings' from JSON`, + ); +} + +/** @internal */ +export const NullableServiceEntity$inboundSchema: z.ZodType< + NullableServiceEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + service_tier: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + allowed_params: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => NullableServiceEntityLabels$inboundSchema)) + .optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + active_incidents: z.nullable(z.array(z.string())).optional(), + checklists: z.nullable(z.array(ChecklistTemplateEntity$inboundSchema)) + .optional(), + completed_checks: z.nullable(z.number().int()).optional(), + external_resources: z.nullable(z.array(ExternalResourceEntity$inboundSchema)) + .optional(), + functionalities: z.nullable(z.array(FunctionalityEntity$inboundSchema)) + .optional(), + last_import: z.nullable(NullableImportsImportableResourceEntity$inboundSchema) + .optional(), + links: z.nullable(z.array(LinksEntity$inboundSchema)).optional(), + managed_by: z.nullable(z.string()).optional(), + managed_by_settings: z.nullable( + z.lazy(() => NullableServiceEntityManagedBySettings$inboundSchema), + ).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + service_checklist_updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + teams: z.nullable(z.array(TeamEntityLite$inboundSchema)).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "service_tier": "serviceTier", + "created_at": "createdAt", + "updated_at": "updatedAt", + "allowed_params": "allowedParams", + "alert_on_add": "alertOnAdd", + "auto_add_responding_team": "autoAddRespondingTeam", + "active_incidents": "activeIncidents", + "completed_checks": "completedChecks", + "external_resources": "externalResources", + "last_import": "lastImport", + "managed_by": "managedBy", + "managed_by_settings": "managedBySettings", + "service_checklist_updated_at": "serviceChecklistUpdatedAt", + "updated_by": "updatedBy", + }); +}); + +/** @internal */ +export type NullableServiceEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + service_tier?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + allowed_params?: Array | null | undefined; + labels?: NullableServiceEntityLabels$Outbound | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + active_incidents?: Array | null | undefined; + checklists?: Array | null | undefined; + completed_checks?: number | null | undefined; + external_resources?: + | Array + | null + | undefined; + functionalities?: Array | null | undefined; + last_import?: + | NullableImportsImportableResourceEntity$Outbound + | null + | undefined; + links?: Array | null | undefined; + managed_by?: string | null | undefined; + managed_by_settings?: + | NullableServiceEntityManagedBySettings$Outbound + | null + | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + service_checklist_updated_at?: string | null | undefined; + teams?: Array | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableServiceEntity$outboundSchema: z.ZodType< + NullableServiceEntity$Outbound, + z.ZodTypeDef, + NullableServiceEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + serviceTier: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + allowedParams: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => NullableServiceEntityLabels$outboundSchema)) + .optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + activeIncidents: z.nullable(z.array(z.string())).optional(), + checklists: z.nullable(z.array(ChecklistTemplateEntity$outboundSchema)) + .optional(), + completedChecks: z.nullable(z.number().int()).optional(), + externalResources: z.nullable(z.array(ExternalResourceEntity$outboundSchema)) + .optional(), + functionalities: z.nullable(z.array(FunctionalityEntity$outboundSchema)) + .optional(), + lastImport: z.nullable(NullableImportsImportableResourceEntity$outboundSchema) + .optional(), + links: z.nullable(z.array(LinksEntity$outboundSchema)).optional(), + managedBy: z.nullable(z.string()).optional(), + managedBySettings: z.nullable( + z.lazy(() => NullableServiceEntityManagedBySettings$outboundSchema), + ).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + serviceChecklistUpdatedAt: z.nullable( + z.date().transform(v => v.toISOString()), + ).optional(), + teams: z.nullable(z.array(TeamEntityLite$outboundSchema)).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + serviceTier: "service_tier", + createdAt: "created_at", + updatedAt: "updated_at", + allowedParams: "allowed_params", + alertOnAdd: "alert_on_add", + autoAddRespondingTeam: "auto_add_responding_team", + activeIncidents: "active_incidents", + completedChecks: "completed_checks", + externalResources: "external_resources", + lastImport: "last_import", + managedBy: "managed_by", + managedBySettings: "managed_by_settings", + serviceChecklistUpdatedAt: "service_checklist_updated_at", + updatedBy: "updated_by", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableServiceEntity$ { + /** @deprecated use `NullableServiceEntity$inboundSchema` instead. */ + export const inboundSchema = NullableServiceEntity$inboundSchema; + /** @deprecated use `NullableServiceEntity$outboundSchema` instead. */ + export const outboundSchema = NullableServiceEntity$outboundSchema; + /** @deprecated use `NullableServiceEntity$Outbound` instead. */ + export type Outbound = NullableServiceEntity$Outbound; +} + +export function nullableServiceEntityToJSON( + nullableServiceEntity: NullableServiceEntity, +): string { + return JSON.stringify( + NullableServiceEntity$outboundSchema.parse(nullableServiceEntity), + ); +} + +export function nullableServiceEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableServiceEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableServiceEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableseveritymatrixconditionentity.ts b/src/models/components/nullableseveritymatrixconditionentity.ts new file mode 100644 index 00000000..037fdf82 --- /dev/null +++ b/src/models/components/nullableseveritymatrixconditionentity.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * SeverityMatrix_ConditionEntity model + */ +export type NullableSeverityMatrixConditionEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + /** + * Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition + */ + position?: number | null | undefined; +}; + +/** @internal */ +export const NullableSeverityMatrixConditionEntity$inboundSchema: z.ZodType< + NullableSeverityMatrixConditionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type NullableSeverityMatrixConditionEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const NullableSeverityMatrixConditionEntity$outboundSchema: z.ZodType< + NullableSeverityMatrixConditionEntity$Outbound, + z.ZodTypeDef, + NullableSeverityMatrixConditionEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSeverityMatrixConditionEntity$ { + /** @deprecated use `NullableSeverityMatrixConditionEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableSeverityMatrixConditionEntity$inboundSchema; + /** @deprecated use `NullableSeverityMatrixConditionEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableSeverityMatrixConditionEntity$outboundSchema; + /** @deprecated use `NullableSeverityMatrixConditionEntity$Outbound` instead. */ + export type Outbound = NullableSeverityMatrixConditionEntity$Outbound; +} + +export function nullableSeverityMatrixConditionEntityToJSON( + nullableSeverityMatrixConditionEntity: NullableSeverityMatrixConditionEntity, +): string { + return JSON.stringify( + NullableSeverityMatrixConditionEntity$outboundSchema.parse( + nullableSeverityMatrixConditionEntity, + ), + ); +} + +export function nullableSeverityMatrixConditionEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableSeverityMatrixConditionEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableSeverityMatrixConditionEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableseveritymatriximpactentity.ts b/src/models/components/nullableseveritymatriximpactentity.ts new file mode 100644 index 00000000..895184f9 --- /dev/null +++ b/src/models/components/nullableseveritymatriximpactentity.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * SeverityMatrix_ImpactEntity model + */ +export type NullableSeverityMatrixImpactEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + affectsId?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const NullableSeverityMatrixImpactEntity$inboundSchema: z.ZodType< + NullableSeverityMatrixImpactEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + affects_id: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "affects_id": "affectsId", + }); +}); + +/** @internal */ +export type NullableSeverityMatrixImpactEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + affects_id?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const NullableSeverityMatrixImpactEntity$outboundSchema: z.ZodType< + NullableSeverityMatrixImpactEntity$Outbound, + z.ZodTypeDef, + NullableSeverityMatrixImpactEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + affectsId: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + affectsId: "affects_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSeverityMatrixImpactEntity$ { + /** @deprecated use `NullableSeverityMatrixImpactEntity$inboundSchema` instead. */ + export const inboundSchema = NullableSeverityMatrixImpactEntity$inboundSchema; + /** @deprecated use `NullableSeverityMatrixImpactEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableSeverityMatrixImpactEntity$outboundSchema; + /** @deprecated use `NullableSeverityMatrixImpactEntity$Outbound` instead. */ + export type Outbound = NullableSeverityMatrixImpactEntity$Outbound; +} + +export function nullableSeverityMatrixImpactEntityToJSON( + nullableSeverityMatrixImpactEntity: NullableSeverityMatrixImpactEntity, +): string { + return JSON.stringify( + NullableSeverityMatrixImpactEntity$outboundSchema.parse( + nullableSeverityMatrixImpactEntity, + ), + ); +} + +export function nullableSeverityMatrixImpactEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableSeverityMatrixImpactEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableSeverityMatrixImpactEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablesignalsapiruleentity.ts b/src/models/components/nullablesignalsapiruleentity.ts new file mode 100644 index 00000000..9a356706 --- /dev/null +++ b/src/models/components/nullablesignalsapiruleentity.ts @@ -0,0 +1,240 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableSignalsAPITargetEntity, + NullableSignalsAPITargetEntity$inboundSchema, + NullableSignalsAPITargetEntity$Outbound, + NullableSignalsAPITargetEntity$outboundSchema, +} from "./nullablesignalsapitargetentity.js"; +import { + NullableSuccinctEntity, + NullableSuccinctEntity$inboundSchema, + NullableSuccinctEntity$Outbound, + NullableSuccinctEntity$outboundSchema, +} from "./nullablesuccinctentity.js"; + +export const NullableSignalsAPIRuleEntityNotificationPriorityOverride = { + High: "HIGH", + Medium: "MEDIUM", + Low: "LOW", +} as const; +export type NullableSignalsAPIRuleEntityNotificationPriorityOverride = + ClosedEnum; + +export const NullableSignalsAPIRuleEntityCreateIncidentConditionWhen = { + WhenUnspecified: "WHEN_UNSPECIFIED", + WhenAlways: "WHEN_ALWAYS", +} as const; +export type NullableSignalsAPIRuleEntityCreateIncidentConditionWhen = + ClosedEnum; + +export type NullableSignalsAPIRuleEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + expression?: string | null | undefined; + teamId?: string | null | undefined; + target?: NullableSignalsAPITargetEntity | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + incidentType?: NullableSuccinctEntity | null | undefined; + notificationPriorityOverride?: + | NullableSignalsAPIRuleEntityNotificationPriorityOverride + | null + | undefined; + createIncidentConditionWhen?: + | NullableSignalsAPIRuleEntityCreateIncidentConditionWhen + | null + | undefined; + /** + * Duration for deduplicating similar alerts (ISO8601 duration format e.g., 'PT30M', 'PT2H', 'P1D') + */ + deduplicationExpiry?: string | null | undefined; +}; + +/** @internal */ +export const NullableSignalsAPIRuleEntityNotificationPriorityOverride$inboundSchema: + z.ZodNativeEnum< + typeof NullableSignalsAPIRuleEntityNotificationPriorityOverride + > = z.nativeEnum(NullableSignalsAPIRuleEntityNotificationPriorityOverride); + +/** @internal */ +export const NullableSignalsAPIRuleEntityNotificationPriorityOverride$outboundSchema: + z.ZodNativeEnum< + typeof NullableSignalsAPIRuleEntityNotificationPriorityOverride + > = NullableSignalsAPIRuleEntityNotificationPriorityOverride$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSignalsAPIRuleEntityNotificationPriorityOverride$ { + /** @deprecated use `NullableSignalsAPIRuleEntityNotificationPriorityOverride$inboundSchema` instead. */ + export const inboundSchema = + NullableSignalsAPIRuleEntityNotificationPriorityOverride$inboundSchema; + /** @deprecated use `NullableSignalsAPIRuleEntityNotificationPriorityOverride$outboundSchema` instead. */ + export const outboundSchema = + NullableSignalsAPIRuleEntityNotificationPriorityOverride$outboundSchema; +} + +/** @internal */ +export const NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$inboundSchema: + z.ZodNativeEnum< + typeof NullableSignalsAPIRuleEntityCreateIncidentConditionWhen + > = z.nativeEnum(NullableSignalsAPIRuleEntityCreateIncidentConditionWhen); + +/** @internal */ +export const NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$outboundSchema: + z.ZodNativeEnum< + typeof NullableSignalsAPIRuleEntityCreateIncidentConditionWhen + > = NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$ { + /** @deprecated use `NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$inboundSchema` instead. */ + export const inboundSchema = + NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$inboundSchema; + /** @deprecated use `NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$outboundSchema` instead. */ + export const outboundSchema = + NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$outboundSchema; +} + +/** @internal */ +export const NullableSignalsAPIRuleEntity$inboundSchema: z.ZodType< + NullableSignalsAPIRuleEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + expression: z.nullable(z.string()).optional(), + team_id: z.nullable(z.string()).optional(), + target: z.nullable(NullableSignalsAPITargetEntity$inboundSchema).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + incident_type: z.nullable(NullableSuccinctEntity$inboundSchema).optional(), + notification_priority_override: z.nullable( + NullableSignalsAPIRuleEntityNotificationPriorityOverride$inboundSchema, + ).optional(), + create_incident_condition_when: z.nullable( + NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$inboundSchema, + ).optional(), + deduplication_expiry: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "created_by": "createdBy", + "created_at": "createdAt", + "updated_at": "updatedAt", + "incident_type": "incidentType", + "notification_priority_override": "notificationPriorityOverride", + "create_incident_condition_when": "createIncidentConditionWhen", + "deduplication_expiry": "deduplicationExpiry", + }); +}); + +/** @internal */ +export type NullableSignalsAPIRuleEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + expression?: string | null | undefined; + team_id?: string | null | undefined; + target?: NullableSignalsAPITargetEntity$Outbound | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + incident_type?: NullableSuccinctEntity$Outbound | null | undefined; + notification_priority_override?: string | null | undefined; + create_incident_condition_when?: string | null | undefined; + deduplication_expiry?: string | null | undefined; +}; + +/** @internal */ +export const NullableSignalsAPIRuleEntity$outboundSchema: z.ZodType< + NullableSignalsAPIRuleEntity$Outbound, + z.ZodTypeDef, + NullableSignalsAPIRuleEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + expression: z.nullable(z.string()).optional(), + teamId: z.nullable(z.string()).optional(), + target: z.nullable(NullableSignalsAPITargetEntity$outboundSchema).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + incidentType: z.nullable(NullableSuccinctEntity$outboundSchema).optional(), + notificationPriorityOverride: z.nullable( + NullableSignalsAPIRuleEntityNotificationPriorityOverride$outboundSchema, + ).optional(), + createIncidentConditionWhen: z.nullable( + NullableSignalsAPIRuleEntityCreateIncidentConditionWhen$outboundSchema, + ).optional(), + deduplicationExpiry: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + createdBy: "created_by", + createdAt: "created_at", + updatedAt: "updated_at", + incidentType: "incident_type", + notificationPriorityOverride: "notification_priority_override", + createIncidentConditionWhen: "create_incident_condition_when", + deduplicationExpiry: "deduplication_expiry", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSignalsAPIRuleEntity$ { + /** @deprecated use `NullableSignalsAPIRuleEntity$inboundSchema` instead. */ + export const inboundSchema = NullableSignalsAPIRuleEntity$inboundSchema; + /** @deprecated use `NullableSignalsAPIRuleEntity$outboundSchema` instead. */ + export const outboundSchema = NullableSignalsAPIRuleEntity$outboundSchema; + /** @deprecated use `NullableSignalsAPIRuleEntity$Outbound` instead. */ + export type Outbound = NullableSignalsAPIRuleEntity$Outbound; +} + +export function nullableSignalsAPIRuleEntityToJSON( + nullableSignalsAPIRuleEntity: NullableSignalsAPIRuleEntity, +): string { + return JSON.stringify( + NullableSignalsAPIRuleEntity$outboundSchema.parse( + nullableSignalsAPIRuleEntity, + ), + ); +} + +export function nullableSignalsAPIRuleEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableSignalsAPIRuleEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableSignalsAPIRuleEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablesignalsapitargetentity.ts b/src/models/components/nullablesignalsapitargetentity.ts new file mode 100644 index 00000000..d25a7d7a --- /dev/null +++ b/src/models/components/nullablesignalsapitargetentity.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableSignalsAPITargetEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + isPageable?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableSignalsAPITargetEntity$inboundSchema: z.ZodType< + NullableSignalsAPITargetEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + is_pageable: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "is_pageable": "isPageable", + }); +}); + +/** @internal */ +export type NullableSignalsAPITargetEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + is_pageable?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableSignalsAPITargetEntity$outboundSchema: z.ZodType< + NullableSignalsAPITargetEntity$Outbound, + z.ZodTypeDef, + NullableSignalsAPITargetEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + isPageable: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + isPageable: "is_pageable", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSignalsAPITargetEntity$ { + /** @deprecated use `NullableSignalsAPITargetEntity$inboundSchema` instead. */ + export const inboundSchema = NullableSignalsAPITargetEntity$inboundSchema; + /** @deprecated use `NullableSignalsAPITargetEntity$outboundSchema` instead. */ + export const outboundSchema = NullableSignalsAPITargetEntity$outboundSchema; + /** @deprecated use `NullableSignalsAPITargetEntity$Outbound` instead. */ + export type Outbound = NullableSignalsAPITargetEntity$Outbound; +} + +export function nullableSignalsAPITargetEntityToJSON( + nullableSignalsAPITargetEntity: NullableSignalsAPITargetEntity, +): string { + return JSON.stringify( + NullableSignalsAPITargetEntity$outboundSchema.parse( + nullableSignalsAPITargetEntity, + ), + ); +} + +export function nullableSignalsAPITargetEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableSignalsAPITargetEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableSignalsAPITargetEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablesignalsapitransposerentity.ts b/src/models/components/nullablesignalsapitransposerentity.ts new file mode 100644 index 00000000..d280e18f --- /dev/null +++ b/src/models/components/nullablesignalsapitransposerentity.ts @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; + +export type ExamplePayload = {}; + +export type NullableSignalsAPITransposerEntity = { + name?: string | null | undefined; + slug?: string | null | undefined; + examplePayload?: ExamplePayload | null | undefined; + expression?: string | null | undefined; + expected?: string | null | undefined; + website?: string | null | undefined; + description?: string | null | undefined; + tags?: Array | null | undefined; + ingestUrl?: string | null | undefined; + editable?: boolean | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; +}; + +/** @internal */ +export const ExamplePayload$inboundSchema: z.ZodType< + ExamplePayload, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type ExamplePayload$Outbound = {}; + +/** @internal */ +export const ExamplePayload$outboundSchema: z.ZodType< + ExamplePayload$Outbound, + z.ZodTypeDef, + ExamplePayload +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExamplePayload$ { + /** @deprecated use `ExamplePayload$inboundSchema` instead. */ + export const inboundSchema = ExamplePayload$inboundSchema; + /** @deprecated use `ExamplePayload$outboundSchema` instead. */ + export const outboundSchema = ExamplePayload$outboundSchema; + /** @deprecated use `ExamplePayload$Outbound` instead. */ + export type Outbound = ExamplePayload$Outbound; +} + +export function examplePayloadToJSON(examplePayload: ExamplePayload): string { + return JSON.stringify(ExamplePayload$outboundSchema.parse(examplePayload)); +} + +export function examplePayloadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ExamplePayload$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExamplePayload' from JSON`, + ); +} + +/** @internal */ +export const NullableSignalsAPITransposerEntity$inboundSchema: z.ZodType< + NullableSignalsAPITransposerEntity, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + example_payload: z.nullable(z.lazy(() => ExamplePayload$inboundSchema)) + .optional(), + expression: z.nullable(z.string()).optional(), + expected: z.nullable(z.string()).optional(), + website: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + tags: z.nullable(z.array(z.string())).optional(), + ingest_url: z.nullable(z.string()).optional(), + editable: z.nullable(z.boolean()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "example_payload": "examplePayload", + "ingest_url": "ingestUrl", + "created_by": "createdBy", + "updated_by": "updatedBy", + }); +}); + +/** @internal */ +export type NullableSignalsAPITransposerEntity$Outbound = { + name?: string | null | undefined; + slug?: string | null | undefined; + example_payload?: ExamplePayload$Outbound | null | undefined; + expression?: string | null | undefined; + expected?: string | null | undefined; + website?: string | null | undefined; + description?: string | null | undefined; + tags?: Array | null | undefined; + ingest_url?: string | null | undefined; + editable?: boolean | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableSignalsAPITransposerEntity$outboundSchema: z.ZodType< + NullableSignalsAPITransposerEntity$Outbound, + z.ZodTypeDef, + NullableSignalsAPITransposerEntity +> = z.object({ + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + examplePayload: z.nullable(z.lazy(() => ExamplePayload$outboundSchema)) + .optional(), + expression: z.nullable(z.string()).optional(), + expected: z.nullable(z.string()).optional(), + website: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + tags: z.nullable(z.array(z.string())).optional(), + ingestUrl: z.nullable(z.string()).optional(), + editable: z.nullable(z.boolean()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + examplePayload: "example_payload", + ingestUrl: "ingest_url", + createdBy: "created_by", + updatedBy: "updated_by", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSignalsAPITransposerEntity$ { + /** @deprecated use `NullableSignalsAPITransposerEntity$inboundSchema` instead. */ + export const inboundSchema = NullableSignalsAPITransposerEntity$inboundSchema; + /** @deprecated use `NullableSignalsAPITransposerEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableSignalsAPITransposerEntity$outboundSchema; + /** @deprecated use `NullableSignalsAPITransposerEntity$Outbound` instead. */ + export type Outbound = NullableSignalsAPITransposerEntity$Outbound; +} + +export function nullableSignalsAPITransposerEntityToJSON( + nullableSignalsAPITransposerEntity: NullableSignalsAPITransposerEntity, +): string { + return JSON.stringify( + NullableSignalsAPITransposerEntity$outboundSchema.parse( + nullableSignalsAPITransposerEntity, + ), + ); +} + +export function nullableSignalsAPITransposerEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableSignalsAPITransposerEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableSignalsAPITransposerEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableslimrunbookentity.ts b/src/models/components/nullableslimrunbookentity.ts new file mode 100644 index 00000000..56411ffc --- /dev/null +++ b/src/models/components/nullableslimrunbookentity.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableRulesRuleEntity, + NullableRulesRuleEntity$inboundSchema, + NullableRulesRuleEntity$Outbound, + NullableRulesRuleEntity$outboundSchema, +} from "./nullablerulesruleentity.js"; +import { + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; + +export type NullableSlimRunbookEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + attachmentRule?: NullableRulesRuleEntity | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; + /** + * categories the runbook applies to + */ + categories?: Array | null | undefined; +}; + +/** @internal */ +export const NullableSlimRunbookEntity$inboundSchema: z.ZodType< + NullableSlimRunbookEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + attachment_rule: z.nullable(NullableRulesRuleEntity$inboundSchema).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + categories: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "updated_at": "updatedAt", + "attachment_rule": "attachmentRule", + }); +}); + +/** @internal */ +export type NullableSlimRunbookEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + attachment_rule?: NullableRulesRuleEntity$Outbound | null | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + categories?: Array | null | undefined; +}; + +/** @internal */ +export const NullableSlimRunbookEntity$outboundSchema: z.ZodType< + NullableSlimRunbookEntity$Outbound, + z.ZodTypeDef, + NullableSlimRunbookEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + attachmentRule: z.nullable(NullableRulesRuleEntity$outboundSchema).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + categories: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + updatedAt: "updated_at", + attachmentRule: "attachment_rule", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSlimRunbookEntity$ { + /** @deprecated use `NullableSlimRunbookEntity$inboundSchema` instead. */ + export const inboundSchema = NullableSlimRunbookEntity$inboundSchema; + /** @deprecated use `NullableSlimRunbookEntity$outboundSchema` instead. */ + export const outboundSchema = NullableSlimRunbookEntity$outboundSchema; + /** @deprecated use `NullableSlimRunbookEntity$Outbound` instead. */ + export type Outbound = NullableSlimRunbookEntity$Outbound; +} + +export function nullableSlimRunbookEntityToJSON( + nullableSlimRunbookEntity: NullableSlimRunbookEntity, +): string { + return JSON.stringify( + NullableSlimRunbookEntity$outboundSchema.parse(nullableSlimRunbookEntity), + ); +} + +export function nullableSlimRunbookEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableSlimRunbookEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableSlimRunbookEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablesuccinctentity.ts b/src/models/components/nullablesuccinctentity.ts new file mode 100644 index 00000000..10de676f --- /dev/null +++ b/src/models/components/nullablesuccinctentity.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableSuccinctEntity = { + id?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableSuccinctEntity$inboundSchema: z.ZodType< + NullableSuccinctEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NullableSuccinctEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; +}; + +/** @internal */ +export const NullableSuccinctEntity$outboundSchema: z.ZodType< + NullableSuccinctEntity$Outbound, + z.ZodTypeDef, + NullableSuccinctEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableSuccinctEntity$ { + /** @deprecated use `NullableSuccinctEntity$inboundSchema` instead. */ + export const inboundSchema = NullableSuccinctEntity$inboundSchema; + /** @deprecated use `NullableSuccinctEntity$outboundSchema` instead. */ + export const outboundSchema = NullableSuccinctEntity$outboundSchema; + /** @deprecated use `NullableSuccinctEntity$Outbound` instead. */ + export type Outbound = NullableSuccinctEntity$Outbound; +} + +export function nullableSuccinctEntityToJSON( + nullableSuccinctEntity: NullableSuccinctEntity, +): string { + return JSON.stringify( + NullableSuccinctEntity$outboundSchema.parse(nullableSuccinctEntity), + ); +} + +export function nullableSuccinctEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableSuccinctEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableSuccinctEntity' from JSON`, + ); +} diff --git a/src/models/components/nullabletasklistitementity.ts b/src/models/components/nullabletasklistitementity.ts new file mode 100644 index 00000000..53ea7151 --- /dev/null +++ b/src/models/components/nullabletasklistitementity.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type NullableTaskListItemEntity = { + summary?: string | null | undefined; + description?: string | null | undefined; +}; + +/** @internal */ +export const NullableTaskListItemEntity$inboundSchema: z.ZodType< + NullableTaskListItemEntity, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type NullableTaskListItemEntity$Outbound = { + summary?: string | null | undefined; + description?: string | null | undefined; +}; + +/** @internal */ +export const NullableTaskListItemEntity$outboundSchema: z.ZodType< + NullableTaskListItemEntity$Outbound, + z.ZodTypeDef, + NullableTaskListItemEntity +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTaskListItemEntity$ { + /** @deprecated use `NullableTaskListItemEntity$inboundSchema` instead. */ + export const inboundSchema = NullableTaskListItemEntity$inboundSchema; + /** @deprecated use `NullableTaskListItemEntity$outboundSchema` instead. */ + export const outboundSchema = NullableTaskListItemEntity$outboundSchema; + /** @deprecated use `NullableTaskListItemEntity$Outbound` instead. */ + export type Outbound = NullableTaskListItemEntity$Outbound; +} + +export function nullableTaskListItemEntityToJSON( + nullableTaskListItemEntity: NullableTaskListItemEntity, +): string { + return JSON.stringify( + NullableTaskListItemEntity$outboundSchema.parse(nullableTaskListItemEntity), + ); +} + +export function nullableTaskListItemEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableTaskListItemEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableTaskListItemEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableteamentitylite.ts b/src/models/components/nullableteamentitylite.ts new file mode 100644 index 00000000..0ed7231b --- /dev/null +++ b/src/models/components/nullableteamentitylite.ts @@ -0,0 +1,125 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; + +export type NullableTeamEntityLite = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + signalsIcalUrl?: string | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + inSupportHours?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableTeamEntityLite$inboundSchema: z.ZodType< + NullableTeamEntityLite, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + signals_ical_url: z.nullable(z.string()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + in_support_hours: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "updated_at": "updatedAt", + "signals_ical_url": "signalsIcalUrl", + "created_by": "createdBy", + "in_support_hours": "inSupportHours", + }); +}); + +/** @internal */ +export type NullableTeamEntityLite$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + signals_ical_url?: string | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + in_support_hours?: boolean | null | undefined; +}; + +/** @internal */ +export const NullableTeamEntityLite$outboundSchema: z.ZodType< + NullableTeamEntityLite$Outbound, + z.ZodTypeDef, + NullableTeamEntityLite +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + signalsIcalUrl: z.nullable(z.string()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + inSupportHours: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + updatedAt: "updated_at", + signalsIcalUrl: "signals_ical_url", + createdBy: "created_by", + inSupportHours: "in_support_hours", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTeamEntityLite$ { + /** @deprecated use `NullableTeamEntityLite$inboundSchema` instead. */ + export const inboundSchema = NullableTeamEntityLite$inboundSchema; + /** @deprecated use `NullableTeamEntityLite$outboundSchema` instead. */ + export const outboundSchema = NullableTeamEntityLite$outboundSchema; + /** @deprecated use `NullableTeamEntityLite$Outbound` instead. */ + export type Outbound = NullableTeamEntityLite$Outbound; +} + +export function nullableTeamEntityLiteToJSON( + nullableTeamEntityLite: NullableTeamEntityLite, +): string { + return JSON.stringify( + NullableTeamEntityLite$outboundSchema.parse(nullableTeamEntityLite), + ); +} + +export function nullableTeamEntityLiteFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableTeamEntityLite$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableTeamEntityLite' from JSON`, + ); +} diff --git a/src/models/components/nullableticketingpriorityentity.ts b/src/models/components/nullableticketingpriorityentity.ts new file mode 100644 index 00000000..d0b536de --- /dev/null +++ b/src/models/components/nullableticketingpriorityentity.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Ticketing_PriorityEntity model + */ +export type NullableTicketingPriorityEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; +}; + +/** @internal */ +export const NullableTicketingPriorityEntity$inboundSchema: z.ZodType< + NullableTicketingPriorityEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +/** @internal */ +export type NullableTicketingPriorityEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; +}; + +/** @internal */ +export const NullableTicketingPriorityEntity$outboundSchema: z.ZodType< + NullableTicketingPriorityEntity$Outbound, + z.ZodTypeDef, + NullableTicketingPriorityEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingPriorityEntity$ { + /** @deprecated use `NullableTicketingPriorityEntity$inboundSchema` instead. */ + export const inboundSchema = NullableTicketingPriorityEntity$inboundSchema; + /** @deprecated use `NullableTicketingPriorityEntity$outboundSchema` instead. */ + export const outboundSchema = NullableTicketingPriorityEntity$outboundSchema; + /** @deprecated use `NullableTicketingPriorityEntity$Outbound` instead. */ + export type Outbound = NullableTicketingPriorityEntity$Outbound; +} + +export function nullableTicketingPriorityEntityToJSON( + nullableTicketingPriorityEntity: NullableTicketingPriorityEntity, +): string { + return JSON.stringify( + NullableTicketingPriorityEntity$outboundSchema.parse( + nullableTicketingPriorityEntity, + ), + ); +} + +export function nullableTicketingPriorityEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableTicketingPriorityEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableTicketingPriorityEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableticketingprojectconfigentity.ts b/src/models/components/nullableticketingprojectconfigentity.ts new file mode 100644 index 00000000..6ea2bb2c --- /dev/null +++ b/src/models/components/nullableticketingprojectconfigentity.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A config object containing details about the project config. Can be one of: Ticketing::JiraCloud::ProjectConfigEntity, Ticketing::JiraOnprem::ProjectConfigEntity, or Ticketing::Shortcut::ProjectConfigEntity + */ +export type NullableTicketingProjectConfigEntityDetails = {}; + +/** + * Ticketing_ProjectConfigEntity model + */ +export type NullableTicketingProjectConfigEntity = { + id?: string | null | undefined; + connectionId?: string | null | undefined; + connectionType?: string | null | undefined; + ticketingProjectId?: string | null | undefined; + ticketingProjectName?: string | null | undefined; + /** + * A config object containing details about the project config. Can be one of: Ticketing::JiraCloud::ProjectConfigEntity, Ticketing::JiraOnprem::ProjectConfigEntity, or Ticketing::Shortcut::ProjectConfigEntity + */ + details?: NullableTicketingProjectConfigEntityDetails | null | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectConfigEntityDetails$inboundSchema: + z.ZodType< + NullableTicketingProjectConfigEntityDetails, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type NullableTicketingProjectConfigEntityDetails$Outbound = {}; + +/** @internal */ +export const NullableTicketingProjectConfigEntityDetails$outboundSchema: + z.ZodType< + NullableTicketingProjectConfigEntityDetails$Outbound, + z.ZodTypeDef, + NullableTicketingProjectConfigEntityDetails + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingProjectConfigEntityDetails$ { + /** @deprecated use `NullableTicketingProjectConfigEntityDetails$inboundSchema` instead. */ + export const inboundSchema = + NullableTicketingProjectConfigEntityDetails$inboundSchema; + /** @deprecated use `NullableTicketingProjectConfigEntityDetails$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingProjectConfigEntityDetails$outboundSchema; + /** @deprecated use `NullableTicketingProjectConfigEntityDetails$Outbound` instead. */ + export type Outbound = NullableTicketingProjectConfigEntityDetails$Outbound; +} + +export function nullableTicketingProjectConfigEntityDetailsToJSON( + nullableTicketingProjectConfigEntityDetails: + NullableTicketingProjectConfigEntityDetails, +): string { + return JSON.stringify( + NullableTicketingProjectConfigEntityDetails$outboundSchema.parse( + nullableTicketingProjectConfigEntityDetails, + ), + ); +} + +export function nullableTicketingProjectConfigEntityDetailsFromJSON( + jsonString: string, +): SafeParseResult< + NullableTicketingProjectConfigEntityDetails, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableTicketingProjectConfigEntityDetails$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableTicketingProjectConfigEntityDetails' from JSON`, + ); +} + +/** @internal */ +export const NullableTicketingProjectConfigEntity$inboundSchema: z.ZodType< + NullableTicketingProjectConfigEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + connection_type: z.nullable(z.string()).optional(), + ticketing_project_id: z.nullable(z.string()).optional(), + ticketing_project_name: z.nullable(z.string()).optional(), + details: z.nullable( + z.lazy(() => NullableTicketingProjectConfigEntityDetails$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "connection_id": "connectionId", + "connection_type": "connectionType", + "ticketing_project_id": "ticketingProjectId", + "ticketing_project_name": "ticketingProjectName", + }); +}); + +/** @internal */ +export type NullableTicketingProjectConfigEntity$Outbound = { + id?: string | null | undefined; + connection_id?: string | null | undefined; + connection_type?: string | null | undefined; + ticketing_project_id?: string | null | undefined; + ticketing_project_name?: string | null | undefined; + details?: + | NullableTicketingProjectConfigEntityDetails$Outbound + | null + | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectConfigEntity$outboundSchema: z.ZodType< + NullableTicketingProjectConfigEntity$Outbound, + z.ZodTypeDef, + NullableTicketingProjectConfigEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + connectionType: z.nullable(z.string()).optional(), + ticketingProjectId: z.nullable(z.string()).optional(), + ticketingProjectName: z.nullable(z.string()).optional(), + details: z.nullable( + z.lazy(() => NullableTicketingProjectConfigEntityDetails$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + connectionId: "connection_id", + connectionType: "connection_type", + ticketingProjectId: "ticketing_project_id", + ticketingProjectName: "ticketing_project_name", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingProjectConfigEntity$ { + /** @deprecated use `NullableTicketingProjectConfigEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableTicketingProjectConfigEntity$inboundSchema; + /** @deprecated use `NullableTicketingProjectConfigEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingProjectConfigEntity$outboundSchema; + /** @deprecated use `NullableTicketingProjectConfigEntity$Outbound` instead. */ + export type Outbound = NullableTicketingProjectConfigEntity$Outbound; +} + +export function nullableTicketingProjectConfigEntityToJSON( + nullableTicketingProjectConfigEntity: NullableTicketingProjectConfigEntity, +): string { + return JSON.stringify( + NullableTicketingProjectConfigEntity$outboundSchema.parse( + nullableTicketingProjectConfigEntity, + ), + ); +} + +export function nullableTicketingProjectConfigEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableTicketingProjectConfigEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableTicketingProjectConfigEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableticketingprojectfieldmapcaseselseentity.ts b/src/models/components/nullableticketingprojectfieldmapcaseselseentity.ts new file mode 100644 index 00000000..3cfd4f18 --- /dev/null +++ b/src/models/components/nullableticketingprojectfieldmapcaseselseentity.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableTicketingProjectFieldMapExternalValueEntity, + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema, + NullableTicketingProjectFieldMapExternalValueEntity$Outbound, + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema, +} from "./nullableticketingprojectfieldmapexternalvalueentity.js"; + +export type NullableTicketingProjectFieldMapCasesElseEntity = { + externalValue?: + | NullableTicketingProjectFieldMapExternalValueEntity + | null + | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectFieldMapCasesElseEntity$inboundSchema: + z.ZodType< + NullableTicketingProjectFieldMapCasesElseEntity, + z.ZodTypeDef, + unknown + > = z.object({ + external_value: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema, + ).optional(), + }).transform((v) => { + return remap$(v, { + "external_value": "externalValue", + }); + }); + +/** @internal */ +export type NullableTicketingProjectFieldMapCasesElseEntity$Outbound = { + external_value?: + | NullableTicketingProjectFieldMapExternalValueEntity$Outbound + | null + | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectFieldMapCasesElseEntity$outboundSchema: + z.ZodType< + NullableTicketingProjectFieldMapCasesElseEntity$Outbound, + z.ZodTypeDef, + NullableTicketingProjectFieldMapCasesElseEntity + > = z.object({ + externalValue: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema, + ).optional(), + }).transform((v) => { + return remap$(v, { + externalValue: "external_value", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingProjectFieldMapCasesElseEntity$ { + /** @deprecated use `NullableTicketingProjectFieldMapCasesElseEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableTicketingProjectFieldMapCasesElseEntity$inboundSchema; + /** @deprecated use `NullableTicketingProjectFieldMapCasesElseEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingProjectFieldMapCasesElseEntity$outboundSchema; + /** @deprecated use `NullableTicketingProjectFieldMapCasesElseEntity$Outbound` instead. */ + export type Outbound = + NullableTicketingProjectFieldMapCasesElseEntity$Outbound; +} + +export function nullableTicketingProjectFieldMapCasesElseEntityToJSON( + nullableTicketingProjectFieldMapCasesElseEntity: + NullableTicketingProjectFieldMapCasesElseEntity, +): string { + return JSON.stringify( + NullableTicketingProjectFieldMapCasesElseEntity$outboundSchema.parse( + nullableTicketingProjectFieldMapCasesElseEntity, + ), + ); +} + +export function nullableTicketingProjectFieldMapCasesElseEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableTicketingProjectFieldMapCasesElseEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableTicketingProjectFieldMapCasesElseEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableTicketingProjectFieldMapCasesElseEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableticketingprojectfieldmapentity.ts b/src/models/components/nullableticketingprojectfieldmapentity.ts new file mode 100644 index 00000000..3f30b7b7 --- /dev/null +++ b/src/models/components/nullableticketingprojectfieldmapentity.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + TicketingProjectFieldMapBodyEntity, + TicketingProjectFieldMapBodyEntity$inboundSchema, + TicketingProjectFieldMapBodyEntity$Outbound, + TicketingProjectFieldMapBodyEntity$outboundSchema, +} from "./ticketingprojectfieldmapbodyentity.js"; + +/** + * Ticketing_ProjectFieldMapEntity model + */ +export type NullableTicketingProjectFieldMapEntity = { + id?: string | null | undefined; + connectionId?: string | null | undefined; + connectionType?: string | null | undefined; + ticketingProjectId?: string | null | undefined; + body?: Array | null | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectFieldMapEntity$inboundSchema: z.ZodType< + NullableTicketingProjectFieldMapEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + connection_type: z.nullable(z.string()).optional(), + ticketing_project_id: z.nullable(z.string()).optional(), + body: z.nullable(z.array(TicketingProjectFieldMapBodyEntity$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "connection_id": "connectionId", + "connection_type": "connectionType", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type NullableTicketingProjectFieldMapEntity$Outbound = { + id?: string | null | undefined; + connection_id?: string | null | undefined; + connection_type?: string | null | undefined; + ticketing_project_id?: string | null | undefined; + body?: Array | null | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectFieldMapEntity$outboundSchema: z.ZodType< + NullableTicketingProjectFieldMapEntity$Outbound, + z.ZodTypeDef, + NullableTicketingProjectFieldMapEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + connectionType: z.nullable(z.string()).optional(), + ticketingProjectId: z.nullable(z.string()).optional(), + body: z.nullable(z.array(TicketingProjectFieldMapBodyEntity$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + connectionId: "connection_id", + connectionType: "connection_type", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingProjectFieldMapEntity$ { + /** @deprecated use `NullableTicketingProjectFieldMapEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableTicketingProjectFieldMapEntity$inboundSchema; + /** @deprecated use `NullableTicketingProjectFieldMapEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingProjectFieldMapEntity$outboundSchema; + /** @deprecated use `NullableTicketingProjectFieldMapEntity$Outbound` instead. */ + export type Outbound = NullableTicketingProjectFieldMapEntity$Outbound; +} + +export function nullableTicketingProjectFieldMapEntityToJSON( + nullableTicketingProjectFieldMapEntity: + NullableTicketingProjectFieldMapEntity, +): string { + return JSON.stringify( + NullableTicketingProjectFieldMapEntity$outboundSchema.parse( + nullableTicketingProjectFieldMapEntity, + ), + ); +} + +export function nullableTicketingProjectFieldMapEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + NullableTicketingProjectFieldMapEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableTicketingProjectFieldMapEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableticketingprojectfieldmapexternalvalueentity.ts b/src/models/components/nullableticketingprojectfieldmapexternalvalueentity.ts new file mode 100644 index 00000000..3cf80a04 --- /dev/null +++ b/src/models/components/nullableticketingprojectfieldmapexternalvalueentity.ts @@ -0,0 +1,133 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const NullableTicketingProjectFieldMapExternalValueEntityType = { + Literal: "literal", + FhAttribute: "fh-attribute", + FhType: "fh-type", +} as const; +export type NullableTicketingProjectFieldMapExternalValueEntityType = + ClosedEnum; + +export type NullableTicketingProjectFieldMapExternalValueEntity = { + type?: + | NullableTicketingProjectFieldMapExternalValueEntityType + | null + | undefined; + value?: string | null | undefined; + attribute?: string | null | undefined; + presentation?: string | null | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectFieldMapExternalValueEntityType$inboundSchema: + z.ZodNativeEnum< + typeof NullableTicketingProjectFieldMapExternalValueEntityType + > = z.nativeEnum(NullableTicketingProjectFieldMapExternalValueEntityType); + +/** @internal */ +export const NullableTicketingProjectFieldMapExternalValueEntityType$outboundSchema: + z.ZodNativeEnum< + typeof NullableTicketingProjectFieldMapExternalValueEntityType + > = NullableTicketingProjectFieldMapExternalValueEntityType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingProjectFieldMapExternalValueEntityType$ { + /** @deprecated use `NullableTicketingProjectFieldMapExternalValueEntityType$inboundSchema` instead. */ + export const inboundSchema = + NullableTicketingProjectFieldMapExternalValueEntityType$inboundSchema; + /** @deprecated use `NullableTicketingProjectFieldMapExternalValueEntityType$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingProjectFieldMapExternalValueEntityType$outboundSchema; +} + +/** @internal */ +export const NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema: + z.ZodType< + NullableTicketingProjectFieldMapExternalValueEntity, + z.ZodTypeDef, + unknown + > = z.object({ + type: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntityType$inboundSchema, + ).optional(), + value: z.nullable(z.string()).optional(), + attribute: z.nullable(z.string()).optional(), + presentation: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type NullableTicketingProjectFieldMapExternalValueEntity$Outbound = { + type?: string | null | undefined; + value?: string | null | undefined; + attribute?: string | null | undefined; + presentation?: string | null | undefined; +}; + +/** @internal */ +export const NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema: + z.ZodType< + NullableTicketingProjectFieldMapExternalValueEntity$Outbound, + z.ZodTypeDef, + NullableTicketingProjectFieldMapExternalValueEntity + > = z.object({ + type: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntityType$outboundSchema, + ).optional(), + value: z.nullable(z.string()).optional(), + attribute: z.nullable(z.string()).optional(), + presentation: z.nullable(z.string()).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingProjectFieldMapExternalValueEntity$ { + /** @deprecated use `NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema` instead. */ + export const inboundSchema = + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema; + /** @deprecated use `NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema; + /** @deprecated use `NullableTicketingProjectFieldMapExternalValueEntity$Outbound` instead. */ + export type Outbound = + NullableTicketingProjectFieldMapExternalValueEntity$Outbound; +} + +export function nullableTicketingProjectFieldMapExternalValueEntityToJSON( + nullableTicketingProjectFieldMapExternalValueEntity: + NullableTicketingProjectFieldMapExternalValueEntity, +): string { + return JSON.stringify( + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema.parse( + nullableTicketingProjectFieldMapExternalValueEntity, + ), + ); +} + +export function nullableTicketingProjectFieldMapExternalValueEntityFromJSON( + jsonString: string, +): SafeParseResult< + NullableTicketingProjectFieldMapExternalValueEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableTicketingProjectFieldMapExternalValueEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableticketingticketentity.ts b/src/models/components/nullableticketingticketentity.ts new file mode 100644 index 00000000..ce68032b --- /dev/null +++ b/src/models/components/nullableticketingticketentity.ts @@ -0,0 +1,352 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + AuthorEntity, + AuthorEntity$inboundSchema, + AuthorEntity$Outbound, + AuthorEntity$outboundSchema, +} from "./authorentity.js"; +import { + NullableAttachmentsLinkEntity, + NullableAttachmentsLinkEntity$inboundSchema, + NullableAttachmentsLinkEntity$Outbound, + NullableAttachmentsLinkEntity$outboundSchema, +} from "./nullableattachmentslinkentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableTicketingPriorityEntity, + NullableTicketingPriorityEntity$inboundSchema, + NullableTicketingPriorityEntity$Outbound, + NullableTicketingPriorityEntity$outboundSchema, +} from "./nullableticketingpriorityentity.js"; + +export const NullableTicketingTicketEntityState = { + Open: "open", + InProgress: "in_progress", + Cancelled: "cancelled", + Done: "done", +} as const; +export type NullableTicketingTicketEntityState = ClosedEnum< + typeof NullableTicketingTicketEntityState +>; + +export const NullableTicketingTicketEntityType = { + Incident: "incident", + Task: "task", + FollowUp: "follow_up", +} as const; +export type NullableTicketingTicketEntityType = ClosedEnum< + typeof NullableTicketingTicketEntityType +>; + +export type NullableTicketingTicketEntityAttachment = {}; + +/** + * Ticketing_TicketEntity model + */ +export type NullableTicketingTicketEntity = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + state?: NullableTicketingTicketEntityState | null | undefined; + type?: NullableTicketingTicketEntityType | null | undefined; + assignees?: Array | null | undefined; + priority?: NullableTicketingPriorityEntity | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + /** + * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity + */ + attachments?: + | Array + | null + | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + tagList?: Array | null | undefined; + /** + * ID of incident that this ticket is related to + */ + incidentId?: string | null | undefined; + /** + * Name of incident that this ticket is related to + */ + incidentName?: string | null | undefined; + /** + * Milestone of incident that this ticket is related to + */ + incidentCurrentMilestone?: string | null | undefined; + /** + * ID of task that this ticket is related to + */ + taskId?: string | null | undefined; + dueAt?: Date | null | undefined; + link?: NullableAttachmentsLinkEntity | null | undefined; +}; + +/** @internal */ +export const NullableTicketingTicketEntityState$inboundSchema: z.ZodNativeEnum< + typeof NullableTicketingTicketEntityState +> = z.nativeEnum(NullableTicketingTicketEntityState); + +/** @internal */ +export const NullableTicketingTicketEntityState$outboundSchema: z.ZodNativeEnum< + typeof NullableTicketingTicketEntityState +> = NullableTicketingTicketEntityState$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingTicketEntityState$ { + /** @deprecated use `NullableTicketingTicketEntityState$inboundSchema` instead. */ + export const inboundSchema = NullableTicketingTicketEntityState$inboundSchema; + /** @deprecated use `NullableTicketingTicketEntityState$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingTicketEntityState$outboundSchema; +} + +/** @internal */ +export const NullableTicketingTicketEntityType$inboundSchema: z.ZodNativeEnum< + typeof NullableTicketingTicketEntityType +> = z.nativeEnum(NullableTicketingTicketEntityType); + +/** @internal */ +export const NullableTicketingTicketEntityType$outboundSchema: z.ZodNativeEnum< + typeof NullableTicketingTicketEntityType +> = NullableTicketingTicketEntityType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingTicketEntityType$ { + /** @deprecated use `NullableTicketingTicketEntityType$inboundSchema` instead. */ + export const inboundSchema = NullableTicketingTicketEntityType$inboundSchema; + /** @deprecated use `NullableTicketingTicketEntityType$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingTicketEntityType$outboundSchema; +} + +/** @internal */ +export const NullableTicketingTicketEntityAttachment$inboundSchema: z.ZodType< + NullableTicketingTicketEntityAttachment, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type NullableTicketingTicketEntityAttachment$Outbound = {}; + +/** @internal */ +export const NullableTicketingTicketEntityAttachment$outboundSchema: z.ZodType< + NullableTicketingTicketEntityAttachment$Outbound, + z.ZodTypeDef, + NullableTicketingTicketEntityAttachment +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingTicketEntityAttachment$ { + /** @deprecated use `NullableTicketingTicketEntityAttachment$inboundSchema` instead. */ + export const inboundSchema = + NullableTicketingTicketEntityAttachment$inboundSchema; + /** @deprecated use `NullableTicketingTicketEntityAttachment$outboundSchema` instead. */ + export const outboundSchema = + NullableTicketingTicketEntityAttachment$outboundSchema; + /** @deprecated use `NullableTicketingTicketEntityAttachment$Outbound` instead. */ + export type Outbound = NullableTicketingTicketEntityAttachment$Outbound; +} + +export function nullableTicketingTicketEntityAttachmentToJSON( + nullableTicketingTicketEntityAttachment: + NullableTicketingTicketEntityAttachment, +): string { + return JSON.stringify( + NullableTicketingTicketEntityAttachment$outboundSchema.parse( + nullableTicketingTicketEntityAttachment, + ), + ); +} + +export function nullableTicketingTicketEntityAttachmentFromJSON( + jsonString: string, +): SafeParseResult< + NullableTicketingTicketEntityAttachment, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + NullableTicketingTicketEntityAttachment$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'NullableTicketingTicketEntityAttachment' from JSON`, + ); +} + +/** @internal */ +export const NullableTicketingTicketEntity$inboundSchema: z.ZodType< + NullableTicketingTicketEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(NullableTicketingTicketEntityState$inboundSchema) + .optional(), + type: z.nullable(NullableTicketingTicketEntityType$inboundSchema).optional(), + assignees: z.nullable(z.array(AuthorEntity$inboundSchema)).optional(), + priority: z.nullable(NullableTicketingPriorityEntity$inboundSchema) + .optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + attachments: z.nullable( + z.array( + z.lazy(() => NullableTicketingTicketEntityAttachment$inboundSchema), + ), + ).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + incident_id: z.nullable(z.string()).optional(), + incident_name: z.nullable(z.string()).optional(), + incident_current_milestone: z.nullable(z.string()).optional(), + task_id: z.nullable(z.string()).optional(), + due_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + link: z.nullable(NullableAttachmentsLinkEntity$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "created_by": "createdBy", + "created_at": "createdAt", + "updated_at": "updatedAt", + "tag_list": "tagList", + "incident_id": "incidentId", + "incident_name": "incidentName", + "incident_current_milestone": "incidentCurrentMilestone", + "task_id": "taskId", + "due_at": "dueAt", + }); +}); + +/** @internal */ +export type NullableTicketingTicketEntity$Outbound = { + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + type?: string | null | undefined; + assignees?: Array | null | undefined; + priority?: NullableTicketingPriorityEntity$Outbound | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + attachments?: + | Array + | null + | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + tag_list?: Array | null | undefined; + incident_id?: string | null | undefined; + incident_name?: string | null | undefined; + incident_current_milestone?: string | null | undefined; + task_id?: string | null | undefined; + due_at?: string | null | undefined; + link?: NullableAttachmentsLinkEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const NullableTicketingTicketEntity$outboundSchema: z.ZodType< + NullableTicketingTicketEntity$Outbound, + z.ZodTypeDef, + NullableTicketingTicketEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(NullableTicketingTicketEntityState$outboundSchema) + .optional(), + type: z.nullable(NullableTicketingTicketEntityType$outboundSchema).optional(), + assignees: z.nullable(z.array(AuthorEntity$outboundSchema)).optional(), + priority: z.nullable(NullableTicketingPriorityEntity$outboundSchema) + .optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + attachments: z.nullable( + z.array( + z.lazy(() => NullableTicketingTicketEntityAttachment$outboundSchema), + ), + ).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + incidentId: z.nullable(z.string()).optional(), + incidentName: z.nullable(z.string()).optional(), + incidentCurrentMilestone: z.nullable(z.string()).optional(), + taskId: z.nullable(z.string()).optional(), + dueAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + link: z.nullable(NullableAttachmentsLinkEntity$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + createdBy: "created_by", + createdAt: "created_at", + updatedAt: "updated_at", + tagList: "tag_list", + incidentId: "incident_id", + incidentName: "incident_name", + incidentCurrentMilestone: "incident_current_milestone", + taskId: "task_id", + dueAt: "due_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableTicketingTicketEntity$ { + /** @deprecated use `NullableTicketingTicketEntity$inboundSchema` instead. */ + export const inboundSchema = NullableTicketingTicketEntity$inboundSchema; + /** @deprecated use `NullableTicketingTicketEntity$outboundSchema` instead. */ + export const outboundSchema = NullableTicketingTicketEntity$outboundSchema; + /** @deprecated use `NullableTicketingTicketEntity$Outbound` instead. */ + export type Outbound = NullableTicketingTicketEntity$Outbound; +} + +export function nullableTicketingTicketEntityToJSON( + nullableTicketingTicketEntity: NullableTicketingTicketEntity, +): string { + return JSON.stringify( + NullableTicketingTicketEntity$outboundSchema.parse( + nullableTicketingTicketEntity, + ), + ); +} + +export function nullableTicketingTicketEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableTicketingTicketEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableTicketingTicketEntity' from JSON`, + ); +} diff --git a/src/models/components/nullableuserentity.ts b/src/models/components/nullableuserentity.ts new file mode 100644 index 00000000..94378aac --- /dev/null +++ b/src/models/components/nullableuserentity.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * UserEntity model + */ +export type NullableUserEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + email?: string | null | undefined; + slackUserId?: string | null | undefined; + slackLinked?: boolean | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + signalsEnabledNotificationTypes?: Array | null | undefined; +}; + +/** @internal */ +export const NullableUserEntity$inboundSchema: z.ZodType< + NullableUserEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + slack_user_id: z.nullable(z.string()).optional(), + "slack_linked?": z.nullable(z.boolean()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + signals_enabled_notification_types: z.nullable(z.array(z.string())) + .optional(), +}).transform((v) => { + return remap$(v, { + "slack_user_id": "slackUserId", + "slack_linked?": "slackLinked", + "created_at": "createdAt", + "updated_at": "updatedAt", + "signals_enabled_notification_types": "signalsEnabledNotificationTypes", + }); +}); + +/** @internal */ +export type NullableUserEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + email?: string | null | undefined; + slack_user_id?: string | null | undefined; + "slack_linked?"?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + signals_enabled_notification_types?: Array | null | undefined; +}; + +/** @internal */ +export const NullableUserEntity$outboundSchema: z.ZodType< + NullableUserEntity$Outbound, + z.ZodTypeDef, + NullableUserEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + slackUserId: z.nullable(z.string()).optional(), + slackLinked: z.nullable(z.boolean()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + signalsEnabledNotificationTypes: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + slackUserId: "slack_user_id", + slackLinked: "slack_linked?", + createdAt: "created_at", + updatedAt: "updated_at", + signalsEnabledNotificationTypes: "signals_enabled_notification_types", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableUserEntity$ { + /** @deprecated use `NullableUserEntity$inboundSchema` instead. */ + export const inboundSchema = NullableUserEntity$inboundSchema; + /** @deprecated use `NullableUserEntity$outboundSchema` instead. */ + export const outboundSchema = NullableUserEntity$outboundSchema; + /** @deprecated use `NullableUserEntity$Outbound` instead. */ + export type Outbound = NullableUserEntity$Outbound; +} + +export function nullableUserEntityToJSON( + nullableUserEntity: NullableUserEntity, +): string { + return JSON.stringify( + NullableUserEntity$outboundSchema.parse(nullableUserEntity), + ); +} + +export function nullableUserEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableUserEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableUserEntity' from JSON`, + ); +} diff --git a/src/models/components/nullablevotesentity.ts b/src/models/components/nullablevotesentity.ts new file mode 100644 index 00000000..8f696396 --- /dev/null +++ b/src/models/components/nullablevotesentity.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * VotesEntity model + */ +export type NullableVotesEntity = { + /** + * Whether or not the current actor has voted + */ + voted?: boolean | null | undefined; + /** + * Whether or not the current actor has voted positively + */ + liked?: boolean | null | undefined; + /** + * Whether or not the current actor has voted negatively + */ + disliked?: boolean | null | undefined; + likes?: number | null | undefined; + dislikes?: number | null | undefined; +}; + +/** @internal */ +export const NullableVotesEntity$inboundSchema: z.ZodType< + NullableVotesEntity, + z.ZodTypeDef, + unknown +> = z.object({ + voted: z.nullable(z.boolean()).optional(), + liked: z.nullable(z.boolean()).optional(), + disliked: z.nullable(z.boolean()).optional(), + likes: z.nullable(z.number().int()).optional(), + dislikes: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type NullableVotesEntity$Outbound = { + voted?: boolean | null | undefined; + liked?: boolean | null | undefined; + disliked?: boolean | null | undefined; + likes?: number | null | undefined; + dislikes?: number | null | undefined; +}; + +/** @internal */ +export const NullableVotesEntity$outboundSchema: z.ZodType< + NullableVotesEntity$Outbound, + z.ZodTypeDef, + NullableVotesEntity +> = z.object({ + voted: z.nullable(z.boolean()).optional(), + liked: z.nullable(z.boolean()).optional(), + disliked: z.nullable(z.boolean()).optional(), + likes: z.nullable(z.number().int()).optional(), + dislikes: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace NullableVotesEntity$ { + /** @deprecated use `NullableVotesEntity$inboundSchema` instead. */ + export const inboundSchema = NullableVotesEntity$inboundSchema; + /** @deprecated use `NullableVotesEntity$outboundSchema` instead. */ + export const outboundSchema = NullableVotesEntity$outboundSchema; + /** @deprecated use `NullableVotesEntity$Outbound` instead. */ + export type Outbound = NullableVotesEntity$Outbound; +} + +export function nullableVotesEntityToJSON( + nullableVotesEntity: NullableVotesEntity, +): string { + return JSON.stringify( + NullableVotesEntity$outboundSchema.parse(nullableVotesEntity), + ); +} + +export function nullableVotesEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => NullableVotesEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'NullableVotesEntity' from JSON`, + ); +} diff --git a/src/models/components/nunccomponententity.ts b/src/models/components/nunccomponententity.ts deleted file mode 100644 index baaac286..00000000 --- a/src/models/components/nunccomponententity.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type NuncComponentEntity = { - infrastructureType?: string | undefined; - infrastructureId?: string | undefined; - label?: string | undefined; - position?: number | undefined; - componentGroupId?: string | undefined; -}; - -/** @internal */ -export const NuncComponentEntity$inboundSchema: z.ZodType< - NuncComponentEntity, - z.ZodTypeDef, - unknown -> = z.object({ - infrastructure_type: z.string().optional(), - infrastructure_id: z.string().optional(), - label: z.string().optional(), - position: z.number().int().optional(), - component_group_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "infrastructure_type": "infrastructureType", - "infrastructure_id": "infrastructureId", - "component_group_id": "componentGroupId", - }); -}); - -/** @internal */ -export type NuncComponentEntity$Outbound = { - infrastructure_type?: string | undefined; - infrastructure_id?: string | undefined; - label?: string | undefined; - position?: number | undefined; - component_group_id?: string | undefined; -}; - -/** @internal */ -export const NuncComponentEntity$outboundSchema: z.ZodType< - NuncComponentEntity$Outbound, - z.ZodTypeDef, - NuncComponentEntity -> = z.object({ - infrastructureType: z.string().optional(), - infrastructureId: z.string().optional(), - label: z.string().optional(), - position: z.number().int().optional(), - componentGroupId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - infrastructureType: "infrastructure_type", - infrastructureId: "infrastructure_id", - componentGroupId: "component_group_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NuncComponentEntity$ { - /** @deprecated use `NuncComponentEntity$inboundSchema` instead. */ - export const inboundSchema = NuncComponentEntity$inboundSchema; - /** @deprecated use `NuncComponentEntity$outboundSchema` instead. */ - export const outboundSchema = NuncComponentEntity$outboundSchema; - /** @deprecated use `NuncComponentEntity$Outbound` instead. */ - export type Outbound = NuncComponentEntity$Outbound; -} - -export function nuncComponentEntityToJSON( - nuncComponentEntity: NuncComponentEntity, -): string { - return JSON.stringify( - NuncComponentEntity$outboundSchema.parse(nuncComponentEntity), - ); -} - -export function nuncComponentEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => NuncComponentEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'NuncComponentEntity' from JSON`, - ); -} diff --git a/src/models/components/nunccomponentgroupentity.ts b/src/models/components/nunccomponentgroupentity.ts deleted file mode 100644 index 8ee44658..00000000 --- a/src/models/components/nunccomponentgroupentity.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type NuncComponentGroupEntity = { - id?: string | undefined; - componentGroupId?: string | undefined; - name?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const NuncComponentGroupEntity$inboundSchema: z.ZodType< - NuncComponentGroupEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - component_group_id: z.string().optional(), - name: z.string().optional(), - position: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "component_group_id": "componentGroupId", - }); -}); - -/** @internal */ -export type NuncComponentGroupEntity$Outbound = { - id?: string | undefined; - component_group_id?: string | undefined; - name?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const NuncComponentGroupEntity$outboundSchema: z.ZodType< - NuncComponentGroupEntity$Outbound, - z.ZodTypeDef, - NuncComponentGroupEntity -> = z.object({ - id: z.string().optional(), - componentGroupId: z.string().optional(), - name: z.string().optional(), - position: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - componentGroupId: "component_group_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NuncComponentGroupEntity$ { - /** @deprecated use `NuncComponentGroupEntity$inboundSchema` instead. */ - export const inboundSchema = NuncComponentGroupEntity$inboundSchema; - /** @deprecated use `NuncComponentGroupEntity$outboundSchema` instead. */ - export const outboundSchema = NuncComponentGroupEntity$outboundSchema; - /** @deprecated use `NuncComponentGroupEntity$Outbound` instead. */ - export type Outbound = NuncComponentGroupEntity$Outbound; -} - -export function nuncComponentGroupEntityToJSON( - nuncComponentGroupEntity: NuncComponentGroupEntity, -): string { - return JSON.stringify( - NuncComponentGroupEntity$outboundSchema.parse(nuncComponentGroupEntity), - ); -} - -export function nuncComponentGroupEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => NuncComponentGroupEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'NuncComponentGroupEntity' from JSON`, - ); -} diff --git a/src/models/components/nuncconditionentity.ts b/src/models/components/nuncconditionentity.ts deleted file mode 100644 index 3493983f..00000000 --- a/src/models/components/nuncconditionentity.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type NuncConditionEntity = { - nuncCondition?: string | undefined; - conditionName?: string | undefined; - conditionId?: string | undefined; -}; - -/** @internal */ -export const NuncConditionEntity$inboundSchema: z.ZodType< - NuncConditionEntity, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_condition: z.string().optional(), - condition_name: z.string().optional(), - condition_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "nunc_condition": "nuncCondition", - "condition_name": "conditionName", - "condition_id": "conditionId", - }); -}); - -/** @internal */ -export type NuncConditionEntity$Outbound = { - nunc_condition?: string | undefined; - condition_name?: string | undefined; - condition_id?: string | undefined; -}; - -/** @internal */ -export const NuncConditionEntity$outboundSchema: z.ZodType< - NuncConditionEntity$Outbound, - z.ZodTypeDef, - NuncConditionEntity -> = z.object({ - nuncCondition: z.string().optional(), - conditionName: z.string().optional(), - conditionId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - nuncCondition: "nunc_condition", - conditionName: "condition_name", - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NuncConditionEntity$ { - /** @deprecated use `NuncConditionEntity$inboundSchema` instead. */ - export const inboundSchema = NuncConditionEntity$inboundSchema; - /** @deprecated use `NuncConditionEntity$outboundSchema` instead. */ - export const outboundSchema = NuncConditionEntity$outboundSchema; - /** @deprecated use `NuncConditionEntity$Outbound` instead. */ - export type Outbound = NuncConditionEntity$Outbound; -} - -export function nuncConditionEntityToJSON( - nuncConditionEntity: NuncConditionEntity, -): string { - return JSON.stringify( - NuncConditionEntity$outboundSchema.parse(nuncConditionEntity), - ); -} - -export function nuncConditionEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => NuncConditionEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'NuncConditionEntity' from JSON`, - ); -} diff --git a/src/models/components/nuncconnectionentity.ts b/src/models/components/nuncconnectionentity.ts index f12b539d..79057830 100644 --- a/src/models/components/nuncconnectionentity.ts +++ b/src/models/components/nuncconnectionentity.ts @@ -14,64 +14,64 @@ import { LinksEntity$outboundSchema, } from "./linksentity.js"; import { - MediaImageEntity, - MediaImageEntity$inboundSchema, - MediaImageEntity$Outbound, - MediaImageEntity$outboundSchema, -} from "./mediaimageentity.js"; + NullableMediaImageEntity, + NullableMediaImageEntity$inboundSchema, + NullableMediaImageEntity$Outbound, + NullableMediaImageEntity$outboundSchema, +} from "./nullablemediaimageentity.js"; import { - NuncComponentEntity, - NuncComponentEntity$inboundSchema, - NuncComponentEntity$Outbound, - NuncComponentEntity$outboundSchema, -} from "./nunccomponententity.js"; + NullableNuncComponentEntity, + NullableNuncComponentEntity$inboundSchema, + NullableNuncComponentEntity$Outbound, + NullableNuncComponentEntity$outboundSchema, +} from "./nullablenunccomponententity.js"; import { - NuncComponentGroupEntity, - NuncComponentGroupEntity$inboundSchema, - NuncComponentGroupEntity$Outbound, - NuncComponentGroupEntity$outboundSchema, -} from "./nunccomponentgroupentity.js"; + NullableNuncComponentGroupEntity, + NullableNuncComponentGroupEntity$inboundSchema, + NullableNuncComponentGroupEntity$Outbound, + NullableNuncComponentGroupEntity$outboundSchema, +} from "./nullablenunccomponentgroupentity.js"; import { - NuncConditionEntity, - NuncConditionEntity$inboundSchema, - NuncConditionEntity$Outbound, - NuncConditionEntity$outboundSchema, -} from "./nuncconditionentity.js"; + NullableNuncConditionEntity, + NullableNuncConditionEntity$inboundSchema, + NullableNuncConditionEntity$Outbound, + NullableNuncConditionEntity$outboundSchema, +} from "./nullablenuncconditionentity.js"; /** * NuncConnectionEntity model */ export type NuncConnectionEntity = { - id?: string | undefined; - domain?: string | undefined; - companyName?: string | undefined; - companyWebsite?: string | undefined; - cname?: string | undefined; - greetingTitle?: string | undefined; - greetingBody?: string | undefined; - operationalMessage?: string | undefined; - companyTosUrl?: string | undefined; - primaryColor?: string | undefined; - secondaryColor?: string | undefined; - buttonBackgroundColor?: string | undefined; - buttonTextColor?: string | undefined; - linkColor?: string | undefined; - title?: string | undefined; - exposedFields?: string | undefined; - conditions?: NuncConditionEntity | undefined; - components?: NuncComponentEntity | undefined; - componentGroups?: NuncComponentGroupEntity | undefined; - logo?: MediaImageEntity | undefined; - coverImage?: MediaImageEntity | undefined; - favicon?: MediaImageEntity | undefined; - openGraphImage?: MediaImageEntity | undefined; - darkLogo?: MediaImageEntity | undefined; - enableHistogram?: boolean | undefined; - uiVersion?: number | undefined; + id?: string | null | undefined; + domain?: string | null | undefined; + companyName?: string | null | undefined; + companyWebsite?: string | null | undefined; + cname?: string | null | undefined; + greetingTitle?: string | null | undefined; + greetingBody?: string | null | undefined; + operationalMessage?: string | null | undefined; + companyTosUrl?: string | null | undefined; + primaryColor?: string | null | undefined; + secondaryColor?: string | null | undefined; + buttonBackgroundColor?: string | null | undefined; + buttonTextColor?: string | null | undefined; + linkColor?: string | null | undefined; + title?: string | null | undefined; + exposedFields?: Array | null | undefined; + conditions?: NullableNuncConditionEntity | null | undefined; + components?: NullableNuncComponentEntity | null | undefined; + componentGroups?: NullableNuncComponentGroupEntity | null | undefined; + logo?: NullableMediaImageEntity | null | undefined; + coverImage?: NullableMediaImageEntity | null | undefined; + favicon?: NullableMediaImageEntity | null | undefined; + openGraphImage?: NullableMediaImageEntity | null | undefined; + darkLogo?: NullableMediaImageEntity | null | undefined; + enableHistogram?: boolean | null | undefined; + uiVersion?: number | null | undefined; /** * List of links attached to this status page. */ - links?: Array | undefined; + links?: Array | null | undefined; }; /** @internal */ @@ -80,33 +80,35 @@ export const NuncConnectionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - domain: z.string().optional(), - company_name: z.string().optional(), - company_website: z.string().optional(), - cname: z.string().optional(), - greeting_title: z.string().optional(), - greeting_body: z.string().optional(), - operational_message: z.string().optional(), - company_tos_url: z.string().optional(), - primary_color: z.string().optional(), - secondary_color: z.string().optional(), - button_background_color: z.string().optional(), - button_text_color: z.string().optional(), - link_color: z.string().optional(), - title: z.string().optional(), - exposed_fields: z.string().optional(), - conditions: NuncConditionEntity$inboundSchema.optional(), - components: NuncComponentEntity$inboundSchema.optional(), - component_groups: NuncComponentGroupEntity$inboundSchema.optional(), - logo: MediaImageEntity$inboundSchema.optional(), - cover_image: MediaImageEntity$inboundSchema.optional(), - favicon: MediaImageEntity$inboundSchema.optional(), - open_graph_image: MediaImageEntity$inboundSchema.optional(), - dark_logo: MediaImageEntity$inboundSchema.optional(), - enable_histogram: z.boolean().optional(), - ui_version: z.number().int().optional(), - links: z.array(LinksEntity$inboundSchema).optional(), + id: z.nullable(z.string()).optional(), + domain: z.nullable(z.string()).optional(), + company_name: z.nullable(z.string()).optional(), + company_website: z.nullable(z.string()).optional(), + cname: z.nullable(z.string()).optional(), + greeting_title: z.nullable(z.string()).optional(), + greeting_body: z.nullable(z.string()).optional(), + operational_message: z.nullable(z.string()).optional(), + company_tos_url: z.nullable(z.string()).optional(), + primary_color: z.nullable(z.string()).optional(), + secondary_color: z.nullable(z.string()).optional(), + button_background_color: z.nullable(z.string()).optional(), + button_text_color: z.nullable(z.string()).optional(), + link_color: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + exposed_fields: z.nullable(z.array(z.string())).optional(), + conditions: z.nullable(NullableNuncConditionEntity$inboundSchema).optional(), + components: z.nullable(NullableNuncComponentEntity$inboundSchema).optional(), + component_groups: z.nullable(NullableNuncComponentGroupEntity$inboundSchema) + .optional(), + logo: z.nullable(NullableMediaImageEntity$inboundSchema).optional(), + cover_image: z.nullable(NullableMediaImageEntity$inboundSchema).optional(), + favicon: z.nullable(NullableMediaImageEntity$inboundSchema).optional(), + open_graph_image: z.nullable(NullableMediaImageEntity$inboundSchema) + .optional(), + dark_logo: z.nullable(NullableMediaImageEntity$inboundSchema).optional(), + enable_histogram: z.nullable(z.boolean()).optional(), + ui_version: z.nullable(z.number().int()).optional(), + links: z.nullable(z.array(LinksEntity$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "company_name": "companyName", @@ -132,33 +134,36 @@ export const NuncConnectionEntity$inboundSchema: z.ZodType< /** @internal */ export type NuncConnectionEntity$Outbound = { - id?: string | undefined; - domain?: string | undefined; - company_name?: string | undefined; - company_website?: string | undefined; - cname?: string | undefined; - greeting_title?: string | undefined; - greeting_body?: string | undefined; - operational_message?: string | undefined; - company_tos_url?: string | undefined; - primary_color?: string | undefined; - secondary_color?: string | undefined; - button_background_color?: string | undefined; - button_text_color?: string | undefined; - link_color?: string | undefined; - title?: string | undefined; - exposed_fields?: string | undefined; - conditions?: NuncConditionEntity$Outbound | undefined; - components?: NuncComponentEntity$Outbound | undefined; - component_groups?: NuncComponentGroupEntity$Outbound | undefined; - logo?: MediaImageEntity$Outbound | undefined; - cover_image?: MediaImageEntity$Outbound | undefined; - favicon?: MediaImageEntity$Outbound | undefined; - open_graph_image?: MediaImageEntity$Outbound | undefined; - dark_logo?: MediaImageEntity$Outbound | undefined; - enable_histogram?: boolean | undefined; - ui_version?: number | undefined; - links?: Array | undefined; + id?: string | null | undefined; + domain?: string | null | undefined; + company_name?: string | null | undefined; + company_website?: string | null | undefined; + cname?: string | null | undefined; + greeting_title?: string | null | undefined; + greeting_body?: string | null | undefined; + operational_message?: string | null | undefined; + company_tos_url?: string | null | undefined; + primary_color?: string | null | undefined; + secondary_color?: string | null | undefined; + button_background_color?: string | null | undefined; + button_text_color?: string | null | undefined; + link_color?: string | null | undefined; + title?: string | null | undefined; + exposed_fields?: Array | null | undefined; + conditions?: NullableNuncConditionEntity$Outbound | null | undefined; + components?: NullableNuncComponentEntity$Outbound | null | undefined; + component_groups?: + | NullableNuncComponentGroupEntity$Outbound + | null + | undefined; + logo?: NullableMediaImageEntity$Outbound | null | undefined; + cover_image?: NullableMediaImageEntity$Outbound | null | undefined; + favicon?: NullableMediaImageEntity$Outbound | null | undefined; + open_graph_image?: NullableMediaImageEntity$Outbound | null | undefined; + dark_logo?: NullableMediaImageEntity$Outbound | null | undefined; + enable_histogram?: boolean | null | undefined; + ui_version?: number | null | undefined; + links?: Array | null | undefined; }; /** @internal */ @@ -167,33 +172,35 @@ export const NuncConnectionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, NuncConnectionEntity > = z.object({ - id: z.string().optional(), - domain: z.string().optional(), - companyName: z.string().optional(), - companyWebsite: z.string().optional(), - cname: z.string().optional(), - greetingTitle: z.string().optional(), - greetingBody: z.string().optional(), - operationalMessage: z.string().optional(), - companyTosUrl: z.string().optional(), - primaryColor: z.string().optional(), - secondaryColor: z.string().optional(), - buttonBackgroundColor: z.string().optional(), - buttonTextColor: z.string().optional(), - linkColor: z.string().optional(), - title: z.string().optional(), - exposedFields: z.string().optional(), - conditions: NuncConditionEntity$outboundSchema.optional(), - components: NuncComponentEntity$outboundSchema.optional(), - componentGroups: NuncComponentGroupEntity$outboundSchema.optional(), - logo: MediaImageEntity$outboundSchema.optional(), - coverImage: MediaImageEntity$outboundSchema.optional(), - favicon: MediaImageEntity$outboundSchema.optional(), - openGraphImage: MediaImageEntity$outboundSchema.optional(), - darkLogo: MediaImageEntity$outboundSchema.optional(), - enableHistogram: z.boolean().optional(), - uiVersion: z.number().int().optional(), - links: z.array(LinksEntity$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + domain: z.nullable(z.string()).optional(), + companyName: z.nullable(z.string()).optional(), + companyWebsite: z.nullable(z.string()).optional(), + cname: z.nullable(z.string()).optional(), + greetingTitle: z.nullable(z.string()).optional(), + greetingBody: z.nullable(z.string()).optional(), + operationalMessage: z.nullable(z.string()).optional(), + companyTosUrl: z.nullable(z.string()).optional(), + primaryColor: z.nullable(z.string()).optional(), + secondaryColor: z.nullable(z.string()).optional(), + buttonBackgroundColor: z.nullable(z.string()).optional(), + buttonTextColor: z.nullable(z.string()).optional(), + linkColor: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + exposedFields: z.nullable(z.array(z.string())).optional(), + conditions: z.nullable(NullableNuncConditionEntity$outboundSchema).optional(), + components: z.nullable(NullableNuncComponentEntity$outboundSchema).optional(), + componentGroups: z.nullable(NullableNuncComponentGroupEntity$outboundSchema) + .optional(), + logo: z.nullable(NullableMediaImageEntity$outboundSchema).optional(), + coverImage: z.nullable(NullableMediaImageEntity$outboundSchema).optional(), + favicon: z.nullable(NullableMediaImageEntity$outboundSchema).optional(), + openGraphImage: z.nullable(NullableMediaImageEntity$outboundSchema) + .optional(), + darkLogo: z.nullable(NullableMediaImageEntity$outboundSchema).optional(), + enableHistogram: z.nullable(z.boolean()).optional(), + uiVersion: z.nullable(z.number().int()).optional(), + links: z.nullable(z.array(LinksEntity$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { companyName: "company_name", diff --git a/src/models/components/nuncconnectionentitypaginated.ts b/src/models/components/nuncconnectionentitypaginated.ts index ab74cdc4..69521e92 100644 --- a/src/models/components/nuncconnectionentitypaginated.ts +++ b/src/models/components/nuncconnectionentitypaginated.ts @@ -6,25 +6,25 @@ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { NuncConnectionEntity, NuncConnectionEntity$inboundSchema, NuncConnectionEntity$Outbound, NuncConnectionEntity$outboundSchema, } from "./nuncconnectionentity.js"; -import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; /** * NuncConnectionEntityPaginated model */ export type NuncConnectionEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const NuncConnectionEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(NuncConnectionEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(NuncConnectionEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type NuncConnectionEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const NuncConnectionEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, NuncConnectionEntityPaginated > = z.object({ - data: z.array(NuncConnectionEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(NuncConnectionEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/nuncemailsubscribersentity.ts b/src/models/components/nuncemailsubscribersentity.ts index 154b18bf..12c1da2a 100644 --- a/src/models/components/nuncemailsubscribersentity.ts +++ b/src/models/components/nuncemailsubscribersentity.ts @@ -15,15 +15,15 @@ export type NuncEmailSubscribersEntity = { /** * UUID of the subscriber */ - id?: string | undefined; + id?: string | null | undefined; /** * Email of the subscriber */ - email?: string | undefined; + email?: string | null | undefined; /** * The time the subscriber was created */ - createdAt?: Date | undefined; + createdAt?: Date | null | undefined; }; /** @internal */ @@ -32,10 +32,11 @@ export const NuncEmailSubscribersEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - email: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -44,9 +45,9 @@ export const NuncEmailSubscribersEntity$inboundSchema: z.ZodType< /** @internal */ export type NuncEmailSubscribersEntity$Outbound = { - id?: string | undefined; - email?: string | undefined; - created_at?: string | undefined; + id?: string | null | undefined; + email?: string | null | undefined; + created_at?: string | null | undefined; }; /** @internal */ @@ -55,9 +56,9 @@ export const NuncEmailSubscribersEntity$outboundSchema: z.ZodType< z.ZodTypeDef, NuncEmailSubscribersEntity > = z.object({ - id: z.string().optional(), - email: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/nuncnuncsubscription.ts b/src/models/components/nuncnuncsubscription.ts index a7400c37..b19bc934 100644 --- a/src/models/components/nuncnuncsubscription.ts +++ b/src/models/components/nuncnuncsubscription.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Nunc_NuncSubscription model */ export type NuncNuncSubscription = { - response?: string | undefined; + response?: string | null | undefined; }; /** @internal */ @@ -20,12 +20,12 @@ export const NuncNuncSubscription$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - response: z.string().optional(), + response: z.nullable(z.string()).optional(), }); /** @internal */ export type NuncNuncSubscription$Outbound = { - response?: string | undefined; + response?: string | null | undefined; }; /** @internal */ @@ -34,7 +34,7 @@ export const NuncNuncSubscription$outboundSchema: z.ZodType< z.ZodTypeDef, NuncNuncSubscription > = z.object({ - response: z.string().optional(), + response: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/organizationentity.ts b/src/models/components/organizationentity.ts deleted file mode 100644 index 006d7d0e..00000000 --- a/src/models/components/organizationentity.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type OrganizationEntity = { - name?: string | undefined; - id?: string | undefined; -}; - -/** @internal */ -export const OrganizationEntity$inboundSchema: z.ZodType< - OrganizationEntity, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - id: z.string().optional(), -}); - -/** @internal */ -export type OrganizationEntity$Outbound = { - name?: string | undefined; - id?: string | undefined; -}; - -/** @internal */ -export const OrganizationEntity$outboundSchema: z.ZodType< - OrganizationEntity$Outbound, - z.ZodTypeDef, - OrganizationEntity -> = z.object({ - name: z.string().optional(), - id: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OrganizationEntity$ { - /** @deprecated use `OrganizationEntity$inboundSchema` instead. */ - export const inboundSchema = OrganizationEntity$inboundSchema; - /** @deprecated use `OrganizationEntity$outboundSchema` instead. */ - export const outboundSchema = OrganizationEntity$outboundSchema; - /** @deprecated use `OrganizationEntity$Outbound` instead. */ - export type Outbound = OrganizationEntity$Outbound; -} - -export function organizationEntityToJSON( - organizationEntity: OrganizationEntity, -): string { - return JSON.stringify( - OrganizationEntity$outboundSchema.parse(organizationEntity), - ); -} - -export function organizationEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OrganizationEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OrganizationEntity' from JSON`, - ); -} diff --git a/src/models/components/organizationscustomfielddefinitionentity.ts b/src/models/components/organizationscustomfielddefinitionentity.ts index df8cc678..bac61af1 100644 --- a/src/models/components/organizationscustomfielddefinitionentity.ts +++ b/src/models/components/organizationscustomfielddefinitionentity.ts @@ -12,17 +12,17 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Organizations_CustomFieldDefinitionEntity model */ export type OrganizationsCustomFieldDefinitionEntity = { - displayName?: string | undefined; - fieldId?: string | undefined; - fieldType?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - required?: boolean | undefined; + displayName?: string | null | undefined; + fieldId?: string | null | undefined; + fieldType?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + required?: boolean | null | undefined; /** * The milestone at which this field is required, if `required` is set to `true`. When null, a required field is always required. */ - requiredAtMilestoneId?: string | undefined; - permissibleValues?: string | undefined; + requiredAtMilestoneId?: string | null | undefined; + permissibleValues?: Array | null | undefined; }; /** @internal */ @@ -31,14 +31,14 @@ export const OrganizationsCustomFieldDefinitionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - display_name: z.string().optional(), - field_id: z.string().optional(), - field_type: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - required: z.boolean().optional(), - required_at_milestone_id: z.string().optional(), - permissible_values: z.string().optional(), + display_name: z.nullable(z.string()).optional(), + field_id: z.nullable(z.string()).optional(), + field_type: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + required: z.nullable(z.boolean()).optional(), + required_at_milestone_id: z.nullable(z.string()).optional(), + permissible_values: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "display_name": "displayName", @@ -51,14 +51,14 @@ export const OrganizationsCustomFieldDefinitionEntity$inboundSchema: z.ZodType< /** @internal */ export type OrganizationsCustomFieldDefinitionEntity$Outbound = { - display_name?: string | undefined; - field_id?: string | undefined; - field_type?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - required?: boolean | undefined; - required_at_milestone_id?: string | undefined; - permissible_values?: string | undefined; + display_name?: string | null | undefined; + field_id?: string | null | undefined; + field_type?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + required?: boolean | null | undefined; + required_at_milestone_id?: string | null | undefined; + permissible_values?: Array | null | undefined; }; /** @internal */ @@ -67,14 +67,14 @@ export const OrganizationsCustomFieldDefinitionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, OrganizationsCustomFieldDefinitionEntity > = z.object({ - displayName: z.string().optional(), - fieldId: z.string().optional(), - fieldType: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - required: z.boolean().optional(), - requiredAtMilestoneId: z.string().optional(), - permissibleValues: z.string().optional(), + displayName: z.nullable(z.string()).optional(), + fieldId: z.nullable(z.string()).optional(), + fieldType: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + required: z.nullable(z.boolean()).optional(), + requiredAtMilestoneId: z.nullable(z.string()).optional(), + permissibleValues: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { displayName: "display_name", diff --git a/src/models/components/paginationentity.ts b/src/models/components/paginationentity.ts deleted file mode 100644 index 17e01c7a..00000000 --- a/src/models/components/paginationentity.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PaginationEntity = { - count?: number | undefined; - page?: number | undefined; - items?: number | undefined; - pages?: number | undefined; - last?: number | undefined; - prev?: number | null | undefined; - next?: number | null | undefined; -}; - -/** @internal */ -export const PaginationEntity$inboundSchema: z.ZodType< - PaginationEntity, - z.ZodTypeDef, - unknown -> = z.object({ - count: z.number().int().optional(), - page: z.number().int().optional(), - items: z.number().int().optional(), - pages: z.number().int().optional(), - last: z.number().int().optional(), - prev: z.nullable(z.number().int()).optional(), - next: z.nullable(z.number().int()).optional(), -}); - -/** @internal */ -export type PaginationEntity$Outbound = { - count?: number | undefined; - page?: number | undefined; - items?: number | undefined; - pages?: number | undefined; - last?: number | undefined; - prev?: number | null | undefined; - next?: number | null | undefined; -}; - -/** @internal */ -export const PaginationEntity$outboundSchema: z.ZodType< - PaginationEntity$Outbound, - z.ZodTypeDef, - PaginationEntity -> = z.object({ - count: z.number().int().optional(), - page: z.number().int().optional(), - items: z.number().int().optional(), - pages: z.number().int().optional(), - last: z.number().int().optional(), - prev: z.nullable(z.number().int()).optional(), - next: z.nullable(z.number().int()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaginationEntity$ { - /** @deprecated use `PaginationEntity$inboundSchema` instead. */ - export const inboundSchema = PaginationEntity$inboundSchema; - /** @deprecated use `PaginationEntity$outboundSchema` instead. */ - export const outboundSchema = PaginationEntity$outboundSchema; - /** @deprecated use `PaginationEntity$Outbound` instead. */ - export type Outbound = PaginationEntity$Outbound; -} - -export function paginationEntityToJSON( - paginationEntity: PaginationEntity, -): string { - return JSON.stringify( - PaginationEntity$outboundSchema.parse(paginationEntity), - ); -} - -export function paginationEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PaginationEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PaginationEntity' from JSON`, - ); -} diff --git a/src/models/components/patchscimuser.ts b/src/models/components/patchscimuser.ts new file mode 100644 index 00000000..e6fa43aa --- /dev/null +++ b/src/models/components/patchscimuser.ts @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type Operation = { + /** + * The operation to perform on the user. Options are add, remove, replace + */ + op: string; + /** + * The path to the attribute to be modified + */ + path: string; +}; + +/** + * PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. + */ +export type PatchScimUser = { + /** + * An optional trail to log the request + */ + trail?: string | null | undefined; + /** + * An array of operations to perform on the user + */ + operations: Array; +}; + +/** @internal */ +export const Operation$inboundSchema: z.ZodType< + Operation, + z.ZodTypeDef, + unknown +> = z.object({ + op: z.string(), + path: z.string(), +}); + +/** @internal */ +export type Operation$Outbound = { + op: string; + path: string; +}; + +/** @internal */ +export const Operation$outboundSchema: z.ZodType< + Operation$Outbound, + z.ZodTypeDef, + Operation +> = z.object({ + op: z.string(), + path: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Operation$ { + /** @deprecated use `Operation$inboundSchema` instead. */ + export const inboundSchema = Operation$inboundSchema; + /** @deprecated use `Operation$outboundSchema` instead. */ + export const outboundSchema = Operation$outboundSchema; + /** @deprecated use `Operation$Outbound` instead. */ + export type Outbound = Operation$Outbound; +} + +export function operationToJSON(operation: Operation): string { + return JSON.stringify(Operation$outboundSchema.parse(operation)); +} + +export function operationFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Operation$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Operation' from JSON`, + ); +} + +/** @internal */ +export const PatchScimUser$inboundSchema: z.ZodType< + PatchScimUser, + z.ZodTypeDef, + unknown +> = z.object({ + trail: z.nullable(z.string()).optional(), + Operations: z.array(z.lazy(() => Operation$inboundSchema)), +}).transform((v) => { + return remap$(v, { + "Operations": "operations", + }); +}); + +/** @internal */ +export type PatchScimUser$Outbound = { + trail?: string | null | undefined; + Operations: Array; +}; + +/** @internal */ +export const PatchScimUser$outboundSchema: z.ZodType< + PatchScimUser$Outbound, + z.ZodTypeDef, + PatchScimUser +> = z.object({ + trail: z.nullable(z.string()).optional(), + operations: z.array(z.lazy(() => Operation$outboundSchema)), +}).transform((v) => { + return remap$(v, { + operations: "Operations", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PatchScimUser$ { + /** @deprecated use `PatchScimUser$inboundSchema` instead. */ + export const inboundSchema = PatchScimUser$inboundSchema; + /** @deprecated use `PatchScimUser$outboundSchema` instead. */ + export const outboundSchema = PatchScimUser$outboundSchema; + /** @deprecated use `PatchScimUser$Outbound` instead. */ + export type Outbound = PatchScimUser$Outbound; +} + +export function patchScimUserToJSON(patchScimUser: PatchScimUser): string { + return JSON.stringify(PatchScimUser$outboundSchema.parse(patchScimUser)); +} + +export function patchScimUserFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PatchScimUser$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PatchScimUser' from JSON`, + ); +} diff --git a/src/models/components/patchv1changeschangeid.ts b/src/models/components/patchv1changeschangeid.ts deleted file mode 100644 index d26930fe..00000000 --- a/src/models/components/patchv1changeschangeid.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a change entry - */ -export type PatchV1ChangesChangeId = { - summary?: string | undefined; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const PatchV1ChangesChangeId$inboundSchema: z.ZodType< - PatchV1ChangesChangeId, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), -}); - -/** @internal */ -export type PatchV1ChangesChangeId$Outbound = { - summary?: string | undefined; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const PatchV1ChangesChangeId$outboundSchema: z.ZodType< - PatchV1ChangesChangeId$Outbound, - z.ZodTypeDef, - PatchV1ChangesChangeId -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChangesChangeId$ { - /** @deprecated use `PatchV1ChangesChangeId$inboundSchema` instead. */ - export const inboundSchema = PatchV1ChangesChangeId$inboundSchema; - /** @deprecated use `PatchV1ChangesChangeId$outboundSchema` instead. */ - export const outboundSchema = PatchV1ChangesChangeId$outboundSchema; - /** @deprecated use `PatchV1ChangesChangeId$Outbound` instead. */ - export type Outbound = PatchV1ChangesChangeId$Outbound; -} - -export function patchV1ChangesChangeIdToJSON( - patchV1ChangesChangeId: PatchV1ChangesChangeId, -): string { - return JSON.stringify( - PatchV1ChangesChangeId$outboundSchema.parse(patchV1ChangesChangeId), - ); -} - -export function patchV1ChangesChangeIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ChangesChangeId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ChangesChangeId' from JSON`, - ); -} diff --git a/src/models/components/patchv1changeschangeididentitiesidentityid.ts b/src/models/components/patchv1changeschangeididentitiesidentityid.ts deleted file mode 100644 index 21172d3f..00000000 --- a/src/models/components/patchv1changeschangeididentitiesidentityid.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update an identity - */ -export type PatchV1ChangesChangeIdIdentitiesIdentityId = { - type: string; - value: string; -}; - -/** @internal */ -export const PatchV1ChangesChangeIdIdentitiesIdentityId$inboundSchema: - z.ZodType = - z.object({ - type: z.string(), - value: z.string(), - }); - -/** @internal */ -export type PatchV1ChangesChangeIdIdentitiesIdentityId$Outbound = { - type: string; - value: string; -}; - -/** @internal */ -export const PatchV1ChangesChangeIdIdentitiesIdentityId$outboundSchema: - z.ZodType< - PatchV1ChangesChangeIdIdentitiesIdentityId$Outbound, - z.ZodTypeDef, - PatchV1ChangesChangeIdIdentitiesIdentityId - > = z.object({ - type: z.string(), - value: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChangesChangeIdIdentitiesIdentityId$ { - /** @deprecated use `PatchV1ChangesChangeIdIdentitiesIdentityId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ChangesChangeIdIdentitiesIdentityId$inboundSchema; - /** @deprecated use `PatchV1ChangesChangeIdIdentitiesIdentityId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ChangesChangeIdIdentitiesIdentityId$outboundSchema; - /** @deprecated use `PatchV1ChangesChangeIdIdentitiesIdentityId$Outbound` instead. */ - export type Outbound = PatchV1ChangesChangeIdIdentitiesIdentityId$Outbound; -} - -export function patchV1ChangesChangeIdIdentitiesIdentityIdToJSON( - patchV1ChangesChangeIdIdentitiesIdentityId: - PatchV1ChangesChangeIdIdentitiesIdentityId, -): string { - return JSON.stringify( - PatchV1ChangesChangeIdIdentitiesIdentityId$outboundSchema.parse( - patchV1ChangesChangeIdIdentitiesIdentityId, - ), - ); -} - -export function patchV1ChangesChangeIdIdentitiesIdentityIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ChangesChangeIdIdentitiesIdentityId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ChangesChangeIdIdentitiesIdentityId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ChangesChangeIdIdentitiesIdentityId' from JSON`, - ); -} diff --git a/src/models/components/patchv1changeseventschangeeventid.ts b/src/models/components/patchv1changeseventschangeeventid.ts deleted file mode 100644 index c4ac5603..00000000 --- a/src/models/components/patchv1changeseventschangeeventid.ts +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PatchV1ChangesEventsChangeEventIdType = { - Link: "link", -} as const; -export type PatchV1ChangesEventsChangeEventIdType = ClosedEnum< - typeof PatchV1ChangesEventsChangeEventIdType ->; - -export type PatchV1ChangesEventsChangeEventIdAttachments = { - type: PatchV1ChangesEventsChangeEventIdType; -}; - -/** - * Update a change event - */ -export type PatchV1ChangesEventsChangeEventId = { - summary?: string | undefined; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; - startsAt?: Date | undefined; - endsAt?: Date | undefined; - /** - * An array of environment IDs (setting this will overwrite the current environments) - */ - environments?: Array | undefined; - /** - * An array of service IDs (setting this will overwrite the current services) - */ - services?: Array | undefined; - /** - * JSON objects representing attachments, see attachments documentation for the schema - */ - attachments?: Array | undefined; -}; - -/** @internal */ -export const PatchV1ChangesEventsChangeEventIdType$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - PatchV1ChangesEventsChangeEventIdType, - ); - -/** @internal */ -export const PatchV1ChangesEventsChangeEventIdType$outboundSchema: - z.ZodNativeEnum = - PatchV1ChangesEventsChangeEventIdType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChangesEventsChangeEventIdType$ { - /** @deprecated use `PatchV1ChangesEventsChangeEventIdType$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ChangesEventsChangeEventIdType$inboundSchema; - /** @deprecated use `PatchV1ChangesEventsChangeEventIdType$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ChangesEventsChangeEventIdType$outboundSchema; -} - -/** @internal */ -export const PatchV1ChangesEventsChangeEventIdAttachments$inboundSchema: - z.ZodType< - PatchV1ChangesEventsChangeEventIdAttachments, - z.ZodTypeDef, - unknown - > = z.object({ - type: PatchV1ChangesEventsChangeEventIdType$inboundSchema, - }); - -/** @internal */ -export type PatchV1ChangesEventsChangeEventIdAttachments$Outbound = { - type: string; -}; - -/** @internal */ -export const PatchV1ChangesEventsChangeEventIdAttachments$outboundSchema: - z.ZodType< - PatchV1ChangesEventsChangeEventIdAttachments$Outbound, - z.ZodTypeDef, - PatchV1ChangesEventsChangeEventIdAttachments - > = z.object({ - type: PatchV1ChangesEventsChangeEventIdType$outboundSchema, - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChangesEventsChangeEventIdAttachments$ { - /** @deprecated use `PatchV1ChangesEventsChangeEventIdAttachments$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ChangesEventsChangeEventIdAttachments$inboundSchema; - /** @deprecated use `PatchV1ChangesEventsChangeEventIdAttachments$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ChangesEventsChangeEventIdAttachments$outboundSchema; - /** @deprecated use `PatchV1ChangesEventsChangeEventIdAttachments$Outbound` instead. */ - export type Outbound = PatchV1ChangesEventsChangeEventIdAttachments$Outbound; -} - -export function patchV1ChangesEventsChangeEventIdAttachmentsToJSON( - patchV1ChangesEventsChangeEventIdAttachments: - PatchV1ChangesEventsChangeEventIdAttachments, -): string { - return JSON.stringify( - PatchV1ChangesEventsChangeEventIdAttachments$outboundSchema.parse( - patchV1ChangesEventsChangeEventIdAttachments, - ), - ); -} - -export function patchV1ChangesEventsChangeEventIdAttachmentsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ChangesEventsChangeEventIdAttachments, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ChangesEventsChangeEventIdAttachments$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ChangesEventsChangeEventIdAttachments' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ChangesEventsChangeEventId$inboundSchema: z.ZodType< - PatchV1ChangesEventsChangeEventId, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - environments: z.array(z.string()).optional(), - services: z.array(z.string()).optional(), - attachments: z.array( - z.lazy(() => PatchV1ChangesEventsChangeEventIdAttachments$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "starts_at": "startsAt", - "ends_at": "endsAt", - }); -}); - -/** @internal */ -export type PatchV1ChangesEventsChangeEventId$Outbound = { - summary?: string | undefined; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; - starts_at?: string | undefined; - ends_at?: string | undefined; - environments?: Array | undefined; - services?: Array | undefined; - attachments?: - | Array - | undefined; -}; - -/** @internal */ -export const PatchV1ChangesEventsChangeEventId$outboundSchema: z.ZodType< - PatchV1ChangesEventsChangeEventId$Outbound, - z.ZodTypeDef, - PatchV1ChangesEventsChangeEventId -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), - endsAt: z.date().transform(v => v.toISOString()).optional(), - environments: z.array(z.string()).optional(), - services: z.array(z.string()).optional(), - attachments: z.array( - z.lazy(() => PatchV1ChangesEventsChangeEventIdAttachments$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - startsAt: "starts_at", - endsAt: "ends_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChangesEventsChangeEventId$ { - /** @deprecated use `PatchV1ChangesEventsChangeEventId$inboundSchema` instead. */ - export const inboundSchema = PatchV1ChangesEventsChangeEventId$inboundSchema; - /** @deprecated use `PatchV1ChangesEventsChangeEventId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ChangesEventsChangeEventId$outboundSchema; - /** @deprecated use `PatchV1ChangesEventsChangeEventId$Outbound` instead. */ - export type Outbound = PatchV1ChangesEventsChangeEventId$Outbound; -} - -export function patchV1ChangesEventsChangeEventIdToJSON( - patchV1ChangesEventsChangeEventId: PatchV1ChangesEventsChangeEventId, -): string { - return JSON.stringify( - PatchV1ChangesEventsChangeEventId$outboundSchema.parse( - patchV1ChangesEventsChangeEventId, - ), - ); -} - -export function patchV1ChangesEventsChangeEventIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ChangesEventsChangeEventId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ChangesEventsChangeEventId' from JSON`, - ); -} diff --git a/src/models/components/patchv1checklisttemplatesid.ts b/src/models/components/patchv1checklisttemplatesid.ts deleted file mode 100644 index 09024f74..00000000 --- a/src/models/components/patchv1checklisttemplatesid.ts +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1ChecklistTemplatesIdChecks = { - /** - * Specify the check ID when updating an already existing check - */ - id?: string | undefined; - /** - * The description of the check - */ - description?: string | undefined; - /** - * The name of the check - */ - name: string; -}; - -export type PatchV1ChecklistTemplatesIdConnectedServices = { - id: string; - /** - * Set to `true` to remove checklist from service - */ - remove?: boolean | undefined; -}; - -/** - * Update a checklist templates attributes - */ -export type PatchV1ChecklistTemplatesId = { - name?: string | undefined; - description?: string | undefined; - /** - * An array of checks for the checklist template - */ - checks?: Array | undefined; - /** - * The ID of the Team that owns the checklist template - */ - teamId?: string | undefined; - /** - * Array of service IDs to attach checklist template to - */ - connectedServices?: - | Array - | undefined; - /** - * If set to true, any services tagged on the checklist that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the services - */ - removeRemainingConnectedServices?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1ChecklistTemplatesIdChecks$inboundSchema: z.ZodType< - PatchV1ChecklistTemplatesIdChecks, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - description: z.string().optional(), - name: z.string(), -}); - -/** @internal */ -export type PatchV1ChecklistTemplatesIdChecks$Outbound = { - id?: string | undefined; - description?: string | undefined; - name: string; -}; - -/** @internal */ -export const PatchV1ChecklistTemplatesIdChecks$outboundSchema: z.ZodType< - PatchV1ChecklistTemplatesIdChecks$Outbound, - z.ZodTypeDef, - PatchV1ChecklistTemplatesIdChecks -> = z.object({ - id: z.string().optional(), - description: z.string().optional(), - name: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChecklistTemplatesIdChecks$ { - /** @deprecated use `PatchV1ChecklistTemplatesIdChecks$inboundSchema` instead. */ - export const inboundSchema = PatchV1ChecklistTemplatesIdChecks$inboundSchema; - /** @deprecated use `PatchV1ChecklistTemplatesIdChecks$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ChecklistTemplatesIdChecks$outboundSchema; - /** @deprecated use `PatchV1ChecklistTemplatesIdChecks$Outbound` instead. */ - export type Outbound = PatchV1ChecklistTemplatesIdChecks$Outbound; -} - -export function patchV1ChecklistTemplatesIdChecksToJSON( - patchV1ChecklistTemplatesIdChecks: PatchV1ChecklistTemplatesIdChecks, -): string { - return JSON.stringify( - PatchV1ChecklistTemplatesIdChecks$outboundSchema.parse( - patchV1ChecklistTemplatesIdChecks, - ), - ); -} - -export function patchV1ChecklistTemplatesIdChecksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ChecklistTemplatesIdChecks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ChecklistTemplatesIdChecks' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ChecklistTemplatesIdConnectedServices$inboundSchema: - z.ZodType< - PatchV1ChecklistTemplatesIdConnectedServices, - z.ZodTypeDef, - unknown - > = z.object({ - id: z.string(), - remove: z.boolean().optional(), - }); - -/** @internal */ -export type PatchV1ChecklistTemplatesIdConnectedServices$Outbound = { - id: string; - remove?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1ChecklistTemplatesIdConnectedServices$outboundSchema: - z.ZodType< - PatchV1ChecklistTemplatesIdConnectedServices$Outbound, - z.ZodTypeDef, - PatchV1ChecklistTemplatesIdConnectedServices - > = z.object({ - id: z.string(), - remove: z.boolean().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChecklistTemplatesIdConnectedServices$ { - /** @deprecated use `PatchV1ChecklistTemplatesIdConnectedServices$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ChecklistTemplatesIdConnectedServices$inboundSchema; - /** @deprecated use `PatchV1ChecklistTemplatesIdConnectedServices$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ChecklistTemplatesIdConnectedServices$outboundSchema; - /** @deprecated use `PatchV1ChecklistTemplatesIdConnectedServices$Outbound` instead. */ - export type Outbound = PatchV1ChecklistTemplatesIdConnectedServices$Outbound; -} - -export function patchV1ChecklistTemplatesIdConnectedServicesToJSON( - patchV1ChecklistTemplatesIdConnectedServices: - PatchV1ChecklistTemplatesIdConnectedServices, -): string { - return JSON.stringify( - PatchV1ChecklistTemplatesIdConnectedServices$outboundSchema.parse( - patchV1ChecklistTemplatesIdConnectedServices, - ), - ); -} - -export function patchV1ChecklistTemplatesIdConnectedServicesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ChecklistTemplatesIdConnectedServices, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ChecklistTemplatesIdConnectedServices$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ChecklistTemplatesIdConnectedServices' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ChecklistTemplatesId$inboundSchema: z.ZodType< - PatchV1ChecklistTemplatesId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - checks: z.array(z.lazy(() => PatchV1ChecklistTemplatesIdChecks$inboundSchema)) - .optional(), - team_id: z.string().optional(), - connected_services: z.array( - z.lazy(() => PatchV1ChecklistTemplatesIdConnectedServices$inboundSchema), - ).optional(), - remove_remaining_connected_services: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "connected_services": "connectedServices", - "remove_remaining_connected_services": "removeRemainingConnectedServices", - }); -}); - -/** @internal */ -export type PatchV1ChecklistTemplatesId$Outbound = { - name?: string | undefined; - description?: string | undefined; - checks?: Array | undefined; - team_id?: string | undefined; - connected_services?: - | Array - | undefined; - remove_remaining_connected_services?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1ChecklistTemplatesId$outboundSchema: z.ZodType< - PatchV1ChecklistTemplatesId$Outbound, - z.ZodTypeDef, - PatchV1ChecklistTemplatesId -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - checks: z.array( - z.lazy(() => PatchV1ChecklistTemplatesIdChecks$outboundSchema), - ).optional(), - teamId: z.string().optional(), - connectedServices: z.array( - z.lazy(() => PatchV1ChecklistTemplatesIdConnectedServices$outboundSchema), - ).optional(), - removeRemainingConnectedServices: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - connectedServices: "connected_services", - removeRemainingConnectedServices: "remove_remaining_connected_services", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ChecklistTemplatesId$ { - /** @deprecated use `PatchV1ChecklistTemplatesId$inboundSchema` instead. */ - export const inboundSchema = PatchV1ChecklistTemplatesId$inboundSchema; - /** @deprecated use `PatchV1ChecklistTemplatesId$outboundSchema` instead. */ - export const outboundSchema = PatchV1ChecklistTemplatesId$outboundSchema; - /** @deprecated use `PatchV1ChecklistTemplatesId$Outbound` instead. */ - export type Outbound = PatchV1ChecklistTemplatesId$Outbound; -} - -export function patchV1ChecklistTemplatesIdToJSON( - patchV1ChecklistTemplatesId: PatchV1ChecklistTemplatesId, -): string { - return JSON.stringify( - PatchV1ChecklistTemplatesId$outboundSchema.parse( - patchV1ChecklistTemplatesId, - ), - ); -} - -export function patchV1ChecklistTemplatesIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ChecklistTemplatesId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ChecklistTemplatesId' from JSON`, - ); -} diff --git a/src/models/components/patchv1conversationsconversationidcommentscommentid.ts b/src/models/components/patchv1conversationsconversationidcommentscommentid.ts deleted file mode 100644 index 3cbc819c..00000000 --- a/src/models/components/patchv1conversationsconversationidcommentscommentid.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * ALPHA - Update a comment's attributes - */ -export type PatchV1ConversationsConversationIdCommentsCommentId = { - /** - * Text body of comment - */ - body?: string | undefined; -}; - -/** @internal */ -export const PatchV1ConversationsConversationIdCommentsCommentId$inboundSchema: - z.ZodType< - PatchV1ConversationsConversationIdCommentsCommentId, - z.ZodTypeDef, - unknown - > = z.object({ - body: z.string().optional(), - }); - -/** @internal */ -export type PatchV1ConversationsConversationIdCommentsCommentId$Outbound = { - body?: string | undefined; -}; - -/** @internal */ -export const PatchV1ConversationsConversationIdCommentsCommentId$outboundSchema: - z.ZodType< - PatchV1ConversationsConversationIdCommentsCommentId$Outbound, - z.ZodTypeDef, - PatchV1ConversationsConversationIdCommentsCommentId - > = z.object({ - body: z.string().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ConversationsConversationIdCommentsCommentId$ { - /** @deprecated use `PatchV1ConversationsConversationIdCommentsCommentId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ConversationsConversationIdCommentsCommentId$inboundSchema; - /** @deprecated use `PatchV1ConversationsConversationIdCommentsCommentId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ConversationsConversationIdCommentsCommentId$outboundSchema; - /** @deprecated use `PatchV1ConversationsConversationIdCommentsCommentId$Outbound` instead. */ - export type Outbound = - PatchV1ConversationsConversationIdCommentsCommentId$Outbound; -} - -export function patchV1ConversationsConversationIdCommentsCommentIdToJSON( - patchV1ConversationsConversationIdCommentsCommentId: - PatchV1ConversationsConversationIdCommentsCommentId, -): string { - return JSON.stringify( - PatchV1ConversationsConversationIdCommentsCommentId$outboundSchema.parse( - patchV1ConversationsConversationIdCommentsCommentId, - ), - ); -} - -export function patchV1ConversationsConversationIdCommentsCommentIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ConversationsConversationIdCommentsCommentId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ConversationsConversationIdCommentsCommentId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ConversationsConversationIdCommentsCommentId' from JSON`, - ); -} diff --git a/src/models/components/patchv1customfieldsdefinitionsfieldid.ts b/src/models/components/patchv1customfieldsdefinitionsfieldid.ts deleted file mode 100644 index 5568d782..00000000 --- a/src/models/components/patchv1customfieldsdefinitionsfieldid.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a single custom field definition - */ -export type PatchV1CustomFieldsDefinitionsFieldId = { - description?: string | undefined; - displayName?: string | undefined; - permissibleValues?: Array | undefined; - required?: boolean | undefined; - /** - * An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. - */ - requiredAtMilestoneId?: string | undefined; -}; - -/** @internal */ -export const PatchV1CustomFieldsDefinitionsFieldId$inboundSchema: z.ZodType< - PatchV1CustomFieldsDefinitionsFieldId, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.string().optional(), - display_name: z.string().optional(), - permissible_values: z.array(z.string()).optional(), - required: z.boolean().optional(), - required_at_milestone_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "display_name": "displayName", - "permissible_values": "permissibleValues", - "required_at_milestone_id": "requiredAtMilestoneId", - }); -}); - -/** @internal */ -export type PatchV1CustomFieldsDefinitionsFieldId$Outbound = { - description?: string | undefined; - display_name?: string | undefined; - permissible_values?: Array | undefined; - required?: boolean | undefined; - required_at_milestone_id?: string | undefined; -}; - -/** @internal */ -export const PatchV1CustomFieldsDefinitionsFieldId$outboundSchema: z.ZodType< - PatchV1CustomFieldsDefinitionsFieldId$Outbound, - z.ZodTypeDef, - PatchV1CustomFieldsDefinitionsFieldId -> = z.object({ - description: z.string().optional(), - displayName: z.string().optional(), - permissibleValues: z.array(z.string()).optional(), - required: z.boolean().optional(), - requiredAtMilestoneId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - displayName: "display_name", - permissibleValues: "permissible_values", - requiredAtMilestoneId: "required_at_milestone_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1CustomFieldsDefinitionsFieldId$ { - /** @deprecated use `PatchV1CustomFieldsDefinitionsFieldId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1CustomFieldsDefinitionsFieldId$inboundSchema; - /** @deprecated use `PatchV1CustomFieldsDefinitionsFieldId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1CustomFieldsDefinitionsFieldId$outboundSchema; - /** @deprecated use `PatchV1CustomFieldsDefinitionsFieldId$Outbound` instead. */ - export type Outbound = PatchV1CustomFieldsDefinitionsFieldId$Outbound; -} - -export function patchV1CustomFieldsDefinitionsFieldIdToJSON( - patchV1CustomFieldsDefinitionsFieldId: PatchV1CustomFieldsDefinitionsFieldId, -): string { - return JSON.stringify( - PatchV1CustomFieldsDefinitionsFieldId$outboundSchema.parse( - patchV1CustomFieldsDefinitionsFieldId, - ), - ); -} - -export function patchV1CustomFieldsDefinitionsFieldIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1CustomFieldsDefinitionsFieldId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1CustomFieldsDefinitionsFieldId' from JSON`, - ); -} diff --git a/src/models/components/patchv1environmentsenvironmentid.ts b/src/models/components/patchv1environmentsenvironmentid.ts deleted file mode 100644 index 6383c35a..00000000 --- a/src/models/components/patchv1environmentsenvironmentid.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a environments attributes - */ -export type PatchV1EnvironmentsEnvironmentId = { - name: string; - description?: string | undefined; -}; - -/** @internal */ -export const PatchV1EnvironmentsEnvironmentId$inboundSchema: z.ZodType< - PatchV1EnvironmentsEnvironmentId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), -}); - -/** @internal */ -export type PatchV1EnvironmentsEnvironmentId$Outbound = { - name: string; - description?: string | undefined; -}; - -/** @internal */ -export const PatchV1EnvironmentsEnvironmentId$outboundSchema: z.ZodType< - PatchV1EnvironmentsEnvironmentId$Outbound, - z.ZodTypeDef, - PatchV1EnvironmentsEnvironmentId -> = z.object({ - name: z.string(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1EnvironmentsEnvironmentId$ { - /** @deprecated use `PatchV1EnvironmentsEnvironmentId$inboundSchema` instead. */ - export const inboundSchema = PatchV1EnvironmentsEnvironmentId$inboundSchema; - /** @deprecated use `PatchV1EnvironmentsEnvironmentId$outboundSchema` instead. */ - export const outboundSchema = PatchV1EnvironmentsEnvironmentId$outboundSchema; - /** @deprecated use `PatchV1EnvironmentsEnvironmentId$Outbound` instead. */ - export type Outbound = PatchV1EnvironmentsEnvironmentId$Outbound; -} - -export function patchV1EnvironmentsEnvironmentIdToJSON( - patchV1EnvironmentsEnvironmentId: PatchV1EnvironmentsEnvironmentId, -): string { - return JSON.stringify( - PatchV1EnvironmentsEnvironmentId$outboundSchema.parse( - patchV1EnvironmentsEnvironmentId, - ), - ); -} - -export function patchV1EnvironmentsEnvironmentIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1EnvironmentsEnvironmentId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1EnvironmentsEnvironmentId' from JSON`, - ); -} diff --git a/src/models/components/patchv1functionalitiesfunctionalityid.ts b/src/models/components/patchv1functionalitiesfunctionalityid.ts deleted file mode 100644 index b9ec5a13..00000000 --- a/src/models/components/patchv1functionalitiesfunctionalityid.ts +++ /dev/null @@ -1,637 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1FunctionalitiesFunctionalityIdServices = { - /** - * ID of a service - */ - id: string; - /** - * Set to true if you want to remove the given service from the functionality - */ - remove?: boolean | undefined; -}; - -export type PatchV1FunctionalitiesFunctionalityIdLinks = { - /** - * URL - */ - hrefUrl: string; - /** - * Short name used to display and identify this link - */ - name: string; - /** - * An optional URL to an icon representing this link - */ - iconUrl?: string | undefined; - /** - * If you are trying to remove a link, set this to 'true' - */ - remove?: boolean | undefined; - /** - * If updating an existing link, specify it's id. - */ - id?: string | undefined; -}; - -/** - * An object representing a Team that owns the functionality - */ -export type PatchV1FunctionalitiesFunctionalityIdOwner = { - id: string; -}; - -export type PatchV1FunctionalitiesFunctionalityIdTeams = { - id: string; - /** - * If you are trying to remove a team from a functionality, set this to 'true' - */ - remove?: boolean | undefined; -}; - -export type PatchV1FunctionalitiesFunctionalityIdExternalResources = { - remoteId: string; - /** - * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. - */ - connectionType?: string | undefined; - /** - * If you are trying to remove an external resource from a service, set this to 'true'. - */ - remove?: boolean | undefined; -}; - -/** - * Update a functionalities attributes - */ -export type PatchV1FunctionalitiesFunctionalityId = { - name?: string | undefined; - description?: string | undefined; - services?: Array | undefined; - /** - * An array of links to associate with this functionality. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. - */ - links?: Array | undefined; - /** - * An object representing a Team that owns the functionality - */ - owner?: PatchV1FunctionalitiesFunctionalityIdOwner | undefined; - /** - * If you are trying to remove a team as an owner from a functionality, set this to 'true' - */ - removeOwner?: boolean | undefined; - /** - * An array of teams to attach to this functionality. - */ - teams?: Array | undefined; - /** - * If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams - */ - removeRemainingTeams?: boolean | undefined; - /** - * An array of external resources to attach to this service. - */ - externalResources?: - | Array - | undefined; - /** - * If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources - */ - removeRemainingExternalResources?: boolean | undefined; - /** - * A hash of label keys and values - */ - labels?: { [k: string]: string } | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; - /** - * Set this to true if you want to remove all of the services that are not included in the services array from the functionality - */ - removeRemainingServices?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdServices$inboundSchema: - z.ZodType< - PatchV1FunctionalitiesFunctionalityIdServices, - z.ZodTypeDef, - unknown - > = z.object({ - id: z.string(), - remove: z.boolean().optional(), - }); - -/** @internal */ -export type PatchV1FunctionalitiesFunctionalityIdServices$Outbound = { - id: string; - remove?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdServices$outboundSchema: - z.ZodType< - PatchV1FunctionalitiesFunctionalityIdServices$Outbound, - z.ZodTypeDef, - PatchV1FunctionalitiesFunctionalityIdServices - > = z.object({ - id: z.string(), - remove: z.boolean().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1FunctionalitiesFunctionalityIdServices$ { - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdServices$inboundSchema` instead. */ - export const inboundSchema = - PatchV1FunctionalitiesFunctionalityIdServices$inboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdServices$outboundSchema` instead. */ - export const outboundSchema = - PatchV1FunctionalitiesFunctionalityIdServices$outboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdServices$Outbound` instead. */ - export type Outbound = PatchV1FunctionalitiesFunctionalityIdServices$Outbound; -} - -export function patchV1FunctionalitiesFunctionalityIdServicesToJSON( - patchV1FunctionalitiesFunctionalityIdServices: - PatchV1FunctionalitiesFunctionalityIdServices, -): string { - return JSON.stringify( - PatchV1FunctionalitiesFunctionalityIdServices$outboundSchema.parse( - patchV1FunctionalitiesFunctionalityIdServices, - ), - ); -} - -export function patchV1FunctionalitiesFunctionalityIdServicesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1FunctionalitiesFunctionalityIdServices, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1FunctionalitiesFunctionalityIdServices$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1FunctionalitiesFunctionalityIdServices' from JSON`, - ); -} - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdLinks$inboundSchema: - z.ZodType = - z.object({ - href_url: z.string(), - name: z.string(), - icon_url: z.string().optional(), - remove: z.boolean().optional(), - id: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "href_url": "hrefUrl", - "icon_url": "iconUrl", - }); - }); - -/** @internal */ -export type PatchV1FunctionalitiesFunctionalityIdLinks$Outbound = { - href_url: string; - name: string; - icon_url?: string | undefined; - remove?: boolean | undefined; - id?: string | undefined; -}; - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdLinks$outboundSchema: - z.ZodType< - PatchV1FunctionalitiesFunctionalityIdLinks$Outbound, - z.ZodTypeDef, - PatchV1FunctionalitiesFunctionalityIdLinks - > = z.object({ - hrefUrl: z.string(), - name: z.string(), - iconUrl: z.string().optional(), - remove: z.boolean().optional(), - id: z.string().optional(), - }).transform((v) => { - return remap$(v, { - hrefUrl: "href_url", - iconUrl: "icon_url", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1FunctionalitiesFunctionalityIdLinks$ { - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdLinks$inboundSchema` instead. */ - export const inboundSchema = - PatchV1FunctionalitiesFunctionalityIdLinks$inboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdLinks$outboundSchema` instead. */ - export const outboundSchema = - PatchV1FunctionalitiesFunctionalityIdLinks$outboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdLinks$Outbound` instead. */ - export type Outbound = PatchV1FunctionalitiesFunctionalityIdLinks$Outbound; -} - -export function patchV1FunctionalitiesFunctionalityIdLinksToJSON( - patchV1FunctionalitiesFunctionalityIdLinks: - PatchV1FunctionalitiesFunctionalityIdLinks, -): string { - return JSON.stringify( - PatchV1FunctionalitiesFunctionalityIdLinks$outboundSchema.parse( - patchV1FunctionalitiesFunctionalityIdLinks, - ), - ); -} - -export function patchV1FunctionalitiesFunctionalityIdLinksFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1FunctionalitiesFunctionalityIdLinks, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1FunctionalitiesFunctionalityIdLinks$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1FunctionalitiesFunctionalityIdLinks' from JSON`, - ); -} - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdOwner$inboundSchema: - z.ZodType = - z.object({ - id: z.string(), - }); - -/** @internal */ -export type PatchV1FunctionalitiesFunctionalityIdOwner$Outbound = { - id: string; -}; - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdOwner$outboundSchema: - z.ZodType< - PatchV1FunctionalitiesFunctionalityIdOwner$Outbound, - z.ZodTypeDef, - PatchV1FunctionalitiesFunctionalityIdOwner - > = z.object({ - id: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1FunctionalitiesFunctionalityIdOwner$ { - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdOwner$inboundSchema` instead. */ - export const inboundSchema = - PatchV1FunctionalitiesFunctionalityIdOwner$inboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdOwner$outboundSchema` instead. */ - export const outboundSchema = - PatchV1FunctionalitiesFunctionalityIdOwner$outboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdOwner$Outbound` instead. */ - export type Outbound = PatchV1FunctionalitiesFunctionalityIdOwner$Outbound; -} - -export function patchV1FunctionalitiesFunctionalityIdOwnerToJSON( - patchV1FunctionalitiesFunctionalityIdOwner: - PatchV1FunctionalitiesFunctionalityIdOwner, -): string { - return JSON.stringify( - PatchV1FunctionalitiesFunctionalityIdOwner$outboundSchema.parse( - patchV1FunctionalitiesFunctionalityIdOwner, - ), - ); -} - -export function patchV1FunctionalitiesFunctionalityIdOwnerFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1FunctionalitiesFunctionalityIdOwner, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1FunctionalitiesFunctionalityIdOwner$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1FunctionalitiesFunctionalityIdOwner' from JSON`, - ); -} - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdTeams$inboundSchema: - z.ZodType = - z.object({ - id: z.string(), - remove: z.boolean().optional(), - }); - -/** @internal */ -export type PatchV1FunctionalitiesFunctionalityIdTeams$Outbound = { - id: string; - remove?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdTeams$outboundSchema: - z.ZodType< - PatchV1FunctionalitiesFunctionalityIdTeams$Outbound, - z.ZodTypeDef, - PatchV1FunctionalitiesFunctionalityIdTeams - > = z.object({ - id: z.string(), - remove: z.boolean().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1FunctionalitiesFunctionalityIdTeams$ { - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdTeams$inboundSchema` instead. */ - export const inboundSchema = - PatchV1FunctionalitiesFunctionalityIdTeams$inboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdTeams$outboundSchema` instead. */ - export const outboundSchema = - PatchV1FunctionalitiesFunctionalityIdTeams$outboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdTeams$Outbound` instead. */ - export type Outbound = PatchV1FunctionalitiesFunctionalityIdTeams$Outbound; -} - -export function patchV1FunctionalitiesFunctionalityIdTeamsToJSON( - patchV1FunctionalitiesFunctionalityIdTeams: - PatchV1FunctionalitiesFunctionalityIdTeams, -): string { - return JSON.stringify( - PatchV1FunctionalitiesFunctionalityIdTeams$outboundSchema.parse( - patchV1FunctionalitiesFunctionalityIdTeams, - ), - ); -} - -export function patchV1FunctionalitiesFunctionalityIdTeamsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1FunctionalitiesFunctionalityIdTeams, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1FunctionalitiesFunctionalityIdTeams$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1FunctionalitiesFunctionalityIdTeams' from JSON`, - ); -} - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdExternalResources$inboundSchema: - z.ZodType< - PatchV1FunctionalitiesFunctionalityIdExternalResources, - z.ZodTypeDef, - unknown - > = z.object({ - remote_id: z.string(), - connection_type: z.string().optional(), - remove: z.boolean().optional(), - }).transform((v) => { - return remap$(v, { - "remote_id": "remoteId", - "connection_type": "connectionType", - }); - }); - -/** @internal */ -export type PatchV1FunctionalitiesFunctionalityIdExternalResources$Outbound = { - remote_id: string; - connection_type?: string | undefined; - remove?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityIdExternalResources$outboundSchema: - z.ZodType< - PatchV1FunctionalitiesFunctionalityIdExternalResources$Outbound, - z.ZodTypeDef, - PatchV1FunctionalitiesFunctionalityIdExternalResources - > = z.object({ - remoteId: z.string(), - connectionType: z.string().optional(), - remove: z.boolean().optional(), - }).transform((v) => { - return remap$(v, { - remoteId: "remote_id", - connectionType: "connection_type", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1FunctionalitiesFunctionalityIdExternalResources$ { - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdExternalResources$inboundSchema` instead. */ - export const inboundSchema = - PatchV1FunctionalitiesFunctionalityIdExternalResources$inboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdExternalResources$outboundSchema` instead. */ - export const outboundSchema = - PatchV1FunctionalitiesFunctionalityIdExternalResources$outboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityIdExternalResources$Outbound` instead. */ - export type Outbound = - PatchV1FunctionalitiesFunctionalityIdExternalResources$Outbound; -} - -export function patchV1FunctionalitiesFunctionalityIdExternalResourcesToJSON( - patchV1FunctionalitiesFunctionalityIdExternalResources: - PatchV1FunctionalitiesFunctionalityIdExternalResources, -): string { - return JSON.stringify( - PatchV1FunctionalitiesFunctionalityIdExternalResources$outboundSchema.parse( - patchV1FunctionalitiesFunctionalityIdExternalResources, - ), - ); -} - -export function patchV1FunctionalitiesFunctionalityIdExternalResourcesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1FunctionalitiesFunctionalityIdExternalResources, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1FunctionalitiesFunctionalityIdExternalResources$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PatchV1FunctionalitiesFunctionalityIdExternalResources' from JSON`, - ); -} - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityId$inboundSchema: z.ZodType< - PatchV1FunctionalitiesFunctionalityId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - services: z.array( - z.lazy(() => PatchV1FunctionalitiesFunctionalityIdServices$inboundSchema), - ).optional(), - links: z.array( - z.lazy(() => PatchV1FunctionalitiesFunctionalityIdLinks$inboundSchema), - ).optional(), - owner: z.lazy(() => PatchV1FunctionalitiesFunctionalityIdOwner$inboundSchema) - .optional(), - remove_owner: z.boolean().optional(), - teams: z.array( - z.lazy(() => PatchV1FunctionalitiesFunctionalityIdTeams$inboundSchema), - ).optional(), - remove_remaining_teams: z.boolean().optional(), - external_resources: z.array( - z.lazy(() => - PatchV1FunctionalitiesFunctionalityIdExternalResources$inboundSchema - ), - ).optional(), - remove_remaining_external_resources: z.boolean().optional(), - labels: z.record(z.string()).optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - remove_remaining_services: z.boolean().default(false), -}).transform((v) => { - return remap$(v, { - "remove_owner": "removeOwner", - "remove_remaining_teams": "removeRemainingTeams", - "external_resources": "externalResources", - "remove_remaining_external_resources": "removeRemainingExternalResources", - "alert_on_add": "alertOnAdd", - "auto_add_responding_team": "autoAddRespondingTeam", - "remove_remaining_services": "removeRemainingServices", - }); -}); - -/** @internal */ -export type PatchV1FunctionalitiesFunctionalityId$Outbound = { - name?: string | undefined; - description?: string | undefined; - services?: - | Array - | undefined; - links?: - | Array - | undefined; - owner?: PatchV1FunctionalitiesFunctionalityIdOwner$Outbound | undefined; - remove_owner?: boolean | undefined; - teams?: - | Array - | undefined; - remove_remaining_teams?: boolean | undefined; - external_resources?: - | Array - | undefined; - remove_remaining_external_resources?: boolean | undefined; - labels?: { [k: string]: string } | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - remove_remaining_services: boolean; -}; - -/** @internal */ -export const PatchV1FunctionalitiesFunctionalityId$outboundSchema: z.ZodType< - PatchV1FunctionalitiesFunctionalityId$Outbound, - z.ZodTypeDef, - PatchV1FunctionalitiesFunctionalityId -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - services: z.array( - z.lazy(() => PatchV1FunctionalitiesFunctionalityIdServices$outboundSchema), - ).optional(), - links: z.array( - z.lazy(() => PatchV1FunctionalitiesFunctionalityIdLinks$outboundSchema), - ).optional(), - owner: z.lazy(() => PatchV1FunctionalitiesFunctionalityIdOwner$outboundSchema) - .optional(), - removeOwner: z.boolean().optional(), - teams: z.array( - z.lazy(() => PatchV1FunctionalitiesFunctionalityIdTeams$outboundSchema), - ).optional(), - removeRemainingTeams: z.boolean().optional(), - externalResources: z.array( - z.lazy(() => - PatchV1FunctionalitiesFunctionalityIdExternalResources$outboundSchema - ), - ).optional(), - removeRemainingExternalResources: z.boolean().optional(), - labels: z.record(z.string()).optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - removeRemainingServices: z.boolean().default(false), -}).transform((v) => { - return remap$(v, { - removeOwner: "remove_owner", - removeRemainingTeams: "remove_remaining_teams", - externalResources: "external_resources", - removeRemainingExternalResources: "remove_remaining_external_resources", - alertOnAdd: "alert_on_add", - autoAddRespondingTeam: "auto_add_responding_team", - removeRemainingServices: "remove_remaining_services", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1FunctionalitiesFunctionalityId$ { - /** @deprecated use `PatchV1FunctionalitiesFunctionalityId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1FunctionalitiesFunctionalityId$inboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1FunctionalitiesFunctionalityId$outboundSchema; - /** @deprecated use `PatchV1FunctionalitiesFunctionalityId$Outbound` instead. */ - export type Outbound = PatchV1FunctionalitiesFunctionalityId$Outbound; -} - -export function patchV1FunctionalitiesFunctionalityIdToJSON( - patchV1FunctionalitiesFunctionalityId: PatchV1FunctionalitiesFunctionalityId, -): string { - return JSON.stringify( - PatchV1FunctionalitiesFunctionalityId$outboundSchema.parse( - patchV1FunctionalitiesFunctionalityId, - ), - ); -} - -export function patchV1FunctionalitiesFunctionalityIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1FunctionalitiesFunctionalityId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1FunctionalitiesFunctionalityId' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentrolesincidentroleid.ts b/src/models/components/patchv1incidentrolesincidentroleid.ts deleted file mode 100644 index 32c9f1c9..00000000 --- a/src/models/components/patchv1incidentrolesincidentroleid.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a single incident role from its ID - */ -export type PatchV1IncidentRolesIncidentRoleId = { - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; -}; - -/** @internal */ -export const PatchV1IncidentRolesIncidentRoleId$inboundSchema: z.ZodType< - PatchV1IncidentRolesIncidentRoleId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), -}); - -/** @internal */ -export type PatchV1IncidentRolesIncidentRoleId$Outbound = { - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; -}; - -/** @internal */ -export const PatchV1IncidentRolesIncidentRoleId$outboundSchema: z.ZodType< - PatchV1IncidentRolesIncidentRoleId$Outbound, - z.ZodTypeDef, - PatchV1IncidentRolesIncidentRoleId -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentRolesIncidentRoleId$ { - /** @deprecated use `PatchV1IncidentRolesIncidentRoleId$inboundSchema` instead. */ - export const inboundSchema = PatchV1IncidentRolesIncidentRoleId$inboundSchema; - /** @deprecated use `PatchV1IncidentRolesIncidentRoleId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentRolesIncidentRoleId$outboundSchema; - /** @deprecated use `PatchV1IncidentRolesIncidentRoleId$Outbound` instead. */ - export type Outbound = PatchV1IncidentRolesIncidentRoleId$Outbound; -} - -export function patchV1IncidentRolesIncidentRoleIdToJSON( - patchV1IncidentRolesIncidentRoleId: PatchV1IncidentRolesIncidentRoleId, -): string { - return JSON.stringify( - PatchV1IncidentRolesIncidentRoleId$outboundSchema.parse( - patchV1IncidentRolesIncidentRoleId, - ), - ); -} - -export function patchV1IncidentRolesIncidentRoleIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1IncidentRolesIncidentRoleId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentRolesIncidentRoleId' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentid.ts b/src/models/components/patchv1incidentsincidentid.ts deleted file mode 100644 index b1478299..00000000 --- a/src/models/components/patchv1incidentsincidentid.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Key:value pairs to track custom data for the incident - */ -export type PatchV1IncidentsIncidentIdLabels = {}; - -/** - * Updates an incident with provided parameters - */ -export type PatchV1IncidentsIncidentId = { - name?: string | undefined; - summary?: string | undefined; - customerImpactSummary?: string | undefined; - description?: string | undefined; - /** - * Key:value pairs to track custom data for the incident - */ - labels?: PatchV1IncidentsIncidentIdLabels | undefined; - priority?: string | undefined; - severity?: string | undefined; - severityConditionId?: string | undefined; - severityImpactId?: string | undefined; - /** - * List of tags for the incident - */ - tagList?: Array | undefined; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdLabels$inboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdLabels, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type PatchV1IncidentsIncidentIdLabels$Outbound = {}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdLabels$outboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdLabels$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdLabels -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdLabels$ { - /** @deprecated use `PatchV1IncidentsIncidentIdLabels$inboundSchema` instead. */ - export const inboundSchema = PatchV1IncidentsIncidentIdLabels$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdLabels$outboundSchema` instead. */ - export const outboundSchema = PatchV1IncidentsIncidentIdLabels$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdLabels$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentIdLabels$Outbound; -} - -export function patchV1IncidentsIncidentIdLabelsToJSON( - patchV1IncidentsIncidentIdLabels: PatchV1IncidentsIncidentIdLabels, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdLabels$outboundSchema.parse( - patchV1IncidentsIncidentIdLabels, - ), - ); -} - -export function patchV1IncidentsIncidentIdLabelsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1IncidentsIncidentIdLabels$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdLabels' from JSON`, - ); -} - -/** @internal */ -export const PatchV1IncidentsIncidentId$inboundSchema: z.ZodType< - PatchV1IncidentsIncidentId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - customer_impact_summary: z.string().optional(), - description: z.string().optional(), - labels: z.lazy(() => PatchV1IncidentsIncidentIdLabels$inboundSchema) - .optional(), - priority: z.string().optional(), - severity: z.string().optional(), - severity_condition_id: z.string().optional(), - severity_impact_id: z.string().optional(), - tag_list: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "customer_impact_summary": "customerImpactSummary", - "severity_condition_id": "severityConditionId", - "severity_impact_id": "severityImpactId", - "tag_list": "tagList", - }); -}); - -/** @internal */ -export type PatchV1IncidentsIncidentId$Outbound = { - name?: string | undefined; - summary?: string | undefined; - customer_impact_summary?: string | undefined; - description?: string | undefined; - labels?: PatchV1IncidentsIncidentIdLabels$Outbound | undefined; - priority?: string | undefined; - severity?: string | undefined; - severity_condition_id?: string | undefined; - severity_impact_id?: string | undefined; - tag_list?: Array | undefined; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentId$outboundSchema: z.ZodType< - PatchV1IncidentsIncidentId$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentId -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - customerImpactSummary: z.string().optional(), - description: z.string().optional(), - labels: z.lazy(() => PatchV1IncidentsIncidentIdLabels$outboundSchema) - .optional(), - priority: z.string().optional(), - severity: z.string().optional(), - severityConditionId: z.string().optional(), - severityImpactId: z.string().optional(), - tagList: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - customerImpactSummary: "customer_impact_summary", - severityConditionId: "severity_condition_id", - severityImpactId: "severity_impact_id", - tagList: "tag_list", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentId$ { - /** @deprecated use `PatchV1IncidentsIncidentId$inboundSchema` instead. */ - export const inboundSchema = PatchV1IncidentsIncidentId$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentId$outboundSchema` instead. */ - export const outboundSchema = PatchV1IncidentsIncidentId$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentId$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentId$Outbound; -} - -export function patchV1IncidentsIncidentIdToJSON( - patchV1IncidentsIncidentId: PatchV1IncidentsIncidentId, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentId$outboundSchema.parse(patchV1IncidentsIncidentId), - ); -} - -export function patchV1IncidentsIncidentIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1IncidentsIncidentId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentId' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentidalertsincidentalertidprimary.ts b/src/models/components/patchv1incidentsincidentidalertsincidentalertidprimary.ts deleted file mode 100644 index 659e2a65..00000000 --- a/src/models/components/patchv1incidentsincidentidalertsincidentalertidprimary.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. - */ -export type PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary = { - primary: boolean; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$inboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary, - z.ZodTypeDef, - unknown - > = z.object({ - primary: z.boolean(), - }); - -/** @internal */ -export type PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$Outbound = { - primary: boolean; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$outboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary - > = z.object({ - primary: z.boolean(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$ { - /** @deprecated use `PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$Outbound` instead. */ - export type Outbound = - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$Outbound; -} - -export function patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimaryToJSON( - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$outboundSchema.parse( - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary, - ), - ); -} - -export function patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimaryFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentideventseventidvotes.ts b/src/models/components/patchv1incidentsincidentideventseventidvotes.ts deleted file mode 100644 index e9da66b2..00000000 --- a/src/models/components/patchv1incidentsincidentideventseventidvotes.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The direction you would like to vote, or if you dig it - */ -export const Direction = { - Up: "up", - Down: "down", - Dig: "dig", -} as const; -/** - * The direction you would like to vote, or if you dig it - */ -export type Direction = ClosedEnum; - -/** - * Allows for upvoting or downvoting an event - */ -export type PatchV1IncidentsIncidentIdEventsEventIdVotes = { - /** - * The direction you would like to vote, or if you dig it - */ - direction: Direction; -}; - -/** @internal */ -export const Direction$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Direction); - -/** @internal */ -export const Direction$outboundSchema: z.ZodNativeEnum = - Direction$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Direction$ { - /** @deprecated use `Direction$inboundSchema` instead. */ - export const inboundSchema = Direction$inboundSchema; - /** @deprecated use `Direction$outboundSchema` instead. */ - export const outboundSchema = Direction$outboundSchema; -} - -/** @internal */ -export const PatchV1IncidentsIncidentIdEventsEventIdVotes$inboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdEventsEventIdVotes, - z.ZodTypeDef, - unknown - > = z.object({ - direction: Direction$inboundSchema, - }); - -/** @internal */ -export type PatchV1IncidentsIncidentIdEventsEventIdVotes$Outbound = { - direction: string; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdEventsEventIdVotes$outboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdEventsEventIdVotes$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdEventsEventIdVotes - > = z.object({ - direction: Direction$outboundSchema, - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdEventsEventIdVotes$ { - /** @deprecated use `PatchV1IncidentsIncidentIdEventsEventIdVotes$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdEventsEventIdVotes$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdEventsEventIdVotes$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdEventsEventIdVotes$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdEventsEventIdVotes$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentIdEventsEventIdVotes$Outbound; -} - -export function patchV1IncidentsIncidentIdEventsEventIdVotesToJSON( - patchV1IncidentsIncidentIdEventsEventIdVotes: - PatchV1IncidentsIncidentIdEventsEventIdVotes, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdEventsEventIdVotes$outboundSchema.parse( - patchV1IncidentsIncidentIdEventsEventIdVotes, - ), - ); -} - -export function patchV1IncidentsIncidentIdEventsEventIdVotesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1IncidentsIncidentIdEventsEventIdVotes, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdEventsEventIdVotes$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1IncidentsIncidentIdEventsEventIdVotes' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentidgenericchatmessagesmessageid.ts b/src/models/components/patchv1incidentsincidentidgenericchatmessagesmessageid.ts deleted file mode 100644 index 75704168..00000000 --- a/src/models/components/patchv1incidentsincidentidgenericchatmessagesmessageid.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update an existing generic chat message on an incident. - */ -export type PatchV1IncidentsIncidentIdGenericChatMessagesMessageId = { - body: string; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$inboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId, - z.ZodTypeDef, - unknown - > = z.object({ - body: z.string(), - }); - -/** @internal */ -export type PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$Outbound = { - body: string; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$outboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId - > = z.object({ - body: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$ { - /** @deprecated use `PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$Outbound` instead. */ - export type Outbound = - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$Outbound; -} - -export function patchV1IncidentsIncidentIdGenericChatMessagesMessageIdToJSON( - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$outboundSchema.parse( - patchV1IncidentsIncidentIdGenericChatMessagesMessageId, - ), - ); -} - -export function patchV1IncidentsIncidentIdGenericChatMessagesMessageIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdGenericChatMessagesMessageId' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentidimpact.ts b/src/models/components/patchv1incidentsincidentidimpact.ts deleted file mode 100644 index a2d751cb..00000000 --- a/src/models/components/patchv1incidentsincidentidimpact.ts +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1IncidentsIncidentIdImpactImpact = { - id: string; - conditionId: string; -}; - -export type PatchV1IncidentsIncidentIdImpactStatusPages = { - id: string; - integrationSlug: string; -}; - -/** - * Allows updating an incident's impacted infrastructure, with the option to - * - * @remarks - * move the incident into a different milestone and provide a note to update - * the incident timeline and any attached status pages. If this method is - * requested with the PUT verb, impacts will be completely replaced with the - * information in the request body, even if not provided (effectively clearing - * all impacts). If this method is requested with the PATCH verb, the provided - * impacts will be added or updated, but no impacts will be removed. - */ -export type PatchV1IncidentsIncidentIdImpact = { - note?: string | undefined; - milestone?: string | undefined; - impact?: Array | undefined; - statusPages?: Array | undefined; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdImpactImpact$inboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdImpactImpact, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - condition_id: z.string(), -}).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); -}); - -/** @internal */ -export type PatchV1IncidentsIncidentIdImpactImpact$Outbound = { - id: string; - condition_id: string; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdImpactImpact$outboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdImpactImpact$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdImpactImpact -> = z.object({ - id: z.string(), - conditionId: z.string(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdImpactImpact$ { - /** @deprecated use `PatchV1IncidentsIncidentIdImpactImpact$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdImpactImpact$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdImpactImpact$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdImpactImpact$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdImpactImpact$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentIdImpactImpact$Outbound; -} - -export function patchV1IncidentsIncidentIdImpactImpactToJSON( - patchV1IncidentsIncidentIdImpactImpact: - PatchV1IncidentsIncidentIdImpactImpact, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdImpactImpact$outboundSchema.parse( - patchV1IncidentsIncidentIdImpactImpact, - ), - ); -} - -export function patchV1IncidentsIncidentIdImpactImpactFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdImpactImpact$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdImpactImpact' from JSON`, - ); -} - -/** @internal */ -export const PatchV1IncidentsIncidentIdImpactStatusPages$inboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdImpactStatusPages, - z.ZodTypeDef, - unknown - > = z.object({ - id: z.string(), - integration_slug: z.string(), - }).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - }); - }); - -/** @internal */ -export type PatchV1IncidentsIncidentIdImpactStatusPages$Outbound = { - id: string; - integration_slug: string; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdImpactStatusPages$outboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdImpactStatusPages$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdImpactStatusPages - > = z.object({ - id: z.string(), - integrationSlug: z.string(), - }).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdImpactStatusPages$ { - /** @deprecated use `PatchV1IncidentsIncidentIdImpactStatusPages$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdImpactStatusPages$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdImpactStatusPages$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdImpactStatusPages$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdImpactStatusPages$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentIdImpactStatusPages$Outbound; -} - -export function patchV1IncidentsIncidentIdImpactStatusPagesToJSON( - patchV1IncidentsIncidentIdImpactStatusPages: - PatchV1IncidentsIncidentIdImpactStatusPages, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdImpactStatusPages$outboundSchema.parse( - patchV1IncidentsIncidentIdImpactStatusPages, - ), - ); -} - -export function patchV1IncidentsIncidentIdImpactStatusPagesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1IncidentsIncidentIdImpactStatusPages, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdImpactStatusPages$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1IncidentsIncidentIdImpactStatusPages' from JSON`, - ); -} - -/** @internal */ -export const PatchV1IncidentsIncidentIdImpact$inboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdImpact, - z.ZodTypeDef, - unknown -> = z.object({ - note: z.string().optional(), - milestone: z.string().optional(), - impact: z.array( - z.lazy(() => PatchV1IncidentsIncidentIdImpactImpact$inboundSchema), - ).optional(), - status_pages: z.array( - z.lazy(() => PatchV1IncidentsIncidentIdImpactStatusPages$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "status_pages": "statusPages", - }); -}); - -/** @internal */ -export type PatchV1IncidentsIncidentIdImpact$Outbound = { - note?: string | undefined; - milestone?: string | undefined; - impact?: Array | undefined; - status_pages?: - | Array - | undefined; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdImpact$outboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdImpact$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdImpact -> = z.object({ - note: z.string().optional(), - milestone: z.string().optional(), - impact: z.array( - z.lazy(() => PatchV1IncidentsIncidentIdImpactImpact$outboundSchema), - ).optional(), - statusPages: z.array( - z.lazy(() => PatchV1IncidentsIncidentIdImpactStatusPages$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - statusPages: "status_pages", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdImpact$ { - /** @deprecated use `PatchV1IncidentsIncidentIdImpact$inboundSchema` instead. */ - export const inboundSchema = PatchV1IncidentsIncidentIdImpact$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdImpact$outboundSchema` instead. */ - export const outboundSchema = PatchV1IncidentsIncidentIdImpact$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdImpact$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentIdImpact$Outbound; -} - -export function patchV1IncidentsIncidentIdImpactToJSON( - patchV1IncidentsIncidentIdImpact: PatchV1IncidentsIncidentIdImpact, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdImpact$outboundSchema.parse( - patchV1IncidentsIncidentIdImpact, - ), - ); -} - -export function patchV1IncidentsIncidentIdImpactFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1IncidentsIncidentIdImpact$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdImpact' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentidnotesnoteid.ts b/src/models/components/patchv1incidentsincidentidnotesnoteid.ts deleted file mode 100644 index 3e789da2..00000000 --- a/src/models/components/patchv1incidentsincidentidnotesnoteid.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Updates the body of a note - */ -export type PatchV1IncidentsIncidentIdNotesNoteId = { - body: string; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdNotesNoteId$inboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdNotesNoteId, - z.ZodTypeDef, - unknown -> = z.object({ - body: z.string(), -}); - -/** @internal */ -export type PatchV1IncidentsIncidentIdNotesNoteId$Outbound = { - body: string; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdNotesNoteId$outboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdNotesNoteId$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdNotesNoteId -> = z.object({ - body: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdNotesNoteId$ { - /** @deprecated use `PatchV1IncidentsIncidentIdNotesNoteId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdNotesNoteId$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdNotesNoteId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdNotesNoteId$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdNotesNoteId$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentIdNotesNoteId$Outbound; -} - -export function patchV1IncidentsIncidentIdNotesNoteIdToJSON( - patchV1IncidentsIncidentIdNotesNoteId: PatchV1IncidentsIncidentIdNotesNoteId, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdNotesNoteId$outboundSchema.parse( - patchV1IncidentsIncidentIdNotesNoteId, - ), - ); -} - -export function patchV1IncidentsIncidentIdNotesNoteIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdNotesNoteId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdNotesNoteId' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.ts b/src/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.ts deleted file mode 100644 index f472d594..00000000 --- a/src/models/components/patchv1incidentsincidentidrelatedchangeeventsrelatedchangeeventid.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType = - { - Caused: "caused", - Fixed: "fixed", - Suspect: "suspect", - Dismissed: "dismissed", - } as const; -export type PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType = - ClosedEnum< - typeof PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType - >; - -/** - * Update a change attached to an incident - */ -export type PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId = - { - type?: - | PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType - | undefined; - /** - * A short description about why this change event is related - */ - why?: string | undefined; - }; - -/** @internal */ -export const PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$inboundSchema: - z.ZodNativeEnum< - typeof PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType - > = z.nativeEnum( - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType, - ); - -/** @internal */ -export const PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$outboundSchema: - z.ZodNativeEnum< - typeof PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType - > = - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$ { - /** @deprecated use `PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$outboundSchema; -} - -/** @internal */ -export const PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$inboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId, - z.ZodTypeDef, - unknown - > = z.object({ - type: - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$inboundSchema - .optional(), - why: z.string().optional(), - }); - -/** @internal */ -export type PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$Outbound = - { - type?: string | undefined; - why?: string | undefined; - }; - -/** @internal */ -export const PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$outboundSchema: - z.ZodType< - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId - > = z.object({ - type: - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdType$outboundSchema - .optional(), - why: z.string().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$ { - /** @deprecated use `PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$Outbound` instead. */ - export type Outbound = - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$Outbound; -} - -export function patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdToJSON( - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$outboundSchema - .parse(patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId), - ); -} - -export function patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidentsincidentidtaskstaskid.ts b/src/models/components/patchv1incidentsincidentidtaskstaskid.ts deleted file mode 100644 index ac362299..00000000 --- a/src/models/components/patchv1incidentsincidentidtaskstaskid.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a task's attributes - */ -export type PatchV1IncidentsIncidentIdTasksTaskId = { - /** - * The title of the task. - */ - title?: string | undefined; - /** - * A description of what the task is for. - */ - description?: string | undefined; - /** - * The state of the task. One of: open, in_progress, cancelled, done - */ - state?: string | undefined; - /** - * The ID of the user assigned to the task. - */ - assigneeId?: string | undefined; - /** - * The due date of the task. Relative values are supported such as '5m' - */ - dueAt?: string | undefined; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdTasksTaskId$inboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdTasksTaskId, - z.ZodTypeDef, - unknown -> = z.object({ - title: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - assignee_id: z.string().optional(), - due_at: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "assignee_id": "assigneeId", - "due_at": "dueAt", - }); -}); - -/** @internal */ -export type PatchV1IncidentsIncidentIdTasksTaskId$Outbound = { - title?: string | undefined; - description?: string | undefined; - state?: string | undefined; - assignee_id?: string | undefined; - due_at?: string | undefined; -}; - -/** @internal */ -export const PatchV1IncidentsIncidentIdTasksTaskId$outboundSchema: z.ZodType< - PatchV1IncidentsIncidentIdTasksTaskId$Outbound, - z.ZodTypeDef, - PatchV1IncidentsIncidentIdTasksTaskId -> = z.object({ - title: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - assigneeId: z.string().optional(), - dueAt: z.string().optional(), -}).transform((v) => { - return remap$(v, { - assigneeId: "assignee_id", - dueAt: "due_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentsIncidentIdTasksTaskId$ { - /** @deprecated use `PatchV1IncidentsIncidentIdTasksTaskId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IncidentsIncidentIdTasksTaskId$inboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdTasksTaskId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IncidentsIncidentIdTasksTaskId$outboundSchema; - /** @deprecated use `PatchV1IncidentsIncidentIdTasksTaskId$Outbound` instead. */ - export type Outbound = PatchV1IncidentsIncidentIdTasksTaskId$Outbound; -} - -export function patchV1IncidentsIncidentIdTasksTaskIdToJSON( - patchV1IncidentsIncidentIdTasksTaskId: PatchV1IncidentsIncidentIdTasksTaskId, -): string { - return JSON.stringify( - PatchV1IncidentsIncidentIdTasksTaskId$outboundSchema.parse( - patchV1IncidentsIncidentIdTasksTaskId, - ), - ); -} - -export function patchV1IncidentsIncidentIdTasksTaskIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1IncidentsIncidentIdTasksTaskId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentsIncidentIdTasksTaskId' from JSON`, - ); -} diff --git a/src/models/components/patchv1incidenttypesid.ts b/src/models/components/patchv1incidenttypesid.ts deleted file mode 100644 index 4740820e..00000000 --- a/src/models/components/patchv1incidenttypesid.ts +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1IncidentTypesIdImpacts = { - /** - * The id of impact - */ - id: string; - /** - * The id of the condition - */ - conditionId: string; -}; - -export type PatchV1IncidentTypesIdTemplate = { - description?: string | undefined; - customerImpactSummary?: string | undefined; - /** - * A labels hash of keys and values - */ - labels?: { [k: string]: string } | undefined; - severity?: string | undefined; - priority?: string | undefined; - /** - * List of tags for the incident - */ - tagList?: Array | undefined; - /** - * List of ids of Runbooks to attach to incidents created from this type - */ - runbookIds?: Array | undefined; - privateIncident?: boolean | undefined; - /** - * List of ids of teams to be assigned to incidents - */ - teamIds?: Array | undefined; - /** - * An array of impact/condition combinations - */ - impacts?: Array | undefined; -}; - -/** - * Update a single incident type from its ID - */ -export type PatchV1IncidentTypesId = { - name: string; - template: PatchV1IncidentTypesIdTemplate; -}; - -/** @internal */ -export const PatchV1IncidentTypesIdImpacts$inboundSchema: z.ZodType< - PatchV1IncidentTypesIdImpacts, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - condition_id: z.string(), -}).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); -}); - -/** @internal */ -export type PatchV1IncidentTypesIdImpacts$Outbound = { - id: string; - condition_id: string; -}; - -/** @internal */ -export const PatchV1IncidentTypesIdImpacts$outboundSchema: z.ZodType< - PatchV1IncidentTypesIdImpacts$Outbound, - z.ZodTypeDef, - PatchV1IncidentTypesIdImpacts -> = z.object({ - id: z.string(), - conditionId: z.string(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentTypesIdImpacts$ { - /** @deprecated use `PatchV1IncidentTypesIdImpacts$inboundSchema` instead. */ - export const inboundSchema = PatchV1IncidentTypesIdImpacts$inboundSchema; - /** @deprecated use `PatchV1IncidentTypesIdImpacts$outboundSchema` instead. */ - export const outboundSchema = PatchV1IncidentTypesIdImpacts$outboundSchema; - /** @deprecated use `PatchV1IncidentTypesIdImpacts$Outbound` instead. */ - export type Outbound = PatchV1IncidentTypesIdImpacts$Outbound; -} - -export function patchV1IncidentTypesIdImpactsToJSON( - patchV1IncidentTypesIdImpacts: PatchV1IncidentTypesIdImpacts, -): string { - return JSON.stringify( - PatchV1IncidentTypesIdImpacts$outboundSchema.parse( - patchV1IncidentTypesIdImpacts, - ), - ); -} - -export function patchV1IncidentTypesIdImpactsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1IncidentTypesIdImpacts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentTypesIdImpacts' from JSON`, - ); -} - -/** @internal */ -export const PatchV1IncidentTypesIdTemplate$inboundSchema: z.ZodType< - PatchV1IncidentTypesIdTemplate, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.string().optional(), - customer_impact_summary: z.string().optional(), - labels: z.record(z.string()).optional(), - severity: z.string().optional(), - priority: z.string().optional(), - tag_list: z.array(z.string()).optional(), - runbook_ids: z.array(z.string()).optional(), - private_incident: z.boolean().optional(), - team_ids: z.array(z.string()).optional(), - impacts: z.array(z.lazy(() => PatchV1IncidentTypesIdImpacts$inboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - "customer_impact_summary": "customerImpactSummary", - "tag_list": "tagList", - "runbook_ids": "runbookIds", - "private_incident": "privateIncident", - "team_ids": "teamIds", - }); -}); - -/** @internal */ -export type PatchV1IncidentTypesIdTemplate$Outbound = { - description?: string | undefined; - customer_impact_summary?: string | undefined; - labels?: { [k: string]: string } | undefined; - severity?: string | undefined; - priority?: string | undefined; - tag_list?: Array | undefined; - runbook_ids?: Array | undefined; - private_incident?: boolean | undefined; - team_ids?: Array | undefined; - impacts?: Array | undefined; -}; - -/** @internal */ -export const PatchV1IncidentTypesIdTemplate$outboundSchema: z.ZodType< - PatchV1IncidentTypesIdTemplate$Outbound, - z.ZodTypeDef, - PatchV1IncidentTypesIdTemplate -> = z.object({ - description: z.string().optional(), - customerImpactSummary: z.string().optional(), - labels: z.record(z.string()).optional(), - severity: z.string().optional(), - priority: z.string().optional(), - tagList: z.array(z.string()).optional(), - runbookIds: z.array(z.string()).optional(), - privateIncident: z.boolean().optional(), - teamIds: z.array(z.string()).optional(), - impacts: z.array(z.lazy(() => PatchV1IncidentTypesIdImpacts$outboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - customerImpactSummary: "customer_impact_summary", - tagList: "tag_list", - runbookIds: "runbook_ids", - privateIncident: "private_incident", - teamIds: "team_ids", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentTypesIdTemplate$ { - /** @deprecated use `PatchV1IncidentTypesIdTemplate$inboundSchema` instead. */ - export const inboundSchema = PatchV1IncidentTypesIdTemplate$inboundSchema; - /** @deprecated use `PatchV1IncidentTypesIdTemplate$outboundSchema` instead. */ - export const outboundSchema = PatchV1IncidentTypesIdTemplate$outboundSchema; - /** @deprecated use `PatchV1IncidentTypesIdTemplate$Outbound` instead. */ - export type Outbound = PatchV1IncidentTypesIdTemplate$Outbound; -} - -export function patchV1IncidentTypesIdTemplateToJSON( - patchV1IncidentTypesIdTemplate: PatchV1IncidentTypesIdTemplate, -): string { - return JSON.stringify( - PatchV1IncidentTypesIdTemplate$outboundSchema.parse( - patchV1IncidentTypesIdTemplate, - ), - ); -} - -export function patchV1IncidentTypesIdTemplateFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1IncidentTypesIdTemplate$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentTypesIdTemplate' from JSON`, - ); -} - -/** @internal */ -export const PatchV1IncidentTypesId$inboundSchema: z.ZodType< - PatchV1IncidentTypesId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - template: z.lazy(() => PatchV1IncidentTypesIdTemplate$inboundSchema), -}); - -/** @internal */ -export type PatchV1IncidentTypesId$Outbound = { - name: string; - template: PatchV1IncidentTypesIdTemplate$Outbound; -}; - -/** @internal */ -export const PatchV1IncidentTypesId$outboundSchema: z.ZodType< - PatchV1IncidentTypesId$Outbound, - z.ZodTypeDef, - PatchV1IncidentTypesId -> = z.object({ - name: z.string(), - template: z.lazy(() => PatchV1IncidentTypesIdTemplate$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IncidentTypesId$ { - /** @deprecated use `PatchV1IncidentTypesId$inboundSchema` instead. */ - export const inboundSchema = PatchV1IncidentTypesId$inboundSchema; - /** @deprecated use `PatchV1IncidentTypesId$outboundSchema` instead. */ - export const outboundSchema = PatchV1IncidentTypesId$outboundSchema; - /** @deprecated use `PatchV1IncidentTypesId$Outbound` instead. */ - export type Outbound = PatchV1IncidentTypesId$Outbound; -} - -export function patchV1IncidentTypesIdToJSON( - patchV1IncidentTypesId: PatchV1IncidentTypesId, -): string { - return JSON.stringify( - PatchV1IncidentTypesId$outboundSchema.parse(patchV1IncidentTypesId), - ); -} - -export function patchV1IncidentTypesIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1IncidentTypesId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IncidentTypesId' from JSON`, - ); -} diff --git a/src/models/components/patchv1integrationsawscloudtrailbatchesid.ts b/src/models/components/patchv1integrationsawscloudtrailbatchesid.ts deleted file mode 100644 index 8f2458a7..00000000 --- a/src/models/components/patchv1integrationsawscloudtrailbatchesid.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a CloudTrail batch with new information. - */ -export type PatchV1IntegrationsAwsCloudtrailBatchesId = { - eventsCreated?: number | undefined; - status?: string | undefined; - error?: string | undefined; - endsAt?: Date | undefined; -}; - -/** @internal */ -export const PatchV1IntegrationsAwsCloudtrailBatchesId$inboundSchema: z.ZodType< - PatchV1IntegrationsAwsCloudtrailBatchesId, - z.ZodTypeDef, - unknown -> = z.object({ - events_created: z.number().int().optional(), - status: z.string().optional(), - error: z.string().optional(), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), -}).transform((v) => { - return remap$(v, { - "events_created": "eventsCreated", - "ends_at": "endsAt", - }); -}); - -/** @internal */ -export type PatchV1IntegrationsAwsCloudtrailBatchesId$Outbound = { - events_created?: number | undefined; - status?: string | undefined; - error?: string | undefined; - ends_at?: string | undefined; -}; - -/** @internal */ -export const PatchV1IntegrationsAwsCloudtrailBatchesId$outboundSchema: - z.ZodType< - PatchV1IntegrationsAwsCloudtrailBatchesId$Outbound, - z.ZodTypeDef, - PatchV1IntegrationsAwsCloudtrailBatchesId - > = z.object({ - eventsCreated: z.number().int().optional(), - status: z.string().optional(), - error: z.string().optional(), - endsAt: z.date().transform(v => v.toISOString()).optional(), - }).transform((v) => { - return remap$(v, { - eventsCreated: "events_created", - endsAt: "ends_at", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IntegrationsAwsCloudtrailBatchesId$ { - /** @deprecated use `PatchV1IntegrationsAwsCloudtrailBatchesId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IntegrationsAwsCloudtrailBatchesId$inboundSchema; - /** @deprecated use `PatchV1IntegrationsAwsCloudtrailBatchesId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IntegrationsAwsCloudtrailBatchesId$outboundSchema; - /** @deprecated use `PatchV1IntegrationsAwsCloudtrailBatchesId$Outbound` instead. */ - export type Outbound = PatchV1IntegrationsAwsCloudtrailBatchesId$Outbound; -} - -export function patchV1IntegrationsAwsCloudtrailBatchesIdToJSON( - patchV1IntegrationsAwsCloudtrailBatchesId: - PatchV1IntegrationsAwsCloudtrailBatchesId, -): string { - return JSON.stringify( - PatchV1IntegrationsAwsCloudtrailBatchesId$outboundSchema.parse( - patchV1IntegrationsAwsCloudtrailBatchesId, - ), - ); -} - -export function patchV1IntegrationsAwsCloudtrailBatchesIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1IntegrationsAwsCloudtrailBatchesId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1IntegrationsAwsCloudtrailBatchesId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1IntegrationsAwsCloudtrailBatchesId' from JSON`, - ); -} diff --git a/src/models/components/patchv1integrationsawsconnectionsid.ts b/src/models/components/patchv1integrationsawsconnectionsid.ts deleted file mode 100644 index 1a335169..00000000 --- a/src/models/components/patchv1integrationsawsconnectionsid.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update the AWS connection with the provided data. - */ -export type PatchV1IntegrationsAwsConnectionsId = { - awsAccountId?: string | undefined; - targetArn?: string | undefined; - connectionStatus?: string | undefined; -}; - -/** @internal */ -export const PatchV1IntegrationsAwsConnectionsId$inboundSchema: z.ZodType< - PatchV1IntegrationsAwsConnectionsId, - z.ZodTypeDef, - unknown -> = z.object({ - aws_account_id: z.string().optional(), - target_arn: z.string().optional(), - connection_status: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "aws_account_id": "awsAccountId", - "target_arn": "targetArn", - "connection_status": "connectionStatus", - }); -}); - -/** @internal */ -export type PatchV1IntegrationsAwsConnectionsId$Outbound = { - aws_account_id?: string | undefined; - target_arn?: string | undefined; - connection_status?: string | undefined; -}; - -/** @internal */ -export const PatchV1IntegrationsAwsConnectionsId$outboundSchema: z.ZodType< - PatchV1IntegrationsAwsConnectionsId$Outbound, - z.ZodTypeDef, - PatchV1IntegrationsAwsConnectionsId -> = z.object({ - awsAccountId: z.string().optional(), - targetArn: z.string().optional(), - connectionStatus: z.string().optional(), -}).transform((v) => { - return remap$(v, { - awsAccountId: "aws_account_id", - targetArn: "target_arn", - connectionStatus: "connection_status", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IntegrationsAwsConnectionsId$ { - /** @deprecated use `PatchV1IntegrationsAwsConnectionsId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IntegrationsAwsConnectionsId$inboundSchema; - /** @deprecated use `PatchV1IntegrationsAwsConnectionsId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IntegrationsAwsConnectionsId$outboundSchema; - /** @deprecated use `PatchV1IntegrationsAwsConnectionsId$Outbound` instead. */ - export type Outbound = PatchV1IntegrationsAwsConnectionsId$Outbound; -} - -export function patchV1IntegrationsAwsConnectionsIdToJSON( - patchV1IntegrationsAwsConnectionsId: PatchV1IntegrationsAwsConnectionsId, -): string { - return JSON.stringify( - PatchV1IntegrationsAwsConnectionsId$outboundSchema.parse( - patchV1IntegrationsAwsConnectionsId, - ), - ); -} - -export function patchV1IntegrationsAwsConnectionsIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1IntegrationsAwsConnectionsId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1IntegrationsAwsConnectionsId' from JSON`, - ); -} diff --git a/src/models/components/patchv1integrationsstatuspageconnectionsconnectionid.ts b/src/models/components/patchv1integrationsstatuspageconnectionsconnectionid.ts deleted file mode 100644 index fdf9a1fc..00000000 --- a/src/models/components/patchv1integrationsstatuspageconnectionsconnectionid.ts +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Severities = { - /** - * FireHydrant severity slug - */ - severitySlug: string; - /** - * Statuspage.io severity name - */ - remoteStatus: string; -}; - -export type Conditions = { - /** - * FireHydrant condition id - */ - conditionId: string; - /** - * Statuspage.io condition name - */ - statuspageioCondition: string; -}; - -/** - * Statuspage.io status - */ -export const PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus = { - Investigating: "investigating", - Identified: "identified", - Monitoring: "monitoring", - Resolved: "resolved", -} as const; -/** - * Statuspage.io status - */ -export type PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus = - ClosedEnum; - -export type MilestoneMappings = { - /** - * FireHydrant milestone id - */ - milestoneId: string; - /** - * Statuspage.io status - */ - status: PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus; -}; - -/** - * Update the given Statuspage integration connection. - */ -export type PatchV1IntegrationsStatuspageConnectionsConnectionId = { - pageId?: string | undefined; - severities?: Array | undefined; - conditions?: Array | undefined; - milestoneMappings?: Array | undefined; -}; - -/** @internal */ -export const Severities$inboundSchema: z.ZodType< - Severities, - z.ZodTypeDef, - unknown -> = z.object({ - severity_slug: z.string(), - remote_status: z.string(), -}).transform((v) => { - return remap$(v, { - "severity_slug": "severitySlug", - "remote_status": "remoteStatus", - }); -}); - -/** @internal */ -export type Severities$Outbound = { - severity_slug: string; - remote_status: string; -}; - -/** @internal */ -export const Severities$outboundSchema: z.ZodType< - Severities$Outbound, - z.ZodTypeDef, - Severities -> = z.object({ - severitySlug: z.string(), - remoteStatus: z.string(), -}).transform((v) => { - return remap$(v, { - severitySlug: "severity_slug", - remoteStatus: "remote_status", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Severities$ { - /** @deprecated use `Severities$inboundSchema` instead. */ - export const inboundSchema = Severities$inboundSchema; - /** @deprecated use `Severities$outboundSchema` instead. */ - export const outboundSchema = Severities$outboundSchema; - /** @deprecated use `Severities$Outbound` instead. */ - export type Outbound = Severities$Outbound; -} - -export function severitiesToJSON(severities: Severities): string { - return JSON.stringify(Severities$outboundSchema.parse(severities)); -} - -export function severitiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Severities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Severities' from JSON`, - ); -} - -/** @internal */ -export const Conditions$inboundSchema: z.ZodType< - Conditions, - z.ZodTypeDef, - unknown -> = z.object({ - condition_id: z.string(), - statuspageio_condition: z.string(), -}).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - "statuspageio_condition": "statuspageioCondition", - }); -}); - -/** @internal */ -export type Conditions$Outbound = { - condition_id: string; - statuspageio_condition: string; -}; - -/** @internal */ -export const Conditions$outboundSchema: z.ZodType< - Conditions$Outbound, - z.ZodTypeDef, - Conditions -> = z.object({ - conditionId: z.string(), - statuspageioCondition: z.string(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - statuspageioCondition: "statuspageio_condition", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Conditions$ { - /** @deprecated use `Conditions$inboundSchema` instead. */ - export const inboundSchema = Conditions$inboundSchema; - /** @deprecated use `Conditions$outboundSchema` instead. */ - export const outboundSchema = Conditions$outboundSchema; - /** @deprecated use `Conditions$Outbound` instead. */ - export type Outbound = Conditions$Outbound; -} - -export function conditionsToJSON(conditions: Conditions): string { - return JSON.stringify(Conditions$outboundSchema.parse(conditions)); -} - -export function conditionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Conditions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Conditions' from JSON`, - ); -} - -/** @internal */ -export const PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$inboundSchema: - z.ZodNativeEnum< - typeof PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus - > = z.nativeEnum(PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus); - -/** @internal */ -export const PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$outboundSchema: - z.ZodNativeEnum< - typeof PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus - > = PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$ { - /** @deprecated use `PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$inboundSchema; - /** @deprecated use `PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$outboundSchema; -} - -/** @internal */ -export const MilestoneMappings$inboundSchema: z.ZodType< - MilestoneMappings, - z.ZodTypeDef, - unknown -> = z.object({ - milestone_id: z.string(), - status: - PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$inboundSchema, -}).transform((v) => { - return remap$(v, { - "milestone_id": "milestoneId", - }); -}); - -/** @internal */ -export type MilestoneMappings$Outbound = { - milestone_id: string; - status: string; -}; - -/** @internal */ -export const MilestoneMappings$outboundSchema: z.ZodType< - MilestoneMappings$Outbound, - z.ZodTypeDef, - MilestoneMappings -> = z.object({ - milestoneId: z.string(), - status: - PatchV1IntegrationsStatuspageConnectionsConnectionIdStatus$outboundSchema, -}).transform((v) => { - return remap$(v, { - milestoneId: "milestone_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MilestoneMappings$ { - /** @deprecated use `MilestoneMappings$inboundSchema` instead. */ - export const inboundSchema = MilestoneMappings$inboundSchema; - /** @deprecated use `MilestoneMappings$outboundSchema` instead. */ - export const outboundSchema = MilestoneMappings$outboundSchema; - /** @deprecated use `MilestoneMappings$Outbound` instead. */ - export type Outbound = MilestoneMappings$Outbound; -} - -export function milestoneMappingsToJSON( - milestoneMappings: MilestoneMappings, -): string { - return JSON.stringify( - MilestoneMappings$outboundSchema.parse(milestoneMappings), - ); -} - -export function milestoneMappingsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MilestoneMappings$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MilestoneMappings' from JSON`, - ); -} - -/** @internal */ -export const PatchV1IntegrationsStatuspageConnectionsConnectionId$inboundSchema: - z.ZodType< - PatchV1IntegrationsStatuspageConnectionsConnectionId, - z.ZodTypeDef, - unknown - > = z.object({ - page_id: z.string().optional(), - severities: z.array(z.lazy(() => Severities$inboundSchema)).optional(), - conditions: z.array(z.lazy(() => Conditions$inboundSchema)).optional(), - milestone_mappings: z.array(z.lazy(() => MilestoneMappings$inboundSchema)) - .optional(), - }).transform((v) => { - return remap$(v, { - "page_id": "pageId", - "milestone_mappings": "milestoneMappings", - }); - }); - -/** @internal */ -export type PatchV1IntegrationsStatuspageConnectionsConnectionId$Outbound = { - page_id?: string | undefined; - severities?: Array | undefined; - conditions?: Array | undefined; - milestone_mappings?: Array | undefined; -}; - -/** @internal */ -export const PatchV1IntegrationsStatuspageConnectionsConnectionId$outboundSchema: - z.ZodType< - PatchV1IntegrationsStatuspageConnectionsConnectionId$Outbound, - z.ZodTypeDef, - PatchV1IntegrationsStatuspageConnectionsConnectionId - > = z.object({ - pageId: z.string().optional(), - severities: z.array(z.lazy(() => Severities$outboundSchema)).optional(), - conditions: z.array(z.lazy(() => Conditions$outboundSchema)).optional(), - milestoneMappings: z.array(z.lazy(() => MilestoneMappings$outboundSchema)) - .optional(), - }).transform((v) => { - return remap$(v, { - pageId: "page_id", - milestoneMappings: "milestone_mappings", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1IntegrationsStatuspageConnectionsConnectionId$ { - /** @deprecated use `PatchV1IntegrationsStatuspageConnectionsConnectionId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1IntegrationsStatuspageConnectionsConnectionId$inboundSchema; - /** @deprecated use `PatchV1IntegrationsStatuspageConnectionsConnectionId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1IntegrationsStatuspageConnectionsConnectionId$outboundSchema; - /** @deprecated use `PatchV1IntegrationsStatuspageConnectionsConnectionId$Outbound` instead. */ - export type Outbound = - PatchV1IntegrationsStatuspageConnectionsConnectionId$Outbound; -} - -export function patchV1IntegrationsStatuspageConnectionsConnectionIdToJSON( - patchV1IntegrationsStatuspageConnectionsConnectionId: - PatchV1IntegrationsStatuspageConnectionsConnectionId, -): string { - return JSON.stringify( - PatchV1IntegrationsStatuspageConnectionsConnectionId$outboundSchema.parse( - patchV1IntegrationsStatuspageConnectionsConnectionId, - ), - ); -} - -export function patchV1IntegrationsStatuspageConnectionsConnectionIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1IntegrationsStatuspageConnectionsConnectionId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1IntegrationsStatuspageConnectionsConnectionId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1IntegrationsStatuspageConnectionsConnectionId' from JSON`, - ); -} diff --git a/src/models/components/patchv1nuncconnectionsnuncconnectionidlinkslinkid.ts b/src/models/components/patchv1nuncconnectionsnuncconnectionidlinkslinkid.ts deleted file mode 100644 index c31e1397..00000000 --- a/src/models/components/patchv1nuncconnectionsnuncconnectionidlinkslinkid.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a link to be displayed on a FireHydrant status page - */ -export type PatchV1NuncConnectionsNuncConnectionIdLinksLinkId = { - displayText?: string | undefined; - iconUrl?: string | undefined; - hrefUrl?: string | undefined; -}; - -/** @internal */ -export const PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$inboundSchema: - z.ZodType< - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId, - z.ZodTypeDef, - unknown - > = z.object({ - display_text: z.string().optional(), - icon_url: z.string().optional(), - href_url: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "display_text": "displayText", - "icon_url": "iconUrl", - "href_url": "hrefUrl", - }); - }); - -/** @internal */ -export type PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$Outbound = { - display_text?: string | undefined; - icon_url?: string | undefined; - href_url?: string | undefined; -}; - -/** @internal */ -export const PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$outboundSchema: - z.ZodType< - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$Outbound, - z.ZodTypeDef, - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId - > = z.object({ - displayText: z.string().optional(), - iconUrl: z.string().optional(), - hrefUrl: z.string().optional(), - }).transform((v) => { - return remap$(v, { - displayText: "display_text", - iconUrl: "icon_url", - hrefUrl: "href_url", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$ { - /** @deprecated use `PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$inboundSchema; - /** @deprecated use `PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$outboundSchema; - /** @deprecated use `PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$Outbound` instead. */ - export type Outbound = - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$Outbound; -} - -export function patchV1NuncConnectionsNuncConnectionIdLinksLinkIdToJSON( - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId, -): string { - return JSON.stringify( - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$outboundSchema.parse( - patchV1NuncConnectionsNuncConnectionIdLinksLinkId, - ), - ); -} - -export function patchV1NuncConnectionsNuncConnectionIdLinksLinkIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1NuncConnectionsNuncConnectionIdLinksLinkId' from JSON`, - ); -} diff --git a/src/models/components/patchv1postmortemsreportsreportid.ts b/src/models/components/patchv1postmortemsreportsreportid.ts deleted file mode 100644 index 523f645e..00000000 --- a/src/models/components/patchv1postmortemsreportsreportid.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1PostMortemsReportsReportIdQuestions = { - /** - * ID of a question - */ - id?: string | undefined; - /** - * Answer to question - */ - body?: string | undefined; -}; - -/** - * Update a report - */ -export type PatchV1PostMortemsReportsReportId = { - name?: string | undefined; - summary?: string | undefined; - additionalDetails?: string | undefined; - questions?: Array | undefined; -}; - -/** @internal */ -export const PatchV1PostMortemsReportsReportIdQuestions$inboundSchema: - z.ZodType = - z.object({ - id: z.string().optional(), - body: z.string().optional(), - }); - -/** @internal */ -export type PatchV1PostMortemsReportsReportIdQuestions$Outbound = { - id?: string | undefined; - body?: string | undefined; -}; - -/** @internal */ -export const PatchV1PostMortemsReportsReportIdQuestions$outboundSchema: - z.ZodType< - PatchV1PostMortemsReportsReportIdQuestions$Outbound, - z.ZodTypeDef, - PatchV1PostMortemsReportsReportIdQuestions - > = z.object({ - id: z.string().optional(), - body: z.string().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1PostMortemsReportsReportIdQuestions$ { - /** @deprecated use `PatchV1PostMortemsReportsReportIdQuestions$inboundSchema` instead. */ - export const inboundSchema = - PatchV1PostMortemsReportsReportIdQuestions$inboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportIdQuestions$outboundSchema` instead. */ - export const outboundSchema = - PatchV1PostMortemsReportsReportIdQuestions$outboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportIdQuestions$Outbound` instead. */ - export type Outbound = PatchV1PostMortemsReportsReportIdQuestions$Outbound; -} - -export function patchV1PostMortemsReportsReportIdQuestionsToJSON( - patchV1PostMortemsReportsReportIdQuestions: - PatchV1PostMortemsReportsReportIdQuestions, -): string { - return JSON.stringify( - PatchV1PostMortemsReportsReportIdQuestions$outboundSchema.parse( - patchV1PostMortemsReportsReportIdQuestions, - ), - ); -} - -export function patchV1PostMortemsReportsReportIdQuestionsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1PostMortemsReportsReportIdQuestions, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1PostMortemsReportsReportIdQuestions$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1PostMortemsReportsReportIdQuestions' from JSON`, - ); -} - -/** @internal */ -export const PatchV1PostMortemsReportsReportId$inboundSchema: z.ZodType< - PatchV1PostMortemsReportsReportId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - additional_details: z.string().optional(), - questions: z.array( - z.lazy(() => PatchV1PostMortemsReportsReportIdQuestions$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "additional_details": "additionalDetails", - }); -}); - -/** @internal */ -export type PatchV1PostMortemsReportsReportId$Outbound = { - name?: string | undefined; - summary?: string | undefined; - additional_details?: string | undefined; - questions?: - | Array - | undefined; -}; - -/** @internal */ -export const PatchV1PostMortemsReportsReportId$outboundSchema: z.ZodType< - PatchV1PostMortemsReportsReportId$Outbound, - z.ZodTypeDef, - PatchV1PostMortemsReportsReportId -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - additionalDetails: z.string().optional(), - questions: z.array( - z.lazy(() => PatchV1PostMortemsReportsReportIdQuestions$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - additionalDetails: "additional_details", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1PostMortemsReportsReportId$ { - /** @deprecated use `PatchV1PostMortemsReportsReportId$inboundSchema` instead. */ - export const inboundSchema = PatchV1PostMortemsReportsReportId$inboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1PostMortemsReportsReportId$outboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportId$Outbound` instead. */ - export type Outbound = PatchV1PostMortemsReportsReportId$Outbound; -} - -export function patchV1PostMortemsReportsReportIdToJSON( - patchV1PostMortemsReportsReportId: PatchV1PostMortemsReportsReportId, -): string { - return JSON.stringify( - PatchV1PostMortemsReportsReportId$outboundSchema.parse( - patchV1PostMortemsReportsReportId, - ), - ); -} - -export function patchV1PostMortemsReportsReportIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1PostMortemsReportsReportId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1PostMortemsReportsReportId' from JSON`, - ); -} diff --git a/src/models/components/patchv1postmortemsreportsreportidfieldsfieldid.ts b/src/models/components/patchv1postmortemsreportsreportidfieldsfieldid.ts deleted file mode 100644 index 253ced89..00000000 --- a/src/models/components/patchv1postmortemsreportsreportidfieldsfieldid.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a field value on a post mortem report - */ -export type PatchV1PostMortemsReportsReportIdFieldsFieldId = { - value: string; -}; - -/** @internal */ -export const PatchV1PostMortemsReportsReportIdFieldsFieldId$inboundSchema: - z.ZodType< - PatchV1PostMortemsReportsReportIdFieldsFieldId, - z.ZodTypeDef, - unknown - > = z.object({ - value: z.string(), - }); - -/** @internal */ -export type PatchV1PostMortemsReportsReportIdFieldsFieldId$Outbound = { - value: string; -}; - -/** @internal */ -export const PatchV1PostMortemsReportsReportIdFieldsFieldId$outboundSchema: - z.ZodType< - PatchV1PostMortemsReportsReportIdFieldsFieldId$Outbound, - z.ZodTypeDef, - PatchV1PostMortemsReportsReportIdFieldsFieldId - > = z.object({ - value: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1PostMortemsReportsReportIdFieldsFieldId$ { - /** @deprecated use `PatchV1PostMortemsReportsReportIdFieldsFieldId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1PostMortemsReportsReportIdFieldsFieldId$inboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportIdFieldsFieldId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1PostMortemsReportsReportIdFieldsFieldId$outboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportIdFieldsFieldId$Outbound` instead. */ - export type Outbound = - PatchV1PostMortemsReportsReportIdFieldsFieldId$Outbound; -} - -export function patchV1PostMortemsReportsReportIdFieldsFieldIdToJSON( - patchV1PostMortemsReportsReportIdFieldsFieldId: - PatchV1PostMortemsReportsReportIdFieldsFieldId, -): string { - return JSON.stringify( - PatchV1PostMortemsReportsReportIdFieldsFieldId$outboundSchema.parse( - patchV1PostMortemsReportsReportIdFieldsFieldId, - ), - ); -} - -export function patchV1PostMortemsReportsReportIdFieldsFieldIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1PostMortemsReportsReportIdFieldsFieldId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1PostMortemsReportsReportIdFieldsFieldId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1PostMortemsReportsReportIdFieldsFieldId' from JSON`, - ); -} diff --git a/src/models/components/patchv1postmortemsreportsreportidreasonsreasonid.ts b/src/models/components/patchv1postmortemsreportsreportidreasonsreasonid.ts deleted file mode 100644 index 184cc871..00000000 --- a/src/models/components/patchv1postmortemsreportsreportidreasonsreasonid.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a contributing factor - */ -export type PatchV1PostMortemsReportsReportIdReasonsReasonId = { - summary?: string | undefined; -}; - -/** @internal */ -export const PatchV1PostMortemsReportsReportIdReasonsReasonId$inboundSchema: - z.ZodType< - PatchV1PostMortemsReportsReportIdReasonsReasonId, - z.ZodTypeDef, - unknown - > = z.object({ - summary: z.string().optional(), - }); - -/** @internal */ -export type PatchV1PostMortemsReportsReportIdReasonsReasonId$Outbound = { - summary?: string | undefined; -}; - -/** @internal */ -export const PatchV1PostMortemsReportsReportIdReasonsReasonId$outboundSchema: - z.ZodType< - PatchV1PostMortemsReportsReportIdReasonsReasonId$Outbound, - z.ZodTypeDef, - PatchV1PostMortemsReportsReportIdReasonsReasonId - > = z.object({ - summary: z.string().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1PostMortemsReportsReportIdReasonsReasonId$ { - /** @deprecated use `PatchV1PostMortemsReportsReportIdReasonsReasonId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1PostMortemsReportsReportIdReasonsReasonId$inboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportIdReasonsReasonId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1PostMortemsReportsReportIdReasonsReasonId$outboundSchema; - /** @deprecated use `PatchV1PostMortemsReportsReportIdReasonsReasonId$Outbound` instead. */ - export type Outbound = - PatchV1PostMortemsReportsReportIdReasonsReasonId$Outbound; -} - -export function patchV1PostMortemsReportsReportIdReasonsReasonIdToJSON( - patchV1PostMortemsReportsReportIdReasonsReasonId: - PatchV1PostMortemsReportsReportIdReasonsReasonId, -): string { - return JSON.stringify( - PatchV1PostMortemsReportsReportIdReasonsReasonId$outboundSchema.parse( - patchV1PostMortemsReportsReportIdReasonsReasonId, - ), - ); -} - -export function patchV1PostMortemsReportsReportIdReasonsReasonIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1PostMortemsReportsReportIdReasonsReasonId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1PostMortemsReportsReportIdReasonsReasonId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1PostMortemsReportsReportIdReasonsReasonId' from JSON`, - ); -} diff --git a/src/models/components/patchv1prioritiespriorityslug.ts b/src/models/components/patchv1prioritiespriorityslug.ts deleted file mode 100644 index 3b066780..00000000 --- a/src/models/components/patchv1prioritiespriorityslug.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a specific priority - */ -export type PatchV1PrioritiesPrioritySlug = { - slug?: string | undefined; - description?: string | undefined; - default?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1PrioritiesPrioritySlug$inboundSchema: z.ZodType< - PatchV1PrioritiesPrioritySlug, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - default: z.boolean().optional(), -}); - -/** @internal */ -export type PatchV1PrioritiesPrioritySlug$Outbound = { - slug?: string | undefined; - description?: string | undefined; - default?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1PrioritiesPrioritySlug$outboundSchema: z.ZodType< - PatchV1PrioritiesPrioritySlug$Outbound, - z.ZodTypeDef, - PatchV1PrioritiesPrioritySlug -> = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - default: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1PrioritiesPrioritySlug$ { - /** @deprecated use `PatchV1PrioritiesPrioritySlug$inboundSchema` instead. */ - export const inboundSchema = PatchV1PrioritiesPrioritySlug$inboundSchema; - /** @deprecated use `PatchV1PrioritiesPrioritySlug$outboundSchema` instead. */ - export const outboundSchema = PatchV1PrioritiesPrioritySlug$outboundSchema; - /** @deprecated use `PatchV1PrioritiesPrioritySlug$Outbound` instead. */ - export type Outbound = PatchV1PrioritiesPrioritySlug$Outbound; -} - -export function patchV1PrioritiesPrioritySlugToJSON( - patchV1PrioritiesPrioritySlug: PatchV1PrioritiesPrioritySlug, -): string { - return JSON.stringify( - PatchV1PrioritiesPrioritySlug$outboundSchema.parse( - patchV1PrioritiesPrioritySlug, - ), - ); -} - -export function patchV1PrioritiesPrioritySlugFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1PrioritiesPrioritySlug$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1PrioritiesPrioritySlug' from JSON`, - ); -} diff --git a/src/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotes.ts b/src/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotes.ts deleted file mode 100644 index 3c2b781a..00000000 --- a/src/models/components/patchv1runbooksexecutionsexecutionidstepsstepidvotes.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The direction you would like to vote, or if you dig it - */ -export const PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection = { - Up: "up", - Down: "down", - Dig: "dig", -} as const; -/** - * The direction you would like to vote, or if you dig it - */ -export type PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection = - ClosedEnum< - typeof PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection - >; - -/** - * Allows for upvoting or downvoting an event - */ -export type PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes = { - /** - * The direction you would like to vote, or if you dig it - */ - direction: PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection; -}; - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$inboundSchema: - z.ZodNativeEnum< - typeof PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection - > = z.nativeEnum( - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection, - ); - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$outboundSchema: - z.ZodNativeEnum< - typeof PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection - > = - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$ { - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$inboundSchema` instead. */ - export const inboundSchema = - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$inboundSchema; - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$outboundSchema` instead. */ - export const outboundSchema = - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$outboundSchema; -} - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$inboundSchema: - z.ZodType< - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes, - z.ZodTypeDef, - unknown - > = z.object({ - direction: - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$inboundSchema, - }); - -/** @internal */ -export type PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$Outbound = { - direction: string; -}; - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$outboundSchema: - z.ZodType< - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$Outbound, - z.ZodTypeDef, - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes - > = z.object({ - direction: - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotesDirection$outboundSchema, - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$ { - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$inboundSchema` instead. */ - export const inboundSchema = - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$inboundSchema; - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$outboundSchema` instead. */ - export const outboundSchema = - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$outboundSchema; - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$Outbound` instead. */ - export type Outbound = - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$Outbound; -} - -export function patchV1RunbooksExecutionsExecutionIdStepsStepIdVotesToJSON( - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes, -): string { - return JSON.stringify( - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$outboundSchema.parse( - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes, - ), - ); -} - -export function patchV1RunbooksExecutionsExecutionIdStepsStepIdVotesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes' from JSON`, - ); -} diff --git a/src/models/components/patchv1runbooksexecutionsexecutionidvotes.ts b/src/models/components/patchv1runbooksexecutionsexecutionidvotes.ts deleted file mode 100644 index 9da8536d..00000000 --- a/src/models/components/patchv1runbooksexecutionsexecutionidvotes.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The direction you would like to vote, or if you dig it - */ -export const PatchV1RunbooksExecutionsExecutionIdVotesDirection = { - Up: "up", - Down: "down", - Dig: "dig", -} as const; -/** - * The direction you would like to vote, or if you dig it - */ -export type PatchV1RunbooksExecutionsExecutionIdVotesDirection = ClosedEnum< - typeof PatchV1RunbooksExecutionsExecutionIdVotesDirection ->; - -/** - * Allows for upvoting or downvoting an event - */ -export type PatchV1RunbooksExecutionsExecutionIdVotes = { - /** - * The direction you would like to vote, or if you dig it - */ - direction: PatchV1RunbooksExecutionsExecutionIdVotesDirection; -}; - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdVotesDirection$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PatchV1RunbooksExecutionsExecutionIdVotesDirection); - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdVotesDirection$outboundSchema: - z.ZodNativeEnum = - PatchV1RunbooksExecutionsExecutionIdVotesDirection$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1RunbooksExecutionsExecutionIdVotesDirection$ { - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdVotesDirection$inboundSchema` instead. */ - export const inboundSchema = - PatchV1RunbooksExecutionsExecutionIdVotesDirection$inboundSchema; - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdVotesDirection$outboundSchema` instead. */ - export const outboundSchema = - PatchV1RunbooksExecutionsExecutionIdVotesDirection$outboundSchema; -} - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdVotes$inboundSchema: z.ZodType< - PatchV1RunbooksExecutionsExecutionIdVotes, - z.ZodTypeDef, - unknown -> = z.object({ - direction: PatchV1RunbooksExecutionsExecutionIdVotesDirection$inboundSchema, -}); - -/** @internal */ -export type PatchV1RunbooksExecutionsExecutionIdVotes$Outbound = { - direction: string; -}; - -/** @internal */ -export const PatchV1RunbooksExecutionsExecutionIdVotes$outboundSchema: - z.ZodType< - PatchV1RunbooksExecutionsExecutionIdVotes$Outbound, - z.ZodTypeDef, - PatchV1RunbooksExecutionsExecutionIdVotes - > = z.object({ - direction: - PatchV1RunbooksExecutionsExecutionIdVotesDirection$outboundSchema, - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1RunbooksExecutionsExecutionIdVotes$ { - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdVotes$inboundSchema` instead. */ - export const inboundSchema = - PatchV1RunbooksExecutionsExecutionIdVotes$inboundSchema; - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdVotes$outboundSchema` instead. */ - export const outboundSchema = - PatchV1RunbooksExecutionsExecutionIdVotes$outboundSchema; - /** @deprecated use `PatchV1RunbooksExecutionsExecutionIdVotes$Outbound` instead. */ - export type Outbound = PatchV1RunbooksExecutionsExecutionIdVotes$Outbound; -} - -export function patchV1RunbooksExecutionsExecutionIdVotesToJSON( - patchV1RunbooksExecutionsExecutionIdVotes: - PatchV1RunbooksExecutionsExecutionIdVotes, -): string { - return JSON.stringify( - PatchV1RunbooksExecutionsExecutionIdVotes$outboundSchema.parse( - patchV1RunbooksExecutionsExecutionIdVotes, - ), - ); -} - -export function patchV1RunbooksExecutionsExecutionIdVotesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1RunbooksExecutionsExecutionIdVotes, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1RunbooksExecutionsExecutionIdVotes$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1RunbooksExecutionsExecutionIdVotes' from JSON`, - ); -} diff --git a/src/models/components/patchv1savedsearchesresourcetypesavedsearchid.ts b/src/models/components/patchv1savedsearchesresourcetypesavedsearchid.ts deleted file mode 100644 index 0531112a..00000000 --- a/src/models/components/patchv1savedsearchesresourcetypesavedsearchid.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a specific saved search - */ -export type PatchV1SavedSearchesResourceTypeSavedSearchId = { - isPrivate?: boolean | undefined; - name?: string | undefined; - filterValues?: { [k: string]: any } | undefined; -}; - -/** @internal */ -export const PatchV1SavedSearchesResourceTypeSavedSearchId$inboundSchema: - z.ZodType< - PatchV1SavedSearchesResourceTypeSavedSearchId, - z.ZodTypeDef, - unknown - > = z.object({ - is_private: z.boolean().optional(), - name: z.string().optional(), - filter_values: z.record(z.any()).optional(), - }).transform((v) => { - return remap$(v, { - "is_private": "isPrivate", - "filter_values": "filterValues", - }); - }); - -/** @internal */ -export type PatchV1SavedSearchesResourceTypeSavedSearchId$Outbound = { - is_private?: boolean | undefined; - name?: string | undefined; - filter_values?: { [k: string]: any } | undefined; -}; - -/** @internal */ -export const PatchV1SavedSearchesResourceTypeSavedSearchId$outboundSchema: - z.ZodType< - PatchV1SavedSearchesResourceTypeSavedSearchId$Outbound, - z.ZodTypeDef, - PatchV1SavedSearchesResourceTypeSavedSearchId - > = z.object({ - isPrivate: z.boolean().optional(), - name: z.string().optional(), - filterValues: z.record(z.any()).optional(), - }).transform((v) => { - return remap$(v, { - isPrivate: "is_private", - filterValues: "filter_values", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SavedSearchesResourceTypeSavedSearchId$ { - /** @deprecated use `PatchV1SavedSearchesResourceTypeSavedSearchId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1SavedSearchesResourceTypeSavedSearchId$inboundSchema; - /** @deprecated use `PatchV1SavedSearchesResourceTypeSavedSearchId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1SavedSearchesResourceTypeSavedSearchId$outboundSchema; - /** @deprecated use `PatchV1SavedSearchesResourceTypeSavedSearchId$Outbound` instead. */ - export type Outbound = PatchV1SavedSearchesResourceTypeSavedSearchId$Outbound; -} - -export function patchV1SavedSearchesResourceTypeSavedSearchIdToJSON( - patchV1SavedSearchesResourceTypeSavedSearchId: - PatchV1SavedSearchesResourceTypeSavedSearchId, -): string { - return JSON.stringify( - PatchV1SavedSearchesResourceTypeSavedSearchId$outboundSchema.parse( - patchV1SavedSearchesResourceTypeSavedSearchId, - ), - ); -} - -export function patchV1SavedSearchesResourceTypeSavedSearchIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1SavedSearchesResourceTypeSavedSearchId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1SavedSearchesResourceTypeSavedSearchId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1SavedSearchesResourceTypeSavedSearchId' from JSON`, - ); -} diff --git a/src/models/components/patchv1scheduledmaintenancesscheduledmaintenanceid.ts b/src/models/components/patchv1scheduledmaintenancesscheduledmaintenanceid.ts deleted file mode 100644 index 11b25073..00000000 --- a/src/models/components/patchv1scheduledmaintenancesscheduledmaintenanceid.ts +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages = { - /** - * The slug identifying the type of status page - */ - integrationSlug?: string | undefined; - /** - * The UUID of the status page to display this maintenance on - */ - connectionId: string; -}; - -export type PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts = { - /** - * The type of impact - */ - type: string; - /** - * The id of impact - */ - id: string; - /** - * The id of the condition - */ - conditionId: string; -}; - -/** - * Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. - */ -export type PatchV1ScheduledMaintenancesScheduledMaintenanceId = { - name?: string | undefined; - summary?: string | undefined; - /** - * ISO8601 timestamp for the start time of the scheduled maintenance - */ - startsAt?: Date | undefined; - /** - * ISO8601 timestamp for the end time of the scheduled maintenance - */ - endsAt?: Date | undefined; - description?: string | undefined; - /** - * A json object of label keys and values - */ - labels?: { [k: string]: string } | undefined; - /** - * An array of status pages to display this maintenance on - */ - statusPages?: - | Array - | undefined; - /** - * An array of impact/condition combinations - */ - impacts?: - | Array - | undefined; -}; - -/** @internal */ -export const PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$inboundSchema: - z.ZodType< - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages, - z.ZodTypeDef, - unknown - > = z.object({ - integration_slug: z.string().optional(), - connection_id: z.string(), - }).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - "connection_id": "connectionId", - }); - }); - -/** @internal */ -export type PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$Outbound = - { - integration_slug?: string | undefined; - connection_id: string; - }; - -/** @internal */ -export const PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$outboundSchema: - z.ZodType< - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$Outbound, - z.ZodTypeDef, - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages - > = z.object({ - integrationSlug: z.string().optional(), - connectionId: z.string(), - }).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - connectionId: "connection_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$ { - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$inboundSchema; - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$outboundSchema; - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$Outbound` instead. */ - export type Outbound = - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$Outbound; -} - -export function patchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPagesToJSON( - patchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages: - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages, -): string { - return JSON.stringify( - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$outboundSchema - .parse(patchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages), - ); -} - -export function patchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPagesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$inboundSchema: - z.ZodType< - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts, - z.ZodTypeDef, - unknown - > = z.object({ - type: z.string(), - id: z.string(), - condition_id: z.string(), - }).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); - }); - -/** @internal */ -export type PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$Outbound = - { - type: string; - id: string; - condition_id: string; - }; - -/** @internal */ -export const PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$outboundSchema: - z.ZodType< - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$Outbound, - z.ZodTypeDef, - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts - > = z.object({ - type: z.string(), - id: z.string(), - conditionId: z.string(), - }).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$ { - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$inboundSchema; - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$outboundSchema; - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$Outbound` instead. */ - export type Outbound = - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$Outbound; -} - -export function patchV1ScheduledMaintenancesScheduledMaintenanceIdImpactsToJSON( - patchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts: - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts, -): string { - return JSON.stringify( - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$outboundSchema - .parse(patchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts), - ); -} - -export function patchV1ScheduledMaintenancesScheduledMaintenanceIdImpactsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ScheduledMaintenancesScheduledMaintenanceId$inboundSchema: - z.ZodType< - PatchV1ScheduledMaintenancesScheduledMaintenanceId, - z.ZodTypeDef, - unknown - > = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - status_pages: z.array( - z.lazy(() => - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$inboundSchema - ), - ).optional(), - impacts: z.array( - z.lazy(() => - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$inboundSchema - ), - ).optional(), - }).transform((v) => { - return remap$(v, { - "starts_at": "startsAt", - "ends_at": "endsAt", - "status_pages": "statusPages", - }); - }); - -/** @internal */ -export type PatchV1ScheduledMaintenancesScheduledMaintenanceId$Outbound = { - name?: string | undefined; - summary?: string | undefined; - starts_at?: string | undefined; - ends_at?: string | undefined; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; - status_pages?: - | Array< - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$Outbound - > - | undefined; - impacts?: - | Array - | undefined; -}; - -/** @internal */ -export const PatchV1ScheduledMaintenancesScheduledMaintenanceId$outboundSchema: - z.ZodType< - PatchV1ScheduledMaintenancesScheduledMaintenanceId$Outbound, - z.ZodTypeDef, - PatchV1ScheduledMaintenancesScheduledMaintenanceId - > = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), - endsAt: z.date().transform(v => v.toISOString()).optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - statusPages: z.array( - z.lazy(() => - PatchV1ScheduledMaintenancesScheduledMaintenanceIdStatusPages$outboundSchema - ), - ).optional(), - impacts: z.array( - z.lazy(() => - PatchV1ScheduledMaintenancesScheduledMaintenanceIdImpacts$outboundSchema - ), - ).optional(), - }).transform((v) => { - return remap$(v, { - startsAt: "starts_at", - endsAt: "ends_at", - statusPages: "status_pages", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ScheduledMaintenancesScheduledMaintenanceId$ { - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ScheduledMaintenancesScheduledMaintenanceId$inboundSchema; - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ScheduledMaintenancesScheduledMaintenanceId$outboundSchema; - /** @deprecated use `PatchV1ScheduledMaintenancesScheduledMaintenanceId$Outbound` instead. */ - export type Outbound = - PatchV1ScheduledMaintenancesScheduledMaintenanceId$Outbound; -} - -export function patchV1ScheduledMaintenancesScheduledMaintenanceIdToJSON( - patchV1ScheduledMaintenancesScheduledMaintenanceId: - PatchV1ScheduledMaintenancesScheduledMaintenanceId, -): string { - return JSON.stringify( - PatchV1ScheduledMaintenancesScheduledMaintenanceId$outboundSchema.parse( - patchV1ScheduledMaintenancesScheduledMaintenanceId, - ), - ); -} - -export function patchV1ScheduledMaintenancesScheduledMaintenanceIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ScheduledMaintenancesScheduledMaintenanceId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ScheduledMaintenancesScheduledMaintenanceId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ScheduledMaintenancesScheduledMaintenanceId' from JSON`, - ); -} diff --git a/src/models/components/patchv1scimv2usersid.ts b/src/models/components/patchv1scimv2usersid.ts deleted file mode 100644 index a30d233a..00000000 --- a/src/models/components/patchv1scimv2usersid.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Operations = { - /** - * The operation to perform on the user. Options are add, remove, replace - */ - op: string; - /** - * The path to the attribute to be modified - */ - path: string; -}; - -/** - * PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. - */ -export type PatchV1ScimV2UsersId = { - /** - * An optional trail to log the request - */ - trail?: string | undefined; - /** - * An array of operations to perform on the user - */ - operations: Array; -}; - -/** @internal */ -export const Operations$inboundSchema: z.ZodType< - Operations, - z.ZodTypeDef, - unknown -> = z.object({ - op: z.string(), - path: z.string(), -}); - -/** @internal */ -export type Operations$Outbound = { - op: string; - path: string; -}; - -/** @internal */ -export const Operations$outboundSchema: z.ZodType< - Operations$Outbound, - z.ZodTypeDef, - Operations -> = z.object({ - op: z.string(), - path: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Operations$ { - /** @deprecated use `Operations$inboundSchema` instead. */ - export const inboundSchema = Operations$inboundSchema; - /** @deprecated use `Operations$outboundSchema` instead. */ - export const outboundSchema = Operations$outboundSchema; - /** @deprecated use `Operations$Outbound` instead. */ - export type Outbound = Operations$Outbound; -} - -export function operationsToJSON(operations: Operations): string { - return JSON.stringify(Operations$outboundSchema.parse(operations)); -} - -export function operationsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Operations$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Operations' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ScimV2UsersId$inboundSchema: z.ZodType< - PatchV1ScimV2UsersId, - z.ZodTypeDef, - unknown -> = z.object({ - trail: z.string().optional(), - Operations: z.array(z.lazy(() => Operations$inboundSchema)), -}).transform((v) => { - return remap$(v, { - "Operations": "operations", - }); -}); - -/** @internal */ -export type PatchV1ScimV2UsersId$Outbound = { - trail?: string | undefined; - Operations: Array; -}; - -/** @internal */ -export const PatchV1ScimV2UsersId$outboundSchema: z.ZodType< - PatchV1ScimV2UsersId$Outbound, - z.ZodTypeDef, - PatchV1ScimV2UsersId -> = z.object({ - trail: z.string().optional(), - operations: z.array(z.lazy(() => Operations$outboundSchema)), -}).transform((v) => { - return remap$(v, { - operations: "Operations", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ScimV2UsersId$ { - /** @deprecated use `PatchV1ScimV2UsersId$inboundSchema` instead. */ - export const inboundSchema = PatchV1ScimV2UsersId$inboundSchema; - /** @deprecated use `PatchV1ScimV2UsersId$outboundSchema` instead. */ - export const outboundSchema = PatchV1ScimV2UsersId$outboundSchema; - /** @deprecated use `PatchV1ScimV2UsersId$Outbound` instead. */ - export type Outbound = PatchV1ScimV2UsersId$Outbound; -} - -export function patchV1ScimV2UsersIdToJSON( - patchV1ScimV2UsersId: PatchV1ScimV2UsersId, -): string { - return JSON.stringify( - PatchV1ScimV2UsersId$outboundSchema.parse(patchV1ScimV2UsersId), - ); -} - -export function patchV1ScimV2UsersIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ScimV2UsersId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ScimV2UsersId' from JSON`, - ); -} diff --git a/src/models/components/patchv1servicedependenciesservicedependencyid.ts b/src/models/components/patchv1servicedependenciesservicedependencyid.ts deleted file mode 100644 index 73ccb5b3..00000000 --- a/src/models/components/patchv1servicedependenciesservicedependencyid.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update the notes of the service dependency - */ -export type PatchV1ServiceDependenciesServiceDependencyId = { - /** - * A note to describe the service dependency relationship - */ - notes?: string | undefined; -}; - -/** @internal */ -export const PatchV1ServiceDependenciesServiceDependencyId$inboundSchema: - z.ZodType< - PatchV1ServiceDependenciesServiceDependencyId, - z.ZodTypeDef, - unknown - > = z.object({ - notes: z.string().optional(), - }); - -/** @internal */ -export type PatchV1ServiceDependenciesServiceDependencyId$Outbound = { - notes?: string | undefined; -}; - -/** @internal */ -export const PatchV1ServiceDependenciesServiceDependencyId$outboundSchema: - z.ZodType< - PatchV1ServiceDependenciesServiceDependencyId$Outbound, - z.ZodTypeDef, - PatchV1ServiceDependenciesServiceDependencyId - > = z.object({ - notes: z.string().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServiceDependenciesServiceDependencyId$ { - /** @deprecated use `PatchV1ServiceDependenciesServiceDependencyId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ServiceDependenciesServiceDependencyId$inboundSchema; - /** @deprecated use `PatchV1ServiceDependenciesServiceDependencyId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ServiceDependenciesServiceDependencyId$outboundSchema; - /** @deprecated use `PatchV1ServiceDependenciesServiceDependencyId$Outbound` instead. */ - export type Outbound = PatchV1ServiceDependenciesServiceDependencyId$Outbound; -} - -export function patchV1ServiceDependenciesServiceDependencyIdToJSON( - patchV1ServiceDependenciesServiceDependencyId: - PatchV1ServiceDependenciesServiceDependencyId, -): string { - return JSON.stringify( - PatchV1ServiceDependenciesServiceDependencyId$outboundSchema.parse( - patchV1ServiceDependenciesServiceDependencyId, - ), - ); -} - -export function patchV1ServiceDependenciesServiceDependencyIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ServiceDependenciesServiceDependencyId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ServiceDependenciesServiceDependencyId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ServiceDependenciesServiceDependencyId' from JSON`, - ); -} diff --git a/src/models/components/patchv1servicesserviceid.ts b/src/models/components/patchv1servicesserviceid.ts deleted file mode 100644 index e696efdc..00000000 --- a/src/models/components/patchv1servicesserviceid.ts +++ /dev/null @@ -1,732 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Checklists = { - id: string; - /** - * Set to `true` to remove checklist from service - */ - remove?: boolean | undefined; -}; - -export type PatchV1ServicesServiceIdExternalResources = { - remoteId: string; - /** - * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. - */ - connectionType?: string | undefined; - /** - * If you are trying to remove an external resource from a service, set this to 'true'. - */ - remove?: boolean | undefined; -}; - -export type PatchV1ServicesServiceIdFunctionalities = { - /** - * If you are trying to reuse a functionality, you may set the ID to attach it to the service - */ - id?: string | undefined; - /** - * If you are trying to remove a functionality from a service, set this to 'true' - */ - remove?: boolean | undefined; - /** - * If you are trying to create a new functionality and attach it to this service, set the summary key - */ - summary?: string | undefined; -}; - -export type PatchV1ServicesServiceIdLinks = { - /** - * URL - */ - hrefUrl: string; - /** - * Short name used to display and identify this link - */ - name: string; - /** - * An optional URL to an icon representing this link - */ - iconUrl?: string | undefined; - /** - * If you are trying to remove a link, set this to 'true' - */ - remove?: boolean | undefined; - /** - * If updating an existing link, specify it's id. - */ - id?: string | undefined; -}; - -/** - * An object representing a Team that owns the service - */ -export type PatchV1ServicesServiceIdOwner = { - id: string; -}; - -/** - * Integer representing service tier - */ -export const PatchV1ServicesServiceIdServiceTier = { - Zero: 0, - One: 1, - Two: 2, - Three: 3, - Four: 4, - Five: 5, -} as const; -/** - * Integer representing service tier - */ -export type PatchV1ServicesServiceIdServiceTier = ClosedEnum< - typeof PatchV1ServicesServiceIdServiceTier ->; - -export type PatchV1ServicesServiceIdTeams = { - id: string; - /** - * If you are trying to remove a team from a service, set this to 'true' - */ - remove?: boolean | undefined; -}; - -/** - * Update a services attributes, you may also add or remove functionalities from the service as well. - * - * @remarks - * Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. - */ -export type PatchV1ServicesServiceId = { - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; - /** - * Array of checklist IDs to attach to the service - */ - checklists?: Array | undefined; - description?: string | undefined; - /** - * An array of external resources to attach to this service. - */ - externalResources?: - | Array - | undefined; - /** - * An array of functionalities - */ - functionalities?: Array | undefined; - /** - * A hash of label keys and values - */ - labels?: { [k: string]: string } | undefined; - /** - * An array of links to associate with this service. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. - */ - links?: Array | undefined; - name?: string | undefined; - /** - * An object representing a Team that owns the service - */ - owner?: PatchV1ServicesServiceIdOwner | undefined; - /** - * If you are trying to remove a team as an owner from a service, set this to 'true' - */ - removeOwner?: boolean | undefined; - /** - * If set to true, any checklists tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the checklists - */ - removeRemainingChecklists?: boolean | undefined; - /** - * If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources - */ - removeRemainingExternalResources?: boolean | undefined; - /** - * If set to true, any functionalities tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the functionalities - */ - removeRemainingFunctionalities?: boolean | undefined; - /** - * If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams - */ - removeRemainingTeams?: boolean | undefined; - /** - * Integer representing service tier - */ - serviceTier?: PatchV1ServicesServiceIdServiceTier | undefined; - /** - * An array of teams to attach to this service. - */ - teams?: Array | undefined; -}; - -/** @internal */ -export const Checklists$inboundSchema: z.ZodType< - Checklists, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - remove: z.boolean().optional(), -}); - -/** @internal */ -export type Checklists$Outbound = { - id: string; - remove?: boolean | undefined; -}; - -/** @internal */ -export const Checklists$outboundSchema: z.ZodType< - Checklists$Outbound, - z.ZodTypeDef, - Checklists -> = z.object({ - id: z.string(), - remove: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Checklists$ { - /** @deprecated use `Checklists$inboundSchema` instead. */ - export const inboundSchema = Checklists$inboundSchema; - /** @deprecated use `Checklists$outboundSchema` instead. */ - export const outboundSchema = Checklists$outboundSchema; - /** @deprecated use `Checklists$Outbound` instead. */ - export type Outbound = Checklists$Outbound; -} - -export function checklistsToJSON(checklists: Checklists): string { - return JSON.stringify(Checklists$outboundSchema.parse(checklists)); -} - -export function checklistsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Checklists$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Checklists' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ServicesServiceIdExternalResources$inboundSchema: z.ZodType< - PatchV1ServicesServiceIdExternalResources, - z.ZodTypeDef, - unknown -> = z.object({ - remote_id: z.string(), - connection_type: z.string().optional(), - remove: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "remote_id": "remoteId", - "connection_type": "connectionType", - }); -}); - -/** @internal */ -export type PatchV1ServicesServiceIdExternalResources$Outbound = { - remote_id: string; - connection_type?: string | undefined; - remove?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1ServicesServiceIdExternalResources$outboundSchema: - z.ZodType< - PatchV1ServicesServiceIdExternalResources$Outbound, - z.ZodTypeDef, - PatchV1ServicesServiceIdExternalResources - > = z.object({ - remoteId: z.string(), - connectionType: z.string().optional(), - remove: z.boolean().optional(), - }).transform((v) => { - return remap$(v, { - remoteId: "remote_id", - connectionType: "connection_type", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServicesServiceIdExternalResources$ { - /** @deprecated use `PatchV1ServicesServiceIdExternalResources$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ServicesServiceIdExternalResources$inboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdExternalResources$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ServicesServiceIdExternalResources$outboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdExternalResources$Outbound` instead. */ - export type Outbound = PatchV1ServicesServiceIdExternalResources$Outbound; -} - -export function patchV1ServicesServiceIdExternalResourcesToJSON( - patchV1ServicesServiceIdExternalResources: - PatchV1ServicesServiceIdExternalResources, -): string { - return JSON.stringify( - PatchV1ServicesServiceIdExternalResources$outboundSchema.parse( - patchV1ServicesServiceIdExternalResources, - ), - ); -} - -export function patchV1ServicesServiceIdExternalResourcesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ServicesServiceIdExternalResources, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ServicesServiceIdExternalResources$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ServicesServiceIdExternalResources' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ServicesServiceIdFunctionalities$inboundSchema: z.ZodType< - PatchV1ServicesServiceIdFunctionalities, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - remove: z.boolean().optional(), - summary: z.string().optional(), -}); - -/** @internal */ -export type PatchV1ServicesServiceIdFunctionalities$Outbound = { - id?: string | undefined; - remove?: boolean | undefined; - summary?: string | undefined; -}; - -/** @internal */ -export const PatchV1ServicesServiceIdFunctionalities$outboundSchema: z.ZodType< - PatchV1ServicesServiceIdFunctionalities$Outbound, - z.ZodTypeDef, - PatchV1ServicesServiceIdFunctionalities -> = z.object({ - id: z.string().optional(), - remove: z.boolean().optional(), - summary: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServicesServiceIdFunctionalities$ { - /** @deprecated use `PatchV1ServicesServiceIdFunctionalities$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ServicesServiceIdFunctionalities$inboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdFunctionalities$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ServicesServiceIdFunctionalities$outboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdFunctionalities$Outbound` instead. */ - export type Outbound = PatchV1ServicesServiceIdFunctionalities$Outbound; -} - -export function patchV1ServicesServiceIdFunctionalitiesToJSON( - patchV1ServicesServiceIdFunctionalities: - PatchV1ServicesServiceIdFunctionalities, -): string { - return JSON.stringify( - PatchV1ServicesServiceIdFunctionalities$outboundSchema.parse( - patchV1ServicesServiceIdFunctionalities, - ), - ); -} - -export function patchV1ServicesServiceIdFunctionalitiesFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1ServicesServiceIdFunctionalities, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1ServicesServiceIdFunctionalities$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1ServicesServiceIdFunctionalities' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ServicesServiceIdLinks$inboundSchema: z.ZodType< - PatchV1ServicesServiceIdLinks, - z.ZodTypeDef, - unknown -> = z.object({ - href_url: z.string(), - name: z.string(), - icon_url: z.string().optional(), - remove: z.boolean().optional(), - id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "href_url": "hrefUrl", - "icon_url": "iconUrl", - }); -}); - -/** @internal */ -export type PatchV1ServicesServiceIdLinks$Outbound = { - href_url: string; - name: string; - icon_url?: string | undefined; - remove?: boolean | undefined; - id?: string | undefined; -}; - -/** @internal */ -export const PatchV1ServicesServiceIdLinks$outboundSchema: z.ZodType< - PatchV1ServicesServiceIdLinks$Outbound, - z.ZodTypeDef, - PatchV1ServicesServiceIdLinks -> = z.object({ - hrefUrl: z.string(), - name: z.string(), - iconUrl: z.string().optional(), - remove: z.boolean().optional(), - id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - hrefUrl: "href_url", - iconUrl: "icon_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServicesServiceIdLinks$ { - /** @deprecated use `PatchV1ServicesServiceIdLinks$inboundSchema` instead. */ - export const inboundSchema = PatchV1ServicesServiceIdLinks$inboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdLinks$outboundSchema` instead. */ - export const outboundSchema = PatchV1ServicesServiceIdLinks$outboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdLinks$Outbound` instead. */ - export type Outbound = PatchV1ServicesServiceIdLinks$Outbound; -} - -export function patchV1ServicesServiceIdLinksToJSON( - patchV1ServicesServiceIdLinks: PatchV1ServicesServiceIdLinks, -): string { - return JSON.stringify( - PatchV1ServicesServiceIdLinks$outboundSchema.parse( - patchV1ServicesServiceIdLinks, - ), - ); -} - -export function patchV1ServicesServiceIdLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ServicesServiceIdLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ServicesServiceIdLinks' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ServicesServiceIdOwner$inboundSchema: z.ZodType< - PatchV1ServicesServiceIdOwner, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type PatchV1ServicesServiceIdOwner$Outbound = { - id: string; -}; - -/** @internal */ -export const PatchV1ServicesServiceIdOwner$outboundSchema: z.ZodType< - PatchV1ServicesServiceIdOwner$Outbound, - z.ZodTypeDef, - PatchV1ServicesServiceIdOwner -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServicesServiceIdOwner$ { - /** @deprecated use `PatchV1ServicesServiceIdOwner$inboundSchema` instead. */ - export const inboundSchema = PatchV1ServicesServiceIdOwner$inboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdOwner$outboundSchema` instead. */ - export const outboundSchema = PatchV1ServicesServiceIdOwner$outboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdOwner$Outbound` instead. */ - export type Outbound = PatchV1ServicesServiceIdOwner$Outbound; -} - -export function patchV1ServicesServiceIdOwnerToJSON( - patchV1ServicesServiceIdOwner: PatchV1ServicesServiceIdOwner, -): string { - return JSON.stringify( - PatchV1ServicesServiceIdOwner$outboundSchema.parse( - patchV1ServicesServiceIdOwner, - ), - ); -} - -export function patchV1ServicesServiceIdOwnerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ServicesServiceIdOwner$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ServicesServiceIdOwner' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ServicesServiceIdServiceTier$inboundSchema: z.ZodNativeEnum< - typeof PatchV1ServicesServiceIdServiceTier -> = z.nativeEnum(PatchV1ServicesServiceIdServiceTier); - -/** @internal */ -export const PatchV1ServicesServiceIdServiceTier$outboundSchema: - z.ZodNativeEnum = - PatchV1ServicesServiceIdServiceTier$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServicesServiceIdServiceTier$ { - /** @deprecated use `PatchV1ServicesServiceIdServiceTier$inboundSchema` instead. */ - export const inboundSchema = - PatchV1ServicesServiceIdServiceTier$inboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdServiceTier$outboundSchema` instead. */ - export const outboundSchema = - PatchV1ServicesServiceIdServiceTier$outboundSchema; -} - -/** @internal */ -export const PatchV1ServicesServiceIdTeams$inboundSchema: z.ZodType< - PatchV1ServicesServiceIdTeams, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - remove: z.boolean().optional(), -}); - -/** @internal */ -export type PatchV1ServicesServiceIdTeams$Outbound = { - id: string; - remove?: boolean | undefined; -}; - -/** @internal */ -export const PatchV1ServicesServiceIdTeams$outboundSchema: z.ZodType< - PatchV1ServicesServiceIdTeams$Outbound, - z.ZodTypeDef, - PatchV1ServicesServiceIdTeams -> = z.object({ - id: z.string(), - remove: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServicesServiceIdTeams$ { - /** @deprecated use `PatchV1ServicesServiceIdTeams$inboundSchema` instead. */ - export const inboundSchema = PatchV1ServicesServiceIdTeams$inboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdTeams$outboundSchema` instead. */ - export const outboundSchema = PatchV1ServicesServiceIdTeams$outboundSchema; - /** @deprecated use `PatchV1ServicesServiceIdTeams$Outbound` instead. */ - export type Outbound = PatchV1ServicesServiceIdTeams$Outbound; -} - -export function patchV1ServicesServiceIdTeamsToJSON( - patchV1ServicesServiceIdTeams: PatchV1ServicesServiceIdTeams, -): string { - return JSON.stringify( - PatchV1ServicesServiceIdTeams$outboundSchema.parse( - patchV1ServicesServiceIdTeams, - ), - ); -} - -export function patchV1ServicesServiceIdTeamsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ServicesServiceIdTeams$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ServicesServiceIdTeams' from JSON`, - ); -} - -/** @internal */ -export const PatchV1ServicesServiceId$inboundSchema: z.ZodType< - PatchV1ServicesServiceId, - z.ZodTypeDef, - unknown -> = z.object({ - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - checklists: z.array(z.lazy(() => Checklists$inboundSchema)).optional(), - description: z.string().optional(), - external_resources: z.array( - z.lazy(() => PatchV1ServicesServiceIdExternalResources$inboundSchema), - ).optional(), - functionalities: z.array( - z.lazy(() => PatchV1ServicesServiceIdFunctionalities$inboundSchema), - ).optional(), - labels: z.record(z.string()).optional(), - links: z.array(z.lazy(() => PatchV1ServicesServiceIdLinks$inboundSchema)) - .optional(), - name: z.string().optional(), - owner: z.lazy(() => PatchV1ServicesServiceIdOwner$inboundSchema).optional(), - remove_owner: z.boolean().optional(), - remove_remaining_checklists: z.boolean().optional(), - remove_remaining_external_resources: z.boolean().optional(), - remove_remaining_functionalities: z.boolean().optional(), - remove_remaining_teams: z.boolean().optional(), - service_tier: PatchV1ServicesServiceIdServiceTier$inboundSchema.optional(), - teams: z.array(z.lazy(() => PatchV1ServicesServiceIdTeams$inboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - "alert_on_add": "alertOnAdd", - "auto_add_responding_team": "autoAddRespondingTeam", - "external_resources": "externalResources", - "remove_owner": "removeOwner", - "remove_remaining_checklists": "removeRemainingChecklists", - "remove_remaining_external_resources": "removeRemainingExternalResources", - "remove_remaining_functionalities": "removeRemainingFunctionalities", - "remove_remaining_teams": "removeRemainingTeams", - "service_tier": "serviceTier", - }); -}); - -/** @internal */ -export type PatchV1ServicesServiceId$Outbound = { - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - checklists?: Array | undefined; - description?: string | undefined; - external_resources?: - | Array - | undefined; - functionalities?: - | Array - | undefined; - labels?: { [k: string]: string } | undefined; - links?: Array | undefined; - name?: string | undefined; - owner?: PatchV1ServicesServiceIdOwner$Outbound | undefined; - remove_owner?: boolean | undefined; - remove_remaining_checklists?: boolean | undefined; - remove_remaining_external_resources?: boolean | undefined; - remove_remaining_functionalities?: boolean | undefined; - remove_remaining_teams?: boolean | undefined; - service_tier?: number | undefined; - teams?: Array | undefined; -}; - -/** @internal */ -export const PatchV1ServicesServiceId$outboundSchema: z.ZodType< - PatchV1ServicesServiceId$Outbound, - z.ZodTypeDef, - PatchV1ServicesServiceId -> = z.object({ - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - checklists: z.array(z.lazy(() => Checklists$outboundSchema)).optional(), - description: z.string().optional(), - externalResources: z.array( - z.lazy(() => PatchV1ServicesServiceIdExternalResources$outboundSchema), - ).optional(), - functionalities: z.array( - z.lazy(() => PatchV1ServicesServiceIdFunctionalities$outboundSchema), - ).optional(), - labels: z.record(z.string()).optional(), - links: z.array(z.lazy(() => PatchV1ServicesServiceIdLinks$outboundSchema)) - .optional(), - name: z.string().optional(), - owner: z.lazy(() => PatchV1ServicesServiceIdOwner$outboundSchema).optional(), - removeOwner: z.boolean().optional(), - removeRemainingChecklists: z.boolean().optional(), - removeRemainingExternalResources: z.boolean().optional(), - removeRemainingFunctionalities: z.boolean().optional(), - removeRemainingTeams: z.boolean().optional(), - serviceTier: PatchV1ServicesServiceIdServiceTier$outboundSchema.optional(), - teams: z.array(z.lazy(() => PatchV1ServicesServiceIdTeams$outboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - alertOnAdd: "alert_on_add", - autoAddRespondingTeam: "auto_add_responding_team", - externalResources: "external_resources", - removeOwner: "remove_owner", - removeRemainingChecklists: "remove_remaining_checklists", - removeRemainingExternalResources: "remove_remaining_external_resources", - removeRemainingFunctionalities: "remove_remaining_functionalities", - removeRemainingTeams: "remove_remaining_teams", - serviceTier: "service_tier", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1ServicesServiceId$ { - /** @deprecated use `PatchV1ServicesServiceId$inboundSchema` instead. */ - export const inboundSchema = PatchV1ServicesServiceId$inboundSchema; - /** @deprecated use `PatchV1ServicesServiceId$outboundSchema` instead. */ - export const outboundSchema = PatchV1ServicesServiceId$outboundSchema; - /** @deprecated use `PatchV1ServicesServiceId$Outbound` instead. */ - export type Outbound = PatchV1ServicesServiceId$Outbound; -} - -export function patchV1ServicesServiceIdToJSON( - patchV1ServicesServiceId: PatchV1ServicesServiceId, -): string { - return JSON.stringify( - PatchV1ServicesServiceId$outboundSchema.parse(patchV1ServicesServiceId), - ); -} - -export function patchV1ServicesServiceIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1ServicesServiceId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1ServicesServiceId' from JSON`, - ); -} diff --git a/src/models/components/patchv1severitiesseverityslug.ts b/src/models/components/patchv1severitiesseverityslug.ts deleted file mode 100644 index 3f8da993..00000000 --- a/src/models/components/patchv1severitiesseverityslug.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PatchV1SeveritiesSeveritySlugColor = { - Red: "red", - Orange: "orange", - Yellow: "yellow", - Blue: "blue", - Teal: "teal", - Grey: "grey", -} as const; -export type PatchV1SeveritiesSeveritySlugColor = ClosedEnum< - typeof PatchV1SeveritiesSeveritySlugColor ->; - -/** - * Update a specific severity - */ -export type PatchV1SeveritiesSeveritySlug = { - slug?: string | undefined; - description?: string | undefined; - position?: number | undefined; - color?: PatchV1SeveritiesSeveritySlugColor | undefined; -}; - -/** @internal */ -export const PatchV1SeveritiesSeveritySlugColor$inboundSchema: z.ZodNativeEnum< - typeof PatchV1SeveritiesSeveritySlugColor -> = z.nativeEnum(PatchV1SeveritiesSeveritySlugColor); - -/** @internal */ -export const PatchV1SeveritiesSeveritySlugColor$outboundSchema: z.ZodNativeEnum< - typeof PatchV1SeveritiesSeveritySlugColor -> = PatchV1SeveritiesSeveritySlugColor$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SeveritiesSeveritySlugColor$ { - /** @deprecated use `PatchV1SeveritiesSeveritySlugColor$inboundSchema` instead. */ - export const inboundSchema = PatchV1SeveritiesSeveritySlugColor$inboundSchema; - /** @deprecated use `PatchV1SeveritiesSeveritySlugColor$outboundSchema` instead. */ - export const outboundSchema = - PatchV1SeveritiesSeveritySlugColor$outboundSchema; -} - -/** @internal */ -export const PatchV1SeveritiesSeveritySlug$inboundSchema: z.ZodType< - PatchV1SeveritiesSeveritySlug, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - position: z.number().int().optional(), - color: PatchV1SeveritiesSeveritySlugColor$inboundSchema.optional(), -}); - -/** @internal */ -export type PatchV1SeveritiesSeveritySlug$Outbound = { - slug?: string | undefined; - description?: string | undefined; - position?: number | undefined; - color?: string | undefined; -}; - -/** @internal */ -export const PatchV1SeveritiesSeveritySlug$outboundSchema: z.ZodType< - PatchV1SeveritiesSeveritySlug$Outbound, - z.ZodTypeDef, - PatchV1SeveritiesSeveritySlug -> = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - position: z.number().int().optional(), - color: PatchV1SeveritiesSeveritySlugColor$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SeveritiesSeveritySlug$ { - /** @deprecated use `PatchV1SeveritiesSeveritySlug$inboundSchema` instead. */ - export const inboundSchema = PatchV1SeveritiesSeveritySlug$inboundSchema; - /** @deprecated use `PatchV1SeveritiesSeveritySlug$outboundSchema` instead. */ - export const outboundSchema = PatchV1SeveritiesSeveritySlug$outboundSchema; - /** @deprecated use `PatchV1SeveritiesSeveritySlug$Outbound` instead. */ - export type Outbound = PatchV1SeveritiesSeveritySlug$Outbound; -} - -export function patchV1SeveritiesSeveritySlugToJSON( - patchV1SeveritiesSeveritySlug: PatchV1SeveritiesSeveritySlug, -): string { - return JSON.stringify( - PatchV1SeveritiesSeveritySlug$outboundSchema.parse( - patchV1SeveritiesSeveritySlug, - ), - ); -} - -export function patchV1SeveritiesSeveritySlugFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1SeveritiesSeveritySlug$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1SeveritiesSeveritySlug' from JSON`, - ); -} diff --git a/src/models/components/patchv1severitymatrix.ts b/src/models/components/patchv1severitymatrix.ts deleted file mode 100644 index 49dd918a..00000000 --- a/src/models/components/patchv1severitymatrix.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1SeverityMatrixData = { - /** - * Slug of a severity - */ - severity: string; - /** - * Impact id - */ - impactId: string; - /** - * Condition id - */ - conditionId: string; -}; - -/** - * Update available severities and impacts in your organization's severity matrix. - */ -export type PatchV1SeverityMatrix = { - summary?: string | undefined; - data: Array; -}; - -/** @internal */ -export const PatchV1SeverityMatrixData$inboundSchema: z.ZodType< - PatchV1SeverityMatrixData, - z.ZodTypeDef, - unknown -> = z.object({ - severity: z.string(), - impact_id: z.string(), - condition_id: z.string(), -}).transform((v) => { - return remap$(v, { - "impact_id": "impactId", - "condition_id": "conditionId", - }); -}); - -/** @internal */ -export type PatchV1SeverityMatrixData$Outbound = { - severity: string; - impact_id: string; - condition_id: string; -}; - -/** @internal */ -export const PatchV1SeverityMatrixData$outboundSchema: z.ZodType< - PatchV1SeverityMatrixData$Outbound, - z.ZodTypeDef, - PatchV1SeverityMatrixData -> = z.object({ - severity: z.string(), - impactId: z.string(), - conditionId: z.string(), -}).transform((v) => { - return remap$(v, { - impactId: "impact_id", - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SeverityMatrixData$ { - /** @deprecated use `PatchV1SeverityMatrixData$inboundSchema` instead. */ - export const inboundSchema = PatchV1SeverityMatrixData$inboundSchema; - /** @deprecated use `PatchV1SeverityMatrixData$outboundSchema` instead. */ - export const outboundSchema = PatchV1SeverityMatrixData$outboundSchema; - /** @deprecated use `PatchV1SeverityMatrixData$Outbound` instead. */ - export type Outbound = PatchV1SeverityMatrixData$Outbound; -} - -export function patchV1SeverityMatrixDataToJSON( - patchV1SeverityMatrixData: PatchV1SeverityMatrixData, -): string { - return JSON.stringify( - PatchV1SeverityMatrixData$outboundSchema.parse(patchV1SeverityMatrixData), - ); -} - -export function patchV1SeverityMatrixDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1SeverityMatrixData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1SeverityMatrixData' from JSON`, - ); -} - -/** @internal */ -export const PatchV1SeverityMatrix$inboundSchema: z.ZodType< - PatchV1SeverityMatrix, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string().optional(), - data: z.array(z.lazy(() => PatchV1SeverityMatrixData$inboundSchema)), -}); - -/** @internal */ -export type PatchV1SeverityMatrix$Outbound = { - summary?: string | undefined; - data: Array; -}; - -/** @internal */ -export const PatchV1SeverityMatrix$outboundSchema: z.ZodType< - PatchV1SeverityMatrix$Outbound, - z.ZodTypeDef, - PatchV1SeverityMatrix -> = z.object({ - summary: z.string().optional(), - data: z.array(z.lazy(() => PatchV1SeverityMatrixData$outboundSchema)), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SeverityMatrix$ { - /** @deprecated use `PatchV1SeverityMatrix$inboundSchema` instead. */ - export const inboundSchema = PatchV1SeverityMatrix$inboundSchema; - /** @deprecated use `PatchV1SeverityMatrix$outboundSchema` instead. */ - export const outboundSchema = PatchV1SeverityMatrix$outboundSchema; - /** @deprecated use `PatchV1SeverityMatrix$Outbound` instead. */ - export type Outbound = PatchV1SeverityMatrix$Outbound; -} - -export function patchV1SeverityMatrixToJSON( - patchV1SeverityMatrix: PatchV1SeverityMatrix, -): string { - return JSON.stringify( - PatchV1SeverityMatrix$outboundSchema.parse(patchV1SeverityMatrix), - ); -} - -export function patchV1SeverityMatrixFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1SeverityMatrix$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1SeverityMatrix' from JSON`, - ); -} diff --git a/src/models/components/patchv1severitymatrixconditionsconditionid.ts b/src/models/components/patchv1severitymatrixconditionsconditionid.ts deleted file mode 100644 index ce907783..00000000 --- a/src/models/components/patchv1severitymatrixconditionsconditionid.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a specific condition - */ -export type PatchV1SeverityMatrixConditionsConditionId = { - name?: string | undefined; - /** - * Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition - */ - position?: number | undefined; -}; - -/** @internal */ -export const PatchV1SeverityMatrixConditionsConditionId$inboundSchema: - z.ZodType = - z.object({ - name: z.string().optional(), - position: z.number().int().optional(), - }); - -/** @internal */ -export type PatchV1SeverityMatrixConditionsConditionId$Outbound = { - name?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const PatchV1SeverityMatrixConditionsConditionId$outboundSchema: - z.ZodType< - PatchV1SeverityMatrixConditionsConditionId$Outbound, - z.ZodTypeDef, - PatchV1SeverityMatrixConditionsConditionId - > = z.object({ - name: z.string().optional(), - position: z.number().int().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SeverityMatrixConditionsConditionId$ { - /** @deprecated use `PatchV1SeverityMatrixConditionsConditionId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1SeverityMatrixConditionsConditionId$inboundSchema; - /** @deprecated use `PatchV1SeverityMatrixConditionsConditionId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1SeverityMatrixConditionsConditionId$outboundSchema; - /** @deprecated use `PatchV1SeverityMatrixConditionsConditionId$Outbound` instead. */ - export type Outbound = PatchV1SeverityMatrixConditionsConditionId$Outbound; -} - -export function patchV1SeverityMatrixConditionsConditionIdToJSON( - patchV1SeverityMatrixConditionsConditionId: - PatchV1SeverityMatrixConditionsConditionId, -): string { - return JSON.stringify( - PatchV1SeverityMatrixConditionsConditionId$outboundSchema.parse( - patchV1SeverityMatrixConditionsConditionId, - ), - ); -} - -export function patchV1SeverityMatrixConditionsConditionIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1SeverityMatrixConditionsConditionId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1SeverityMatrixConditionsConditionId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1SeverityMatrixConditionsConditionId' from JSON`, - ); -} diff --git a/src/models/components/patchv1severitymatriximpactsimpactid.ts b/src/models/components/patchv1severitymatriximpactsimpactid.ts deleted file mode 100644 index fa927f94..00000000 --- a/src/models/components/patchv1severitymatriximpactsimpactid.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a specific impact - */ -export type PatchV1SeverityMatrixImpactsImpactId = { - name?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const PatchV1SeverityMatrixImpactsImpactId$inboundSchema: z.ZodType< - PatchV1SeverityMatrixImpactsImpactId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - position: z.number().int().optional(), -}); - -/** @internal */ -export type PatchV1SeverityMatrixImpactsImpactId$Outbound = { - name?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const PatchV1SeverityMatrixImpactsImpactId$outboundSchema: z.ZodType< - PatchV1SeverityMatrixImpactsImpactId$Outbound, - z.ZodTypeDef, - PatchV1SeverityMatrixImpactsImpactId -> = z.object({ - name: z.string().optional(), - position: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SeverityMatrixImpactsImpactId$ { - /** @deprecated use `PatchV1SeverityMatrixImpactsImpactId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1SeverityMatrixImpactsImpactId$inboundSchema; - /** @deprecated use `PatchV1SeverityMatrixImpactsImpactId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1SeverityMatrixImpactsImpactId$outboundSchema; - /** @deprecated use `PatchV1SeverityMatrixImpactsImpactId$Outbound` instead. */ - export type Outbound = PatchV1SeverityMatrixImpactsImpactId$Outbound; -} - -export function patchV1SeverityMatrixImpactsImpactIdToJSON( - patchV1SeverityMatrixImpactsImpactId: PatchV1SeverityMatrixImpactsImpactId, -): string { - return JSON.stringify( - PatchV1SeverityMatrixImpactsImpactId$outboundSchema.parse( - patchV1SeverityMatrixImpactsImpactId, - ), - ); -} - -export function patchV1SeverityMatrixImpactsImpactIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1SeverityMatrixImpactsImpactId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1SeverityMatrixImpactsImpactId' from JSON`, - ); -} diff --git a/src/models/components/patchv1signalsemailtargetsid.ts b/src/models/components/patchv1signalsemailtargetsid.ts deleted file mode 100644 index 19525b5e..00000000 --- a/src/models/components/patchv1signalsemailtargetsid.ts +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of target that the inbound email will notify when matched. - */ -export const PatchV1SignalsEmailTargetsIdType = { - Team: "Team", - EntireTeam: "EntireTeam", - EscalationPolicy: "EscalationPolicy", - OnCallSchedule: "OnCallSchedule", - User: "User", - SlackChannel: "SlackChannel", - Webhook: "Webhook", -} as const; -/** - * The type of target that the inbound email will notify when matched. - */ -export type PatchV1SignalsEmailTargetsIdType = ClosedEnum< - typeof PatchV1SignalsEmailTargetsIdType ->; - -/** - * The target that the email target will notify. This object must contain a `type` - * - * @remarks - * field that specifies the type of target and an `id` field that specifies the ID of - * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", - * "team", "user", or "slack_channel". - */ -export type PatchV1SignalsEmailTargetsIdTarget = { - /** - * The type of target that the inbound email will notify when matched. - */ - type: PatchV1SignalsEmailTargetsIdType; - /** - * The ID of the target that the inbound email will notify when matched. - */ - id: string; -}; - -/** - * Whether or not all rules must match, or if only one rule must match. - */ -export const PatchV1SignalsEmailTargetsIdRuleMatchingStrategy = { - All: "all", - Any: "any", -} as const; -/** - * Whether or not all rules must match, or if only one rule must match. - */ -export type PatchV1SignalsEmailTargetsIdRuleMatchingStrategy = ClosedEnum< - typeof PatchV1SignalsEmailTargetsIdRuleMatchingStrategy ->; - -/** - * Update a Signals email target by ID - */ -export type PatchV1SignalsEmailTargetsId = { - /** - * The email target's name. - */ - name?: string | undefined; - /** - * The email address that will be listening to events. - */ - slug?: string | undefined; - /** - * A detailed description of the email target. - */ - description?: string | undefined; - /** - * The target that the email target will notify. This object must contain a `type` - * - * @remarks - * field that specifies the type of target and an `id` field that specifies the ID of - * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", - * "team", "user", or "slack_channel". - */ - target?: PatchV1SignalsEmailTargetsIdTarget | undefined; - /** - * A list of email addresses that are allowed to send events to the target. Must be exact match. - */ - allowedSenders?: Array | undefined; - /** - * The CEL expression that defines the status of an incoming email that is sent to the target. - */ - statusCel?: string | undefined; - /** - * The CEL expression that defines the level of an incoming email that is sent to the target. - */ - levelCel?: string | undefined; - /** - * A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. - */ - rules?: Array | undefined; - /** - * Whether or not all rules must match, or if only one rule must match. - */ - ruleMatchingStrategy?: - | PatchV1SignalsEmailTargetsIdRuleMatchingStrategy - | undefined; -}; - -/** @internal */ -export const PatchV1SignalsEmailTargetsIdType$inboundSchema: z.ZodNativeEnum< - typeof PatchV1SignalsEmailTargetsIdType -> = z.nativeEnum(PatchV1SignalsEmailTargetsIdType); - -/** @internal */ -export const PatchV1SignalsEmailTargetsIdType$outboundSchema: z.ZodNativeEnum< - typeof PatchV1SignalsEmailTargetsIdType -> = PatchV1SignalsEmailTargetsIdType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SignalsEmailTargetsIdType$ { - /** @deprecated use `PatchV1SignalsEmailTargetsIdType$inboundSchema` instead. */ - export const inboundSchema = PatchV1SignalsEmailTargetsIdType$inboundSchema; - /** @deprecated use `PatchV1SignalsEmailTargetsIdType$outboundSchema` instead. */ - export const outboundSchema = PatchV1SignalsEmailTargetsIdType$outboundSchema; -} - -/** @internal */ -export const PatchV1SignalsEmailTargetsIdTarget$inboundSchema: z.ZodType< - PatchV1SignalsEmailTargetsIdTarget, - z.ZodTypeDef, - unknown -> = z.object({ - type: PatchV1SignalsEmailTargetsIdType$inboundSchema, - id: z.string(), -}); - -/** @internal */ -export type PatchV1SignalsEmailTargetsIdTarget$Outbound = { - type: string; - id: string; -}; - -/** @internal */ -export const PatchV1SignalsEmailTargetsIdTarget$outboundSchema: z.ZodType< - PatchV1SignalsEmailTargetsIdTarget$Outbound, - z.ZodTypeDef, - PatchV1SignalsEmailTargetsIdTarget -> = z.object({ - type: PatchV1SignalsEmailTargetsIdType$outboundSchema, - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SignalsEmailTargetsIdTarget$ { - /** @deprecated use `PatchV1SignalsEmailTargetsIdTarget$inboundSchema` instead. */ - export const inboundSchema = PatchV1SignalsEmailTargetsIdTarget$inboundSchema; - /** @deprecated use `PatchV1SignalsEmailTargetsIdTarget$outboundSchema` instead. */ - export const outboundSchema = - PatchV1SignalsEmailTargetsIdTarget$outboundSchema; - /** @deprecated use `PatchV1SignalsEmailTargetsIdTarget$Outbound` instead. */ - export type Outbound = PatchV1SignalsEmailTargetsIdTarget$Outbound; -} - -export function patchV1SignalsEmailTargetsIdTargetToJSON( - patchV1SignalsEmailTargetsIdTarget: PatchV1SignalsEmailTargetsIdTarget, -): string { - return JSON.stringify( - PatchV1SignalsEmailTargetsIdTarget$outboundSchema.parse( - patchV1SignalsEmailTargetsIdTarget, - ), - ); -} - -export function patchV1SignalsEmailTargetsIdTargetFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1SignalsEmailTargetsIdTarget$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1SignalsEmailTargetsIdTarget' from JSON`, - ); -} - -/** @internal */ -export const PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PatchV1SignalsEmailTargetsIdRuleMatchingStrategy); - -/** @internal */ -export const PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$outboundSchema: - z.ZodNativeEnum = - PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$ { - /** @deprecated use `PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$inboundSchema` instead. */ - export const inboundSchema = - PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$inboundSchema; - /** @deprecated use `PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$outboundSchema` instead. */ - export const outboundSchema = - PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$outboundSchema; -} - -/** @internal */ -export const PatchV1SignalsEmailTargetsId$inboundSchema: z.ZodType< - PatchV1SignalsEmailTargetsId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - target: z.lazy(() => PatchV1SignalsEmailTargetsIdTarget$inboundSchema) - .optional(), - allowed_senders: z.array(z.string()).optional(), - status_cel: z.string().optional(), - level_cel: z.string().optional(), - rules: z.array(z.string()).optional(), - rule_matching_strategy: - PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "allowed_senders": "allowedSenders", - "status_cel": "statusCel", - "level_cel": "levelCel", - "rule_matching_strategy": "ruleMatchingStrategy", - }); -}); - -/** @internal */ -export type PatchV1SignalsEmailTargetsId$Outbound = { - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - target?: PatchV1SignalsEmailTargetsIdTarget$Outbound | undefined; - allowed_senders?: Array | undefined; - status_cel?: string | undefined; - level_cel?: string | undefined; - rules?: Array | undefined; - rule_matching_strategy?: string | undefined; -}; - -/** @internal */ -export const PatchV1SignalsEmailTargetsId$outboundSchema: z.ZodType< - PatchV1SignalsEmailTargetsId$Outbound, - z.ZodTypeDef, - PatchV1SignalsEmailTargetsId -> = z.object({ - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - target: z.lazy(() => PatchV1SignalsEmailTargetsIdTarget$outboundSchema) - .optional(), - allowedSenders: z.array(z.string()).optional(), - statusCel: z.string().optional(), - levelCel: z.string().optional(), - rules: z.array(z.string()).optional(), - ruleMatchingStrategy: - PatchV1SignalsEmailTargetsIdRuleMatchingStrategy$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - allowedSenders: "allowed_senders", - statusCel: "status_cel", - levelCel: "level_cel", - ruleMatchingStrategy: "rule_matching_strategy", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SignalsEmailTargetsId$ { - /** @deprecated use `PatchV1SignalsEmailTargetsId$inboundSchema` instead. */ - export const inboundSchema = PatchV1SignalsEmailTargetsId$inboundSchema; - /** @deprecated use `PatchV1SignalsEmailTargetsId$outboundSchema` instead. */ - export const outboundSchema = PatchV1SignalsEmailTargetsId$outboundSchema; - /** @deprecated use `PatchV1SignalsEmailTargetsId$Outbound` instead. */ - export type Outbound = PatchV1SignalsEmailTargetsId$Outbound; -} - -export function patchV1SignalsEmailTargetsIdToJSON( - patchV1SignalsEmailTargetsId: PatchV1SignalsEmailTargetsId, -): string { - return JSON.stringify( - PatchV1SignalsEmailTargetsId$outboundSchema.parse( - patchV1SignalsEmailTargetsId, - ), - ); -} - -export function patchV1SignalsEmailTargetsIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1SignalsEmailTargetsId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1SignalsEmailTargetsId' from JSON`, - ); -} diff --git a/src/models/components/patchv1signalswebhooktargetsid.ts b/src/models/components/patchv1signalswebhooktargetsid.ts deleted file mode 100644 index d266b56d..00000000 --- a/src/models/components/patchv1signalswebhooktargetsid.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a Signals webhook target by ID - */ -export type PatchV1SignalsWebhookTargetsId = { - /** - * The webhook target's name. - */ - name?: string | undefined; - /** - * An optional detailed description of the webhook target. - */ - description?: string | undefined; - /** - * The URL that the webhook target will notify. - */ - url?: string | undefined; - /** - * An optional secret we will provide in the `FH-Signature` header - * - * @remarks - * when sending a payload to the webhook target. This key will not be - * shown in any response once configured. - */ - signingKey?: string | undefined; -}; - -/** @internal */ -export const PatchV1SignalsWebhookTargetsId$inboundSchema: z.ZodType< - PatchV1SignalsWebhookTargetsId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - url: z.string().optional(), - signing_key: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "signing_key": "signingKey", - }); -}); - -/** @internal */ -export type PatchV1SignalsWebhookTargetsId$Outbound = { - name?: string | undefined; - description?: string | undefined; - url?: string | undefined; - signing_key?: string | undefined; -}; - -/** @internal */ -export const PatchV1SignalsWebhookTargetsId$outboundSchema: z.ZodType< - PatchV1SignalsWebhookTargetsId$Outbound, - z.ZodTypeDef, - PatchV1SignalsWebhookTargetsId -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - url: z.string().optional(), - signingKey: z.string().optional(), -}).transform((v) => { - return remap$(v, { - signingKey: "signing_key", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1SignalsWebhookTargetsId$ { - /** @deprecated use `PatchV1SignalsWebhookTargetsId$inboundSchema` instead. */ - export const inboundSchema = PatchV1SignalsWebhookTargetsId$inboundSchema; - /** @deprecated use `PatchV1SignalsWebhookTargetsId$outboundSchema` instead. */ - export const outboundSchema = PatchV1SignalsWebhookTargetsId$outboundSchema; - /** @deprecated use `PatchV1SignalsWebhookTargetsId$Outbound` instead. */ - export type Outbound = PatchV1SignalsWebhookTargetsId$Outbound; -} - -export function patchV1SignalsWebhookTargetsIdToJSON( - patchV1SignalsWebhookTargetsId: PatchV1SignalsWebhookTargetsId, -): string { - return JSON.stringify( - PatchV1SignalsWebhookTargetsId$outboundSchema.parse( - patchV1SignalsWebhookTargetsId, - ), - ); -} - -export function patchV1SignalsWebhookTargetsIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1SignalsWebhookTargetsId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1SignalsWebhookTargetsId' from JSON`, - ); -} diff --git a/src/models/components/patchv1statusupdatetemplatesstatusupdatetemplateid.ts b/src/models/components/patchv1statusupdatetemplatesstatusupdatetemplateid.ts deleted file mode 100644 index f5d11e3d..00000000 --- a/src/models/components/patchv1statusupdatetemplatesstatusupdatetemplateid.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a single status update template - */ -export type PatchV1StatusUpdateTemplatesStatusUpdateTemplateId = { - name?: string | undefined; - body?: string | undefined; -}; - -/** @internal */ -export const PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$inboundSchema: - z.ZodType< - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId, - z.ZodTypeDef, - unknown - > = z.object({ - name: z.string().optional(), - body: z.string().optional(), - }); - -/** @internal */ -export type PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$Outbound = { - name?: string | undefined; - body?: string | undefined; -}; - -/** @internal */ -export const PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$outboundSchema: - z.ZodType< - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$Outbound, - z.ZodTypeDef, - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId - > = z.object({ - name: z.string().optional(), - body: z.string().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$ { - /** @deprecated use `PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$inboundSchema; - /** @deprecated use `PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$outboundSchema; - /** @deprecated use `PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$Outbound` instead. */ - export type Outbound = - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$Outbound; -} - -export function patchV1StatusUpdateTemplatesStatusUpdateTemplateIdToJSON( - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId, -): string { - return JSON.stringify( - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$outboundSchema.parse( - patchV1StatusUpdateTemplatesStatusUpdateTemplateId, - ), - ); -} - -export function patchV1StatusUpdateTemplatesStatusUpdateTemplateIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1StatusUpdateTemplatesStatusUpdateTemplateId' from JSON`, - ); -} diff --git a/src/models/components/patchv1taskliststasklistid.ts b/src/models/components/patchv1taskliststasklistid.ts deleted file mode 100644 index 756d5879..00000000 --- a/src/models/components/patchv1taskliststasklistid.ts +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1TaskListsTaskListIdTaskListItems = { - /** - * A summary of the task - */ - summary: string; - /** - * A long-form description for the task if additional context is helpful - */ - description?: string | undefined; -}; - -/** - * Updates a task list's attributes and task list items - */ -export type PatchV1TaskListsTaskListId = { - name?: string | undefined; - description?: string | undefined; - taskListItems?: Array | undefined; -}; - -/** @internal */ -export const PatchV1TaskListsTaskListIdTaskListItems$inboundSchema: z.ZodType< - PatchV1TaskListsTaskListIdTaskListItems, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string(), - description: z.string().optional(), -}); - -/** @internal */ -export type PatchV1TaskListsTaskListIdTaskListItems$Outbound = { - summary: string; - description?: string | undefined; -}; - -/** @internal */ -export const PatchV1TaskListsTaskListIdTaskListItems$outboundSchema: z.ZodType< - PatchV1TaskListsTaskListIdTaskListItems$Outbound, - z.ZodTypeDef, - PatchV1TaskListsTaskListIdTaskListItems -> = z.object({ - summary: z.string(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TaskListsTaskListIdTaskListItems$ { - /** @deprecated use `PatchV1TaskListsTaskListIdTaskListItems$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TaskListsTaskListIdTaskListItems$inboundSchema; - /** @deprecated use `PatchV1TaskListsTaskListIdTaskListItems$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TaskListsTaskListIdTaskListItems$outboundSchema; - /** @deprecated use `PatchV1TaskListsTaskListIdTaskListItems$Outbound` instead. */ - export type Outbound = PatchV1TaskListsTaskListIdTaskListItems$Outbound; -} - -export function patchV1TaskListsTaskListIdTaskListItemsToJSON( - patchV1TaskListsTaskListIdTaskListItems: - PatchV1TaskListsTaskListIdTaskListItems, -): string { - return JSON.stringify( - PatchV1TaskListsTaskListIdTaskListItems$outboundSchema.parse( - patchV1TaskListsTaskListIdTaskListItems, - ), - ); -} - -export function patchV1TaskListsTaskListIdTaskListItemsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TaskListsTaskListIdTaskListItems, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TaskListsTaskListIdTaskListItems$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TaskListsTaskListIdTaskListItems' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TaskListsTaskListId$inboundSchema: z.ZodType< - PatchV1TaskListsTaskListId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - task_list_items: z.array( - z.lazy(() => PatchV1TaskListsTaskListIdTaskListItems$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "task_list_items": "taskListItems", - }); -}); - -/** @internal */ -export type PatchV1TaskListsTaskListId$Outbound = { - name?: string | undefined; - description?: string | undefined; - task_list_items?: - | Array - | undefined; -}; - -/** @internal */ -export const PatchV1TaskListsTaskListId$outboundSchema: z.ZodType< - PatchV1TaskListsTaskListId$Outbound, - z.ZodTypeDef, - PatchV1TaskListsTaskListId -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - taskListItems: z.array( - z.lazy(() => PatchV1TaskListsTaskListIdTaskListItems$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - taskListItems: "task_list_items", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TaskListsTaskListId$ { - /** @deprecated use `PatchV1TaskListsTaskListId$inboundSchema` instead. */ - export const inboundSchema = PatchV1TaskListsTaskListId$inboundSchema; - /** @deprecated use `PatchV1TaskListsTaskListId$outboundSchema` instead. */ - export const outboundSchema = PatchV1TaskListsTaskListId$outboundSchema; - /** @deprecated use `PatchV1TaskListsTaskListId$Outbound` instead. */ - export type Outbound = PatchV1TaskListsTaskListId$Outbound; -} - -export function patchV1TaskListsTaskListIdToJSON( - patchV1TaskListsTaskListId: PatchV1TaskListsTaskListId, -): string { - return JSON.stringify( - PatchV1TaskListsTaskListId$outboundSchema.parse(patchV1TaskListsTaskListId), - ); -} - -export function patchV1TaskListsTaskListIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1TaskListsTaskListId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TaskListsTaskListId' from JSON`, - ); -} diff --git a/src/models/components/patchv1teamsteamid.ts b/src/models/components/patchv1teamsteamid.ts deleted file mode 100644 index 791d591e..00000000 --- a/src/models/components/patchv1teamsteamid.ts +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * MS Teams channel identity for channel associated with this team - */ -export type PatchV1TeamsTeamIdMsTeamsChannel = { - channelId: string; - msTeamId: string; -}; - -export type PatchV1TeamsTeamIdMemberships = { - userId?: string | undefined; - scheduleId?: string | undefined; - /** - * An incident role ID that this user will automatically assigned if this team is assigned to an incident - */ - incidentRoleId?: string | undefined; -}; - -/** - * Update a single team from its ID - */ -export type PatchV1TeamsTeamId = { - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - /** - * The Slack channel ID that this team is associated with - */ - slackChannelId?: string | undefined; - /** - * MS Teams channel identity for channel associated with this team - */ - msTeamsChannel?: PatchV1TeamsTeamIdMsTeamsChannel | undefined; - memberships?: Array | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdMsTeamsChannel$inboundSchema: z.ZodType< - PatchV1TeamsTeamIdMsTeamsChannel, - z.ZodTypeDef, - unknown -> = z.object({ - channel_id: z.string(), - ms_team_id: z.string(), -}).transform((v) => { - return remap$(v, { - "channel_id": "channelId", - "ms_team_id": "msTeamId", - }); -}); - -/** @internal */ -export type PatchV1TeamsTeamIdMsTeamsChannel$Outbound = { - channel_id: string; - ms_team_id: string; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdMsTeamsChannel$outboundSchema: z.ZodType< - PatchV1TeamsTeamIdMsTeamsChannel$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdMsTeamsChannel -> = z.object({ - channelId: z.string(), - msTeamId: z.string(), -}).transform((v) => { - return remap$(v, { - channelId: "channel_id", - msTeamId: "ms_team_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdMsTeamsChannel$ { - /** @deprecated use `PatchV1TeamsTeamIdMsTeamsChannel$inboundSchema` instead. */ - export const inboundSchema = PatchV1TeamsTeamIdMsTeamsChannel$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdMsTeamsChannel$outboundSchema` instead. */ - export const outboundSchema = PatchV1TeamsTeamIdMsTeamsChannel$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdMsTeamsChannel$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamIdMsTeamsChannel$Outbound; -} - -export function patchV1TeamsTeamIdMsTeamsChannelToJSON( - patchV1TeamsTeamIdMsTeamsChannel: PatchV1TeamsTeamIdMsTeamsChannel, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdMsTeamsChannel$outboundSchema.parse( - patchV1TeamsTeamIdMsTeamsChannel, - ), - ); -} - -export function patchV1TeamsTeamIdMsTeamsChannelFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1TeamsTeamIdMsTeamsChannel$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TeamsTeamIdMsTeamsChannel' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamIdMemberships$inboundSchema: z.ZodType< - PatchV1TeamsTeamIdMemberships, - z.ZodTypeDef, - unknown -> = z.object({ - user_id: z.string().optional(), - schedule_id: z.string().optional(), - incident_role_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - "schedule_id": "scheduleId", - "incident_role_id": "incidentRoleId", - }); -}); - -/** @internal */ -export type PatchV1TeamsTeamIdMemberships$Outbound = { - user_id?: string | undefined; - schedule_id?: string | undefined; - incident_role_id?: string | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdMemberships$outboundSchema: z.ZodType< - PatchV1TeamsTeamIdMemberships$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdMemberships -> = z.object({ - userId: z.string().optional(), - scheduleId: z.string().optional(), - incidentRoleId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - userId: "user_id", - scheduleId: "schedule_id", - incidentRoleId: "incident_role_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdMemberships$ { - /** @deprecated use `PatchV1TeamsTeamIdMemberships$inboundSchema` instead. */ - export const inboundSchema = PatchV1TeamsTeamIdMemberships$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdMemberships$outboundSchema` instead. */ - export const outboundSchema = PatchV1TeamsTeamIdMemberships$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdMemberships$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamIdMemberships$Outbound; -} - -export function patchV1TeamsTeamIdMembershipsToJSON( - patchV1TeamsTeamIdMemberships: PatchV1TeamsTeamIdMemberships, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdMemberships$outboundSchema.parse( - patchV1TeamsTeamIdMemberships, - ), - ); -} - -export function patchV1TeamsTeamIdMembershipsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1TeamsTeamIdMemberships$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TeamsTeamIdMemberships' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamId$inboundSchema: z.ZodType< - PatchV1TeamsTeamId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - slack_channel_id: z.string().optional(), - ms_teams_channel: z.lazy(() => PatchV1TeamsTeamIdMsTeamsChannel$inboundSchema) - .optional(), - memberships: z.array( - z.lazy(() => PatchV1TeamsTeamIdMemberships$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "slack_channel_id": "slackChannelId", - "ms_teams_channel": "msTeamsChannel", - }); -}); - -/** @internal */ -export type PatchV1TeamsTeamId$Outbound = { - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - slack_channel_id?: string | undefined; - ms_teams_channel?: PatchV1TeamsTeamIdMsTeamsChannel$Outbound | undefined; - memberships?: Array | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamId$outboundSchema: z.ZodType< - PatchV1TeamsTeamId$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamId -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - slackChannelId: z.string().optional(), - msTeamsChannel: z.lazy(() => PatchV1TeamsTeamIdMsTeamsChannel$outboundSchema) - .optional(), - memberships: z.array( - z.lazy(() => PatchV1TeamsTeamIdMemberships$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - slackChannelId: "slack_channel_id", - msTeamsChannel: "ms_teams_channel", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamId$ { - /** @deprecated use `PatchV1TeamsTeamId$inboundSchema` instead. */ - export const inboundSchema = PatchV1TeamsTeamId$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamId$outboundSchema` instead. */ - export const outboundSchema = PatchV1TeamsTeamId$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamId$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamId$Outbound; -} - -export function patchV1TeamsTeamIdToJSON( - patchV1TeamsTeamId: PatchV1TeamsTeamId, -): string { - return JSON.stringify( - PatchV1TeamsTeamId$outboundSchema.parse(patchV1TeamsTeamId), - ); -} - -export function patchV1TeamsTeamIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1TeamsTeamId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TeamsTeamId' from JSON`, - ); -} diff --git a/src/models/components/patchv1teamsteamidescalationpoliciesid.ts b/src/models/components/patchv1teamsteamidescalationpoliciesid.ts deleted file mode 100644 index d5e534c9..00000000 --- a/src/models/components/patchv1teamsteamidescalationpoliciesid.ts +++ /dev/null @@ -1,477 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of target that the step will notify. - */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdType = { - OnCallSchedule: "OnCallSchedule", - User: "User", - SlackChannel: "SlackChannel", - EntireTeam: "EntireTeam", - Webhook: "Webhook", -} as const; -/** - * The type of target that the step will notify. - */ -export type PatchV1TeamsTeamIdEscalationPoliciesIdType = ClosedEnum< - typeof PatchV1TeamsTeamIdEscalationPoliciesIdType ->; - -export type PatchV1TeamsTeamIdEscalationPoliciesIdTargets = { - /** - * The type of target that the step will notify. - */ - type: PatchV1TeamsTeamIdEscalationPoliciesIdType; - /** - * The ID of the target that the step will notify. - */ - id: string; -}; - -export type PatchV1TeamsTeamIdEscalationPoliciesIdSteps = { - /** - * A list of targets that the step will notify. You can specify up to 15 targets per step. - */ - targets?: Array | undefined; - /** - * An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. - */ - timeout: string; -}; - -/** - * The type of target to which the policy will hand off. - */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdTargetType = { - EscalationPolicy: "EscalationPolicy", - Team: "Team", -} as const; -/** - * The type of target to which the policy will hand off. - */ -export type PatchV1TeamsTeamIdEscalationPoliciesIdTargetType = ClosedEnum< - typeof PatchV1TeamsTeamIdEscalationPoliciesIdTargetType ->; - -/** - * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. - */ -export type PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep = { - /** - * The type of target to which the policy will hand off. - */ - targetType: PatchV1TeamsTeamIdEscalationPoliciesIdTargetType; - /** - * The ID of the target to which the policy will hand off. - */ - targetId: string; -}; - -/** - * Update a Signals escalation policy by ID - */ -export type PatchV1TeamsTeamIdEscalationPoliciesId = { - /** - * The escalation policy's name. - */ - name?: string | undefined; - /** - * A detailed description of the escalation policy. - */ - description?: string | undefined; - /** - * The number of times that the escalation policy should repeat before an alert is dropped. - */ - repetitions?: number | undefined; - /** - * Whether this escalation policy should be the default for the team. - */ - default?: boolean | undefined; - /** - * A list of steps that define how an alert should escalate through the policy. - */ - steps?: Array | undefined; - /** - * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. - */ - handoffStep?: PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PatchV1TeamsTeamIdEscalationPoliciesIdType); - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdType$outboundSchema: - z.ZodNativeEnum = - PatchV1TeamsTeamIdEscalationPoliciesIdType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdEscalationPoliciesIdType$ { - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdType$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdType$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdType$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdType$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdTargets$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesIdTargets, - z.ZodTypeDef, - unknown - > = z.object({ - type: PatchV1TeamsTeamIdEscalationPoliciesIdType$inboundSchema, - id: z.string(), - }); - -/** @internal */ -export type PatchV1TeamsTeamIdEscalationPoliciesIdTargets$Outbound = { - type: string; - id: string; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdTargets$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesIdTargets$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdEscalationPoliciesIdTargets - > = z.object({ - type: PatchV1TeamsTeamIdEscalationPoliciesIdType$outboundSchema, - id: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdEscalationPoliciesIdTargets$ { - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdTargets$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdTargets$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdTargets$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdTargets$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdTargets$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamIdEscalationPoliciesIdTargets$Outbound; -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdTargetsToJSON( - patchV1TeamsTeamIdEscalationPoliciesIdTargets: - PatchV1TeamsTeamIdEscalationPoliciesIdTargets, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdEscalationPoliciesIdTargets$outboundSchema.parse( - patchV1TeamsTeamIdEscalationPoliciesIdTargets, - ), - ); -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdTargetsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdEscalationPoliciesIdTargets, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdEscalationPoliciesIdTargets$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TeamsTeamIdEscalationPoliciesIdTargets' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdSteps$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesIdSteps, - z.ZodTypeDef, - unknown - > = z.object({ - targets: z.array( - z.lazy(() => PatchV1TeamsTeamIdEscalationPoliciesIdTargets$inboundSchema), - ).optional(), - timeout: z.string(), - }); - -/** @internal */ -export type PatchV1TeamsTeamIdEscalationPoliciesIdSteps$Outbound = { - targets?: - | Array - | undefined; - timeout: string; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdSteps$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesIdSteps$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdEscalationPoliciesIdSteps - > = z.object({ - targets: z.array( - z.lazy(() => - PatchV1TeamsTeamIdEscalationPoliciesIdTargets$outboundSchema - ), - ).optional(), - timeout: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdEscalationPoliciesIdSteps$ { - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdSteps$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdSteps$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdSteps$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdSteps$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdSteps$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamIdEscalationPoliciesIdSteps$Outbound; -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdStepsToJSON( - patchV1TeamsTeamIdEscalationPoliciesIdSteps: - PatchV1TeamsTeamIdEscalationPoliciesIdSteps, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdEscalationPoliciesIdSteps$outboundSchema.parse( - patchV1TeamsTeamIdEscalationPoliciesIdSteps, - ), - ); -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdStepsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdEscalationPoliciesIdSteps, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdEscalationPoliciesIdSteps$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TeamsTeamIdEscalationPoliciesIdSteps' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PatchV1TeamsTeamIdEscalationPoliciesIdTargetType); - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$outboundSchema: - z.ZodNativeEnum = - PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$ { - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep, - z.ZodTypeDef, - unknown - > = z.object({ - target_type: PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$inboundSchema, - target_id: z.string(), - }).transform((v) => { - return remap$(v, { - "target_type": "targetType", - "target_id": "targetId", - }); - }); - -/** @internal */ -export type PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$Outbound = { - target_type: string; - target_id: string; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep - > = z.object({ - targetType: PatchV1TeamsTeamIdEscalationPoliciesIdTargetType$outboundSchema, - targetId: z.string(), - }).transform((v) => { - return remap$(v, { - targetType: "target_type", - targetId: "target_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$ { - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$Outbound` instead. */ - export type Outbound = - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$Outbound; -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdHandoffStepToJSON( - patchV1TeamsTeamIdEscalationPoliciesIdHandoffStep: - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$outboundSchema.parse( - patchV1TeamsTeamIdEscalationPoliciesIdHandoffStep, - ), - ); -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdHandoffStepFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesId$inboundSchema: z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - repetitions: z.number().int().default(0), - default: z.boolean().default(false), - steps: z.array( - z.lazy(() => PatchV1TeamsTeamIdEscalationPoliciesIdSteps$inboundSchema), - ).optional(), - handoff_step: z.lazy(() => - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$inboundSchema - ).optional(), -}).transform((v) => { - return remap$(v, { - "handoff_step": "handoffStep", - }); -}); - -/** @internal */ -export type PatchV1TeamsTeamIdEscalationPoliciesId$Outbound = { - name?: string | undefined; - description?: string | undefined; - repetitions: number; - default: boolean; - steps?: - | Array - | undefined; - handoff_step?: - | PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$Outbound - | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdEscalationPoliciesId$outboundSchema: z.ZodType< - PatchV1TeamsTeamIdEscalationPoliciesId$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdEscalationPoliciesId -> = z.object({ - name: z.string().optional(), - description: z.string().optional(), - repetitions: z.number().int().default(0), - default: z.boolean().default(false), - steps: z.array( - z.lazy(() => PatchV1TeamsTeamIdEscalationPoliciesIdSteps$outboundSchema), - ).optional(), - handoffStep: z.lazy(() => - PatchV1TeamsTeamIdEscalationPoliciesIdHandoffStep$outboundSchema - ).optional(), -}).transform((v) => { - return remap$(v, { - handoffStep: "handoff_step", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdEscalationPoliciesId$ { - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesId$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdEscalationPoliciesId$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdEscalationPoliciesId$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamIdEscalationPoliciesId$Outbound; -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdToJSON( - patchV1TeamsTeamIdEscalationPoliciesId: - PatchV1TeamsTeamIdEscalationPoliciesId, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdEscalationPoliciesId$outboundSchema.parse( - patchV1TeamsTeamIdEscalationPoliciesId, - ), - ); -} - -export function patchV1TeamsTeamIdEscalationPoliciesIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdEscalationPoliciesId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TeamsTeamIdEscalationPoliciesId' from JSON`, - ); -} diff --git a/src/models/components/patchv1teamsteamidoncallschedulesscheduleid.ts b/src/models/components/patchv1teamsteamidoncallschedulesscheduleid.ts deleted file mode 100644 index f4ad9998..00000000 --- a/src/models/components/patchv1teamsteamidoncallschedulesscheduleid.ts +++ /dev/null @@ -1,678 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers = { - /** - * The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule - * - * @remarks - * multiple times to construct more complex rotations, and you can specify a `null` user ID to create - * unassigned slots in the rotation. - */ - userId?: string | undefined; -}; - -/** - * The type of strategy. Must be one of "daily", "weekly", or "custom". - */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType = { - Daily: "daily", - Weekly: "weekly", - Custom: "custom", -} as const; -/** - * The type of strategy. Must be one of "daily", "weekly", or "custom". - */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType = ClosedEnum< - typeof PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType ->; - -/** - * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", -} as const; -/** - * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay = ClosedEnum< - typeof PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay ->; - -/** - * An object that specifies how the schedule's on-call shifts should be generated. - */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy = { - /** - * The type of strategy. Must be one of "daily", "weekly", or "custom". - */ - type: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType; - /** - * An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". - */ - handoffTime?: string | undefined; - /** - * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - */ - handoffDay?: - | PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay - | undefined; - /** - * An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". - */ - shiftDuration?: string | undefined; -}; - -/** - * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", -} as const; -/** - * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay = ClosedEnum< - typeof PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay ->; - -/** - * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", -} as const; -/** - * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay = ClosedEnum< - typeof PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay ->; - -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions = { - /** - * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - */ - startDay: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay; - /** - * An ISO8601 time string specifying when the restriction should start. - */ - startTime: string; - /** - * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - */ - endDay: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay; - /** - * An ISO8601 time string specifying when the restriction should end. - */ - endTime: string; -}; - -/** - * Update a Signals on-call schedule by ID - */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleId = { - /** - * The on-call schedule's name. - */ - name?: string | undefined; - /** - * A detailed description of the on-call schedule. - */ - description?: string | undefined; - /** - * The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. - */ - timeZone?: string | undefined; - /** - * The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. - */ - slackUserGroupId?: string | undefined; - /** - * An ordered list of objects that specify members of the on-call schedule's rotation. - */ - members?: - | Array - | undefined; - /** - * An object that specifies how the schedule's on-call shifts should be generated. - */ - strategy?: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy | undefined; - /** - * A list of objects that restrict the schedule to speccific on-call periods. - */ - restrictions?: - | Array - | undefined; - /** - * An ISO8601 time string specifying when the updated schedule should take effect. This - * - * @remarks - * value must be provided if editing an attribute that would affect how the schedule's - * shifts are generated, such as the time zone, members, strategy, or restrictions. - */ - effectiveAt?: string | undefined; - /** - * A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. - */ - color?: string | undefined; - /** - * This parameter is deprecated; use `members` instead. - */ - memberIds?: Array | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers, - z.ZodTypeDef, - unknown - > = z.object({ - user_id: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "user_id": "userId", - }); - }); - -/** @internal */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$Outbound = { - user_id?: string | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers - > = z.object({ - userId: z.string().optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$Outbound` instead. */ - export type Outbound = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$Outbound; -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdMembersToJSON( - patchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$outboundSchema.parse( - patchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers, - ), - ); -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdMembersFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType); - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$outboundSchema: - z.ZodNativeEnum = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$inboundSchema: - z.ZodNativeEnum< - typeof PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay - > = z.nativeEnum(PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay); - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$outboundSchema: - z.ZodNativeEnum< - typeof PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay - > = PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy, - z.ZodTypeDef, - unknown - > = z.object({ - type: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$inboundSchema, - handoff_time: z.string().optional(), - handoff_day: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$inboundSchema - .optional(), - shift_duration: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "handoff_time": "handoffTime", - "handoff_day": "handoffDay", - "shift_duration": "shiftDuration", - }); - }); - -/** @internal */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$Outbound = { - type: string; - handoff_time?: string | undefined; - handoff_day?: string | undefined; - shift_duration?: string | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy - > = z.object({ - type: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdType$outboundSchema, - handoffTime: z.string().optional(), - handoffDay: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdHandoffDay$outboundSchema - .optional(), - shiftDuration: z.string().optional(), - }).transform((v) => { - return remap$(v, { - handoffTime: "handoff_time", - handoffDay: "handoff_day", - shiftDuration: "shift_duration", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$Outbound` instead. */ - export type Outbound = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$Outbound; -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategyToJSON( - patchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$outboundSchema.parse( - patchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy, - ), - ); -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategyFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$inboundSchema: - z.ZodNativeEnum = - z.nativeEnum(PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay); - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$outboundSchema: - z.ZodNativeEnum = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay); - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$outboundSchema: - z.ZodNativeEnum = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions, - z.ZodTypeDef, - unknown - > = z.object({ - start_day: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$inboundSchema, - start_time: z.string(), - end_day: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$inboundSchema, - end_time: z.string(), - }).transform((v) => { - return remap$(v, { - "start_day": "startDay", - "start_time": "startTime", - "end_day": "endDay", - "end_time": "endTime", - }); - }); - -/** @internal */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$Outbound = { - start_day: string; - start_time: string; - end_day: string; - end_time: string; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions - > = z.object({ - startDay: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStartDay$outboundSchema, - startTime: z.string(), - endDay: PatchV1TeamsTeamIdOnCallSchedulesScheduleIdEndDay$outboundSchema, - endTime: z.string(), - }).transform((v) => { - return remap$(v, { - startDay: "start_day", - startTime: "start_time", - endDay: "end_day", - endTime: "end_time", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$Outbound` instead. */ - export type Outbound = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$Outbound; -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictionsToJSON( - patchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$outboundSchema - .parse(patchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions), - ); -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictionsFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions' from JSON`, - ); -} - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleId$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleId, - z.ZodTypeDef, - unknown - > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - time_zone: z.string().optional(), - slack_user_group_id: z.string().optional(), - members: z.array( - z.lazy(() => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$inboundSchema - ), - ).optional(), - strategy: z.lazy(() => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$inboundSchema - ).optional(), - restrictions: z.array( - z.lazy(() => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$inboundSchema - ), - ).optional(), - effective_at: z.string().optional(), - color: z.string().optional(), - member_ids: z.array(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - "time_zone": "timeZone", - "slack_user_group_id": "slackUserGroupId", - "effective_at": "effectiveAt", - "member_ids": "memberIds", - }); - }); - -/** @internal */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleId$Outbound = { - name?: string | undefined; - description?: string | undefined; - time_zone?: string | undefined; - slack_user_group_id?: string | undefined; - members?: - | Array - | undefined; - strategy?: - | PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$Outbound - | undefined; - restrictions?: - | Array - | undefined; - effective_at?: string | undefined; - color?: string | undefined; - member_ids?: Array | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleId$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleId$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdOnCallSchedulesScheduleId - > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - timeZone: z.string().optional(), - slackUserGroupId: z.string().optional(), - members: z.array( - z.lazy(() => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdMembers$outboundSchema - ), - ).optional(), - strategy: z.lazy(() => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdStrategy$outboundSchema - ).optional(), - restrictions: z.array( - z.lazy(() => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdRestrictions$outboundSchema - ), - ).optional(), - effectiveAt: z.string().optional(), - color: z.string().optional(), - memberIds: z.array(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - timeZone: "time_zone", - slackUserGroupId: "slack_user_group_id", - effectiveAt: "effective_at", - memberIds: "member_ids", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleId$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleId$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleId$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleId$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamIdOnCallSchedulesScheduleId$Outbound; -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdToJSON( - patchV1TeamsTeamIdOnCallSchedulesScheduleId: - PatchV1TeamsTeamIdOnCallSchedulesScheduleId, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdOnCallSchedulesScheduleId$outboundSchema.parse( - patchV1TeamsTeamIdOnCallSchedulesScheduleId, - ), - ); -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdOnCallSchedulesScheduleId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdOnCallSchedulesScheduleId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TeamsTeamIdOnCallSchedulesScheduleId' from JSON`, - ); -} diff --git a/src/models/components/patchv1teamsteamidoncallschedulesscheduleidshiftsid.ts b/src/models/components/patchv1teamsteamidoncallschedulesscheduleidshiftsid.ts deleted file mode 100644 index 15ed7a7d..00000000 --- a/src/models/components/patchv1teamsteamidoncallschedulesscheduleidshiftsid.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a Signals on-call shift by ID - */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId = { - /** - * The start time of the shift in ISO8601 format. - */ - startTime?: string | undefined; - /** - * The end time of the shift in ISO8601 format. - */ - endTime?: string | undefined; - /** - * The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. - */ - userId?: string | undefined; - /** - * A description of why coverage is needed for this shift. If the shift is re-assigned, this will automatically be cleared unless provided again. - */ - coverageRequest?: string | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$inboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId, - z.ZodTypeDef, - unknown - > = z.object({ - start_time: z.string().optional(), - end_time: z.string().optional(), - user_id: z.string().optional(), - coverage_request: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "start_time": "startTime", - "end_time": "endTime", - "user_id": "userId", - "coverage_request": "coverageRequest", - }); - }); - -/** @internal */ -export type PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$Outbound = { - start_time?: string | undefined; - end_time?: string | undefined; - user_id?: string | undefined; - coverage_request?: string | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$outboundSchema: - z.ZodType< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId - > = z.object({ - startTime: z.string().optional(), - endTime: z.string().optional(), - userId: z.string().optional(), - coverageRequest: z.string().optional(), - }).transform((v) => { - return remap$(v, { - startTime: "start_time", - endTime: "end_time", - userId: "user_id", - coverageRequest: "coverage_request", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$ { - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$Outbound` instead. */ - export type Outbound = - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$Outbound; -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsIdToJSON( - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$outboundSchema.parse( - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId, - ), - ); -} - -export function patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsIdFromJSON( - jsonString: string, -): SafeParseResult< - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId' from JSON`, - ); -} diff --git a/src/models/components/patchv1teamsteamidsignalrulesid.ts b/src/models/components/patchv1teamsteamidsignalrulesid.ts deleted file mode 100644 index 2274f5e6..00000000 --- a/src/models/components/patchv1teamsteamidsignalrulesid.ts +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of target that the rule will notify when matched. - */ -export const PatchV1TeamsTeamIdSignalRulesIdTargetType = { - EscalationPolicy: "EscalationPolicy", - OnCallSchedule: "OnCallSchedule", - User: "User", - Webhook: "Webhook", -} as const; -/** - * The type of target that the rule will notify when matched. - */ -export type PatchV1TeamsTeamIdSignalRulesIdTargetType = ClosedEnum< - typeof PatchV1TeamsTeamIdSignalRulesIdTargetType ->; - -/** - * A notification priority that will be set on the resulting alert (default: HIGH) - */ -export const PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride = { - High: "HIGH", - Medium: "MEDIUM", - Low: "LOW", - Unknown: "", -} as const; -/** - * A notification priority that will be set on the resulting alert (default: HIGH) - */ -export type PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride = - ClosedEnum< - typeof PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride - >; - -/** - * Update a Signals rule by ID - */ -export type PatchV1TeamsTeamIdSignalRulesId = { - /** - * The rule's name. - */ - name?: string | undefined; - /** - * The CEL expression that defines the rule. - */ - expression?: string | undefined; - /** - * The type of target that the rule will notify when matched. - */ - targetType?: PatchV1TeamsTeamIdSignalRulesIdTargetType | undefined; - /** - * The ID of the target that the rule will notify when matched. - */ - targetId?: string | undefined; - /** - * The ID of an incident type that should be used when an alert is promoted to an incident - */ - incidentTypeId?: string | undefined; - /** - * A notification priority that will be set on the resulting alert (default: HIGH) - */ - notificationPriorityOverride?: - | PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride - | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdSignalRulesIdTargetType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PatchV1TeamsTeamIdSignalRulesIdTargetType); - -/** @internal */ -export const PatchV1TeamsTeamIdSignalRulesIdTargetType$outboundSchema: - z.ZodNativeEnum = - PatchV1TeamsTeamIdSignalRulesIdTargetType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdSignalRulesIdTargetType$ { - /** @deprecated use `PatchV1TeamsTeamIdSignalRulesIdTargetType$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdSignalRulesIdTargetType$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdSignalRulesIdTargetType$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdSignalRulesIdTargetType$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$inboundSchema: - z.ZodNativeEnum< - typeof PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride - > = z.nativeEnum(PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride); - -/** @internal */ -export const PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$outboundSchema: - z.ZodNativeEnum< - typeof PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride - > = PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$ { - /** @deprecated use `PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$inboundSchema` instead. */ - export const inboundSchema = - PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$outboundSchema` instead. */ - export const outboundSchema = - PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$outboundSchema; -} - -/** @internal */ -export const PatchV1TeamsTeamIdSignalRulesId$inboundSchema: z.ZodType< - PatchV1TeamsTeamIdSignalRulesId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - expression: z.string().optional(), - target_type: PatchV1TeamsTeamIdSignalRulesIdTargetType$inboundSchema - .optional(), - target_id: z.string().optional(), - incident_type_id: z.string().optional(), - notification_priority_override: - PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$inboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - "target_type": "targetType", - "target_id": "targetId", - "incident_type_id": "incidentTypeId", - "notification_priority_override": "notificationPriorityOverride", - }); -}); - -/** @internal */ -export type PatchV1TeamsTeamIdSignalRulesId$Outbound = { - name?: string | undefined; - expression?: string | undefined; - target_type?: string | undefined; - target_id?: string | undefined; - incident_type_id?: string | undefined; - notification_priority_override?: string | undefined; -}; - -/** @internal */ -export const PatchV1TeamsTeamIdSignalRulesId$outboundSchema: z.ZodType< - PatchV1TeamsTeamIdSignalRulesId$Outbound, - z.ZodTypeDef, - PatchV1TeamsTeamIdSignalRulesId -> = z.object({ - name: z.string().optional(), - expression: z.string().optional(), - targetType: PatchV1TeamsTeamIdSignalRulesIdTargetType$outboundSchema - .optional(), - targetId: z.string().optional(), - incidentTypeId: z.string().optional(), - notificationPriorityOverride: - PatchV1TeamsTeamIdSignalRulesIdNotificationPriorityOverride$outboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - targetType: "target_type", - targetId: "target_id", - incidentTypeId: "incident_type_id", - notificationPriorityOverride: "notification_priority_override", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TeamsTeamIdSignalRulesId$ { - /** @deprecated use `PatchV1TeamsTeamIdSignalRulesId$inboundSchema` instead. */ - export const inboundSchema = PatchV1TeamsTeamIdSignalRulesId$inboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdSignalRulesId$outboundSchema` instead. */ - export const outboundSchema = PatchV1TeamsTeamIdSignalRulesId$outboundSchema; - /** @deprecated use `PatchV1TeamsTeamIdSignalRulesId$Outbound` instead. */ - export type Outbound = PatchV1TeamsTeamIdSignalRulesId$Outbound; -} - -export function patchV1TeamsTeamIdSignalRulesIdToJSON( - patchV1TeamsTeamIdSignalRulesId: PatchV1TeamsTeamIdSignalRulesId, -): string { - return JSON.stringify( - PatchV1TeamsTeamIdSignalRulesId$outboundSchema.parse( - patchV1TeamsTeamIdSignalRulesId, - ), - ); -} - -export function patchV1TeamsTeamIdSignalRulesIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1TeamsTeamIdSignalRulesId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TeamsTeamIdSignalRulesId' from JSON`, - ); -} diff --git a/src/models/components/patchv1ticketingprioritiesid.ts b/src/models/components/patchv1ticketingprioritiesid.ts deleted file mode 100644 index 9771ff42..00000000 --- a/src/models/components/patchv1ticketingprioritiesid.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a single ticketing priority's attributes - */ -export type PatchV1TicketingPrioritiesId = { - name?: string | undefined; - /** - * The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, this priority will shift that priority and all priorities down the list. - */ - position?: number | undefined; -}; - -/** @internal */ -export const PatchV1TicketingPrioritiesId$inboundSchema: z.ZodType< - PatchV1TicketingPrioritiesId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - position: z.number().int().optional(), -}); - -/** @internal */ -export type PatchV1TicketingPrioritiesId$Outbound = { - name?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const PatchV1TicketingPrioritiesId$outboundSchema: z.ZodType< - PatchV1TicketingPrioritiesId$Outbound, - z.ZodTypeDef, - PatchV1TicketingPrioritiesId -> = z.object({ - name: z.string().optional(), - position: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TicketingPrioritiesId$ { - /** @deprecated use `PatchV1TicketingPrioritiesId$inboundSchema` instead. */ - export const inboundSchema = PatchV1TicketingPrioritiesId$inboundSchema; - /** @deprecated use `PatchV1TicketingPrioritiesId$outboundSchema` instead. */ - export const outboundSchema = PatchV1TicketingPrioritiesId$outboundSchema; - /** @deprecated use `PatchV1TicketingPrioritiesId$Outbound` instead. */ - export type Outbound = PatchV1TicketingPrioritiesId$Outbound; -} - -export function patchV1TicketingPrioritiesIdToJSON( - patchV1TicketingPrioritiesId: PatchV1TicketingPrioritiesId, -): string { - return JSON.stringify( - PatchV1TicketingPrioritiesId$outboundSchema.parse( - patchV1TicketingPrioritiesId, - ), - ); -} - -export function patchV1TicketingPrioritiesIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1TicketingPrioritiesId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TicketingPrioritiesId' from JSON`, - ); -} diff --git a/src/models/components/patchv1ticketingticketsticketid.ts b/src/models/components/patchv1ticketingticketsticketid.ts deleted file mode 100644 index 1ffcf718..00000000 --- a/src/models/components/patchv1ticketingticketsticketid.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Update a ticket's attributes - */ -export type PatchV1TicketingTicketsTicketId = { - summary?: string | undefined; - description?: string | undefined; - state?: string | undefined; - type?: string | undefined; - priorityId?: string | undefined; - /** - * List of tags for the ticket - */ - tagList?: Array | undefined; -}; - -/** @internal */ -export const PatchV1TicketingTicketsTicketId$inboundSchema: z.ZodType< - PatchV1TicketingTicketsTicketId, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - type: z.string().optional(), - priority_id: z.string().optional(), - tag_list: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "priority_id": "priorityId", - "tag_list": "tagList", - }); -}); - -/** @internal */ -export type PatchV1TicketingTicketsTicketId$Outbound = { - summary?: string | undefined; - description?: string | undefined; - state?: string | undefined; - type?: string | undefined; - priority_id?: string | undefined; - tag_list?: Array | undefined; -}; - -/** @internal */ -export const PatchV1TicketingTicketsTicketId$outboundSchema: z.ZodType< - PatchV1TicketingTicketsTicketId$Outbound, - z.ZodTypeDef, - PatchV1TicketingTicketsTicketId -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - type: z.string().optional(), - priorityId: z.string().optional(), - tagList: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - priorityId: "priority_id", - tagList: "tag_list", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1TicketingTicketsTicketId$ { - /** @deprecated use `PatchV1TicketingTicketsTicketId$inboundSchema` instead. */ - export const inboundSchema = PatchV1TicketingTicketsTicketId$inboundSchema; - /** @deprecated use `PatchV1TicketingTicketsTicketId$outboundSchema` instead. */ - export const outboundSchema = PatchV1TicketingTicketsTicketId$outboundSchema; - /** @deprecated use `PatchV1TicketingTicketsTicketId$Outbound` instead. */ - export type Outbound = PatchV1TicketingTicketsTicketId$Outbound; -} - -export function patchV1TicketingTicketsTicketIdToJSON( - patchV1TicketingTicketsTicketId: PatchV1TicketingTicketsTicketId, -): string { - return JSON.stringify( - PatchV1TicketingTicketsTicketId$outboundSchema.parse( - patchV1TicketingTicketsTicketId, - ), - ); -} - -export function patchV1TicketingTicketsTicketIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1TicketingTicketsTicketId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1TicketingTicketsTicketId' from JSON`, - ); -} diff --git a/src/models/components/patchv1webhookswebhookid.ts b/src/models/components/patchv1webhookswebhookid.ts deleted file mode 100644 index 2cd3384c..00000000 --- a/src/models/components/patchv1webhookswebhookid.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PatchV1WebhooksWebhookIdState = { - Active: "active", - Inactive: "inactive", -} as const; -export type PatchV1WebhooksWebhookIdState = ClosedEnum< - typeof PatchV1WebhooksWebhookIdState ->; - -/** - * Update a specific webhook - */ -export type PatchV1WebhooksWebhookId = { - url?: string | undefined; - state?: PatchV1WebhooksWebhookIdState | undefined; -}; - -/** @internal */ -export const PatchV1WebhooksWebhookIdState$inboundSchema: z.ZodNativeEnum< - typeof PatchV1WebhooksWebhookIdState -> = z.nativeEnum(PatchV1WebhooksWebhookIdState); - -/** @internal */ -export const PatchV1WebhooksWebhookIdState$outboundSchema: z.ZodNativeEnum< - typeof PatchV1WebhooksWebhookIdState -> = PatchV1WebhooksWebhookIdState$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1WebhooksWebhookIdState$ { - /** @deprecated use `PatchV1WebhooksWebhookIdState$inboundSchema` instead. */ - export const inboundSchema = PatchV1WebhooksWebhookIdState$inboundSchema; - /** @deprecated use `PatchV1WebhooksWebhookIdState$outboundSchema` instead. */ - export const outboundSchema = PatchV1WebhooksWebhookIdState$outboundSchema; -} - -/** @internal */ -export const PatchV1WebhooksWebhookId$inboundSchema: z.ZodType< - PatchV1WebhooksWebhookId, - z.ZodTypeDef, - unknown -> = z.object({ - url: z.string().optional(), - state: PatchV1WebhooksWebhookIdState$inboundSchema.optional(), -}); - -/** @internal */ -export type PatchV1WebhooksWebhookId$Outbound = { - url?: string | undefined; - state?: string | undefined; -}; - -/** @internal */ -export const PatchV1WebhooksWebhookId$outboundSchema: z.ZodType< - PatchV1WebhooksWebhookId$Outbound, - z.ZodTypeDef, - PatchV1WebhooksWebhookId -> = z.object({ - url: z.string().optional(), - state: PatchV1WebhooksWebhookIdState$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PatchV1WebhooksWebhookId$ { - /** @deprecated use `PatchV1WebhooksWebhookId$inboundSchema` instead. */ - export const inboundSchema = PatchV1WebhooksWebhookId$inboundSchema; - /** @deprecated use `PatchV1WebhooksWebhookId$outboundSchema` instead. */ - export const outboundSchema = PatchV1WebhooksWebhookId$outboundSchema; - /** @deprecated use `PatchV1WebhooksWebhookId$Outbound` instead. */ - export type Outbound = PatchV1WebhooksWebhookId$Outbound; -} - -export function patchV1WebhooksWebhookIdToJSON( - patchV1WebhooksWebhookId: PatchV1WebhooksWebhookId, -): string { - return JSON.stringify( - PatchV1WebhooksWebhookId$outboundSchema.parse(patchV1WebhooksWebhookId), - ); -} - -export function patchV1WebhooksWebhookIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PatchV1WebhooksWebhookId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PatchV1WebhooksWebhookId' from JSON`, - ); -} diff --git a/src/models/components/pongentity.ts b/src/models/components/pongentity.ts index 66110e1a..45ecee7f 100644 --- a/src/models/components/pongentity.ts +++ b/src/models/components/pongentity.ts @@ -7,25 +7,25 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - ActorEntity, - ActorEntity$inboundSchema, - ActorEntity$Outbound, - ActorEntity$outboundSchema, -} from "./actorentity.js"; + NullableActorEntity, + NullableActorEntity$inboundSchema, + NullableActorEntity$Outbound, + NullableActorEntity$outboundSchema, +} from "./nullableactorentity.js"; import { - OrganizationEntity, - OrganizationEntity$inboundSchema, - OrganizationEntity$Outbound, - OrganizationEntity$outboundSchema, -} from "./organizationentity.js"; + NullableOrganizationEntity, + NullableOrganizationEntity$inboundSchema, + NullableOrganizationEntity$Outbound, + NullableOrganizationEntity$outboundSchema, +} from "./nullableorganizationentity.js"; /** * PongEntity model */ export type PongEntity = { - response?: string | undefined; - actor?: ActorEntity | undefined; - organization?: OrganizationEntity | undefined; + response?: string | null | undefined; + actor?: NullableActorEntity | null | undefined; + organization?: NullableOrganizationEntity | null | undefined; }; /** @internal */ @@ -34,16 +34,16 @@ export const PongEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - response: z.string().optional(), - actor: ActorEntity$inboundSchema.optional(), - organization: OrganizationEntity$inboundSchema.optional(), + response: z.nullable(z.string()).optional(), + actor: z.nullable(NullableActorEntity$inboundSchema).optional(), + organization: z.nullable(NullableOrganizationEntity$inboundSchema).optional(), }); /** @internal */ export type PongEntity$Outbound = { - response?: string | undefined; - actor?: ActorEntity$Outbound | undefined; - organization?: OrganizationEntity$Outbound | undefined; + response?: string | null | undefined; + actor?: NullableActorEntity$Outbound | null | undefined; + organization?: NullableOrganizationEntity$Outbound | null | undefined; }; /** @internal */ @@ -52,9 +52,10 @@ export const PongEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PongEntity > = z.object({ - response: z.string().optional(), - actor: ActorEntity$outboundSchema.optional(), - organization: OrganizationEntity$outboundSchema.optional(), + response: z.nullable(z.string()).optional(), + actor: z.nullable(NullableActorEntity$outboundSchema).optional(), + organization: z.nullable(NullableOrganizationEntity$outboundSchema) + .optional(), }); /** diff --git a/src/models/components/postmortemspostmortemreportentity.ts b/src/models/components/postmortemspostmortemreportentity.ts index 98b1b998..77a44f2b 100644 --- a/src/models/components/postmortemspostmortemreportentity.ts +++ b/src/models/components/postmortemspostmortemreportentity.ts @@ -8,42 +8,42 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - CalendarsEventEntity, - CalendarsEventEntity$inboundSchema, - CalendarsEventEntity$Outbound, - CalendarsEventEntity$outboundSchema, -} from "./calendarsevententity.js"; + NullableCalendarsEventEntity, + NullableCalendarsEventEntity$inboundSchema, + NullableCalendarsEventEntity$Outbound, + NullableCalendarsEventEntity$outboundSchema, +} from "./nullablecalendarsevententity.js"; import { - IncidentEntity, - IncidentEntity$inboundSchema, - IncidentEntity$Outbound, - IncidentEntity$outboundSchema, -} from "./incidententity.js"; + NullableIncidentEntity, + NullableIncidentEntity$inboundSchema, + NullableIncidentEntity$Outbound, + NullableIncidentEntity$outboundSchema, +} from "./nullableincidententity.js"; import { - PostMortemsQuestionEntity, - PostMortemsQuestionEntity$inboundSchema, - PostMortemsQuestionEntity$Outbound, - PostMortemsQuestionEntity$outboundSchema, -} from "./postmortemsquestionentity.js"; + NullablePostMortemsQuestionEntity, + NullablePostMortemsQuestionEntity$inboundSchema, + NullablePostMortemsQuestionEntity$Outbound, + NullablePostMortemsQuestionEntity$outboundSchema, +} from "./nullablepostmortemsquestionentity.js"; /** * PostMortems_PostMortemReportEntity model */ export type PostMortemsPostMortemReportEntity = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - incidentId?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - tagList?: Array | undefined; - additionalDetails?: Array | undefined; - /** - * IncidentEntity model - */ - incident?: IncidentEntity | undefined; - questions?: PostMortemsQuestionEntity | undefined; - calendarEvents?: CalendarsEventEntity | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + incidentId?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + tagList?: Array | null | undefined; + additionalDetails?: Array | null | undefined; + incident?: NullableIncidentEntity | null | undefined; + questions?: NullablePostMortemsQuestionEntity | null | undefined; + calendarEvents?: NullableCalendarsEventEntity | null | undefined; + retrospectiveShim?: boolean | null | undefined; + retrospectiveId?: string | null | undefined; + retrospectiveNote?: string | null | undefined; }; /** @internal */ @@ -52,19 +52,26 @@ export const PostMortemsPostMortemReportEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - incident_id: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + incident_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + additional_details: z.nullable(z.array(z.string())).optional(), + incident: z.nullable(NullableIncidentEntity$inboundSchema).optional(), + questions: z.nullable(NullablePostMortemsQuestionEntity$inboundSchema) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + calendar_events: z.nullable(NullableCalendarsEventEntity$inboundSchema) .optional(), - tag_list: z.array(z.string()).optional(), - additional_details: z.array(z.string()).optional(), - incident: IncidentEntity$inboundSchema.optional(), - questions: PostMortemsQuestionEntity$inboundSchema.optional(), - calendar_events: CalendarsEventEntity$inboundSchema.optional(), + retrospective_shim: z.nullable(z.boolean()).optional(), + retrospective_id: z.nullable(z.string()).optional(), + retrospective_note: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", @@ -73,22 +80,28 @@ export const PostMortemsPostMortemReportEntity$inboundSchema: z.ZodType< "tag_list": "tagList", "additional_details": "additionalDetails", "calendar_events": "calendarEvents", + "retrospective_shim": "retrospectiveShim", + "retrospective_id": "retrospectiveId", + "retrospective_note": "retrospectiveNote", }); }); /** @internal */ export type PostMortemsPostMortemReportEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - incident_id?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - tag_list?: Array | undefined; - additional_details?: Array | undefined; - incident?: IncidentEntity$Outbound | undefined; - questions?: PostMortemsQuestionEntity$Outbound | undefined; - calendar_events?: CalendarsEventEntity$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + incident_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + tag_list?: Array | null | undefined; + additional_details?: Array | null | undefined; + incident?: NullableIncidentEntity$Outbound | null | undefined; + questions?: NullablePostMortemsQuestionEntity$Outbound | null | undefined; + calendar_events?: NullableCalendarsEventEntity$Outbound | null | undefined; + retrospective_shim?: boolean | null | undefined; + retrospective_id?: string | null | undefined; + retrospective_note?: string | null | undefined; }; /** @internal */ @@ -97,17 +110,22 @@ export const PostMortemsPostMortemReportEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PostMortemsPostMortemReportEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - incidentId: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - tagList: z.array(z.string()).optional(), - additionalDetails: z.array(z.string()).optional(), - incident: IncidentEntity$outboundSchema.optional(), - questions: PostMortemsQuestionEntity$outboundSchema.optional(), - calendarEvents: CalendarsEventEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + incidentId: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + additionalDetails: z.nullable(z.array(z.string())).optional(), + incident: z.nullable(NullableIncidentEntity$outboundSchema).optional(), + questions: z.nullable(NullablePostMortemsQuestionEntity$outboundSchema) + .optional(), + calendarEvents: z.nullable(NullableCalendarsEventEntity$outboundSchema) + .optional(), + retrospectiveShim: z.nullable(z.boolean()).optional(), + retrospectiveId: z.nullable(z.string()).optional(), + retrospectiveNote: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { incidentId: "incident_id", @@ -116,6 +134,9 @@ export const PostMortemsPostMortemReportEntity$outboundSchema: z.ZodType< tagList: "tag_list", additionalDetails: "additional_details", calendarEvents: "calendar_events", + retrospectiveShim: "retrospective_shim", + retrospectiveId: "retrospective_id", + retrospectiveNote: "retrospective_note", }); }); diff --git a/src/models/components/postmortemspostmortemreportentitypaginated.ts b/src/models/components/postmortemspostmortemreportentitypaginated.ts index d82ecbaf..19b8e0f1 100644 --- a/src/models/components/postmortemspostmortemreportentitypaginated.ts +++ b/src/models/components/postmortemspostmortemreportentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { PostMortemsPostMortemReportEntity, PostMortemsPostMortemReportEntity$inboundSchema, @@ -23,22 +23,23 @@ import { * PostMortems_PostMortemReportEntityPaginated model */ export type PostMortemsPostMortemReportEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ export const PostMortemsPostMortemReportEntityPaginated$inboundSchema: z.ZodType = z.object({ - data: z.array(PostMortemsPostMortemReportEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(PostMortemsPostMortemReportEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type PostMortemsPostMortemReportEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -48,8 +49,9 @@ export const PostMortemsPostMortemReportEntityPaginated$outboundSchema: z.ZodTypeDef, PostMortemsPostMortemReportEntityPaginated > = z.object({ - data: z.array(PostMortemsPostMortemReportEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(PostMortemsPostMortemReportEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/postmortemsquestionentity.ts b/src/models/components/postmortemsquestionentity.ts deleted file mode 100644 index 6cf9ce45..00000000 --- a/src/models/components/postmortemsquestionentity.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ConversationsAPIEntitiesReference, - ConversationsAPIEntitiesReference$inboundSchema, - ConversationsAPIEntitiesReference$Outbound, - ConversationsAPIEntitiesReference$outboundSchema, -} from "./conversationsapientitiesreference.js"; - -export type PostMortemsQuestionEntity = { - id?: string | undefined; - title?: string | undefined; - body?: string | undefined; - tooltip?: string | undefined; - kind?: string | undefined; - questionTypeId?: string | undefined; - isRequired?: boolean | undefined; - availableOptions?: Array | undefined; - conversations?: Array | undefined; -}; - -/** @internal */ -export const PostMortemsQuestionEntity$inboundSchema: z.ZodType< - PostMortemsQuestionEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - title: z.string().optional(), - body: z.string().optional(), - tooltip: z.string().optional(), - kind: z.string().optional(), - question_type_id: z.string().optional(), - is_required: z.boolean().optional(), - available_options: z.array(z.string()).optional(), - conversations: z.array(ConversationsAPIEntitiesReference$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "question_type_id": "questionTypeId", - "is_required": "isRequired", - "available_options": "availableOptions", - }); -}); - -/** @internal */ -export type PostMortemsQuestionEntity$Outbound = { - id?: string | undefined; - title?: string | undefined; - body?: string | undefined; - tooltip?: string | undefined; - kind?: string | undefined; - question_type_id?: string | undefined; - is_required?: boolean | undefined; - available_options?: Array | undefined; - conversations?: Array | undefined; -}; - -/** @internal */ -export const PostMortemsQuestionEntity$outboundSchema: z.ZodType< - PostMortemsQuestionEntity$Outbound, - z.ZodTypeDef, - PostMortemsQuestionEntity -> = z.object({ - id: z.string().optional(), - title: z.string().optional(), - body: z.string().optional(), - tooltip: z.string().optional(), - kind: z.string().optional(), - questionTypeId: z.string().optional(), - isRequired: z.boolean().optional(), - availableOptions: z.array(z.string()).optional(), - conversations: z.array(ConversationsAPIEntitiesReference$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - questionTypeId: "question_type_id", - isRequired: "is_required", - availableOptions: "available_options", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostMortemsQuestionEntity$ { - /** @deprecated use `PostMortemsQuestionEntity$inboundSchema` instead. */ - export const inboundSchema = PostMortemsQuestionEntity$inboundSchema; - /** @deprecated use `PostMortemsQuestionEntity$outboundSchema` instead. */ - export const outboundSchema = PostMortemsQuestionEntity$outboundSchema; - /** @deprecated use `PostMortemsQuestionEntity$Outbound` instead. */ - export type Outbound = PostMortemsQuestionEntity$Outbound; -} - -export function postMortemsQuestionEntityToJSON( - postMortemsQuestionEntity: PostMortemsQuestionEntity, -): string { - return JSON.stringify( - PostMortemsQuestionEntity$outboundSchema.parse(postMortemsQuestionEntity), - ); -} - -export function postMortemsQuestionEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostMortemsQuestionEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostMortemsQuestionEntity' from JSON`, - ); -} diff --git a/src/models/components/postmortemsquestiontypeentity.ts b/src/models/components/postmortemsquestiontypeentity.ts index c28bfef8..5bc73043 100644 --- a/src/models/components/postmortemsquestiontypeentity.ts +++ b/src/models/components/postmortemsquestiontypeentity.ts @@ -12,12 +12,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * PostMortems_QuestionTypeEntity model */ export type PostMortemsQuestionTypeEntity = { - id?: string | undefined; - title?: string | undefined; - tooltip?: string | undefined; - kind?: string | undefined; - isRequired?: boolean | undefined; - availableOptions?: Array | undefined; + id?: string | null | undefined; + title?: string | null | undefined; + tooltip?: string | null | undefined; + kind?: string | null | undefined; + isRequired?: boolean | null | undefined; + availableOptions?: Array | null | undefined; }; /** @internal */ @@ -26,12 +26,12 @@ export const PostMortemsQuestionTypeEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - title: z.string().optional(), - tooltip: z.string().optional(), - kind: z.string().optional(), - is_required: z.boolean().optional(), - available_options: z.array(z.string()).optional(), + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + tooltip: z.nullable(z.string()).optional(), + kind: z.nullable(z.string()).optional(), + is_required: z.nullable(z.boolean()).optional(), + available_options: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "is_required": "isRequired", @@ -41,12 +41,12 @@ export const PostMortemsQuestionTypeEntity$inboundSchema: z.ZodType< /** @internal */ export type PostMortemsQuestionTypeEntity$Outbound = { - id?: string | undefined; - title?: string | undefined; - tooltip?: string | undefined; - kind?: string | undefined; - is_required?: boolean | undefined; - available_options?: Array | undefined; + id?: string | null | undefined; + title?: string | null | undefined; + tooltip?: string | null | undefined; + kind?: string | null | undefined; + is_required?: boolean | null | undefined; + available_options?: Array | null | undefined; }; /** @internal */ @@ -55,12 +55,12 @@ export const PostMortemsQuestionTypeEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PostMortemsQuestionTypeEntity > = z.object({ - id: z.string().optional(), - title: z.string().optional(), - tooltip: z.string().optional(), - kind: z.string().optional(), - isRequired: z.boolean().optional(), - availableOptions: z.array(z.string()).optional(), + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + tooltip: z.nullable(z.string()).optional(), + kind: z.nullable(z.string()).optional(), + isRequired: z.nullable(z.boolean()).optional(), + availableOptions: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { isRequired: "is_required", diff --git a/src/models/components/postmortemsquestiontypeentitypaginated.ts b/src/models/components/postmortemsquestiontypeentitypaginated.ts index 01030a28..13ec6d2b 100644 --- a/src/models/components/postmortemsquestiontypeentitypaginated.ts +++ b/src/models/components/postmortemsquestiontypeentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { PostMortemsQuestionTypeEntity, PostMortemsQuestionTypeEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * PostMortems_QuestionTypeEntityPaginated model */ export type PostMortemsQuestionTypeEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,15 @@ export const PostMortemsQuestionTypeEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(PostMortemsQuestionTypeEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(PostMortemsQuestionTypeEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type PostMortemsQuestionTypeEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +50,9 @@ export const PostMortemsQuestionTypeEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, PostMortemsQuestionTypeEntityPaginated > = z.object({ - data: z.array(PostMortemsQuestionTypeEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(PostMortemsQuestionTypeEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/postmortemsreasonentity.ts b/src/models/components/postmortemsreasonentity.ts index 9515c1a3..56558b71 100644 --- a/src/models/components/postmortemsreasonentity.ts +++ b/src/models/components/postmortemsreasonentity.ts @@ -7,28 +7,28 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; import { ConversationsAPIEntitiesReference, ConversationsAPIEntitiesReference$inboundSchema, ConversationsAPIEntitiesReference$Outbound, ConversationsAPIEntitiesReference$outboundSchema, } from "./conversationsapientitiesreference.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; /** * PostMortems_ReasonEntity model */ export type PostMortemsReasonEntity = { - id?: string | undefined; - summary?: string | undefined; - position?: number | undefined; - createdBy?: AuthorEntity | undefined; - conversations?: Array | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + position?: number | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + conversations?: Array | null | undefined; }; /** @internal */ @@ -37,12 +37,13 @@ export const PostMortemsReasonEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - position: z.number().int().optional(), - created_by: AuthorEntity$inboundSchema.optional(), - conversations: z.array(ConversationsAPIEntitiesReference$inboundSchema) - .optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "created_by": "createdBy", @@ -51,11 +52,14 @@ export const PostMortemsReasonEntity$inboundSchema: z.ZodType< /** @internal */ export type PostMortemsReasonEntity$Outbound = { - id?: string | undefined; - summary?: string | undefined; - position?: number | undefined; - created_by?: AuthorEntity$Outbound | undefined; - conversations?: Array | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + position?: number | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + conversations?: + | Array + | null + | undefined; }; /** @internal */ @@ -64,12 +68,13 @@ export const PostMortemsReasonEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PostMortemsReasonEntity > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - position: z.number().int().optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - conversations: z.array(ConversationsAPIEntitiesReference$outboundSchema) - .optional(), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + conversations: z.nullable( + z.array(ConversationsAPIEntitiesReference$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { createdBy: "created_by", diff --git a/src/models/components/postmortemsreasonentitypaginated.ts b/src/models/components/postmortemsreasonentitypaginated.ts index d360b9ac..0ababb88 100644 --- a/src/models/components/postmortemsreasonentitypaginated.ts +++ b/src/models/components/postmortemsreasonentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { PostMortemsReasonEntity, PostMortemsReasonEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * PostMortems_ReasonEntityPaginated model */ export type PostMortemsReasonEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const PostMortemsReasonEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(PostMortemsReasonEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(PostMortemsReasonEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type PostMortemsReasonEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const PostMortemsReasonEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, PostMortemsReasonEntityPaginated > = z.object({ - data: z.array(PostMortemsReasonEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(PostMortemsReasonEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/postmortemssectionfieldentity.ts b/src/models/components/postmortemssectionfieldentity.ts index a27e636b..7f77d7d2 100644 --- a/src/models/components/postmortemssectionfieldentity.ts +++ b/src/models/components/postmortemssectionfieldentity.ts @@ -11,9 +11,9 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * PostMortems_SectionFieldEntity model */ export type PostMortemsSectionFieldEntity = { - id?: string | undefined; - name?: string | undefined; - value?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + value?: string | null | undefined; }; /** @internal */ @@ -22,16 +22,16 @@ export const PostMortemsSectionFieldEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - value: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), }); /** @internal */ export type PostMortemsSectionFieldEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - value?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + value?: string | null | undefined; }; /** @internal */ @@ -40,9 +40,9 @@ export const PostMortemsSectionFieldEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PostMortemsSectionFieldEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - value: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/postv1catalogscatalogidingest.ts b/src/models/components/postv1catalogscatalogidingest.ts deleted file mode 100644 index 5cd0ab02..00000000 --- a/src/models/components/postv1catalogscatalogidingest.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Encoding for submitted data - */ -export const Encoding = { - TextYaml: "text/yaml", - ApplicationXYaml: "application/x-yaml", - ApplicationJson: "application/json", -} as const; -/** - * Encoding for submitted data - */ -export type Encoding = ClosedEnum; - -/** - * Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. - */ -export type PostV1CatalogsCatalogIdIngest = { - /** - * Encoding for submitted data - */ - encoding: Encoding; - /** - * Service data - */ - data: string; -}; - -/** @internal */ -export const Encoding$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Encoding); - -/** @internal */ -export const Encoding$outboundSchema: z.ZodNativeEnum = - Encoding$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Encoding$ { - /** @deprecated use `Encoding$inboundSchema` instead. */ - export const inboundSchema = Encoding$inboundSchema; - /** @deprecated use `Encoding$outboundSchema` instead. */ - export const outboundSchema = Encoding$outboundSchema; -} - -/** @internal */ -export const PostV1CatalogsCatalogIdIngest$inboundSchema: z.ZodType< - PostV1CatalogsCatalogIdIngest, - z.ZodTypeDef, - unknown -> = z.object({ - encoding: Encoding$inboundSchema, - data: z.string(), -}); - -/** @internal */ -export type PostV1CatalogsCatalogIdIngest$Outbound = { - encoding: string; - data: string; -}; - -/** @internal */ -export const PostV1CatalogsCatalogIdIngest$outboundSchema: z.ZodType< - PostV1CatalogsCatalogIdIngest$Outbound, - z.ZodTypeDef, - PostV1CatalogsCatalogIdIngest -> = z.object({ - encoding: Encoding$outboundSchema, - data: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1CatalogsCatalogIdIngest$ { - /** @deprecated use `PostV1CatalogsCatalogIdIngest$inboundSchema` instead. */ - export const inboundSchema = PostV1CatalogsCatalogIdIngest$inboundSchema; - /** @deprecated use `PostV1CatalogsCatalogIdIngest$outboundSchema` instead. */ - export const outboundSchema = PostV1CatalogsCatalogIdIngest$outboundSchema; - /** @deprecated use `PostV1CatalogsCatalogIdIngest$Outbound` instead. */ - export type Outbound = PostV1CatalogsCatalogIdIngest$Outbound; -} - -export function postV1CatalogsCatalogIdIngestToJSON( - postV1CatalogsCatalogIdIngest: PostV1CatalogsCatalogIdIngest, -): string { - return JSON.stringify( - PostV1CatalogsCatalogIdIngest$outboundSchema.parse( - postV1CatalogsCatalogIdIngest, - ), - ); -} - -export function postV1CatalogsCatalogIdIngestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1CatalogsCatalogIdIngest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1CatalogsCatalogIdIngest' from JSON`, - ); -} diff --git a/src/models/components/postv1changes.ts b/src/models/components/postv1changes.ts deleted file mode 100644 index d27b7214..00000000 --- a/src/models/components/postv1changes.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new change entry - */ -export type PostV1Changes = { - summary?: string | undefined; - description?: string | undefined; - /** - * A labels hash of keys and values - */ - labels?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const PostV1Changes$inboundSchema: z.ZodType< - PostV1Changes, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), -}); - -/** @internal */ -export type PostV1Changes$Outbound = { - summary?: string | undefined; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; -}; - -/** @internal */ -export const PostV1Changes$outboundSchema: z.ZodType< - PostV1Changes$Outbound, - z.ZodTypeDef, - PostV1Changes -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Changes$ { - /** @deprecated use `PostV1Changes$inboundSchema` instead. */ - export const inboundSchema = PostV1Changes$inboundSchema; - /** @deprecated use `PostV1Changes$outboundSchema` instead. */ - export const outboundSchema = PostV1Changes$outboundSchema; - /** @deprecated use `PostV1Changes$Outbound` instead. */ - export type Outbound = PostV1Changes$Outbound; -} - -export function postV1ChangesToJSON(postV1Changes: PostV1Changes): string { - return JSON.stringify(PostV1Changes$outboundSchema.parse(postV1Changes)); -} - -export function postV1ChangesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Changes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Changes' from JSON`, - ); -} diff --git a/src/models/components/postv1changeschangeididentities.ts b/src/models/components/postv1changeschangeididentities.ts deleted file mode 100644 index 35de4190..00000000 --- a/src/models/components/postv1changeschangeididentities.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create an identity for this change - */ -export type PostV1ChangesChangeIdIdentities = { - type: string; - value: string; -}; - -/** @internal */ -export const PostV1ChangesChangeIdIdentities$inboundSchema: z.ZodType< - PostV1ChangesChangeIdIdentities, - z.ZodTypeDef, - unknown -> = z.object({ - type: z.string(), - value: z.string(), -}); - -/** @internal */ -export type PostV1ChangesChangeIdIdentities$Outbound = { - type: string; - value: string; -}; - -/** @internal */ -export const PostV1ChangesChangeIdIdentities$outboundSchema: z.ZodType< - PostV1ChangesChangeIdIdentities$Outbound, - z.ZodTypeDef, - PostV1ChangesChangeIdIdentities -> = z.object({ - type: z.string(), - value: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ChangesChangeIdIdentities$ { - /** @deprecated use `PostV1ChangesChangeIdIdentities$inboundSchema` instead. */ - export const inboundSchema = PostV1ChangesChangeIdIdentities$inboundSchema; - /** @deprecated use `PostV1ChangesChangeIdIdentities$outboundSchema` instead. */ - export const outboundSchema = PostV1ChangesChangeIdIdentities$outboundSchema; - /** @deprecated use `PostV1ChangesChangeIdIdentities$Outbound` instead. */ - export type Outbound = PostV1ChangesChangeIdIdentities$Outbound; -} - -export function postV1ChangesChangeIdIdentitiesToJSON( - postV1ChangesChangeIdIdentities: PostV1ChangesChangeIdIdentities, -): string { - return JSON.stringify( - PostV1ChangesChangeIdIdentities$outboundSchema.parse( - postV1ChangesChangeIdIdentities, - ), - ); -} - -export function postV1ChangesChangeIdIdentitiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ChangesChangeIdIdentities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ChangesChangeIdIdentities' from JSON`, - ); -} diff --git a/src/models/components/postv1checklisttemplates.ts b/src/models/components/postv1checklisttemplates.ts deleted file mode 100644 index 9d6d9539..00000000 --- a/src/models/components/postv1checklisttemplates.ts +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Checks = { - /** - * The name of the check - */ - name: string; - /** - * The description of the check - */ - description?: string | undefined; -}; - -export type ConnectedServices = { - id: string; -}; - -/** - * Creates a checklist template for the organization - */ -export type PostV1ChecklistTemplates = { - name: string; - /** - * An array of checks for the checklist template - */ - checks: Array; - description?: string | undefined; - /** - * The ID of the Team that owns the checklist template - */ - teamId?: string | undefined; - /** - * Array of service IDs to attach checklist template to - */ - connectedServices?: Array | undefined; -}; - -/** @internal */ -export const Checks$inboundSchema: z.ZodType = z - .object({ - name: z.string(), - description: z.string().optional(), - }); - -/** @internal */ -export type Checks$Outbound = { - name: string; - description?: string | undefined; -}; - -/** @internal */ -export const Checks$outboundSchema: z.ZodType< - Checks$Outbound, - z.ZodTypeDef, - Checks -> = z.object({ - name: z.string(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Checks$ { - /** @deprecated use `Checks$inboundSchema` instead. */ - export const inboundSchema = Checks$inboundSchema; - /** @deprecated use `Checks$outboundSchema` instead. */ - export const outboundSchema = Checks$outboundSchema; - /** @deprecated use `Checks$Outbound` instead. */ - export type Outbound = Checks$Outbound; -} - -export function checksToJSON(checks: Checks): string { - return JSON.stringify(Checks$outboundSchema.parse(checks)); -} - -export function checksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Checks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Checks' from JSON`, - ); -} - -/** @internal */ -export const ConnectedServices$inboundSchema: z.ZodType< - ConnectedServices, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type ConnectedServices$Outbound = { - id: string; -}; - -/** @internal */ -export const ConnectedServices$outboundSchema: z.ZodType< - ConnectedServices$Outbound, - z.ZodTypeDef, - ConnectedServices -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ConnectedServices$ { - /** @deprecated use `ConnectedServices$inboundSchema` instead. */ - export const inboundSchema = ConnectedServices$inboundSchema; - /** @deprecated use `ConnectedServices$outboundSchema` instead. */ - export const outboundSchema = ConnectedServices$outboundSchema; - /** @deprecated use `ConnectedServices$Outbound` instead. */ - export type Outbound = ConnectedServices$Outbound; -} - -export function connectedServicesToJSON( - connectedServices: ConnectedServices, -): string { - return JSON.stringify( - ConnectedServices$outboundSchema.parse(connectedServices), - ); -} - -export function connectedServicesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ConnectedServices$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ConnectedServices' from JSON`, - ); -} - -/** @internal */ -export const PostV1ChecklistTemplates$inboundSchema: z.ZodType< - PostV1ChecklistTemplates, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - checks: z.array(z.lazy(() => Checks$inboundSchema)), - description: z.string().optional(), - team_id: z.string().optional(), - connected_services: z.array(z.lazy(() => ConnectedServices$inboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "connected_services": "connectedServices", - }); -}); - -/** @internal */ -export type PostV1ChecklistTemplates$Outbound = { - name: string; - checks: Array; - description?: string | undefined; - team_id?: string | undefined; - connected_services?: Array | undefined; -}; - -/** @internal */ -export const PostV1ChecklistTemplates$outboundSchema: z.ZodType< - PostV1ChecklistTemplates$Outbound, - z.ZodTypeDef, - PostV1ChecklistTemplates -> = z.object({ - name: z.string(), - checks: z.array(z.lazy(() => Checks$outboundSchema)), - description: z.string().optional(), - teamId: z.string().optional(), - connectedServices: z.array(z.lazy(() => ConnectedServices$outboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - connectedServices: "connected_services", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ChecklistTemplates$ { - /** @deprecated use `PostV1ChecklistTemplates$inboundSchema` instead. */ - export const inboundSchema = PostV1ChecklistTemplates$inboundSchema; - /** @deprecated use `PostV1ChecklistTemplates$outboundSchema` instead. */ - export const outboundSchema = PostV1ChecklistTemplates$outboundSchema; - /** @deprecated use `PostV1ChecklistTemplates$Outbound` instead. */ - export type Outbound = PostV1ChecklistTemplates$Outbound; -} - -export function postV1ChecklistTemplatesToJSON( - postV1ChecklistTemplates: PostV1ChecklistTemplates, -): string { - return JSON.stringify( - PostV1ChecklistTemplates$outboundSchema.parse(postV1ChecklistTemplates), - ); -} - -export function postV1ChecklistTemplatesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ChecklistTemplates$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ChecklistTemplates' from JSON`, - ); -} diff --git a/src/models/components/postv1conversationsconversationidcomments.ts b/src/models/components/postv1conversationsconversationidcomments.ts deleted file mode 100644 index 3e286bf5..00000000 --- a/src/models/components/postv1conversationsconversationidcomments.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * ALPHA - Creates a comment for a project - */ -export type PostV1ConversationsConversationIdComments = { - /** - * Text body of comment - */ - body: string; -}; - -/** @internal */ -export const PostV1ConversationsConversationIdComments$inboundSchema: z.ZodType< - PostV1ConversationsConversationIdComments, - z.ZodTypeDef, - unknown -> = z.object({ - body: z.string(), -}); - -/** @internal */ -export type PostV1ConversationsConversationIdComments$Outbound = { - body: string; -}; - -/** @internal */ -export const PostV1ConversationsConversationIdComments$outboundSchema: - z.ZodType< - PostV1ConversationsConversationIdComments$Outbound, - z.ZodTypeDef, - PostV1ConversationsConversationIdComments - > = z.object({ - body: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ConversationsConversationIdComments$ { - /** @deprecated use `PostV1ConversationsConversationIdComments$inboundSchema` instead. */ - export const inboundSchema = - PostV1ConversationsConversationIdComments$inboundSchema; - /** @deprecated use `PostV1ConversationsConversationIdComments$outboundSchema` instead. */ - export const outboundSchema = - PostV1ConversationsConversationIdComments$outboundSchema; - /** @deprecated use `PostV1ConversationsConversationIdComments$Outbound` instead. */ - export type Outbound = PostV1ConversationsConversationIdComments$Outbound; -} - -export function postV1ConversationsConversationIdCommentsToJSON( - postV1ConversationsConversationIdComments: - PostV1ConversationsConversationIdComments, -): string { - return JSON.stringify( - PostV1ConversationsConversationIdComments$outboundSchema.parse( - postV1ConversationsConversationIdComments, - ), - ); -} - -export function postV1ConversationsConversationIdCommentsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1ConversationsConversationIdComments, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1ConversationsConversationIdComments$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1ConversationsConversationIdComments' from JSON`, - ); -} diff --git a/src/models/components/postv1conversationsconversationidcommentscommentidreactions.ts b/src/models/components/postv1conversationsconversationidcommentscommentidreactions.ts deleted file mode 100644 index 6289a113..00000000 --- a/src/models/components/postv1conversationsconversationidcommentscommentidreactions.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * ALPHA - Create a reaction on a comment - */ -export type PostV1ConversationsConversationIdCommentsCommentIdReactions = { - /** - * CLDR short name of Unicode emojis - */ - reaction: string; -}; - -/** @internal */ -export const PostV1ConversationsConversationIdCommentsCommentIdReactions$inboundSchema: - z.ZodType< - PostV1ConversationsConversationIdCommentsCommentIdReactions, - z.ZodTypeDef, - unknown - > = z.object({ - reaction: z.string(), - }); - -/** @internal */ -export type PostV1ConversationsConversationIdCommentsCommentIdReactions$Outbound = - { - reaction: string; - }; - -/** @internal */ -export const PostV1ConversationsConversationIdCommentsCommentIdReactions$outboundSchema: - z.ZodType< - PostV1ConversationsConversationIdCommentsCommentIdReactions$Outbound, - z.ZodTypeDef, - PostV1ConversationsConversationIdCommentsCommentIdReactions - > = z.object({ - reaction: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ConversationsConversationIdCommentsCommentIdReactions$ { - /** @deprecated use `PostV1ConversationsConversationIdCommentsCommentIdReactions$inboundSchema` instead. */ - export const inboundSchema = - PostV1ConversationsConversationIdCommentsCommentIdReactions$inboundSchema; - /** @deprecated use `PostV1ConversationsConversationIdCommentsCommentIdReactions$outboundSchema` instead. */ - export const outboundSchema = - PostV1ConversationsConversationIdCommentsCommentIdReactions$outboundSchema; - /** @deprecated use `PostV1ConversationsConversationIdCommentsCommentIdReactions$Outbound` instead. */ - export type Outbound = - PostV1ConversationsConversationIdCommentsCommentIdReactions$Outbound; -} - -export function postV1ConversationsConversationIdCommentsCommentIdReactionsToJSON( - postV1ConversationsConversationIdCommentsCommentIdReactions: - PostV1ConversationsConversationIdCommentsCommentIdReactions, -): string { - return JSON.stringify( - PostV1ConversationsConversationIdCommentsCommentIdReactions$outboundSchema - .parse(postV1ConversationsConversationIdCommentsCommentIdReactions), - ); -} - -export function postV1ConversationsConversationIdCommentsCommentIdReactionsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1ConversationsConversationIdCommentsCommentIdReactions, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1ConversationsConversationIdCommentsCommentIdReactions$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PostV1ConversationsConversationIdCommentsCommentIdReactions' from JSON`, - ); -} diff --git a/src/models/components/postv1customfieldsdefinitions.ts b/src/models/components/postv1customfieldsdefinitions.ts deleted file mode 100644 index 21e72699..00000000 --- a/src/models/components/postv1customfieldsdefinitions.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new custom field definition - */ -export type PostV1CustomFieldsDefinitions = { - displayName: string; - description?: string | undefined; - fieldType: string; - permissibleValues?: Array | undefined; - required: boolean; - /** - * An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. - */ - requiredAtMilestoneId?: string | undefined; -}; - -/** @internal */ -export const PostV1CustomFieldsDefinitions$inboundSchema: z.ZodType< - PostV1CustomFieldsDefinitions, - z.ZodTypeDef, - unknown -> = z.object({ - display_name: z.string(), - description: z.string().optional(), - field_type: z.string(), - permissible_values: z.array(z.string()).optional(), - required: z.boolean(), - required_at_milestone_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "display_name": "displayName", - "field_type": "fieldType", - "permissible_values": "permissibleValues", - "required_at_milestone_id": "requiredAtMilestoneId", - }); -}); - -/** @internal */ -export type PostV1CustomFieldsDefinitions$Outbound = { - display_name: string; - description?: string | undefined; - field_type: string; - permissible_values?: Array | undefined; - required: boolean; - required_at_milestone_id?: string | undefined; -}; - -/** @internal */ -export const PostV1CustomFieldsDefinitions$outboundSchema: z.ZodType< - PostV1CustomFieldsDefinitions$Outbound, - z.ZodTypeDef, - PostV1CustomFieldsDefinitions -> = z.object({ - displayName: z.string(), - description: z.string().optional(), - fieldType: z.string(), - permissibleValues: z.array(z.string()).optional(), - required: z.boolean(), - requiredAtMilestoneId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - displayName: "display_name", - fieldType: "field_type", - permissibleValues: "permissible_values", - requiredAtMilestoneId: "required_at_milestone_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1CustomFieldsDefinitions$ { - /** @deprecated use `PostV1CustomFieldsDefinitions$inboundSchema` instead. */ - export const inboundSchema = PostV1CustomFieldsDefinitions$inboundSchema; - /** @deprecated use `PostV1CustomFieldsDefinitions$outboundSchema` instead. */ - export const outboundSchema = PostV1CustomFieldsDefinitions$outboundSchema; - /** @deprecated use `PostV1CustomFieldsDefinitions$Outbound` instead. */ - export type Outbound = PostV1CustomFieldsDefinitions$Outbound; -} - -export function postV1CustomFieldsDefinitionsToJSON( - postV1CustomFieldsDefinitions: PostV1CustomFieldsDefinitions, -): string { - return JSON.stringify( - PostV1CustomFieldsDefinitions$outboundSchema.parse( - postV1CustomFieldsDefinitions, - ), - ); -} - -export function postV1CustomFieldsDefinitionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1CustomFieldsDefinitions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1CustomFieldsDefinitions' from JSON`, - ); -} diff --git a/src/models/components/postv1environments.ts b/src/models/components/postv1environments.ts deleted file mode 100644 index 9039d4f4..00000000 --- a/src/models/components/postv1environments.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Creates an environment for the organization - */ -export type PostV1Environments = { - name: string; - description?: string | undefined; -}; - -/** @internal */ -export const PostV1Environments$inboundSchema: z.ZodType< - PostV1Environments, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), -}); - -/** @internal */ -export type PostV1Environments$Outbound = { - name: string; - description?: string | undefined; -}; - -/** @internal */ -export const PostV1Environments$outboundSchema: z.ZodType< - PostV1Environments$Outbound, - z.ZodTypeDef, - PostV1Environments -> = z.object({ - name: z.string(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Environments$ { - /** @deprecated use `PostV1Environments$inboundSchema` instead. */ - export const inboundSchema = PostV1Environments$inboundSchema; - /** @deprecated use `PostV1Environments$outboundSchema` instead. */ - export const outboundSchema = PostV1Environments$outboundSchema; - /** @deprecated use `PostV1Environments$Outbound` instead. */ - export type Outbound = PostV1Environments$Outbound; -} - -export function postV1EnvironmentsToJSON( - postV1Environments: PostV1Environments, -): string { - return JSON.stringify( - PostV1Environments$outboundSchema.parse(postV1Environments), - ); -} - -export function postV1EnvironmentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Environments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Environments' from JSON`, - ); -} diff --git a/src/models/components/postv1functionalities.ts b/src/models/components/postv1functionalities.ts deleted file mode 100644 index 42e31ebe..00000000 --- a/src/models/components/postv1functionalities.ts +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Services = { - /** - * ID of a service - */ - id: string; -}; - -export type ExternalResources = { - remoteId: string; - /** - * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. - */ - connectionType?: string | undefined; -}; - -export type Links = { - /** - * Short name used to display and identify this link - */ - name: string; - /** - * URL - */ - hrefUrl: string; - /** - * An optional URL to an icon representing this link - */ - iconUrl?: string | undefined; -}; - -/** - * An object representing a Team that owns the service - */ -export type Owner = { - id: string; -}; - -export type Teams = { - id: string; -}; - -/** - * Creates a functionality for the organization - */ -export type PostV1Functionalities = { - name: string; - description?: string | undefined; - services?: Array | undefined; - /** - * A hash of label keys and values - */ - labels?: { [k: string]: string } | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; - /** - * An array of external resources to attach to this service. - */ - externalResources?: Array | undefined; - /** - * An array of links to associate with this service - */ - links?: Array | undefined; - /** - * An object representing a Team that owns the service - */ - owner?: Owner | undefined; - /** - * An array of teams to attach to this service. - */ - teams?: Array | undefined; -}; - -/** @internal */ -export const Services$inboundSchema: z.ZodType< - Services, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type Services$Outbound = { - id: string; -}; - -/** @internal */ -export const Services$outboundSchema: z.ZodType< - Services$Outbound, - z.ZodTypeDef, - Services -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Services$ { - /** @deprecated use `Services$inboundSchema` instead. */ - export const inboundSchema = Services$inboundSchema; - /** @deprecated use `Services$outboundSchema` instead. */ - export const outboundSchema = Services$outboundSchema; - /** @deprecated use `Services$Outbound` instead. */ - export type Outbound = Services$Outbound; -} - -export function servicesToJSON(services: Services): string { - return JSON.stringify(Services$outboundSchema.parse(services)); -} - -export function servicesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Services$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Services' from JSON`, - ); -} - -/** @internal */ -export const ExternalResources$inboundSchema: z.ZodType< - ExternalResources, - z.ZodTypeDef, - unknown -> = z.object({ - remote_id: z.string(), - connection_type: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "remote_id": "remoteId", - "connection_type": "connectionType", - }); -}); - -/** @internal */ -export type ExternalResources$Outbound = { - remote_id: string; - connection_type?: string | undefined; -}; - -/** @internal */ -export const ExternalResources$outboundSchema: z.ZodType< - ExternalResources$Outbound, - z.ZodTypeDef, - ExternalResources -> = z.object({ - remoteId: z.string(), - connectionType: z.string().optional(), -}).transform((v) => { - return remap$(v, { - remoteId: "remote_id", - connectionType: "connection_type", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExternalResources$ { - /** @deprecated use `ExternalResources$inboundSchema` instead. */ - export const inboundSchema = ExternalResources$inboundSchema; - /** @deprecated use `ExternalResources$outboundSchema` instead. */ - export const outboundSchema = ExternalResources$outboundSchema; - /** @deprecated use `ExternalResources$Outbound` instead. */ - export type Outbound = ExternalResources$Outbound; -} - -export function externalResourcesToJSON( - externalResources: ExternalResources, -): string { - return JSON.stringify( - ExternalResources$outboundSchema.parse(externalResources), - ); -} - -export function externalResourcesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ExternalResources$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ExternalResources' from JSON`, - ); -} - -/** @internal */ -export const Links$inboundSchema: z.ZodType = z - .object({ - name: z.string(), - href_url: z.string(), - icon_url: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "href_url": "hrefUrl", - "icon_url": "iconUrl", - }); - }); - -/** @internal */ -export type Links$Outbound = { - name: string; - href_url: string; - icon_url?: string | undefined; -}; - -/** @internal */ -export const Links$outboundSchema: z.ZodType< - Links$Outbound, - z.ZodTypeDef, - Links -> = z.object({ - name: z.string(), - hrefUrl: z.string(), - iconUrl: z.string().optional(), -}).transform((v) => { - return remap$(v, { - hrefUrl: "href_url", - iconUrl: "icon_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Links$ { - /** @deprecated use `Links$inboundSchema` instead. */ - export const inboundSchema = Links$inboundSchema; - /** @deprecated use `Links$outboundSchema` instead. */ - export const outboundSchema = Links$outboundSchema; - /** @deprecated use `Links$Outbound` instead. */ - export type Outbound = Links$Outbound; -} - -export function linksToJSON(links: Links): string { - return JSON.stringify(Links$outboundSchema.parse(links)); -} - -export function linksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Links$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Links' from JSON`, - ); -} - -/** @internal */ -export const Owner$inboundSchema: z.ZodType = z - .object({ - id: z.string(), - }); - -/** @internal */ -export type Owner$Outbound = { - id: string; -}; - -/** @internal */ -export const Owner$outboundSchema: z.ZodType< - Owner$Outbound, - z.ZodTypeDef, - Owner -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Owner$ { - /** @deprecated use `Owner$inboundSchema` instead. */ - export const inboundSchema = Owner$inboundSchema; - /** @deprecated use `Owner$outboundSchema` instead. */ - export const outboundSchema = Owner$outboundSchema; - /** @deprecated use `Owner$Outbound` instead. */ - export type Outbound = Owner$Outbound; -} - -export function ownerToJSON(owner: Owner): string { - return JSON.stringify(Owner$outboundSchema.parse(owner)); -} - -export function ownerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Owner$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Owner' from JSON`, - ); -} - -/** @internal */ -export const Teams$inboundSchema: z.ZodType = z - .object({ - id: z.string(), - }); - -/** @internal */ -export type Teams$Outbound = { - id: string; -}; - -/** @internal */ -export const Teams$outboundSchema: z.ZodType< - Teams$Outbound, - z.ZodTypeDef, - Teams -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Teams$ { - /** @deprecated use `Teams$inboundSchema` instead. */ - export const inboundSchema = Teams$inboundSchema; - /** @deprecated use `Teams$outboundSchema` instead. */ - export const outboundSchema = Teams$outboundSchema; - /** @deprecated use `Teams$Outbound` instead. */ - export type Outbound = Teams$Outbound; -} - -export function teamsToJSON(teams: Teams): string { - return JSON.stringify(Teams$outboundSchema.parse(teams)); -} - -export function teamsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Teams$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Teams' from JSON`, - ); -} - -/** @internal */ -export const PostV1Functionalities$inboundSchema: z.ZodType< - PostV1Functionalities, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - services: z.array(z.lazy(() => Services$inboundSchema)).optional(), - labels: z.record(z.string()).optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - external_resources: z.array(z.lazy(() => ExternalResources$inboundSchema)) - .optional(), - links: z.array(z.lazy(() => Links$inboundSchema)).optional(), - owner: z.lazy(() => Owner$inboundSchema).optional(), - teams: z.array(z.lazy(() => Teams$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "alert_on_add": "alertOnAdd", - "auto_add_responding_team": "autoAddRespondingTeam", - "external_resources": "externalResources", - }); -}); - -/** @internal */ -export type PostV1Functionalities$Outbound = { - name: string; - description?: string | undefined; - services?: Array | undefined; - labels?: { [k: string]: string } | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - external_resources?: Array | undefined; - links?: Array | undefined; - owner?: Owner$Outbound | undefined; - teams?: Array | undefined; -}; - -/** @internal */ -export const PostV1Functionalities$outboundSchema: z.ZodType< - PostV1Functionalities$Outbound, - z.ZodTypeDef, - PostV1Functionalities -> = z.object({ - name: z.string(), - description: z.string().optional(), - services: z.array(z.lazy(() => Services$outboundSchema)).optional(), - labels: z.record(z.string()).optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - externalResources: z.array(z.lazy(() => ExternalResources$outboundSchema)) - .optional(), - links: z.array(z.lazy(() => Links$outboundSchema)).optional(), - owner: z.lazy(() => Owner$outboundSchema).optional(), - teams: z.array(z.lazy(() => Teams$outboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - alertOnAdd: "alert_on_add", - autoAddRespondingTeam: "auto_add_responding_team", - externalResources: "external_resources", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Functionalities$ { - /** @deprecated use `PostV1Functionalities$inboundSchema` instead. */ - export const inboundSchema = PostV1Functionalities$inboundSchema; - /** @deprecated use `PostV1Functionalities$outboundSchema` instead. */ - export const outboundSchema = PostV1Functionalities$outboundSchema; - /** @deprecated use `PostV1Functionalities$Outbound` instead. */ - export type Outbound = PostV1Functionalities$Outbound; -} - -export function postV1FunctionalitiesToJSON( - postV1Functionalities: PostV1Functionalities, -): string { - return JSON.stringify( - PostV1Functionalities$outboundSchema.parse(postV1Functionalities), - ); -} - -export function postV1FunctionalitiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Functionalities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Functionalities' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentroles.ts b/src/models/components/postv1incidentroles.ts deleted file mode 100644 index 9dd1535e..00000000 --- a/src/models/components/postv1incidentroles.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new incident role - */ -export type PostV1IncidentRoles = { - name: string; - summary: string; - description?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentRoles$inboundSchema: z.ZodType< - PostV1IncidentRoles, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - summary: z.string(), - description: z.string().optional(), -}); - -/** @internal */ -export type PostV1IncidentRoles$Outbound = { - name: string; - summary: string; - description?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentRoles$outboundSchema: z.ZodType< - PostV1IncidentRoles$Outbound, - z.ZodTypeDef, - PostV1IncidentRoles -> = z.object({ - name: z.string(), - summary: z.string(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentRoles$ { - /** @deprecated use `PostV1IncidentRoles$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentRoles$inboundSchema; - /** @deprecated use `PostV1IncidentRoles$outboundSchema` instead. */ - export const outboundSchema = PostV1IncidentRoles$outboundSchema; - /** @deprecated use `PostV1IncidentRoles$Outbound` instead. */ - export type Outbound = PostV1IncidentRoles$Outbound; -} - -export function postV1IncidentRolesToJSON( - postV1IncidentRoles: PostV1IncidentRoles, -): string { - return JSON.stringify( - PostV1IncidentRoles$outboundSchema.parse(postV1IncidentRoles), - ); -} - -export function postV1IncidentRolesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1IncidentRoles$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentRoles' from JSON`, - ); -} diff --git a/src/models/components/postv1incidents.ts b/src/models/components/postv1incidents.ts deleted file mode 100644 index 9c29c413..00000000 --- a/src/models/components/postv1incidents.ts +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Key:value pairs to track custom data for the incident - */ -export type PostV1IncidentsLabels = {}; - -export type Impacts = { - /** - * The type of impacted infrastructure. One of: environment, functionality, or service - */ - type: string; - /** - * The ID of the impacted infrastructure - */ - id: string; - /** - * The ID of the impact condition. Find these at /v1/severity_matrix/conditions - */ - conditionId: string; -}; - -export type Milestones = { - /** - * The type/slug of the milestone. Must be one of the currently configured milestones. - */ - type: string; - /** - * An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value - */ - occurredAt: Date; -}; - -export type CustomFields = { - /** - * The ID of the custom field you wish to set. - */ - fieldId: string; - /** - * The value you wish to set on the custom field if the type of the field accepts string values - */ - valueString?: string | undefined; - /** - * The value you wish to set on the custom field if the type of the field accepts array values - */ - valueArray?: Array | undefined; -}; - -/** - * Create a new incident - */ -export type PostV1Incidents = { - name: string; - summary?: string | undefined; - customerImpactSummary?: string | undefined; - description?: string | undefined; - priority?: string | undefined; - severity?: string | undefined; - severityConditionId?: string | undefined; - severityImpactId?: string | undefined; - /** - * List of alert IDs that this incident should be associated to - */ - alertIds?: Array | undefined; - /** - * Key:value pairs to track custom data for the incident - */ - labels?: PostV1IncidentsLabels | undefined; - /** - * List of ids of Runbooks to attach to this incident. Foregoes any conditions these Runbooks may have guarding automatic attachment. - */ - runbookIds?: Array | undefined; - /** - * List of tags for the incident - */ - tagList?: Array | undefined; - /** - * An array of impacted infrastructure - */ - impacts?: Array | undefined; - /** - * An array of milestones to set on an incident. This can be used to create an already-resolved incident. - */ - milestones?: Array | undefined; - restricted?: boolean | undefined; - /** - * IDs of teams you wish to assign to this incident. - */ - teamIds?: Array | undefined; - /** - * An array of custom fields to set on the incident. - */ - customFields?: Array | undefined; - externalLinks?: string | undefined; - /** - * If true, the incident type values will not be copied to the incident. This is useful when creating an incident from an incident type, but you want to set the values manually. - */ - skipIncidentTypeValues?: boolean | undefined; -}; - -/** @internal */ -export const PostV1IncidentsLabels$inboundSchema: z.ZodType< - PostV1IncidentsLabels, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type PostV1IncidentsLabels$Outbound = {}; - -/** @internal */ -export const PostV1IncidentsLabels$outboundSchema: z.ZodType< - PostV1IncidentsLabels$Outbound, - z.ZodTypeDef, - PostV1IncidentsLabels -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsLabels$ { - /** @deprecated use `PostV1IncidentsLabels$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentsLabels$inboundSchema; - /** @deprecated use `PostV1IncidentsLabels$outboundSchema` instead. */ - export const outboundSchema = PostV1IncidentsLabels$outboundSchema; - /** @deprecated use `PostV1IncidentsLabels$Outbound` instead. */ - export type Outbound = PostV1IncidentsLabels$Outbound; -} - -export function postV1IncidentsLabelsToJSON( - postV1IncidentsLabels: PostV1IncidentsLabels, -): string { - return JSON.stringify( - PostV1IncidentsLabels$outboundSchema.parse(postV1IncidentsLabels), - ); -} - -export function postV1IncidentsLabelsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1IncidentsLabels$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentsLabels' from JSON`, - ); -} - -/** @internal */ -export const Impacts$inboundSchema: z.ZodType = - z.object({ - type: z.string(), - id: z.string(), - condition_id: z.string(), - }).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); - }); - -/** @internal */ -export type Impacts$Outbound = { - type: string; - id: string; - condition_id: string; -}; - -/** @internal */ -export const Impacts$outboundSchema: z.ZodType< - Impacts$Outbound, - z.ZodTypeDef, - Impacts -> = z.object({ - type: z.string(), - id: z.string(), - conditionId: z.string(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Impacts$ { - /** @deprecated use `Impacts$inboundSchema` instead. */ - export const inboundSchema = Impacts$inboundSchema; - /** @deprecated use `Impacts$outboundSchema` instead. */ - export const outboundSchema = Impacts$outboundSchema; - /** @deprecated use `Impacts$Outbound` instead. */ - export type Outbound = Impacts$Outbound; -} - -export function impactsToJSON(impacts: Impacts): string { - return JSON.stringify(Impacts$outboundSchema.parse(impacts)); -} - -export function impactsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Impacts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Impacts' from JSON`, - ); -} - -/** @internal */ -export const Milestones$inboundSchema: z.ZodType< - Milestones, - z.ZodTypeDef, - unknown -> = z.object({ - type: z.string(), - occurred_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ), -}).transform((v) => { - return remap$(v, { - "occurred_at": "occurredAt", - }); -}); - -/** @internal */ -export type Milestones$Outbound = { - type: string; - occurred_at: string; -}; - -/** @internal */ -export const Milestones$outboundSchema: z.ZodType< - Milestones$Outbound, - z.ZodTypeDef, - Milestones -> = z.object({ - type: z.string(), - occurredAt: z.date().transform(v => v.toISOString()), -}).transform((v) => { - return remap$(v, { - occurredAt: "occurred_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Milestones$ { - /** @deprecated use `Milestones$inboundSchema` instead. */ - export const inboundSchema = Milestones$inboundSchema; - /** @deprecated use `Milestones$outboundSchema` instead. */ - export const outboundSchema = Milestones$outboundSchema; - /** @deprecated use `Milestones$Outbound` instead. */ - export type Outbound = Milestones$Outbound; -} - -export function milestonesToJSON(milestones: Milestones): string { - return JSON.stringify(Milestones$outboundSchema.parse(milestones)); -} - -export function milestonesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Milestones$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Milestones' from JSON`, - ); -} - -/** @internal */ -export const CustomFields$inboundSchema: z.ZodType< - CustomFields, - z.ZodTypeDef, - unknown -> = z.object({ - field_id: z.string(), - value_string: z.string().optional(), - value_array: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "field_id": "fieldId", - "value_string": "valueString", - "value_array": "valueArray", - }); -}); - -/** @internal */ -export type CustomFields$Outbound = { - field_id: string; - value_string?: string | undefined; - value_array?: Array | undefined; -}; - -/** @internal */ -export const CustomFields$outboundSchema: z.ZodType< - CustomFields$Outbound, - z.ZodTypeDef, - CustomFields -> = z.object({ - fieldId: z.string(), - valueString: z.string().optional(), - valueArray: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - fieldId: "field_id", - valueString: "value_string", - valueArray: "value_array", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CustomFields$ { - /** @deprecated use `CustomFields$inboundSchema` instead. */ - export const inboundSchema = CustomFields$inboundSchema; - /** @deprecated use `CustomFields$outboundSchema` instead. */ - export const outboundSchema = CustomFields$outboundSchema; - /** @deprecated use `CustomFields$Outbound` instead. */ - export type Outbound = CustomFields$Outbound; -} - -export function customFieldsToJSON(customFields: CustomFields): string { - return JSON.stringify(CustomFields$outboundSchema.parse(customFields)); -} - -export function customFieldsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CustomFields$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CustomFields' from JSON`, - ); -} - -/** @internal */ -export const PostV1Incidents$inboundSchema: z.ZodType< - PostV1Incidents, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - summary: z.string().optional(), - customer_impact_summary: z.string().optional(), - description: z.string().optional(), - priority: z.string().optional(), - severity: z.string().optional(), - severity_condition_id: z.string().optional(), - severity_impact_id: z.string().optional(), - alert_ids: z.array(z.string()).optional(), - labels: z.lazy(() => PostV1IncidentsLabels$inboundSchema).optional(), - runbook_ids: z.array(z.string()).optional(), - tag_list: z.array(z.string()).optional(), - impacts: z.array(z.lazy(() => Impacts$inboundSchema)).optional(), - milestones: z.array(z.lazy(() => Milestones$inboundSchema)).optional(), - restricted: z.boolean().optional(), - team_ids: z.array(z.string()).optional(), - custom_fields: z.array(z.lazy(() => CustomFields$inboundSchema)).optional(), - external_links: z.string().optional(), - skip_incident_type_values: z.boolean().default(false), -}).transform((v) => { - return remap$(v, { - "customer_impact_summary": "customerImpactSummary", - "severity_condition_id": "severityConditionId", - "severity_impact_id": "severityImpactId", - "alert_ids": "alertIds", - "runbook_ids": "runbookIds", - "tag_list": "tagList", - "team_ids": "teamIds", - "custom_fields": "customFields", - "external_links": "externalLinks", - "skip_incident_type_values": "skipIncidentTypeValues", - }); -}); - -/** @internal */ -export type PostV1Incidents$Outbound = { - name: string; - summary?: string | undefined; - customer_impact_summary?: string | undefined; - description?: string | undefined; - priority?: string | undefined; - severity?: string | undefined; - severity_condition_id?: string | undefined; - severity_impact_id?: string | undefined; - alert_ids?: Array | undefined; - labels?: PostV1IncidentsLabels$Outbound | undefined; - runbook_ids?: Array | undefined; - tag_list?: Array | undefined; - impacts?: Array | undefined; - milestones?: Array | undefined; - restricted?: boolean | undefined; - team_ids?: Array | undefined; - custom_fields?: Array | undefined; - external_links?: string | undefined; - skip_incident_type_values: boolean; -}; - -/** @internal */ -export const PostV1Incidents$outboundSchema: z.ZodType< - PostV1Incidents$Outbound, - z.ZodTypeDef, - PostV1Incidents -> = z.object({ - name: z.string(), - summary: z.string().optional(), - customerImpactSummary: z.string().optional(), - description: z.string().optional(), - priority: z.string().optional(), - severity: z.string().optional(), - severityConditionId: z.string().optional(), - severityImpactId: z.string().optional(), - alertIds: z.array(z.string()).optional(), - labels: z.lazy(() => PostV1IncidentsLabels$outboundSchema).optional(), - runbookIds: z.array(z.string()).optional(), - tagList: z.array(z.string()).optional(), - impacts: z.array(z.lazy(() => Impacts$outboundSchema)).optional(), - milestones: z.array(z.lazy(() => Milestones$outboundSchema)).optional(), - restricted: z.boolean().optional(), - teamIds: z.array(z.string()).optional(), - customFields: z.array(z.lazy(() => CustomFields$outboundSchema)).optional(), - externalLinks: z.string().optional(), - skipIncidentTypeValues: z.boolean().default(false), -}).transform((v) => { - return remap$(v, { - customerImpactSummary: "customer_impact_summary", - severityConditionId: "severity_condition_id", - severityImpactId: "severity_impact_id", - alertIds: "alert_ids", - runbookIds: "runbook_ids", - tagList: "tag_list", - teamIds: "team_ids", - customFields: "custom_fields", - externalLinks: "external_links", - skipIncidentTypeValues: "skip_incident_type_values", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Incidents$ { - /** @deprecated use `PostV1Incidents$inboundSchema` instead. */ - export const inboundSchema = PostV1Incidents$inboundSchema; - /** @deprecated use `PostV1Incidents$outboundSchema` instead. */ - export const outboundSchema = PostV1Incidents$outboundSchema; - /** @deprecated use `PostV1Incidents$Outbound` instead. */ - export type Outbound = PostV1Incidents$Outbound; -} - -export function postV1IncidentsToJSON( - postV1Incidents: PostV1Incidents, -): string { - return JSON.stringify(PostV1Incidents$outboundSchema.parse(postV1Incidents)); -} - -export function postV1IncidentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Incidents$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Incidents' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidgenericchatmessages.ts b/src/models/components/postv1incidentsincidentidgenericchatmessages.ts deleted file mode 100644 index 90e06916..00000000 --- a/src/models/components/postv1incidentsincidentidgenericchatmessages.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const VoteDirection = { - Up: "up", - Down: "down", -} as const; -export type VoteDirection = ClosedEnum; - -/** - * Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. - */ -export type PostV1IncidentsIncidentIdGenericChatMessages = { - body: string; - /** - * ISO8601 timestamp for when the chat message occurred - */ - occurredAt?: Date | undefined; - voteDirection?: VoteDirection | undefined; -}; - -/** @internal */ -export const VoteDirection$inboundSchema: z.ZodNativeEnum< - typeof VoteDirection -> = z.nativeEnum(VoteDirection); - -/** @internal */ -export const VoteDirection$outboundSchema: z.ZodNativeEnum< - typeof VoteDirection -> = VoteDirection$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VoteDirection$ { - /** @deprecated use `VoteDirection$inboundSchema` instead. */ - export const inboundSchema = VoteDirection$inboundSchema; - /** @deprecated use `VoteDirection$outboundSchema` instead. */ - export const outboundSchema = VoteDirection$outboundSchema; -} - -/** @internal */ -export const PostV1IncidentsIncidentIdGenericChatMessages$inboundSchema: - z.ZodType< - PostV1IncidentsIncidentIdGenericChatMessages, - z.ZodTypeDef, - unknown - > = z.object({ - body: z.string(), - occurred_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), - vote_direction: VoteDirection$inboundSchema.optional(), - }).transform((v) => { - return remap$(v, { - "occurred_at": "occurredAt", - "vote_direction": "voteDirection", - }); - }); - -/** @internal */ -export type PostV1IncidentsIncidentIdGenericChatMessages$Outbound = { - body: string; - occurred_at?: string | undefined; - vote_direction?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdGenericChatMessages$outboundSchema: - z.ZodType< - PostV1IncidentsIncidentIdGenericChatMessages$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdGenericChatMessages - > = z.object({ - body: z.string(), - occurredAt: z.date().transform(v => v.toISOString()).optional(), - voteDirection: VoteDirection$outboundSchema.optional(), - }).transform((v) => { - return remap$(v, { - occurredAt: "occurred_at", - voteDirection: "vote_direction", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdGenericChatMessages$ { - /** @deprecated use `PostV1IncidentsIncidentIdGenericChatMessages$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdGenericChatMessages$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdGenericChatMessages$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdGenericChatMessages$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdGenericChatMessages$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdGenericChatMessages$Outbound; -} - -export function postV1IncidentsIncidentIdGenericChatMessagesToJSON( - postV1IncidentsIncidentIdGenericChatMessages: - PostV1IncidentsIncidentIdGenericChatMessages, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdGenericChatMessages$outboundSchema.parse( - postV1IncidentsIncidentIdGenericChatMessages, - ), - ); -} - -export function postV1IncidentsIncidentIdGenericChatMessagesFromJSON( - jsonString: string, -): SafeParseResult< - PostV1IncidentsIncidentIdGenericChatMessages, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdGenericChatMessages$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1IncidentsIncidentIdGenericChatMessages' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidimpacttype.ts b/src/models/components/postv1incidentsincidentidimpacttype.ts deleted file mode 100644 index e6dc99c2..00000000 --- a/src/models/components/postv1incidentsincidentidimpacttype.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Add impacted infrastructure to an incident - */ -export type PostV1IncidentsIncidentIdImpactType = { - id: string; - conditionId?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdImpactType$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdImpactType, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - condition_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdImpactType$Outbound = { - id: string; - condition_id?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdImpactType$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdImpactType$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdImpactType -> = z.object({ - id: z.string(), - conditionId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdImpactType$ { - /** @deprecated use `PostV1IncidentsIncidentIdImpactType$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdImpactType$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdImpactType$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdImpactType$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdImpactType$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdImpactType$Outbound; -} - -export function postV1IncidentsIncidentIdImpactTypeToJSON( - postV1IncidentsIncidentIdImpactType: PostV1IncidentsIncidentIdImpactType, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdImpactType$outboundSchema.parse( - postV1IncidentsIncidentIdImpactType, - ), - ); -} - -export function postV1IncidentsIncidentIdImpactTypeFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdImpactType$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentsIncidentIdImpactType' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidlinks.ts b/src/models/components/postv1incidentsincidentidlinks.ts deleted file mode 100644 index e3ea098a..00000000 --- a/src/models/components/postv1incidentsincidentidlinks.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Allows adding adhoc links to an incident as an attachment - */ -export type PostV1IncidentsIncidentIdLinks = { - displayText?: string | undefined; - iconUrl?: string | undefined; - href: string; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdLinks$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdLinks, - z.ZodTypeDef, - unknown -> = z.object({ - display_text: z.string().optional(), - icon_url: z.string().optional(), - href: z.string(), -}).transform((v) => { - return remap$(v, { - "display_text": "displayText", - "icon_url": "iconUrl", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdLinks$Outbound = { - display_text?: string | undefined; - icon_url?: string | undefined; - href: string; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdLinks$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdLinks$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdLinks -> = z.object({ - displayText: z.string().optional(), - iconUrl: z.string().optional(), - href: z.string(), -}).transform((v) => { - return remap$(v, { - displayText: "display_text", - iconUrl: "icon_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdLinks$ { - /** @deprecated use `PostV1IncidentsIncidentIdLinks$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentsIncidentIdLinks$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdLinks$outboundSchema` instead. */ - export const outboundSchema = PostV1IncidentsIncidentIdLinks$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdLinks$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdLinks$Outbound; -} - -export function postV1IncidentsIncidentIdLinksToJSON( - postV1IncidentsIncidentIdLinks: PostV1IncidentsIncidentIdLinks, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdLinks$outboundSchema.parse( - postV1IncidentsIncidentIdLinks, - ), - ); -} - -export function postV1IncidentsIncidentIdLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1IncidentsIncidentIdLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentsIncidentIdLinks' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidnotes.ts b/src/models/components/postv1incidentsincidentidnotes.ts deleted file mode 100644 index 7f1926d3..00000000 --- a/src/models/components/postv1incidentsincidentidnotes.ts +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PostV1IncidentsIncidentIdNotesVisibility = { - PrivateToOrg: "private_to_org", - OpenToPublic: "open_to_public", - InternalStatusPage: "internal_status_page", -} as const; -export type PostV1IncidentsIncidentIdNotesVisibility = ClosedEnum< - typeof PostV1IncidentsIncidentIdNotesVisibility ->; - -export type PostV1IncidentsIncidentIdNotesStatusPages = { - id: string; - integrationSlug: string; -}; - -/** - * Create a new note on for an incident. The visibility field on a note determines where it gets posted. - */ -export type PostV1IncidentsIncidentIdNotes = { - body: string; - /** - * ISO8601 timestamp for when the note occurred - */ - occurredAt?: Date | undefined; - visibility?: PostV1IncidentsIncidentIdNotesVisibility | undefined; - statusPages?: Array | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdNotesVisibility$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PostV1IncidentsIncidentIdNotesVisibility); - -/** @internal */ -export const PostV1IncidentsIncidentIdNotesVisibility$outboundSchema: - z.ZodNativeEnum = - PostV1IncidentsIncidentIdNotesVisibility$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdNotesVisibility$ { - /** @deprecated use `PostV1IncidentsIncidentIdNotesVisibility$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdNotesVisibility$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdNotesVisibility$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdNotesVisibility$outboundSchema; -} - -/** @internal */ -export const PostV1IncidentsIncidentIdNotesStatusPages$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdNotesStatusPages, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - integration_slug: z.string(), -}).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdNotesStatusPages$Outbound = { - id: string; - integration_slug: string; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdNotesStatusPages$outboundSchema: - z.ZodType< - PostV1IncidentsIncidentIdNotesStatusPages$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdNotesStatusPages - > = z.object({ - id: z.string(), - integrationSlug: z.string(), - }).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdNotesStatusPages$ { - /** @deprecated use `PostV1IncidentsIncidentIdNotesStatusPages$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdNotesStatusPages$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdNotesStatusPages$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdNotesStatusPages$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdNotesStatusPages$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdNotesStatusPages$Outbound; -} - -export function postV1IncidentsIncidentIdNotesStatusPagesToJSON( - postV1IncidentsIncidentIdNotesStatusPages: - PostV1IncidentsIncidentIdNotesStatusPages, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdNotesStatusPages$outboundSchema.parse( - postV1IncidentsIncidentIdNotesStatusPages, - ), - ); -} - -export function postV1IncidentsIncidentIdNotesStatusPagesFromJSON( - jsonString: string, -): SafeParseResult< - PostV1IncidentsIncidentIdNotesStatusPages, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdNotesStatusPages$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1IncidentsIncidentIdNotesStatusPages' from JSON`, - ); -} - -/** @internal */ -export const PostV1IncidentsIncidentIdNotes$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdNotes, - z.ZodTypeDef, - unknown -> = z.object({ - body: z.string(), - occurred_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - visibility: PostV1IncidentsIncidentIdNotesVisibility$inboundSchema.default( - "private_to_org", - ), - status_pages: z.array( - z.lazy(() => PostV1IncidentsIncidentIdNotesStatusPages$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "occurred_at": "occurredAt", - "status_pages": "statusPages", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdNotes$Outbound = { - body: string; - occurred_at?: string | undefined; - visibility: string; - status_pages?: - | Array - | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdNotes$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdNotes$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdNotes -> = z.object({ - body: z.string(), - occurredAt: z.date().transform(v => v.toISOString()).optional(), - visibility: PostV1IncidentsIncidentIdNotesVisibility$outboundSchema.default( - "private_to_org", - ), - statusPages: z.array( - z.lazy(() => PostV1IncidentsIncidentIdNotesStatusPages$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - occurredAt: "occurred_at", - statusPages: "status_pages", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdNotes$ { - /** @deprecated use `PostV1IncidentsIncidentIdNotes$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentsIncidentIdNotes$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdNotes$outboundSchema` instead. */ - export const outboundSchema = PostV1IncidentsIncidentIdNotes$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdNotes$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdNotes$Outbound; -} - -export function postV1IncidentsIncidentIdNotesToJSON( - postV1IncidentsIncidentIdNotes: PostV1IncidentsIncidentIdNotes, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdNotes$outboundSchema.parse( - postV1IncidentsIncidentIdNotes, - ), - ); -} - -export function postV1IncidentsIncidentIdNotesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1IncidentsIncidentIdNotes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentsIncidentIdNotes' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidrelatedchangeevents.ts b/src/models/components/postv1incidentsincidentidrelatedchangeevents.ts deleted file mode 100644 index c84547ed..00000000 --- a/src/models/components/postv1incidentsincidentidrelatedchangeevents.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PostV1IncidentsIncidentIdRelatedChangeEventsType = { - Caused: "caused", - Fixed: "fixed", - Suspect: "suspect", - Dismissed: "dismissed", -} as const; -export type PostV1IncidentsIncidentIdRelatedChangeEventsType = ClosedEnum< - typeof PostV1IncidentsIncidentIdRelatedChangeEventsType ->; - -/** - * Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. - */ -export type PostV1IncidentsIncidentIdRelatedChangeEvents = { - /** - * The ID of the change event to associate - */ - changeEventId: string; - type: PostV1IncidentsIncidentIdRelatedChangeEventsType; - /** - * A short description about why this change event is related - */ - why?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdRelatedChangeEventsType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PostV1IncidentsIncidentIdRelatedChangeEventsType); - -/** @internal */ -export const PostV1IncidentsIncidentIdRelatedChangeEventsType$outboundSchema: - z.ZodNativeEnum = - PostV1IncidentsIncidentIdRelatedChangeEventsType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdRelatedChangeEventsType$ { - /** @deprecated use `PostV1IncidentsIncidentIdRelatedChangeEventsType$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdRelatedChangeEventsType$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdRelatedChangeEventsType$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdRelatedChangeEventsType$outboundSchema; -} - -/** @internal */ -export const PostV1IncidentsIncidentIdRelatedChangeEvents$inboundSchema: - z.ZodType< - PostV1IncidentsIncidentIdRelatedChangeEvents, - z.ZodTypeDef, - unknown - > = z.object({ - change_event_id: z.string(), - type: PostV1IncidentsIncidentIdRelatedChangeEventsType$inboundSchema, - why: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "change_event_id": "changeEventId", - }); - }); - -/** @internal */ -export type PostV1IncidentsIncidentIdRelatedChangeEvents$Outbound = { - change_event_id: string; - type: string; - why?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdRelatedChangeEvents$outboundSchema: - z.ZodType< - PostV1IncidentsIncidentIdRelatedChangeEvents$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdRelatedChangeEvents - > = z.object({ - changeEventId: z.string(), - type: PostV1IncidentsIncidentIdRelatedChangeEventsType$outboundSchema, - why: z.string().optional(), - }).transform((v) => { - return remap$(v, { - changeEventId: "change_event_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdRelatedChangeEvents$ { - /** @deprecated use `PostV1IncidentsIncidentIdRelatedChangeEvents$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdRelatedChangeEvents$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdRelatedChangeEvents$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdRelatedChangeEvents$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdRelatedChangeEvents$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdRelatedChangeEvents$Outbound; -} - -export function postV1IncidentsIncidentIdRelatedChangeEventsToJSON( - postV1IncidentsIncidentIdRelatedChangeEvents: - PostV1IncidentsIncidentIdRelatedChangeEvents, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdRelatedChangeEvents$outboundSchema.parse( - postV1IncidentsIncidentIdRelatedChangeEvents, - ), - ); -} - -export function postV1IncidentsIncidentIdRelatedChangeEventsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1IncidentsIncidentIdRelatedChangeEvents, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdRelatedChangeEvents$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1IncidentsIncidentIdRelatedChangeEvents' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidroleassignments.ts b/src/models/components/postv1incidentsincidentidroleassignments.ts deleted file mode 100644 index c93bf98f..00000000 --- a/src/models/components/postv1incidentsincidentidroleassignments.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Assign a role to a user for this incident - */ -export type PostV1IncidentsIncidentIdRoleAssignments = { - /** - * The user ID to assign the role to - */ - userId: string; - /** - * The Incident Role ID to assign the role to - */ - incidentRoleId: string; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdRoleAssignments$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdRoleAssignments, - z.ZodTypeDef, - unknown -> = z.object({ - user_id: z.string(), - incident_role_id: z.string(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - "incident_role_id": "incidentRoleId", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdRoleAssignments$Outbound = { - user_id: string; - incident_role_id: string; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdRoleAssignments$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdRoleAssignments$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdRoleAssignments -> = z.object({ - userId: z.string(), - incidentRoleId: z.string(), -}).transform((v) => { - return remap$(v, { - userId: "user_id", - incidentRoleId: "incident_role_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdRoleAssignments$ { - /** @deprecated use `PostV1IncidentsIncidentIdRoleAssignments$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdRoleAssignments$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdRoleAssignments$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdRoleAssignments$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdRoleAssignments$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdRoleAssignments$Outbound; -} - -export function postV1IncidentsIncidentIdRoleAssignmentsToJSON( - postV1IncidentsIncidentIdRoleAssignments: - PostV1IncidentsIncidentIdRoleAssignments, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdRoleAssignments$outboundSchema.parse( - postV1IncidentsIncidentIdRoleAssignments, - ), - ); -} - -export function postV1IncidentsIncidentIdRoleAssignmentsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1IncidentsIncidentIdRoleAssignments, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdRoleAssignments$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1IncidentsIncidentIdRoleAssignments' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidstatuspages.ts b/src/models/components/postv1incidentsincidentidstatuspages.ts deleted file mode 100644 index 5ba86f9a..00000000 --- a/src/models/components/postv1incidentsincidentidstatuspages.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Add a status page to an incident. - */ -export type PostV1IncidentsIncidentIdStatusPages = { - integrationSlug: string; - integrationId: string; - title?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdStatusPages$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdStatusPages, - z.ZodTypeDef, - unknown -> = z.object({ - integration_slug: z.string(), - integration_id: z.string(), - title: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - "integration_id": "integrationId", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdStatusPages$Outbound = { - integration_slug: string; - integration_id: string; - title?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdStatusPages$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdStatusPages$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdStatusPages -> = z.object({ - integrationSlug: z.string(), - integrationId: z.string(), - title: z.string().optional(), -}).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - integrationId: "integration_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdStatusPages$ { - /** @deprecated use `PostV1IncidentsIncidentIdStatusPages$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdStatusPages$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdStatusPages$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdStatusPages$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdStatusPages$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdStatusPages$Outbound; -} - -export function postV1IncidentsIncidentIdStatusPagesToJSON( - postV1IncidentsIncidentIdStatusPages: PostV1IncidentsIncidentIdStatusPages, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdStatusPages$outboundSchema.parse( - postV1IncidentsIncidentIdStatusPages, - ), - ); -} - -export function postV1IncidentsIncidentIdStatusPagesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdStatusPages$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentsIncidentIdStatusPages' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidtasklists.ts b/src/models/components/postv1incidentsincidentidtasklists.ts deleted file mode 100644 index a5eab377..00000000 --- a/src/models/components/postv1incidentsincidentidtasklists.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Add all tasks from list to incident - */ -export type PostV1IncidentsIncidentIdTaskLists = { - /** - * The id of the task list. - */ - taskListId: string; - /** - * The ID of the user assigned to the tasks in this list. - */ - assigneeId?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTaskLists$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdTaskLists, - z.ZodTypeDef, - unknown -> = z.object({ - task_list_id: z.string(), - assignee_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "task_list_id": "taskListId", - "assignee_id": "assigneeId", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdTaskLists$Outbound = { - task_list_id: string; - assignee_id?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTaskLists$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdTaskLists$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdTaskLists -> = z.object({ - taskListId: z.string(), - assigneeId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - taskListId: "task_list_id", - assigneeId: "assignee_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdTaskLists$ { - /** @deprecated use `PostV1IncidentsIncidentIdTaskLists$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentsIncidentIdTaskLists$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTaskLists$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdTaskLists$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTaskLists$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdTaskLists$Outbound; -} - -export function postV1IncidentsIncidentIdTaskListsToJSON( - postV1IncidentsIncidentIdTaskLists: PostV1IncidentsIncidentIdTaskLists, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdTaskLists$outboundSchema.parse( - postV1IncidentsIncidentIdTaskLists, - ), - ); -} - -export function postV1IncidentsIncidentIdTaskListsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdTaskLists$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentsIncidentIdTaskLists' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidtasks.ts b/src/models/components/postv1incidentsincidentidtasks.ts deleted file mode 100644 index cdf64129..00000000 --- a/src/models/components/postv1incidentsincidentidtasks.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a task - */ -export type PostV1IncidentsIncidentIdTasks = { - /** - * The title of the task. - */ - title: string; - /** - * The state of the task. One of: open, in_progress, cancelled, done - */ - state?: string | undefined; - /** - * A description of what the task is for. - */ - description?: string | undefined; - /** - * The ID of the user assigned to the task. - */ - assigneeId?: string | undefined; - /** - * The due date of the task. Relative values are supported such as '5m' - */ - dueAt?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTasks$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdTasks, - z.ZodTypeDef, - unknown -> = z.object({ - title: z.string(), - state: z.string().optional(), - description: z.string().optional(), - assignee_id: z.string().optional(), - due_at: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "assignee_id": "assigneeId", - "due_at": "dueAt", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdTasks$Outbound = { - title: string; - state?: string | undefined; - description?: string | undefined; - assignee_id?: string | undefined; - due_at?: string | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTasks$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdTasks$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdTasks -> = z.object({ - title: z.string(), - state: z.string().optional(), - description: z.string().optional(), - assigneeId: z.string().optional(), - dueAt: z.string().optional(), -}).transform((v) => { - return remap$(v, { - assigneeId: "assignee_id", - dueAt: "due_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdTasks$ { - /** @deprecated use `PostV1IncidentsIncidentIdTasks$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentsIncidentIdTasks$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTasks$outboundSchema` instead. */ - export const outboundSchema = PostV1IncidentsIncidentIdTasks$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTasks$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdTasks$Outbound; -} - -export function postV1IncidentsIncidentIdTasksToJSON( - postV1IncidentsIncidentIdTasks: PostV1IncidentsIncidentIdTasks, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdTasks$outboundSchema.parse( - postV1IncidentsIncidentIdTasks, - ), - ); -} - -export function postV1IncidentsIncidentIdTasksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1IncidentsIncidentIdTasks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentsIncidentIdTasks' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidtaskstaskidconvert.ts b/src/models/components/postv1incidentsincidentidtaskstaskidconvert.ts deleted file mode 100644 index 64c18824..00000000 --- a/src/models/components/postv1incidentsincidentidtaskstaskidconvert.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Convert a task to a follow-up - */ -export type PostV1IncidentsIncidentIdTasksTaskIdConvert = { - summary?: string | undefined; - projectId?: string | undefined; - description?: string | undefined; - state?: string | undefined; - /** - * List of tags for the ticket - */ - tagList?: Array | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTasksTaskIdConvert$inboundSchema: - z.ZodType< - PostV1IncidentsIncidentIdTasksTaskIdConvert, - z.ZodTypeDef, - unknown - > = z.object({ - summary: z.string().optional(), - project_id: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - tag_list: z.array(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - "project_id": "projectId", - "tag_list": "tagList", - }); - }); - -/** @internal */ -export type PostV1IncidentsIncidentIdTasksTaskIdConvert$Outbound = { - summary?: string | undefined; - project_id?: string | undefined; - description?: string | undefined; - state?: string | undefined; - tag_list?: Array | undefined; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTasksTaskIdConvert$outboundSchema: - z.ZodType< - PostV1IncidentsIncidentIdTasksTaskIdConvert$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdTasksTaskIdConvert - > = z.object({ - summary: z.string().optional(), - projectId: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - tagList: z.array(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - projectId: "project_id", - tagList: "tag_list", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdTasksTaskIdConvert$ { - /** @deprecated use `PostV1IncidentsIncidentIdTasksTaskIdConvert$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdTasksTaskIdConvert$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTasksTaskIdConvert$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdTasksTaskIdConvert$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTasksTaskIdConvert$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdTasksTaskIdConvert$Outbound; -} - -export function postV1IncidentsIncidentIdTasksTaskIdConvertToJSON( - postV1IncidentsIncidentIdTasksTaskIdConvert: - PostV1IncidentsIncidentIdTasksTaskIdConvert, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdTasksTaskIdConvert$outboundSchema.parse( - postV1IncidentsIncidentIdTasksTaskIdConvert, - ), - ); -} - -export function postV1IncidentsIncidentIdTasksTaskIdConvertFromJSON( - jsonString: string, -): SafeParseResult< - PostV1IncidentsIncidentIdTasksTaskIdConvert, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdTasksTaskIdConvert$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1IncidentsIncidentIdTasksTaskIdConvert' from JSON`, - ); -} diff --git a/src/models/components/postv1incidentsincidentidteamassignments.ts b/src/models/components/postv1incidentsincidentidteamassignments.ts deleted file mode 100644 index 2b94fe2a..00000000 --- a/src/models/components/postv1incidentsincidentidteamassignments.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Assign a team for this incident - */ -export type PostV1IncidentsIncidentIdTeamAssignments = { - /** - * The team ID to associate to the incident - */ - teamId: string; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTeamAssignments$inboundSchema: z.ZodType< - PostV1IncidentsIncidentIdTeamAssignments, - z.ZodTypeDef, - unknown -> = z.object({ - team_id: z.string(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - }); -}); - -/** @internal */ -export type PostV1IncidentsIncidentIdTeamAssignments$Outbound = { - team_id: string; -}; - -/** @internal */ -export const PostV1IncidentsIncidentIdTeamAssignments$outboundSchema: z.ZodType< - PostV1IncidentsIncidentIdTeamAssignments$Outbound, - z.ZodTypeDef, - PostV1IncidentsIncidentIdTeamAssignments -> = z.object({ - teamId: z.string(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentsIncidentIdTeamAssignments$ { - /** @deprecated use `PostV1IncidentsIncidentIdTeamAssignments$inboundSchema` instead. */ - export const inboundSchema = - PostV1IncidentsIncidentIdTeamAssignments$inboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTeamAssignments$outboundSchema` instead. */ - export const outboundSchema = - PostV1IncidentsIncidentIdTeamAssignments$outboundSchema; - /** @deprecated use `PostV1IncidentsIncidentIdTeamAssignments$Outbound` instead. */ - export type Outbound = PostV1IncidentsIncidentIdTeamAssignments$Outbound; -} - -export function postV1IncidentsIncidentIdTeamAssignmentsToJSON( - postV1IncidentsIncidentIdTeamAssignments: - PostV1IncidentsIncidentIdTeamAssignments, -): string { - return JSON.stringify( - PostV1IncidentsIncidentIdTeamAssignments$outboundSchema.parse( - postV1IncidentsIncidentIdTeamAssignments, - ), - ); -} - -export function postV1IncidentsIncidentIdTeamAssignmentsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1IncidentsIncidentIdTeamAssignments, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1IncidentsIncidentIdTeamAssignments$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1IncidentsIncidentIdTeamAssignments' from JSON`, - ); -} diff --git a/src/models/components/postv1incidenttypes.ts b/src/models/components/postv1incidenttypes.ts deleted file mode 100644 index 88652d94..00000000 --- a/src/models/components/postv1incidenttypes.ts +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PostV1IncidentTypesImpacts = { - /** - * The id of impact - */ - id: string; - /** - * The id of the condition - */ - conditionId: string; -}; - -export type Template = { - description?: string | undefined; - customerImpactSummary?: string | undefined; - /** - * A labels hash of keys and values - */ - labels?: { [k: string]: string } | undefined; - severity?: string | undefined; - priority?: string | undefined; - /** - * List of tags for the incident - */ - tagList?: Array | undefined; - /** - * List of ids of Runbooks to attach to incidents created from this type - */ - runbookIds?: Array | undefined; - privateIncident?: boolean | undefined; - /** - * List of ids of teams to be assigned to incidents - */ - teamIds?: Array | undefined; - /** - * An array of impact/condition combinations - */ - impacts?: Array | undefined; -}; - -/** - * Create a new incident type - */ -export type PostV1IncidentTypes = { - name: string; - template: Template; -}; - -/** @internal */ -export const PostV1IncidentTypesImpacts$inboundSchema: z.ZodType< - PostV1IncidentTypesImpacts, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - condition_id: z.string(), -}).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); -}); - -/** @internal */ -export type PostV1IncidentTypesImpacts$Outbound = { - id: string; - condition_id: string; -}; - -/** @internal */ -export const PostV1IncidentTypesImpacts$outboundSchema: z.ZodType< - PostV1IncidentTypesImpacts$Outbound, - z.ZodTypeDef, - PostV1IncidentTypesImpacts -> = z.object({ - id: z.string(), - conditionId: z.string(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentTypesImpacts$ { - /** @deprecated use `PostV1IncidentTypesImpacts$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentTypesImpacts$inboundSchema; - /** @deprecated use `PostV1IncidentTypesImpacts$outboundSchema` instead. */ - export const outboundSchema = PostV1IncidentTypesImpacts$outboundSchema; - /** @deprecated use `PostV1IncidentTypesImpacts$Outbound` instead. */ - export type Outbound = PostV1IncidentTypesImpacts$Outbound; -} - -export function postV1IncidentTypesImpactsToJSON( - postV1IncidentTypesImpacts: PostV1IncidentTypesImpacts, -): string { - return JSON.stringify( - PostV1IncidentTypesImpacts$outboundSchema.parse(postV1IncidentTypesImpacts), - ); -} - -export function postV1IncidentTypesImpactsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1IncidentTypesImpacts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentTypesImpacts' from JSON`, - ); -} - -/** @internal */ -export const Template$inboundSchema: z.ZodType< - Template, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.string().optional(), - customer_impact_summary: z.string().optional(), - labels: z.record(z.string()).optional(), - severity: z.string().optional(), - priority: z.string().optional(), - tag_list: z.array(z.string()).optional(), - runbook_ids: z.array(z.string()).optional(), - private_incident: z.boolean().optional(), - team_ids: z.array(z.string()).optional(), - impacts: z.array(z.lazy(() => PostV1IncidentTypesImpacts$inboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - "customer_impact_summary": "customerImpactSummary", - "tag_list": "tagList", - "runbook_ids": "runbookIds", - "private_incident": "privateIncident", - "team_ids": "teamIds", - }); -}); - -/** @internal */ -export type Template$Outbound = { - description?: string | undefined; - customer_impact_summary?: string | undefined; - labels?: { [k: string]: string } | undefined; - severity?: string | undefined; - priority?: string | undefined; - tag_list?: Array | undefined; - runbook_ids?: Array | undefined; - private_incident?: boolean | undefined; - team_ids?: Array | undefined; - impacts?: Array | undefined; -}; - -/** @internal */ -export const Template$outboundSchema: z.ZodType< - Template$Outbound, - z.ZodTypeDef, - Template -> = z.object({ - description: z.string().optional(), - customerImpactSummary: z.string().optional(), - labels: z.record(z.string()).optional(), - severity: z.string().optional(), - priority: z.string().optional(), - tagList: z.array(z.string()).optional(), - runbookIds: z.array(z.string()).optional(), - privateIncident: z.boolean().optional(), - teamIds: z.array(z.string()).optional(), - impacts: z.array(z.lazy(() => PostV1IncidentTypesImpacts$outboundSchema)) - .optional(), -}).transform((v) => { - return remap$(v, { - customerImpactSummary: "customer_impact_summary", - tagList: "tag_list", - runbookIds: "runbook_ids", - privateIncident: "private_incident", - teamIds: "team_ids", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Template$ { - /** @deprecated use `Template$inboundSchema` instead. */ - export const inboundSchema = Template$inboundSchema; - /** @deprecated use `Template$outboundSchema` instead. */ - export const outboundSchema = Template$outboundSchema; - /** @deprecated use `Template$Outbound` instead. */ - export type Outbound = Template$Outbound; -} - -export function templateToJSON(template: Template): string { - return JSON.stringify(Template$outboundSchema.parse(template)); -} - -export function templateFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Template$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Template' from JSON`, - ); -} - -/** @internal */ -export const PostV1IncidentTypes$inboundSchema: z.ZodType< - PostV1IncidentTypes, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - template: z.lazy(() => Template$inboundSchema), -}); - -/** @internal */ -export type PostV1IncidentTypes$Outbound = { - name: string; - template: Template$Outbound; -}; - -/** @internal */ -export const PostV1IncidentTypes$outboundSchema: z.ZodType< - PostV1IncidentTypes$Outbound, - z.ZodTypeDef, - PostV1IncidentTypes -> = z.object({ - name: z.string(), - template: z.lazy(() => Template$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1IncidentTypes$ { - /** @deprecated use `PostV1IncidentTypes$inboundSchema` instead. */ - export const inboundSchema = PostV1IncidentTypes$inboundSchema; - /** @deprecated use `PostV1IncidentTypes$outboundSchema` instead. */ - export const outboundSchema = PostV1IncidentTypes$outboundSchema; - /** @deprecated use `PostV1IncidentTypes$Outbound` instead. */ - export type Outbound = PostV1IncidentTypes$Outbound; -} - -export function postV1IncidentTypesToJSON( - postV1IncidentTypes: PostV1IncidentTypes, -): string { - return JSON.stringify( - PostV1IncidentTypes$outboundSchema.parse(postV1IncidentTypes), - ); -} - -export function postV1IncidentTypesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1IncidentTypes$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1IncidentTypes' from JSON`, - ); -} diff --git a/src/models/components/postv1nuncsubscriptions.ts b/src/models/components/postv1nuncsubscriptions.ts deleted file mode 100644 index 2cef54fd..00000000 --- a/src/models/components/postv1nuncsubscriptions.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Subscribe to status page updates - */ -export type PostV1NuncSubscriptions = { - email: string; -}; - -/** @internal */ -export const PostV1NuncSubscriptions$inboundSchema: z.ZodType< - PostV1NuncSubscriptions, - z.ZodTypeDef, - unknown -> = z.object({ - email: z.string(), -}); - -/** @internal */ -export type PostV1NuncSubscriptions$Outbound = { - email: string; -}; - -/** @internal */ -export const PostV1NuncSubscriptions$outboundSchema: z.ZodType< - PostV1NuncSubscriptions$Outbound, - z.ZodTypeDef, - PostV1NuncSubscriptions -> = z.object({ - email: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1NuncSubscriptions$ { - /** @deprecated use `PostV1NuncSubscriptions$inboundSchema` instead. */ - export const inboundSchema = PostV1NuncSubscriptions$inboundSchema; - /** @deprecated use `PostV1NuncSubscriptions$outboundSchema` instead. */ - export const outboundSchema = PostV1NuncSubscriptions$outboundSchema; - /** @deprecated use `PostV1NuncSubscriptions$Outbound` instead. */ - export type Outbound = PostV1NuncSubscriptions$Outbound; -} - -export function postV1NuncSubscriptionsToJSON( - postV1NuncSubscriptions: PostV1NuncSubscriptions, -): string { - return JSON.stringify( - PostV1NuncSubscriptions$outboundSchema.parse(postV1NuncSubscriptions), - ); -} - -export function postV1NuncSubscriptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1NuncSubscriptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1NuncSubscriptions' from JSON`, - ); -} diff --git a/src/models/components/postv1postmortemsreports.ts b/src/models/components/postv1postmortemsreports.ts deleted file mode 100644 index 008dad2c..00000000 --- a/src/models/components/postv1postmortemsreports.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a report - */ -export type PostV1PostMortemsReports = { - incidentId: string; -}; - -/** @internal */ -export const PostV1PostMortemsReports$inboundSchema: z.ZodType< - PostV1PostMortemsReports, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type PostV1PostMortemsReports$Outbound = { - incident_id: string; -}; - -/** @internal */ -export const PostV1PostMortemsReports$outboundSchema: z.ZodType< - PostV1PostMortemsReports$Outbound, - z.ZodTypeDef, - PostV1PostMortemsReports -> = z.object({ - incidentId: z.string(), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1PostMortemsReports$ { - /** @deprecated use `PostV1PostMortemsReports$inboundSchema` instead. */ - export const inboundSchema = PostV1PostMortemsReports$inboundSchema; - /** @deprecated use `PostV1PostMortemsReports$outboundSchema` instead. */ - export const outboundSchema = PostV1PostMortemsReports$outboundSchema; - /** @deprecated use `PostV1PostMortemsReports$Outbound` instead. */ - export type Outbound = PostV1PostMortemsReports$Outbound; -} - -export function postV1PostMortemsReportsToJSON( - postV1PostMortemsReports: PostV1PostMortemsReports, -): string { - return JSON.stringify( - PostV1PostMortemsReports$outboundSchema.parse(postV1PostMortemsReports), - ); -} - -export function postV1PostMortemsReportsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1PostMortemsReports$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1PostMortemsReports' from JSON`, - ); -} diff --git a/src/models/components/postv1postmortemsreportsreportidpublish.ts b/src/models/components/postv1postmortemsreportsreportidpublish.ts deleted file mode 100644 index fc93ea1f..00000000 --- a/src/models/components/postv1postmortemsreportsreportidpublish.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Marks an incident retrospective as published and emails all of the participants in the report the summary - */ -export type PostV1PostMortemsReportsReportIdPublish = { - /** - * An array of user IDs with whom to share the report - */ - userIds?: Array | undefined; - /** - * An array of team IDs with whom to share the report - */ - teamIds?: Array | undefined; -}; - -/** @internal */ -export const PostV1PostMortemsReportsReportIdPublish$inboundSchema: z.ZodType< - PostV1PostMortemsReportsReportIdPublish, - z.ZodTypeDef, - unknown -> = z.object({ - user_ids: z.array(z.string()).optional(), - team_ids: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "user_ids": "userIds", - "team_ids": "teamIds", - }); -}); - -/** @internal */ -export type PostV1PostMortemsReportsReportIdPublish$Outbound = { - user_ids?: Array | undefined; - team_ids?: Array | undefined; -}; - -/** @internal */ -export const PostV1PostMortemsReportsReportIdPublish$outboundSchema: z.ZodType< - PostV1PostMortemsReportsReportIdPublish$Outbound, - z.ZodTypeDef, - PostV1PostMortemsReportsReportIdPublish -> = z.object({ - userIds: z.array(z.string()).optional(), - teamIds: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - userIds: "user_ids", - teamIds: "team_ids", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1PostMortemsReportsReportIdPublish$ { - /** @deprecated use `PostV1PostMortemsReportsReportIdPublish$inboundSchema` instead. */ - export const inboundSchema = - PostV1PostMortemsReportsReportIdPublish$inboundSchema; - /** @deprecated use `PostV1PostMortemsReportsReportIdPublish$outboundSchema` instead. */ - export const outboundSchema = - PostV1PostMortemsReportsReportIdPublish$outboundSchema; - /** @deprecated use `PostV1PostMortemsReportsReportIdPublish$Outbound` instead. */ - export type Outbound = PostV1PostMortemsReportsReportIdPublish$Outbound; -} - -export function postV1PostMortemsReportsReportIdPublishToJSON( - postV1PostMortemsReportsReportIdPublish: - PostV1PostMortemsReportsReportIdPublish, -): string { - return JSON.stringify( - PostV1PostMortemsReportsReportIdPublish$outboundSchema.parse( - postV1PostMortemsReportsReportIdPublish, - ), - ); -} - -export function postV1PostMortemsReportsReportIdPublishFromJSON( - jsonString: string, -): SafeParseResult< - PostV1PostMortemsReportsReportIdPublish, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1PostMortemsReportsReportIdPublish$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1PostMortemsReportsReportIdPublish' from JSON`, - ); -} diff --git a/src/models/components/postv1postmortemsreportsreportidreasons.ts b/src/models/components/postv1postmortemsreportsreportidreasons.ts deleted file mode 100644 index 214a108e..00000000 --- a/src/models/components/postv1postmortemsreportsreportidreasons.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Add a new contributing factor to an incident - */ -export type PostV1PostMortemsReportsReportIdReasons = { - summary: string; -}; - -/** @internal */ -export const PostV1PostMortemsReportsReportIdReasons$inboundSchema: z.ZodType< - PostV1PostMortemsReportsReportIdReasons, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string(), -}); - -/** @internal */ -export type PostV1PostMortemsReportsReportIdReasons$Outbound = { - summary: string; -}; - -/** @internal */ -export const PostV1PostMortemsReportsReportIdReasons$outboundSchema: z.ZodType< - PostV1PostMortemsReportsReportIdReasons$Outbound, - z.ZodTypeDef, - PostV1PostMortemsReportsReportIdReasons -> = z.object({ - summary: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1PostMortemsReportsReportIdReasons$ { - /** @deprecated use `PostV1PostMortemsReportsReportIdReasons$inboundSchema` instead. */ - export const inboundSchema = - PostV1PostMortemsReportsReportIdReasons$inboundSchema; - /** @deprecated use `PostV1PostMortemsReportsReportIdReasons$outboundSchema` instead. */ - export const outboundSchema = - PostV1PostMortemsReportsReportIdReasons$outboundSchema; - /** @deprecated use `PostV1PostMortemsReportsReportIdReasons$Outbound` instead. */ - export type Outbound = PostV1PostMortemsReportsReportIdReasons$Outbound; -} - -export function postV1PostMortemsReportsReportIdReasonsToJSON( - postV1PostMortemsReportsReportIdReasons: - PostV1PostMortemsReportsReportIdReasons, -): string { - return JSON.stringify( - PostV1PostMortemsReportsReportIdReasons$outboundSchema.parse( - postV1PostMortemsReportsReportIdReasons, - ), - ); -} - -export function postV1PostMortemsReportsReportIdReasonsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1PostMortemsReportsReportIdReasons, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1PostMortemsReportsReportIdReasons$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1PostMortemsReportsReportIdReasons' from JSON`, - ); -} diff --git a/src/models/components/postv1priorities.ts b/src/models/components/postv1priorities.ts deleted file mode 100644 index f73be856..00000000 --- a/src/models/components/postv1priorities.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new priority - */ -export type PostV1Priorities = { - slug: string; - description?: string | undefined; - default?: boolean | undefined; -}; - -/** @internal */ -export const PostV1Priorities$inboundSchema: z.ZodType< - PostV1Priorities, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string(), - description: z.string().optional(), - default: z.boolean().optional(), -}); - -/** @internal */ -export type PostV1Priorities$Outbound = { - slug: string; - description?: string | undefined; - default?: boolean | undefined; -}; - -/** @internal */ -export const PostV1Priorities$outboundSchema: z.ZodType< - PostV1Priorities$Outbound, - z.ZodTypeDef, - PostV1Priorities -> = z.object({ - slug: z.string(), - description: z.string().optional(), - default: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Priorities$ { - /** @deprecated use `PostV1Priorities$inboundSchema` instead. */ - export const inboundSchema = PostV1Priorities$inboundSchema; - /** @deprecated use `PostV1Priorities$outboundSchema` instead. */ - export const outboundSchema = PostV1Priorities$outboundSchema; - /** @deprecated use `PostV1Priorities$Outbound` instead. */ - export type Outbound = PostV1Priorities$Outbound; -} - -export function postV1PrioritiesToJSON( - postV1Priorities: PostV1Priorities, -): string { - return JSON.stringify( - PostV1Priorities$outboundSchema.parse(postV1Priorities), - ); -} - -export function postV1PrioritiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Priorities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Priorities' from JSON`, - ); -} diff --git a/src/models/components/postv1runbooks.ts b/src/models/components/postv1runbooks.ts deleted file mode 100644 index 684f0aae..00000000 --- a/src/models/components/postv1runbooks.ts +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Deprecated, but still required. Please just use 'incident' - */ -export const PostV1RunbooksType = { - Incident: "incident", - General: "general", - Infrastructure: "infrastructure", - IncidentRole: "incident_role", -} as const; -/** - * Deprecated, but still required. Please just use 'incident' - */ -export type PostV1RunbooksType = ClosedEnum; - -/** - * An object representing a Team that owns the runbook - */ -export type PostV1RunbooksOwner = { - id: string; -}; - -export type AttachmentRule = { - /** - * The JSON logic for the attaching the runbook - */ - logic: string; - /** - * The user data for the rule - */ - userData?: string | undefined; -}; - -export type Rule = { - /** - * The JSON logic for the rule - */ - logic: string; - /** - * The user data for the rule - */ - userData?: string | undefined; -}; - -export type Steps = { - /** - * Name for step - */ - name: string; - /** - * ID of action to use for this step. - */ - actionId: string; - rule?: Rule | undefined; -}; - -/** - * Create a new runbook for use with incidents. - */ -export type PostV1Runbooks = { - name: string; - /** - * Deprecated, but still required. Please just use 'incident' - */ - type: PostV1RunbooksType; - /** - * Deprecated. Use description - */ - summary?: string | undefined; - /** - * A longer description about the Runbook. Supports markdown format - */ - description?: string | undefined; - /** - * Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. - */ - autoAttachToRestrictedIncidents?: boolean | undefined; - /** - * Whether or not this runbook is a tutorial runbook - */ - tutorial?: boolean | undefined; - /** - * An object representing a Team that owns the runbook - */ - owner?: PostV1RunbooksOwner | undefined; - attachmentRule?: AttachmentRule | undefined; - steps?: Array | undefined; -}; - -/** @internal */ -export const PostV1RunbooksType$inboundSchema: z.ZodNativeEnum< - typeof PostV1RunbooksType -> = z.nativeEnum(PostV1RunbooksType); - -/** @internal */ -export const PostV1RunbooksType$outboundSchema: z.ZodNativeEnum< - typeof PostV1RunbooksType -> = PostV1RunbooksType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1RunbooksType$ { - /** @deprecated use `PostV1RunbooksType$inboundSchema` instead. */ - export const inboundSchema = PostV1RunbooksType$inboundSchema; - /** @deprecated use `PostV1RunbooksType$outboundSchema` instead. */ - export const outboundSchema = PostV1RunbooksType$outboundSchema; -} - -/** @internal */ -export const PostV1RunbooksOwner$inboundSchema: z.ZodType< - PostV1RunbooksOwner, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type PostV1RunbooksOwner$Outbound = { - id: string; -}; - -/** @internal */ -export const PostV1RunbooksOwner$outboundSchema: z.ZodType< - PostV1RunbooksOwner$Outbound, - z.ZodTypeDef, - PostV1RunbooksOwner -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1RunbooksOwner$ { - /** @deprecated use `PostV1RunbooksOwner$inboundSchema` instead. */ - export const inboundSchema = PostV1RunbooksOwner$inboundSchema; - /** @deprecated use `PostV1RunbooksOwner$outboundSchema` instead. */ - export const outboundSchema = PostV1RunbooksOwner$outboundSchema; - /** @deprecated use `PostV1RunbooksOwner$Outbound` instead. */ - export type Outbound = PostV1RunbooksOwner$Outbound; -} - -export function postV1RunbooksOwnerToJSON( - postV1RunbooksOwner: PostV1RunbooksOwner, -): string { - return JSON.stringify( - PostV1RunbooksOwner$outboundSchema.parse(postV1RunbooksOwner), - ); -} - -export function postV1RunbooksOwnerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1RunbooksOwner$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1RunbooksOwner' from JSON`, - ); -} - -/** @internal */ -export const AttachmentRule$inboundSchema: z.ZodType< - AttachmentRule, - z.ZodTypeDef, - unknown -> = z.object({ - logic: z.string(), - user_data: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "user_data": "userData", - }); -}); - -/** @internal */ -export type AttachmentRule$Outbound = { - logic: string; - user_data?: string | undefined; -}; - -/** @internal */ -export const AttachmentRule$outboundSchema: z.ZodType< - AttachmentRule$Outbound, - z.ZodTypeDef, - AttachmentRule -> = z.object({ - logic: z.string(), - userData: z.string().optional(), -}).transform((v) => { - return remap$(v, { - userData: "user_data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AttachmentRule$ { - /** @deprecated use `AttachmentRule$inboundSchema` instead. */ - export const inboundSchema = AttachmentRule$inboundSchema; - /** @deprecated use `AttachmentRule$outboundSchema` instead. */ - export const outboundSchema = AttachmentRule$outboundSchema; - /** @deprecated use `AttachmentRule$Outbound` instead. */ - export type Outbound = AttachmentRule$Outbound; -} - -export function attachmentRuleToJSON(attachmentRule: AttachmentRule): string { - return JSON.stringify(AttachmentRule$outboundSchema.parse(attachmentRule)); -} - -export function attachmentRuleFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AttachmentRule$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AttachmentRule' from JSON`, - ); -} - -/** @internal */ -export const Rule$inboundSchema: z.ZodType = z - .object({ - logic: z.string(), - user_data: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "user_data": "userData", - }); - }); - -/** @internal */ -export type Rule$Outbound = { - logic: string; - user_data?: string | undefined; -}; - -/** @internal */ -export const Rule$outboundSchema: z.ZodType = - z.object({ - logic: z.string(), - userData: z.string().optional(), - }).transform((v) => { - return remap$(v, { - userData: "user_data", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Rule$ { - /** @deprecated use `Rule$inboundSchema` instead. */ - export const inboundSchema = Rule$inboundSchema; - /** @deprecated use `Rule$outboundSchema` instead. */ - export const outboundSchema = Rule$outboundSchema; - /** @deprecated use `Rule$Outbound` instead. */ - export type Outbound = Rule$Outbound; -} - -export function ruleToJSON(rule: Rule): string { - return JSON.stringify(Rule$outboundSchema.parse(rule)); -} - -export function ruleFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Rule$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Rule' from JSON`, - ); -} - -/** @internal */ -export const Steps$inboundSchema: z.ZodType = z - .object({ - name: z.string(), - action_id: z.string(), - rule: z.lazy(() => Rule$inboundSchema).optional(), - }).transform((v) => { - return remap$(v, { - "action_id": "actionId", - }); - }); - -/** @internal */ -export type Steps$Outbound = { - name: string; - action_id: string; - rule?: Rule$Outbound | undefined; -}; - -/** @internal */ -export const Steps$outboundSchema: z.ZodType< - Steps$Outbound, - z.ZodTypeDef, - Steps -> = z.object({ - name: z.string(), - actionId: z.string(), - rule: z.lazy(() => Rule$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - actionId: "action_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Steps$ { - /** @deprecated use `Steps$inboundSchema` instead. */ - export const inboundSchema = Steps$inboundSchema; - /** @deprecated use `Steps$outboundSchema` instead. */ - export const outboundSchema = Steps$outboundSchema; - /** @deprecated use `Steps$Outbound` instead. */ - export type Outbound = Steps$Outbound; -} - -export function stepsToJSON(steps: Steps): string { - return JSON.stringify(Steps$outboundSchema.parse(steps)); -} - -export function stepsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Steps$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Steps' from JSON`, - ); -} - -/** @internal */ -export const PostV1Runbooks$inboundSchema: z.ZodType< - PostV1Runbooks, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - type: PostV1RunbooksType$inboundSchema, - summary: z.string().optional(), - description: z.string().optional(), - auto_attach_to_restricted_incidents: z.boolean().optional(), - tutorial: z.boolean().optional(), - owner: z.lazy(() => PostV1RunbooksOwner$inboundSchema).optional(), - attachment_rule: z.lazy(() => AttachmentRule$inboundSchema).optional(), - steps: z.array(z.lazy(() => Steps$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "auto_attach_to_restricted_incidents": "autoAttachToRestrictedIncidents", - "attachment_rule": "attachmentRule", - }); -}); - -/** @internal */ -export type PostV1Runbooks$Outbound = { - name: string; - type: string; - summary?: string | undefined; - description?: string | undefined; - auto_attach_to_restricted_incidents?: boolean | undefined; - tutorial?: boolean | undefined; - owner?: PostV1RunbooksOwner$Outbound | undefined; - attachment_rule?: AttachmentRule$Outbound | undefined; - steps?: Array | undefined; -}; - -/** @internal */ -export const PostV1Runbooks$outboundSchema: z.ZodType< - PostV1Runbooks$Outbound, - z.ZodTypeDef, - PostV1Runbooks -> = z.object({ - name: z.string(), - type: PostV1RunbooksType$outboundSchema, - summary: z.string().optional(), - description: z.string().optional(), - autoAttachToRestrictedIncidents: z.boolean().optional(), - tutorial: z.boolean().optional(), - owner: z.lazy(() => PostV1RunbooksOwner$outboundSchema).optional(), - attachmentRule: z.lazy(() => AttachmentRule$outboundSchema).optional(), - steps: z.array(z.lazy(() => Steps$outboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - autoAttachToRestrictedIncidents: "auto_attach_to_restricted_incidents", - attachmentRule: "attachment_rule", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Runbooks$ { - /** @deprecated use `PostV1Runbooks$inboundSchema` instead. */ - export const inboundSchema = PostV1Runbooks$inboundSchema; - /** @deprecated use `PostV1Runbooks$outboundSchema` instead. */ - export const outboundSchema = PostV1Runbooks$outboundSchema; - /** @deprecated use `PostV1Runbooks$Outbound` instead. */ - export type Outbound = PostV1Runbooks$Outbound; -} - -export function postV1RunbooksToJSON(postV1Runbooks: PostV1Runbooks): string { - return JSON.stringify(PostV1Runbooks$outboundSchema.parse(postV1Runbooks)); -} - -export function postV1RunbooksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Runbooks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Runbooks' from JSON`, - ); -} diff --git a/src/models/components/postv1runbooksexecutions.ts b/src/models/components/postv1runbooksexecutions.ts deleted file mode 100644 index 347668c9..00000000 --- a/src/models/components/postv1runbooksexecutions.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Attaches a runbook to an incident and executes it - */ -export type PostV1RunbooksExecutions = { - /** - * The incident to attach the runbook to. Format must be: `incident/${incidentId}` - */ - executeFor: string; - /** - * ID of runbook to attach - */ - runbookId: string; -}; - -/** @internal */ -export const PostV1RunbooksExecutions$inboundSchema: z.ZodType< - PostV1RunbooksExecutions, - z.ZodTypeDef, - unknown -> = z.object({ - execute_for: z.string(), - runbook_id: z.string(), -}).transform((v) => { - return remap$(v, { - "execute_for": "executeFor", - "runbook_id": "runbookId", - }); -}); - -/** @internal */ -export type PostV1RunbooksExecutions$Outbound = { - execute_for: string; - runbook_id: string; -}; - -/** @internal */ -export const PostV1RunbooksExecutions$outboundSchema: z.ZodType< - PostV1RunbooksExecutions$Outbound, - z.ZodTypeDef, - PostV1RunbooksExecutions -> = z.object({ - executeFor: z.string(), - runbookId: z.string(), -}).transform((v) => { - return remap$(v, { - executeFor: "execute_for", - runbookId: "runbook_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1RunbooksExecutions$ { - /** @deprecated use `PostV1RunbooksExecutions$inboundSchema` instead. */ - export const inboundSchema = PostV1RunbooksExecutions$inboundSchema; - /** @deprecated use `PostV1RunbooksExecutions$outboundSchema` instead. */ - export const outboundSchema = PostV1RunbooksExecutions$outboundSchema; - /** @deprecated use `PostV1RunbooksExecutions$Outbound` instead. */ - export type Outbound = PostV1RunbooksExecutions$Outbound; -} - -export function postV1RunbooksExecutionsToJSON( - postV1RunbooksExecutions: PostV1RunbooksExecutions, -): string { - return JSON.stringify( - PostV1RunbooksExecutions$outboundSchema.parse(postV1RunbooksExecutions), - ); -} - -export function postV1RunbooksExecutionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1RunbooksExecutions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1RunbooksExecutions' from JSON`, - ); -} diff --git a/src/models/components/postv1savedsearchesresourcetype.ts b/src/models/components/postv1savedsearchesresourcetype.ts deleted file mode 100644 index 1b12333f..00000000 --- a/src/models/components/postv1savedsearchesresourcetype.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new saved search for a particular resource type - */ -export type PostV1SavedSearchesResourceType = { - name: string; - isPrivate?: boolean | undefined; - filterValues: { [k: string]: any }; -}; - -/** @internal */ -export const PostV1SavedSearchesResourceType$inboundSchema: z.ZodType< - PostV1SavedSearchesResourceType, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - is_private: z.boolean().optional(), - filter_values: z.record(z.any()), -}).transform((v) => { - return remap$(v, { - "is_private": "isPrivate", - "filter_values": "filterValues", - }); -}); - -/** @internal */ -export type PostV1SavedSearchesResourceType$Outbound = { - name: string; - is_private?: boolean | undefined; - filter_values: { [k: string]: any }; -}; - -/** @internal */ -export const PostV1SavedSearchesResourceType$outboundSchema: z.ZodType< - PostV1SavedSearchesResourceType$Outbound, - z.ZodTypeDef, - PostV1SavedSearchesResourceType -> = z.object({ - name: z.string(), - isPrivate: z.boolean().optional(), - filterValues: z.record(z.any()), -}).transform((v) => { - return remap$(v, { - isPrivate: "is_private", - filterValues: "filter_values", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SavedSearchesResourceType$ { - /** @deprecated use `PostV1SavedSearchesResourceType$inboundSchema` instead. */ - export const inboundSchema = PostV1SavedSearchesResourceType$inboundSchema; - /** @deprecated use `PostV1SavedSearchesResourceType$outboundSchema` instead. */ - export const outboundSchema = PostV1SavedSearchesResourceType$outboundSchema; - /** @deprecated use `PostV1SavedSearchesResourceType$Outbound` instead. */ - export type Outbound = PostV1SavedSearchesResourceType$Outbound; -} - -export function postV1SavedSearchesResourceTypeToJSON( - postV1SavedSearchesResourceType: PostV1SavedSearchesResourceType, -): string { - return JSON.stringify( - PostV1SavedSearchesResourceType$outboundSchema.parse( - postV1SavedSearchesResourceType, - ), - ); -} - -export function postV1SavedSearchesResourceTypeFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1SavedSearchesResourceType$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1SavedSearchesResourceType' from JSON`, - ); -} diff --git a/src/models/components/postv1scheduledmaintenances.ts b/src/models/components/postv1scheduledmaintenances.ts deleted file mode 100644 index 29925dbb..00000000 --- a/src/models/components/postv1scheduledmaintenances.ts +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PostV1ScheduledMaintenancesStatusPages = { - /** - * The slug identifying the type of status page - */ - integrationSlug?: string | undefined; - /** - * The UUID of the status page to display this maintenance on - */ - connectionId: string; -}; - -export type PostV1ScheduledMaintenancesImpacts = { - /** - * The type of impact - */ - type: string; - /** - * The id of impact - */ - id: string; - /** - * The id of the condition - */ - conditionId: string; -}; - -/** - * Create a new scheduled maintenance event - */ -export type PostV1ScheduledMaintenances = { - name: string; - /** - * ISO8601 timestamp for the start time of the scheduled maintenance - */ - startsAt: Date; - /** - * ISO8601 timestamp for the end time of the scheduled maintenance - */ - endsAt: Date; - summary?: string | undefined; - description?: string | undefined; - /** - * A json object of label keys and values - */ - labels?: { [k: string]: string } | undefined; - /** - * An array of status pages to display this maintenance on - */ - statusPages?: Array | undefined; - /** - * An array of impact/condition combinations - */ - impacts?: Array | undefined; -}; - -/** @internal */ -export const PostV1ScheduledMaintenancesStatusPages$inboundSchema: z.ZodType< - PostV1ScheduledMaintenancesStatusPages, - z.ZodTypeDef, - unknown -> = z.object({ - integration_slug: z.string().optional(), - connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - "connection_id": "connectionId", - }); -}); - -/** @internal */ -export type PostV1ScheduledMaintenancesStatusPages$Outbound = { - integration_slug?: string | undefined; - connection_id: string; -}; - -/** @internal */ -export const PostV1ScheduledMaintenancesStatusPages$outboundSchema: z.ZodType< - PostV1ScheduledMaintenancesStatusPages$Outbound, - z.ZodTypeDef, - PostV1ScheduledMaintenancesStatusPages -> = z.object({ - integrationSlug: z.string().optional(), - connectionId: z.string(), -}).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - connectionId: "connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ScheduledMaintenancesStatusPages$ { - /** @deprecated use `PostV1ScheduledMaintenancesStatusPages$inboundSchema` instead. */ - export const inboundSchema = - PostV1ScheduledMaintenancesStatusPages$inboundSchema; - /** @deprecated use `PostV1ScheduledMaintenancesStatusPages$outboundSchema` instead. */ - export const outboundSchema = - PostV1ScheduledMaintenancesStatusPages$outboundSchema; - /** @deprecated use `PostV1ScheduledMaintenancesStatusPages$Outbound` instead. */ - export type Outbound = PostV1ScheduledMaintenancesStatusPages$Outbound; -} - -export function postV1ScheduledMaintenancesStatusPagesToJSON( - postV1ScheduledMaintenancesStatusPages: - PostV1ScheduledMaintenancesStatusPages, -): string { - return JSON.stringify( - PostV1ScheduledMaintenancesStatusPages$outboundSchema.parse( - postV1ScheduledMaintenancesStatusPages, - ), - ); -} - -export function postV1ScheduledMaintenancesStatusPagesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PostV1ScheduledMaintenancesStatusPages$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ScheduledMaintenancesStatusPages' from JSON`, - ); -} - -/** @internal */ -export const PostV1ScheduledMaintenancesImpacts$inboundSchema: z.ZodType< - PostV1ScheduledMaintenancesImpacts, - z.ZodTypeDef, - unknown -> = z.object({ - type: z.string(), - id: z.string(), - condition_id: z.string(), -}).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); -}); - -/** @internal */ -export type PostV1ScheduledMaintenancesImpacts$Outbound = { - type: string; - id: string; - condition_id: string; -}; - -/** @internal */ -export const PostV1ScheduledMaintenancesImpacts$outboundSchema: z.ZodType< - PostV1ScheduledMaintenancesImpacts$Outbound, - z.ZodTypeDef, - PostV1ScheduledMaintenancesImpacts -> = z.object({ - type: z.string(), - id: z.string(), - conditionId: z.string(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ScheduledMaintenancesImpacts$ { - /** @deprecated use `PostV1ScheduledMaintenancesImpacts$inboundSchema` instead. */ - export const inboundSchema = PostV1ScheduledMaintenancesImpacts$inboundSchema; - /** @deprecated use `PostV1ScheduledMaintenancesImpacts$outboundSchema` instead. */ - export const outboundSchema = - PostV1ScheduledMaintenancesImpacts$outboundSchema; - /** @deprecated use `PostV1ScheduledMaintenancesImpacts$Outbound` instead. */ - export type Outbound = PostV1ScheduledMaintenancesImpacts$Outbound; -} - -export function postV1ScheduledMaintenancesImpactsToJSON( - postV1ScheduledMaintenancesImpacts: PostV1ScheduledMaintenancesImpacts, -): string { - return JSON.stringify( - PostV1ScheduledMaintenancesImpacts$outboundSchema.parse( - postV1ScheduledMaintenancesImpacts, - ), - ); -} - -export function postV1ScheduledMaintenancesImpactsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PostV1ScheduledMaintenancesImpacts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ScheduledMaintenancesImpacts' from JSON`, - ); -} - -/** @internal */ -export const PostV1ScheduledMaintenances$inboundSchema: z.ZodType< - PostV1ScheduledMaintenances, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - status_pages: z.array( - z.lazy(() => PostV1ScheduledMaintenancesStatusPages$inboundSchema), - ).optional(), - impacts: z.array( - z.lazy(() => PostV1ScheduledMaintenancesImpacts$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "starts_at": "startsAt", - "ends_at": "endsAt", - "status_pages": "statusPages", - }); -}); - -/** @internal */ -export type PostV1ScheduledMaintenances$Outbound = { - name: string; - starts_at: string; - ends_at: string; - summary?: string | undefined; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; - status_pages?: - | Array - | undefined; - impacts?: Array | undefined; -}; - -/** @internal */ -export const PostV1ScheduledMaintenances$outboundSchema: z.ZodType< - PostV1ScheduledMaintenances$Outbound, - z.ZodTypeDef, - PostV1ScheduledMaintenances -> = z.object({ - name: z.string(), - startsAt: z.date().transform(v => v.toISOString()), - endsAt: z.date().transform(v => v.toISOString()), - summary: z.string().optional(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - statusPages: z.array( - z.lazy(() => PostV1ScheduledMaintenancesStatusPages$outboundSchema), - ).optional(), - impacts: z.array( - z.lazy(() => PostV1ScheduledMaintenancesImpacts$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - startsAt: "starts_at", - endsAt: "ends_at", - statusPages: "status_pages", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ScheduledMaintenances$ { - /** @deprecated use `PostV1ScheduledMaintenances$inboundSchema` instead. */ - export const inboundSchema = PostV1ScheduledMaintenances$inboundSchema; - /** @deprecated use `PostV1ScheduledMaintenances$outboundSchema` instead. */ - export const outboundSchema = PostV1ScheduledMaintenances$outboundSchema; - /** @deprecated use `PostV1ScheduledMaintenances$Outbound` instead. */ - export type Outbound = PostV1ScheduledMaintenances$Outbound; -} - -export function postV1ScheduledMaintenancesToJSON( - postV1ScheduledMaintenances: PostV1ScheduledMaintenances, -): string { - return JSON.stringify( - PostV1ScheduledMaintenances$outboundSchema.parse( - postV1ScheduledMaintenances, - ), - ); -} - -export function postV1ScheduledMaintenancesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ScheduledMaintenances$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ScheduledMaintenances' from JSON`, - ); -} diff --git a/src/models/components/postv1scimv2groups.ts b/src/models/components/postv1scimv2groups.ts deleted file mode 100644 index 9f1869d5..00000000 --- a/src/models/components/postv1scimv2groups.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Members = { - /** - * String that represents the user's UUID to assign to the team - */ - value: string; -}; - -/** - * SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. - */ -export type PostV1ScimV2Groups = { - /** - * The name of the team being created - */ - displayName: string; - members: Array; -}; - -/** @internal */ -export const Members$inboundSchema: z.ZodType = - z.object({ - value: z.string(), - }); - -/** @internal */ -export type Members$Outbound = { - value: string; -}; - -/** @internal */ -export const Members$outboundSchema: z.ZodType< - Members$Outbound, - z.ZodTypeDef, - Members -> = z.object({ - value: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Members$ { - /** @deprecated use `Members$inboundSchema` instead. */ - export const inboundSchema = Members$inboundSchema; - /** @deprecated use `Members$outboundSchema` instead. */ - export const outboundSchema = Members$outboundSchema; - /** @deprecated use `Members$Outbound` instead. */ - export type Outbound = Members$Outbound; -} - -export function membersToJSON(members: Members): string { - return JSON.stringify(Members$outboundSchema.parse(members)); -} - -export function membersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Members$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Members' from JSON`, - ); -} - -/** @internal */ -export const PostV1ScimV2Groups$inboundSchema: z.ZodType< - PostV1ScimV2Groups, - z.ZodTypeDef, - unknown -> = z.object({ - displayName: z.string(), - members: z.array(z.lazy(() => Members$inboundSchema)), -}); - -/** @internal */ -export type PostV1ScimV2Groups$Outbound = { - displayName: string; - members: Array; -}; - -/** @internal */ -export const PostV1ScimV2Groups$outboundSchema: z.ZodType< - PostV1ScimV2Groups$Outbound, - z.ZodTypeDef, - PostV1ScimV2Groups -> = z.object({ - displayName: z.string(), - members: z.array(z.lazy(() => Members$outboundSchema)), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ScimV2Groups$ { - /** @deprecated use `PostV1ScimV2Groups$inboundSchema` instead. */ - export const inboundSchema = PostV1ScimV2Groups$inboundSchema; - /** @deprecated use `PostV1ScimV2Groups$outboundSchema` instead. */ - export const outboundSchema = PostV1ScimV2Groups$outboundSchema; - /** @deprecated use `PostV1ScimV2Groups$Outbound` instead. */ - export type Outbound = PostV1ScimV2Groups$Outbound; -} - -export function postV1ScimV2GroupsToJSON( - postV1ScimV2Groups: PostV1ScimV2Groups, -): string { - return JSON.stringify( - PostV1ScimV2Groups$outboundSchema.parse(postV1ScimV2Groups), - ); -} - -export function postV1ScimV2GroupsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ScimV2Groups$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ScimV2Groups' from JSON`, - ); -} diff --git a/src/models/components/postv1scimv2users.ts b/src/models/components/postv1scimv2users.ts deleted file mode 100644 index bde99d95..00000000 --- a/src/models/components/postv1scimv2users.ts +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The components of the user's name - */ -export type Name = { - /** - * The family name of the User, or last name in most Western languages - */ - familyName: string; - /** - * The given name of the User, or first name in most Western languages - */ - givenName: string; -}; - -export type Emails = { - /** - * String that represents an email address for the User - */ - value: string; - /** - * Boolean which signifies if an email is intended as the primary email for the User - */ - primary: boolean; -}; - -/** - * SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. - */ -export type PostV1ScimV2Users = { - /** - * A service provider's unique identifier for the user - */ - userName: string; - /** - * The components of the user's name - */ - name: Name; - /** - * Email addresses for the User - */ - emails: Array; - /** - * Roles for the User. Options are owner, member or collaborator - */ - roles?: Array | undefined; - /** - * This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password - */ - password?: string | undefined; -}; - -/** @internal */ -export const Name$inboundSchema: z.ZodType = z - .object({ - familyName: z.string(), - givenName: z.string(), - }); - -/** @internal */ -export type Name$Outbound = { - familyName: string; - givenName: string; -}; - -/** @internal */ -export const Name$outboundSchema: z.ZodType = - z.object({ - familyName: z.string(), - givenName: z.string(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Name$ { - /** @deprecated use `Name$inboundSchema` instead. */ - export const inboundSchema = Name$inboundSchema; - /** @deprecated use `Name$outboundSchema` instead. */ - export const outboundSchema = Name$outboundSchema; - /** @deprecated use `Name$Outbound` instead. */ - export type Outbound = Name$Outbound; -} - -export function nameToJSON(name: Name): string { - return JSON.stringify(Name$outboundSchema.parse(name)); -} - -export function nameFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Name$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Name' from JSON`, - ); -} - -/** @internal */ -export const Emails$inboundSchema: z.ZodType = z - .object({ - value: z.string(), - primary: z.boolean(), - }); - -/** @internal */ -export type Emails$Outbound = { - value: string; - primary: boolean; -}; - -/** @internal */ -export const Emails$outboundSchema: z.ZodType< - Emails$Outbound, - z.ZodTypeDef, - Emails -> = z.object({ - value: z.string(), - primary: z.boolean(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Emails$ { - /** @deprecated use `Emails$inboundSchema` instead. */ - export const inboundSchema = Emails$inboundSchema; - /** @deprecated use `Emails$outboundSchema` instead. */ - export const outboundSchema = Emails$outboundSchema; - /** @deprecated use `Emails$Outbound` instead. */ - export type Outbound = Emails$Outbound; -} - -export function emailsToJSON(emails: Emails): string { - return JSON.stringify(Emails$outboundSchema.parse(emails)); -} - -export function emailsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Emails$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Emails' from JSON`, - ); -} - -/** @internal */ -export const PostV1ScimV2Users$inboundSchema: z.ZodType< - PostV1ScimV2Users, - z.ZodTypeDef, - unknown -> = z.object({ - userName: z.string(), - name: z.lazy(() => Name$inboundSchema), - emails: z.array(z.lazy(() => Emails$inboundSchema)), - roles: z.array(z.string()).optional(), - password: z.string().optional(), -}); - -/** @internal */ -export type PostV1ScimV2Users$Outbound = { - userName: string; - name: Name$Outbound; - emails: Array; - roles?: Array | undefined; - password?: string | undefined; -}; - -/** @internal */ -export const PostV1ScimV2Users$outboundSchema: z.ZodType< - PostV1ScimV2Users$Outbound, - z.ZodTypeDef, - PostV1ScimV2Users -> = z.object({ - userName: z.string(), - name: z.lazy(() => Name$outboundSchema), - emails: z.array(z.lazy(() => Emails$outboundSchema)), - roles: z.array(z.string()).optional(), - password: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ScimV2Users$ { - /** @deprecated use `PostV1ScimV2Users$inboundSchema` instead. */ - export const inboundSchema = PostV1ScimV2Users$inboundSchema; - /** @deprecated use `PostV1ScimV2Users$outboundSchema` instead. */ - export const outboundSchema = PostV1ScimV2Users$outboundSchema; - /** @deprecated use `PostV1ScimV2Users$Outbound` instead. */ - export type Outbound = PostV1ScimV2Users$Outbound; -} - -export function postV1ScimV2UsersToJSON( - postV1ScimV2Users: PostV1ScimV2Users, -): string { - return JSON.stringify( - PostV1ScimV2Users$outboundSchema.parse(postV1ScimV2Users), - ); -} - -export function postV1ScimV2UsersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ScimV2Users$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ScimV2Users' from JSON`, - ); -} diff --git a/src/models/components/postv1servicedependencies.ts b/src/models/components/postv1servicedependencies.ts deleted file mode 100644 index 6a3e40b4..00000000 --- a/src/models/components/postv1servicedependencies.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Creates a service dependency relationship between two services - */ -export type PostV1ServiceDependencies = { - serviceId: string; - connectedServiceId: string; - /** - * A note to describe the service dependency relationship - */ - notes?: string | undefined; -}; - -/** @internal */ -export const PostV1ServiceDependencies$inboundSchema: z.ZodType< - PostV1ServiceDependencies, - z.ZodTypeDef, - unknown -> = z.object({ - service_id: z.string(), - connected_service_id: z.string(), - notes: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "service_id": "serviceId", - "connected_service_id": "connectedServiceId", - }); -}); - -/** @internal */ -export type PostV1ServiceDependencies$Outbound = { - service_id: string; - connected_service_id: string; - notes?: string | undefined; -}; - -/** @internal */ -export const PostV1ServiceDependencies$outboundSchema: z.ZodType< - PostV1ServiceDependencies$Outbound, - z.ZodTypeDef, - PostV1ServiceDependencies -> = z.object({ - serviceId: z.string(), - connectedServiceId: z.string(), - notes: z.string().optional(), -}).transform((v) => { - return remap$(v, { - serviceId: "service_id", - connectedServiceId: "connected_service_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ServiceDependencies$ { - /** @deprecated use `PostV1ServiceDependencies$inboundSchema` instead. */ - export const inboundSchema = PostV1ServiceDependencies$inboundSchema; - /** @deprecated use `PostV1ServiceDependencies$outboundSchema` instead. */ - export const outboundSchema = PostV1ServiceDependencies$outboundSchema; - /** @deprecated use `PostV1ServiceDependencies$Outbound` instead. */ - export type Outbound = PostV1ServiceDependencies$Outbound; -} - -export function postV1ServiceDependenciesToJSON( - postV1ServiceDependencies: PostV1ServiceDependencies, -): string { - return JSON.stringify( - PostV1ServiceDependencies$outboundSchema.parse(postV1ServiceDependencies), - ); -} - -export function postV1ServiceDependenciesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ServiceDependencies$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ServiceDependencies' from JSON`, - ); -} diff --git a/src/models/components/postv1services.ts b/src/models/components/postv1services.ts deleted file mode 100644 index 295dd6c6..00000000 --- a/src/models/components/postv1services.ts +++ /dev/null @@ -1,532 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. - */ -export const ServiceTier = { - Zero: 0, - One: 1, - Two: 2, - Three: 3, - Four: 4, - Five: 5, -} as const; -/** - * Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. - */ -export type ServiceTier = ClosedEnum; - -export type Functionalities = { - /** - * If you are trying to create a new functionality and attach it to this service, set the summary key - */ - summary?: string | undefined; - /** - * If you are trying to reuse a functionality, you may set the ID to attach it to the service - */ - id?: string | undefined; -}; - -export type PostV1ServicesLinks = { - /** - * Short name used to display and identify this link - */ - name: string; - /** - * URL - */ - hrefUrl: string; - /** - * An optional URL to an icon representing this link - */ - iconUrl?: string | undefined; -}; - -/** - * An object representing a Team that owns the service - */ -export type PostV1ServicesOwner = { - id: string; -}; - -export type PostV1ServicesTeams = { - id: string; -}; - -export type PostV1ServicesExternalResources = { - remoteId: string; - /** - * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. - */ - connectionType?: string | undefined; -}; - -/** - * Creates a service for the organization, you may also create or attach functionalities to the service on create. - */ -export type PostV1Services = { - name: string; - description?: string | undefined; - /** - * A hash of label keys and values - */ - labels?: { [k: string]: string } | undefined; - /** - * Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5. - */ - serviceTier?: ServiceTier | undefined; - /** - * An array of functionalities - */ - functionalities?: Array | undefined; - /** - * An array of links to associate with this service - */ - links?: Array | undefined; - /** - * An object representing a Team that owns the service - */ - owner?: PostV1ServicesOwner | undefined; - /** - * An array of teams to attach to this service. - */ - teams?: Array | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; - /** - * An array of external resources to attach to this service. - */ - externalResources?: Array | undefined; -}; - -/** @internal */ -export const ServiceTier$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(ServiceTier); - -/** @internal */ -export const ServiceTier$outboundSchema: z.ZodNativeEnum = - ServiceTier$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ServiceTier$ { - /** @deprecated use `ServiceTier$inboundSchema` instead. */ - export const inboundSchema = ServiceTier$inboundSchema; - /** @deprecated use `ServiceTier$outboundSchema` instead. */ - export const outboundSchema = ServiceTier$outboundSchema; -} - -/** @internal */ -export const Functionalities$inboundSchema: z.ZodType< - Functionalities, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string().optional(), - id: z.string().optional(), -}); - -/** @internal */ -export type Functionalities$Outbound = { - summary?: string | undefined; - id?: string | undefined; -}; - -/** @internal */ -export const Functionalities$outboundSchema: z.ZodType< - Functionalities$Outbound, - z.ZodTypeDef, - Functionalities -> = z.object({ - summary: z.string().optional(), - id: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Functionalities$ { - /** @deprecated use `Functionalities$inboundSchema` instead. */ - export const inboundSchema = Functionalities$inboundSchema; - /** @deprecated use `Functionalities$outboundSchema` instead. */ - export const outboundSchema = Functionalities$outboundSchema; - /** @deprecated use `Functionalities$Outbound` instead. */ - export type Outbound = Functionalities$Outbound; -} - -export function functionalitiesToJSON( - functionalities: Functionalities, -): string { - return JSON.stringify(Functionalities$outboundSchema.parse(functionalities)); -} - -export function functionalitiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Functionalities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Functionalities' from JSON`, - ); -} - -/** @internal */ -export const PostV1ServicesLinks$inboundSchema: z.ZodType< - PostV1ServicesLinks, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - href_url: z.string(), - icon_url: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "href_url": "hrefUrl", - "icon_url": "iconUrl", - }); -}); - -/** @internal */ -export type PostV1ServicesLinks$Outbound = { - name: string; - href_url: string; - icon_url?: string | undefined; -}; - -/** @internal */ -export const PostV1ServicesLinks$outboundSchema: z.ZodType< - PostV1ServicesLinks$Outbound, - z.ZodTypeDef, - PostV1ServicesLinks -> = z.object({ - name: z.string(), - hrefUrl: z.string(), - iconUrl: z.string().optional(), -}).transform((v) => { - return remap$(v, { - hrefUrl: "href_url", - iconUrl: "icon_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ServicesLinks$ { - /** @deprecated use `PostV1ServicesLinks$inboundSchema` instead. */ - export const inboundSchema = PostV1ServicesLinks$inboundSchema; - /** @deprecated use `PostV1ServicesLinks$outboundSchema` instead. */ - export const outboundSchema = PostV1ServicesLinks$outboundSchema; - /** @deprecated use `PostV1ServicesLinks$Outbound` instead. */ - export type Outbound = PostV1ServicesLinks$Outbound; -} - -export function postV1ServicesLinksToJSON( - postV1ServicesLinks: PostV1ServicesLinks, -): string { - return JSON.stringify( - PostV1ServicesLinks$outboundSchema.parse(postV1ServicesLinks), - ); -} - -export function postV1ServicesLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ServicesLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ServicesLinks' from JSON`, - ); -} - -/** @internal */ -export const PostV1ServicesOwner$inboundSchema: z.ZodType< - PostV1ServicesOwner, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type PostV1ServicesOwner$Outbound = { - id: string; -}; - -/** @internal */ -export const PostV1ServicesOwner$outboundSchema: z.ZodType< - PostV1ServicesOwner$Outbound, - z.ZodTypeDef, - PostV1ServicesOwner -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ServicesOwner$ { - /** @deprecated use `PostV1ServicesOwner$inboundSchema` instead. */ - export const inboundSchema = PostV1ServicesOwner$inboundSchema; - /** @deprecated use `PostV1ServicesOwner$outboundSchema` instead. */ - export const outboundSchema = PostV1ServicesOwner$outboundSchema; - /** @deprecated use `PostV1ServicesOwner$Outbound` instead. */ - export type Outbound = PostV1ServicesOwner$Outbound; -} - -export function postV1ServicesOwnerToJSON( - postV1ServicesOwner: PostV1ServicesOwner, -): string { - return JSON.stringify( - PostV1ServicesOwner$outboundSchema.parse(postV1ServicesOwner), - ); -} - -export function postV1ServicesOwnerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ServicesOwner$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ServicesOwner' from JSON`, - ); -} - -/** @internal */ -export const PostV1ServicesTeams$inboundSchema: z.ZodType< - PostV1ServicesTeams, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type PostV1ServicesTeams$Outbound = { - id: string; -}; - -/** @internal */ -export const PostV1ServicesTeams$outboundSchema: z.ZodType< - PostV1ServicesTeams$Outbound, - z.ZodTypeDef, - PostV1ServicesTeams -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ServicesTeams$ { - /** @deprecated use `PostV1ServicesTeams$inboundSchema` instead. */ - export const inboundSchema = PostV1ServicesTeams$inboundSchema; - /** @deprecated use `PostV1ServicesTeams$outboundSchema` instead. */ - export const outboundSchema = PostV1ServicesTeams$outboundSchema; - /** @deprecated use `PostV1ServicesTeams$Outbound` instead. */ - export type Outbound = PostV1ServicesTeams$Outbound; -} - -export function postV1ServicesTeamsToJSON( - postV1ServicesTeams: PostV1ServicesTeams, -): string { - return JSON.stringify( - PostV1ServicesTeams$outboundSchema.parse(postV1ServicesTeams), - ); -} - -export function postV1ServicesTeamsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ServicesTeams$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ServicesTeams' from JSON`, - ); -} - -/** @internal */ -export const PostV1ServicesExternalResources$inboundSchema: z.ZodType< - PostV1ServicesExternalResources, - z.ZodTypeDef, - unknown -> = z.object({ - remote_id: z.string(), - connection_type: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "remote_id": "remoteId", - "connection_type": "connectionType", - }); -}); - -/** @internal */ -export type PostV1ServicesExternalResources$Outbound = { - remote_id: string; - connection_type?: string | undefined; -}; - -/** @internal */ -export const PostV1ServicesExternalResources$outboundSchema: z.ZodType< - PostV1ServicesExternalResources$Outbound, - z.ZodTypeDef, - PostV1ServicesExternalResources -> = z.object({ - remoteId: z.string(), - connectionType: z.string().optional(), -}).transform((v) => { - return remap$(v, { - remoteId: "remote_id", - connectionType: "connection_type", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ServicesExternalResources$ { - /** @deprecated use `PostV1ServicesExternalResources$inboundSchema` instead. */ - export const inboundSchema = PostV1ServicesExternalResources$inboundSchema; - /** @deprecated use `PostV1ServicesExternalResources$outboundSchema` instead. */ - export const outboundSchema = PostV1ServicesExternalResources$outboundSchema; - /** @deprecated use `PostV1ServicesExternalResources$Outbound` instead. */ - export type Outbound = PostV1ServicesExternalResources$Outbound; -} - -export function postV1ServicesExternalResourcesToJSON( - postV1ServicesExternalResources: PostV1ServicesExternalResources, -): string { - return JSON.stringify( - PostV1ServicesExternalResources$outboundSchema.parse( - postV1ServicesExternalResources, - ), - ); -} - -export function postV1ServicesExternalResourcesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ServicesExternalResources$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ServicesExternalResources' from JSON`, - ); -} - -/** @internal */ -export const PostV1Services$inboundSchema: z.ZodType< - PostV1Services, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - service_tier: ServiceTier$inboundSchema.optional(), - functionalities: z.array(z.lazy(() => Functionalities$inboundSchema)) - .optional(), - links: z.array(z.lazy(() => PostV1ServicesLinks$inboundSchema)).optional(), - owner: z.lazy(() => PostV1ServicesOwner$inboundSchema).optional(), - teams: z.array(z.lazy(() => PostV1ServicesTeams$inboundSchema)).optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - external_resources: z.array( - z.lazy(() => PostV1ServicesExternalResources$inboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - "service_tier": "serviceTier", - "alert_on_add": "alertOnAdd", - "auto_add_responding_team": "autoAddRespondingTeam", - "external_resources": "externalResources", - }); -}); - -/** @internal */ -export type PostV1Services$Outbound = { - name: string; - description?: string | undefined; - labels?: { [k: string]: string } | undefined; - service_tier?: number | undefined; - functionalities?: Array | undefined; - links?: Array | undefined; - owner?: PostV1ServicesOwner$Outbound | undefined; - teams?: Array | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - external_resources?: - | Array - | undefined; -}; - -/** @internal */ -export const PostV1Services$outboundSchema: z.ZodType< - PostV1Services$Outbound, - z.ZodTypeDef, - PostV1Services -> = z.object({ - name: z.string(), - description: z.string().optional(), - labels: z.record(z.string()).optional(), - serviceTier: ServiceTier$outboundSchema.optional(), - functionalities: z.array(z.lazy(() => Functionalities$outboundSchema)) - .optional(), - links: z.array(z.lazy(() => PostV1ServicesLinks$outboundSchema)).optional(), - owner: z.lazy(() => PostV1ServicesOwner$outboundSchema).optional(), - teams: z.array(z.lazy(() => PostV1ServicesTeams$outboundSchema)).optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - externalResources: z.array( - z.lazy(() => PostV1ServicesExternalResources$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - serviceTier: "service_tier", - alertOnAdd: "alert_on_add", - autoAddRespondingTeam: "auto_add_responding_team", - externalResources: "external_resources", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Services$ { - /** @deprecated use `PostV1Services$inboundSchema` instead. */ - export const inboundSchema = PostV1Services$inboundSchema; - /** @deprecated use `PostV1Services$outboundSchema` instead. */ - export const outboundSchema = PostV1Services$outboundSchema; - /** @deprecated use `PostV1Services$Outbound` instead. */ - export type Outbound = PostV1Services$Outbound; -} - -export function postV1ServicesToJSON(postV1Services: PostV1Services): string { - return JSON.stringify(PostV1Services$outboundSchema.parse(postV1Services)); -} - -export function postV1ServicesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Services$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Services' from JSON`, - ); -} diff --git a/src/models/components/postv1servicesserviceidchecklistresponsechecklistid.ts b/src/models/components/postv1servicesserviceidchecklistresponsechecklistid.ts deleted file mode 100644 index 2061117d..00000000 --- a/src/models/components/postv1servicesserviceidchecklistresponsechecklistid.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Creates a response for a checklist item - */ -export type PostV1ServicesServiceIdChecklistResponseChecklistId = { - checkId: string; - /** - * Status of the check. 'true' if it's complete, 'false' if incomplete, or blank if not yet interacted with - */ - status: boolean; -}; - -/** @internal */ -export const PostV1ServicesServiceIdChecklistResponseChecklistId$inboundSchema: - z.ZodType< - PostV1ServicesServiceIdChecklistResponseChecklistId, - z.ZodTypeDef, - unknown - > = z.object({ - check_id: z.string(), - status: z.boolean(), - }).transform((v) => { - return remap$(v, { - "check_id": "checkId", - }); - }); - -/** @internal */ -export type PostV1ServicesServiceIdChecklistResponseChecklistId$Outbound = { - check_id: string; - status: boolean; -}; - -/** @internal */ -export const PostV1ServicesServiceIdChecklistResponseChecklistId$outboundSchema: - z.ZodType< - PostV1ServicesServiceIdChecklistResponseChecklistId$Outbound, - z.ZodTypeDef, - PostV1ServicesServiceIdChecklistResponseChecklistId - > = z.object({ - checkId: z.string(), - status: z.boolean(), - }).transform((v) => { - return remap$(v, { - checkId: "check_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ServicesServiceIdChecklistResponseChecklistId$ { - /** @deprecated use `PostV1ServicesServiceIdChecklistResponseChecklistId$inboundSchema` instead. */ - export const inboundSchema = - PostV1ServicesServiceIdChecklistResponseChecklistId$inboundSchema; - /** @deprecated use `PostV1ServicesServiceIdChecklistResponseChecklistId$outboundSchema` instead. */ - export const outboundSchema = - PostV1ServicesServiceIdChecklistResponseChecklistId$outboundSchema; - /** @deprecated use `PostV1ServicesServiceIdChecklistResponseChecklistId$Outbound` instead. */ - export type Outbound = - PostV1ServicesServiceIdChecklistResponseChecklistId$Outbound; -} - -export function postV1ServicesServiceIdChecklistResponseChecklistIdToJSON( - postV1ServicesServiceIdChecklistResponseChecklistId: - PostV1ServicesServiceIdChecklistResponseChecklistId, -): string { - return JSON.stringify( - PostV1ServicesServiceIdChecklistResponseChecklistId$outboundSchema.parse( - postV1ServicesServiceIdChecklistResponseChecklistId, - ), - ); -} - -export function postV1ServicesServiceIdChecklistResponseChecklistIdFromJSON( - jsonString: string, -): SafeParseResult< - PostV1ServicesServiceIdChecklistResponseChecklistId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1ServicesServiceIdChecklistResponseChecklistId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1ServicesServiceIdChecklistResponseChecklistId' from JSON`, - ); -} diff --git a/src/models/components/postv1servicesservicelinks.ts b/src/models/components/postv1servicesservicelinks.ts deleted file mode 100644 index 04f3f6ca..00000000 --- a/src/models/components/postv1servicesservicelinks.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The name of the service - */ -export const Integration = { - PagerDuty: "pager_duty", - Opsgenie: "opsgenie", - Victorops: "victorops", -} as const; -/** - * The name of the service - */ -export type Integration = ClosedEnum; - -/** - * Creates a service with the appropriate integration for each external service ID passed - */ -export type PostV1ServicesServiceLinks = { - /** - * ID of the service - */ - externalServiceIds: string; - /** - * ID for the integration. This can be found by going to the edit page for the integration - */ - connectionId: string; - /** - * The name of the service - */ - integration: Integration; -}; - -/** @internal */ -export const Integration$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Integration); - -/** @internal */ -export const Integration$outboundSchema: z.ZodNativeEnum = - Integration$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Integration$ { - /** @deprecated use `Integration$inboundSchema` instead. */ - export const inboundSchema = Integration$inboundSchema; - /** @deprecated use `Integration$outboundSchema` instead. */ - export const outboundSchema = Integration$outboundSchema; -} - -/** @internal */ -export const PostV1ServicesServiceLinks$inboundSchema: z.ZodType< - PostV1ServicesServiceLinks, - z.ZodTypeDef, - unknown -> = z.object({ - external_service_ids: z.string(), - connection_id: z.string(), - integration: Integration$inboundSchema, -}).transform((v) => { - return remap$(v, { - "external_service_ids": "externalServiceIds", - "connection_id": "connectionId", - }); -}); - -/** @internal */ -export type PostV1ServicesServiceLinks$Outbound = { - external_service_ids: string; - connection_id: string; - integration: string; -}; - -/** @internal */ -export const PostV1ServicesServiceLinks$outboundSchema: z.ZodType< - PostV1ServicesServiceLinks$Outbound, - z.ZodTypeDef, - PostV1ServicesServiceLinks -> = z.object({ - externalServiceIds: z.string(), - connectionId: z.string(), - integration: Integration$outboundSchema, -}).transform((v) => { - return remap$(v, { - externalServiceIds: "external_service_ids", - connectionId: "connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1ServicesServiceLinks$ { - /** @deprecated use `PostV1ServicesServiceLinks$inboundSchema` instead. */ - export const inboundSchema = PostV1ServicesServiceLinks$inboundSchema; - /** @deprecated use `PostV1ServicesServiceLinks$outboundSchema` instead. */ - export const outboundSchema = PostV1ServicesServiceLinks$outboundSchema; - /** @deprecated use `PostV1ServicesServiceLinks$Outbound` instead. */ - export type Outbound = PostV1ServicesServiceLinks$Outbound; -} - -export function postV1ServicesServiceLinksToJSON( - postV1ServicesServiceLinks: PostV1ServicesServiceLinks, -): string { - return JSON.stringify( - PostV1ServicesServiceLinks$outboundSchema.parse(postV1ServicesServiceLinks), - ); -} - -export function postV1ServicesServiceLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1ServicesServiceLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1ServicesServiceLinks' from JSON`, - ); -} diff --git a/src/models/components/postv1severities.ts b/src/models/components/postv1severities.ts deleted file mode 100644 index 93e6447f..00000000 --- a/src/models/components/postv1severities.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const Color = { - Red: "red", - Orange: "orange", - Yellow: "yellow", - Blue: "blue", - Teal: "teal", - Grey: "grey", -} as const; -export type Color = ClosedEnum; - -/** - * Create a new severity - */ -export type PostV1Severities = { - slug: string; - description?: string | undefined; - position?: number | undefined; - color?: Color | undefined; -}; - -/** @internal */ -export const Color$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Color, -); - -/** @internal */ -export const Color$outboundSchema: z.ZodNativeEnum = - Color$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Color$ { - /** @deprecated use `Color$inboundSchema` instead. */ - export const inboundSchema = Color$inboundSchema; - /** @deprecated use `Color$outboundSchema` instead. */ - export const outboundSchema = Color$outboundSchema; -} - -/** @internal */ -export const PostV1Severities$inboundSchema: z.ZodType< - PostV1Severities, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string(), - description: z.string().optional(), - position: z.number().int().optional(), - color: Color$inboundSchema.optional(), -}); - -/** @internal */ -export type PostV1Severities$Outbound = { - slug: string; - description?: string | undefined; - position?: number | undefined; - color?: string | undefined; -}; - -/** @internal */ -export const PostV1Severities$outboundSchema: z.ZodType< - PostV1Severities$Outbound, - z.ZodTypeDef, - PostV1Severities -> = z.object({ - slug: z.string(), - description: z.string().optional(), - position: z.number().int().optional(), - color: Color$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Severities$ { - /** @deprecated use `PostV1Severities$inboundSchema` instead. */ - export const inboundSchema = PostV1Severities$inboundSchema; - /** @deprecated use `PostV1Severities$outboundSchema` instead. */ - export const outboundSchema = PostV1Severities$outboundSchema; - /** @deprecated use `PostV1Severities$Outbound` instead. */ - export type Outbound = PostV1Severities$Outbound; -} - -export function postV1SeveritiesToJSON( - postV1Severities: PostV1Severities, -): string { - return JSON.stringify( - PostV1Severities$outboundSchema.parse(postV1Severities), - ); -} - -export function postV1SeveritiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Severities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Severities' from JSON`, - ); -} diff --git a/src/models/components/postv1severitymatrixconditions.ts b/src/models/components/postv1severitymatrixconditions.ts deleted file mode 100644 index 7d64a50a..00000000 --- a/src/models/components/postv1severitymatrixconditions.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new condition - */ -export type PostV1SeverityMatrixConditions = { - name: string; - /** - * Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition - */ - position?: number | undefined; -}; - -/** @internal */ -export const PostV1SeverityMatrixConditions$inboundSchema: z.ZodType< - PostV1SeverityMatrixConditions, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - position: z.number().int().optional(), -}); - -/** @internal */ -export type PostV1SeverityMatrixConditions$Outbound = { - name: string; - position?: number | undefined; -}; - -/** @internal */ -export const PostV1SeverityMatrixConditions$outboundSchema: z.ZodType< - PostV1SeverityMatrixConditions$Outbound, - z.ZodTypeDef, - PostV1SeverityMatrixConditions -> = z.object({ - name: z.string(), - position: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SeverityMatrixConditions$ { - /** @deprecated use `PostV1SeverityMatrixConditions$inboundSchema` instead. */ - export const inboundSchema = PostV1SeverityMatrixConditions$inboundSchema; - /** @deprecated use `PostV1SeverityMatrixConditions$outboundSchema` instead. */ - export const outboundSchema = PostV1SeverityMatrixConditions$outboundSchema; - /** @deprecated use `PostV1SeverityMatrixConditions$Outbound` instead. */ - export type Outbound = PostV1SeverityMatrixConditions$Outbound; -} - -export function postV1SeverityMatrixConditionsToJSON( - postV1SeverityMatrixConditions: PostV1SeverityMatrixConditions, -): string { - return JSON.stringify( - PostV1SeverityMatrixConditions$outboundSchema.parse( - postV1SeverityMatrixConditions, - ), - ); -} - -export function postV1SeverityMatrixConditionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1SeverityMatrixConditions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1SeverityMatrixConditions' from JSON`, - ); -} diff --git a/src/models/components/postv1severitymatriximpacts.ts b/src/models/components/postv1severitymatriximpacts.ts deleted file mode 100644 index a5d6e1bc..00000000 --- a/src/models/components/postv1severitymatriximpacts.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new impact - */ -export type PostV1SeverityMatrixImpacts = { - affectsType: string; - affectsId: string; - position?: number | undefined; -}; - -/** @internal */ -export const PostV1SeverityMatrixImpacts$inboundSchema: z.ZodType< - PostV1SeverityMatrixImpacts, - z.ZodTypeDef, - unknown -> = z.object({ - affects_type: z.string(), - affects_id: z.string(), - position: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "affects_type": "affectsType", - "affects_id": "affectsId", - }); -}); - -/** @internal */ -export type PostV1SeverityMatrixImpacts$Outbound = { - affects_type: string; - affects_id: string; - position?: number | undefined; -}; - -/** @internal */ -export const PostV1SeverityMatrixImpacts$outboundSchema: z.ZodType< - PostV1SeverityMatrixImpacts$Outbound, - z.ZodTypeDef, - PostV1SeverityMatrixImpacts -> = z.object({ - affectsType: z.string(), - affectsId: z.string(), - position: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - affectsType: "affects_type", - affectsId: "affects_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SeverityMatrixImpacts$ { - /** @deprecated use `PostV1SeverityMatrixImpacts$inboundSchema` instead. */ - export const inboundSchema = PostV1SeverityMatrixImpacts$inboundSchema; - /** @deprecated use `PostV1SeverityMatrixImpacts$outboundSchema` instead. */ - export const outboundSchema = PostV1SeverityMatrixImpacts$outboundSchema; - /** @deprecated use `PostV1SeverityMatrixImpacts$Outbound` instead. */ - export type Outbound = PostV1SeverityMatrixImpacts$Outbound; -} - -export function postV1SeverityMatrixImpactsToJSON( - postV1SeverityMatrixImpacts: PostV1SeverityMatrixImpacts, -): string { - return JSON.stringify( - PostV1SeverityMatrixImpacts$outboundSchema.parse( - postV1SeverityMatrixImpacts, - ), - ); -} - -export function postV1SeverityMatrixImpactsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1SeverityMatrixImpacts$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1SeverityMatrixImpacts' from JSON`, - ); -} diff --git a/src/models/components/postv1signalsdebugger.ts b/src/models/components/postv1signalsdebugger.ts deleted file mode 100644 index a0ed7b5c..00000000 --- a/src/models/components/postv1signalsdebugger.ts +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Images = { - src?: string | undefined; - alt?: string | undefined; -}; - -export type PostV1SignalsDebuggerLinks = { - href?: string | undefined; - text?: string | undefined; -}; - -export type Signals = { - summary?: string | undefined; - body?: string | undefined; - level?: string | undefined; - images?: Array | undefined; - links?: Array | undefined; -}; - -export type PostV1SignalsDebugger = { - /** - * CEL expression - */ - expression: string; - /** - * List of signals to evaluate rule expression against - */ - signals: Array; -}; - -/** @internal */ -export const Images$inboundSchema: z.ZodType = z - .object({ - src: z.string().optional(), - alt: z.string().optional(), - }); - -/** @internal */ -export type Images$Outbound = { - src?: string | undefined; - alt?: string | undefined; -}; - -/** @internal */ -export const Images$outboundSchema: z.ZodType< - Images$Outbound, - z.ZodTypeDef, - Images -> = z.object({ - src: z.string().optional(), - alt: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Images$ { - /** @deprecated use `Images$inboundSchema` instead. */ - export const inboundSchema = Images$inboundSchema; - /** @deprecated use `Images$outboundSchema` instead. */ - export const outboundSchema = Images$outboundSchema; - /** @deprecated use `Images$Outbound` instead. */ - export type Outbound = Images$Outbound; -} - -export function imagesToJSON(images: Images): string { - return JSON.stringify(Images$outboundSchema.parse(images)); -} - -export function imagesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Images$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Images' from JSON`, - ); -} - -/** @internal */ -export const PostV1SignalsDebuggerLinks$inboundSchema: z.ZodType< - PostV1SignalsDebuggerLinks, - z.ZodTypeDef, - unknown -> = z.object({ - href: z.string().optional(), - text: z.string().optional(), -}); - -/** @internal */ -export type PostV1SignalsDebuggerLinks$Outbound = { - href?: string | undefined; - text?: string | undefined; -}; - -/** @internal */ -export const PostV1SignalsDebuggerLinks$outboundSchema: z.ZodType< - PostV1SignalsDebuggerLinks$Outbound, - z.ZodTypeDef, - PostV1SignalsDebuggerLinks -> = z.object({ - href: z.string().optional(), - text: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SignalsDebuggerLinks$ { - /** @deprecated use `PostV1SignalsDebuggerLinks$inboundSchema` instead. */ - export const inboundSchema = PostV1SignalsDebuggerLinks$inboundSchema; - /** @deprecated use `PostV1SignalsDebuggerLinks$outboundSchema` instead. */ - export const outboundSchema = PostV1SignalsDebuggerLinks$outboundSchema; - /** @deprecated use `PostV1SignalsDebuggerLinks$Outbound` instead. */ - export type Outbound = PostV1SignalsDebuggerLinks$Outbound; -} - -export function postV1SignalsDebuggerLinksToJSON( - postV1SignalsDebuggerLinks: PostV1SignalsDebuggerLinks, -): string { - return JSON.stringify( - PostV1SignalsDebuggerLinks$outboundSchema.parse(postV1SignalsDebuggerLinks), - ); -} - -export function postV1SignalsDebuggerLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1SignalsDebuggerLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1SignalsDebuggerLinks' from JSON`, - ); -} - -/** @internal */ -export const Signals$inboundSchema: z.ZodType = - z.object({ - summary: z.string().optional(), - body: z.string().optional(), - level: z.string().optional(), - images: z.array(z.lazy(() => Images$inboundSchema)).optional(), - links: z.array(z.lazy(() => PostV1SignalsDebuggerLinks$inboundSchema)) - .optional(), - }); - -/** @internal */ -export type Signals$Outbound = { - summary?: string | undefined; - body?: string | undefined; - level?: string | undefined; - images?: Array | undefined; - links?: Array | undefined; -}; - -/** @internal */ -export const Signals$outboundSchema: z.ZodType< - Signals$Outbound, - z.ZodTypeDef, - Signals -> = z.object({ - summary: z.string().optional(), - body: z.string().optional(), - level: z.string().optional(), - images: z.array(z.lazy(() => Images$outboundSchema)).optional(), - links: z.array(z.lazy(() => PostV1SignalsDebuggerLinks$outboundSchema)) - .optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Signals$ { - /** @deprecated use `Signals$inboundSchema` instead. */ - export const inboundSchema = Signals$inboundSchema; - /** @deprecated use `Signals$outboundSchema` instead. */ - export const outboundSchema = Signals$outboundSchema; - /** @deprecated use `Signals$Outbound` instead. */ - export type Outbound = Signals$Outbound; -} - -export function signalsToJSON(signals: Signals): string { - return JSON.stringify(Signals$outboundSchema.parse(signals)); -} - -export function signalsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Signals$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Signals' from JSON`, - ); -} - -/** @internal */ -export const PostV1SignalsDebugger$inboundSchema: z.ZodType< - PostV1SignalsDebugger, - z.ZodTypeDef, - unknown -> = z.object({ - expression: z.string(), - signals: z.array(z.lazy(() => Signals$inboundSchema)), -}); - -/** @internal */ -export type PostV1SignalsDebugger$Outbound = { - expression: string; - signals: Array; -}; - -/** @internal */ -export const PostV1SignalsDebugger$outboundSchema: z.ZodType< - PostV1SignalsDebugger$Outbound, - z.ZodTypeDef, - PostV1SignalsDebugger -> = z.object({ - expression: z.string(), - signals: z.array(z.lazy(() => Signals$outboundSchema)), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SignalsDebugger$ { - /** @deprecated use `PostV1SignalsDebugger$inboundSchema` instead. */ - export const inboundSchema = PostV1SignalsDebugger$inboundSchema; - /** @deprecated use `PostV1SignalsDebugger$outboundSchema` instead. */ - export const outboundSchema = PostV1SignalsDebugger$outboundSchema; - /** @deprecated use `PostV1SignalsDebugger$Outbound` instead. */ - export type Outbound = PostV1SignalsDebugger$Outbound; -} - -export function postV1SignalsDebuggerToJSON( - postV1SignalsDebugger: PostV1SignalsDebugger, -): string { - return JSON.stringify( - PostV1SignalsDebugger$outboundSchema.parse(postV1SignalsDebugger), - ); -} - -export function postV1SignalsDebuggerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1SignalsDebugger$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1SignalsDebugger' from JSON`, - ); -} diff --git a/src/models/components/postv1signalsemailtargets.ts b/src/models/components/postv1signalsemailtargets.ts deleted file mode 100644 index 86b3b732..00000000 --- a/src/models/components/postv1signalsemailtargets.ts +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of target that the inbound email will notify when matched. - */ -export const PostV1SignalsEmailTargetsType = { - Team: "Team", - EntireTeam: "EntireTeam", - EscalationPolicy: "EscalationPolicy", - OnCallSchedule: "OnCallSchedule", - User: "User", - SlackChannel: "SlackChannel", - Webhook: "Webhook", -} as const; -/** - * The type of target that the inbound email will notify when matched. - */ -export type PostV1SignalsEmailTargetsType = ClosedEnum< - typeof PostV1SignalsEmailTargetsType ->; - -/** - * The target that the email target will notify. This object must contain a `type` - * - * @remarks - * field that specifies the type of target and an `id` field that specifies the ID of - * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", - * "team", "user", or "slack_channel". - */ -export type Target = { - /** - * The type of target that the inbound email will notify when matched. - */ - type: PostV1SignalsEmailTargetsType; - /** - * The ID of the target that the inbound email will notify when matched. - */ - id: string; -}; - -/** - * Whether or not all rules must match, or if only one rule must match. - */ -export const RuleMatchingStrategy = { - All: "all", - Any: "any", -} as const; -/** - * Whether or not all rules must match, or if only one rule must match. - */ -export type RuleMatchingStrategy = ClosedEnum; - -/** - * Create a Signals email target for a team. - */ -export type PostV1SignalsEmailTargets = { - /** - * The email target's name. - */ - name: string; - /** - * The email address that will be listening to events. - */ - slug?: string | undefined; - /** - * A detailed description of the email target. - */ - description?: string | undefined; - /** - * The target that the email target will notify. This object must contain a `type` - * - * @remarks - * field that specifies the type of target and an `id` field that specifies the ID of - * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", - * "team", "user", or "slack_channel". - */ - target?: Target | undefined; - /** - * A list of email addresses that are allowed to send events to the target. Must be exact match. - */ - allowedSenders?: Array | undefined; - /** - * A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. - */ - rules?: Array | undefined; - /** - * Whether or not all rules must match, or if only one rule must match. - */ - ruleMatchingStrategy?: RuleMatchingStrategy | undefined; - /** - * The CEL expression that defines the status of an incoming email that is sent to the target. - */ - statusCel?: string | undefined; - /** - * The CEL expression that defines the level of an incoming email that is sent to the target. - */ - levelCel?: string | undefined; -}; - -/** @internal */ -export const PostV1SignalsEmailTargetsType$inboundSchema: z.ZodNativeEnum< - typeof PostV1SignalsEmailTargetsType -> = z.nativeEnum(PostV1SignalsEmailTargetsType); - -/** @internal */ -export const PostV1SignalsEmailTargetsType$outboundSchema: z.ZodNativeEnum< - typeof PostV1SignalsEmailTargetsType -> = PostV1SignalsEmailTargetsType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SignalsEmailTargetsType$ { - /** @deprecated use `PostV1SignalsEmailTargetsType$inboundSchema` instead. */ - export const inboundSchema = PostV1SignalsEmailTargetsType$inboundSchema; - /** @deprecated use `PostV1SignalsEmailTargetsType$outboundSchema` instead. */ - export const outboundSchema = PostV1SignalsEmailTargetsType$outboundSchema; -} - -/** @internal */ -export const Target$inboundSchema: z.ZodType = z - .object({ - type: PostV1SignalsEmailTargetsType$inboundSchema, - id: z.string(), - }); - -/** @internal */ -export type Target$Outbound = { - type: string; - id: string; -}; - -/** @internal */ -export const Target$outboundSchema: z.ZodType< - Target$Outbound, - z.ZodTypeDef, - Target -> = z.object({ - type: PostV1SignalsEmailTargetsType$outboundSchema, - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Target$ { - /** @deprecated use `Target$inboundSchema` instead. */ - export const inboundSchema = Target$inboundSchema; - /** @deprecated use `Target$outboundSchema` instead. */ - export const outboundSchema = Target$outboundSchema; - /** @deprecated use `Target$Outbound` instead. */ - export type Outbound = Target$Outbound; -} - -export function targetToJSON(target: Target): string { - return JSON.stringify(Target$outboundSchema.parse(target)); -} - -export function targetFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Target$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Target' from JSON`, - ); -} - -/** @internal */ -export const RuleMatchingStrategy$inboundSchema: z.ZodNativeEnum< - typeof RuleMatchingStrategy -> = z.nativeEnum(RuleMatchingStrategy); - -/** @internal */ -export const RuleMatchingStrategy$outboundSchema: z.ZodNativeEnum< - typeof RuleMatchingStrategy -> = RuleMatchingStrategy$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RuleMatchingStrategy$ { - /** @deprecated use `RuleMatchingStrategy$inboundSchema` instead. */ - export const inboundSchema = RuleMatchingStrategy$inboundSchema; - /** @deprecated use `RuleMatchingStrategy$outboundSchema` instead. */ - export const outboundSchema = RuleMatchingStrategy$outboundSchema; -} - -/** @internal */ -export const PostV1SignalsEmailTargets$inboundSchema: z.ZodType< - PostV1SignalsEmailTargets, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - slug: z.string().optional(), - description: z.string().optional(), - target: z.lazy(() => Target$inboundSchema).optional(), - allowed_senders: z.array(z.string()).optional(), - rules: z.array(z.string()).optional(), - rule_matching_strategy: RuleMatchingStrategy$inboundSchema.optional(), - status_cel: z.string().optional(), - level_cel: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "allowed_senders": "allowedSenders", - "rule_matching_strategy": "ruleMatchingStrategy", - "status_cel": "statusCel", - "level_cel": "levelCel", - }); -}); - -/** @internal */ -export type PostV1SignalsEmailTargets$Outbound = { - name: string; - slug?: string | undefined; - description?: string | undefined; - target?: Target$Outbound | undefined; - allowed_senders?: Array | undefined; - rules?: Array | undefined; - rule_matching_strategy?: string | undefined; - status_cel?: string | undefined; - level_cel?: string | undefined; -}; - -/** @internal */ -export const PostV1SignalsEmailTargets$outboundSchema: z.ZodType< - PostV1SignalsEmailTargets$Outbound, - z.ZodTypeDef, - PostV1SignalsEmailTargets -> = z.object({ - name: z.string(), - slug: z.string().optional(), - description: z.string().optional(), - target: z.lazy(() => Target$outboundSchema).optional(), - allowedSenders: z.array(z.string()).optional(), - rules: z.array(z.string()).optional(), - ruleMatchingStrategy: RuleMatchingStrategy$outboundSchema.optional(), - statusCel: z.string().optional(), - levelCel: z.string().optional(), -}).transform((v) => { - return remap$(v, { - allowedSenders: "allowed_senders", - ruleMatchingStrategy: "rule_matching_strategy", - statusCel: "status_cel", - levelCel: "level_cel", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SignalsEmailTargets$ { - /** @deprecated use `PostV1SignalsEmailTargets$inboundSchema` instead. */ - export const inboundSchema = PostV1SignalsEmailTargets$inboundSchema; - /** @deprecated use `PostV1SignalsEmailTargets$outboundSchema` instead. */ - export const outboundSchema = PostV1SignalsEmailTargets$outboundSchema; - /** @deprecated use `PostV1SignalsEmailTargets$Outbound` instead. */ - export type Outbound = PostV1SignalsEmailTargets$Outbound; -} - -export function postV1SignalsEmailTargetsToJSON( - postV1SignalsEmailTargets: PostV1SignalsEmailTargets, -): string { - return JSON.stringify( - PostV1SignalsEmailTargets$outboundSchema.parse(postV1SignalsEmailTargets), - ); -} - -export function postV1SignalsEmailTargetsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1SignalsEmailTargets$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1SignalsEmailTargets' from JSON`, - ); -} diff --git a/src/models/components/postv1signalswebhooktargets.ts b/src/models/components/postv1signalswebhooktargets.ts deleted file mode 100644 index 5aa319f4..00000000 --- a/src/models/components/postv1signalswebhooktargets.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a Signals webhook target. - */ -export type PostV1SignalsWebhookTargets = { - /** - * The webhook target's name. - */ - name: string; - /** - * An optional detailed description of the webhook target. - */ - description?: string | undefined; - /** - * The URL that the webhook target will notify. - */ - url: string; - /** - * An optional secret we will provide in the `FH-Signature` header - * - * @remarks - * when sending a payload to the webhook target. This key will not be - * shown in any response once configured. - */ - signingKey?: string | undefined; -}; - -/** @internal */ -export const PostV1SignalsWebhookTargets$inboundSchema: z.ZodType< - PostV1SignalsWebhookTargets, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - url: z.string(), - signing_key: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "signing_key": "signingKey", - }); -}); - -/** @internal */ -export type PostV1SignalsWebhookTargets$Outbound = { - name: string; - description?: string | undefined; - url: string; - signing_key?: string | undefined; -}; - -/** @internal */ -export const PostV1SignalsWebhookTargets$outboundSchema: z.ZodType< - PostV1SignalsWebhookTargets$Outbound, - z.ZodTypeDef, - PostV1SignalsWebhookTargets -> = z.object({ - name: z.string(), - description: z.string().optional(), - url: z.string(), - signingKey: z.string().optional(), -}).transform((v) => { - return remap$(v, { - signingKey: "signing_key", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1SignalsWebhookTargets$ { - /** @deprecated use `PostV1SignalsWebhookTargets$inboundSchema` instead. */ - export const inboundSchema = PostV1SignalsWebhookTargets$inboundSchema; - /** @deprecated use `PostV1SignalsWebhookTargets$outboundSchema` instead. */ - export const outboundSchema = PostV1SignalsWebhookTargets$outboundSchema; - /** @deprecated use `PostV1SignalsWebhookTargets$Outbound` instead. */ - export type Outbound = PostV1SignalsWebhookTargets$Outbound; -} - -export function postV1SignalsWebhookTargetsToJSON( - postV1SignalsWebhookTargets: PostV1SignalsWebhookTargets, -): string { - return JSON.stringify( - PostV1SignalsWebhookTargets$outboundSchema.parse( - postV1SignalsWebhookTargets, - ), - ); -} - -export function postV1SignalsWebhookTargetsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1SignalsWebhookTargets$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1SignalsWebhookTargets' from JSON`, - ); -} diff --git a/src/models/components/postv1statusupdatetemplates.ts b/src/models/components/postv1statusupdatetemplates.ts deleted file mode 100644 index f1d3110c..00000000 --- a/src/models/components/postv1statusupdatetemplates.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a status update template for your organization - */ -export type PostV1StatusUpdateTemplates = { - name: string; - body: string; -}; - -/** @internal */ -export const PostV1StatusUpdateTemplates$inboundSchema: z.ZodType< - PostV1StatusUpdateTemplates, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - body: z.string(), -}); - -/** @internal */ -export type PostV1StatusUpdateTemplates$Outbound = { - name: string; - body: string; -}; - -/** @internal */ -export const PostV1StatusUpdateTemplates$outboundSchema: z.ZodType< - PostV1StatusUpdateTemplates$Outbound, - z.ZodTypeDef, - PostV1StatusUpdateTemplates -> = z.object({ - name: z.string(), - body: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1StatusUpdateTemplates$ { - /** @deprecated use `PostV1StatusUpdateTemplates$inboundSchema` instead. */ - export const inboundSchema = PostV1StatusUpdateTemplates$inboundSchema; - /** @deprecated use `PostV1StatusUpdateTemplates$outboundSchema` instead. */ - export const outboundSchema = PostV1StatusUpdateTemplates$outboundSchema; - /** @deprecated use `PostV1StatusUpdateTemplates$Outbound` instead. */ - export type Outbound = PostV1StatusUpdateTemplates$Outbound; -} - -export function postV1StatusUpdateTemplatesToJSON( - postV1StatusUpdateTemplates: PostV1StatusUpdateTemplates, -): string { - return JSON.stringify( - PostV1StatusUpdateTemplates$outboundSchema.parse( - postV1StatusUpdateTemplates, - ), - ); -} - -export function postV1StatusUpdateTemplatesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1StatusUpdateTemplates$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1StatusUpdateTemplates' from JSON`, - ); -} diff --git a/src/models/components/postv1tasklists.ts b/src/models/components/postv1tasklists.ts deleted file mode 100644 index 78d31574..00000000 --- a/src/models/components/postv1tasklists.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TaskListItems = { - /** - * A summary of the task - */ - summary: string; - /** - * A long-form description for the task if additional context is helpful - */ - description?: string | undefined; -}; - -/** - * Creates a new task list - */ -export type PostV1TaskLists = { - name: string; - description?: string | undefined; - taskListItems: Array; -}; - -/** @internal */ -export const TaskListItems$inboundSchema: z.ZodType< - TaskListItems, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string(), - description: z.string().optional(), -}); - -/** @internal */ -export type TaskListItems$Outbound = { - summary: string; - description?: string | undefined; -}; - -/** @internal */ -export const TaskListItems$outboundSchema: z.ZodType< - TaskListItems$Outbound, - z.ZodTypeDef, - TaskListItems -> = z.object({ - summary: z.string(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TaskListItems$ { - /** @deprecated use `TaskListItems$inboundSchema` instead. */ - export const inboundSchema = TaskListItems$inboundSchema; - /** @deprecated use `TaskListItems$outboundSchema` instead. */ - export const outboundSchema = TaskListItems$outboundSchema; - /** @deprecated use `TaskListItems$Outbound` instead. */ - export type Outbound = TaskListItems$Outbound; -} - -export function taskListItemsToJSON(taskListItems: TaskListItems): string { - return JSON.stringify(TaskListItems$outboundSchema.parse(taskListItems)); -} - -export function taskListItemsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TaskListItems$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TaskListItems' from JSON`, - ); -} - -/** @internal */ -export const PostV1TaskLists$inboundSchema: z.ZodType< - PostV1TaskLists, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - task_list_items: z.array(z.lazy(() => TaskListItems$inboundSchema)), -}).transform((v) => { - return remap$(v, { - "task_list_items": "taskListItems", - }); -}); - -/** @internal */ -export type PostV1TaskLists$Outbound = { - name: string; - description?: string | undefined; - task_list_items: Array; -}; - -/** @internal */ -export const PostV1TaskLists$outboundSchema: z.ZodType< - PostV1TaskLists$Outbound, - z.ZodTypeDef, - PostV1TaskLists -> = z.object({ - name: z.string(), - description: z.string().optional(), - taskListItems: z.array(z.lazy(() => TaskListItems$outboundSchema)), -}).transform((v) => { - return remap$(v, { - taskListItems: "task_list_items", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TaskLists$ { - /** @deprecated use `PostV1TaskLists$inboundSchema` instead. */ - export const inboundSchema = PostV1TaskLists$inboundSchema; - /** @deprecated use `PostV1TaskLists$outboundSchema` instead. */ - export const outboundSchema = PostV1TaskLists$outboundSchema; - /** @deprecated use `PostV1TaskLists$Outbound` instead. */ - export type Outbound = PostV1TaskLists$Outbound; -} - -export function postV1TaskListsToJSON( - postV1TaskLists: PostV1TaskLists, -): string { - return JSON.stringify(PostV1TaskLists$outboundSchema.parse(postV1TaskLists)); -} - -export function postV1TaskListsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1TaskLists$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1TaskLists' from JSON`, - ); -} diff --git a/src/models/components/postv1teams.ts b/src/models/components/postv1teams.ts deleted file mode 100644 index 8d97ed66..00000000 --- a/src/models/components/postv1teams.ts +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * MS Teams channel identity for channel associated with this team - */ -export type MsTeamsChannel = { - channelId: string; - msTeamId: string; -}; - -export type Memberships = { - userId?: string | undefined; - scheduleId?: string | undefined; - /** - * An incident role ID that this user will automatically assigned if this team is assigned to an incident - */ - incidentRoleId?: string | undefined; -}; - -/** - * Create a new team - */ -export type PostV1Teams = { - name: string; - description?: string | undefined; - slug?: string | undefined; - /** - * The Slack channel ID that this team is associated with - */ - slackChannelId?: string | undefined; - /** - * MS Teams channel identity for channel associated with this team - */ - msTeamsChannel?: MsTeamsChannel | undefined; - memberships?: Array | undefined; -}; - -/** @internal */ -export const MsTeamsChannel$inboundSchema: z.ZodType< - MsTeamsChannel, - z.ZodTypeDef, - unknown -> = z.object({ - channel_id: z.string(), - ms_team_id: z.string(), -}).transform((v) => { - return remap$(v, { - "channel_id": "channelId", - "ms_team_id": "msTeamId", - }); -}); - -/** @internal */ -export type MsTeamsChannel$Outbound = { - channel_id: string; - ms_team_id: string; -}; - -/** @internal */ -export const MsTeamsChannel$outboundSchema: z.ZodType< - MsTeamsChannel$Outbound, - z.ZodTypeDef, - MsTeamsChannel -> = z.object({ - channelId: z.string(), - msTeamId: z.string(), -}).transform((v) => { - return remap$(v, { - channelId: "channel_id", - msTeamId: "ms_team_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MsTeamsChannel$ { - /** @deprecated use `MsTeamsChannel$inboundSchema` instead. */ - export const inboundSchema = MsTeamsChannel$inboundSchema; - /** @deprecated use `MsTeamsChannel$outboundSchema` instead. */ - export const outboundSchema = MsTeamsChannel$outboundSchema; - /** @deprecated use `MsTeamsChannel$Outbound` instead. */ - export type Outbound = MsTeamsChannel$Outbound; -} - -export function msTeamsChannelToJSON(msTeamsChannel: MsTeamsChannel): string { - return JSON.stringify(MsTeamsChannel$outboundSchema.parse(msTeamsChannel)); -} - -export function msTeamsChannelFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MsTeamsChannel$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MsTeamsChannel' from JSON`, - ); -} - -/** @internal */ -export const Memberships$inboundSchema: z.ZodType< - Memberships, - z.ZodTypeDef, - unknown -> = z.object({ - user_id: z.string().optional(), - schedule_id: z.string().optional(), - incident_role_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - "schedule_id": "scheduleId", - "incident_role_id": "incidentRoleId", - }); -}); - -/** @internal */ -export type Memberships$Outbound = { - user_id?: string | undefined; - schedule_id?: string | undefined; - incident_role_id?: string | undefined; -}; - -/** @internal */ -export const Memberships$outboundSchema: z.ZodType< - Memberships$Outbound, - z.ZodTypeDef, - Memberships -> = z.object({ - userId: z.string().optional(), - scheduleId: z.string().optional(), - incidentRoleId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - userId: "user_id", - scheduleId: "schedule_id", - incidentRoleId: "incident_role_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Memberships$ { - /** @deprecated use `Memberships$inboundSchema` instead. */ - export const inboundSchema = Memberships$inboundSchema; - /** @deprecated use `Memberships$outboundSchema` instead. */ - export const outboundSchema = Memberships$outboundSchema; - /** @deprecated use `Memberships$Outbound` instead. */ - export type Outbound = Memberships$Outbound; -} - -export function membershipsToJSON(memberships: Memberships): string { - return JSON.stringify(Memberships$outboundSchema.parse(memberships)); -} - -export function membershipsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Memberships$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Memberships' from JSON`, - ); -} - -/** @internal */ -export const PostV1Teams$inboundSchema: z.ZodType< - PostV1Teams, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - slug: z.string().optional(), - slack_channel_id: z.string().optional(), - ms_teams_channel: z.lazy(() => MsTeamsChannel$inboundSchema).optional(), - memberships: z.array(z.lazy(() => Memberships$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "slack_channel_id": "slackChannelId", - "ms_teams_channel": "msTeamsChannel", - }); -}); - -/** @internal */ -export type PostV1Teams$Outbound = { - name: string; - description?: string | undefined; - slug?: string | undefined; - slack_channel_id?: string | undefined; - ms_teams_channel?: MsTeamsChannel$Outbound | undefined; - memberships?: Array | undefined; -}; - -/** @internal */ -export const PostV1Teams$outboundSchema: z.ZodType< - PostV1Teams$Outbound, - z.ZodTypeDef, - PostV1Teams -> = z.object({ - name: z.string(), - description: z.string().optional(), - slug: z.string().optional(), - slackChannelId: z.string().optional(), - msTeamsChannel: z.lazy(() => MsTeamsChannel$outboundSchema).optional(), - memberships: z.array(z.lazy(() => Memberships$outboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - slackChannelId: "slack_channel_id", - msTeamsChannel: "ms_teams_channel", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Teams$ { - /** @deprecated use `PostV1Teams$inboundSchema` instead. */ - export const inboundSchema = PostV1Teams$inboundSchema; - /** @deprecated use `PostV1Teams$outboundSchema` instead. */ - export const outboundSchema = PostV1Teams$outboundSchema; - /** @deprecated use `PostV1Teams$Outbound` instead. */ - export type Outbound = PostV1Teams$Outbound; -} - -export function postV1TeamsToJSON(postV1Teams: PostV1Teams): string { - return JSON.stringify(PostV1Teams$outboundSchema.parse(postV1Teams)); -} - -export function postV1TeamsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Teams$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Teams' from JSON`, - ); -} diff --git a/src/models/components/postv1teamsteamidescalationpolicies.ts b/src/models/components/postv1teamsteamidescalationpolicies.ts deleted file mode 100644 index eb3b6f4a..00000000 --- a/src/models/components/postv1teamsteamidescalationpolicies.ts +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of target that the step will notify. - */ -export const PostV1TeamsTeamIdEscalationPoliciesType = { - OnCallSchedule: "OnCallSchedule", - User: "User", - SlackChannel: "SlackChannel", - EntireTeam: "EntireTeam", - Webhook: "Webhook", -} as const; -/** - * The type of target that the step will notify. - */ -export type PostV1TeamsTeamIdEscalationPoliciesType = ClosedEnum< - typeof PostV1TeamsTeamIdEscalationPoliciesType ->; - -export type Targets = { - /** - * The type of target that the step will notify. - */ - type: PostV1TeamsTeamIdEscalationPoliciesType; - /** - * The ID of the target that the step will notify. - */ - id: string; -}; - -export type PostV1TeamsTeamIdEscalationPoliciesSteps = { - /** - * A list of targets that the step will notify. You can specify up to 15 targets per step. - */ - targets: Array; - /** - * An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. - */ - timeout: string; -}; - -/** - * The type of target to which the policy will hand off. - */ -export const PostV1TeamsTeamIdEscalationPoliciesTargetType = { - EscalationPolicy: "EscalationPolicy", - Team: "Team", -} as const; -/** - * The type of target to which the policy will hand off. - */ -export type PostV1TeamsTeamIdEscalationPoliciesTargetType = ClosedEnum< - typeof PostV1TeamsTeamIdEscalationPoliciesTargetType ->; - -/** - * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. - */ -export type HandoffStep = { - /** - * The type of target to which the policy will hand off. - */ - targetType: PostV1TeamsTeamIdEscalationPoliciesTargetType; - /** - * The ID of the target to which the policy will hand off. - */ - targetId: string; -}; - -/** - * Create a Signals escalation policy for a team. - */ -export type PostV1TeamsTeamIdEscalationPolicies = { - /** - * The escalation policy's name. - */ - name: string; - /** - * A detailed description of the escalation policy. - */ - description?: string | undefined; - /** - * The number of times that the escalation policy should repeat before an alert is dropped. - */ - repetitions?: number | undefined; - /** - * Whether this escalation policy should be the default for the team. - */ - default?: boolean | undefined; - /** - * A list of steps that define how an alert should escalate through the policy. - */ - steps: Array; - /** - * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. - */ - handoffStep?: HandoffStep | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPoliciesType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PostV1TeamsTeamIdEscalationPoliciesType); - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPoliciesType$outboundSchema: - z.ZodNativeEnum = - PostV1TeamsTeamIdEscalationPoliciesType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdEscalationPoliciesType$ { - /** @deprecated use `PostV1TeamsTeamIdEscalationPoliciesType$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdEscalationPoliciesType$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdEscalationPoliciesType$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdEscalationPoliciesType$outboundSchema; -} - -/** @internal */ -export const Targets$inboundSchema: z.ZodType = - z.object({ - type: PostV1TeamsTeamIdEscalationPoliciesType$inboundSchema, - id: z.string(), - }); - -/** @internal */ -export type Targets$Outbound = { - type: string; - id: string; -}; - -/** @internal */ -export const Targets$outboundSchema: z.ZodType< - Targets$Outbound, - z.ZodTypeDef, - Targets -> = z.object({ - type: PostV1TeamsTeamIdEscalationPoliciesType$outboundSchema, - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Targets$ { - /** @deprecated use `Targets$inboundSchema` instead. */ - export const inboundSchema = Targets$inboundSchema; - /** @deprecated use `Targets$outboundSchema` instead. */ - export const outboundSchema = Targets$outboundSchema; - /** @deprecated use `Targets$Outbound` instead. */ - export type Outbound = Targets$Outbound; -} - -export function targetsToJSON(targets: Targets): string { - return JSON.stringify(Targets$outboundSchema.parse(targets)); -} - -export function targetsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Targets$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Targets' from JSON`, - ); -} - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPoliciesSteps$inboundSchema: z.ZodType< - PostV1TeamsTeamIdEscalationPoliciesSteps, - z.ZodTypeDef, - unknown -> = z.object({ - targets: z.array(z.lazy(() => Targets$inboundSchema)), - timeout: z.string(), -}); - -/** @internal */ -export type PostV1TeamsTeamIdEscalationPoliciesSteps$Outbound = { - targets: Array; - timeout: string; -}; - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPoliciesSteps$outboundSchema: z.ZodType< - PostV1TeamsTeamIdEscalationPoliciesSteps$Outbound, - z.ZodTypeDef, - PostV1TeamsTeamIdEscalationPoliciesSteps -> = z.object({ - targets: z.array(z.lazy(() => Targets$outboundSchema)), - timeout: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdEscalationPoliciesSteps$ { - /** @deprecated use `PostV1TeamsTeamIdEscalationPoliciesSteps$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdEscalationPoliciesSteps$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdEscalationPoliciesSteps$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdEscalationPoliciesSteps$outboundSchema; - /** @deprecated use `PostV1TeamsTeamIdEscalationPoliciesSteps$Outbound` instead. */ - export type Outbound = PostV1TeamsTeamIdEscalationPoliciesSteps$Outbound; -} - -export function postV1TeamsTeamIdEscalationPoliciesStepsToJSON( - postV1TeamsTeamIdEscalationPoliciesSteps: - PostV1TeamsTeamIdEscalationPoliciesSteps, -): string { - return JSON.stringify( - PostV1TeamsTeamIdEscalationPoliciesSteps$outboundSchema.parse( - postV1TeamsTeamIdEscalationPoliciesSteps, - ), - ); -} - -export function postV1TeamsTeamIdEscalationPoliciesStepsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1TeamsTeamIdEscalationPoliciesSteps, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1TeamsTeamIdEscalationPoliciesSteps$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1TeamsTeamIdEscalationPoliciesSteps' from JSON`, - ); -} - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPoliciesTargetType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(PostV1TeamsTeamIdEscalationPoliciesTargetType); - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPoliciesTargetType$outboundSchema: - z.ZodNativeEnum = - PostV1TeamsTeamIdEscalationPoliciesTargetType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdEscalationPoliciesTargetType$ { - /** @deprecated use `PostV1TeamsTeamIdEscalationPoliciesTargetType$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdEscalationPoliciesTargetType$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdEscalationPoliciesTargetType$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdEscalationPoliciesTargetType$outboundSchema; -} - -/** @internal */ -export const HandoffStep$inboundSchema: z.ZodType< - HandoffStep, - z.ZodTypeDef, - unknown -> = z.object({ - target_type: PostV1TeamsTeamIdEscalationPoliciesTargetType$inboundSchema, - target_id: z.string(), -}).transform((v) => { - return remap$(v, { - "target_type": "targetType", - "target_id": "targetId", - }); -}); - -/** @internal */ -export type HandoffStep$Outbound = { - target_type: string; - target_id: string; -}; - -/** @internal */ -export const HandoffStep$outboundSchema: z.ZodType< - HandoffStep$Outbound, - z.ZodTypeDef, - HandoffStep -> = z.object({ - targetType: PostV1TeamsTeamIdEscalationPoliciesTargetType$outboundSchema, - targetId: z.string(), -}).transform((v) => { - return remap$(v, { - targetType: "target_type", - targetId: "target_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace HandoffStep$ { - /** @deprecated use `HandoffStep$inboundSchema` instead. */ - export const inboundSchema = HandoffStep$inboundSchema; - /** @deprecated use `HandoffStep$outboundSchema` instead. */ - export const outboundSchema = HandoffStep$outboundSchema; - /** @deprecated use `HandoffStep$Outbound` instead. */ - export type Outbound = HandoffStep$Outbound; -} - -export function handoffStepToJSON(handoffStep: HandoffStep): string { - return JSON.stringify(HandoffStep$outboundSchema.parse(handoffStep)); -} - -export function handoffStepFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => HandoffStep$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'HandoffStep' from JSON`, - ); -} - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPolicies$inboundSchema: z.ZodType< - PostV1TeamsTeamIdEscalationPolicies, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - repetitions: z.number().int().default(0), - default: z.boolean().default(false), - steps: z.array( - z.lazy(() => PostV1TeamsTeamIdEscalationPoliciesSteps$inboundSchema), - ), - handoff_step: z.lazy(() => HandoffStep$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "handoff_step": "handoffStep", - }); -}); - -/** @internal */ -export type PostV1TeamsTeamIdEscalationPolicies$Outbound = { - name: string; - description?: string | undefined; - repetitions: number; - default: boolean; - steps: Array; - handoff_step?: HandoffStep$Outbound | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdEscalationPolicies$outboundSchema: z.ZodType< - PostV1TeamsTeamIdEscalationPolicies$Outbound, - z.ZodTypeDef, - PostV1TeamsTeamIdEscalationPolicies -> = z.object({ - name: z.string(), - description: z.string().optional(), - repetitions: z.number().int().default(0), - default: z.boolean().default(false), - steps: z.array( - z.lazy(() => PostV1TeamsTeamIdEscalationPoliciesSteps$outboundSchema), - ), - handoffStep: z.lazy(() => HandoffStep$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - handoffStep: "handoff_step", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdEscalationPolicies$ { - /** @deprecated use `PostV1TeamsTeamIdEscalationPolicies$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdEscalationPolicies$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdEscalationPolicies$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdEscalationPolicies$outboundSchema; - /** @deprecated use `PostV1TeamsTeamIdEscalationPolicies$Outbound` instead. */ - export type Outbound = PostV1TeamsTeamIdEscalationPolicies$Outbound; -} - -export function postV1TeamsTeamIdEscalationPoliciesToJSON( - postV1TeamsTeamIdEscalationPolicies: PostV1TeamsTeamIdEscalationPolicies, -): string { - return JSON.stringify( - PostV1TeamsTeamIdEscalationPolicies$outboundSchema.parse( - postV1TeamsTeamIdEscalationPolicies, - ), - ); -} - -export function postV1TeamsTeamIdEscalationPoliciesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PostV1TeamsTeamIdEscalationPolicies$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1TeamsTeamIdEscalationPolicies' from JSON`, - ); -} diff --git a/src/models/components/postv1teamsteamidoncallschedules.ts b/src/models/components/postv1teamsteamidoncallschedules.ts deleted file mode 100644 index 169b60e9..00000000 --- a/src/models/components/postv1teamsteamidoncallschedules.ts +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PostV1TeamsTeamIdOnCallSchedulesMembers = { - /** - * The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule - * - * @remarks - * multiple times to construct more complex rotations, and you can specify a `null` user ID to create - * unassigned slots in the rotation. - */ - userId?: string | undefined; -}; - -/** - * The type of strategy. Must be one of "daily", "weekly", or "custom". - */ -export const PostV1TeamsTeamIdOnCallSchedulesType = { - Daily: "daily", - Weekly: "weekly", - Custom: "custom", -} as const; -/** - * The type of strategy. Must be one of "daily", "weekly", or "custom". - */ -export type PostV1TeamsTeamIdOnCallSchedulesType = ClosedEnum< - typeof PostV1TeamsTeamIdOnCallSchedulesType ->; - -/** - * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - */ -export const HandoffDay = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", -} as const; -/** - * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - */ -export type HandoffDay = ClosedEnum; - -/** - * An object that specifies how the schedule's on-call shifts should be generated. - */ -export type Strategy = { - /** - * The type of strategy. Must be one of "daily", "weekly", or "custom". - */ - type: PostV1TeamsTeamIdOnCallSchedulesType; - /** - * An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". - */ - handoffTime?: string | undefined; - /** - * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". - */ - handoffDay?: HandoffDay | undefined; - /** - * An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". - */ - shiftDuration?: string | undefined; -}; - -/** - * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export const StartDay = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", -} as const; -/** - * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export type StartDay = ClosedEnum; - -/** - * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export const EndDay = { - Monday: "monday", - Tuesday: "tuesday", - Wednesday: "wednesday", - Thursday: "thursday", - Friday: "friday", - Saturday: "saturday", - Sunday: "sunday", -} as const; -/** - * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - */ -export type EndDay = ClosedEnum; - -export type Restrictions = { - /** - * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). - */ - startDay: StartDay; - /** - * An ISO8601 time string specifying when the restriction should start. - */ - startTime: string; - /** - * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). - */ - endDay: EndDay; - /** - * An ISO8601 time string specifying when the restriction should end. - */ - endTime: string; -}; - -/** - * Create a Signals on-call schedule for a team. - */ -export type PostV1TeamsTeamIdOnCallSchedules = { - /** - * The on-call schedule's name. - */ - name: string; - /** - * A detailed description of the on-call schedule. - */ - description?: string | undefined; - /** - * The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. - */ - timeZone: string; - /** - * The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. - */ - slackUserGroupId?: string | undefined; - /** - * An ordered list of objects that specify members of the on-call schedule's rotation. - */ - members?: Array | undefined; - /** - * An object that specifies how the schedule's on-call shifts should be generated. - */ - strategy: Strategy; - /** - * A list of objects that restrict the schedule to speccific on-call periods. - */ - restrictions?: Array | undefined; - /** - * An ISO8601 time string specifying when the schedule's first shift should start. This value is only used if the schedule's strategy is "custom". - */ - startTime?: string | undefined; - /** - * A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. - */ - color?: string | undefined; - /** - * This parameter is deprecated; use `members` instead. - */ - memberIds?: Array | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedulesMembers$inboundSchema: z.ZodType< - PostV1TeamsTeamIdOnCallSchedulesMembers, - z.ZodTypeDef, - unknown -> = z.object({ - user_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "user_id": "userId", - }); -}); - -/** @internal */ -export type PostV1TeamsTeamIdOnCallSchedulesMembers$Outbound = { - user_id?: string | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedulesMembers$outboundSchema: z.ZodType< - PostV1TeamsTeamIdOnCallSchedulesMembers$Outbound, - z.ZodTypeDef, - PostV1TeamsTeamIdOnCallSchedulesMembers -> = z.object({ - userId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - userId: "user_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdOnCallSchedulesMembers$ { - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesMembers$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdOnCallSchedulesMembers$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesMembers$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdOnCallSchedulesMembers$outboundSchema; - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesMembers$Outbound` instead. */ - export type Outbound = PostV1TeamsTeamIdOnCallSchedulesMembers$Outbound; -} - -export function postV1TeamsTeamIdOnCallSchedulesMembersToJSON( - postV1TeamsTeamIdOnCallSchedulesMembers: - PostV1TeamsTeamIdOnCallSchedulesMembers, -): string { - return JSON.stringify( - PostV1TeamsTeamIdOnCallSchedulesMembers$outboundSchema.parse( - postV1TeamsTeamIdOnCallSchedulesMembers, - ), - ); -} - -export function postV1TeamsTeamIdOnCallSchedulesMembersFromJSON( - jsonString: string, -): SafeParseResult< - PostV1TeamsTeamIdOnCallSchedulesMembers, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1TeamsTeamIdOnCallSchedulesMembers$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1TeamsTeamIdOnCallSchedulesMembers' from JSON`, - ); -} - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedulesType$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - PostV1TeamsTeamIdOnCallSchedulesType, - ); - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedulesType$outboundSchema: - z.ZodNativeEnum = - PostV1TeamsTeamIdOnCallSchedulesType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdOnCallSchedulesType$ { - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesType$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdOnCallSchedulesType$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesType$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdOnCallSchedulesType$outboundSchema; -} - -/** @internal */ -export const HandoffDay$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(HandoffDay); - -/** @internal */ -export const HandoffDay$outboundSchema: z.ZodNativeEnum = - HandoffDay$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace HandoffDay$ { - /** @deprecated use `HandoffDay$inboundSchema` instead. */ - export const inboundSchema = HandoffDay$inboundSchema; - /** @deprecated use `HandoffDay$outboundSchema` instead. */ - export const outboundSchema = HandoffDay$outboundSchema; -} - -/** @internal */ -export const Strategy$inboundSchema: z.ZodType< - Strategy, - z.ZodTypeDef, - unknown -> = z.object({ - type: PostV1TeamsTeamIdOnCallSchedulesType$inboundSchema, - handoff_time: z.string().optional(), - handoff_day: HandoffDay$inboundSchema.optional(), - shift_duration: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "handoff_time": "handoffTime", - "handoff_day": "handoffDay", - "shift_duration": "shiftDuration", - }); -}); - -/** @internal */ -export type Strategy$Outbound = { - type: string; - handoff_time?: string | undefined; - handoff_day?: string | undefined; - shift_duration?: string | undefined; -}; - -/** @internal */ -export const Strategy$outboundSchema: z.ZodType< - Strategy$Outbound, - z.ZodTypeDef, - Strategy -> = z.object({ - type: PostV1TeamsTeamIdOnCallSchedulesType$outboundSchema, - handoffTime: z.string().optional(), - handoffDay: HandoffDay$outboundSchema.optional(), - shiftDuration: z.string().optional(), -}).transform((v) => { - return remap$(v, { - handoffTime: "handoff_time", - handoffDay: "handoff_day", - shiftDuration: "shift_duration", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Strategy$ { - /** @deprecated use `Strategy$inboundSchema` instead. */ - export const inboundSchema = Strategy$inboundSchema; - /** @deprecated use `Strategy$outboundSchema` instead. */ - export const outboundSchema = Strategy$outboundSchema; - /** @deprecated use `Strategy$Outbound` instead. */ - export type Outbound = Strategy$Outbound; -} - -export function strategyToJSON(strategy: Strategy): string { - return JSON.stringify(Strategy$outboundSchema.parse(strategy)); -} - -export function strategyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Strategy$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Strategy' from JSON`, - ); -} - -/** @internal */ -export const StartDay$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(StartDay); - -/** @internal */ -export const StartDay$outboundSchema: z.ZodNativeEnum = - StartDay$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StartDay$ { - /** @deprecated use `StartDay$inboundSchema` instead. */ - export const inboundSchema = StartDay$inboundSchema; - /** @deprecated use `StartDay$outboundSchema` instead. */ - export const outboundSchema = StartDay$outboundSchema; -} - -/** @internal */ -export const EndDay$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(EndDay); - -/** @internal */ -export const EndDay$outboundSchema: z.ZodNativeEnum = - EndDay$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EndDay$ { - /** @deprecated use `EndDay$inboundSchema` instead. */ - export const inboundSchema = EndDay$inboundSchema; - /** @deprecated use `EndDay$outboundSchema` instead. */ - export const outboundSchema = EndDay$outboundSchema; -} - -/** @internal */ -export const Restrictions$inboundSchema: z.ZodType< - Restrictions, - z.ZodTypeDef, - unknown -> = z.object({ - start_day: StartDay$inboundSchema, - start_time: z.string(), - end_day: EndDay$inboundSchema, - end_time: z.string(), -}).transform((v) => { - return remap$(v, { - "start_day": "startDay", - "start_time": "startTime", - "end_day": "endDay", - "end_time": "endTime", - }); -}); - -/** @internal */ -export type Restrictions$Outbound = { - start_day: string; - start_time: string; - end_day: string; - end_time: string; -}; - -/** @internal */ -export const Restrictions$outboundSchema: z.ZodType< - Restrictions$Outbound, - z.ZodTypeDef, - Restrictions -> = z.object({ - startDay: StartDay$outboundSchema, - startTime: z.string(), - endDay: EndDay$outboundSchema, - endTime: z.string(), -}).transform((v) => { - return remap$(v, { - startDay: "start_day", - startTime: "start_time", - endDay: "end_day", - endTime: "end_time", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Restrictions$ { - /** @deprecated use `Restrictions$inboundSchema` instead. */ - export const inboundSchema = Restrictions$inboundSchema; - /** @deprecated use `Restrictions$outboundSchema` instead. */ - export const outboundSchema = Restrictions$outboundSchema; - /** @deprecated use `Restrictions$Outbound` instead. */ - export type Outbound = Restrictions$Outbound; -} - -export function restrictionsToJSON(restrictions: Restrictions): string { - return JSON.stringify(Restrictions$outboundSchema.parse(restrictions)); -} - -export function restrictionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Restrictions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Restrictions' from JSON`, - ); -} - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedules$inboundSchema: z.ZodType< - PostV1TeamsTeamIdOnCallSchedules, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - time_zone: z.string(), - slack_user_group_id: z.string().optional(), - members: z.array( - z.lazy(() => PostV1TeamsTeamIdOnCallSchedulesMembers$inboundSchema), - ).optional(), - strategy: z.lazy(() => Strategy$inboundSchema), - restrictions: z.array(z.lazy(() => Restrictions$inboundSchema)).optional(), - start_time: z.string().optional(), - color: z.string().optional(), - member_ids: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - "time_zone": "timeZone", - "slack_user_group_id": "slackUserGroupId", - "start_time": "startTime", - "member_ids": "memberIds", - }); -}); - -/** @internal */ -export type PostV1TeamsTeamIdOnCallSchedules$Outbound = { - name: string; - description?: string | undefined; - time_zone: string; - slack_user_group_id?: string | undefined; - members?: Array | undefined; - strategy: Strategy$Outbound; - restrictions?: Array | undefined; - start_time?: string | undefined; - color?: string | undefined; - member_ids?: Array | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedules$outboundSchema: z.ZodType< - PostV1TeamsTeamIdOnCallSchedules$Outbound, - z.ZodTypeDef, - PostV1TeamsTeamIdOnCallSchedules -> = z.object({ - name: z.string(), - description: z.string().optional(), - timeZone: z.string(), - slackUserGroupId: z.string().optional(), - members: z.array( - z.lazy(() => PostV1TeamsTeamIdOnCallSchedulesMembers$outboundSchema), - ).optional(), - strategy: z.lazy(() => Strategy$outboundSchema), - restrictions: z.array(z.lazy(() => Restrictions$outboundSchema)).optional(), - startTime: z.string().optional(), - color: z.string().optional(), - memberIds: z.array(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - timeZone: "time_zone", - slackUserGroupId: "slack_user_group_id", - startTime: "start_time", - memberIds: "member_ids", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdOnCallSchedules$ { - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedules$inboundSchema` instead. */ - export const inboundSchema = PostV1TeamsTeamIdOnCallSchedules$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedules$outboundSchema` instead. */ - export const outboundSchema = PostV1TeamsTeamIdOnCallSchedules$outboundSchema; - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedules$Outbound` instead. */ - export type Outbound = PostV1TeamsTeamIdOnCallSchedules$Outbound; -} - -export function postV1TeamsTeamIdOnCallSchedulesToJSON( - postV1TeamsTeamIdOnCallSchedules: PostV1TeamsTeamIdOnCallSchedules, -): string { - return JSON.stringify( - PostV1TeamsTeamIdOnCallSchedules$outboundSchema.parse( - postV1TeamsTeamIdOnCallSchedules, - ), - ); -} - -export function postV1TeamsTeamIdOnCallSchedulesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1TeamsTeamIdOnCallSchedules$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1TeamsTeamIdOnCallSchedules' from JSON`, - ); -} diff --git a/src/models/components/postv1teamsteamidoncallschedulesscheduleidshifts.ts b/src/models/components/postv1teamsteamidoncallschedulesscheduleidshifts.ts deleted file mode 100644 index aeeb396f..00000000 --- a/src/models/components/postv1teamsteamidoncallschedulesscheduleidshifts.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a Signals on-call shift in a schedule. - */ -export type PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts = { - /** - * The start time of the shift in ISO8601 format. - */ - startTime: string; - /** - * The end time of the shift in ISO8601 format. - */ - endTime: string; - /** - * The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. - */ - userId?: string | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$inboundSchema: - z.ZodType< - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts, - z.ZodTypeDef, - unknown - > = z.object({ - start_time: z.string(), - end_time: z.string(), - user_id: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "start_time": "startTime", - "end_time": "endTime", - "user_id": "userId", - }); - }); - -/** @internal */ -export type PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$Outbound = { - start_time: string; - end_time: string; - user_id?: string | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$outboundSchema: - z.ZodType< - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$Outbound, - z.ZodTypeDef, - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts - > = z.object({ - startTime: z.string(), - endTime: z.string(), - userId: z.string().optional(), - }).transform((v) => { - return remap$(v, { - startTime: "start_time", - endTime: "end_time", - userId: "user_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$ { - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$outboundSchema; - /** @deprecated use `PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$Outbound` instead. */ - export type Outbound = - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$Outbound; -} - -export function postV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsToJSON( - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts, -): string { - return JSON.stringify( - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$outboundSchema.parse( - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts, - ), - ); -} - -export function postV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsFromJSON( - jsonString: string, -): SafeParseResult< - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts' from JSON`, - ); -} diff --git a/src/models/components/postv1teamsteamidsignalrules.ts b/src/models/components/postv1teamsteamidsignalrules.ts deleted file mode 100644 index 4d8d8745..00000000 --- a/src/models/components/postv1teamsteamidsignalrules.ts +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of target that the rule will notify when matched. - */ -export const TargetType = { - EscalationPolicy: "EscalationPolicy", - OnCallSchedule: "OnCallSchedule", - User: "User", - Webhook: "Webhook", -} as const; -/** - * The type of target that the rule will notify when matched. - */ -export type TargetType = ClosedEnum; - -/** - * A notification priority that will be set on the resulting alert (default: HIGH) - */ -export const PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride = { - High: "HIGH", - Medium: "MEDIUM", - Low: "LOW", - Unknown: "", -} as const; -/** - * A notification priority that will be set on the resulting alert (default: HIGH) - */ -export type PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride = - ClosedEnum; - -/** - * Create a Signals rule for a team. - */ -export type PostV1TeamsTeamIdSignalRules = { - /** - * The rule's name. - */ - name: string; - /** - * The CEL expression that defines the rule. - */ - expression: string; - /** - * The type of target that the rule will notify when matched. - */ - targetType: TargetType; - /** - * The ID of the target that the rule will notify when matched. - */ - targetId: string; - /** - * The ID of an incident type that should be used when an alert is promoted to an incident - */ - incidentTypeId?: string | undefined; - /** - * A notification priority that will be set on the resulting alert (default: HIGH) - */ - notificationPriorityOverride?: - | PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride - | undefined; -}; - -/** @internal */ -export const TargetType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(TargetType); - -/** @internal */ -export const TargetType$outboundSchema: z.ZodNativeEnum = - TargetType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TargetType$ { - /** @deprecated use `TargetType$inboundSchema` instead. */ - export const inboundSchema = TargetType$inboundSchema; - /** @deprecated use `TargetType$outboundSchema` instead. */ - export const outboundSchema = TargetType$outboundSchema; -} - -/** @internal */ -export const PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$inboundSchema: - z.ZodNativeEnum< - typeof PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride - > = z.nativeEnum(PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride); - -/** @internal */ -export const PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$outboundSchema: - z.ZodNativeEnum< - typeof PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride - > = PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$ { - /** @deprecated use `PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$inboundSchema` instead. */ - export const inboundSchema = - PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$outboundSchema` instead. */ - export const outboundSchema = - PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$outboundSchema; -} - -/** @internal */ -export const PostV1TeamsTeamIdSignalRules$inboundSchema: z.ZodType< - PostV1TeamsTeamIdSignalRules, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - expression: z.string(), - target_type: TargetType$inboundSchema, - target_id: z.string(), - incident_type_id: z.string().optional(), - notification_priority_override: - PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$inboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - "target_type": "targetType", - "target_id": "targetId", - "incident_type_id": "incidentTypeId", - "notification_priority_override": "notificationPriorityOverride", - }); -}); - -/** @internal */ -export type PostV1TeamsTeamIdSignalRules$Outbound = { - name: string; - expression: string; - target_type: string; - target_id: string; - incident_type_id?: string | undefined; - notification_priority_override?: string | undefined; -}; - -/** @internal */ -export const PostV1TeamsTeamIdSignalRules$outboundSchema: z.ZodType< - PostV1TeamsTeamIdSignalRules$Outbound, - z.ZodTypeDef, - PostV1TeamsTeamIdSignalRules -> = z.object({ - name: z.string(), - expression: z.string(), - targetType: TargetType$outboundSchema, - targetId: z.string(), - incidentTypeId: z.string().optional(), - notificationPriorityOverride: - PostV1TeamsTeamIdSignalRulesNotificationPriorityOverride$outboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - targetType: "target_type", - targetId: "target_id", - incidentTypeId: "incident_type_id", - notificationPriorityOverride: "notification_priority_override", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TeamsTeamIdSignalRules$ { - /** @deprecated use `PostV1TeamsTeamIdSignalRules$inboundSchema` instead. */ - export const inboundSchema = PostV1TeamsTeamIdSignalRules$inboundSchema; - /** @deprecated use `PostV1TeamsTeamIdSignalRules$outboundSchema` instead. */ - export const outboundSchema = PostV1TeamsTeamIdSignalRules$outboundSchema; - /** @deprecated use `PostV1TeamsTeamIdSignalRules$Outbound` instead. */ - export type Outbound = PostV1TeamsTeamIdSignalRules$Outbound; -} - -export function postV1TeamsTeamIdSignalRulesToJSON( - postV1TeamsTeamIdSignalRules: PostV1TeamsTeamIdSignalRules, -): string { - return JSON.stringify( - PostV1TeamsTeamIdSignalRules$outboundSchema.parse( - postV1TeamsTeamIdSignalRules, - ), - ); -} - -export function postV1TeamsTeamIdSignalRulesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1TeamsTeamIdSignalRules$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1TeamsTeamIdSignalRules' from JSON`, - ); -} diff --git a/src/models/components/postv1ticketingpriorities.ts b/src/models/components/postv1ticketingpriorities.ts deleted file mode 100644 index 6fe506a5..00000000 --- a/src/models/components/postv1ticketingpriorities.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a single ticketing priority - */ -export type PostV1TicketingPriorities = { - name: string; - /** - * The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, that priority and all priorities following it will automatically be moved down the list to make room for the new priority. - */ - position?: number | undefined; -}; - -/** @internal */ -export const PostV1TicketingPriorities$inboundSchema: z.ZodType< - PostV1TicketingPriorities, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - position: z.number().int().optional(), -}); - -/** @internal */ -export type PostV1TicketingPriorities$Outbound = { - name: string; - position?: number | undefined; -}; - -/** @internal */ -export const PostV1TicketingPriorities$outboundSchema: z.ZodType< - PostV1TicketingPriorities$Outbound, - z.ZodTypeDef, - PostV1TicketingPriorities -> = z.object({ - name: z.string(), - position: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TicketingPriorities$ { - /** @deprecated use `PostV1TicketingPriorities$inboundSchema` instead. */ - export const inboundSchema = PostV1TicketingPriorities$inboundSchema; - /** @deprecated use `PostV1TicketingPriorities$outboundSchema` instead. */ - export const outboundSchema = PostV1TicketingPriorities$outboundSchema; - /** @deprecated use `PostV1TicketingPriorities$Outbound` instead. */ - export type Outbound = PostV1TicketingPriorities$Outbound; -} - -export function postV1TicketingPrioritiesToJSON( - postV1TicketingPriorities: PostV1TicketingPriorities, -): string { - return JSON.stringify( - PostV1TicketingPriorities$outboundSchema.parse(postV1TicketingPriorities), - ); -} - -export function postV1TicketingPrioritiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1TicketingPriorities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1TicketingPriorities' from JSON`, - ); -} diff --git a/src/models/components/postv1ticketingtickets.ts b/src/models/components/postv1ticketingtickets.ts deleted file mode 100644 index c771994a..00000000 --- a/src/models/components/postv1ticketingtickets.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Creates a ticket for a project - */ -export type PostV1TicketingTickets = { - summary: string; - /** - * Which incident this ticket is related to, in the format of 'incident/UUID' - */ - relatedTo?: string | undefined; - projectId?: string | undefined; - description?: string | undefined; - state?: string | undefined; - type?: string | undefined; - priorityId?: string | undefined; - /** - * List of tags for the ticket - */ - tagList?: Array | undefined; - /** - * The remote URL for an existing ticket in a supported and configured ticketing integration - */ - remoteUrl?: string | undefined; -}; - -/** @internal */ -export const PostV1TicketingTickets$inboundSchema: z.ZodType< - PostV1TicketingTickets, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string(), - related_to: z.string().optional(), - project_id: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - type: z.string().optional(), - priority_id: z.string().optional(), - tag_list: z.array(z.string()).optional(), - remote_url: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "related_to": "relatedTo", - "project_id": "projectId", - "priority_id": "priorityId", - "tag_list": "tagList", - "remote_url": "remoteUrl", - }); -}); - -/** @internal */ -export type PostV1TicketingTickets$Outbound = { - summary: string; - related_to?: string | undefined; - project_id?: string | undefined; - description?: string | undefined; - state?: string | undefined; - type?: string | undefined; - priority_id?: string | undefined; - tag_list?: Array | undefined; - remote_url?: string | undefined; -}; - -/** @internal */ -export const PostV1TicketingTickets$outboundSchema: z.ZodType< - PostV1TicketingTickets$Outbound, - z.ZodTypeDef, - PostV1TicketingTickets -> = z.object({ - summary: z.string(), - relatedTo: z.string().optional(), - projectId: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - type: z.string().optional(), - priorityId: z.string().optional(), - tagList: z.array(z.string()).optional(), - remoteUrl: z.string().optional(), -}).transform((v) => { - return remap$(v, { - relatedTo: "related_to", - projectId: "project_id", - priorityId: "priority_id", - tagList: "tag_list", - remoteUrl: "remote_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1TicketingTickets$ { - /** @deprecated use `PostV1TicketingTickets$inboundSchema` instead. */ - export const inboundSchema = PostV1TicketingTickets$inboundSchema; - /** @deprecated use `PostV1TicketingTickets$outboundSchema` instead. */ - export const outboundSchema = PostV1TicketingTickets$outboundSchema; - /** @deprecated use `PostV1TicketingTickets$Outbound` instead. */ - export type Outbound = PostV1TicketingTickets$Outbound; -} - -export function postV1TicketingTicketsToJSON( - postV1TicketingTickets: PostV1TicketingTickets, -): string { - return JSON.stringify( - PostV1TicketingTickets$outboundSchema.parse(postV1TicketingTickets), - ); -} - -export function postV1TicketingTicketsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1TicketingTickets$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1TicketingTickets' from JSON`, - ); -} diff --git a/src/models/components/postv1webhooks.ts b/src/models/components/postv1webhooks.ts deleted file mode 100644 index 659708e3..00000000 --- a/src/models/components/postv1webhooks.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Create a new webhook - */ -export type PostV1Webhooks = { - url: string; -}; - -/** @internal */ -export const PostV1Webhooks$inboundSchema: z.ZodType< - PostV1Webhooks, - z.ZodTypeDef, - unknown -> = z.object({ - url: z.string(), -}); - -/** @internal */ -export type PostV1Webhooks$Outbound = { - url: string; -}; - -/** @internal */ -export const PostV1Webhooks$outboundSchema: z.ZodType< - PostV1Webhooks$Outbound, - z.ZodTypeDef, - PostV1Webhooks -> = z.object({ - url: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PostV1Webhooks$ { - /** @deprecated use `PostV1Webhooks$inboundSchema` instead. */ - export const inboundSchema = PostV1Webhooks$inboundSchema; - /** @deprecated use `PostV1Webhooks$outboundSchema` instead. */ - export const outboundSchema = PostV1Webhooks$outboundSchema; - /** @deprecated use `PostV1Webhooks$Outbound` instead. */ - export type Outbound = PostV1Webhooks$Outbound; -} - -export function postV1WebhooksToJSON(postV1Webhooks: PostV1Webhooks): string { - return JSON.stringify(PostV1Webhooks$outboundSchema.parse(postV1Webhooks)); -} - -export function postV1WebhooksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PostV1Webhooks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PostV1Webhooks' from JSON`, - ); -} diff --git a/src/models/components/priorityentity.ts b/src/models/components/priorityentity.ts index e05c79a2..7859e6e2 100644 --- a/src/models/components/priorityentity.ts +++ b/src/models/components/priorityentity.ts @@ -12,12 +12,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * PriorityEntity model */ export type PriorityEntity = { - slug?: string | undefined; - description?: string | undefined; - position?: number | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - default?: boolean | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + position?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + default?: boolean | null | undefined; }; /** @internal */ @@ -26,14 +26,16 @@ export const PriorityEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - position: z.number().int().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - default: z.boolean().optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + default: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -43,12 +45,12 @@ export const PriorityEntity$inboundSchema: z.ZodType< /** @internal */ export type PriorityEntity$Outbound = { - slug?: string | undefined; - description?: string | undefined; - position?: number | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - default?: boolean | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + position?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + default?: boolean | null | undefined; }; /** @internal */ @@ -57,12 +59,12 @@ export const PriorityEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PriorityEntity > = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - position: z.number().int().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - default: z.boolean().optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + default: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/publicapiv1bootstrapentity.ts b/src/models/components/publicapiv1bootstrapentity.ts new file mode 100644 index 00000000..fd5e0fdc --- /dev/null +++ b/src/models/components/publicapiv1bootstrapentity.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * PublicAPI_V1_BootstrapEntity model + */ +export type PublicApiv1BootstrapEntity = { + posthogWriteKey?: string | null | undefined; +}; + +/** @internal */ +export const PublicApiv1BootstrapEntity$inboundSchema: z.ZodType< + PublicApiv1BootstrapEntity, + z.ZodTypeDef, + unknown +> = z.object({ + posthog_write_key: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "posthog_write_key": "posthogWriteKey", + }); +}); + +/** @internal */ +export type PublicApiv1BootstrapEntity$Outbound = { + posthog_write_key?: string | null | undefined; +}; + +/** @internal */ +export const PublicApiv1BootstrapEntity$outboundSchema: z.ZodType< + PublicApiv1BootstrapEntity$Outbound, + z.ZodTypeDef, + PublicApiv1BootstrapEntity +> = z.object({ + posthogWriteKey: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + posthogWriteKey: "posthog_write_key", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PublicApiv1BootstrapEntity$ { + /** @deprecated use `PublicApiv1BootstrapEntity$inboundSchema` instead. */ + export const inboundSchema = PublicApiv1BootstrapEntity$inboundSchema; + /** @deprecated use `PublicApiv1BootstrapEntity$outboundSchema` instead. */ + export const outboundSchema = PublicApiv1BootstrapEntity$outboundSchema; + /** @deprecated use `PublicApiv1BootstrapEntity$Outbound` instead. */ + export type Outbound = PublicApiv1BootstrapEntity$Outbound; +} + +export function publicAPIV1BootstrapEntityToJSON( + publicApiv1BootstrapEntity: PublicApiv1BootstrapEntity, +): string { + return JSON.stringify( + PublicApiv1BootstrapEntity$outboundSchema.parse(publicApiv1BootstrapEntity), + ); +} + +export function publicAPIV1BootstrapEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PublicApiv1BootstrapEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PublicApiv1BootstrapEntity' from JSON`, + ); +} diff --git a/src/models/components/publicapiv1incidentssuccinctentity.ts b/src/models/components/publicapiv1incidentssuccinctentity.ts index f1f59f86..8aad516a 100644 --- a/src/models/components/publicapiv1incidentssuccinctentity.ts +++ b/src/models/components/publicapiv1incidentssuccinctentity.ts @@ -8,9 +8,9 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PublicApiv1IncidentsSuccinctEntity = { - id?: string | undefined; - name?: string | undefined; - number?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + number?: number | null | undefined; }; /** @internal */ @@ -19,16 +19,16 @@ export const PublicApiv1IncidentsSuccinctEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - number: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), }); /** @internal */ export type PublicApiv1IncidentsSuccinctEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - number?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + number?: number | null | undefined; }; /** @internal */ @@ -37,9 +37,9 @@ export const PublicApiv1IncidentsSuccinctEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PublicApiv1IncidentsSuccinctEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - number: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + number: z.nullable(z.number().int()).optional(), }); /** diff --git a/src/models/components/publicapiv1incidentstranscriptentity.ts b/src/models/components/publicapiv1incidentstranscriptentity.ts index 5184a28a..f214b1f0 100644 --- a/src/models/components/publicapiv1incidentstranscriptentity.ts +++ b/src/models/components/publicapiv1incidentstranscriptentity.ts @@ -7,6 +7,12 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; /** * PublicAPI_V1_Incidents_TranscriptEntity model @@ -15,31 +21,32 @@ export type PublicApiv1IncidentsTranscriptEntity = { /** * The unique identifier for the transcript entry */ - id?: string | undefined; + id?: string | null | undefined; /** * The speaker for the transcript entry */ - speaker?: string | undefined; + speaker?: string | null | undefined; /** * The start time for the transcript entry */ - start?: number | undefined; + start?: number | null | undefined; /** * The end time for the transcript entry */ - until?: number | undefined; + until?: number | null | undefined; /** * The words spoken for the transcript entry */ - words?: string | undefined; + words?: string | null | undefined; /** * The time the transcript entry was created */ - createdAt?: Date | undefined; + createdAt?: Date | null | undefined; /** * The time the transcript entry was last updated */ - updatedAt?: Date | undefined; + updatedAt?: Date | null | undefined; + author?: NullableAuthorEntity | null | undefined; }; /** @internal */ @@ -48,15 +55,18 @@ export const PublicApiv1IncidentsTranscriptEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - speaker: z.string().optional(), - start: z.number().int().optional(), - until: z.number().int().optional(), - words: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + speaker: z.nullable(z.string()).optional(), + start: z.nullable(z.number().int()).optional(), + until: z.nullable(z.number().int()).optional(), + words: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + author: z.nullable(NullableAuthorEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -66,13 +76,14 @@ export const PublicApiv1IncidentsTranscriptEntity$inboundSchema: z.ZodType< /** @internal */ export type PublicApiv1IncidentsTranscriptEntity$Outbound = { - id?: string | undefined; - speaker?: string | undefined; - start?: number | undefined; - until?: number | undefined; - words?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; + id?: string | null | undefined; + speaker?: string | null | undefined; + start?: number | null | undefined; + until?: number | null | undefined; + words?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + author?: NullableAuthorEntity$Outbound | null | undefined; }; /** @internal */ @@ -81,13 +92,14 @@ export const PublicApiv1IncidentsTranscriptEntity$outboundSchema: z.ZodType< z.ZodTypeDef, PublicApiv1IncidentsTranscriptEntity > = z.object({ - id: z.string().optional(), - speaker: z.string().optional(), - start: z.number().int().optional(), - until: z.number().int().optional(), - words: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + speaker: z.nullable(z.string()).optional(), + start: z.nullable(z.number().int()).optional(), + until: z.nullable(z.number().int()).optional(), + words: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + author: z.nullable(NullableAuthorEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/publicapiv1integrationsauthedproviderentity.ts b/src/models/components/publicapiv1integrationsauthedproviderentity.ts new file mode 100644 index 00000000..f29068b9 --- /dev/null +++ b/src/models/components/publicapiv1integrationsauthedproviderentity.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableSuccinctEntity, + NullableSuccinctEntity$inboundSchema, + NullableSuccinctEntity$Outbound, + NullableSuccinctEntity$outboundSchema, +} from "./nullablesuccinctentity.js"; + +/** + * PublicAPI_V1_Integrations_AuthedProviderEntity model + */ +export type PublicApiv1IntegrationsAuthedProviderEntity = { + id?: string | null | undefined; + user?: NullableSuccinctEntity | null | undefined; + integrationDefault?: boolean | null | undefined; + /** + * The email of the user who authorized the integration + */ + authorizedEmail?: string | null | undefined; + isExpired?: boolean | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; +}; + +/** @internal */ +export const PublicApiv1IntegrationsAuthedProviderEntity$inboundSchema: + z.ZodType< + PublicApiv1IntegrationsAuthedProviderEntity, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.nullable(z.string()).optional(), + user: z.nullable(NullableSuccinctEntity$inboundSchema).optional(), + integration_default: z.nullable(z.boolean()).optional(), + authorized_email: z.nullable(z.string()).optional(), + is_expired: z.nullable(z.boolean()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + }).transform((v) => { + return remap$(v, { + "integration_default": "integrationDefault", + "authorized_email": "authorizedEmail", + "is_expired": "isExpired", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); + }); + +/** @internal */ +export type PublicApiv1IntegrationsAuthedProviderEntity$Outbound = { + id?: string | null | undefined; + user?: NullableSuccinctEntity$Outbound | null | undefined; + integration_default?: boolean | null | undefined; + authorized_email?: string | null | undefined; + is_expired?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; +}; + +/** @internal */ +export const PublicApiv1IntegrationsAuthedProviderEntity$outboundSchema: + z.ZodType< + PublicApiv1IntegrationsAuthedProviderEntity$Outbound, + z.ZodTypeDef, + PublicApiv1IntegrationsAuthedProviderEntity + > = z.object({ + id: z.nullable(z.string()).optional(), + user: z.nullable(NullableSuccinctEntity$outboundSchema).optional(), + integrationDefault: z.nullable(z.boolean()).optional(), + authorizedEmail: z.nullable(z.string()).optional(), + isExpired: z.nullable(z.boolean()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + }).transform((v) => { + return remap$(v, { + integrationDefault: "integration_default", + authorizedEmail: "authorized_email", + isExpired: "is_expired", + createdAt: "created_at", + updatedAt: "updated_at", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PublicApiv1IntegrationsAuthedProviderEntity$ { + /** @deprecated use `PublicApiv1IntegrationsAuthedProviderEntity$inboundSchema` instead. */ + export const inboundSchema = + PublicApiv1IntegrationsAuthedProviderEntity$inboundSchema; + /** @deprecated use `PublicApiv1IntegrationsAuthedProviderEntity$outboundSchema` instead. */ + export const outboundSchema = + PublicApiv1IntegrationsAuthedProviderEntity$outboundSchema; + /** @deprecated use `PublicApiv1IntegrationsAuthedProviderEntity$Outbound` instead. */ + export type Outbound = PublicApiv1IntegrationsAuthedProviderEntity$Outbound; +} + +export function publicAPIV1IntegrationsAuthedProviderEntityToJSON( + publicApiv1IntegrationsAuthedProviderEntity: + PublicApiv1IntegrationsAuthedProviderEntity, +): string { + return JSON.stringify( + PublicApiv1IntegrationsAuthedProviderEntity$outboundSchema.parse( + publicApiv1IntegrationsAuthedProviderEntity, + ), + ); +} + +export function publicAPIV1IntegrationsAuthedProviderEntityFromJSON( + jsonString: string, +): SafeParseResult< + PublicApiv1IntegrationsAuthedProviderEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + PublicApiv1IntegrationsAuthedProviderEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'PublicApiv1IntegrationsAuthedProviderEntity' from JSON`, + ); +} diff --git a/src/models/components/publicapiv1similarincidententity.ts b/src/models/components/publicapiv1similarincidententity.ts new file mode 100644 index 00000000..05baba08 --- /dev/null +++ b/src/models/components/publicapiv1similarincidententity.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PublicApiv1SimilarIncidentEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + distance?: number | null | undefined; +}; + +/** @internal */ +export const PublicApiv1SimilarIncidentEntity$inboundSchema: z.ZodType< + PublicApiv1SimilarIncidentEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + distance: z.nullable(z.number()).optional(), +}); + +/** @internal */ +export type PublicApiv1SimilarIncidentEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + distance?: number | null | undefined; +}; + +/** @internal */ +export const PublicApiv1SimilarIncidentEntity$outboundSchema: z.ZodType< + PublicApiv1SimilarIncidentEntity$Outbound, + z.ZodTypeDef, + PublicApiv1SimilarIncidentEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + distance: z.nullable(z.number()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PublicApiv1SimilarIncidentEntity$ { + /** @deprecated use `PublicApiv1SimilarIncidentEntity$inboundSchema` instead. */ + export const inboundSchema = PublicApiv1SimilarIncidentEntity$inboundSchema; + /** @deprecated use `PublicApiv1SimilarIncidentEntity$outboundSchema` instead. */ + export const outboundSchema = PublicApiv1SimilarIncidentEntity$outboundSchema; + /** @deprecated use `PublicApiv1SimilarIncidentEntity$Outbound` instead. */ + export type Outbound = PublicApiv1SimilarIncidentEntity$Outbound; +} + +export function publicAPIV1SimilarIncidentEntityToJSON( + publicApiv1SimilarIncidentEntity: PublicApiv1SimilarIncidentEntity, +): string { + return JSON.stringify( + PublicApiv1SimilarIncidentEntity$outboundSchema.parse( + publicApiv1SimilarIncidentEntity, + ), + ); +} + +export function publicAPIV1SimilarIncidentEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PublicApiv1SimilarIncidentEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PublicApiv1SimilarIncidentEntity' from JSON`, + ); +} diff --git a/src/models/components/publishpostmortemreport.ts b/src/models/components/publishpostmortemreport.ts new file mode 100644 index 00000000..07e06103 --- /dev/null +++ b/src/models/components/publishpostmortemreport.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const Publish = { + True: "true", +} as const; +export type Publish = ClosedEnum; + +/** + * Marks an incident retrospective as published and emails all of the participants in the report the summary + */ +export type PublishPostMortemReport = { + publish?: Publish | null | undefined; + /** + * An array of user IDs with whom to share the report + */ + userIds?: Array | null | undefined; + /** + * An array of team IDs with whom to share the report + */ + teamIds?: Array | null | undefined; +}; + +/** @internal */ +export const Publish$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Publish); + +/** @internal */ +export const Publish$outboundSchema: z.ZodNativeEnum = + Publish$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Publish$ { + /** @deprecated use `Publish$inboundSchema` instead. */ + export const inboundSchema = Publish$inboundSchema; + /** @deprecated use `Publish$outboundSchema` instead. */ + export const outboundSchema = Publish$outboundSchema; +} + +/** @internal */ +export const PublishPostMortemReport$inboundSchema: z.ZodType< + PublishPostMortemReport, + z.ZodTypeDef, + unknown +> = z.object({ + publish: z.nullable(Publish$inboundSchema).optional(), + user_ids: z.nullable(z.array(z.string())).optional(), + team_ids: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "user_ids": "userIds", + "team_ids": "teamIds", + }); +}); + +/** @internal */ +export type PublishPostMortemReport$Outbound = { + publish?: string | null | undefined; + user_ids?: Array | null | undefined; + team_ids?: Array | null | undefined; +}; + +/** @internal */ +export const PublishPostMortemReport$outboundSchema: z.ZodType< + PublishPostMortemReport$Outbound, + z.ZodTypeDef, + PublishPostMortemReport +> = z.object({ + publish: z.nullable(Publish$outboundSchema).optional(), + userIds: z.nullable(z.array(z.string())).optional(), + teamIds: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + userIds: "user_ids", + teamIds: "team_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PublishPostMortemReport$ { + /** @deprecated use `PublishPostMortemReport$inboundSchema` instead. */ + export const inboundSchema = PublishPostMortemReport$inboundSchema; + /** @deprecated use `PublishPostMortemReport$outboundSchema` instead. */ + export const outboundSchema = PublishPostMortemReport$outboundSchema; + /** @deprecated use `PublishPostMortemReport$Outbound` instead. */ + export type Outbound = PublishPostMortemReport$Outbound; +} + +export function publishPostMortemReportToJSON( + publishPostMortemReport: PublishPostMortemReport, +): string { + return JSON.stringify( + PublishPostMortemReport$outboundSchema.parse(publishPostMortemReport), + ); +} + +export function publishPostMortemReportFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PublishPostMortemReport$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PublishPostMortemReport' from JSON`, + ); +} diff --git a/src/models/components/putv1incidentsincidentidimpact.ts b/src/models/components/putv1incidentsincidentidimpact.ts deleted file mode 100644 index 765956b3..00000000 --- a/src/models/components/putv1incidentsincidentidimpact.ts +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Impact = { - id: string; - conditionId: string; -}; - -export type StatusPages = { - id: string; - integrationSlug: string; -}; - -/** - * Allows updating an incident's impacted infrastructure, with the option to - * - * @remarks - * move the incident into a different milestone and provide a note to update - * the incident timeline and any attached status pages. If this method is - * requested with the PUT verb, impacts will be completely replaced with the - * information in the request body, even if not provided (effectively clearing - * all impacts). If this method is requested with the PATCH verb, the provided - * impacts will be added or updated, but no impacts will be removed. - */ -export type PutV1IncidentsIncidentIdImpact = { - note?: string | undefined; - milestone?: string | undefined; - impact?: Array | undefined; - statusPages?: Array | undefined; -}; - -/** @internal */ -export const Impact$inboundSchema: z.ZodType = z - .object({ - id: z.string(), - condition_id: z.string(), - }).transform((v) => { - return remap$(v, { - "condition_id": "conditionId", - }); - }); - -/** @internal */ -export type Impact$Outbound = { - id: string; - condition_id: string; -}; - -/** @internal */ -export const Impact$outboundSchema: z.ZodType< - Impact$Outbound, - z.ZodTypeDef, - Impact -> = z.object({ - id: z.string(), - conditionId: z.string(), -}).transform((v) => { - return remap$(v, { - conditionId: "condition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Impact$ { - /** @deprecated use `Impact$inboundSchema` instead. */ - export const inboundSchema = Impact$inboundSchema; - /** @deprecated use `Impact$outboundSchema` instead. */ - export const outboundSchema = Impact$outboundSchema; - /** @deprecated use `Impact$Outbound` instead. */ - export type Outbound = Impact$Outbound; -} - -export function impactToJSON(impact: Impact): string { - return JSON.stringify(Impact$outboundSchema.parse(impact)); -} - -export function impactFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Impact$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Impact' from JSON`, - ); -} - -/** @internal */ -export const StatusPages$inboundSchema: z.ZodType< - StatusPages, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - integration_slug: z.string(), -}).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - }); -}); - -/** @internal */ -export type StatusPages$Outbound = { - id: string; - integration_slug: string; -}; - -/** @internal */ -export const StatusPages$outboundSchema: z.ZodType< - StatusPages$Outbound, - z.ZodTypeDef, - StatusPages -> = z.object({ - id: z.string(), - integrationSlug: z.string(), -}).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StatusPages$ { - /** @deprecated use `StatusPages$inboundSchema` instead. */ - export const inboundSchema = StatusPages$inboundSchema; - /** @deprecated use `StatusPages$outboundSchema` instead. */ - export const outboundSchema = StatusPages$outboundSchema; - /** @deprecated use `StatusPages$Outbound` instead. */ - export type Outbound = StatusPages$Outbound; -} - -export function statusPagesToJSON(statusPages: StatusPages): string { - return JSON.stringify(StatusPages$outboundSchema.parse(statusPages)); -} - -export function statusPagesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StatusPages$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StatusPages' from JSON`, - ); -} - -/** @internal */ -export const PutV1IncidentsIncidentIdImpact$inboundSchema: z.ZodType< - PutV1IncidentsIncidentIdImpact, - z.ZodTypeDef, - unknown -> = z.object({ - note: z.string().optional(), - milestone: z.string().optional(), - impact: z.array(z.lazy(() => Impact$inboundSchema)).optional(), - status_pages: z.array(z.lazy(() => StatusPages$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "status_pages": "statusPages", - }); -}); - -/** @internal */ -export type PutV1IncidentsIncidentIdImpact$Outbound = { - note?: string | undefined; - milestone?: string | undefined; - impact?: Array | undefined; - status_pages?: Array | undefined; -}; - -/** @internal */ -export const PutV1IncidentsIncidentIdImpact$outboundSchema: z.ZodType< - PutV1IncidentsIncidentIdImpact$Outbound, - z.ZodTypeDef, - PutV1IncidentsIncidentIdImpact -> = z.object({ - note: z.string().optional(), - milestone: z.string().optional(), - impact: z.array(z.lazy(() => Impact$outboundSchema)).optional(), - statusPages: z.array(z.lazy(() => StatusPages$outboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - statusPages: "status_pages", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1IncidentsIncidentIdImpact$ { - /** @deprecated use `PutV1IncidentsIncidentIdImpact$inboundSchema` instead. */ - export const inboundSchema = PutV1IncidentsIncidentIdImpact$inboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdImpact$outboundSchema` instead. */ - export const outboundSchema = PutV1IncidentsIncidentIdImpact$outboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdImpact$Outbound` instead. */ - export type Outbound = PutV1IncidentsIncidentIdImpact$Outbound; -} - -export function putV1IncidentsIncidentIdImpactToJSON( - putV1IncidentsIncidentIdImpact: PutV1IncidentsIncidentIdImpact, -): string { - return JSON.stringify( - PutV1IncidentsIncidentIdImpact$outboundSchema.parse( - putV1IncidentsIncidentIdImpact, - ), - ); -} - -export function putV1IncidentsIncidentIdImpactFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1IncidentsIncidentIdImpact$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1IncidentsIncidentIdImpact' from JSON`, - ); -} diff --git a/src/models/components/putv1incidentsincidentidlinkslinkid.ts b/src/models/components/putv1incidentsincidentidlinkslinkid.ts deleted file mode 100644 index 864be7ec..00000000 --- a/src/models/components/putv1incidentsincidentidlinkslinkid.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Updates the external incident link attributes - */ -export type PutV1IncidentsIncidentIdLinksLinkId = { - displayText?: string | undefined; - iconUrl?: string | undefined; - hrefUrl?: string | undefined; -}; - -/** @internal */ -export const PutV1IncidentsIncidentIdLinksLinkId$inboundSchema: z.ZodType< - PutV1IncidentsIncidentIdLinksLinkId, - z.ZodTypeDef, - unknown -> = z.object({ - display_text: z.string().optional(), - icon_url: z.string().optional(), - href_url: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "display_text": "displayText", - "icon_url": "iconUrl", - "href_url": "hrefUrl", - }); -}); - -/** @internal */ -export type PutV1IncidentsIncidentIdLinksLinkId$Outbound = { - display_text?: string | undefined; - icon_url?: string | undefined; - href_url?: string | undefined; -}; - -/** @internal */ -export const PutV1IncidentsIncidentIdLinksLinkId$outboundSchema: z.ZodType< - PutV1IncidentsIncidentIdLinksLinkId$Outbound, - z.ZodTypeDef, - PutV1IncidentsIncidentIdLinksLinkId -> = z.object({ - displayText: z.string().optional(), - iconUrl: z.string().optional(), - hrefUrl: z.string().optional(), -}).transform((v) => { - return remap$(v, { - displayText: "display_text", - iconUrl: "icon_url", - hrefUrl: "href_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1IncidentsIncidentIdLinksLinkId$ { - /** @deprecated use `PutV1IncidentsIncidentIdLinksLinkId$inboundSchema` instead. */ - export const inboundSchema = - PutV1IncidentsIncidentIdLinksLinkId$inboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdLinksLinkId$outboundSchema` instead. */ - export const outboundSchema = - PutV1IncidentsIncidentIdLinksLinkId$outboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdLinksLinkId$Outbound` instead. */ - export type Outbound = PutV1IncidentsIncidentIdLinksLinkId$Outbound; -} - -export function putV1IncidentsIncidentIdLinksLinkIdToJSON( - putV1IncidentsIncidentIdLinksLinkId: PutV1IncidentsIncidentIdLinksLinkId, -): string { - return JSON.stringify( - PutV1IncidentsIncidentIdLinksLinkId$outboundSchema.parse( - putV1IncidentsIncidentIdLinksLinkId, - ), - ); -} - -export function putV1IncidentsIncidentIdLinksLinkIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PutV1IncidentsIncidentIdLinksLinkId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1IncidentsIncidentIdLinksLinkId' from JSON`, - ); -} diff --git a/src/models/components/putv1incidentsincidentidmilestonesbulkupdate.ts b/src/models/components/putv1incidentsincidentidmilestonesbulkupdate.ts deleted file mode 100644 index 74c0427e..00000000 --- a/src/models/components/putv1incidentsincidentidmilestonesbulkupdate.ts +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const Bulk = { - True: "true", -} as const; -export type Bulk = ClosedEnum; - -export type PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones = { - /** - * The type/slug of the milestone. Must be one of the currently configured milestones for the given incident. - */ - type: string; - /** - * An ISO8601 formatted string for when this milestone occurred. If you are removing a milestone, this field still needs to be set to some value - */ - occurredAt: Date; - /** - * If set to true, the milestone will be removed from the incident - */ - remove?: boolean | undefined; -}; - -/** - * Update milestone times in bulk for a given incident. All milestone - * - * @remarks - * times for an incident must occur in chronological order - * corresponding to the configured order of milestones. If the result - * of this request would cause any milestone(s) to appear out of place, - * a 422 response will instead be returned. This includes milestones - * not explicitly submitted or updated in this request. - */ -export type PutV1IncidentsIncidentIdMilestonesBulkUpdate = { - bulk?: Bulk | undefined; - milestones: Array; -}; - -/** @internal */ -export const Bulk$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Bulk, -); - -/** @internal */ -export const Bulk$outboundSchema: z.ZodNativeEnum = - Bulk$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Bulk$ { - /** @deprecated use `Bulk$inboundSchema` instead. */ - export const inboundSchema = Bulk$inboundSchema; - /** @deprecated use `Bulk$outboundSchema` instead. */ - export const outboundSchema = Bulk$outboundSchema; -} - -/** @internal */ -export const PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$inboundSchema: - z.ZodType< - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones, - z.ZodTypeDef, - unknown - > = z.object({ - type: z.string(), - occurred_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ), - remove: z.boolean().optional(), - }).transform((v) => { - return remap$(v, { - "occurred_at": "occurredAt", - }); - }); - -/** @internal */ -export type PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$Outbound = { - type: string; - occurred_at: string; - remove?: boolean | undefined; -}; - -/** @internal */ -export const PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$outboundSchema: - z.ZodType< - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$Outbound, - z.ZodTypeDef, - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones - > = z.object({ - type: z.string(), - occurredAt: z.date().transform(v => v.toISOString()), - remove: z.boolean().optional(), - }).transform((v) => { - return remap$(v, { - occurredAt: "occurred_at", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$ { - /** @deprecated use `PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$inboundSchema` instead. */ - export const inboundSchema = - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$inboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$outboundSchema` instead. */ - export const outboundSchema = - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$outboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$Outbound` instead. */ - export type Outbound = - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$Outbound; -} - -export function putV1IncidentsIncidentIdMilestonesBulkUpdateMilestonesToJSON( - putV1IncidentsIncidentIdMilestonesBulkUpdateMilestones: - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones, -): string { - return JSON.stringify( - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$outboundSchema.parse( - putV1IncidentsIncidentIdMilestonesBulkUpdateMilestones, - ), - ); -} - -export function putV1IncidentsIncidentIdMilestonesBulkUpdateMilestonesFromJSON( - jsonString: string, -): SafeParseResult< - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$inboundSchema - .parse(JSON.parse(x)), - `Failed to parse 'PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones' from JSON`, - ); -} - -/** @internal */ -export const PutV1IncidentsIncidentIdMilestonesBulkUpdate$inboundSchema: - z.ZodType< - PutV1IncidentsIncidentIdMilestonesBulkUpdate, - z.ZodTypeDef, - unknown - > = z.object({ - bulk: Bulk$inboundSchema.optional(), - milestones: z.array( - z.lazy(() => - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$inboundSchema - ), - ), - }); - -/** @internal */ -export type PutV1IncidentsIncidentIdMilestonesBulkUpdate$Outbound = { - bulk?: string | undefined; - milestones: Array< - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$Outbound - >; -}; - -/** @internal */ -export const PutV1IncidentsIncidentIdMilestonesBulkUpdate$outboundSchema: - z.ZodType< - PutV1IncidentsIncidentIdMilestonesBulkUpdate$Outbound, - z.ZodTypeDef, - PutV1IncidentsIncidentIdMilestonesBulkUpdate - > = z.object({ - bulk: Bulk$outboundSchema.optional(), - milestones: z.array( - z.lazy(() => - PutV1IncidentsIncidentIdMilestonesBulkUpdateMilestones$outboundSchema - ), - ), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1IncidentsIncidentIdMilestonesBulkUpdate$ { - /** @deprecated use `PutV1IncidentsIncidentIdMilestonesBulkUpdate$inboundSchema` instead. */ - export const inboundSchema = - PutV1IncidentsIncidentIdMilestonesBulkUpdate$inboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdMilestonesBulkUpdate$outboundSchema` instead. */ - export const outboundSchema = - PutV1IncidentsIncidentIdMilestonesBulkUpdate$outboundSchema; - /** @deprecated use `PutV1IncidentsIncidentIdMilestonesBulkUpdate$Outbound` instead. */ - export type Outbound = PutV1IncidentsIncidentIdMilestonesBulkUpdate$Outbound; -} - -export function putV1IncidentsIncidentIdMilestonesBulkUpdateToJSON( - putV1IncidentsIncidentIdMilestonesBulkUpdate: - PutV1IncidentsIncidentIdMilestonesBulkUpdate, -): string { - return JSON.stringify( - PutV1IncidentsIncidentIdMilestonesBulkUpdate$outboundSchema.parse( - putV1IncidentsIncidentIdMilestonesBulkUpdate, - ), - ); -} - -export function putV1IncidentsIncidentIdMilestonesBulkUpdateFromJSON( - jsonString: string, -): SafeParseResult< - PutV1IncidentsIncidentIdMilestonesBulkUpdate, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PutV1IncidentsIncidentIdMilestonesBulkUpdate$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PutV1IncidentsIncidentIdMilestonesBulkUpdate' from JSON`, - ); -} diff --git a/src/models/components/putv1postmortemsquestions.ts b/src/models/components/putv1postmortemsquestions.ts deleted file mode 100644 index c0d88ef4..00000000 --- a/src/models/components/putv1postmortemsquestions.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type Questions = { - /** - * ID of a question - */ - id?: string | undefined; - /** - * title of a question - */ - title?: string | undefined; - /** - * tooltip of a question - */ - tooltip?: string | undefined; -}; - -/** - * Update the questions configured to be provided and filled out on future retrospective reports. - */ -export type PutV1PostMortemsQuestions = { - makeSwaggerWork?: string | undefined; - questions?: Array | undefined; -}; - -/** @internal */ -export const Questions$inboundSchema: z.ZodType< - Questions, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - title: z.string().optional(), - tooltip: z.string().optional(), -}); - -/** @internal */ -export type Questions$Outbound = { - id?: string | undefined; - title?: string | undefined; - tooltip?: string | undefined; -}; - -/** @internal */ -export const Questions$outboundSchema: z.ZodType< - Questions$Outbound, - z.ZodTypeDef, - Questions -> = z.object({ - id: z.string().optional(), - title: z.string().optional(), - tooltip: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Questions$ { - /** @deprecated use `Questions$inboundSchema` instead. */ - export const inboundSchema = Questions$inboundSchema; - /** @deprecated use `Questions$outboundSchema` instead. */ - export const outboundSchema = Questions$outboundSchema; - /** @deprecated use `Questions$Outbound` instead. */ - export type Outbound = Questions$Outbound; -} - -export function questionsToJSON(questions: Questions): string { - return JSON.stringify(Questions$outboundSchema.parse(questions)); -} - -export function questionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Questions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Questions' from JSON`, - ); -} - -/** @internal */ -export const PutV1PostMortemsQuestions$inboundSchema: z.ZodType< - PutV1PostMortemsQuestions, - z.ZodTypeDef, - unknown -> = z.object({ - _make_swagger_work_: z.string().optional(), - questions: z.array(z.lazy(() => Questions$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "_make_swagger_work_": "makeSwaggerWork", - }); -}); - -/** @internal */ -export type PutV1PostMortemsQuestions$Outbound = { - _make_swagger_work_?: string | undefined; - questions?: Array | undefined; -}; - -/** @internal */ -export const PutV1PostMortemsQuestions$outboundSchema: z.ZodType< - PutV1PostMortemsQuestions$Outbound, - z.ZodTypeDef, - PutV1PostMortemsQuestions -> = z.object({ - makeSwaggerWork: z.string().optional(), - questions: z.array(z.lazy(() => Questions$outboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - makeSwaggerWork: "_make_swagger_work_", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1PostMortemsQuestions$ { - /** @deprecated use `PutV1PostMortemsQuestions$inboundSchema` instead. */ - export const inboundSchema = PutV1PostMortemsQuestions$inboundSchema; - /** @deprecated use `PutV1PostMortemsQuestions$outboundSchema` instead. */ - export const outboundSchema = PutV1PostMortemsQuestions$outboundSchema; - /** @deprecated use `PutV1PostMortemsQuestions$Outbound` instead. */ - export type Outbound = PutV1PostMortemsQuestions$Outbound; -} - -export function putV1PostMortemsQuestionsToJSON( - putV1PostMortemsQuestions: PutV1PostMortemsQuestions, -): string { - return JSON.stringify( - PutV1PostMortemsQuestions$outboundSchema.parse(putV1PostMortemsQuestions), - ); -} - -export function putV1PostMortemsQuestionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1PostMortemsQuestions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1PostMortemsQuestions' from JSON`, - ); -} diff --git a/src/models/components/putv1postmortemsreportsreportidreasonsorder.ts b/src/models/components/putv1postmortemsreportsreportidreasonsorder.ts deleted file mode 100644 index 79da4316..00000000 --- a/src/models/components/putv1postmortemsreportsreportidreasonsorder.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Reorder a contributing factor - */ -export type PutV1PostMortemsReportsReportIdReasonsOrder = { - oldPosition: number; - newPosition: number; -}; - -/** @internal */ -export const PutV1PostMortemsReportsReportIdReasonsOrder$inboundSchema: - z.ZodType< - PutV1PostMortemsReportsReportIdReasonsOrder, - z.ZodTypeDef, - unknown - > = z.object({ - old_position: z.number().int(), - new_position: z.number().int(), - }).transform((v) => { - return remap$(v, { - "old_position": "oldPosition", - "new_position": "newPosition", - }); - }); - -/** @internal */ -export type PutV1PostMortemsReportsReportIdReasonsOrder$Outbound = { - old_position: number; - new_position: number; -}; - -/** @internal */ -export const PutV1PostMortemsReportsReportIdReasonsOrder$outboundSchema: - z.ZodType< - PutV1PostMortemsReportsReportIdReasonsOrder$Outbound, - z.ZodTypeDef, - PutV1PostMortemsReportsReportIdReasonsOrder - > = z.object({ - oldPosition: z.number().int(), - newPosition: z.number().int(), - }).transform((v) => { - return remap$(v, { - oldPosition: "old_position", - newPosition: "new_position", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1PostMortemsReportsReportIdReasonsOrder$ { - /** @deprecated use `PutV1PostMortemsReportsReportIdReasonsOrder$inboundSchema` instead. */ - export const inboundSchema = - PutV1PostMortemsReportsReportIdReasonsOrder$inboundSchema; - /** @deprecated use `PutV1PostMortemsReportsReportIdReasonsOrder$outboundSchema` instead. */ - export const outboundSchema = - PutV1PostMortemsReportsReportIdReasonsOrder$outboundSchema; - /** @deprecated use `PutV1PostMortemsReportsReportIdReasonsOrder$Outbound` instead. */ - export type Outbound = PutV1PostMortemsReportsReportIdReasonsOrder$Outbound; -} - -export function putV1PostMortemsReportsReportIdReasonsOrderToJSON( - putV1PostMortemsReportsReportIdReasonsOrder: - PutV1PostMortemsReportsReportIdReasonsOrder, -): string { - return JSON.stringify( - PutV1PostMortemsReportsReportIdReasonsOrder$outboundSchema.parse( - putV1PostMortemsReportsReportIdReasonsOrder, - ), - ); -} - -export function putV1PostMortemsReportsReportIdReasonsOrderFromJSON( - jsonString: string, -): SafeParseResult< - PutV1PostMortemsReportsReportIdReasonsOrder, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PutV1PostMortemsReportsReportIdReasonsOrder$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PutV1PostMortemsReportsReportIdReasonsOrder' from JSON`, - ); -} diff --git a/src/models/components/putv1runbooksexecutionsexecutionidstepsstepid.ts b/src/models/components/putv1runbooksexecutionsexecutionidstepsstepid.ts deleted file mode 100644 index a6151250..00000000 --- a/src/models/components/putv1runbooksexecutionsexecutionidstepsstepid.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Updates a runbook step execution, especially for changing the state of a step execution. - */ -export type PutV1RunbooksExecutionsExecutionIdStepsStepId = { - state: string; - scheduleFor?: Date | undefined; - /** - * Data for execution of this step - */ - data?: { [k: string]: any } | undefined; - repeatsAt?: Date | undefined; -}; - -/** @internal */ -export const PutV1RunbooksExecutionsExecutionIdStepsStepId$inboundSchema: - z.ZodType< - PutV1RunbooksExecutionsExecutionIdStepsStepId, - z.ZodTypeDef, - unknown - > = z.object({ - state: z.string(), - schedule_for: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), - data: z.record(z.any()).optional(), - repeats_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), - }).transform((v) => { - return remap$(v, { - "schedule_for": "scheduleFor", - "repeats_at": "repeatsAt", - }); - }); - -/** @internal */ -export type PutV1RunbooksExecutionsExecutionIdStepsStepId$Outbound = { - state: string; - schedule_for?: string | undefined; - data?: { [k: string]: any } | undefined; - repeats_at?: string | undefined; -}; - -/** @internal */ -export const PutV1RunbooksExecutionsExecutionIdStepsStepId$outboundSchema: - z.ZodType< - PutV1RunbooksExecutionsExecutionIdStepsStepId$Outbound, - z.ZodTypeDef, - PutV1RunbooksExecutionsExecutionIdStepsStepId - > = z.object({ - state: z.string(), - scheduleFor: z.date().transform(v => v.toISOString()).optional(), - data: z.record(z.any()).optional(), - repeatsAt: z.date().transform(v => v.toISOString()).optional(), - }).transform((v) => { - return remap$(v, { - scheduleFor: "schedule_for", - repeatsAt: "repeats_at", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksExecutionsExecutionIdStepsStepId$ { - /** @deprecated use `PutV1RunbooksExecutionsExecutionIdStepsStepId$inboundSchema` instead. */ - export const inboundSchema = - PutV1RunbooksExecutionsExecutionIdStepsStepId$inboundSchema; - /** @deprecated use `PutV1RunbooksExecutionsExecutionIdStepsStepId$outboundSchema` instead. */ - export const outboundSchema = - PutV1RunbooksExecutionsExecutionIdStepsStepId$outboundSchema; - /** @deprecated use `PutV1RunbooksExecutionsExecutionIdStepsStepId$Outbound` instead. */ - export type Outbound = PutV1RunbooksExecutionsExecutionIdStepsStepId$Outbound; -} - -export function putV1RunbooksExecutionsExecutionIdStepsStepIdToJSON( - putV1RunbooksExecutionsExecutionIdStepsStepId: - PutV1RunbooksExecutionsExecutionIdStepsStepId, -): string { - return JSON.stringify( - PutV1RunbooksExecutionsExecutionIdStepsStepId$outboundSchema.parse( - putV1RunbooksExecutionsExecutionIdStepsStepId, - ), - ); -} - -export function putV1RunbooksExecutionsExecutionIdStepsStepIdFromJSON( - jsonString: string, -): SafeParseResult< - PutV1RunbooksExecutionsExecutionIdStepsStepId, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - PutV1RunbooksExecutionsExecutionIdStepsStepId$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'PutV1RunbooksExecutionsExecutionIdStepsStepId' from JSON`, - ); -} diff --git a/src/models/components/putv1runbooksrunbookid.ts b/src/models/components/putv1runbooksrunbookid.ts deleted file mode 100644 index 706d8499..00000000 --- a/src/models/components/putv1runbooksrunbookid.ts +++ /dev/null @@ -1,629 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * An object representing a Team that owns the runbook - */ -export type PutV1RunbooksRunbookIdOwner = { - id?: string | undefined; -}; - -export type PutV1RunbooksRunbookIdSeverities = { - id?: string | undefined; -}; - -export type PutV1RunbooksRunbookIdServices = { - id?: string | undefined; -}; - -export type Environments = { - id?: string | undefined; -}; - -export type PutV1RunbooksRunbookIdAttachmentRule = { - /** - * The JSON logic for the attaching the runbook - */ - logic: string; - /** - * The user data for the rule - */ - userData?: string | undefined; -}; - -export type PutV1RunbooksRunbookIdRule = { - /** - * The JSON logic for the rule - */ - logic: string; - /** - * The user data for the rule - */ - userData?: string | undefined; -}; - -export type PutV1RunbooksRunbookIdSteps = { - /** - * ID of step to be updated - */ - stepId?: string | undefined; - /** - * Name for step - */ - name: string; - /** - * ID of action to use for this step. - */ - actionId: string; - rule?: PutV1RunbooksRunbookIdRule | undefined; -}; - -/** - * Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything - * - * @remarks - * about a runbook, including but not limited to the steps, environments, attachment rules, and severities. - */ -export type PutV1RunbooksRunbookId = { - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - /** - * Whether or not this runbook is a tutorial runbook - */ - tutorial?: boolean | undefined; - /** - * An object representing a Team that owns the runbook - */ - owner?: PutV1RunbooksRunbookIdOwner | undefined; - severities?: Array | undefined; - services?: Array | undefined; - environments?: Array | undefined; - attachmentRule?: PutV1RunbooksRunbookIdAttachmentRule | undefined; - steps?: Array | undefined; - /** - * Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. - */ - autoAttachToRestrictedIncidents?: boolean | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookIdOwner$inboundSchema: z.ZodType< - PutV1RunbooksRunbookIdOwner, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); - -/** @internal */ -export type PutV1RunbooksRunbookIdOwner$Outbound = { - id?: string | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookIdOwner$outboundSchema: z.ZodType< - PutV1RunbooksRunbookIdOwner$Outbound, - z.ZodTypeDef, - PutV1RunbooksRunbookIdOwner -> = z.object({ - id: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksRunbookIdOwner$ { - /** @deprecated use `PutV1RunbooksRunbookIdOwner$inboundSchema` instead. */ - export const inboundSchema = PutV1RunbooksRunbookIdOwner$inboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdOwner$outboundSchema` instead. */ - export const outboundSchema = PutV1RunbooksRunbookIdOwner$outboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdOwner$Outbound` instead. */ - export type Outbound = PutV1RunbooksRunbookIdOwner$Outbound; -} - -export function putV1RunbooksRunbookIdOwnerToJSON( - putV1RunbooksRunbookIdOwner: PutV1RunbooksRunbookIdOwner, -): string { - return JSON.stringify( - PutV1RunbooksRunbookIdOwner$outboundSchema.parse( - putV1RunbooksRunbookIdOwner, - ), - ); -} - -export function putV1RunbooksRunbookIdOwnerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1RunbooksRunbookIdOwner$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1RunbooksRunbookIdOwner' from JSON`, - ); -} - -/** @internal */ -export const PutV1RunbooksRunbookIdSeverities$inboundSchema: z.ZodType< - PutV1RunbooksRunbookIdSeverities, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); - -/** @internal */ -export type PutV1RunbooksRunbookIdSeverities$Outbound = { - id?: string | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookIdSeverities$outboundSchema: z.ZodType< - PutV1RunbooksRunbookIdSeverities$Outbound, - z.ZodTypeDef, - PutV1RunbooksRunbookIdSeverities -> = z.object({ - id: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksRunbookIdSeverities$ { - /** @deprecated use `PutV1RunbooksRunbookIdSeverities$inboundSchema` instead. */ - export const inboundSchema = PutV1RunbooksRunbookIdSeverities$inboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdSeverities$outboundSchema` instead. */ - export const outboundSchema = PutV1RunbooksRunbookIdSeverities$outboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdSeverities$Outbound` instead. */ - export type Outbound = PutV1RunbooksRunbookIdSeverities$Outbound; -} - -export function putV1RunbooksRunbookIdSeveritiesToJSON( - putV1RunbooksRunbookIdSeverities: PutV1RunbooksRunbookIdSeverities, -): string { - return JSON.stringify( - PutV1RunbooksRunbookIdSeverities$outboundSchema.parse( - putV1RunbooksRunbookIdSeverities, - ), - ); -} - -export function putV1RunbooksRunbookIdSeveritiesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1RunbooksRunbookIdSeverities$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1RunbooksRunbookIdSeverities' from JSON`, - ); -} - -/** @internal */ -export const PutV1RunbooksRunbookIdServices$inboundSchema: z.ZodType< - PutV1RunbooksRunbookIdServices, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); - -/** @internal */ -export type PutV1RunbooksRunbookIdServices$Outbound = { - id?: string | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookIdServices$outboundSchema: z.ZodType< - PutV1RunbooksRunbookIdServices$Outbound, - z.ZodTypeDef, - PutV1RunbooksRunbookIdServices -> = z.object({ - id: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksRunbookIdServices$ { - /** @deprecated use `PutV1RunbooksRunbookIdServices$inboundSchema` instead. */ - export const inboundSchema = PutV1RunbooksRunbookIdServices$inboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdServices$outboundSchema` instead. */ - export const outboundSchema = PutV1RunbooksRunbookIdServices$outboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdServices$Outbound` instead. */ - export type Outbound = PutV1RunbooksRunbookIdServices$Outbound; -} - -export function putV1RunbooksRunbookIdServicesToJSON( - putV1RunbooksRunbookIdServices: PutV1RunbooksRunbookIdServices, -): string { - return JSON.stringify( - PutV1RunbooksRunbookIdServices$outboundSchema.parse( - putV1RunbooksRunbookIdServices, - ), - ); -} - -export function putV1RunbooksRunbookIdServicesFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1RunbooksRunbookIdServices$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1RunbooksRunbookIdServices' from JSON`, - ); -} - -/** @internal */ -export const Environments$inboundSchema: z.ZodType< - Environments, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); - -/** @internal */ -export type Environments$Outbound = { - id?: string | undefined; -}; - -/** @internal */ -export const Environments$outboundSchema: z.ZodType< - Environments$Outbound, - z.ZodTypeDef, - Environments -> = z.object({ - id: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Environments$ { - /** @deprecated use `Environments$inboundSchema` instead. */ - export const inboundSchema = Environments$inboundSchema; - /** @deprecated use `Environments$outboundSchema` instead. */ - export const outboundSchema = Environments$outboundSchema; - /** @deprecated use `Environments$Outbound` instead. */ - export type Outbound = Environments$Outbound; -} - -export function environmentsToJSON(environments: Environments): string { - return JSON.stringify(Environments$outboundSchema.parse(environments)); -} - -export function environmentsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Environments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Environments' from JSON`, - ); -} - -/** @internal */ -export const PutV1RunbooksRunbookIdAttachmentRule$inboundSchema: z.ZodType< - PutV1RunbooksRunbookIdAttachmentRule, - z.ZodTypeDef, - unknown -> = z.object({ - logic: z.string(), - user_data: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "user_data": "userData", - }); -}); - -/** @internal */ -export type PutV1RunbooksRunbookIdAttachmentRule$Outbound = { - logic: string; - user_data?: string | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookIdAttachmentRule$outboundSchema: z.ZodType< - PutV1RunbooksRunbookIdAttachmentRule$Outbound, - z.ZodTypeDef, - PutV1RunbooksRunbookIdAttachmentRule -> = z.object({ - logic: z.string(), - userData: z.string().optional(), -}).transform((v) => { - return remap$(v, { - userData: "user_data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksRunbookIdAttachmentRule$ { - /** @deprecated use `PutV1RunbooksRunbookIdAttachmentRule$inboundSchema` instead. */ - export const inboundSchema = - PutV1RunbooksRunbookIdAttachmentRule$inboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdAttachmentRule$outboundSchema` instead. */ - export const outboundSchema = - PutV1RunbooksRunbookIdAttachmentRule$outboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdAttachmentRule$Outbound` instead. */ - export type Outbound = PutV1RunbooksRunbookIdAttachmentRule$Outbound; -} - -export function putV1RunbooksRunbookIdAttachmentRuleToJSON( - putV1RunbooksRunbookIdAttachmentRule: PutV1RunbooksRunbookIdAttachmentRule, -): string { - return JSON.stringify( - PutV1RunbooksRunbookIdAttachmentRule$outboundSchema.parse( - putV1RunbooksRunbookIdAttachmentRule, - ), - ); -} - -export function putV1RunbooksRunbookIdAttachmentRuleFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PutV1RunbooksRunbookIdAttachmentRule$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1RunbooksRunbookIdAttachmentRule' from JSON`, - ); -} - -/** @internal */ -export const PutV1RunbooksRunbookIdRule$inboundSchema: z.ZodType< - PutV1RunbooksRunbookIdRule, - z.ZodTypeDef, - unknown -> = z.object({ - logic: z.string(), - user_data: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "user_data": "userData", - }); -}); - -/** @internal */ -export type PutV1RunbooksRunbookIdRule$Outbound = { - logic: string; - user_data?: string | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookIdRule$outboundSchema: z.ZodType< - PutV1RunbooksRunbookIdRule$Outbound, - z.ZodTypeDef, - PutV1RunbooksRunbookIdRule -> = z.object({ - logic: z.string(), - userData: z.string().optional(), -}).transform((v) => { - return remap$(v, { - userData: "user_data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksRunbookIdRule$ { - /** @deprecated use `PutV1RunbooksRunbookIdRule$inboundSchema` instead. */ - export const inboundSchema = PutV1RunbooksRunbookIdRule$inboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdRule$outboundSchema` instead. */ - export const outboundSchema = PutV1RunbooksRunbookIdRule$outboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdRule$Outbound` instead. */ - export type Outbound = PutV1RunbooksRunbookIdRule$Outbound; -} - -export function putV1RunbooksRunbookIdRuleToJSON( - putV1RunbooksRunbookIdRule: PutV1RunbooksRunbookIdRule, -): string { - return JSON.stringify( - PutV1RunbooksRunbookIdRule$outboundSchema.parse(putV1RunbooksRunbookIdRule), - ); -} - -export function putV1RunbooksRunbookIdRuleFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1RunbooksRunbookIdRule$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1RunbooksRunbookIdRule' from JSON`, - ); -} - -/** @internal */ -export const PutV1RunbooksRunbookIdSteps$inboundSchema: z.ZodType< - PutV1RunbooksRunbookIdSteps, - z.ZodTypeDef, - unknown -> = z.object({ - step_id: z.string().optional(), - name: z.string(), - action_id: z.string(), - rule: z.lazy(() => PutV1RunbooksRunbookIdRule$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "step_id": "stepId", - "action_id": "actionId", - }); -}); - -/** @internal */ -export type PutV1RunbooksRunbookIdSteps$Outbound = { - step_id?: string | undefined; - name: string; - action_id: string; - rule?: PutV1RunbooksRunbookIdRule$Outbound | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookIdSteps$outboundSchema: z.ZodType< - PutV1RunbooksRunbookIdSteps$Outbound, - z.ZodTypeDef, - PutV1RunbooksRunbookIdSteps -> = z.object({ - stepId: z.string().optional(), - name: z.string(), - actionId: z.string(), - rule: z.lazy(() => PutV1RunbooksRunbookIdRule$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - stepId: "step_id", - actionId: "action_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksRunbookIdSteps$ { - /** @deprecated use `PutV1RunbooksRunbookIdSteps$inboundSchema` instead. */ - export const inboundSchema = PutV1RunbooksRunbookIdSteps$inboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdSteps$outboundSchema` instead. */ - export const outboundSchema = PutV1RunbooksRunbookIdSteps$outboundSchema; - /** @deprecated use `PutV1RunbooksRunbookIdSteps$Outbound` instead. */ - export type Outbound = PutV1RunbooksRunbookIdSteps$Outbound; -} - -export function putV1RunbooksRunbookIdStepsToJSON( - putV1RunbooksRunbookIdSteps: PutV1RunbooksRunbookIdSteps, -): string { - return JSON.stringify( - PutV1RunbooksRunbookIdSteps$outboundSchema.parse( - putV1RunbooksRunbookIdSteps, - ), - ); -} - -export function putV1RunbooksRunbookIdStepsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1RunbooksRunbookIdSteps$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1RunbooksRunbookIdSteps' from JSON`, - ); -} - -/** @internal */ -export const PutV1RunbooksRunbookId$inboundSchema: z.ZodType< - PutV1RunbooksRunbookId, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - tutorial: z.boolean().optional(), - owner: z.lazy(() => PutV1RunbooksRunbookIdOwner$inboundSchema).optional(), - severities: z.array( - z.lazy(() => PutV1RunbooksRunbookIdSeverities$inboundSchema), - ).optional(), - services: z.array(z.lazy(() => PutV1RunbooksRunbookIdServices$inboundSchema)) - .optional(), - environments: z.array(z.lazy(() => Environments$inboundSchema)).optional(), - attachment_rule: z.lazy(() => - PutV1RunbooksRunbookIdAttachmentRule$inboundSchema - ).optional(), - steps: z.array(z.lazy(() => PutV1RunbooksRunbookIdSteps$inboundSchema)) - .optional(), - auto_attach_to_restricted_incidents: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "attachment_rule": "attachmentRule", - "auto_attach_to_restricted_incidents": "autoAttachToRestrictedIncidents", - }); -}); - -/** @internal */ -export type PutV1RunbooksRunbookId$Outbound = { - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - tutorial?: boolean | undefined; - owner?: PutV1RunbooksRunbookIdOwner$Outbound | undefined; - severities?: Array | undefined; - services?: Array | undefined; - environments?: Array | undefined; - attachment_rule?: PutV1RunbooksRunbookIdAttachmentRule$Outbound | undefined; - steps?: Array | undefined; - auto_attach_to_restricted_incidents?: boolean | undefined; -}; - -/** @internal */ -export const PutV1RunbooksRunbookId$outboundSchema: z.ZodType< - PutV1RunbooksRunbookId$Outbound, - z.ZodTypeDef, - PutV1RunbooksRunbookId -> = z.object({ - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - tutorial: z.boolean().optional(), - owner: z.lazy(() => PutV1RunbooksRunbookIdOwner$outboundSchema).optional(), - severities: z.array( - z.lazy(() => PutV1RunbooksRunbookIdSeverities$outboundSchema), - ).optional(), - services: z.array(z.lazy(() => PutV1RunbooksRunbookIdServices$outboundSchema)) - .optional(), - environments: z.array(z.lazy(() => Environments$outboundSchema)).optional(), - attachmentRule: z.lazy(() => - PutV1RunbooksRunbookIdAttachmentRule$outboundSchema - ).optional(), - steps: z.array(z.lazy(() => PutV1RunbooksRunbookIdSteps$outboundSchema)) - .optional(), - autoAttachToRestrictedIncidents: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - attachmentRule: "attachment_rule", - autoAttachToRestrictedIncidents: "auto_attach_to_restricted_incidents", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1RunbooksRunbookId$ { - /** @deprecated use `PutV1RunbooksRunbookId$inboundSchema` instead. */ - export const inboundSchema = PutV1RunbooksRunbookId$inboundSchema; - /** @deprecated use `PutV1RunbooksRunbookId$outboundSchema` instead. */ - export const outboundSchema = PutV1RunbooksRunbookId$outboundSchema; - /** @deprecated use `PutV1RunbooksRunbookId$Outbound` instead. */ - export type Outbound = PutV1RunbooksRunbookId$Outbound; -} - -export function putV1RunbooksRunbookIdToJSON( - putV1RunbooksRunbookId: PutV1RunbooksRunbookId, -): string { - return JSON.stringify( - PutV1RunbooksRunbookId$outboundSchema.parse(putV1RunbooksRunbookId), - ); -} - -export function putV1RunbooksRunbookIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1RunbooksRunbookId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1RunbooksRunbookId' from JSON`, - ); -} diff --git a/src/models/components/putv1scimv2groupsid.ts b/src/models/components/putv1scimv2groupsid.ts deleted file mode 100644 index cdc14b83..00000000 --- a/src/models/components/putv1scimv2groupsid.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PutV1ScimV2GroupsIdMembers = { - /** - * String that represents the user's UUID to assign to the team - */ - value: string; -}; - -/** - * SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. - */ -export type PutV1ScimV2GroupsId = { - /** - * The name of the team being updated - */ - displayName: string; - members: Array; -}; - -/** @internal */ -export const PutV1ScimV2GroupsIdMembers$inboundSchema: z.ZodType< - PutV1ScimV2GroupsIdMembers, - z.ZodTypeDef, - unknown -> = z.object({ - value: z.string(), -}); - -/** @internal */ -export type PutV1ScimV2GroupsIdMembers$Outbound = { - value: string; -}; - -/** @internal */ -export const PutV1ScimV2GroupsIdMembers$outboundSchema: z.ZodType< - PutV1ScimV2GroupsIdMembers$Outbound, - z.ZodTypeDef, - PutV1ScimV2GroupsIdMembers -> = z.object({ - value: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1ScimV2GroupsIdMembers$ { - /** @deprecated use `PutV1ScimV2GroupsIdMembers$inboundSchema` instead. */ - export const inboundSchema = PutV1ScimV2GroupsIdMembers$inboundSchema; - /** @deprecated use `PutV1ScimV2GroupsIdMembers$outboundSchema` instead. */ - export const outboundSchema = PutV1ScimV2GroupsIdMembers$outboundSchema; - /** @deprecated use `PutV1ScimV2GroupsIdMembers$Outbound` instead. */ - export type Outbound = PutV1ScimV2GroupsIdMembers$Outbound; -} - -export function putV1ScimV2GroupsIdMembersToJSON( - putV1ScimV2GroupsIdMembers: PutV1ScimV2GroupsIdMembers, -): string { - return JSON.stringify( - PutV1ScimV2GroupsIdMembers$outboundSchema.parse(putV1ScimV2GroupsIdMembers), - ); -} - -export function putV1ScimV2GroupsIdMembersFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1ScimV2GroupsIdMembers$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1ScimV2GroupsIdMembers' from JSON`, - ); -} - -/** @internal */ -export const PutV1ScimV2GroupsId$inboundSchema: z.ZodType< - PutV1ScimV2GroupsId, - z.ZodTypeDef, - unknown -> = z.object({ - displayName: z.string(), - members: z.array(z.lazy(() => PutV1ScimV2GroupsIdMembers$inboundSchema)), -}); - -/** @internal */ -export type PutV1ScimV2GroupsId$Outbound = { - displayName: string; - members: Array; -}; - -/** @internal */ -export const PutV1ScimV2GroupsId$outboundSchema: z.ZodType< - PutV1ScimV2GroupsId$Outbound, - z.ZodTypeDef, - PutV1ScimV2GroupsId -> = z.object({ - displayName: z.string(), - members: z.array(z.lazy(() => PutV1ScimV2GroupsIdMembers$outboundSchema)), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1ScimV2GroupsId$ { - /** @deprecated use `PutV1ScimV2GroupsId$inboundSchema` instead. */ - export const inboundSchema = PutV1ScimV2GroupsId$inboundSchema; - /** @deprecated use `PutV1ScimV2GroupsId$outboundSchema` instead. */ - export const outboundSchema = PutV1ScimV2GroupsId$outboundSchema; - /** @deprecated use `PutV1ScimV2GroupsId$Outbound` instead. */ - export type Outbound = PutV1ScimV2GroupsId$Outbound; -} - -export function putV1ScimV2GroupsIdToJSON( - putV1ScimV2GroupsId: PutV1ScimV2GroupsId, -): string { - return JSON.stringify( - PutV1ScimV2GroupsId$outboundSchema.parse(putV1ScimV2GroupsId), - ); -} - -export function putV1ScimV2GroupsIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1ScimV2GroupsId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1ScimV2GroupsId' from JSON`, - ); -} diff --git a/src/models/components/putv1scimv2usersid.ts b/src/models/components/putv1scimv2usersid.ts deleted file mode 100644 index 6417ba83..00000000 --- a/src/models/components/putv1scimv2usersid.ts +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The components of the user's name - */ -export type PutV1ScimV2UsersIdName = { - /** - * The family name of the User, or last name in most Western languages - */ - givenName: string; - /** - * The given name of the User, or first name in most Western languages - */ - familyName: string; -}; - -export type PutV1ScimV2UsersIdEmails = { - /** - * String that represents an email address for the User - */ - value: string; - /** - * Boolean which signifies if an email is intended as the primary email for the User - */ - primary?: boolean | undefined; -}; - -/** - * PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. - */ -export type PutV1ScimV2UsersId = { - /** - * A service provider's unique identifier for the user - */ - userName?: string | undefined; - /** - * The components of the user's name - */ - name?: PutV1ScimV2UsersIdName | undefined; - /** - * Email addresses for the User - */ - emails?: Array | undefined; - /** - * Roles for the User - */ - roles?: Array | undefined; - /** - * Boolean that represents whether user is active - */ - active?: boolean | undefined; -}; - -/** @internal */ -export const PutV1ScimV2UsersIdName$inboundSchema: z.ZodType< - PutV1ScimV2UsersIdName, - z.ZodTypeDef, - unknown -> = z.object({ - givenName: z.string(), - familyName: z.string(), -}); - -/** @internal */ -export type PutV1ScimV2UsersIdName$Outbound = { - givenName: string; - familyName: string; -}; - -/** @internal */ -export const PutV1ScimV2UsersIdName$outboundSchema: z.ZodType< - PutV1ScimV2UsersIdName$Outbound, - z.ZodTypeDef, - PutV1ScimV2UsersIdName -> = z.object({ - givenName: z.string(), - familyName: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1ScimV2UsersIdName$ { - /** @deprecated use `PutV1ScimV2UsersIdName$inboundSchema` instead. */ - export const inboundSchema = PutV1ScimV2UsersIdName$inboundSchema; - /** @deprecated use `PutV1ScimV2UsersIdName$outboundSchema` instead. */ - export const outboundSchema = PutV1ScimV2UsersIdName$outboundSchema; - /** @deprecated use `PutV1ScimV2UsersIdName$Outbound` instead. */ - export type Outbound = PutV1ScimV2UsersIdName$Outbound; -} - -export function putV1ScimV2UsersIdNameToJSON( - putV1ScimV2UsersIdName: PutV1ScimV2UsersIdName, -): string { - return JSON.stringify( - PutV1ScimV2UsersIdName$outboundSchema.parse(putV1ScimV2UsersIdName), - ); -} - -export function putV1ScimV2UsersIdNameFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1ScimV2UsersIdName$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1ScimV2UsersIdName' from JSON`, - ); -} - -/** @internal */ -export const PutV1ScimV2UsersIdEmails$inboundSchema: z.ZodType< - PutV1ScimV2UsersIdEmails, - z.ZodTypeDef, - unknown -> = z.object({ - value: z.string(), - primary: z.boolean().optional(), -}); - -/** @internal */ -export type PutV1ScimV2UsersIdEmails$Outbound = { - value: string; - primary?: boolean | undefined; -}; - -/** @internal */ -export const PutV1ScimV2UsersIdEmails$outboundSchema: z.ZodType< - PutV1ScimV2UsersIdEmails$Outbound, - z.ZodTypeDef, - PutV1ScimV2UsersIdEmails -> = z.object({ - value: z.string(), - primary: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1ScimV2UsersIdEmails$ { - /** @deprecated use `PutV1ScimV2UsersIdEmails$inboundSchema` instead. */ - export const inboundSchema = PutV1ScimV2UsersIdEmails$inboundSchema; - /** @deprecated use `PutV1ScimV2UsersIdEmails$outboundSchema` instead. */ - export const outboundSchema = PutV1ScimV2UsersIdEmails$outboundSchema; - /** @deprecated use `PutV1ScimV2UsersIdEmails$Outbound` instead. */ - export type Outbound = PutV1ScimV2UsersIdEmails$Outbound; -} - -export function putV1ScimV2UsersIdEmailsToJSON( - putV1ScimV2UsersIdEmails: PutV1ScimV2UsersIdEmails, -): string { - return JSON.stringify( - PutV1ScimV2UsersIdEmails$outboundSchema.parse(putV1ScimV2UsersIdEmails), - ); -} - -export function putV1ScimV2UsersIdEmailsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1ScimV2UsersIdEmails$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1ScimV2UsersIdEmails' from JSON`, - ); -} - -/** @internal */ -export const PutV1ScimV2UsersId$inboundSchema: z.ZodType< - PutV1ScimV2UsersId, - z.ZodTypeDef, - unknown -> = z.object({ - userName: z.string().optional(), - name: z.lazy(() => PutV1ScimV2UsersIdName$inboundSchema).optional(), - emails: z.array(z.lazy(() => PutV1ScimV2UsersIdEmails$inboundSchema)) - .optional(), - roles: z.array(z.string()).optional(), - active: z.boolean().optional(), -}); - -/** @internal */ -export type PutV1ScimV2UsersId$Outbound = { - userName?: string | undefined; - name?: PutV1ScimV2UsersIdName$Outbound | undefined; - emails?: Array | undefined; - roles?: Array | undefined; - active?: boolean | undefined; -}; - -/** @internal */ -export const PutV1ScimV2UsersId$outboundSchema: z.ZodType< - PutV1ScimV2UsersId$Outbound, - z.ZodTypeDef, - PutV1ScimV2UsersId -> = z.object({ - userName: z.string().optional(), - name: z.lazy(() => PutV1ScimV2UsersIdName$outboundSchema).optional(), - emails: z.array(z.lazy(() => PutV1ScimV2UsersIdEmails$outboundSchema)) - .optional(), - roles: z.array(z.string()).optional(), - active: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PutV1ScimV2UsersId$ { - /** @deprecated use `PutV1ScimV2UsersId$inboundSchema` instead. */ - export const inboundSchema = PutV1ScimV2UsersId$inboundSchema; - /** @deprecated use `PutV1ScimV2UsersId$outboundSchema` instead. */ - export const outboundSchema = PutV1ScimV2UsersId$outboundSchema; - /** @deprecated use `PutV1ScimV2UsersId$Outbound` instead. */ - export type Outbound = PutV1ScimV2UsersId$Outbound; -} - -export function putV1ScimV2UsersIdToJSON( - putV1ScimV2UsersId: PutV1ScimV2UsersId, -): string { - return JSON.stringify( - PutV1ScimV2UsersId$outboundSchema.parse(putV1ScimV2UsersId), - ); -} - -export function putV1ScimV2UsersIdFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PutV1ScimV2UsersId$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PutV1ScimV2UsersId' from JSON`, - ); -} diff --git a/src/models/components/reorderpostmortemreasons.ts b/src/models/components/reorderpostmortemreasons.ts new file mode 100644 index 00000000..163051b0 --- /dev/null +++ b/src/models/components/reorderpostmortemreasons.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update the order of contributing factors in a retrospective report + */ +export type ReorderPostMortemReasons = { + oldPosition: number; + newPosition: number; +}; + +/** @internal */ +export const ReorderPostMortemReasons$inboundSchema: z.ZodType< + ReorderPostMortemReasons, + z.ZodTypeDef, + unknown +> = z.object({ + old_position: z.number().int(), + new_position: z.number().int(), +}).transform((v) => { + return remap$(v, { + "old_position": "oldPosition", + "new_position": "newPosition", + }); +}); + +/** @internal */ +export type ReorderPostMortemReasons$Outbound = { + old_position: number; + new_position: number; +}; + +/** @internal */ +export const ReorderPostMortemReasons$outboundSchema: z.ZodType< + ReorderPostMortemReasons$Outbound, + z.ZodTypeDef, + ReorderPostMortemReasons +> = z.object({ + oldPosition: z.number().int(), + newPosition: z.number().int(), +}).transform((v) => { + return remap$(v, { + oldPosition: "old_position", + newPosition: "new_position", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ReorderPostMortemReasons$ { + /** @deprecated use `ReorderPostMortemReasons$inboundSchema` instead. */ + export const inboundSchema = ReorderPostMortemReasons$inboundSchema; + /** @deprecated use `ReorderPostMortemReasons$outboundSchema` instead. */ + export const outboundSchema = ReorderPostMortemReasons$outboundSchema; + /** @deprecated use `ReorderPostMortemReasons$Outbound` instead. */ + export type Outbound = ReorderPostMortemReasons$Outbound; +} + +export function reorderPostMortemReasonsToJSON( + reorderPostMortemReasons: ReorderPostMortemReasons, +): string { + return JSON.stringify( + ReorderPostMortemReasons$outboundSchema.parse(reorderPostMortemReasons), + ); +} + +export function reorderPostMortemReasonsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ReorderPostMortemReasons$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ReorderPostMortemReasons' from JSON`, + ); +} diff --git a/src/models/components/reportentity.ts b/src/models/components/reportentity.ts index f3199122..9cbe0dba 100644 --- a/src/models/components/reportentity.ts +++ b/src/models/components/reportentity.ts @@ -19,10 +19,10 @@ import { * ReportEntity model */ export type ReportEntity = { - data?: Array | undefined; - startDate?: RFCDate | undefined; - endDate?: RFCDate | undefined; - bucketPeriod?: string | undefined; + data?: Array | null | undefined; + startDate?: RFCDate | null | undefined; + endDate?: RFCDate | null | undefined; + bucketPeriod?: string | null | undefined; }; /** @internal */ @@ -31,10 +31,10 @@ export const ReportEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(ReportsBucketEntity$inboundSchema).optional(), - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), - bucket_period: z.string().optional(), + data: z.nullable(z.array(ReportsBucketEntity$inboundSchema)).optional(), + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + bucket_period: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "start_date": "startDate", @@ -45,10 +45,10 @@ export const ReportEntity$inboundSchema: z.ZodType< /** @internal */ export type ReportEntity$Outbound = { - data?: Array | undefined; - start_date?: string | undefined; - end_date?: string | undefined; - bucket_period?: string | undefined; + data?: Array | null | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + bucket_period?: string | null | undefined; }; /** @internal */ @@ -57,10 +57,12 @@ export const ReportEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ReportEntity > = z.object({ - data: z.array(ReportsBucketEntity$outboundSchema).optional(), - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - bucketPeriod: z.string().optional(), + data: z.nullable(z.array(ReportsBucketEntity$outboundSchema)).optional(), + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + bucketPeriod: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { startDate: "start_date", diff --git a/src/models/components/reportsbucketentity.ts b/src/models/components/reportsbucketentity.ts index 8e77cd97..d2e80584 100644 --- a/src/models/components/reportsbucketentity.ts +++ b/src/models/components/reportsbucketentity.ts @@ -14,8 +14,8 @@ import { } from "./reportsdatapointentity.js"; export type ReportsBucketEntity = { - bucket?: string | undefined; - points?: Array | undefined; + bucket?: string | null | undefined; + points?: Array | null | undefined; }; /** @internal */ @@ -24,14 +24,14 @@ export const ReportsBucketEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - bucket: z.string().optional(), - points: z.array(ReportsDataPointEntity$inboundSchema).optional(), + bucket: z.nullable(z.string()).optional(), + points: z.nullable(z.array(ReportsDataPointEntity$inboundSchema)).optional(), }); /** @internal */ export type ReportsBucketEntity$Outbound = { - bucket?: string | undefined; - points?: Array | undefined; + bucket?: string | null | undefined; + points?: Array | null | undefined; }; /** @internal */ @@ -40,8 +40,8 @@ export const ReportsBucketEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ReportsBucketEntity > = z.object({ - bucket: z.string().optional(), - points: z.array(ReportsDataPointEntity$outboundSchema).optional(), + bucket: z.nullable(z.string()).optional(), + points: z.nullable(z.array(ReportsDataPointEntity$outboundSchema)).optional(), }); /** diff --git a/src/models/components/reportsdatapointentity.ts b/src/models/components/reportsdatapointentity.ts index a31c837a..9ea7b0ce 100644 --- a/src/models/components/reportsdatapointentity.ts +++ b/src/models/components/reportsdatapointentity.ts @@ -8,8 +8,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ReportsDataPointEntity = { - key?: string | undefined; - value?: number | undefined; + key?: string | null | undefined; + value?: number | null | undefined; }; /** @internal */ @@ -18,14 +18,14 @@ export const ReportsDataPointEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - key: z.string().optional(), - value: z.number().int().optional(), + key: z.nullable(z.string()).optional(), + value: z.nullable(z.number().int()).optional(), }); /** @internal */ export type ReportsDataPointEntity$Outbound = { - key?: string | undefined; - value?: number | undefined; + key?: string | null | undefined; + value?: number | null | undefined; }; /** @internal */ @@ -34,8 +34,8 @@ export const ReportsDataPointEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ReportsDataPointEntity > = z.object({ - key: z.string().optional(), - value: z.number().int().optional(), + key: z.nullable(z.string()).optional(), + value: z.nullable(z.number().int()).optional(), }); /** diff --git a/src/models/components/retrospectivesfieldentity.ts b/src/models/components/retrospectivesfieldentity.ts new file mode 100644 index 00000000..c34589ae --- /dev/null +++ b/src/models/components/retrospectivesfieldentity.ts @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const RetrospectivesFieldEntityType = { + Text: "text", + SingleSelect: "single_select", + MultiSelect: "multi_select", + Numeric: "numeric", + Datetime: "datetime", + DynamicInputGroup: "dynamic_input_group", + Markdown: "markdown", + MarkdownText: "markdown_text", +} as const; +export type RetrospectivesFieldEntityType = ClosedEnum< + typeof RetrospectivesFieldEntityType +>; + +export type RetrospectivesFieldEntity = { + id?: string | null | undefined; + label?: string | null | undefined; + type?: RetrospectivesFieldEntityType | null | undefined; + helpText?: string | null | undefined; + permissibleValues?: Array | null | undefined; + isRequired?: boolean | null | undefined; + schema?: Array | null | undefined; +}; + +/** @internal */ +export const RetrospectivesFieldEntityType$inboundSchema: z.ZodNativeEnum< + typeof RetrospectivesFieldEntityType +> = z.nativeEnum(RetrospectivesFieldEntityType); + +/** @internal */ +export const RetrospectivesFieldEntityType$outboundSchema: z.ZodNativeEnum< + typeof RetrospectivesFieldEntityType +> = RetrospectivesFieldEntityType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RetrospectivesFieldEntityType$ { + /** @deprecated use `RetrospectivesFieldEntityType$inboundSchema` instead. */ + export const inboundSchema = RetrospectivesFieldEntityType$inboundSchema; + /** @deprecated use `RetrospectivesFieldEntityType$outboundSchema` instead. */ + export const outboundSchema = RetrospectivesFieldEntityType$outboundSchema; +} + +/** @internal */ +export const RetrospectivesFieldEntity$inboundSchema: z.ZodType< + RetrospectivesFieldEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(RetrospectivesFieldEntityType$inboundSchema).optional(), + help_text: z.nullable(z.string()).optional(), + permissible_values: z.nullable(z.array(z.string())).optional(), + is_required: z.nullable(z.boolean()).optional(), + schema: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "help_text": "helpText", + "permissible_values": "permissibleValues", + "is_required": "isRequired", + }); +}); + +/** @internal */ +export type RetrospectivesFieldEntity$Outbound = { + id?: string | null | undefined; + label?: string | null | undefined; + type?: string | null | undefined; + help_text?: string | null | undefined; + permissible_values?: Array | null | undefined; + is_required?: boolean | null | undefined; + schema?: Array | null | undefined; +}; + +/** @internal */ +export const RetrospectivesFieldEntity$outboundSchema: z.ZodType< + RetrospectivesFieldEntity$Outbound, + z.ZodTypeDef, + RetrospectivesFieldEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(RetrospectivesFieldEntityType$outboundSchema).optional(), + helpText: z.nullable(z.string()).optional(), + permissibleValues: z.nullable(z.array(z.string())).optional(), + isRequired: z.nullable(z.boolean()).optional(), + schema: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + helpText: "help_text", + permissibleValues: "permissible_values", + isRequired: "is_required", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RetrospectivesFieldEntity$ { + /** @deprecated use `RetrospectivesFieldEntity$inboundSchema` instead. */ + export const inboundSchema = RetrospectivesFieldEntity$inboundSchema; + /** @deprecated use `RetrospectivesFieldEntity$outboundSchema` instead. */ + export const outboundSchema = RetrospectivesFieldEntity$outboundSchema; + /** @deprecated use `RetrospectivesFieldEntity$Outbound` instead. */ + export type Outbound = RetrospectivesFieldEntity$Outbound; +} + +export function retrospectivesFieldEntityToJSON( + retrospectivesFieldEntity: RetrospectivesFieldEntity, +): string { + return JSON.stringify( + RetrospectivesFieldEntity$outboundSchema.parse(retrospectivesFieldEntity), + ); +} + +export function retrospectivesFieldEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RetrospectivesFieldEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RetrospectivesFieldEntity' from JSON`, + ); +} diff --git a/src/models/components/retrospectivesindextemplateentity.ts b/src/models/components/retrospectivesindextemplateentity.ts new file mode 100644 index 00000000..39161246 --- /dev/null +++ b/src/models/components/retrospectivesindextemplateentity.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RetrospectivesIndexTemplateEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + isDefault?: boolean | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; +}; + +/** @internal */ +export const RetrospectivesIndexTemplateEntity$inboundSchema: z.ZodType< + RetrospectivesIndexTemplateEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + is_default: z.nullable(z.boolean()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "is_default": "isDefault", + "created_at": "createdAt", + "updated_at": "updatedAt", + }); +}); + +/** @internal */ +export type RetrospectivesIndexTemplateEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + is_default?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; +}; + +/** @internal */ +export const RetrospectivesIndexTemplateEntity$outboundSchema: z.ZodType< + RetrospectivesIndexTemplateEntity$Outbound, + z.ZodTypeDef, + RetrospectivesIndexTemplateEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + isDefault: z.nullable(z.boolean()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + isDefault: "is_default", + createdAt: "created_at", + updatedAt: "updated_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RetrospectivesIndexTemplateEntity$ { + /** @deprecated use `RetrospectivesIndexTemplateEntity$inboundSchema` instead. */ + export const inboundSchema = RetrospectivesIndexTemplateEntity$inboundSchema; + /** @deprecated use `RetrospectivesIndexTemplateEntity$outboundSchema` instead. */ + export const outboundSchema = + RetrospectivesIndexTemplateEntity$outboundSchema; + /** @deprecated use `RetrospectivesIndexTemplateEntity$Outbound` instead. */ + export type Outbound = RetrospectivesIndexTemplateEntity$Outbound; +} + +export function retrospectivesIndexTemplateEntityToJSON( + retrospectivesIndexTemplateEntity: RetrospectivesIndexTemplateEntity, +): string { + return JSON.stringify( + RetrospectivesIndexTemplateEntity$outboundSchema.parse( + retrospectivesIndexTemplateEntity, + ), + ); +} + +export function retrospectivesIndexTemplateEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RetrospectivesIndexTemplateEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RetrospectivesIndexTemplateEntity' from JSON`, + ); +} diff --git a/src/models/components/retrospectivesindextemplateentitypaginated.ts b/src/models/components/retrospectivesindextemplateentitypaginated.ts new file mode 100644 index 00000000..d22e169c --- /dev/null +++ b/src/models/components/retrospectivesindextemplateentitypaginated.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; +import { + RetrospectivesIndexTemplateEntity, + RetrospectivesIndexTemplateEntity$inboundSchema, + RetrospectivesIndexTemplateEntity$Outbound, + RetrospectivesIndexTemplateEntity$outboundSchema, +} from "./retrospectivesindextemplateentity.js"; + +/** + * Retrospectives_IndexTemplateEntityPaginated model + */ +export type RetrospectivesIndexTemplateEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const RetrospectivesIndexTemplateEntityPaginated$inboundSchema: + z.ZodType = + z.object({ + data: z.nullable(z.array(RetrospectivesIndexTemplateEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), + }); + +/** @internal */ +export type RetrospectivesIndexTemplateEntityPaginated$Outbound = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const RetrospectivesIndexTemplateEntityPaginated$outboundSchema: + z.ZodType< + RetrospectivesIndexTemplateEntityPaginated$Outbound, + z.ZodTypeDef, + RetrospectivesIndexTemplateEntityPaginated + > = z.object({ + data: z.nullable(z.array(RetrospectivesIndexTemplateEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RetrospectivesIndexTemplateEntityPaginated$ { + /** @deprecated use `RetrospectivesIndexTemplateEntityPaginated$inboundSchema` instead. */ + export const inboundSchema = + RetrospectivesIndexTemplateEntityPaginated$inboundSchema; + /** @deprecated use `RetrospectivesIndexTemplateEntityPaginated$outboundSchema` instead. */ + export const outboundSchema = + RetrospectivesIndexTemplateEntityPaginated$outboundSchema; + /** @deprecated use `RetrospectivesIndexTemplateEntityPaginated$Outbound` instead. */ + export type Outbound = RetrospectivesIndexTemplateEntityPaginated$Outbound; +} + +export function retrospectivesIndexTemplateEntityPaginatedToJSON( + retrospectivesIndexTemplateEntityPaginated: + RetrospectivesIndexTemplateEntityPaginated, +): string { + return JSON.stringify( + RetrospectivesIndexTemplateEntityPaginated$outboundSchema.parse( + retrospectivesIndexTemplateEntityPaginated, + ), + ); +} + +export function retrospectivesIndexTemplateEntityPaginatedFromJSON( + jsonString: string, +): SafeParseResult< + RetrospectivesIndexTemplateEntityPaginated, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + RetrospectivesIndexTemplateEntityPaginated$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'RetrospectivesIndexTemplateEntityPaginated' from JSON`, + ); +} diff --git a/src/models/components/retrospectivestemplateentity.ts b/src/models/components/retrospectivestemplateentity.ts new file mode 100644 index 00000000..74abd7d8 --- /dev/null +++ b/src/models/components/retrospectivestemplateentity.ts @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + RetrospectivesFieldEntity, + RetrospectivesFieldEntity$inboundSchema, + RetrospectivesFieldEntity$Outbound, + RetrospectivesFieldEntity$outboundSchema, +} from "./retrospectivesfieldentity.js"; +import { + RetrospectivesTemplateEntityIncidentSectionEntity, + RetrospectivesTemplateEntityIncidentSectionEntity$inboundSchema, + RetrospectivesTemplateEntityIncidentSectionEntity$Outbound, + RetrospectivesTemplateEntityIncidentSectionEntity$outboundSchema, +} from "./retrospectivestemplateentityincidentsectionentity.js"; + +/** + * Retrospectives_TemplateEntity model + */ +export type RetrospectivesTemplateEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + isDefault?: boolean | null | undefined; + sections?: + | Array + | null + | undefined; + fields?: Array | null | undefined; +}; + +/** @internal */ +export const RetrospectivesTemplateEntity$inboundSchema: z.ZodType< + RetrospectivesTemplateEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + is_default: z.nullable(z.boolean()).optional(), + sections: z.nullable( + z.array(RetrospectivesTemplateEntityIncidentSectionEntity$inboundSchema), + ).optional(), + fields: z.nullable(z.array(RetrospectivesFieldEntity$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "is_default": "isDefault", + }); +}); + +/** @internal */ +export type RetrospectivesTemplateEntity$Outbound = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + is_default?: boolean | null | undefined; + sections?: + | Array + | null + | undefined; + fields?: Array | null | undefined; +}; + +/** @internal */ +export const RetrospectivesTemplateEntity$outboundSchema: z.ZodType< + RetrospectivesTemplateEntity$Outbound, + z.ZodTypeDef, + RetrospectivesTemplateEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + isDefault: z.nullable(z.boolean()).optional(), + sections: z.nullable( + z.array(RetrospectivesTemplateEntityIncidentSectionEntity$outboundSchema), + ).optional(), + fields: z.nullable(z.array(RetrospectivesFieldEntity$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + isDefault: "is_default", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RetrospectivesTemplateEntity$ { + /** @deprecated use `RetrospectivesTemplateEntity$inboundSchema` instead. */ + export const inboundSchema = RetrospectivesTemplateEntity$inboundSchema; + /** @deprecated use `RetrospectivesTemplateEntity$outboundSchema` instead. */ + export const outboundSchema = RetrospectivesTemplateEntity$outboundSchema; + /** @deprecated use `RetrospectivesTemplateEntity$Outbound` instead. */ + export type Outbound = RetrospectivesTemplateEntity$Outbound; +} + +export function retrospectivesTemplateEntityToJSON( + retrospectivesTemplateEntity: RetrospectivesTemplateEntity, +): string { + return JSON.stringify( + RetrospectivesTemplateEntity$outboundSchema.parse( + retrospectivesTemplateEntity, + ), + ); +} + +export function retrospectivesTemplateEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RetrospectivesTemplateEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RetrospectivesTemplateEntity' from JSON`, + ); +} diff --git a/src/models/components/retrospectivestemplateentityincidentsectionentity.ts b/src/models/components/retrospectivestemplateentityincidentsectionentity.ts new file mode 100644 index 00000000..a6884f3a --- /dev/null +++ b/src/models/components/retrospectivestemplateentityincidentsectionentity.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RetrospectivesTemplateEntityIncidentSectionEntity = { + slug?: string | null | undefined; + elements?: Array | null | undefined; +}; + +/** @internal */ +export const RetrospectivesTemplateEntityIncidentSectionEntity$inboundSchema: + z.ZodType< + RetrospectivesTemplateEntityIncidentSectionEntity, + z.ZodTypeDef, + unknown + > = z.object({ + slug: z.nullable(z.string()).optional(), + elements: z.nullable(z.array(z.string())).optional(), + }); + +/** @internal */ +export type RetrospectivesTemplateEntityIncidentSectionEntity$Outbound = { + slug?: string | null | undefined; + elements?: Array | null | undefined; +}; + +/** @internal */ +export const RetrospectivesTemplateEntityIncidentSectionEntity$outboundSchema: + z.ZodType< + RetrospectivesTemplateEntityIncidentSectionEntity$Outbound, + z.ZodTypeDef, + RetrospectivesTemplateEntityIncidentSectionEntity + > = z.object({ + slug: z.nullable(z.string()).optional(), + elements: z.nullable(z.array(z.string())).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RetrospectivesTemplateEntityIncidentSectionEntity$ { + /** @deprecated use `RetrospectivesTemplateEntityIncidentSectionEntity$inboundSchema` instead. */ + export const inboundSchema = + RetrospectivesTemplateEntityIncidentSectionEntity$inboundSchema; + /** @deprecated use `RetrospectivesTemplateEntityIncidentSectionEntity$outboundSchema` instead. */ + export const outboundSchema = + RetrospectivesTemplateEntityIncidentSectionEntity$outboundSchema; + /** @deprecated use `RetrospectivesTemplateEntityIncidentSectionEntity$Outbound` instead. */ + export type Outbound = + RetrospectivesTemplateEntityIncidentSectionEntity$Outbound; +} + +export function retrospectivesTemplateEntityIncidentSectionEntityToJSON( + retrospectivesTemplateEntityIncidentSectionEntity: + RetrospectivesTemplateEntityIncidentSectionEntity, +): string { + return JSON.stringify( + RetrospectivesTemplateEntityIncidentSectionEntity$outboundSchema.parse( + retrospectivesTemplateEntityIncidentSectionEntity, + ), + ); +} + +export function retrospectivesTemplateEntityIncidentSectionEntityFromJSON( + jsonString: string, +): SafeParseResult< + RetrospectivesTemplateEntityIncidentSectionEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + RetrospectivesTemplateEntityIncidentSectionEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'RetrospectivesTemplateEntityIncidentSectionEntity' from JSON`, + ); +} diff --git a/src/models/components/rulesruleentity.ts b/src/models/components/rulesruleentity.ts deleted file mode 100644 index a908162c..00000000 --- a/src/models/components/rulesruleentity.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - FHTypesGenericEntity, - FHTypesGenericEntity$inboundSchema, - FHTypesGenericEntity$Outbound, - FHTypesGenericEntity$outboundSchema, -} from "./fhtypesgenericentity.js"; - -/** - * An unstructured object of key/value pairs describing the logic for applying the rule. - */ -export type Logic = {}; - -export type RulesRuleEntity = { - /** - * An unstructured object of key/value pairs describing the logic for applying the rule. - */ - logic?: Logic | undefined; - userData?: FHTypesGenericEntity | undefined; -}; - -/** @internal */ -export const Logic$inboundSchema: z.ZodType = z - .object({}); - -/** @internal */ -export type Logic$Outbound = {}; - -/** @internal */ -export const Logic$outboundSchema: z.ZodType< - Logic$Outbound, - z.ZodTypeDef, - Logic -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Logic$ { - /** @deprecated use `Logic$inboundSchema` instead. */ - export const inboundSchema = Logic$inboundSchema; - /** @deprecated use `Logic$outboundSchema` instead. */ - export const outboundSchema = Logic$outboundSchema; - /** @deprecated use `Logic$Outbound` instead. */ - export type Outbound = Logic$Outbound; -} - -export function logicToJSON(logic: Logic): string { - return JSON.stringify(Logic$outboundSchema.parse(logic)); -} - -export function logicFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Logic$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Logic' from JSON`, - ); -} - -/** @internal */ -export const RulesRuleEntity$inboundSchema: z.ZodType< - RulesRuleEntity, - z.ZodTypeDef, - unknown -> = z.object({ - logic: z.lazy(() => Logic$inboundSchema).optional(), - user_data: FHTypesGenericEntity$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "user_data": "userData", - }); -}); - -/** @internal */ -export type RulesRuleEntity$Outbound = { - logic?: Logic$Outbound | undefined; - user_data?: FHTypesGenericEntity$Outbound | undefined; -}; - -/** @internal */ -export const RulesRuleEntity$outboundSchema: z.ZodType< - RulesRuleEntity$Outbound, - z.ZodTypeDef, - RulesRuleEntity -> = z.object({ - logic: z.lazy(() => Logic$outboundSchema).optional(), - userData: FHTypesGenericEntity$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - userData: "user_data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RulesRuleEntity$ { - /** @deprecated use `RulesRuleEntity$inboundSchema` instead. */ - export const inboundSchema = RulesRuleEntity$inboundSchema; - /** @deprecated use `RulesRuleEntity$outboundSchema` instead. */ - export const outboundSchema = RulesRuleEntity$outboundSchema; - /** @deprecated use `RulesRuleEntity$Outbound` instead. */ - export type Outbound = RulesRuleEntity$Outbound; -} - -export function rulesRuleEntityToJSON( - rulesRuleEntity: RulesRuleEntity, -): string { - return JSON.stringify(RulesRuleEntity$outboundSchema.parse(rulesRuleEntity)); -} - -export function rulesRuleEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RulesRuleEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RulesRuleEntity' from JSON`, - ); -} diff --git a/src/models/components/runbookentity.ts b/src/models/components/runbookentity.ts index d6f6cac8..bacbde98 100644 --- a/src/models/components/runbookentity.ts +++ b/src/models/components/runbookentity.ts @@ -8,64 +8,61 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; import { - RulesRuleEntity, - RulesRuleEntity$inboundSchema, - RulesRuleEntity$Outbound, - RulesRuleEntity$outboundSchema, -} from "./rulesruleentity.js"; + NullableRulesRuleEntity, + NullableRulesRuleEntity$inboundSchema, + NullableRulesRuleEntity$Outbound, + NullableRulesRuleEntity$outboundSchema, +} from "./nullablerulesruleentity.js"; import { - RunbookStepEntity, - RunbookStepEntity$inboundSchema, - RunbookStepEntity$Outbound, - RunbookStepEntity$outboundSchema, -} from "./runbookstepentity.js"; + NullableRunbookStepEntity, + NullableRunbookStepEntity$inboundSchema, + NullableRunbookStepEntity$Outbound, + NullableRunbookStepEntity$outboundSchema, +} from "./nullablerunbookstepentity.js"; import { - TeamEntityLite, - TeamEntityLite$inboundSchema, - TeamEntityLite$Outbound, - TeamEntityLite$outboundSchema, -} from "./teamentitylite.js"; + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; import { - VotesEntity, - VotesEntity$inboundSchema, - VotesEntity$Outbound, - VotesEntity$outboundSchema, -} from "./votesentity.js"; + NullableVotesEntity, + NullableVotesEntity$inboundSchema, + NullableVotesEntity$Outbound, + NullableVotesEntity$outboundSchema, +} from "./nullablevotesentity.js"; /** * RunbookEntity model */ export type RunbookEntity = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - type?: string | undefined; - runbookTemplateId?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - createdBy?: AuthorEntity | undefined; - updatedBy?: AuthorEntity | undefined; - steps?: RunbookStepEntity | undefined; - attachmentRule?: RulesRuleEntity | undefined; - /** - * VotesEntity model - */ - votes?: VotesEntity | undefined; - isEditable?: boolean | undefined; - owner?: TeamEntityLite | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + runbookTemplateId?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; + steps?: NullableRunbookStepEntity | null | undefined; + attachmentRule?: NullableRulesRuleEntity | null | undefined; + votes?: NullableVotesEntity | null | undefined; + isEditable?: boolean | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; /** * categories the runbook applies to */ - categories?: string | undefined; - autoAttachToRestrictedIncidents?: boolean | undefined; - tutorial?: boolean | undefined; + categories?: Array | null | undefined; + autoAttachToRestrictedIncidents?: boolean | null | undefined; + tutorial?: boolean | null | undefined; }; /** @internal */ @@ -74,26 +71,28 @@ export const RunbookEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - runbook_template_id: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - created_by: AuthorEntity$inboundSchema.optional(), - updated_by: AuthorEntity$inboundSchema.optional(), - steps: RunbookStepEntity$inboundSchema.optional(), - attachment_rule: RulesRuleEntity$inboundSchema.optional(), - votes: VotesEntity$inboundSchema.optional(), - is_editable: z.boolean().optional(), - owner: TeamEntityLite$inboundSchema.optional(), - categories: z.string().optional(), - auto_attach_to_restricted_incidents: z.boolean().optional(), - tutorial: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + runbook_template_id: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + steps: z.nullable(NullableRunbookStepEntity$inboundSchema).optional(), + attachment_rule: z.nullable(NullableRulesRuleEntity$inboundSchema).optional(), + votes: z.nullable(NullableVotesEntity$inboundSchema).optional(), + is_editable: z.nullable(z.boolean()).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + categories: z.nullable(z.array(z.string())).optional(), + auto_attach_to_restricted_incidents: z.nullable(z.boolean()).optional(), + tutorial: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "runbook_template_id": "runbookTemplateId", @@ -109,24 +108,24 @@ export const RunbookEntity$inboundSchema: z.ZodType< /** @internal */ export type RunbookEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - type?: string | undefined; - runbook_template_id?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - created_by?: AuthorEntity$Outbound | undefined; - updated_by?: AuthorEntity$Outbound | undefined; - steps?: RunbookStepEntity$Outbound | undefined; - attachment_rule?: RulesRuleEntity$Outbound | undefined; - votes?: VotesEntity$Outbound | undefined; - is_editable?: boolean | undefined; - owner?: TeamEntityLite$Outbound | undefined; - categories?: string | undefined; - auto_attach_to_restricted_incidents?: boolean | undefined; - tutorial?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + runbook_template_id?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; + steps?: NullableRunbookStepEntity$Outbound | null | undefined; + attachment_rule?: NullableRulesRuleEntity$Outbound | null | undefined; + votes?: NullableVotesEntity$Outbound | null | undefined; + is_editable?: boolean | null | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + categories?: Array | null | undefined; + auto_attach_to_restricted_incidents?: boolean | null | undefined; + tutorial?: boolean | null | undefined; }; /** @internal */ @@ -135,24 +134,24 @@ export const RunbookEntity$outboundSchema: z.ZodType< z.ZodTypeDef, RunbookEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - runbookTemplateId: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - updatedBy: AuthorEntity$outboundSchema.optional(), - steps: RunbookStepEntity$outboundSchema.optional(), - attachmentRule: RulesRuleEntity$outboundSchema.optional(), - votes: VotesEntity$outboundSchema.optional(), - isEditable: z.boolean().optional(), - owner: TeamEntityLite$outboundSchema.optional(), - categories: z.string().optional(), - autoAttachToRestrictedIncidents: z.boolean().optional(), - tutorial: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + runbookTemplateId: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + steps: z.nullable(NullableRunbookStepEntity$outboundSchema).optional(), + attachmentRule: z.nullable(NullableRulesRuleEntity$outboundSchema).optional(), + votes: z.nullable(NullableVotesEntity$outboundSchema).optional(), + isEditable: z.nullable(z.boolean()).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + categories: z.nullable(z.array(z.string())).optional(), + autoAttachToRestrictedIncidents: z.nullable(z.boolean()).optional(), + tutorial: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { runbookTemplateId: "runbook_template_id", diff --git a/src/models/components/runbooksactionconfigentity.ts b/src/models/components/runbooksactionconfigentity.ts deleted file mode 100644 index 77b01429..00000000 --- a/src/models/components/runbooksactionconfigentity.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - RunbooksElementEntity, - RunbooksElementEntity$inboundSchema, - RunbooksElementEntity$Outbound, - RunbooksElementEntity$outboundSchema, -} from "./runbookselemententity.js"; - -export type RunbooksActionConfigEntity = { - elements?: RunbooksElementEntity | undefined; - /** - * Location of documentation for this action - */ - documentationUrl?: string | undefined; -}; - -/** @internal */ -export const RunbooksActionConfigEntity$inboundSchema: z.ZodType< - RunbooksActionConfigEntity, - z.ZodTypeDef, - unknown -> = z.object({ - elements: RunbooksElementEntity$inboundSchema.optional(), - documentation_url: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "documentation_url": "documentationUrl", - }); -}); - -/** @internal */ -export type RunbooksActionConfigEntity$Outbound = { - elements?: RunbooksElementEntity$Outbound | undefined; - documentation_url?: string | undefined; -}; - -/** @internal */ -export const RunbooksActionConfigEntity$outboundSchema: z.ZodType< - RunbooksActionConfigEntity$Outbound, - z.ZodTypeDef, - RunbooksActionConfigEntity -> = z.object({ - elements: RunbooksElementEntity$outboundSchema.optional(), - documentationUrl: z.string().optional(), -}).transform((v) => { - return remap$(v, { - documentationUrl: "documentation_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksActionConfigEntity$ { - /** @deprecated use `RunbooksActionConfigEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksActionConfigEntity$inboundSchema; - /** @deprecated use `RunbooksActionConfigEntity$outboundSchema` instead. */ - export const outboundSchema = RunbooksActionConfigEntity$outboundSchema; - /** @deprecated use `RunbooksActionConfigEntity$Outbound` instead. */ - export type Outbound = RunbooksActionConfigEntity$Outbound; -} - -export function runbooksActionConfigEntityToJSON( - runbooksActionConfigEntity: RunbooksActionConfigEntity, -): string { - return JSON.stringify( - RunbooksActionConfigEntity$outboundSchema.parse(runbooksActionConfigEntity), - ); -} - -export function runbooksActionConfigEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksActionConfigEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksActionConfigEntity' from JSON`, - ); -} diff --git a/src/models/components/runbooksactionsentity.ts b/src/models/components/runbooksactionsentity.ts index fa288092..59988df9 100644 --- a/src/models/components/runbooksactionsentity.ts +++ b/src/models/components/runbooksactionsentity.ts @@ -8,177 +8,196 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IntegrationsIntegrationEntity, - IntegrationsIntegrationEntity$inboundSchema, - IntegrationsIntegrationEntity$Outbound, - IntegrationsIntegrationEntity$outboundSchema, -} from "./integrationsintegrationentity.js"; + NullableIntegrationsIntegrationEntity, + NullableIntegrationsIntegrationEntity$inboundSchema, + NullableIntegrationsIntegrationEntity$Outbound, + NullableIntegrationsIntegrationEntity$outboundSchema, +} from "./nullableintegrationsintegrationentity.js"; import { - RunbooksActionConfigEntity, - RunbooksActionConfigEntity$inboundSchema, - RunbooksActionConfigEntity$Outbound, - RunbooksActionConfigEntity$outboundSchema, -} from "./runbooksactionconfigentity.js"; + NullableRunbooksActionConfigEntity, + NullableRunbooksActionConfigEntity$inboundSchema, + NullableRunbooksActionConfigEntity$Outbound, + NullableRunbooksActionConfigEntity$outboundSchema, +} from "./nullablerunbooksactionconfigentity.js"; -export type Prerequisites = {}; +export type RunbooksActionsEntityPrerequisites = {}; -export type DefaultLogic = {}; +export type RunbooksActionsEntityDefaultLogic = {}; -export type DefaultRuleData = {}; +export type RunbooksActionsEntityDefaultRuleData = {}; export type RunbooksActionsEntity = { - id?: string | undefined; - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - config?: RunbooksActionConfigEntity | undefined; - category?: string | undefined; - prerequisites?: Prerequisites | undefined; - /** - * Integrations_IntegrationEntity model - */ - integration?: IntegrationsIntegrationEntity | undefined; - supportedRunbookTypes?: Array | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - automatable?: boolean | undefined; - rerunnable?: boolean | undefined; - repeatable?: boolean | undefined; - defaultLogic?: DefaultLogic | undefined; - defaultRuleData?: DefaultRuleData | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + config?: NullableRunbooksActionConfigEntity | null | undefined; + category?: string | null | undefined; + prerequisites?: RunbooksActionsEntityPrerequisites | null | undefined; + integration?: NullableIntegrationsIntegrationEntity | null | undefined; + supportedRunbookTypes?: Array | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + automatable?: boolean | null | undefined; + rerunnable?: boolean | null | undefined; + repeatable?: boolean | null | undefined; + defaultLogic?: RunbooksActionsEntityDefaultLogic | null | undefined; + defaultRuleData?: RunbooksActionsEntityDefaultRuleData | null | undefined; }; /** @internal */ -export const Prerequisites$inboundSchema: z.ZodType< - Prerequisites, +export const RunbooksActionsEntityPrerequisites$inboundSchema: z.ZodType< + RunbooksActionsEntityPrerequisites, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type Prerequisites$Outbound = {}; +export type RunbooksActionsEntityPrerequisites$Outbound = {}; /** @internal */ -export const Prerequisites$outboundSchema: z.ZodType< - Prerequisites$Outbound, +export const RunbooksActionsEntityPrerequisites$outboundSchema: z.ZodType< + RunbooksActionsEntityPrerequisites$Outbound, z.ZodTypeDef, - Prerequisites + RunbooksActionsEntityPrerequisites > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Prerequisites$ { - /** @deprecated use `Prerequisites$inboundSchema` instead. */ - export const inboundSchema = Prerequisites$inboundSchema; - /** @deprecated use `Prerequisites$outboundSchema` instead. */ - export const outboundSchema = Prerequisites$outboundSchema; - /** @deprecated use `Prerequisites$Outbound` instead. */ - export type Outbound = Prerequisites$Outbound; +export namespace RunbooksActionsEntityPrerequisites$ { + /** @deprecated use `RunbooksActionsEntityPrerequisites$inboundSchema` instead. */ + export const inboundSchema = RunbooksActionsEntityPrerequisites$inboundSchema; + /** @deprecated use `RunbooksActionsEntityPrerequisites$outboundSchema` instead. */ + export const outboundSchema = + RunbooksActionsEntityPrerequisites$outboundSchema; + /** @deprecated use `RunbooksActionsEntityPrerequisites$Outbound` instead. */ + export type Outbound = RunbooksActionsEntityPrerequisites$Outbound; } -export function prerequisitesToJSON(prerequisites: Prerequisites): string { - return JSON.stringify(Prerequisites$outboundSchema.parse(prerequisites)); +export function runbooksActionsEntityPrerequisitesToJSON( + runbooksActionsEntityPrerequisites: RunbooksActionsEntityPrerequisites, +): string { + return JSON.stringify( + RunbooksActionsEntityPrerequisites$outboundSchema.parse( + runbooksActionsEntityPrerequisites, + ), + ); } -export function prerequisitesFromJSON( +export function runbooksActionsEntityPrerequisitesFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => Prerequisites$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Prerequisites' from JSON`, + (x) => + RunbooksActionsEntityPrerequisites$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RunbooksActionsEntityPrerequisites' from JSON`, ); } /** @internal */ -export const DefaultLogic$inboundSchema: z.ZodType< - DefaultLogic, +export const RunbooksActionsEntityDefaultLogic$inboundSchema: z.ZodType< + RunbooksActionsEntityDefaultLogic, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type DefaultLogic$Outbound = {}; +export type RunbooksActionsEntityDefaultLogic$Outbound = {}; /** @internal */ -export const DefaultLogic$outboundSchema: z.ZodType< - DefaultLogic$Outbound, +export const RunbooksActionsEntityDefaultLogic$outboundSchema: z.ZodType< + RunbooksActionsEntityDefaultLogic$Outbound, z.ZodTypeDef, - DefaultLogic + RunbooksActionsEntityDefaultLogic > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DefaultLogic$ { - /** @deprecated use `DefaultLogic$inboundSchema` instead. */ - export const inboundSchema = DefaultLogic$inboundSchema; - /** @deprecated use `DefaultLogic$outboundSchema` instead. */ - export const outboundSchema = DefaultLogic$outboundSchema; - /** @deprecated use `DefaultLogic$Outbound` instead. */ - export type Outbound = DefaultLogic$Outbound; +export namespace RunbooksActionsEntityDefaultLogic$ { + /** @deprecated use `RunbooksActionsEntityDefaultLogic$inboundSchema` instead. */ + export const inboundSchema = RunbooksActionsEntityDefaultLogic$inboundSchema; + /** @deprecated use `RunbooksActionsEntityDefaultLogic$outboundSchema` instead. */ + export const outboundSchema = + RunbooksActionsEntityDefaultLogic$outboundSchema; + /** @deprecated use `RunbooksActionsEntityDefaultLogic$Outbound` instead. */ + export type Outbound = RunbooksActionsEntityDefaultLogic$Outbound; } -export function defaultLogicToJSON(defaultLogic: DefaultLogic): string { - return JSON.stringify(DefaultLogic$outboundSchema.parse(defaultLogic)); +export function runbooksActionsEntityDefaultLogicToJSON( + runbooksActionsEntityDefaultLogic: RunbooksActionsEntityDefaultLogic, +): string { + return JSON.stringify( + RunbooksActionsEntityDefaultLogic$outboundSchema.parse( + runbooksActionsEntityDefaultLogic, + ), + ); } -export function defaultLogicFromJSON( +export function runbooksActionsEntityDefaultLogicFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => DefaultLogic$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DefaultLogic' from JSON`, + (x) => RunbooksActionsEntityDefaultLogic$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RunbooksActionsEntityDefaultLogic' from JSON`, ); } /** @internal */ -export const DefaultRuleData$inboundSchema: z.ZodType< - DefaultRuleData, +export const RunbooksActionsEntityDefaultRuleData$inboundSchema: z.ZodType< + RunbooksActionsEntityDefaultRuleData, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type DefaultRuleData$Outbound = {}; +export type RunbooksActionsEntityDefaultRuleData$Outbound = {}; /** @internal */ -export const DefaultRuleData$outboundSchema: z.ZodType< - DefaultRuleData$Outbound, +export const RunbooksActionsEntityDefaultRuleData$outboundSchema: z.ZodType< + RunbooksActionsEntityDefaultRuleData$Outbound, z.ZodTypeDef, - DefaultRuleData + RunbooksActionsEntityDefaultRuleData > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DefaultRuleData$ { - /** @deprecated use `DefaultRuleData$inboundSchema` instead. */ - export const inboundSchema = DefaultRuleData$inboundSchema; - /** @deprecated use `DefaultRuleData$outboundSchema` instead. */ - export const outboundSchema = DefaultRuleData$outboundSchema; - /** @deprecated use `DefaultRuleData$Outbound` instead. */ - export type Outbound = DefaultRuleData$Outbound; +export namespace RunbooksActionsEntityDefaultRuleData$ { + /** @deprecated use `RunbooksActionsEntityDefaultRuleData$inboundSchema` instead. */ + export const inboundSchema = + RunbooksActionsEntityDefaultRuleData$inboundSchema; + /** @deprecated use `RunbooksActionsEntityDefaultRuleData$outboundSchema` instead. */ + export const outboundSchema = + RunbooksActionsEntityDefaultRuleData$outboundSchema; + /** @deprecated use `RunbooksActionsEntityDefaultRuleData$Outbound` instead. */ + export type Outbound = RunbooksActionsEntityDefaultRuleData$Outbound; } -export function defaultRuleDataToJSON( - defaultRuleData: DefaultRuleData, +export function runbooksActionsEntityDefaultRuleDataToJSON( + runbooksActionsEntityDefaultRuleData: RunbooksActionsEntityDefaultRuleData, ): string { - return JSON.stringify(DefaultRuleData$outboundSchema.parse(defaultRuleData)); + return JSON.stringify( + RunbooksActionsEntityDefaultRuleData$outboundSchema.parse( + runbooksActionsEntityDefaultRuleData, + ), + ); } -export function defaultRuleDataFromJSON( +export function runbooksActionsEntityDefaultRuleDataFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => DefaultRuleData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DefaultRuleData' from JSON`, + (x) => + RunbooksActionsEntityDefaultRuleData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RunbooksActionsEntityDefaultRuleData' from JSON`, ); } @@ -188,24 +207,34 @@ export const RunbooksActionsEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - config: RunbooksActionConfigEntity$inboundSchema.optional(), - category: z.string().optional(), - prerequisites: z.lazy(() => Prerequisites$inboundSchema).optional(), - integration: IntegrationsIntegrationEntity$inboundSchema.optional(), - supported_runbook_types: z.array(z.string()).optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + config: z.nullable(NullableRunbooksActionConfigEntity$inboundSchema) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + category: z.nullable(z.string()).optional(), + prerequisites: z.nullable( + z.lazy(() => RunbooksActionsEntityPrerequisites$inboundSchema), + ).optional(), + integration: z.nullable(NullableIntegrationsIntegrationEntity$inboundSchema) .optional(), - automatable: z.boolean().optional(), - rerunnable: z.boolean().optional(), - repeatable: z.boolean().optional(), - default_logic: z.lazy(() => DefaultLogic$inboundSchema).optional(), - default_rule_data: z.lazy(() => DefaultRuleData$inboundSchema).optional(), + supported_runbook_types: z.nullable(z.array(z.string())).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + automatable: z.nullable(z.boolean()).optional(), + rerunnable: z.nullable(z.boolean()).optional(), + repeatable: z.nullable(z.boolean()).optional(), + default_logic: z.nullable( + z.lazy(() => RunbooksActionsEntityDefaultLogic$inboundSchema), + ).optional(), + default_rule_data: z.nullable( + z.lazy(() => RunbooksActionsEntityDefaultRuleData$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "supported_runbook_types": "supportedRunbookTypes", @@ -218,22 +247,31 @@ export const RunbooksActionsEntity$inboundSchema: z.ZodType< /** @internal */ export type RunbooksActionsEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - config?: RunbooksActionConfigEntity$Outbound | undefined; - category?: string | undefined; - prerequisites?: Prerequisites$Outbound | undefined; - integration?: IntegrationsIntegrationEntity$Outbound | undefined; - supported_runbook_types?: Array | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - automatable?: boolean | undefined; - rerunnable?: boolean | undefined; - repeatable?: boolean | undefined; - default_logic?: DefaultLogic$Outbound | undefined; - default_rule_data?: DefaultRuleData$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + config?: NullableRunbooksActionConfigEntity$Outbound | null | undefined; + category?: string | null | undefined; + prerequisites?: + | RunbooksActionsEntityPrerequisites$Outbound + | null + | undefined; + integration?: + | NullableIntegrationsIntegrationEntity$Outbound + | null + | undefined; + supported_runbook_types?: Array | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + automatable?: boolean | null | undefined; + rerunnable?: boolean | null | undefined; + repeatable?: boolean | null | undefined; + default_logic?: RunbooksActionsEntityDefaultLogic$Outbound | null | undefined; + default_rule_data?: + | RunbooksActionsEntityDefaultRuleData$Outbound + | null + | undefined; }; /** @internal */ @@ -242,22 +280,30 @@ export const RunbooksActionsEntity$outboundSchema: z.ZodType< z.ZodTypeDef, RunbooksActionsEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - config: RunbooksActionConfigEntity$outboundSchema.optional(), - category: z.string().optional(), - prerequisites: z.lazy(() => Prerequisites$outboundSchema).optional(), - integration: IntegrationsIntegrationEntity$outboundSchema.optional(), - supportedRunbookTypes: z.array(z.string()).optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - automatable: z.boolean().optional(), - rerunnable: z.boolean().optional(), - repeatable: z.boolean().optional(), - defaultLogic: z.lazy(() => DefaultLogic$outboundSchema).optional(), - defaultRuleData: z.lazy(() => DefaultRuleData$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + config: z.nullable(NullableRunbooksActionConfigEntity$outboundSchema) + .optional(), + category: z.nullable(z.string()).optional(), + prerequisites: z.nullable( + z.lazy(() => RunbooksActionsEntityPrerequisites$outboundSchema), + ).optional(), + integration: z.nullable(NullableIntegrationsIntegrationEntity$outboundSchema) + .optional(), + supportedRunbookTypes: z.nullable(z.array(z.string())).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + automatable: z.nullable(z.boolean()).optional(), + rerunnable: z.nullable(z.boolean()).optional(), + repeatable: z.nullable(z.boolean()).optional(), + defaultLogic: z.nullable( + z.lazy(() => RunbooksActionsEntityDefaultLogic$outboundSchema), + ).optional(), + defaultRuleData: z.nullable( + z.lazy(() => RunbooksActionsEntityDefaultRuleData$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { supportedRunbookTypes: "supported_runbook_types", diff --git a/src/models/components/runbooksactionsentitypaginated.ts b/src/models/components/runbooksactionsentitypaginated.ts index 65e65b47..fcfb28bf 100644 --- a/src/models/components/runbooksactionsentitypaginated.ts +++ b/src/models/components/runbooksactionsentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { RunbooksActionsEntity, RunbooksActionsEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * Runbooks_ActionsEntityPaginated model */ export type RunbooksActionsEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const RunbooksActionsEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(RunbooksActionsEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(RunbooksActionsEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type RunbooksActionsEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const RunbooksActionsEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, RunbooksActionsEntityPaginated > = z.object({ - data: z.array(RunbooksActionsEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(RunbooksActionsEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/runbookselementdynamicselectentity.ts b/src/models/components/runbookselementdynamicselectentity.ts deleted file mode 100644 index 2959dbb2..00000000 --- a/src/models/components/runbookselementdynamicselectentity.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - RunbooksElementDynamicSelectEntitySelectOptionEntity, - RunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema, - RunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound, - RunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema, -} from "./runbookselementdynamicselectentityselectoptionentity.js"; - -export type RunbooksElementDynamicSelectEntity = { - label?: string | undefined; - placeholder?: string | undefined; - asyncUrl?: string | undefined; - required?: boolean | undefined; - clearable?: boolean | undefined; - isMulti?: boolean | undefined; - defaultValue?: - | RunbooksElementDynamicSelectEntitySelectOptionEntity - | undefined; - options?: - | Array - | undefined; -}; - -/** @internal */ -export const RunbooksElementDynamicSelectEntity$inboundSchema: z.ZodType< - RunbooksElementDynamicSelectEntity, - z.ZodTypeDef, - unknown -> = z.object({ - label: z.string().optional(), - placeholder: z.string().optional(), - async_url: z.string().optional(), - required: z.boolean().optional(), - clearable: z.boolean().optional(), - is_multi: z.boolean().optional(), - default_value: - RunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema - .optional(), - options: z.array( - RunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema, - ).optional(), -}).transform((v) => { - return remap$(v, { - "async_url": "asyncUrl", - "is_multi": "isMulti", - "default_value": "defaultValue", - }); -}); - -/** @internal */ -export type RunbooksElementDynamicSelectEntity$Outbound = { - label?: string | undefined; - placeholder?: string | undefined; - async_url?: string | undefined; - required?: boolean | undefined; - clearable?: boolean | undefined; - is_multi?: boolean | undefined; - default_value?: - | RunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound - | undefined; - options?: - | Array - | undefined; -}; - -/** @internal */ -export const RunbooksElementDynamicSelectEntity$outboundSchema: z.ZodType< - RunbooksElementDynamicSelectEntity$Outbound, - z.ZodTypeDef, - RunbooksElementDynamicSelectEntity -> = z.object({ - label: z.string().optional(), - placeholder: z.string().optional(), - asyncUrl: z.string().optional(), - required: z.boolean().optional(), - clearable: z.boolean().optional(), - isMulti: z.boolean().optional(), - defaultValue: - RunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema - .optional(), - options: z.array( - RunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema, - ).optional(), -}).transform((v) => { - return remap$(v, { - asyncUrl: "async_url", - isMulti: "is_multi", - defaultValue: "default_value", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksElementDynamicSelectEntity$ { - /** @deprecated use `RunbooksElementDynamicSelectEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksElementDynamicSelectEntity$inboundSchema; - /** @deprecated use `RunbooksElementDynamicSelectEntity$outboundSchema` instead. */ - export const outboundSchema = - RunbooksElementDynamicSelectEntity$outboundSchema; - /** @deprecated use `RunbooksElementDynamicSelectEntity$Outbound` instead. */ - export type Outbound = RunbooksElementDynamicSelectEntity$Outbound; -} - -export function runbooksElementDynamicSelectEntityToJSON( - runbooksElementDynamicSelectEntity: RunbooksElementDynamicSelectEntity, -): string { - return JSON.stringify( - RunbooksElementDynamicSelectEntity$outboundSchema.parse( - runbooksElementDynamicSelectEntity, - ), - ); -} - -export function runbooksElementDynamicSelectEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - RunbooksElementDynamicSelectEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksElementDynamicSelectEntity' from JSON`, - ); -} diff --git a/src/models/components/runbookselementdynamicselectentityselectoptionentity.ts b/src/models/components/runbookselementdynamicselectentityselectoptionentity.ts index 99321243..a2388e4c 100644 --- a/src/models/components/runbookselementdynamicselectentityselectoptionentity.ts +++ b/src/models/components/runbookselementdynamicselectentityselectoptionentity.ts @@ -8,8 +8,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type RunbooksElementDynamicSelectEntitySelectOptionEntity = { - label?: string | undefined; - value?: string | undefined; + label?: string | null | undefined; + value?: string | null | undefined; }; /** @internal */ @@ -19,14 +19,14 @@ export const RunbooksElementDynamicSelectEntitySelectOptionEntity$inboundSchema: z.ZodTypeDef, unknown > = z.object({ - label: z.string().optional(), - value: z.string().optional(), + label: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), }); /** @internal */ export type RunbooksElementDynamicSelectEntitySelectOptionEntity$Outbound = { - label?: string | undefined; - value?: string | undefined; + label?: string | null | undefined; + value?: string | null | undefined; }; /** @internal */ @@ -36,8 +36,8 @@ export const RunbooksElementDynamicSelectEntitySelectOptionEntity$outboundSchema z.ZodTypeDef, RunbooksElementDynamicSelectEntitySelectOptionEntity > = z.object({ - label: z.string().optional(), - value: z.string().optional(), + label: z.nullable(z.string()).optional(), + value: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/runbookselemententity.ts b/src/models/components/runbookselemententity.ts deleted file mode 100644 index 7cc80f9c..00000000 --- a/src/models/components/runbookselemententity.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - RunbooksElementDynamicSelectEntity, - RunbooksElementDynamicSelectEntity$inboundSchema, - RunbooksElementDynamicSelectEntity$Outbound, - RunbooksElementDynamicSelectEntity$outboundSchema, -} from "./runbookselementdynamicselectentity.js"; -import { - RunbooksElementInputEntity, - RunbooksElementInputEntity$inboundSchema, - RunbooksElementInputEntity$Outbound, - RunbooksElementInputEntity$outboundSchema, -} from "./runbookselementinputentity.js"; -import { - RunbooksElementMarkdownEntity, - RunbooksElementMarkdownEntity$inboundSchema, - RunbooksElementMarkdownEntity$Outbound, - RunbooksElementMarkdownEntity$outboundSchema, -} from "./runbookselementmarkdownentity.js"; -import { - RunbooksElementTextareaEntity, - RunbooksElementTextareaEntity$inboundSchema, - RunbooksElementTextareaEntity$Outbound, - RunbooksElementTextareaEntity$outboundSchema, -} from "./runbookselementtextareaentity.js"; - -export type RunbooksElementEntity = { - id?: string | undefined; - type?: string | undefined; - markdown?: RunbooksElementMarkdownEntity | undefined; - textarea?: RunbooksElementTextareaEntity | undefined; - input?: RunbooksElementInputEntity | undefined; - plainText?: RunbooksElementMarkdownEntity | undefined; - dynamicSelect?: RunbooksElementDynamicSelectEntity | undefined; -}; - -/** @internal */ -export const RunbooksElementEntity$inboundSchema: z.ZodType< - RunbooksElementEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - type: z.string().optional(), - markdown: RunbooksElementMarkdownEntity$inboundSchema.optional(), - textarea: RunbooksElementTextareaEntity$inboundSchema.optional(), - input: RunbooksElementInputEntity$inboundSchema.optional(), - plain_text: RunbooksElementMarkdownEntity$inboundSchema.optional(), - dynamic_select: RunbooksElementDynamicSelectEntity$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "plain_text": "plainText", - "dynamic_select": "dynamicSelect", - }); -}); - -/** @internal */ -export type RunbooksElementEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - markdown?: RunbooksElementMarkdownEntity$Outbound | undefined; - textarea?: RunbooksElementTextareaEntity$Outbound | undefined; - input?: RunbooksElementInputEntity$Outbound | undefined; - plain_text?: RunbooksElementMarkdownEntity$Outbound | undefined; - dynamic_select?: RunbooksElementDynamicSelectEntity$Outbound | undefined; -}; - -/** @internal */ -export const RunbooksElementEntity$outboundSchema: z.ZodType< - RunbooksElementEntity$Outbound, - z.ZodTypeDef, - RunbooksElementEntity -> = z.object({ - id: z.string().optional(), - type: z.string().optional(), - markdown: RunbooksElementMarkdownEntity$outboundSchema.optional(), - textarea: RunbooksElementTextareaEntity$outboundSchema.optional(), - input: RunbooksElementInputEntity$outboundSchema.optional(), - plainText: RunbooksElementMarkdownEntity$outboundSchema.optional(), - dynamicSelect: RunbooksElementDynamicSelectEntity$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - plainText: "plain_text", - dynamicSelect: "dynamic_select", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksElementEntity$ { - /** @deprecated use `RunbooksElementEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksElementEntity$inboundSchema; - /** @deprecated use `RunbooksElementEntity$outboundSchema` instead. */ - export const outboundSchema = RunbooksElementEntity$outboundSchema; - /** @deprecated use `RunbooksElementEntity$Outbound` instead. */ - export type Outbound = RunbooksElementEntity$Outbound; -} - -export function runbooksElementEntityToJSON( - runbooksElementEntity: RunbooksElementEntity, -): string { - return JSON.stringify( - RunbooksElementEntity$outboundSchema.parse(runbooksElementEntity), - ); -} - -export function runbooksElementEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksElementEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksElementEntity' from JSON`, - ); -} diff --git a/src/models/components/runbookselementinputentity.ts b/src/models/components/runbookselementinputentity.ts deleted file mode 100644 index ba4ca4f5..00000000 --- a/src/models/components/runbookselementinputentity.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type RunbooksElementInputEntity = { - label?: string | undefined; - placeholder?: string | undefined; - defaultValue?: string | undefined; - required?: boolean | undefined; -}; - -/** @internal */ -export const RunbooksElementInputEntity$inboundSchema: z.ZodType< - RunbooksElementInputEntity, - z.ZodTypeDef, - unknown -> = z.object({ - label: z.string().optional(), - placeholder: z.string().optional(), - default_value: z.string().optional(), - required: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "default_value": "defaultValue", - }); -}); - -/** @internal */ -export type RunbooksElementInputEntity$Outbound = { - label?: string | undefined; - placeholder?: string | undefined; - default_value?: string | undefined; - required?: boolean | undefined; -}; - -/** @internal */ -export const RunbooksElementInputEntity$outboundSchema: z.ZodType< - RunbooksElementInputEntity$Outbound, - z.ZodTypeDef, - RunbooksElementInputEntity -> = z.object({ - label: z.string().optional(), - placeholder: z.string().optional(), - defaultValue: z.string().optional(), - required: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - defaultValue: "default_value", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksElementInputEntity$ { - /** @deprecated use `RunbooksElementInputEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksElementInputEntity$inboundSchema; - /** @deprecated use `RunbooksElementInputEntity$outboundSchema` instead. */ - export const outboundSchema = RunbooksElementInputEntity$outboundSchema; - /** @deprecated use `RunbooksElementInputEntity$Outbound` instead. */ - export type Outbound = RunbooksElementInputEntity$Outbound; -} - -export function runbooksElementInputEntityToJSON( - runbooksElementInputEntity: RunbooksElementInputEntity, -): string { - return JSON.stringify( - RunbooksElementInputEntity$outboundSchema.parse(runbooksElementInputEntity), - ); -} - -export function runbooksElementInputEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksElementInputEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksElementInputEntity' from JSON`, - ); -} diff --git a/src/models/components/runbookselementmarkdownentity.ts b/src/models/components/runbookselementmarkdownentity.ts deleted file mode 100644 index 071dfcaf..00000000 --- a/src/models/components/runbookselementmarkdownentity.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type RunbooksElementMarkdownEntity = { - text?: string | undefined; -}; - -/** @internal */ -export const RunbooksElementMarkdownEntity$inboundSchema: z.ZodType< - RunbooksElementMarkdownEntity, - z.ZodTypeDef, - unknown -> = z.object({ - text: z.string().optional(), -}); - -/** @internal */ -export type RunbooksElementMarkdownEntity$Outbound = { - text?: string | undefined; -}; - -/** @internal */ -export const RunbooksElementMarkdownEntity$outboundSchema: z.ZodType< - RunbooksElementMarkdownEntity$Outbound, - z.ZodTypeDef, - RunbooksElementMarkdownEntity -> = z.object({ - text: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksElementMarkdownEntity$ { - /** @deprecated use `RunbooksElementMarkdownEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksElementMarkdownEntity$inboundSchema; - /** @deprecated use `RunbooksElementMarkdownEntity$outboundSchema` instead. */ - export const outboundSchema = RunbooksElementMarkdownEntity$outboundSchema; - /** @deprecated use `RunbooksElementMarkdownEntity$Outbound` instead. */ - export type Outbound = RunbooksElementMarkdownEntity$Outbound; -} - -export function runbooksElementMarkdownEntityToJSON( - runbooksElementMarkdownEntity: RunbooksElementMarkdownEntity, -): string { - return JSON.stringify( - RunbooksElementMarkdownEntity$outboundSchema.parse( - runbooksElementMarkdownEntity, - ), - ); -} - -export function runbooksElementMarkdownEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksElementMarkdownEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksElementMarkdownEntity' from JSON`, - ); -} diff --git a/src/models/components/runbookselementtextareaentity.ts b/src/models/components/runbookselementtextareaentity.ts deleted file mode 100644 index 2d3225cc..00000000 --- a/src/models/components/runbookselementtextareaentity.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type RunbooksElementTextareaEntity = { - label?: string | undefined; - placeholder?: string | undefined; - defaultValue?: string | undefined; -}; - -/** @internal */ -export const RunbooksElementTextareaEntity$inboundSchema: z.ZodType< - RunbooksElementTextareaEntity, - z.ZodTypeDef, - unknown -> = z.object({ - label: z.string().optional(), - placeholder: z.string().optional(), - default_value: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "default_value": "defaultValue", - }); -}); - -/** @internal */ -export type RunbooksElementTextareaEntity$Outbound = { - label?: string | undefined; - placeholder?: string | undefined; - default_value?: string | undefined; -}; - -/** @internal */ -export const RunbooksElementTextareaEntity$outboundSchema: z.ZodType< - RunbooksElementTextareaEntity$Outbound, - z.ZodTypeDef, - RunbooksElementTextareaEntity -> = z.object({ - label: z.string().optional(), - placeholder: z.string().optional(), - defaultValue: z.string().optional(), -}).transform((v) => { - return remap$(v, { - defaultValue: "default_value", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksElementTextareaEntity$ { - /** @deprecated use `RunbooksElementTextareaEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksElementTextareaEntity$inboundSchema; - /** @deprecated use `RunbooksElementTextareaEntity$outboundSchema` instead. */ - export const outboundSchema = RunbooksElementTextareaEntity$outboundSchema; - /** @deprecated use `RunbooksElementTextareaEntity$Outbound` instead. */ - export type Outbound = RunbooksElementTextareaEntity$Outbound; -} - -export function runbooksElementTextareaEntityToJSON( - runbooksElementTextareaEntity: RunbooksElementTextareaEntity, -): string { - return JSON.stringify( - RunbooksElementTextareaEntity$outboundSchema.parse( - runbooksElementTextareaEntity, - ), - ); -} - -export function runbooksElementTextareaEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksElementTextareaEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksElementTextareaEntity' from JSON`, - ); -} diff --git a/src/models/components/runbooksexecutionentity.ts b/src/models/components/runbooksexecutionentity.ts index 8eb97eae..fdf40ebe 100644 --- a/src/models/components/runbooksexecutionentity.ts +++ b/src/models/components/runbooksexecutionentity.ts @@ -8,39 +8,42 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - RunbooksExecutionEntityExecutedForEntity, - RunbooksExecutionEntityExecutedForEntity$inboundSchema, - RunbooksExecutionEntityExecutedForEntity$Outbound, - RunbooksExecutionEntityExecutedForEntity$outboundSchema, -} from "./runbooksexecutionentityexecutedforentity.js"; + NullableRunbooksExecutionEntityExecutedForEntity, + NullableRunbooksExecutionEntityExecutedForEntity$inboundSchema, + NullableRunbooksExecutionEntityExecutedForEntity$Outbound, + NullableRunbooksExecutionEntityExecutedForEntity$outboundSchema, +} from "./nullablerunbooksexecutionentityexecutedforentity.js"; import { - RunbooksExecutionStepEntity, - RunbooksExecutionStepEntity$inboundSchema, - RunbooksExecutionStepEntity$Outbound, - RunbooksExecutionStepEntity$outboundSchema, -} from "./runbooksexecutionstepentity.js"; + NullableRunbooksExecutionStepEntity, + NullableRunbooksExecutionStepEntity$inboundSchema, + NullableRunbooksExecutionStepEntity$Outbound, + NullableRunbooksExecutionStepEntity$outboundSchema, +} from "./nullablerunbooksexecutionstepentity.js"; import { - SlimRunbookEntity, - SlimRunbookEntity$inboundSchema, - SlimRunbookEntity$Outbound, - SlimRunbookEntity$outboundSchema, -} from "./slimrunbookentity.js"; + NullableSlimRunbookEntity, + NullableSlimRunbookEntity$inboundSchema, + NullableSlimRunbookEntity$Outbound, + NullableSlimRunbookEntity$outboundSchema, +} from "./nullableslimrunbookentity.js"; /** * Runbooks_ExecutionEntity model */ export type RunbooksExecutionEntity = { - id?: string | undefined; - status?: string | undefined; - statusReason?: string | undefined; - statusReasonMessage?: string | undefined; - hasBeenRerun?: boolean | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - createdBy?: string | undefined; - runbook?: SlimRunbookEntity | undefined; - steps?: RunbooksExecutionStepEntity | undefined; - executedFor?: RunbooksExecutionEntityExecutedForEntity | undefined; + id?: string | null | undefined; + status?: string | null | undefined; + statusReason?: string | null | undefined; + statusReasonMessage?: string | null | undefined; + hasBeenRerun?: boolean | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + createdBy?: string | null | undefined; + runbook?: NullableSlimRunbookEntity | null | undefined; + steps?: NullableRunbooksExecutionStepEntity | null | undefined; + executedFor?: + | NullableRunbooksExecutionEntityExecutedForEntity + | null + | undefined; }; /** @internal */ @@ -49,20 +52,24 @@ export const RunbooksExecutionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - status: z.string().optional(), - status_reason: z.string().optional(), - status_reason_message: z.string().optional(), - has_been_rerun: z.boolean().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - created_by: z.string().optional(), - runbook: SlimRunbookEntity$inboundSchema.optional(), - steps: RunbooksExecutionStepEntity$inboundSchema.optional(), - executed_for: RunbooksExecutionEntityExecutedForEntity$inboundSchema + id: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + status_reason: z.nullable(z.string()).optional(), + status_reason_message: z.nullable(z.string()).optional(), + has_been_rerun: z.nullable(z.boolean()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + created_by: z.nullable(z.string()).optional(), + runbook: z.nullable(NullableSlimRunbookEntity$inboundSchema).optional(), + steps: z.nullable(NullableRunbooksExecutionStepEntity$inboundSchema) .optional(), + executed_for: z.nullable( + NullableRunbooksExecutionEntityExecutedForEntity$inboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { "status_reason": "statusReason", @@ -77,17 +84,20 @@ export const RunbooksExecutionEntity$inboundSchema: z.ZodType< /** @internal */ export type RunbooksExecutionEntity$Outbound = { - id?: string | undefined; - status?: string | undefined; - status_reason?: string | undefined; - status_reason_message?: string | undefined; - has_been_rerun?: boolean | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - created_by?: string | undefined; - runbook?: SlimRunbookEntity$Outbound | undefined; - steps?: RunbooksExecutionStepEntity$Outbound | undefined; - executed_for?: RunbooksExecutionEntityExecutedForEntity$Outbound | undefined; + id?: string | null | undefined; + status?: string | null | undefined; + status_reason?: string | null | undefined; + status_reason_message?: string | null | undefined; + has_been_rerun?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + created_by?: string | null | undefined; + runbook?: NullableSlimRunbookEntity$Outbound | null | undefined; + steps?: NullableRunbooksExecutionStepEntity$Outbound | null | undefined; + executed_for?: + | NullableRunbooksExecutionEntityExecutedForEntity$Outbound + | null + | undefined; }; /** @internal */ @@ -96,18 +106,20 @@ export const RunbooksExecutionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, RunbooksExecutionEntity > = z.object({ - id: z.string().optional(), - status: z.string().optional(), - statusReason: z.string().optional(), - statusReasonMessage: z.string().optional(), - hasBeenRerun: z.boolean().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - createdBy: z.string().optional(), - runbook: SlimRunbookEntity$outboundSchema.optional(), - steps: RunbooksExecutionStepEntity$outboundSchema.optional(), - executedFor: RunbooksExecutionEntityExecutedForEntity$outboundSchema + id: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + statusReason: z.nullable(z.string()).optional(), + statusReasonMessage: z.nullable(z.string()).optional(), + hasBeenRerun: z.nullable(z.boolean()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + createdBy: z.nullable(z.string()).optional(), + runbook: z.nullable(NullableSlimRunbookEntity$outboundSchema).optional(), + steps: z.nullable(NullableRunbooksExecutionStepEntity$outboundSchema) .optional(), + executedFor: z.nullable( + NullableRunbooksExecutionEntityExecutedForEntity$outboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { statusReason: "status_reason", diff --git a/src/models/components/runbooksexecutionentityexecutedforentity.ts b/src/models/components/runbooksexecutionentityexecutedforentity.ts deleted file mode 100644 index 79a47835..00000000 --- a/src/models/components/runbooksexecutionentityexecutedforentity.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type RunbooksExecutionEntityExecutedForEntity = { - id?: string | undefined; - type?: string | undefined; - name?: string | undefined; -}; - -/** @internal */ -export const RunbooksExecutionEntityExecutedForEntity$inboundSchema: z.ZodType< - RunbooksExecutionEntityExecutedForEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - type: z.string().optional(), - name: z.string().optional(), -}); - -/** @internal */ -export type RunbooksExecutionEntityExecutedForEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - name?: string | undefined; -}; - -/** @internal */ -export const RunbooksExecutionEntityExecutedForEntity$outboundSchema: z.ZodType< - RunbooksExecutionEntityExecutedForEntity$Outbound, - z.ZodTypeDef, - RunbooksExecutionEntityExecutedForEntity -> = z.object({ - id: z.string().optional(), - type: z.string().optional(), - name: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksExecutionEntityExecutedForEntity$ { - /** @deprecated use `RunbooksExecutionEntityExecutedForEntity$inboundSchema` instead. */ - export const inboundSchema = - RunbooksExecutionEntityExecutedForEntity$inboundSchema; - /** @deprecated use `RunbooksExecutionEntityExecutedForEntity$outboundSchema` instead. */ - export const outboundSchema = - RunbooksExecutionEntityExecutedForEntity$outboundSchema; - /** @deprecated use `RunbooksExecutionEntityExecutedForEntity$Outbound` instead. */ - export type Outbound = RunbooksExecutionEntityExecutedForEntity$Outbound; -} - -export function runbooksExecutionEntityExecutedForEntityToJSON( - runbooksExecutionEntityExecutedForEntity: - RunbooksExecutionEntityExecutedForEntity, -): string { - return JSON.stringify( - RunbooksExecutionEntityExecutedForEntity$outboundSchema.parse( - runbooksExecutionEntityExecutedForEntity, - ), - ); -} - -export function runbooksExecutionEntityExecutedForEntityFromJSON( - jsonString: string, -): SafeParseResult< - RunbooksExecutionEntityExecutedForEntity, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - RunbooksExecutionEntityExecutedForEntity$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'RunbooksExecutionEntityExecutedForEntity' from JSON`, - ); -} diff --git a/src/models/components/runbooksexecutionentitypaginated.ts b/src/models/components/runbooksexecutionentitypaginated.ts index d63af219..21fd1f2c 100644 --- a/src/models/components/runbooksexecutionentitypaginated.ts +++ b/src/models/components/runbooksexecutionentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { RunbooksExecutionEntity, RunbooksExecutionEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * Runbooks_ExecutionEntityPaginated model */ export type RunbooksExecutionEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const RunbooksExecutionEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(RunbooksExecutionEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(RunbooksExecutionEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type RunbooksExecutionEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const RunbooksExecutionEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, RunbooksExecutionEntityPaginated > = z.object({ - data: z.array(RunbooksExecutionEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(RunbooksExecutionEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/runbooksexecutionstepentity.ts b/src/models/components/runbooksexecutionstepentity.ts deleted file mode 100644 index 234f28af..00000000 --- a/src/models/components/runbooksexecutionstepentity.ts +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - RulesRuleEntity, - RulesRuleEntity$inboundSchema, - RulesRuleEntity$Outbound, - RulesRuleEntity$outboundSchema, -} from "./rulesruleentity.js"; -import { - RunbooksExecutionStepExecutionEntity, - RunbooksExecutionStepExecutionEntity$inboundSchema, - RunbooksExecutionStepExecutionEntity$Outbound, - RunbooksExecutionStepExecutionEntity$outboundSchema, -} from "./runbooksexecutionstepexecutionentity.js"; - -export type RunbooksExecutionStepEntityConfig = {}; - -export type RunbooksExecutionStepEntityStepElements = {}; - -export type RunbooksExecutionStepEntity = { - id?: string | undefined; - name?: string | undefined; - actionSlug?: string | undefined; - actionType?: string | undefined; - integrationName?: string | undefined; - integrationSlug?: string | undefined; - automatic?: boolean | undefined; - config?: RunbooksExecutionStepEntityConfig | undefined; - stepElements?: Array | undefined; - executable?: boolean | undefined; - repeats?: boolean | undefined; - /** - * ISO8601 formatted duration string - */ - repeatsDuration?: string | undefined; - repeatsAt?: Date | undefined; - hasBeenRerun?: boolean | undefined; - hasBeenRetried?: boolean | undefined; - execution?: RunbooksExecutionStepExecutionEntity | undefined; - repeatable?: boolean | undefined; - rule?: RulesRuleEntity | undefined; -}; - -/** @internal */ -export const RunbooksExecutionStepEntityConfig$inboundSchema: z.ZodType< - RunbooksExecutionStepEntityConfig, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type RunbooksExecutionStepEntityConfig$Outbound = {}; - -/** @internal */ -export const RunbooksExecutionStepEntityConfig$outboundSchema: z.ZodType< - RunbooksExecutionStepEntityConfig$Outbound, - z.ZodTypeDef, - RunbooksExecutionStepEntityConfig -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksExecutionStepEntityConfig$ { - /** @deprecated use `RunbooksExecutionStepEntityConfig$inboundSchema` instead. */ - export const inboundSchema = RunbooksExecutionStepEntityConfig$inboundSchema; - /** @deprecated use `RunbooksExecutionStepEntityConfig$outboundSchema` instead. */ - export const outboundSchema = - RunbooksExecutionStepEntityConfig$outboundSchema; - /** @deprecated use `RunbooksExecutionStepEntityConfig$Outbound` instead. */ - export type Outbound = RunbooksExecutionStepEntityConfig$Outbound; -} - -export function runbooksExecutionStepEntityConfigToJSON( - runbooksExecutionStepEntityConfig: RunbooksExecutionStepEntityConfig, -): string { - return JSON.stringify( - RunbooksExecutionStepEntityConfig$outboundSchema.parse( - runbooksExecutionStepEntityConfig, - ), - ); -} - -export function runbooksExecutionStepEntityConfigFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksExecutionStepEntityConfig$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksExecutionStepEntityConfig' from JSON`, - ); -} - -/** @internal */ -export const RunbooksExecutionStepEntityStepElements$inboundSchema: z.ZodType< - RunbooksExecutionStepEntityStepElements, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type RunbooksExecutionStepEntityStepElements$Outbound = {}; - -/** @internal */ -export const RunbooksExecutionStepEntityStepElements$outboundSchema: z.ZodType< - RunbooksExecutionStepEntityStepElements$Outbound, - z.ZodTypeDef, - RunbooksExecutionStepEntityStepElements -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksExecutionStepEntityStepElements$ { - /** @deprecated use `RunbooksExecutionStepEntityStepElements$inboundSchema` instead. */ - export const inboundSchema = - RunbooksExecutionStepEntityStepElements$inboundSchema; - /** @deprecated use `RunbooksExecutionStepEntityStepElements$outboundSchema` instead. */ - export const outboundSchema = - RunbooksExecutionStepEntityStepElements$outboundSchema; - /** @deprecated use `RunbooksExecutionStepEntityStepElements$Outbound` instead. */ - export type Outbound = RunbooksExecutionStepEntityStepElements$Outbound; -} - -export function runbooksExecutionStepEntityStepElementsToJSON( - runbooksExecutionStepEntityStepElements: - RunbooksExecutionStepEntityStepElements, -): string { - return JSON.stringify( - RunbooksExecutionStepEntityStepElements$outboundSchema.parse( - runbooksExecutionStepEntityStepElements, - ), - ); -} - -export function runbooksExecutionStepEntityStepElementsFromJSON( - jsonString: string, -): SafeParseResult< - RunbooksExecutionStepEntityStepElements, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - RunbooksExecutionStepEntityStepElements$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'RunbooksExecutionStepEntityStepElements' from JSON`, - ); -} - -/** @internal */ -export const RunbooksExecutionStepEntity$inboundSchema: z.ZodType< - RunbooksExecutionStepEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - action_slug: z.string().optional(), - action_type: z.string().optional(), - integration_name: z.string().optional(), - integration_slug: z.string().optional(), - automatic: z.boolean().optional(), - config: z.lazy(() => RunbooksExecutionStepEntityConfig$inboundSchema) - .optional(), - step_elements: z.array( - z.lazy(() => RunbooksExecutionStepEntityStepElements$inboundSchema), - ).optional(), - executable: z.boolean().optional(), - repeats: z.boolean().optional(), - repeats_duration: z.string().optional(), - repeats_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - has_been_rerun: z.boolean().optional(), - has_been_retried: z.boolean().optional(), - execution: RunbooksExecutionStepExecutionEntity$inboundSchema.optional(), - repeatable: z.boolean().optional(), - rule: RulesRuleEntity$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "action_slug": "actionSlug", - "action_type": "actionType", - "integration_name": "integrationName", - "integration_slug": "integrationSlug", - "step_elements": "stepElements", - "repeats_duration": "repeatsDuration", - "repeats_at": "repeatsAt", - "has_been_rerun": "hasBeenRerun", - "has_been_retried": "hasBeenRetried", - }); -}); - -/** @internal */ -export type RunbooksExecutionStepEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - action_slug?: string | undefined; - action_type?: string | undefined; - integration_name?: string | undefined; - integration_slug?: string | undefined; - automatic?: boolean | undefined; - config?: RunbooksExecutionStepEntityConfig$Outbound | undefined; - step_elements?: - | Array - | undefined; - executable?: boolean | undefined; - repeats?: boolean | undefined; - repeats_duration?: string | undefined; - repeats_at?: string | undefined; - has_been_rerun?: boolean | undefined; - has_been_retried?: boolean | undefined; - execution?: RunbooksExecutionStepExecutionEntity$Outbound | undefined; - repeatable?: boolean | undefined; - rule?: RulesRuleEntity$Outbound | undefined; -}; - -/** @internal */ -export const RunbooksExecutionStepEntity$outboundSchema: z.ZodType< - RunbooksExecutionStepEntity$Outbound, - z.ZodTypeDef, - RunbooksExecutionStepEntity -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - actionSlug: z.string().optional(), - actionType: z.string().optional(), - integrationName: z.string().optional(), - integrationSlug: z.string().optional(), - automatic: z.boolean().optional(), - config: z.lazy(() => RunbooksExecutionStepEntityConfig$outboundSchema) - .optional(), - stepElements: z.array( - z.lazy(() => RunbooksExecutionStepEntityStepElements$outboundSchema), - ).optional(), - executable: z.boolean().optional(), - repeats: z.boolean().optional(), - repeatsDuration: z.string().optional(), - repeatsAt: z.date().transform(v => v.toISOString()).optional(), - hasBeenRerun: z.boolean().optional(), - hasBeenRetried: z.boolean().optional(), - execution: RunbooksExecutionStepExecutionEntity$outboundSchema.optional(), - repeatable: z.boolean().optional(), - rule: RulesRuleEntity$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - actionSlug: "action_slug", - actionType: "action_type", - integrationName: "integration_name", - integrationSlug: "integration_slug", - stepElements: "step_elements", - repeatsDuration: "repeats_duration", - repeatsAt: "repeats_at", - hasBeenRerun: "has_been_rerun", - hasBeenRetried: "has_been_retried", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksExecutionStepEntity$ { - /** @deprecated use `RunbooksExecutionStepEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksExecutionStepEntity$inboundSchema; - /** @deprecated use `RunbooksExecutionStepEntity$outboundSchema` instead. */ - export const outboundSchema = RunbooksExecutionStepEntity$outboundSchema; - /** @deprecated use `RunbooksExecutionStepEntity$Outbound` instead. */ - export type Outbound = RunbooksExecutionStepEntity$Outbound; -} - -export function runbooksExecutionStepEntityToJSON( - runbooksExecutionStepEntity: RunbooksExecutionStepEntity, -): string { - return JSON.stringify( - RunbooksExecutionStepEntity$outboundSchema.parse( - runbooksExecutionStepEntity, - ), - ); -} - -export function runbooksExecutionStepEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksExecutionStepEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksExecutionStepEntity' from JSON`, - ); -} diff --git a/src/models/components/runbooksexecutionstepexecutionentity.ts b/src/models/components/runbooksexecutionstepexecutionentity.ts deleted file mode 100644 index 25ca3aa9..00000000 --- a/src/models/components/runbooksexecutionstepexecutionentity.ts +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ActorEntity, - ActorEntity$inboundSchema, - ActorEntity$Outbound, - ActorEntity$outboundSchema, -} from "./actorentity.js"; -import { - RunbooksWebhookDeliveryEntity, - RunbooksWebhookDeliveryEntity$inboundSchema, - RunbooksWebhookDeliveryEntity$Outbound, - RunbooksWebhookDeliveryEntity$outboundSchema, -} from "./runbookswebhookdeliveryentity.js"; - -export const RunbooksExecutionStepExecutionEntityState = { - Initial: "initial", - Pending: "pending", - Scheduled: "scheduled", - Started: "started", - Dismissed: "dismissed", - Completed: "completed", - Errored: "errored", -} as const; -export type RunbooksExecutionStepExecutionEntityState = ClosedEnum< - typeof RunbooksExecutionStepExecutionEntityState ->; - -export type RunbooksExecutionStepExecutionEntityData = {}; - -export type RunbooksExecutionStepExecutionEntity = { - state?: RunbooksExecutionStepExecutionEntityState | undefined; - data?: RunbooksExecutionStepExecutionEntityData | undefined; - performedBy?: ActorEntity | undefined; - performedAt?: Date | undefined; - scheduledFor?: Date | undefined; - error?: string | undefined; - webhookDelivery?: RunbooksWebhookDeliveryEntity | undefined; -}; - -/** @internal */ -export const RunbooksExecutionStepExecutionEntityState$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(RunbooksExecutionStepExecutionEntityState); - -/** @internal */ -export const RunbooksExecutionStepExecutionEntityState$outboundSchema: - z.ZodNativeEnum = - RunbooksExecutionStepExecutionEntityState$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksExecutionStepExecutionEntityState$ { - /** @deprecated use `RunbooksExecutionStepExecutionEntityState$inboundSchema` instead. */ - export const inboundSchema = - RunbooksExecutionStepExecutionEntityState$inboundSchema; - /** @deprecated use `RunbooksExecutionStepExecutionEntityState$outboundSchema` instead. */ - export const outboundSchema = - RunbooksExecutionStepExecutionEntityState$outboundSchema; -} - -/** @internal */ -export const RunbooksExecutionStepExecutionEntityData$inboundSchema: z.ZodType< - RunbooksExecutionStepExecutionEntityData, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type RunbooksExecutionStepExecutionEntityData$Outbound = {}; - -/** @internal */ -export const RunbooksExecutionStepExecutionEntityData$outboundSchema: z.ZodType< - RunbooksExecutionStepExecutionEntityData$Outbound, - z.ZodTypeDef, - RunbooksExecutionStepExecutionEntityData -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksExecutionStepExecutionEntityData$ { - /** @deprecated use `RunbooksExecutionStepExecutionEntityData$inboundSchema` instead. */ - export const inboundSchema = - RunbooksExecutionStepExecutionEntityData$inboundSchema; - /** @deprecated use `RunbooksExecutionStepExecutionEntityData$outboundSchema` instead. */ - export const outboundSchema = - RunbooksExecutionStepExecutionEntityData$outboundSchema; - /** @deprecated use `RunbooksExecutionStepExecutionEntityData$Outbound` instead. */ - export type Outbound = RunbooksExecutionStepExecutionEntityData$Outbound; -} - -export function runbooksExecutionStepExecutionEntityDataToJSON( - runbooksExecutionStepExecutionEntityData: - RunbooksExecutionStepExecutionEntityData, -): string { - return JSON.stringify( - RunbooksExecutionStepExecutionEntityData$outboundSchema.parse( - runbooksExecutionStepExecutionEntityData, - ), - ); -} - -export function runbooksExecutionStepExecutionEntityDataFromJSON( - jsonString: string, -): SafeParseResult< - RunbooksExecutionStepExecutionEntityData, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - RunbooksExecutionStepExecutionEntityData$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'RunbooksExecutionStepExecutionEntityData' from JSON`, - ); -} - -/** @internal */ -export const RunbooksExecutionStepExecutionEntity$inboundSchema: z.ZodType< - RunbooksExecutionStepExecutionEntity, - z.ZodTypeDef, - unknown -> = z.object({ - state: RunbooksExecutionStepExecutionEntityState$inboundSchema.optional(), - data: z.lazy(() => RunbooksExecutionStepExecutionEntityData$inboundSchema) - .optional(), - performed_by: ActorEntity$inboundSchema.optional(), - performed_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), - scheduled_for: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), - error: z.string().optional(), - webhook_delivery: RunbooksWebhookDeliveryEntity$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "performed_by": "performedBy", - "performed_at": "performedAt", - "scheduled_for": "scheduledFor", - "webhook_delivery": "webhookDelivery", - }); -}); - -/** @internal */ -export type RunbooksExecutionStepExecutionEntity$Outbound = { - state?: string | undefined; - data?: RunbooksExecutionStepExecutionEntityData$Outbound | undefined; - performed_by?: ActorEntity$Outbound | undefined; - performed_at?: string | undefined; - scheduled_for?: string | undefined; - error?: string | undefined; - webhook_delivery?: RunbooksWebhookDeliveryEntity$Outbound | undefined; -}; - -/** @internal */ -export const RunbooksExecutionStepExecutionEntity$outboundSchema: z.ZodType< - RunbooksExecutionStepExecutionEntity$Outbound, - z.ZodTypeDef, - RunbooksExecutionStepExecutionEntity -> = z.object({ - state: RunbooksExecutionStepExecutionEntityState$outboundSchema.optional(), - data: z.lazy(() => RunbooksExecutionStepExecutionEntityData$outboundSchema) - .optional(), - performedBy: ActorEntity$outboundSchema.optional(), - performedAt: z.date().transform(v => v.toISOString()).optional(), - scheduledFor: z.date().transform(v => v.toISOString()).optional(), - error: z.string().optional(), - webhookDelivery: RunbooksWebhookDeliveryEntity$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - performedBy: "performed_by", - performedAt: "performed_at", - scheduledFor: "scheduled_for", - webhookDelivery: "webhook_delivery", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksExecutionStepExecutionEntity$ { - /** @deprecated use `RunbooksExecutionStepExecutionEntity$inboundSchema` instead. */ - export const inboundSchema = - RunbooksExecutionStepExecutionEntity$inboundSchema; - /** @deprecated use `RunbooksExecutionStepExecutionEntity$outboundSchema` instead. */ - export const outboundSchema = - RunbooksExecutionStepExecutionEntity$outboundSchema; - /** @deprecated use `RunbooksExecutionStepExecutionEntity$Outbound` instead. */ - export type Outbound = RunbooksExecutionStepExecutionEntity$Outbound; -} - -export function runbooksExecutionStepExecutionEntityToJSON( - runbooksExecutionStepExecutionEntity: RunbooksExecutionStepExecutionEntity, -): string { - return JSON.stringify( - RunbooksExecutionStepExecutionEntity$outboundSchema.parse( - runbooksExecutionStepExecutionEntity, - ), - ); -} - -export function runbooksExecutionStepExecutionEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - RunbooksExecutionStepExecutionEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksExecutionStepExecutionEntity' from JSON`, - ); -} diff --git a/src/models/components/runbookstepentity.ts b/src/models/components/runbookstepentity.ts deleted file mode 100644 index 95b3500c..00000000 --- a/src/models/components/runbookstepentity.ts +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - RulesRuleEntity, - RulesRuleEntity$inboundSchema, - RulesRuleEntity$Outbound, - RulesRuleEntity$outboundSchema, -} from "./rulesruleentity.js"; -import { - RunbooksActionsEntity, - RunbooksActionsEntity$inboundSchema, - RunbooksActionsEntity$Outbound, - RunbooksActionsEntity$outboundSchema, -} from "./runbooksactionsentity.js"; -import { - VotesEntity, - VotesEntity$inboundSchema, - VotesEntity$Outbound, - VotesEntity$outboundSchema, -} from "./votesentity.js"; - -/** - * An unstructured object of key/value pairs describing the config settings for the step. - */ -export type Config = {}; - -export type ActionElements = {}; - -export type StepElements = {}; - -export type RunbookStepEntity = { - name?: string | undefined; - actionId?: string | undefined; - stepId?: string | undefined; - /** - * An unstructured object of key/value pairs describing the config settings for the step. - */ - config?: Config | undefined; - /** - * A list of action elements - */ - actionElements?: Array | undefined; - /** - * A list of step elements - */ - stepElements?: Array | undefined; - automatic?: boolean | undefined; - delayDuration?: Date | undefined; - action?: RunbooksActionsEntity | undefined; - reruns?: boolean | undefined; - repeats?: boolean | undefined; - repeatsDuration?: Date | undefined; - /** - * VotesEntity model - */ - votes?: VotesEntity | undefined; - rule?: RulesRuleEntity | undefined; -}; - -/** @internal */ -export const Config$inboundSchema: z.ZodType = z - .object({}); - -/** @internal */ -export type Config$Outbound = {}; - -/** @internal */ -export const Config$outboundSchema: z.ZodType< - Config$Outbound, - z.ZodTypeDef, - Config -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Config$ { - /** @deprecated use `Config$inboundSchema` instead. */ - export const inboundSchema = Config$inboundSchema; - /** @deprecated use `Config$outboundSchema` instead. */ - export const outboundSchema = Config$outboundSchema; - /** @deprecated use `Config$Outbound` instead. */ - export type Outbound = Config$Outbound; -} - -export function configToJSON(config: Config): string { - return JSON.stringify(Config$outboundSchema.parse(config)); -} - -export function configFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Config$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Config' from JSON`, - ); -} - -/** @internal */ -export const ActionElements$inboundSchema: z.ZodType< - ActionElements, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type ActionElements$Outbound = {}; - -/** @internal */ -export const ActionElements$outboundSchema: z.ZodType< - ActionElements$Outbound, - z.ZodTypeDef, - ActionElements -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ActionElements$ { - /** @deprecated use `ActionElements$inboundSchema` instead. */ - export const inboundSchema = ActionElements$inboundSchema; - /** @deprecated use `ActionElements$outboundSchema` instead. */ - export const outboundSchema = ActionElements$outboundSchema; - /** @deprecated use `ActionElements$Outbound` instead. */ - export type Outbound = ActionElements$Outbound; -} - -export function actionElementsToJSON(actionElements: ActionElements): string { - return JSON.stringify(ActionElements$outboundSchema.parse(actionElements)); -} - -export function actionElementsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ActionElements$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ActionElements' from JSON`, - ); -} - -/** @internal */ -export const StepElements$inboundSchema: z.ZodType< - StepElements, - z.ZodTypeDef, - unknown -> = z.object({}); - -/** @internal */ -export type StepElements$Outbound = {}; - -/** @internal */ -export const StepElements$outboundSchema: z.ZodType< - StepElements$Outbound, - z.ZodTypeDef, - StepElements -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StepElements$ { - /** @deprecated use `StepElements$inboundSchema` instead. */ - export const inboundSchema = StepElements$inboundSchema; - /** @deprecated use `StepElements$outboundSchema` instead. */ - export const outboundSchema = StepElements$outboundSchema; - /** @deprecated use `StepElements$Outbound` instead. */ - export type Outbound = StepElements$Outbound; -} - -export function stepElementsToJSON(stepElements: StepElements): string { - return JSON.stringify(StepElements$outboundSchema.parse(stepElements)); -} - -export function stepElementsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StepElements$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StepElements' from JSON`, - ); -} - -/** @internal */ -export const RunbookStepEntity$inboundSchema: z.ZodType< - RunbookStepEntity, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - action_id: z.string().optional(), - step_id: z.string().optional(), - config: z.lazy(() => Config$inboundSchema).optional(), - action_elements: z.array(z.lazy(() => ActionElements$inboundSchema)) - .optional(), - step_elements: z.array(z.lazy(() => StepElements$inboundSchema)).optional(), - automatic: z.boolean().optional(), - delay_duration: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), - action: RunbooksActionsEntity$inboundSchema.optional(), - reruns: z.boolean().optional(), - repeats: z.boolean().optional(), - repeats_duration: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), - votes: VotesEntity$inboundSchema.optional(), - rule: RulesRuleEntity$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "action_id": "actionId", - "step_id": "stepId", - "action_elements": "actionElements", - "step_elements": "stepElements", - "delay_duration": "delayDuration", - "repeats_duration": "repeatsDuration", - }); -}); - -/** @internal */ -export type RunbookStepEntity$Outbound = { - name?: string | undefined; - action_id?: string | undefined; - step_id?: string | undefined; - config?: Config$Outbound | undefined; - action_elements?: Array | undefined; - step_elements?: Array | undefined; - automatic?: boolean | undefined; - delay_duration?: string | undefined; - action?: RunbooksActionsEntity$Outbound | undefined; - reruns?: boolean | undefined; - repeats?: boolean | undefined; - repeats_duration?: string | undefined; - votes?: VotesEntity$Outbound | undefined; - rule?: RulesRuleEntity$Outbound | undefined; -}; - -/** @internal */ -export const RunbookStepEntity$outboundSchema: z.ZodType< - RunbookStepEntity$Outbound, - z.ZodTypeDef, - RunbookStepEntity -> = z.object({ - name: z.string().optional(), - actionId: z.string().optional(), - stepId: z.string().optional(), - config: z.lazy(() => Config$outboundSchema).optional(), - actionElements: z.array(z.lazy(() => ActionElements$outboundSchema)) - .optional(), - stepElements: z.array(z.lazy(() => StepElements$outboundSchema)).optional(), - automatic: z.boolean().optional(), - delayDuration: z.date().transform(v => v.toISOString()).optional(), - action: RunbooksActionsEntity$outboundSchema.optional(), - reruns: z.boolean().optional(), - repeats: z.boolean().optional(), - repeatsDuration: z.date().transform(v => v.toISOString()).optional(), - votes: VotesEntity$outboundSchema.optional(), - rule: RulesRuleEntity$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - actionId: "action_id", - stepId: "step_id", - actionElements: "action_elements", - stepElements: "step_elements", - delayDuration: "delay_duration", - repeatsDuration: "repeats_duration", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbookStepEntity$ { - /** @deprecated use `RunbookStepEntity$inboundSchema` instead. */ - export const inboundSchema = RunbookStepEntity$inboundSchema; - /** @deprecated use `RunbookStepEntity$outboundSchema` instead. */ - export const outboundSchema = RunbookStepEntity$outboundSchema; - /** @deprecated use `RunbookStepEntity$Outbound` instead. */ - export type Outbound = RunbookStepEntity$Outbound; -} - -export function runbookStepEntityToJSON( - runbookStepEntity: RunbookStepEntity, -): string { - return JSON.stringify( - RunbookStepEntity$outboundSchema.parse(runbookStepEntity), - ); -} - -export function runbookStepEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbookStepEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbookStepEntity' from JSON`, - ); -} diff --git a/src/models/components/runbookswebhookdeliveryentity.ts b/src/models/components/runbookswebhookdeliveryentity.ts deleted file mode 100644 index eaa3d489..00000000 --- a/src/models/components/runbookswebhookdeliveryentity.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type RunbooksWebhookDeliveryEntity = { - headers?: string | undefined; - statusCode?: string | undefined; -}; - -/** @internal */ -export const RunbooksWebhookDeliveryEntity$inboundSchema: z.ZodType< - RunbooksWebhookDeliveryEntity, - z.ZodTypeDef, - unknown -> = z.object({ - headers: z.string().optional(), - status_code: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "status_code": "statusCode", - }); -}); - -/** @internal */ -export type RunbooksWebhookDeliveryEntity$Outbound = { - headers?: string | undefined; - status_code?: string | undefined; -}; - -/** @internal */ -export const RunbooksWebhookDeliveryEntity$outboundSchema: z.ZodType< - RunbooksWebhookDeliveryEntity$Outbound, - z.ZodTypeDef, - RunbooksWebhookDeliveryEntity -> = z.object({ - headers: z.string().optional(), - statusCode: z.string().optional(), -}).transform((v) => { - return remap$(v, { - statusCode: "status_code", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RunbooksWebhookDeliveryEntity$ { - /** @deprecated use `RunbooksWebhookDeliveryEntity$inboundSchema` instead. */ - export const inboundSchema = RunbooksWebhookDeliveryEntity$inboundSchema; - /** @deprecated use `RunbooksWebhookDeliveryEntity$outboundSchema` instead. */ - export const outboundSchema = RunbooksWebhookDeliveryEntity$outboundSchema; - /** @deprecated use `RunbooksWebhookDeliveryEntity$Outbound` instead. */ - export type Outbound = RunbooksWebhookDeliveryEntity$Outbound; -} - -export function runbooksWebhookDeliveryEntityToJSON( - runbooksWebhookDeliveryEntity: RunbooksWebhookDeliveryEntity, -): string { - return JSON.stringify( - RunbooksWebhookDeliveryEntity$outboundSchema.parse( - runbooksWebhookDeliveryEntity, - ), - ); -} - -export function runbooksWebhookDeliveryEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RunbooksWebhookDeliveryEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RunbooksWebhookDeliveryEntity' from JSON`, - ); -} diff --git a/src/models/components/savedsearchentity.ts b/src/models/components/savedsearchentity.ts index 7347b165..235b9b61 100644 --- a/src/models/components/savedsearchentity.ts +++ b/src/models/components/savedsearchentity.ts @@ -17,20 +17,20 @@ export type FilterValues = {}; * SavedSearchEntity model */ export type SavedSearchEntity = { - id?: string | undefined; - name?: string | undefined; - resourceType?: string | undefined; - userId?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + resourceType?: string | null | undefined; + userId?: string | null | undefined; /** * Whether or not this saved search is private */ - isPrivate?: boolean | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + isPrivate?: boolean | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; /** * An unstructured key/value pair of saved values for searching */ - filterValues?: FilterValues | undefined; + filterValues?: FilterValues | null | undefined; }; /** @internal */ @@ -83,16 +83,19 @@ export const SavedSearchEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - resource_type: z.string().optional(), - user_id: z.string().optional(), - is_private: z.boolean().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + resource_type: z.nullable(z.string()).optional(), + user_id: z.nullable(z.string()).optional(), + is_private: z.nullable(z.boolean()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + filter_values: z.nullable(z.lazy(() => FilterValues$inboundSchema)) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - filter_values: z.lazy(() => FilterValues$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "resource_type": "resourceType", @@ -106,14 +109,14 @@ export const SavedSearchEntity$inboundSchema: z.ZodType< /** @internal */ export type SavedSearchEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - resource_type?: string | undefined; - user_id?: string | undefined; - is_private?: boolean | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - filter_values?: FilterValues$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + resource_type?: string | null | undefined; + user_id?: string | null | undefined; + is_private?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + filter_values?: FilterValues$Outbound | null | undefined; }; /** @internal */ @@ -122,14 +125,15 @@ export const SavedSearchEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SavedSearchEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - resourceType: z.string().optional(), - userId: z.string().optional(), - isPrivate: z.boolean().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - filterValues: z.lazy(() => FilterValues$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + resourceType: z.nullable(z.string()).optional(), + userId: z.nullable(z.string()).optional(), + isPrivate: z.nullable(z.boolean()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + filterValues: z.nullable(z.lazy(() => FilterValues$outboundSchema)) + .optional(), }).transform((v) => { return remap$(v, { resourceType: "resource_type", diff --git a/src/models/components/scheduledmaintenanceentity.ts b/src/models/components/scheduledmaintenanceentity.ts index 4e69ce4d..3c401d5e 100644 --- a/src/models/components/scheduledmaintenanceentity.ts +++ b/src/models/components/scheduledmaintenanceentity.ts @@ -8,11 +8,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - IncidentEntity, - IncidentEntity$inboundSchema, - IncidentEntity$Outbound, - IncidentEntity$outboundSchema, -} from "./incidententity.js"; + NullableIncidentEntity, + NullableIncidentEntity$inboundSchema, + NullableIncidentEntity$Outbound, + NullableIncidentEntity$outboundSchema, +} from "./nullableincidententity.js"; import { ScheduledMaintenancesImpactEntity, ScheduledMaintenancesImpactEntity$inboundSchema, @@ -35,24 +35,21 @@ export type ScheduledMaintenanceEntityLabels = {}; * ScheduledMaintenanceEntity model */ export type ScheduledMaintenanceEntity = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - startsAt?: Date | undefined; - endsAt?: Date | undefined; - /** - * IncidentEntity model - */ - incident?: IncidentEntity | undefined; - statusPages?: Array | undefined; - impacts?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + startsAt?: Date | null | undefined; + endsAt?: Date | null | undefined; + incident?: NullableIncidentEntity | null | undefined; + statusPages?: Array | null | undefined; + impacts?: Array | null | undefined; /** * An object of label key and values */ - labels?: ScheduledMaintenanceEntityLabels | undefined; + labels?: ScheduledMaintenanceEntityLabels | null | undefined; }; /** @internal */ @@ -111,24 +108,31 @@ export const ScheduledMaintenanceEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - starts_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - incident: IncidentEntity$inboundSchema.optional(), - status_pages: z.array(ScheduledMaintenancesStatusPageEntity$inboundSchema) - .optional(), - impacts: z.array(ScheduledMaintenancesImpactEntity$inboundSchema).optional(), - labels: z.lazy(() => ScheduledMaintenanceEntityLabels$inboundSchema) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + incident: z.nullable(NullableIncidentEntity$inboundSchema).optional(), + status_pages: z.nullable( + z.array(ScheduledMaintenancesStatusPageEntity$inboundSchema), + ).optional(), + impacts: z.nullable(z.array(ScheduledMaintenancesImpactEntity$inboundSchema)) .optional(), + labels: z.nullable( + z.lazy(() => ScheduledMaintenanceEntityLabels$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -141,20 +145,24 @@ export const ScheduledMaintenanceEntity$inboundSchema: z.ZodType< /** @internal */ export type ScheduledMaintenanceEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - starts_at?: string | undefined; - ends_at?: string | undefined; - incident?: IncidentEntity$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + incident?: NullableIncidentEntity$Outbound | null | undefined; status_pages?: | Array + | null | undefined; - impacts?: Array | undefined; - labels?: ScheduledMaintenanceEntityLabels$Outbound | undefined; + impacts?: + | Array + | null + | undefined; + labels?: ScheduledMaintenanceEntityLabels$Outbound | null | undefined; }; /** @internal */ @@ -163,20 +171,23 @@ export const ScheduledMaintenanceEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ScheduledMaintenanceEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - startsAt: z.date().transform(v => v.toISOString()).optional(), - endsAt: z.date().transform(v => v.toISOString()).optional(), - incident: IncidentEntity$outboundSchema.optional(), - statusPages: z.array(ScheduledMaintenancesStatusPageEntity$outboundSchema) - .optional(), - impacts: z.array(ScheduledMaintenancesImpactEntity$outboundSchema).optional(), - labels: z.lazy(() => ScheduledMaintenanceEntityLabels$outboundSchema) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + incident: z.nullable(NullableIncidentEntity$outboundSchema).optional(), + statusPages: z.nullable( + z.array(ScheduledMaintenancesStatusPageEntity$outboundSchema), + ).optional(), + impacts: z.nullable(z.array(ScheduledMaintenancesImpactEntity$outboundSchema)) .optional(), + labels: z.nullable( + z.lazy(() => ScheduledMaintenanceEntityLabels$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/scheduledmaintenancesimpactentity.ts b/src/models/components/scheduledmaintenancesimpactentity.ts index 29b5d48e..158c018a 100644 --- a/src/models/components/scheduledmaintenancesimpactentity.ts +++ b/src/models/components/scheduledmaintenancesimpactentity.ts @@ -7,26 +7,23 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - SeverityMatrixConditionEntity, - SeverityMatrixConditionEntity$inboundSchema, - SeverityMatrixConditionEntity$Outbound, - SeverityMatrixConditionEntity$outboundSchema, -} from "./severitymatrixconditionentity.js"; + NullableSeverityMatrixConditionEntity, + NullableSeverityMatrixConditionEntity$inboundSchema, + NullableSeverityMatrixConditionEntity$Outbound, + NullableSeverityMatrixConditionEntity$outboundSchema, +} from "./nullableseveritymatrixconditionentity.js"; import { - SuccinctEntity, - SuccinctEntity$inboundSchema, - SuccinctEntity$Outbound, - SuccinctEntity$outboundSchema, -} from "./succinctentity.js"; + NullableSuccinctEntity, + NullableSuccinctEntity$inboundSchema, + NullableSuccinctEntity$Outbound, + NullableSuccinctEntity$outboundSchema, +} from "./nullablesuccinctentity.js"; export type ScheduledMaintenancesImpactEntity = { - id?: string | undefined; - type?: string | undefined; - impact?: SuccinctEntity | undefined; - /** - * SeverityMatrix_ConditionEntity model - */ - condition?: SeverityMatrixConditionEntity | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + impact?: NullableSuccinctEntity | null | undefined; + condition?: NullableSeverityMatrixConditionEntity | null | undefined; }; /** @internal */ @@ -35,18 +32,19 @@ export const ScheduledMaintenancesImpactEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - impact: SuccinctEntity$inboundSchema.optional(), - condition: SeverityMatrixConditionEntity$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + impact: z.nullable(NullableSuccinctEntity$inboundSchema).optional(), + condition: z.nullable(NullableSeverityMatrixConditionEntity$inboundSchema) + .optional(), }); /** @internal */ export type ScheduledMaintenancesImpactEntity$Outbound = { - id?: string | undefined; - type?: string | undefined; - impact?: SuccinctEntity$Outbound | undefined; - condition?: SeverityMatrixConditionEntity$Outbound | undefined; + id?: string | null | undefined; + type?: string | null | undefined; + impact?: NullableSuccinctEntity$Outbound | null | undefined; + condition?: NullableSeverityMatrixConditionEntity$Outbound | null | undefined; }; /** @internal */ @@ -55,10 +53,11 @@ export const ScheduledMaintenancesImpactEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ScheduledMaintenancesImpactEntity > = z.object({ - id: z.string().optional(), - type: z.string().optional(), - impact: SuccinctEntity$outboundSchema.optional(), - condition: SeverityMatrixConditionEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + impact: z.nullable(NullableSuccinctEntity$outboundSchema).optional(), + condition: z.nullable(NullableSeverityMatrixConditionEntity$outboundSchema) + .optional(), }); /** diff --git a/src/models/components/scheduledmaintenancesstatuspageentity.ts b/src/models/components/scheduledmaintenancesstatuspageentity.ts index 8bf5f23a..f99898c3 100644 --- a/src/models/components/scheduledmaintenancesstatuspageentity.ts +++ b/src/models/components/scheduledmaintenancesstatuspageentity.ts @@ -9,10 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ScheduledMaintenancesStatusPageEntity = { - id?: string | undefined; - integrationId?: string | undefined; - integrationSlug?: string | undefined; - integrationName?: string | undefined; + id?: string | null | undefined; + integrationId?: string | null | undefined; + integrationSlug?: string | null | undefined; + integrationName?: string | null | undefined; }; /** @internal */ @@ -21,10 +21,10 @@ export const ScheduledMaintenancesStatusPageEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - integration_id: z.string().optional(), - integration_slug: z.string().optional(), - integration_name: z.string().optional(), + id: z.nullable(z.string()).optional(), + integration_id: z.nullable(z.string()).optional(), + integration_slug: z.nullable(z.string()).optional(), + integration_name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "integration_id": "integrationId", @@ -35,10 +35,10 @@ export const ScheduledMaintenancesStatusPageEntity$inboundSchema: z.ZodType< /** @internal */ export type ScheduledMaintenancesStatusPageEntity$Outbound = { - id?: string | undefined; - integration_id?: string | undefined; - integration_slug?: string | undefined; - integration_name?: string | undefined; + id?: string | null | undefined; + integration_id?: string | null | undefined; + integration_slug?: string | null | undefined; + integration_name?: string | null | undefined; }; /** @internal */ @@ -47,10 +47,10 @@ export const ScheduledMaintenancesStatusPageEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ScheduledMaintenancesStatusPageEntity > = z.object({ - id: z.string().optional(), - integrationId: z.string().optional(), - integrationSlug: z.string().optional(), - integrationName: z.string().optional(), + id: z.nullable(z.string()).optional(), + integrationId: z.nullable(z.string()).optional(), + integrationSlug: z.nullable(z.string()).optional(), + integrationName: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { integrationId: "integration_id", diff --git a/src/models/components/scheduleentity.ts b/src/models/components/scheduleentity.ts index 18999049..68e52fdd 100644 --- a/src/models/components/scheduleentity.ts +++ b/src/models/components/scheduleentity.ts @@ -8,10 +8,10 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ScheduleEntity = { - id?: string | undefined; - name?: string | undefined; - integration?: string | undefined; - discarded?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + integration?: string | null | undefined; + discarded?: boolean | null | undefined; }; /** @internal */ @@ -20,18 +20,18 @@ export const ScheduleEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - integration: z.string().optional(), - discarded: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + integration: z.nullable(z.string()).optional(), + discarded: z.nullable(z.boolean()).optional(), }); /** @internal */ export type ScheduleEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - integration?: string | undefined; - discarded?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + integration?: string | null | undefined; + discarded?: boolean | null | undefined; }; /** @internal */ @@ -40,10 +40,10 @@ export const ScheduleEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ScheduleEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - integration: z.string().optional(), - discarded: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + integration: z.nullable(z.string()).optional(), + discarded: z.nullable(z.boolean()).optional(), }); /** diff --git a/src/models/components/scheduleentitypaginated.ts b/src/models/components/scheduleentitypaginated.ts index c3c4b26f..23873a76 100644 --- a/src/models/components/scheduleentitypaginated.ts +++ b/src/models/components/scheduleentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { ScheduleEntity, ScheduleEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * ScheduleEntityPaginated model */ export type ScheduleEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const ScheduleEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(ScheduleEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(ScheduleEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type ScheduleEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const ScheduleEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, ScheduleEntityPaginated > = z.object({ - data: z.array(ScheduleEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(ScheduleEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/servicechilddependencyentity.ts b/src/models/components/servicechilddependencyentity.ts index 1b8df5e9..2a383991 100644 --- a/src/models/components/servicechilddependencyentity.ts +++ b/src/models/components/servicechilddependencyentity.ts @@ -8,22 +8,19 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - ServiceEntity, - ServiceEntity$inboundSchema, - ServiceEntity$Outbound, - ServiceEntity$outboundSchema, -} from "./serviceentity.js"; + NullableServiceEntity, + NullableServiceEntity$inboundSchema, + NullableServiceEntity$Outbound, + NullableServiceEntity$outboundSchema, +} from "./nullableserviceentity.js"; export type ServiceChildDependencyEntity = { - id?: string | undefined; - notes?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - /** - * ServiceEntity model - */ - service?: ServiceEntity | undefined; - type?: string | undefined; + id?: string | null | undefined; + notes?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + service?: NullableServiceEntity | null | undefined; + type?: string | null | undefined; }; /** @internal */ @@ -32,14 +29,16 @@ export const ServiceChildDependencyEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - notes: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - service: ServiceEntity$inboundSchema.optional(), - type: z.string().optional(), + id: z.nullable(z.string()).optional(), + notes: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + service: z.nullable(NullableServiceEntity$inboundSchema).optional(), + type: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -49,12 +48,12 @@ export const ServiceChildDependencyEntity$inboundSchema: z.ZodType< /** @internal */ export type ServiceChildDependencyEntity$Outbound = { - id?: string | undefined; - notes?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - service?: ServiceEntity$Outbound | undefined; - type?: string | undefined; + id?: string | null | undefined; + notes?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + service?: NullableServiceEntity$Outbound | null | undefined; + type?: string | null | undefined; }; /** @internal */ @@ -63,12 +62,12 @@ export const ServiceChildDependencyEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceChildDependencyEntity > = z.object({ - id: z.string().optional(), - notes: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - service: ServiceEntity$outboundSchema.optional(), - type: z.string().optional(), + id: z.nullable(z.string()).optional(), + notes: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + service: z.nullable(NullableServiceEntity$outboundSchema).optional(), + type: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/servicedependencyentity.ts b/src/models/components/servicedependencyentity.ts index 09d373ee..06036941 100644 --- a/src/models/components/servicedependencyentity.ts +++ b/src/models/components/servicedependencyentity.ts @@ -8,28 +8,22 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - ServiceEntity, - ServiceEntity$inboundSchema, - ServiceEntity$Outbound, - ServiceEntity$outboundSchema, -} from "./serviceentity.js"; + NullableServiceEntity, + NullableServiceEntity$inboundSchema, + NullableServiceEntity$Outbound, + NullableServiceEntity$outboundSchema, +} from "./nullableserviceentity.js"; /** * ServiceDependencyEntity model */ export type ServiceDependencyEntity = { - id?: string | undefined; - notes?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - /** - * ServiceEntity model - */ - service?: ServiceEntity | undefined; - /** - * ServiceEntity model - */ - connectedService?: ServiceEntity | undefined; + id?: string | null | undefined; + notes?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + service?: NullableServiceEntity | null | undefined; + connectedService?: NullableServiceEntity | null | undefined; }; /** @internal */ @@ -38,14 +32,16 @@ export const ServiceDependencyEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - notes: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - service: ServiceEntity$inboundSchema.optional(), - connected_service: ServiceEntity$inboundSchema.optional(), + id: z.nullable(z.string()).optional(), + notes: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + service: z.nullable(NullableServiceEntity$inboundSchema).optional(), + connected_service: z.nullable(NullableServiceEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -56,12 +52,12 @@ export const ServiceDependencyEntity$inboundSchema: z.ZodType< /** @internal */ export type ServiceDependencyEntity$Outbound = { - id?: string | undefined; - notes?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - service?: ServiceEntity$Outbound | undefined; - connected_service?: ServiceEntity$Outbound | undefined; + id?: string | null | undefined; + notes?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + service?: NullableServiceEntity$Outbound | null | undefined; + connected_service?: NullableServiceEntity$Outbound | null | undefined; }; /** @internal */ @@ -70,12 +66,12 @@ export const ServiceDependencyEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceDependencyEntity > = z.object({ - id: z.string().optional(), - notes: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - service: ServiceEntity$outboundSchema.optional(), - connectedService: ServiceEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + notes: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + service: z.nullable(NullableServiceEntity$outboundSchema).optional(), + connectedService: z.nullable(NullableServiceEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/serviceentity.ts b/src/models/components/serviceentity.ts index ba1e16eb..1b43ef1a 100644 --- a/src/models/components/serviceentity.ts +++ b/src/models/components/serviceentity.ts @@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; import { ChecklistTemplateEntity, ChecklistTemplateEntity$inboundSchema, @@ -31,18 +25,30 @@ import { FunctionalityEntity$Outbound, FunctionalityEntity$outboundSchema, } from "./functionalityentity.js"; -import { - ImportsImportableResourceEntity, - ImportsImportableResourceEntity$inboundSchema, - ImportsImportableResourceEntity$Outbound, - ImportsImportableResourceEntity$outboundSchema, -} from "./importsimportableresourceentity.js"; import { LinksEntity, LinksEntity$inboundSchema, LinksEntity$Outbound, LinksEntity$outboundSchema, } from "./linksentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableImportsImportableResourceEntity, + NullableImportsImportableResourceEntity$inboundSchema, + NullableImportsImportableResourceEntity$Outbound, + NullableImportsImportableResourceEntity$outboundSchema, +} from "./nullableimportsimportableresourceentity.js"; +import { + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; import { TeamEntityLite, TeamEntityLite$inboundSchema, @@ -58,63 +64,63 @@ export type ServiceEntityLabels = {}; /** * Indicates the settings of the catalog that manages this service */ -export type ManagedBySettings = {}; +export type ServiceEntityManagedBySettings = {}; /** * ServiceEntity model */ export type ServiceEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - serviceTier?: number | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - allowedParams?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + serviceTier?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + allowedParams?: Array | null | undefined; /** * An object of label key and values */ - labels?: ServiceEntityLabels | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; + labels?: ServiceEntityLabels | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; /** * List of active incident guids */ - activeIncidents?: Array | undefined; + activeIncidents?: Array | null | undefined; /** * List of checklists associated with a service */ - checklists?: Array | undefined; - completedChecks?: number | undefined; + checklists?: Array | null | undefined; + completedChecks?: number | null | undefined; /** * Information about known linkages to representations of services outside of FireHydrant. */ - externalResources?: Array | undefined; + externalResources?: Array | null | undefined; /** * List of functionalities attached to the service */ - functionalities?: Array | undefined; - lastImport?: ImportsImportableResourceEntity | undefined; + functionalities?: Array | null | undefined; + lastImport?: NullableImportsImportableResourceEntity | null | undefined; /** * List of links attached to this service. */ - links?: Array | undefined; + links?: Array | null | undefined; /** * If set, this field indicates that the service is managed by an integration and thus cannot be set manually */ - managedBy?: string | undefined; + managedBy?: string | null | undefined; /** * Indicates the settings of the catalog that manages this service */ - managedBySettings?: ManagedBySettings | undefined; - owner?: TeamEntityLite | undefined; - serviceChecklistUpdatedAt?: Date | undefined; + managedBySettings?: ServiceEntityManagedBySettings | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; + serviceChecklistUpdatedAt?: Date | null | undefined; /** * List of teams attached to the service */ - teams?: Array | undefined; - updatedBy?: AuthorEntity | undefined; + teams?: Array | null | undefined; + updatedBy?: NullableAuthorEntity | null | undefined; }; /** @internal */ @@ -166,50 +172,52 @@ export function serviceEntityLabelsFromJSON( } /** @internal */ -export const ManagedBySettings$inboundSchema: z.ZodType< - ManagedBySettings, +export const ServiceEntityManagedBySettings$inboundSchema: z.ZodType< + ServiceEntityManagedBySettings, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type ManagedBySettings$Outbound = {}; +export type ServiceEntityManagedBySettings$Outbound = {}; /** @internal */ -export const ManagedBySettings$outboundSchema: z.ZodType< - ManagedBySettings$Outbound, +export const ServiceEntityManagedBySettings$outboundSchema: z.ZodType< + ServiceEntityManagedBySettings$Outbound, z.ZodTypeDef, - ManagedBySettings + ServiceEntityManagedBySettings > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ManagedBySettings$ { - /** @deprecated use `ManagedBySettings$inboundSchema` instead. */ - export const inboundSchema = ManagedBySettings$inboundSchema; - /** @deprecated use `ManagedBySettings$outboundSchema` instead. */ - export const outboundSchema = ManagedBySettings$outboundSchema; - /** @deprecated use `ManagedBySettings$Outbound` instead. */ - export type Outbound = ManagedBySettings$Outbound; +export namespace ServiceEntityManagedBySettings$ { + /** @deprecated use `ServiceEntityManagedBySettings$inboundSchema` instead. */ + export const inboundSchema = ServiceEntityManagedBySettings$inboundSchema; + /** @deprecated use `ServiceEntityManagedBySettings$outboundSchema` instead. */ + export const outboundSchema = ServiceEntityManagedBySettings$outboundSchema; + /** @deprecated use `ServiceEntityManagedBySettings$Outbound` instead. */ + export type Outbound = ServiceEntityManagedBySettings$Outbound; } -export function managedBySettingsToJSON( - managedBySettings: ManagedBySettings, +export function serviceEntityManagedBySettingsToJSON( + serviceEntityManagedBySettings: ServiceEntityManagedBySettings, ): string { return JSON.stringify( - ManagedBySettings$outboundSchema.parse(managedBySettings), + ServiceEntityManagedBySettings$outboundSchema.parse( + serviceEntityManagedBySettings, + ), ); } -export function managedBySettingsFromJSON( +export function serviceEntityManagedBySettingsFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ManagedBySettings$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ManagedBySettings' from JSON`, + (x) => ServiceEntityManagedBySettings$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServiceEntityManagedBySettings' from JSON`, ); } @@ -219,34 +227,43 @@ export const ServiceEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - service_tier: z.number().int().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + service_tier: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + allowed_params: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => ServiceEntityLabels$inboundSchema)) + .optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + active_incidents: z.nullable(z.array(z.string())).optional(), + checklists: z.nullable(z.array(ChecklistTemplateEntity$inboundSchema)) + .optional(), + completed_checks: z.nullable(z.number().int()).optional(), + external_resources: z.nullable(z.array(ExternalResourceEntity$inboundSchema)) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + functionalities: z.nullable(z.array(FunctionalityEntity$inboundSchema)) .optional(), - allowed_params: z.array(z.string()).optional(), - labels: z.lazy(() => ServiceEntityLabels$inboundSchema).optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - active_incidents: z.array(z.string()).optional(), - checklists: z.array(ChecklistTemplateEntity$inboundSchema).optional(), - completed_checks: z.number().int().optional(), - external_resources: z.array(ExternalResourceEntity$inboundSchema).optional(), - functionalities: z.array(FunctionalityEntity$inboundSchema).optional(), - last_import: ImportsImportableResourceEntity$inboundSchema.optional(), - links: z.array(LinksEntity$inboundSchema).optional(), - managed_by: z.string().optional(), - managed_by_settings: z.lazy(() => ManagedBySettings$inboundSchema).optional(), - owner: TeamEntityLite$inboundSchema.optional(), - service_checklist_updated_at: z.string().datetime({ offset: true }).transform( - v => new Date(v) + last_import: z.nullable(NullableImportsImportableResourceEntity$inboundSchema) + .optional(), + links: z.nullable(z.array(LinksEntity$inboundSchema)).optional(), + managed_by: z.nullable(z.string()).optional(), + managed_by_settings: z.nullable( + z.lazy(() => ServiceEntityManagedBySettings$inboundSchema), + ).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + service_checklist_updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - teams: z.array(TeamEntityLite$inboundSchema).optional(), - updated_by: AuthorEntity$inboundSchema.optional(), + teams: z.nullable(z.array(TeamEntityLite$inboundSchema)).optional(), + updated_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "service_tier": "serviceTier", @@ -268,30 +285,39 @@ export const ServiceEntity$inboundSchema: z.ZodType< /** @internal */ export type ServiceEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - service_tier?: number | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - allowed_params?: Array | undefined; - labels?: ServiceEntityLabels$Outbound | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - active_incidents?: Array | undefined; - checklists?: Array | undefined; - completed_checks?: number | undefined; - external_resources?: Array | undefined; - functionalities?: Array | undefined; - last_import?: ImportsImportableResourceEntity$Outbound | undefined; - links?: Array | undefined; - managed_by?: string | undefined; - managed_by_settings?: ManagedBySettings$Outbound | undefined; - owner?: TeamEntityLite$Outbound | undefined; - service_checklist_updated_at?: string | undefined; - teams?: Array | undefined; - updated_by?: AuthorEntity$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + service_tier?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + allowed_params?: Array | null | undefined; + labels?: ServiceEntityLabels$Outbound | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + active_incidents?: Array | null | undefined; + checklists?: Array | null | undefined; + completed_checks?: number | null | undefined; + external_resources?: + | Array + | null + | undefined; + functionalities?: Array | null | undefined; + last_import?: + | NullableImportsImportableResourceEntity$Outbound + | null + | undefined; + links?: Array | null | undefined; + managed_by?: string | null | undefined; + managed_by_settings?: + | ServiceEntityManagedBySettings$Outbound + | null + | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + service_checklist_updated_at?: string | null | undefined; + teams?: Array | null | undefined; + updated_by?: NullableAuthorEntity$Outbound | null | undefined; }; /** @internal */ @@ -300,31 +326,39 @@ export const ServiceEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - serviceTier: z.number().int().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - allowedParams: z.array(z.string()).optional(), - labels: z.lazy(() => ServiceEntityLabels$outboundSchema).optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - activeIncidents: z.array(z.string()).optional(), - checklists: z.array(ChecklistTemplateEntity$outboundSchema).optional(), - completedChecks: z.number().int().optional(), - externalResources: z.array(ExternalResourceEntity$outboundSchema).optional(), - functionalities: z.array(FunctionalityEntity$outboundSchema).optional(), - lastImport: ImportsImportableResourceEntity$outboundSchema.optional(), - links: z.array(LinksEntity$outboundSchema).optional(), - managedBy: z.string().optional(), - managedBySettings: z.lazy(() => ManagedBySettings$outboundSchema).optional(), - owner: TeamEntityLite$outboundSchema.optional(), - serviceChecklistUpdatedAt: z.date().transform(v => v.toISOString()) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + serviceTier: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + allowedParams: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => ServiceEntityLabels$outboundSchema)) + .optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + activeIncidents: z.nullable(z.array(z.string())).optional(), + checklists: z.nullable(z.array(ChecklistTemplateEntity$outboundSchema)) + .optional(), + completedChecks: z.nullable(z.number().int()).optional(), + externalResources: z.nullable(z.array(ExternalResourceEntity$outboundSchema)) .optional(), - teams: z.array(TeamEntityLite$outboundSchema).optional(), - updatedBy: AuthorEntity$outboundSchema.optional(), + functionalities: z.nullable(z.array(FunctionalityEntity$outboundSchema)) + .optional(), + lastImport: z.nullable(NullableImportsImportableResourceEntity$outboundSchema) + .optional(), + links: z.nullable(z.array(LinksEntity$outboundSchema)).optional(), + managedBy: z.nullable(z.string()).optional(), + managedBySettings: z.nullable( + z.lazy(() => ServiceEntityManagedBySettings$outboundSchema), + ).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + serviceChecklistUpdatedAt: z.nullable( + z.date().transform(v => v.toISOString()), + ).optional(), + teams: z.nullable(z.array(TeamEntityLite$outboundSchema)).optional(), + updatedBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { serviceTier: "service_tier", diff --git a/src/models/components/serviceentitychecklist.ts b/src/models/components/serviceentitychecklist.ts index 62fdb96c..c3efe6b4 100644 --- a/src/models/components/serviceentitychecklist.ts +++ b/src/models/components/serviceentitychecklist.ts @@ -8,11 +8,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - TeamEntityLite, - TeamEntityLite$inboundSchema, - TeamEntityLite$Outbound, - TeamEntityLite$outboundSchema, -} from "./teamentitylite.js"; + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; /** * An object of label key and values @@ -20,23 +20,23 @@ import { export type ServiceEntityChecklistLabels = {}; export type ServiceEntityChecklist = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - serviceTier?: number | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - allowedParams?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + serviceTier?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + allowedParams?: Array | null | undefined; /** * An object of label key and values */ - labels?: ServiceEntityChecklistLabels | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; - completedChecks?: number | undefined; - owner?: TeamEntityLite | undefined; - serviceChecklistUpdatedAt?: Date | undefined; + labels?: ServiceEntityChecklistLabels | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + completedChecks?: number | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; + serviceChecklistUpdatedAt?: Date | null | undefined; }; /** @internal */ @@ -95,23 +95,26 @@ export const ServiceEntityChecklist$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - service_tier: z.number().int().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + service_tier: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + allowed_params: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => ServiceEntityChecklistLabels$inboundSchema)) .optional(), - allowed_params: z.array(z.string()).optional(), - labels: z.lazy(() => ServiceEntityChecklistLabels$inboundSchema).optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), - completed_checks: z.number().int().optional(), - owner: TeamEntityLite$inboundSchema.optional(), - service_checklist_updated_at: z.string().datetime({ offset: true }).transform( - v => new Date(v) + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + completed_checks: z.nullable(z.number().int()).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + service_checklist_updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), }).transform((v) => { return remap$(v, { @@ -128,20 +131,20 @@ export const ServiceEntityChecklist$inboundSchema: z.ZodType< /** @internal */ export type ServiceEntityChecklist$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - service_tier?: number | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - allowed_params?: Array | undefined; - labels?: ServiceEntityChecklistLabels$Outbound | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; - completed_checks?: number | undefined; - owner?: TeamEntityLite$Outbound | undefined; - service_checklist_updated_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + service_tier?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + allowed_params?: Array | null | undefined; + labels?: ServiceEntityChecklistLabels$Outbound | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + completed_checks?: number | null | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + service_checklist_updated_at?: string | null | undefined; }; /** @internal */ @@ -150,21 +153,23 @@ export const ServiceEntityChecklist$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceEntityChecklist > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - serviceTier: z.number().int().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - allowedParams: z.array(z.string()).optional(), - labels: z.lazy(() => ServiceEntityChecklistLabels$outboundSchema).optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), - completedChecks: z.number().int().optional(), - owner: TeamEntityLite$outboundSchema.optional(), - serviceChecklistUpdatedAt: z.date().transform(v => v.toISOString()) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + serviceTier: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + allowedParams: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => ServiceEntityChecklistLabels$outboundSchema)) .optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + completedChecks: z.nullable(z.number().int()).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + serviceChecklistUpdatedAt: z.nullable( + z.date().transform(v => v.toISOString()), + ).optional(), }).transform((v) => { return remap$(v, { serviceTier: "service_tier", diff --git a/src/models/components/serviceentitylite.ts b/src/models/components/serviceentitylite.ts index 93ba7936..1f6bf7b2 100644 --- a/src/models/components/serviceentitylite.ts +++ b/src/models/components/serviceentitylite.ts @@ -17,20 +17,20 @@ export type ServiceEntityLiteLabels = {}; * ServiceEntityLite model */ export type ServiceEntityLite = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - serviceTier?: number | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - allowedParams?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + serviceTier?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + allowedParams?: Array | null | undefined; /** * An object of label key and values */ - labels?: ServiceEntityLiteLabels | undefined; - alertOnAdd?: boolean | undefined; - autoAddRespondingTeam?: boolean | undefined; + labels?: ServiceEntityLiteLabels | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; }; /** @internal */ @@ -87,19 +87,22 @@ export const ServiceEntityLite$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - service_tier: z.number().int().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + service_tier: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + allowed_params: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => ServiceEntityLiteLabels$inboundSchema)) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - allowed_params: z.array(z.string()).optional(), - labels: z.lazy(() => ServiceEntityLiteLabels$inboundSchema).optional(), - alert_on_add: z.boolean().optional(), - auto_add_responding_team: z.boolean().optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "service_tier": "serviceTier", @@ -113,17 +116,17 @@ export const ServiceEntityLite$inboundSchema: z.ZodType< /** @internal */ export type ServiceEntityLite$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - service_tier?: number | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - allowed_params?: Array | undefined; - labels?: ServiceEntityLiteLabels$Outbound | undefined; - alert_on_add?: boolean | undefined; - auto_add_responding_team?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + service_tier?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + allowed_params?: Array | null | undefined; + labels?: ServiceEntityLiteLabels$Outbound | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; }; /** @internal */ @@ -132,17 +135,18 @@ export const ServiceEntityLite$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceEntityLite > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - serviceTier: z.number().int().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - allowedParams: z.array(z.string()).optional(), - labels: z.lazy(() => ServiceEntityLiteLabels$outboundSchema).optional(), - alertOnAdd: z.boolean().optional(), - autoAddRespondingTeam: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + serviceTier: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + allowedParams: z.nullable(z.array(z.string())).optional(), + labels: z.nullable(z.lazy(() => ServiceEntityLiteLabels$outboundSchema)) + .optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { serviceTier: "service_tier", diff --git a/src/models/components/serviceentitypaginated.ts b/src/models/components/serviceentitypaginated.ts index 0d1b52cf..806e20ad 100644 --- a/src/models/components/serviceentitypaginated.ts +++ b/src/models/components/serviceentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { ServiceEntity, ServiceEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * ServiceEntityPaginated model */ export type ServiceEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const ServiceEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(ServiceEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(ServiceEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type ServiceEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const ServiceEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceEntityPaginated > = z.object({ - data: z.array(ServiceEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(ServiceEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/servicelinkentity.ts b/src/models/components/servicelinkentity.ts index 5fbef324..3e5d0ba4 100644 --- a/src/models/components/servicelinkentity.ts +++ b/src/models/components/servicelinkentity.ts @@ -8,21 +8,18 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - ServiceEntity, - ServiceEntity$inboundSchema, - ServiceEntity$Outbound, - ServiceEntity$outboundSchema, -} from "./serviceentity.js"; + NullableServiceEntity, + NullableServiceEntity$inboundSchema, + NullableServiceEntity$Outbound, + NullableServiceEntity$outboundSchema, +} from "./nullableserviceentity.js"; /** * ServiceLinkEntity model */ export type ServiceLinkEntity = { - statusCode?: number | undefined; - /** - * ServiceEntity model - */ - service?: ServiceEntity | undefined; + statusCode?: number | null | undefined; + service?: NullableServiceEntity | null | undefined; }; /** @internal */ @@ -31,8 +28,8 @@ export const ServiceLinkEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - status_code: z.number().int().optional(), - service: ServiceEntity$inboundSchema.optional(), + status_code: z.nullable(z.number().int()).optional(), + service: z.nullable(NullableServiceEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "status_code": "statusCode", @@ -41,8 +38,8 @@ export const ServiceLinkEntity$inboundSchema: z.ZodType< /** @internal */ export type ServiceLinkEntity$Outbound = { - status_code?: number | undefined; - service?: ServiceEntity$Outbound | undefined; + status_code?: number | null | undefined; + service?: NullableServiceEntity$Outbound | null | undefined; }; /** @internal */ @@ -51,8 +48,8 @@ export const ServiceLinkEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceLinkEntity > = z.object({ - statusCode: z.number().int().optional(), - service: ServiceEntity$outboundSchema.optional(), + statusCode: z.nullable(z.number().int()).optional(), + service: z.nullable(NullableServiceEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { statusCode: "status_code", diff --git a/src/models/components/serviceparentdependencyentity.ts b/src/models/components/serviceparentdependencyentity.ts index a7c2e98a..b71eae20 100644 --- a/src/models/components/serviceparentdependencyentity.ts +++ b/src/models/components/serviceparentdependencyentity.ts @@ -8,22 +8,19 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - ServiceEntity, - ServiceEntity$inboundSchema, - ServiceEntity$Outbound, - ServiceEntity$outboundSchema, -} from "./serviceentity.js"; + NullableServiceEntity, + NullableServiceEntity$inboundSchema, + NullableServiceEntity$Outbound, + NullableServiceEntity$outboundSchema, +} from "./nullableserviceentity.js"; export type ServiceParentDependencyEntity = { - id?: string | undefined; - notes?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - /** - * ServiceEntity model - */ - service?: ServiceEntity | undefined; - type?: string | undefined; + id?: string | null | undefined; + notes?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + service?: NullableServiceEntity | null | undefined; + type?: string | null | undefined; }; /** @internal */ @@ -32,14 +29,16 @@ export const ServiceParentDependencyEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - notes: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - service: ServiceEntity$inboundSchema.optional(), - type: z.string().optional(), + id: z.nullable(z.string()).optional(), + notes: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + service: z.nullable(NullableServiceEntity$inboundSchema).optional(), + type: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -49,12 +48,12 @@ export const ServiceParentDependencyEntity$inboundSchema: z.ZodType< /** @internal */ export type ServiceParentDependencyEntity$Outbound = { - id?: string | undefined; - notes?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - service?: ServiceEntity$Outbound | undefined; - type?: string | undefined; + id?: string | null | undefined; + notes?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + service?: NullableServiceEntity$Outbound | null | undefined; + type?: string | null | undefined; }; /** @internal */ @@ -63,12 +62,12 @@ export const ServiceParentDependencyEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceParentDependencyEntity > = z.object({ - id: z.string().optional(), - notes: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - service: ServiceEntity$outboundSchema.optional(), - type: z.string().optional(), + id: z.nullable(z.string()).optional(), + notes: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + service: z.nullable(NullableServiceEntity$outboundSchema).optional(), + type: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/servicewithalldependenciesentity.ts b/src/models/components/servicewithalldependenciesentity.ts index 6d5c15df..50e3c104 100644 --- a/src/models/components/servicewithalldependenciesentity.ts +++ b/src/models/components/servicewithalldependenciesentity.ts @@ -20,7 +20,7 @@ import { ServiceParentDependencyEntity$outboundSchema, } from "./serviceparentdependencyentity.js"; -export type ServiceDependencies = {}; +export type ServiceDependency = {}; /** * ServiceWithAllDependenciesEntity model @@ -29,62 +29,68 @@ export type ServiceWithAllDependenciesEntity = { /** * Services that depend on this service */ - childServiceDependencies?: Array | undefined; + childServiceDependencies?: + | Array + | null + | undefined; /** * Services that this service is dependent on */ - parentServiceDependencies?: Array | undefined; + parentServiceDependencies?: + | Array + | null + | undefined; /** * All dependencies. Can be one of: ServiceChildDependencyEntity, ServiceParentDependencyEntity */ - serviceDependencies?: Array | undefined; + serviceDependencies?: Array | null | undefined; }; /** @internal */ -export const ServiceDependencies$inboundSchema: z.ZodType< - ServiceDependencies, +export const ServiceDependency$inboundSchema: z.ZodType< + ServiceDependency, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type ServiceDependencies$Outbound = {}; +export type ServiceDependency$Outbound = {}; /** @internal */ -export const ServiceDependencies$outboundSchema: z.ZodType< - ServiceDependencies$Outbound, +export const ServiceDependency$outboundSchema: z.ZodType< + ServiceDependency$Outbound, z.ZodTypeDef, - ServiceDependencies + ServiceDependency > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ServiceDependencies$ { - /** @deprecated use `ServiceDependencies$inboundSchema` instead. */ - export const inboundSchema = ServiceDependencies$inboundSchema; - /** @deprecated use `ServiceDependencies$outboundSchema` instead. */ - export const outboundSchema = ServiceDependencies$outboundSchema; - /** @deprecated use `ServiceDependencies$Outbound` instead. */ - export type Outbound = ServiceDependencies$Outbound; +export namespace ServiceDependency$ { + /** @deprecated use `ServiceDependency$inboundSchema` instead. */ + export const inboundSchema = ServiceDependency$inboundSchema; + /** @deprecated use `ServiceDependency$outboundSchema` instead. */ + export const outboundSchema = ServiceDependency$outboundSchema; + /** @deprecated use `ServiceDependency$Outbound` instead. */ + export type Outbound = ServiceDependency$Outbound; } -export function serviceDependenciesToJSON( - serviceDependencies: ServiceDependencies, +export function serviceDependencyToJSON( + serviceDependency: ServiceDependency, ): string { return JSON.stringify( - ServiceDependencies$outboundSchema.parse(serviceDependencies), + ServiceDependency$outboundSchema.parse(serviceDependency), ); } -export function serviceDependenciesFromJSON( +export function serviceDependencyFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => ServiceDependencies$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ServiceDependencies' from JSON`, + (x) => ServiceDependency$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ServiceDependency' from JSON`, ); } @@ -94,14 +100,15 @@ export const ServiceWithAllDependenciesEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - child_service_dependencies: z.array( - ServiceChildDependencyEntity$inboundSchema, + child_service_dependencies: z.nullable( + z.array(ServiceChildDependencyEntity$inboundSchema), + ).optional(), + parent_service_dependencies: z.nullable( + z.array(ServiceParentDependencyEntity$inboundSchema), ).optional(), - parent_service_dependencies: z.array( - ServiceParentDependencyEntity$inboundSchema, + service_dependencies: z.nullable( + z.array(z.lazy(() => ServiceDependency$inboundSchema)), ).optional(), - service_dependencies: z.array(z.lazy(() => ServiceDependencies$inboundSchema)) - .optional(), }).transform((v) => { return remap$(v, { "child_service_dependencies": "childServiceDependencies", @@ -114,11 +121,13 @@ export const ServiceWithAllDependenciesEntity$inboundSchema: z.ZodType< export type ServiceWithAllDependenciesEntity$Outbound = { child_service_dependencies?: | Array + | null | undefined; parent_service_dependencies?: | Array + | null | undefined; - service_dependencies?: Array | undefined; + service_dependencies?: Array | null | undefined; }; /** @internal */ @@ -127,13 +136,15 @@ export const ServiceWithAllDependenciesEntity$outboundSchema: z.ZodType< z.ZodTypeDef, ServiceWithAllDependenciesEntity > = z.object({ - childServiceDependencies: z.array(ServiceChildDependencyEntity$outboundSchema) - .optional(), - parentServiceDependencies: z.array( - ServiceParentDependencyEntity$outboundSchema, + childServiceDependencies: z.nullable( + z.array(ServiceChildDependencyEntity$outboundSchema), + ).optional(), + parentServiceDependencies: z.nullable( + z.array(ServiceParentDependencyEntity$outboundSchema), + ).optional(), + serviceDependencies: z.nullable( + z.array(z.lazy(() => ServiceDependency$outboundSchema)), ).optional(), - serviceDependencies: z.array(z.lazy(() => ServiceDependencies$outboundSchema)) - .optional(), }).transform((v) => { return remap$(v, { childServiceDependencies: "child_service_dependencies", diff --git a/src/models/components/severityentity.ts b/src/models/components/severityentity.ts index effe5201..2a791424 100644 --- a/src/models/components/severityentity.ts +++ b/src/models/components/severityentity.ts @@ -12,14 +12,14 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * SeverityEntity model */ export type SeverityEntity = { - slug?: string | undefined; - description?: string | undefined; - type?: string | undefined; - position?: number | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - systemRecord?: boolean | undefined; - color?: string | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + position?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + systemRecord?: boolean | null | undefined; + color?: string | null | undefined; }; /** @internal */ @@ -28,16 +28,18 @@ export const SeverityEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - position: z.number().int().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - system_record: z.boolean().optional(), - color: z.string().optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + system_record: z.nullable(z.boolean()).optional(), + color: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -48,14 +50,14 @@ export const SeverityEntity$inboundSchema: z.ZodType< /** @internal */ export type SeverityEntity$Outbound = { - slug?: string | undefined; - description?: string | undefined; - type?: string | undefined; - position?: number | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - system_record?: boolean | undefined; - color?: string | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + position?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + system_record?: boolean | null | undefined; + color?: string | null | undefined; }; /** @internal */ @@ -64,14 +66,14 @@ export const SeverityEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SeverityEntity > = z.object({ - slug: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - position: z.number().int().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - systemRecord: z.boolean().optional(), - color: z.string().optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + systemRecord: z.nullable(z.boolean()).optional(), + color: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/severityentitypaginated.ts b/src/models/components/severityentitypaginated.ts index bd4122dd..a6cf62e7 100644 --- a/src/models/components/severityentitypaginated.ts +++ b/src/models/components/severityentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { SeverityEntity, SeverityEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * SeverityEntityPaginated model */ export type SeverityEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const SeverityEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(SeverityEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(SeverityEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type SeverityEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const SeverityEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, SeverityEntityPaginated > = z.object({ - data: z.array(SeverityEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(SeverityEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/severitymatrixconditionentity.ts b/src/models/components/severitymatrixconditionentity.ts index 31ae5c84..d5f0d468 100644 --- a/src/models/components/severitymatrixconditionentity.ts +++ b/src/models/components/severitymatrixconditionentity.ts @@ -11,12 +11,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * SeverityMatrix_ConditionEntity model */ export type SeverityMatrixConditionEntity = { - id?: string | undefined; - name?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; /** * Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition */ - position?: number | undefined; + position?: number | null | undefined; }; /** @internal */ @@ -25,16 +25,16 @@ export const SeverityMatrixConditionEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - position: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), }); /** @internal */ export type SeverityMatrixConditionEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - position?: number | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; }; /** @internal */ @@ -43,9 +43,9 @@ export const SeverityMatrixConditionEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SeverityMatrixConditionEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - position: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), }); /** diff --git a/src/models/components/severitymatriximpactentity.ts b/src/models/components/severitymatriximpactentity.ts index 76f34203..c1c1026f 100644 --- a/src/models/components/severitymatriximpactentity.ts +++ b/src/models/components/severitymatriximpactentity.ts @@ -12,11 +12,11 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * SeverityMatrix_ImpactEntity model */ export type SeverityMatrixImpactEntity = { - id?: string | undefined; - name?: string | undefined; - type?: string | undefined; - affectsId?: string | undefined; - position?: number | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + affectsId?: string | null | undefined; + position?: number | null | undefined; }; /** @internal */ @@ -25,11 +25,11 @@ export const SeverityMatrixImpactEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - type: z.string().optional(), - affects_id: z.string().optional(), - position: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + affects_id: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "affects_id": "affectsId", @@ -38,11 +38,11 @@ export const SeverityMatrixImpactEntity$inboundSchema: z.ZodType< /** @internal */ export type SeverityMatrixImpactEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - type?: string | undefined; - affects_id?: string | undefined; - position?: number | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + affects_id?: string | null | undefined; + position?: number | null | undefined; }; /** @internal */ @@ -51,11 +51,11 @@ export const SeverityMatrixImpactEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SeverityMatrixImpactEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - type: z.string().optional(), - affectsId: z.string().optional(), - position: z.number().int().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + affectsId: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { affectsId: "affects_id", diff --git a/src/models/components/severitymatrixitementity.ts b/src/models/components/severitymatrixitementity.ts index 3b147301..eff7636b 100644 --- a/src/models/components/severitymatrixitementity.ts +++ b/src/models/components/severitymatrixitementity.ts @@ -9,10 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SeverityMatrixItemEntity = { - severity?: string | undefined; - conditionId?: string | undefined; - impactId?: string | undefined; - impactType?: string | undefined; + severity?: string | null | undefined; + conditionId?: string | null | undefined; + impactId?: string | null | undefined; + impactType?: string | null | undefined; }; /** @internal */ @@ -21,10 +21,10 @@ export const SeverityMatrixItemEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - severity: z.string().optional(), - condition_id: z.string().optional(), - impact_id: z.string().optional(), - impact_type: z.string().optional(), + severity: z.nullable(z.string()).optional(), + condition_id: z.nullable(z.string()).optional(), + impact_id: z.nullable(z.string()).optional(), + impact_type: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "condition_id": "conditionId", @@ -35,10 +35,10 @@ export const SeverityMatrixItemEntity$inboundSchema: z.ZodType< /** @internal */ export type SeverityMatrixItemEntity$Outbound = { - severity?: string | undefined; - condition_id?: string | undefined; - impact_id?: string | undefined; - impact_type?: string | undefined; + severity?: string | null | undefined; + condition_id?: string | null | undefined; + impact_id?: string | null | undefined; + impact_type?: string | null | undefined; }; /** @internal */ @@ -47,10 +47,10 @@ export const SeverityMatrixItemEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SeverityMatrixItemEntity > = z.object({ - severity: z.string().optional(), - conditionId: z.string().optional(), - impactId: z.string().optional(), - impactType: z.string().optional(), + severity: z.nullable(z.string()).optional(), + conditionId: z.nullable(z.string()).optional(), + impactId: z.nullable(z.string()).optional(), + impactType: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { conditionId: "condition_id", diff --git a/src/models/components/severitymatrixseveritymatrixentity.ts b/src/models/components/severitymatrixseveritymatrixentity.ts index e54164e2..4dddf356 100644 --- a/src/models/components/severitymatrixseveritymatrixentity.ts +++ b/src/models/components/severitymatrixseveritymatrixentity.ts @@ -29,9 +29,9 @@ import { * SeverityMatrix_SeverityMatrixEntity model */ export type SeverityMatrixSeverityMatrixEntity = { - matrix?: Array | undefined; - impacts?: Array | undefined; - conditions?: Array | undefined; + matrix?: Array | null | undefined; + impacts?: Array | null | undefined; + conditions?: Array | null | undefined; }; /** @internal */ @@ -40,16 +40,19 @@ export const SeverityMatrixSeverityMatrixEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - matrix: z.array(SeverityMatrixItemEntity$inboundSchema).optional(), - impacts: z.array(SeverityMatrixImpactEntity$inboundSchema).optional(), - conditions: z.array(SeverityMatrixConditionEntity$inboundSchema).optional(), + matrix: z.nullable(z.array(SeverityMatrixItemEntity$inboundSchema)) + .optional(), + impacts: z.nullable(z.array(SeverityMatrixImpactEntity$inboundSchema)) + .optional(), + conditions: z.nullable(z.array(SeverityMatrixConditionEntity$inboundSchema)) + .optional(), }); /** @internal */ export type SeverityMatrixSeverityMatrixEntity$Outbound = { - matrix?: Array | undefined; - impacts?: Array | undefined; - conditions?: Array | undefined; + matrix?: Array | null | undefined; + impacts?: Array | null | undefined; + conditions?: Array | null | undefined; }; /** @internal */ @@ -58,9 +61,12 @@ export const SeverityMatrixSeverityMatrixEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SeverityMatrixSeverityMatrixEntity > = z.object({ - matrix: z.array(SeverityMatrixItemEntity$outboundSchema).optional(), - impacts: z.array(SeverityMatrixImpactEntity$outboundSchema).optional(), - conditions: z.array(SeverityMatrixConditionEntity$outboundSchema).optional(), + matrix: z.nullable(z.array(SeverityMatrixItemEntity$outboundSchema)) + .optional(), + impacts: z.nullable(z.array(SeverityMatrixImpactEntity$outboundSchema)) + .optional(), + conditions: z.nullable(z.array(SeverityMatrixConditionEntity$outboundSchema)) + .optional(), }); /** diff --git a/src/models/components/signalsapiingestkeyentity.ts b/src/models/components/signalsapiingestkeyentity.ts index ed5e565d..812a2017 100644 --- a/src/models/components/signalsapiingestkeyentity.ts +++ b/src/models/components/signalsapiingestkeyentity.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Signals_API_IngestKeyEntity model */ export type SignalsAPIIngestKeyEntity = { - url?: string | undefined; + url?: string | null | undefined; }; /** @internal */ @@ -20,12 +20,12 @@ export const SignalsAPIIngestKeyEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - url: z.string().optional(), + url: z.nullable(z.string()).optional(), }); /** @internal */ export type SignalsAPIIngestKeyEntity$Outbound = { - url?: string | undefined; + url?: string | null | undefined; }; /** @internal */ @@ -34,7 +34,7 @@ export const SignalsAPIIngestKeyEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SignalsAPIIngestKeyEntity > = z.object({ - url: z.string().optional(), + url: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/signalsapiruleentity.ts b/src/models/components/signalsapiruleentity.ts deleted file mode 100644 index 6756e59d..00000000 --- a/src/models/components/signalsapiruleentity.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; -import { - SignalsAPITargetEntity, - SignalsAPITargetEntity$inboundSchema, - SignalsAPITargetEntity$Outbound, - SignalsAPITargetEntity$outboundSchema, -} from "./signalsapitargetentity.js"; -import { - SuccinctEntity, - SuccinctEntity$inboundSchema, - SuccinctEntity$Outbound, - SuccinctEntity$outboundSchema, -} from "./succinctentity.js"; - -export const NotificationPriorityOverride = { - High: "HIGH", - Medium: "MEDIUM", - Low: "LOW", -} as const; -export type NotificationPriorityOverride = ClosedEnum< - typeof NotificationPriorityOverride ->; - -export type SignalsAPIRuleEntity = { - id?: string | undefined; - name?: string | undefined; - expression?: string | undefined; - teamId?: string | undefined; - target?: SignalsAPITargetEntity | undefined; - createdBy?: AuthorEntity | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - incidentType?: SuccinctEntity | undefined; - notificationPriorityOverride?: NotificationPriorityOverride | undefined; -}; - -/** @internal */ -export const NotificationPriorityOverride$inboundSchema: z.ZodNativeEnum< - typeof NotificationPriorityOverride -> = z.nativeEnum(NotificationPriorityOverride); - -/** @internal */ -export const NotificationPriorityOverride$outboundSchema: z.ZodNativeEnum< - typeof NotificationPriorityOverride -> = NotificationPriorityOverride$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NotificationPriorityOverride$ { - /** @deprecated use `NotificationPriorityOverride$inboundSchema` instead. */ - export const inboundSchema = NotificationPriorityOverride$inboundSchema; - /** @deprecated use `NotificationPriorityOverride$outboundSchema` instead. */ - export const outboundSchema = NotificationPriorityOverride$outboundSchema; -} - -/** @internal */ -export const SignalsAPIRuleEntity$inboundSchema: z.ZodType< - SignalsAPIRuleEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - expression: z.string().optional(), - team_id: z.string().optional(), - target: SignalsAPITargetEntity$inboundSchema.optional(), - created_by: AuthorEntity$inboundSchema.optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - incident_type: SuccinctEntity$inboundSchema.optional(), - notification_priority_override: NotificationPriorityOverride$inboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "created_by": "createdBy", - "created_at": "createdAt", - "updated_at": "updatedAt", - "incident_type": "incidentType", - "notification_priority_override": "notificationPriorityOverride", - }); -}); - -/** @internal */ -export type SignalsAPIRuleEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - expression?: string | undefined; - team_id?: string | undefined; - target?: SignalsAPITargetEntity$Outbound | undefined; - created_by?: AuthorEntity$Outbound | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - incident_type?: SuccinctEntity$Outbound | undefined; - notification_priority_override?: string | undefined; -}; - -/** @internal */ -export const SignalsAPIRuleEntity$outboundSchema: z.ZodType< - SignalsAPIRuleEntity$Outbound, - z.ZodTypeDef, - SignalsAPIRuleEntity -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - expression: z.string().optional(), - teamId: z.string().optional(), - target: SignalsAPITargetEntity$outboundSchema.optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - incidentType: SuccinctEntity$outboundSchema.optional(), - notificationPriorityOverride: NotificationPriorityOverride$outboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - createdBy: "created_by", - createdAt: "created_at", - updatedAt: "updated_at", - incidentType: "incident_type", - notificationPriorityOverride: "notification_priority_override", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SignalsAPIRuleEntity$ { - /** @deprecated use `SignalsAPIRuleEntity$inboundSchema` instead. */ - export const inboundSchema = SignalsAPIRuleEntity$inboundSchema; - /** @deprecated use `SignalsAPIRuleEntity$outboundSchema` instead. */ - export const outboundSchema = SignalsAPIRuleEntity$outboundSchema; - /** @deprecated use `SignalsAPIRuleEntity$Outbound` instead. */ - export type Outbound = SignalsAPIRuleEntity$Outbound; -} - -export function signalsAPIRuleEntityToJSON( - signalsAPIRuleEntity: SignalsAPIRuleEntity, -): string { - return JSON.stringify( - SignalsAPIRuleEntity$outboundSchema.parse(signalsAPIRuleEntity), - ); -} - -export function signalsAPIRuleEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SignalsAPIRuleEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SignalsAPIRuleEntity' from JSON`, - ); -} diff --git a/src/models/components/signalsapitargetentity.ts b/src/models/components/signalsapitargetentity.ts deleted file mode 100644 index b10d18dd..00000000 --- a/src/models/components/signalsapitargetentity.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type SignalsAPITargetEntity = { - id?: string | undefined; - name?: string | undefined; - type?: string | undefined; - isPageable?: boolean | undefined; -}; - -/** @internal */ -export const SignalsAPITargetEntity$inboundSchema: z.ZodType< - SignalsAPITargetEntity, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - type: z.string().optional(), - is_pageable: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "is_pageable": "isPageable", - }); -}); - -/** @internal */ -export type SignalsAPITargetEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - type?: string | undefined; - is_pageable?: boolean | undefined; -}; - -/** @internal */ -export const SignalsAPITargetEntity$outboundSchema: z.ZodType< - SignalsAPITargetEntity$Outbound, - z.ZodTypeDef, - SignalsAPITargetEntity -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - type: z.string().optional(), - isPageable: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - isPageable: "is_pageable", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SignalsAPITargetEntity$ { - /** @deprecated use `SignalsAPITargetEntity$inboundSchema` instead. */ - export const inboundSchema = SignalsAPITargetEntity$inboundSchema; - /** @deprecated use `SignalsAPITargetEntity$outboundSchema` instead. */ - export const outboundSchema = SignalsAPITargetEntity$outboundSchema; - /** @deprecated use `SignalsAPITargetEntity$Outbound` instead. */ - export type Outbound = SignalsAPITargetEntity$Outbound; -} - -export function signalsAPITargetEntityToJSON( - signalsAPITargetEntity: SignalsAPITargetEntity, -): string { - return JSON.stringify( - SignalsAPITargetEntity$outboundSchema.parse(signalsAPITargetEntity), - ); -} - -export function signalsAPITargetEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SignalsAPITargetEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SignalsAPITargetEntity' from JSON`, - ); -} diff --git a/src/models/components/signalsapitransposerlistentity.ts b/src/models/components/signalsapitransposerlistentity.ts new file mode 100644 index 00000000..b73fbbd9 --- /dev/null +++ b/src/models/components/signalsapitransposerlistentity.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullableSignalsAPITransposerEntity, + NullableSignalsAPITransposerEntity$inboundSchema, + NullableSignalsAPITransposerEntity$Outbound, + NullableSignalsAPITransposerEntity$outboundSchema, +} from "./nullablesignalsapitransposerentity.js"; + +/** + * Signals_API_TransposerListEntity model + */ +export type SignalsAPITransposerListEntity = { + data?: NullableSignalsAPITransposerEntity | null | undefined; +}; + +/** @internal */ +export const SignalsAPITransposerListEntity$inboundSchema: z.ZodType< + SignalsAPITransposerListEntity, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(NullableSignalsAPITransposerEntity$inboundSchema).optional(), +}); + +/** @internal */ +export type SignalsAPITransposerListEntity$Outbound = { + data?: NullableSignalsAPITransposerEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const SignalsAPITransposerListEntity$outboundSchema: z.ZodType< + SignalsAPITransposerListEntity$Outbound, + z.ZodTypeDef, + SignalsAPITransposerListEntity +> = z.object({ + data: z.nullable(NullableSignalsAPITransposerEntity$outboundSchema) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SignalsAPITransposerListEntity$ { + /** @deprecated use `SignalsAPITransposerListEntity$inboundSchema` instead. */ + export const inboundSchema = SignalsAPITransposerListEntity$inboundSchema; + /** @deprecated use `SignalsAPITransposerListEntity$outboundSchema` instead. */ + export const outboundSchema = SignalsAPITransposerListEntity$outboundSchema; + /** @deprecated use `SignalsAPITransposerListEntity$Outbound` instead. */ + export type Outbound = SignalsAPITransposerListEntity$Outbound; +} + +export function signalsAPITransposerListEntityToJSON( + signalsAPITransposerListEntity: SignalsAPITransposerListEntity, +): string { + return JSON.stringify( + SignalsAPITransposerListEntity$outboundSchema.parse( + signalsAPITransposerListEntity, + ), + ); +} + +export function signalsAPITransposerListEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SignalsAPITransposerListEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SignalsAPITransposerListEntity' from JSON`, + ); +} diff --git a/src/models/components/similarincidententitypaginated.ts b/src/models/components/similarincidententitypaginated.ts new file mode 100644 index 00000000..7d4ab5a6 --- /dev/null +++ b/src/models/components/similarincidententitypaginated.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; +import { + PublicApiv1SimilarIncidentEntity, + PublicApiv1SimilarIncidentEntity$inboundSchema, + PublicApiv1SimilarIncidentEntity$Outbound, + PublicApiv1SimilarIncidentEntity$outboundSchema, +} from "./publicapiv1similarincidententity.js"; + +/** + * SimilarIncidentEntityPaginated model + */ +export type SimilarIncidentEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +/** @internal */ +export const SimilarIncidentEntityPaginated$inboundSchema: z.ZodType< + SimilarIncidentEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.array(PublicApiv1SimilarIncidentEntity$inboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), +}); + +/** @internal */ +export type SimilarIncidentEntityPaginated$Outbound = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; +}; + +/** @internal */ +export const SimilarIncidentEntityPaginated$outboundSchema: z.ZodType< + SimilarIncidentEntityPaginated$Outbound, + z.ZodTypeDef, + SimilarIncidentEntityPaginated +> = z.object({ + data: z.nullable(z.array(PublicApiv1SimilarIncidentEntity$outboundSchema)) + .optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SimilarIncidentEntityPaginated$ { + /** @deprecated use `SimilarIncidentEntityPaginated$inboundSchema` instead. */ + export const inboundSchema = SimilarIncidentEntityPaginated$inboundSchema; + /** @deprecated use `SimilarIncidentEntityPaginated$outboundSchema` instead. */ + export const outboundSchema = SimilarIncidentEntityPaginated$outboundSchema; + /** @deprecated use `SimilarIncidentEntityPaginated$Outbound` instead. */ + export type Outbound = SimilarIncidentEntityPaginated$Outbound; +} + +export function similarIncidentEntityPaginatedToJSON( + similarIncidentEntityPaginated: SimilarIncidentEntityPaginated, +): string { + return JSON.stringify( + SimilarIncidentEntityPaginated$outboundSchema.parse( + similarIncidentEntityPaginated, + ), + ); +} + +export function similarIncidentEntityPaginatedFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SimilarIncidentEntityPaginated$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SimilarIncidentEntityPaginated' from JSON`, + ); +} diff --git a/src/models/components/slimrunbookentity.ts b/src/models/components/slimrunbookentity.ts index 9ace87e2..4a79d01e 100644 --- a/src/models/components/slimrunbookentity.ts +++ b/src/models/components/slimrunbookentity.ts @@ -8,32 +8,32 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - RulesRuleEntity, - RulesRuleEntity$inboundSchema, - RulesRuleEntity$Outbound, - RulesRuleEntity$outboundSchema, -} from "./rulesruleentity.js"; + NullableRulesRuleEntity, + NullableRulesRuleEntity$inboundSchema, + NullableRulesRuleEntity$Outbound, + NullableRulesRuleEntity$outboundSchema, +} from "./nullablerulesruleentity.js"; import { - TeamEntityLite, - TeamEntityLite$inboundSchema, - TeamEntityLite$Outbound, - TeamEntityLite$outboundSchema, -} from "./teamentitylite.js"; + NullableTeamEntityLite, + NullableTeamEntityLite$inboundSchema, + NullableTeamEntityLite$Outbound, + NullableTeamEntityLite$outboundSchema, +} from "./nullableteamentitylite.js"; export type SlimRunbookEntity = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - type?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - attachmentRule?: RulesRuleEntity | undefined; - owner?: TeamEntityLite | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + attachmentRule?: NullableRulesRuleEntity | null | undefined; + owner?: NullableTeamEntityLite | null | undefined; /** * categories the runbook applies to */ - categories?: string | undefined; + categories?: Array | null | undefined; }; /** @internal */ @@ -42,18 +42,20 @@ export const SlimRunbookEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - attachment_rule: RulesRuleEntity$inboundSchema.optional(), - owner: TeamEntityLite$inboundSchema.optional(), - categories: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + attachment_rule: z.nullable(NullableRulesRuleEntity$inboundSchema).optional(), + owner: z.nullable(NullableTeamEntityLite$inboundSchema).optional(), + categories: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -64,16 +66,16 @@ export const SlimRunbookEntity$inboundSchema: z.ZodType< /** @internal */ export type SlimRunbookEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - type?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - attachment_rule?: RulesRuleEntity$Outbound | undefined; - owner?: TeamEntityLite$Outbound | undefined; - categories?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + attachment_rule?: NullableRulesRuleEntity$Outbound | null | undefined; + owner?: NullableTeamEntityLite$Outbound | null | undefined; + categories?: Array | null | undefined; }; /** @internal */ @@ -82,16 +84,16 @@ export const SlimRunbookEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SlimRunbookEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - type: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - attachmentRule: RulesRuleEntity$outboundSchema.optional(), - owner: TeamEntityLite$outboundSchema.optional(), - categories: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + attachmentRule: z.nullable(NullableRulesRuleEntity$outboundSchema).optional(), + owner: z.nullable(NullableTeamEntityLite$outboundSchema).optional(), + categories: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/statusupdatetemplateentity.ts b/src/models/components/statusupdatetemplateentity.ts index 39039134..72cb0e5c 100644 --- a/src/models/components/statusupdatetemplateentity.ts +++ b/src/models/components/statusupdatetemplateentity.ts @@ -12,12 +12,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * StatusUpdateTemplateEntity model */ export type StatusUpdateTemplateEntity = { - id?: string | undefined; - name?: string | undefined; - body?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - discardedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + body?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + discardedAt?: Date | null | undefined; }; /** @internal */ @@ -26,15 +26,17 @@ export const StatusUpdateTemplateEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - body: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - discarded_at: z.string().datetime({ offset: true }).transform(v => - new Date(v) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + discarded_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), }).transform((v) => { return remap$(v, { @@ -46,12 +48,12 @@ export const StatusUpdateTemplateEntity$inboundSchema: z.ZodType< /** @internal */ export type StatusUpdateTemplateEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - body?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - discarded_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + body?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + discarded_at?: string | null | undefined; }; /** @internal */ @@ -60,12 +62,12 @@ export const StatusUpdateTemplateEntity$outboundSchema: z.ZodType< z.ZodTypeDef, StatusUpdateTemplateEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - body: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - discardedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + discardedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/succinctentity.ts b/src/models/components/succinctentity.ts index 4804cdd5..b252660f 100644 --- a/src/models/components/succinctentity.ts +++ b/src/models/components/succinctentity.ts @@ -8,8 +8,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SuccinctEntity = { - id?: string | undefined; - name?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -18,14 +18,14 @@ export const SuccinctEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }); /** @internal */ export type SuccinctEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -34,8 +34,8 @@ export const SuccinctEntity$outboundSchema: z.ZodType< z.ZodTypeDef, SuccinctEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/tagentity.ts b/src/models/components/tagentity.ts index f459cd00..90730c31 100644 --- a/src/models/components/tagentity.ts +++ b/src/models/components/tagentity.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * TagEntity model */ export type TagEntity = { - name?: string | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -20,12 +20,12 @@ export const TagEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - name: z.string().optional(), + name: z.nullable(z.string()).optional(), }); /** @internal */ export type TagEntity$Outbound = { - name?: string | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -34,7 +34,7 @@ export const TagEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TagEntity > = z.object({ - name: z.string().optional(), + name: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/components/tagentitypaginated.ts b/src/models/components/tagentitypaginated.ts index 369847c8..2d40e07e 100644 --- a/src/models/components/tagentitypaginated.ts +++ b/src/models/components/tagentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { TagEntity, TagEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * TagEntityPaginated model */ export type TagEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const TagEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(TagEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(TagEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type TagEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const TagEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, TagEntityPaginated > = z.object({ - data: z.array(TagEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(TagEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/taskentity.ts b/src/models/components/taskentity.ts index 7933d715..b6791a2f 100644 --- a/src/models/components/taskentity.ts +++ b/src/models/components/taskentity.ts @@ -8,25 +8,25 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; /** * TaskEntity model */ export type TaskEntity = { - id?: string | undefined; - title?: string | undefined; - description?: string | undefined; - state?: string | undefined; - assignee?: AuthorEntity | undefined; - createdBy?: AuthorEntity | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - dueAt?: Date | undefined; + id?: string | null | undefined; + title?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + assignee?: NullableAuthorEntity | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + dueAt?: Date | null | undefined; }; /** @internal */ @@ -35,18 +35,21 @@ export const TaskEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - title: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - assignee: AuthorEntity$inboundSchema.optional(), - created_by: AuthorEntity$inboundSchema.optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - due_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + assignee: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + due_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "created_by": "createdBy", @@ -58,15 +61,15 @@ export const TaskEntity$inboundSchema: z.ZodType< /** @internal */ export type TaskEntity$Outbound = { - id?: string | undefined; - title?: string | undefined; - description?: string | undefined; - state?: string | undefined; - assignee?: AuthorEntity$Outbound | undefined; - created_by?: AuthorEntity$Outbound | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - due_at?: string | undefined; + id?: string | null | undefined; + title?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + assignee?: NullableAuthorEntity$Outbound | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + due_at?: string | null | undefined; }; /** @internal */ @@ -75,15 +78,15 @@ export const TaskEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TaskEntity > = z.object({ - id: z.string().optional(), - title: z.string().optional(), - description: z.string().optional(), - state: z.string().optional(), - assignee: AuthorEntity$outboundSchema.optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - dueAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + assignee: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + dueAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { createdBy: "created_by", diff --git a/src/models/components/taskentitypaginated.ts b/src/models/components/taskentitypaginated.ts index c29c0a3c..3a224810 100644 --- a/src/models/components/taskentitypaginated.ts +++ b/src/models/components/taskentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { TaskEntity, TaskEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * TaskEntityPaginated model */ export type TaskEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const TaskEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(TaskEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(TaskEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type TaskEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const TaskEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, TaskEntityPaginated > = z.object({ - data: z.array(TaskEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(TaskEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/tasklistentity.ts b/src/models/components/tasklistentity.ts index cf884624..598d9bd1 100644 --- a/src/models/components/tasklistentity.ts +++ b/src/models/components/tasklistentity.ts @@ -8,29 +8,29 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; import { - TaskListItemEntity, - TaskListItemEntity$inboundSchema, - TaskListItemEntity$Outbound, - TaskListItemEntity$outboundSchema, -} from "./tasklistitementity.js"; + NullableTaskListItemEntity, + NullableTaskListItemEntity$inboundSchema, + NullableTaskListItemEntity$Outbound, + NullableTaskListItemEntity$outboundSchema, +} from "./nullabletasklistitementity.js"; /** * TaskListEntity model */ export type TaskListEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - createdBy?: AuthorEntity | undefined; - taskListItems?: TaskListItemEntity | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + taskListItems?: NullableTaskListItemEntity | null | undefined; }; /** @internal */ @@ -39,15 +39,18 @@ export const TaskListEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + task_list_items: z.nullable(NullableTaskListItemEntity$inboundSchema) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - created_by: AuthorEntity$inboundSchema.optional(), - task_list_items: TaskListItemEntity$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -59,13 +62,13 @@ export const TaskListEntity$inboundSchema: z.ZodType< /** @internal */ export type TaskListEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - created_by?: AuthorEntity$Outbound | undefined; - task_list_items?: TaskListItemEntity$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + task_list_items?: NullableTaskListItemEntity$Outbound | null | undefined; }; /** @internal */ @@ -74,13 +77,14 @@ export const TaskListEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TaskListEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - taskListItems: TaskListItemEntity$outboundSchema.optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + taskListItems: z.nullable(NullableTaskListItemEntity$outboundSchema) + .optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/tasklistitementity.ts b/src/models/components/tasklistitementity.ts deleted file mode 100644 index f31d5aed..00000000 --- a/src/models/components/tasklistitementity.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type TaskListItemEntity = { - summary?: string | undefined; - description?: string | undefined; -}; - -/** @internal */ -export const TaskListItemEntity$inboundSchema: z.ZodType< - TaskListItemEntity, - z.ZodTypeDef, - unknown -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), -}); - -/** @internal */ -export type TaskListItemEntity$Outbound = { - summary?: string | undefined; - description?: string | undefined; -}; - -/** @internal */ -export const TaskListItemEntity$outboundSchema: z.ZodType< - TaskListItemEntity$Outbound, - z.ZodTypeDef, - TaskListItemEntity -> = z.object({ - summary: z.string().optional(), - description: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TaskListItemEntity$ { - /** @deprecated use `TaskListItemEntity$inboundSchema` instead. */ - export const inboundSchema = TaskListItemEntity$inboundSchema; - /** @deprecated use `TaskListItemEntity$outboundSchema` instead. */ - export const outboundSchema = TaskListItemEntity$outboundSchema; - /** @deprecated use `TaskListItemEntity$Outbound` instead. */ - export type Outbound = TaskListItemEntity$Outbound; -} - -export function taskListItemEntityToJSON( - taskListItemEntity: TaskListItemEntity, -): string { - return JSON.stringify( - TaskListItemEntity$outboundSchema.parse(taskListItemEntity), - ); -} - -export function taskListItemEntityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TaskListItemEntity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TaskListItemEntity' from JSON`, - ); -} diff --git a/src/models/components/teamentity.ts b/src/models/components/teamentity.ts index 49c90af8..17d731de 100644 --- a/src/models/components/teamentity.ts +++ b/src/models/components/teamentity.ts @@ -7,12 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; import { ChecklistTemplateEntity, ChecklistTemplateEntity$inboundSchema, @@ -25,24 +19,30 @@ import { FunctionalityEntityLite$Outbound, FunctionalityEntityLite$outboundSchema, } from "./functionalityentitylite.js"; -import { - IntegrationsMicrosoftTeamsV2ChannelEntity, - IntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema, - IntegrationsMicrosoftTeamsV2ChannelEntity$Outbound, - IntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema, -} from "./integrationsmicrosoftteamsv2channelentity.js"; -import { - IntegrationsSlackSlackChannelEntity, - IntegrationsSlackSlackChannelEntity$inboundSchema, - IntegrationsSlackSlackChannelEntity$Outbound, - IntegrationsSlackSlackChannelEntity$outboundSchema, -} from "./integrationsslackslackchannelentity.js"; import { MembershipEntity, MembershipEntity$inboundSchema, MembershipEntity$Outbound, MembershipEntity$outboundSchema, } from "./membershipentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableIntegrationsMicrosoftTeamsV2ChannelEntity, + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema, + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$Outbound, + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema, +} from "./nullableintegrationsmicrosoftteamsv2channelentity.js"; +import { + NullableIntegrationsSlackSlackChannelEntity, + NullableIntegrationsSlackSlackChannelEntity$inboundSchema, + NullableIntegrationsSlackSlackChannelEntity$Outbound, + NullableIntegrationsSlackSlackChannelEntity$outboundSchema, +} from "./nullableintegrationsslackslackchannelentity.js"; import { ServiceEntityLite, ServiceEntityLite$inboundSchema, @@ -60,25 +60,28 @@ import { * TeamEntity model */ export type TeamEntity = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - signalsIcalUrl?: string | undefined; - createdBy?: AuthorEntity | undefined; - inSupportHours?: boolean | undefined; - slackChannel?: IntegrationsSlackSlackChannelEntity | undefined; - msTeamsChannel?: IntegrationsMicrosoftTeamsV2ChannelEntity | undefined; - memberships?: Array | undefined; - ownedChecklistTemplates?: Array | undefined; - ownedFunctionalities?: Array | undefined; - ownedServices?: Array | undefined; - ownedRunbooks?: Array | undefined; - respondingServices?: Array | undefined; - services?: Array | undefined; - functionalities?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + signalsIcalUrl?: string | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + inSupportHours?: boolean | null | undefined; + slackChannel?: NullableIntegrationsSlackSlackChannelEntity | null | undefined; + msTeamsChannel?: + | NullableIntegrationsMicrosoftTeamsV2ChannelEntity + | null + | undefined; + memberships?: Array | null | undefined; + ownedChecklistTemplates?: Array | null | undefined; + ownedFunctionalities?: Array | null | undefined; + ownedServices?: Array | null | undefined; + ownedRunbooks?: Array | null | undefined; + respondingServices?: Array | null | undefined; + services?: Array | null | undefined; + functionalities?: Array | null | undefined; }; /** @internal */ @@ -87,30 +90,41 @@ export const TeamEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + signals_ical_url: z.nullable(z.string()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + in_support_hours: z.nullable(z.boolean()).optional(), + slack_channel: z.nullable( + NullableIntegrationsSlackSlackChannelEntity$inboundSchema, + ).optional(), + ms_teams_channel: z.nullable( + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema, + ).optional(), + memberships: z.nullable(z.array(MembershipEntity$inboundSchema)).optional(), + owned_checklist_templates: z.nullable( + z.array(ChecklistTemplateEntity$inboundSchema), + ).optional(), + owned_functionalities: z.nullable( + z.array(FunctionalityEntityLite$inboundSchema), + ).optional(), + owned_services: z.nullable(z.array(ServiceEntityLite$inboundSchema)) .optional(), - signals_ical_url: z.string().optional(), - created_by: AuthorEntity$inboundSchema.optional(), - in_support_hours: z.boolean().optional(), - slack_channel: IntegrationsSlackSlackChannelEntity$inboundSchema.optional(), - ms_teams_channel: IntegrationsMicrosoftTeamsV2ChannelEntity$inboundSchema + owned_runbooks: z.nullable(z.array(SlimRunbookEntity$inboundSchema)) .optional(), - memberships: z.array(MembershipEntity$inboundSchema).optional(), - owned_checklist_templates: z.array(ChecklistTemplateEntity$inboundSchema) + responding_services: z.nullable(z.array(ServiceEntityLite$inboundSchema)) .optional(), - owned_functionalities: z.array(FunctionalityEntityLite$inboundSchema) + services: z.nullable(z.array(ServiceEntityLite$inboundSchema)).optional(), + functionalities: z.nullable(z.array(FunctionalityEntityLite$inboundSchema)) .optional(), - owned_services: z.array(ServiceEntityLite$inboundSchema).optional(), - owned_runbooks: z.array(SlimRunbookEntity$inboundSchema).optional(), - responding_services: z.array(ServiceEntityLite$inboundSchema).optional(), - services: z.array(ServiceEntityLite$inboundSchema).optional(), - functionalities: z.array(FunctionalityEntityLite$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -130,29 +144,37 @@ export const TeamEntity$inboundSchema: z.ZodType< /** @internal */ export type TeamEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - signals_ical_url?: string | undefined; - created_by?: AuthorEntity$Outbound | undefined; - in_support_hours?: boolean | undefined; - slack_channel?: IntegrationsSlackSlackChannelEntity$Outbound | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + signals_ical_url?: string | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + in_support_hours?: boolean | null | undefined; + slack_channel?: + | NullableIntegrationsSlackSlackChannelEntity$Outbound + | null + | undefined; ms_teams_channel?: - | IntegrationsMicrosoftTeamsV2ChannelEntity$Outbound + | NullableIntegrationsMicrosoftTeamsV2ChannelEntity$Outbound + | null | undefined; - memberships?: Array | undefined; + memberships?: Array | null | undefined; owned_checklist_templates?: | Array + | null | undefined; - owned_functionalities?: Array | undefined; - owned_services?: Array | undefined; - owned_runbooks?: Array | undefined; - responding_services?: Array | undefined; - services?: Array | undefined; - functionalities?: Array | undefined; + owned_functionalities?: + | Array + | null + | undefined; + owned_services?: Array | null | undefined; + owned_runbooks?: Array | null | undefined; + responding_services?: Array | null | undefined; + services?: Array | null | undefined; + functionalities?: Array | null | undefined; }; /** @internal */ @@ -161,28 +183,37 @@ export const TeamEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TeamEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - signalsIcalUrl: z.string().optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - inSupportHours: z.boolean().optional(), - slackChannel: IntegrationsSlackSlackChannelEntity$outboundSchema.optional(), - msTeamsChannel: IntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + signalsIcalUrl: z.nullable(z.string()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + inSupportHours: z.nullable(z.boolean()).optional(), + slackChannel: z.nullable( + NullableIntegrationsSlackSlackChannelEntity$outboundSchema, + ).optional(), + msTeamsChannel: z.nullable( + NullableIntegrationsMicrosoftTeamsV2ChannelEntity$outboundSchema, + ).optional(), + memberships: z.nullable(z.array(MembershipEntity$outboundSchema)).optional(), + ownedChecklistTemplates: z.nullable( + z.array(ChecklistTemplateEntity$outboundSchema), + ).optional(), + ownedFunctionalities: z.nullable( + z.array(FunctionalityEntityLite$outboundSchema), + ).optional(), + ownedServices: z.nullable(z.array(ServiceEntityLite$outboundSchema)) + .optional(), + ownedRunbooks: z.nullable(z.array(SlimRunbookEntity$outboundSchema)) .optional(), - memberships: z.array(MembershipEntity$outboundSchema).optional(), - ownedChecklistTemplates: z.array(ChecklistTemplateEntity$outboundSchema) + respondingServices: z.nullable(z.array(ServiceEntityLite$outboundSchema)) .optional(), - ownedFunctionalities: z.array(FunctionalityEntityLite$outboundSchema) + services: z.nullable(z.array(ServiceEntityLite$outboundSchema)).optional(), + functionalities: z.nullable(z.array(FunctionalityEntityLite$outboundSchema)) .optional(), - ownedServices: z.array(ServiceEntityLite$outboundSchema).optional(), - ownedRunbooks: z.array(SlimRunbookEntity$outboundSchema).optional(), - respondingServices: z.array(ServiceEntityLite$outboundSchema).optional(), - services: z.array(ServiceEntityLite$outboundSchema).optional(), - functionalities: z.array(FunctionalityEntityLite$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/teamentitylite.ts b/src/models/components/teamentitylite.ts index c5fc97e1..4c8c4116 100644 --- a/src/models/components/teamentitylite.ts +++ b/src/models/components/teamentitylite.ts @@ -8,22 +8,22 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; export type TeamEntityLite = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - signalsIcalUrl?: string | undefined; - createdBy?: AuthorEntity | undefined; - inSupportHours?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + signalsIcalUrl?: string | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + inSupportHours?: boolean | null | undefined; }; /** @internal */ @@ -32,17 +32,19 @@ export const TeamEntityLite$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - signals_ical_url: z.string().optional(), - created_by: AuthorEntity$inboundSchema.optional(), - in_support_hours: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + signals_ical_url: z.nullable(z.string()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + in_support_hours: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -55,15 +57,15 @@ export const TeamEntityLite$inboundSchema: z.ZodType< /** @internal */ export type TeamEntityLite$Outbound = { - id?: string | undefined; - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - signals_ical_url?: string | undefined; - created_by?: AuthorEntity$Outbound | undefined; - in_support_hours?: boolean | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + signals_ical_url?: string | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + in_support_hours?: boolean | null | undefined; }; /** @internal */ @@ -72,15 +74,15 @@ export const TeamEntityLite$outboundSchema: z.ZodType< z.ZodTypeDef, TeamEntityLite > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - signalsIcalUrl: z.string().optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - inSupportHours: z.boolean().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + signalsIcalUrl: z.nullable(z.string()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + inSupportHours: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/teamentitypaginated.ts b/src/models/components/teamentitypaginated.ts index 62d635c7..c744ed21 100644 --- a/src/models/components/teamentitypaginated.ts +++ b/src/models/components/teamentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { TeamEntity, TeamEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * TeamEntityPaginated model */ export type TeamEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const TeamEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(TeamEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(TeamEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type TeamEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const TeamEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, TeamEntityPaginated > = z.object({ - data: z.array(TeamEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(TeamEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/ticketingfieldmapsmappablefieldentity.ts b/src/models/components/ticketingfieldmapsmappablefieldentity.ts index 49861052..fcc9dc9c 100644 --- a/src/models/components/ticketingfieldmapsmappablefieldentity.ts +++ b/src/models/components/ticketingfieldmapsmappablefieldentity.ts @@ -15,23 +15,23 @@ export type TicketingFieldMapsMappableFieldEntity = { /** * The ID of the field */ - value?: string | undefined; + value?: string | null | undefined; /** * The human-readable name of the field */ - label?: string | undefined; + label?: string | null | undefined; /** * The allowed type of the field */ - type?: string | undefined; + type?: string | null | undefined; /** * The allowed values of the field */ - allowedValues?: string | undefined; + allowedValues?: Array | null | undefined; /** * If the field is required to be mapped */ - required?: string | undefined; + required?: string | null | undefined; }; /** @internal */ @@ -40,11 +40,11 @@ export const TicketingFieldMapsMappableFieldEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - value: z.string().optional(), - label: z.string().optional(), - type: z.string().optional(), - allowed_values: z.string().optional(), - required: z.string().optional(), + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + allowed_values: z.nullable(z.array(z.string())).optional(), + required: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "allowed_values": "allowedValues", @@ -53,11 +53,11 @@ export const TicketingFieldMapsMappableFieldEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingFieldMapsMappableFieldEntity$Outbound = { - value?: string | undefined; - label?: string | undefined; - type?: string | undefined; - allowed_values?: string | undefined; - required?: string | undefined; + value?: string | null | undefined; + label?: string | null | undefined; + type?: string | null | undefined; + allowed_values?: Array | null | undefined; + required?: string | null | undefined; }; /** @internal */ @@ -66,11 +66,11 @@ export const TicketingFieldMapsMappableFieldEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingFieldMapsMappableFieldEntity > = z.object({ - value: z.string().optional(), - label: z.string().optional(), - type: z.string().optional(), - allowedValues: z.string().optional(), - required: z.string().optional(), + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + allowedValues: z.nullable(z.array(z.string())).optional(), + required: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { allowedValues: "allowed_values", diff --git a/src/models/components/ticketingpriorityentity.ts b/src/models/components/ticketingpriorityentity.ts index da0a3197..1e3e7be4 100644 --- a/src/models/components/ticketingpriorityentity.ts +++ b/src/models/components/ticketingpriorityentity.ts @@ -12,11 +12,11 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * Ticketing_PriorityEntity model */ export type TicketingPriorityEntity = { - id?: string | undefined; - name?: string | undefined; - position?: number | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; }; /** @internal */ @@ -25,13 +25,15 @@ export const TicketingPriorityEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - position: z.number().int().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", @@ -41,11 +43,11 @@ export const TicketingPriorityEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingPriorityEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - position?: number | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; }; /** @internal */ @@ -54,11 +56,11 @@ export const TicketingPriorityEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingPriorityEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - position: z.number().int().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", diff --git a/src/models/components/ticketingprojectconfigentity.ts b/src/models/components/ticketingprojectconfigentity.ts index 9089398b..f16d5fe6 100644 --- a/src/models/components/ticketingprojectconfigentity.ts +++ b/src/models/components/ticketingprojectconfigentity.ts @@ -17,15 +17,15 @@ export type TicketingProjectConfigEntityDetails = {}; * Ticketing_ProjectConfigEntity model */ export type TicketingProjectConfigEntity = { - id?: string | undefined; - connectionId?: string | undefined; - connectionType?: string | undefined; - ticketingProjectId?: string | undefined; - ticketingProjectName?: string | undefined; + id?: string | null | undefined; + connectionId?: string | null | undefined; + connectionType?: string | null | undefined; + ticketingProjectId?: string | null | undefined; + ticketingProjectName?: string | null | undefined; /** * A config object containing details about the project config. Can be one of: Ticketing::JiraCloud::ProjectConfigEntity, Ticketing::JiraOnprem::ProjectConfigEntity, or Ticketing::Shortcut::ProjectConfigEntity */ - details?: TicketingProjectConfigEntityDetails | undefined; + details?: TicketingProjectConfigEntityDetails | null | undefined; }; /** @internal */ @@ -87,13 +87,14 @@ export const TicketingProjectConfigEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - connection_id: z.string().optional(), - connection_type: z.string().optional(), - ticketing_project_id: z.string().optional(), - ticketing_project_name: z.string().optional(), - details: z.lazy(() => TicketingProjectConfigEntityDetails$inboundSchema) - .optional(), + id: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + connection_type: z.nullable(z.string()).optional(), + ticketing_project_id: z.nullable(z.string()).optional(), + ticketing_project_name: z.nullable(z.string()).optional(), + details: z.nullable( + z.lazy(() => TicketingProjectConfigEntityDetails$inboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { "connection_id": "connectionId", @@ -105,12 +106,12 @@ export const TicketingProjectConfigEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingProjectConfigEntity$Outbound = { - id?: string | undefined; - connection_id?: string | undefined; - connection_type?: string | undefined; - ticketing_project_id?: string | undefined; - ticketing_project_name?: string | undefined; - details?: TicketingProjectConfigEntityDetails$Outbound | undefined; + id?: string | null | undefined; + connection_id?: string | null | undefined; + connection_type?: string | null | undefined; + ticketing_project_id?: string | null | undefined; + ticketing_project_name?: string | null | undefined; + details?: TicketingProjectConfigEntityDetails$Outbound | null | undefined; }; /** @internal */ @@ -119,13 +120,14 @@ export const TicketingProjectConfigEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingProjectConfigEntity > = z.object({ - id: z.string().optional(), - connectionId: z.string().optional(), - connectionType: z.string().optional(), - ticketingProjectId: z.string().optional(), - ticketingProjectName: z.string().optional(), - details: z.lazy(() => TicketingProjectConfigEntityDetails$outboundSchema) - .optional(), + id: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + connectionType: z.nullable(z.string()).optional(), + ticketingProjectId: z.nullable(z.string()).optional(), + ticketingProjectName: z.nullable(z.string()).optional(), + details: z.nullable( + z.lazy(() => TicketingProjectConfigEntityDetails$outboundSchema), + ).optional(), }).transform((v) => { return remap$(v, { connectionId: "connection_id", diff --git a/src/models/components/ticketingprojectfieldmapbodyentity.ts b/src/models/components/ticketingprojectfieldmapbodyentity.ts index a14ec498..575411a8 100644 --- a/src/models/components/ticketingprojectfieldmapbodyentity.ts +++ b/src/models/components/ticketingprojectfieldmapbodyentity.ts @@ -9,64 +9,61 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - TicketingProjectFieldMapCasesElseEntity, - TicketingProjectFieldMapCasesElseEntity$inboundSchema, - TicketingProjectFieldMapCasesElseEntity$Outbound, - TicketingProjectFieldMapCasesElseEntity$outboundSchema, -} from "./ticketingprojectfieldmapcaseselseentity.js"; + NullableTicketingProjectFieldMapCasesElseEntity, + NullableTicketingProjectFieldMapCasesElseEntity$inboundSchema, + NullableTicketingProjectFieldMapCasesElseEntity$Outbound, + NullableTicketingProjectFieldMapCasesElseEntity$outboundSchema, +} from "./nullableticketingprojectfieldmapcaseselseentity.js"; +import { + NullableTicketingProjectFieldMapExternalValueEntity, + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema, + NullableTicketingProjectFieldMapExternalValueEntity$Outbound, + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema, +} from "./nullableticketingprojectfieldmapexternalvalueentity.js"; import { TicketingProjectFieldMapCasesEntity, TicketingProjectFieldMapCasesEntity$inboundSchema, TicketingProjectFieldMapCasesEntity$Outbound, TicketingProjectFieldMapCasesEntity$outboundSchema, } from "./ticketingprojectfieldmapcasesentity.js"; -import { - TicketingProjectFieldMapExternalValueEntity, - TicketingProjectFieldMapExternalValueEntity$inboundSchema, - TicketingProjectFieldMapExternalValueEntity$Outbound, - TicketingProjectFieldMapExternalValueEntity$outboundSchema, -} from "./ticketingprojectfieldmapexternalvalueentity.js"; -export const TicketingProjectFieldMapBodyEntityStrategy = { +export const StrategyEnum = { Basic: "basic", Logic: "logic", } as const; -export type TicketingProjectFieldMapBodyEntityStrategy = ClosedEnum< - typeof TicketingProjectFieldMapBodyEntityStrategy ->; +export type StrategyEnum = ClosedEnum; export type UserData = {}; export type TicketingProjectFieldMapBodyEntity = { - strategy?: TicketingProjectFieldMapBodyEntityStrategy | undefined; - externalField?: string | undefined; - externalValue?: TicketingProjectFieldMapExternalValueEntity | undefined; - userData?: UserData | undefined; - cases?: Array | undefined; - else?: TicketingProjectFieldMapCasesElseEntity | undefined; + strategy?: StrategyEnum | null | undefined; + externalField?: string | null | undefined; + externalValue?: + | NullableTicketingProjectFieldMapExternalValueEntity + | null + | undefined; + userData?: UserData | null | undefined; + cases?: Array | null | undefined; + else?: NullableTicketingProjectFieldMapCasesElseEntity | null | undefined; }; /** @internal */ -export const TicketingProjectFieldMapBodyEntityStrategy$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(TicketingProjectFieldMapBodyEntityStrategy); +export const StrategyEnum$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(StrategyEnum); /** @internal */ -export const TicketingProjectFieldMapBodyEntityStrategy$outboundSchema: - z.ZodNativeEnum = - TicketingProjectFieldMapBodyEntityStrategy$inboundSchema; +export const StrategyEnum$outboundSchema: z.ZodNativeEnum = + StrategyEnum$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace TicketingProjectFieldMapBodyEntityStrategy$ { - /** @deprecated use `TicketingProjectFieldMapBodyEntityStrategy$inboundSchema` instead. */ - export const inboundSchema = - TicketingProjectFieldMapBodyEntityStrategy$inboundSchema; - /** @deprecated use `TicketingProjectFieldMapBodyEntityStrategy$outboundSchema` instead. */ - export const outboundSchema = - TicketingProjectFieldMapBodyEntityStrategy$outboundSchema; +export namespace StrategyEnum$ { + /** @deprecated use `StrategyEnum$inboundSchema` instead. */ + export const inboundSchema = StrategyEnum$inboundSchema; + /** @deprecated use `StrategyEnum$outboundSchema` instead. */ + export const outboundSchema = StrategyEnum$outboundSchema; } /** @internal */ @@ -119,13 +116,17 @@ export const TicketingProjectFieldMapBodyEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - strategy: TicketingProjectFieldMapBodyEntityStrategy$inboundSchema.optional(), - external_field: z.string().optional(), - external_value: TicketingProjectFieldMapExternalValueEntity$inboundSchema + strategy: z.nullable(StrategyEnum$inboundSchema).optional(), + external_field: z.nullable(z.string()).optional(), + external_value: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema, + ).optional(), + user_data: z.nullable(z.lazy(() => UserData$inboundSchema)).optional(), + cases: z.nullable(z.array(TicketingProjectFieldMapCasesEntity$inboundSchema)) .optional(), - user_data: z.lazy(() => UserData$inboundSchema).optional(), - cases: z.array(TicketingProjectFieldMapCasesEntity$inboundSchema).optional(), - else: TicketingProjectFieldMapCasesElseEntity$inboundSchema.optional(), + else: z.nullable( + NullableTicketingProjectFieldMapCasesElseEntity$inboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { "external_field": "externalField", @@ -136,14 +137,21 @@ export const TicketingProjectFieldMapBodyEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingProjectFieldMapBodyEntity$Outbound = { - strategy?: string | undefined; - external_field?: string | undefined; + strategy?: string | null | undefined; + external_field?: string | null | undefined; external_value?: - | TicketingProjectFieldMapExternalValueEntity$Outbound + | NullableTicketingProjectFieldMapExternalValueEntity$Outbound + | null + | undefined; + user_data?: UserData$Outbound | null | undefined; + cases?: + | Array + | null + | undefined; + else?: + | NullableTicketingProjectFieldMapCasesElseEntity$Outbound + | null | undefined; - user_data?: UserData$Outbound | undefined; - cases?: Array | undefined; - else?: TicketingProjectFieldMapCasesElseEntity$Outbound | undefined; }; /** @internal */ @@ -152,14 +160,17 @@ export const TicketingProjectFieldMapBodyEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingProjectFieldMapBodyEntity > = z.object({ - strategy: TicketingProjectFieldMapBodyEntityStrategy$outboundSchema - .optional(), - externalField: z.string().optional(), - externalValue: TicketingProjectFieldMapExternalValueEntity$outboundSchema + strategy: z.nullable(StrategyEnum$outboundSchema).optional(), + externalField: z.nullable(z.string()).optional(), + externalValue: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema, + ).optional(), + userData: z.nullable(z.lazy(() => UserData$outboundSchema)).optional(), + cases: z.nullable(z.array(TicketingProjectFieldMapCasesEntity$outboundSchema)) .optional(), - userData: z.lazy(() => UserData$outboundSchema).optional(), - cases: z.array(TicketingProjectFieldMapCasesEntity$outboundSchema).optional(), - else: TicketingProjectFieldMapCasesElseEntity$outboundSchema.optional(), + else: z.nullable( + NullableTicketingProjectFieldMapCasesElseEntity$outboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { externalField: "external_field", diff --git a/src/models/components/ticketingprojectfieldmapcaseselseentity.ts b/src/models/components/ticketingprojectfieldmapcaseselseentity.ts deleted file mode 100644 index 7a44aa16..00000000 --- a/src/models/components/ticketingprojectfieldmapcaseselseentity.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - TicketingProjectFieldMapExternalValueEntity, - TicketingProjectFieldMapExternalValueEntity$inboundSchema, - TicketingProjectFieldMapExternalValueEntity$Outbound, - TicketingProjectFieldMapExternalValueEntity$outboundSchema, -} from "./ticketingprojectfieldmapexternalvalueentity.js"; - -export type TicketingProjectFieldMapCasesElseEntity = { - externalValue?: TicketingProjectFieldMapExternalValueEntity | undefined; -}; - -/** @internal */ -export const TicketingProjectFieldMapCasesElseEntity$inboundSchema: z.ZodType< - TicketingProjectFieldMapCasesElseEntity, - z.ZodTypeDef, - unknown -> = z.object({ - external_value: TicketingProjectFieldMapExternalValueEntity$inboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - "external_value": "externalValue", - }); -}); - -/** @internal */ -export type TicketingProjectFieldMapCasesElseEntity$Outbound = { - external_value?: - | TicketingProjectFieldMapExternalValueEntity$Outbound - | undefined; -}; - -/** @internal */ -export const TicketingProjectFieldMapCasesElseEntity$outboundSchema: z.ZodType< - TicketingProjectFieldMapCasesElseEntity$Outbound, - z.ZodTypeDef, - TicketingProjectFieldMapCasesElseEntity -> = z.object({ - externalValue: TicketingProjectFieldMapExternalValueEntity$outboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - externalValue: "external_value", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TicketingProjectFieldMapCasesElseEntity$ { - /** @deprecated use `TicketingProjectFieldMapCasesElseEntity$inboundSchema` instead. */ - export const inboundSchema = - TicketingProjectFieldMapCasesElseEntity$inboundSchema; - /** @deprecated use `TicketingProjectFieldMapCasesElseEntity$outboundSchema` instead. */ - export const outboundSchema = - TicketingProjectFieldMapCasesElseEntity$outboundSchema; - /** @deprecated use `TicketingProjectFieldMapCasesElseEntity$Outbound` instead. */ - export type Outbound = TicketingProjectFieldMapCasesElseEntity$Outbound; -} - -export function ticketingProjectFieldMapCasesElseEntityToJSON( - ticketingProjectFieldMapCasesElseEntity: - TicketingProjectFieldMapCasesElseEntity, -): string { - return JSON.stringify( - TicketingProjectFieldMapCasesElseEntity$outboundSchema.parse( - ticketingProjectFieldMapCasesElseEntity, - ), - ); -} - -export function ticketingProjectFieldMapCasesElseEntityFromJSON( - jsonString: string, -): SafeParseResult< - TicketingProjectFieldMapCasesElseEntity, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - TicketingProjectFieldMapCasesElseEntity$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'TicketingProjectFieldMapCasesElseEntity' from JSON`, - ); -} diff --git a/src/models/components/ticketingprojectfieldmapcasesentity.ts b/src/models/components/ticketingprojectfieldmapcasesentity.ts index e6c6d5f8..d96bd8ad 100644 --- a/src/models/components/ticketingprojectfieldmapcasesentity.ts +++ b/src/models/components/ticketingprojectfieldmapcasesentity.ts @@ -8,11 +8,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - TicketingProjectFieldMapExternalValueEntity, - TicketingProjectFieldMapExternalValueEntity$inboundSchema, - TicketingProjectFieldMapExternalValueEntity$Outbound, - TicketingProjectFieldMapExternalValueEntity$outboundSchema, -} from "./ticketingprojectfieldmapexternalvalueentity.js"; + NullableTicketingProjectFieldMapExternalValueEntity, + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema, + NullableTicketingProjectFieldMapExternalValueEntity$Outbound, + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema, +} from "./nullableticketingprojectfieldmapexternalvalueentity.js"; /** * An unstructured object of key/value pairs describing the logic for applying the rule. @@ -23,8 +23,11 @@ export type TicketingProjectFieldMapCasesEntity = { /** * An unstructured object of key/value pairs describing the logic for applying the rule. */ - logic?: TicketingProjectFieldMapCasesEntityLogic | undefined; - externalValue?: TicketingProjectFieldMapExternalValueEntity | undefined; + logic?: TicketingProjectFieldMapCasesEntityLogic | null | undefined; + externalValue?: + | NullableTicketingProjectFieldMapExternalValueEntity + | null + | undefined; }; /** @internal */ @@ -92,10 +95,12 @@ export const TicketingProjectFieldMapCasesEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - logic: z.lazy(() => TicketingProjectFieldMapCasesEntityLogic$inboundSchema) - .optional(), - external_value: TicketingProjectFieldMapExternalValueEntity$inboundSchema - .optional(), + logic: z.nullable( + z.lazy(() => TicketingProjectFieldMapCasesEntityLogic$inboundSchema), + ).optional(), + external_value: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntity$inboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { "external_value": "externalValue", @@ -104,9 +109,10 @@ export const TicketingProjectFieldMapCasesEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingProjectFieldMapCasesEntity$Outbound = { - logic?: TicketingProjectFieldMapCasesEntityLogic$Outbound | undefined; + logic?: TicketingProjectFieldMapCasesEntityLogic$Outbound | null | undefined; external_value?: - | TicketingProjectFieldMapExternalValueEntity$Outbound + | NullableTicketingProjectFieldMapExternalValueEntity$Outbound + | null | undefined; }; @@ -116,10 +122,12 @@ export const TicketingProjectFieldMapCasesEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingProjectFieldMapCasesEntity > = z.object({ - logic: z.lazy(() => TicketingProjectFieldMapCasesEntityLogic$outboundSchema) - .optional(), - externalValue: TicketingProjectFieldMapExternalValueEntity$outboundSchema - .optional(), + logic: z.nullable( + z.lazy(() => TicketingProjectFieldMapCasesEntityLogic$outboundSchema), + ).optional(), + externalValue: z.nullable( + NullableTicketingProjectFieldMapExternalValueEntity$outboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { externalValue: "external_value", diff --git a/src/models/components/ticketingprojectfieldmapentity.ts b/src/models/components/ticketingprojectfieldmapentity.ts index e438d67a..c45cc68b 100644 --- a/src/models/components/ticketingprojectfieldmapentity.ts +++ b/src/models/components/ticketingprojectfieldmapentity.ts @@ -18,11 +18,11 @@ import { * Ticketing_ProjectFieldMapEntity model */ export type TicketingProjectFieldMapEntity = { - id?: string | undefined; - connectionId?: string | undefined; - connectionType?: string | undefined; - ticketingProjectId?: string | undefined; - body?: Array | undefined; + id?: string | null | undefined; + connectionId?: string | null | undefined; + connectionType?: string | null | undefined; + ticketingProjectId?: string | null | undefined; + body?: Array | null | undefined; }; /** @internal */ @@ -31,11 +31,12 @@ export const TicketingProjectFieldMapEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - connection_id: z.string().optional(), - connection_type: z.string().optional(), - ticketing_project_id: z.string().optional(), - body: z.array(TicketingProjectFieldMapBodyEntity$inboundSchema).optional(), + id: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + connection_type: z.nullable(z.string()).optional(), + ticketing_project_id: z.nullable(z.string()).optional(), + body: z.nullable(z.array(TicketingProjectFieldMapBodyEntity$inboundSchema)) + .optional(), }).transform((v) => { return remap$(v, { "connection_id": "connectionId", @@ -46,11 +47,11 @@ export const TicketingProjectFieldMapEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingProjectFieldMapEntity$Outbound = { - id?: string | undefined; - connection_id?: string | undefined; - connection_type?: string | undefined; - ticketing_project_id?: string | undefined; - body?: Array | undefined; + id?: string | null | undefined; + connection_id?: string | null | undefined; + connection_type?: string | null | undefined; + ticketing_project_id?: string | null | undefined; + body?: Array | null | undefined; }; /** @internal */ @@ -59,11 +60,12 @@ export const TicketingProjectFieldMapEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingProjectFieldMapEntity > = z.object({ - id: z.string().optional(), - connectionId: z.string().optional(), - connectionType: z.string().optional(), - ticketingProjectId: z.string().optional(), - body: z.array(TicketingProjectFieldMapBodyEntity$outboundSchema).optional(), + id: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + connectionType: z.nullable(z.string()).optional(), + ticketingProjectId: z.nullable(z.string()).optional(), + body: z.nullable(z.array(TicketingProjectFieldMapBodyEntity$outboundSchema)) + .optional(), }).transform((v) => { return remap$(v, { connectionId: "connection_id", diff --git a/src/models/components/ticketingprojectfieldmapexternalvalueentity.ts b/src/models/components/ticketingprojectfieldmapexternalvalueentity.ts deleted file mode 100644 index 50a5205c..00000000 --- a/src/models/components/ticketingprojectfieldmapexternalvalueentity.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const TicketingProjectFieldMapExternalValueEntityType = { - Literal: "literal", - FhAttribute: "fh-attribute", - FhType: "fh-type", -} as const; -export type TicketingProjectFieldMapExternalValueEntityType = ClosedEnum< - typeof TicketingProjectFieldMapExternalValueEntityType ->; - -export type TicketingProjectFieldMapExternalValueEntity = { - type?: TicketingProjectFieldMapExternalValueEntityType | undefined; - value?: string | undefined; - attribute?: string | undefined; - presentation?: string | undefined; -}; - -/** @internal */ -export const TicketingProjectFieldMapExternalValueEntityType$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(TicketingProjectFieldMapExternalValueEntityType); - -/** @internal */ -export const TicketingProjectFieldMapExternalValueEntityType$outboundSchema: - z.ZodNativeEnum = - TicketingProjectFieldMapExternalValueEntityType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TicketingProjectFieldMapExternalValueEntityType$ { - /** @deprecated use `TicketingProjectFieldMapExternalValueEntityType$inboundSchema` instead. */ - export const inboundSchema = - TicketingProjectFieldMapExternalValueEntityType$inboundSchema; - /** @deprecated use `TicketingProjectFieldMapExternalValueEntityType$outboundSchema` instead. */ - export const outboundSchema = - TicketingProjectFieldMapExternalValueEntityType$outboundSchema; -} - -/** @internal */ -export const TicketingProjectFieldMapExternalValueEntity$inboundSchema: - z.ZodType< - TicketingProjectFieldMapExternalValueEntity, - z.ZodTypeDef, - unknown - > = z.object({ - type: TicketingProjectFieldMapExternalValueEntityType$inboundSchema - .optional(), - value: z.string().optional(), - attribute: z.string().optional(), - presentation: z.string().optional(), - }); - -/** @internal */ -export type TicketingProjectFieldMapExternalValueEntity$Outbound = { - type?: string | undefined; - value?: string | undefined; - attribute?: string | undefined; - presentation?: string | undefined; -}; - -/** @internal */ -export const TicketingProjectFieldMapExternalValueEntity$outboundSchema: - z.ZodType< - TicketingProjectFieldMapExternalValueEntity$Outbound, - z.ZodTypeDef, - TicketingProjectFieldMapExternalValueEntity - > = z.object({ - type: TicketingProjectFieldMapExternalValueEntityType$outboundSchema - .optional(), - value: z.string().optional(), - attribute: z.string().optional(), - presentation: z.string().optional(), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TicketingProjectFieldMapExternalValueEntity$ { - /** @deprecated use `TicketingProjectFieldMapExternalValueEntity$inboundSchema` instead. */ - export const inboundSchema = - TicketingProjectFieldMapExternalValueEntity$inboundSchema; - /** @deprecated use `TicketingProjectFieldMapExternalValueEntity$outboundSchema` instead. */ - export const outboundSchema = - TicketingProjectFieldMapExternalValueEntity$outboundSchema; - /** @deprecated use `TicketingProjectFieldMapExternalValueEntity$Outbound` instead. */ - export type Outbound = TicketingProjectFieldMapExternalValueEntity$Outbound; -} - -export function ticketingProjectFieldMapExternalValueEntityToJSON( - ticketingProjectFieldMapExternalValueEntity: - TicketingProjectFieldMapExternalValueEntity, -): string { - return JSON.stringify( - TicketingProjectFieldMapExternalValueEntity$outboundSchema.parse( - ticketingProjectFieldMapExternalValueEntity, - ), - ); -} - -export function ticketingProjectFieldMapExternalValueEntityFromJSON( - jsonString: string, -): SafeParseResult< - TicketingProjectFieldMapExternalValueEntity, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - TicketingProjectFieldMapExternalValueEntity$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'TicketingProjectFieldMapExternalValueEntity' from JSON`, - ); -} diff --git a/src/models/components/ticketingprojectinboundfieldmapentity.ts b/src/models/components/ticketingprojectinboundfieldmapentity.ts new file mode 100644 index 00000000..185164ab --- /dev/null +++ b/src/models/components/ticketingprojectinboundfieldmapentity.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const TicketType = { + Incident: "incident", + Task: "task", + FollowUp: "follow_up", +} as const; +export type TicketType = ClosedEnum; + +/** + * Ticketing_ProjectInboundFieldMapEntity model + */ +export type TicketingProjectInboundFieldMapEntity = { + id?: string | null | undefined; + connectionId?: string | null | undefined; + connectionType?: string | null | undefined; + ticketingProjectId?: string | null | undefined; + externalFieldName?: string | null | undefined; + internalFieldName?: string | null | undefined; + ticketType?: TicketType | null | undefined; +}; + +/** @internal */ +export const TicketType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(TicketType); + +/** @internal */ +export const TicketType$outboundSchema: z.ZodNativeEnum = + TicketType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TicketType$ { + /** @deprecated use `TicketType$inboundSchema` instead. */ + export const inboundSchema = TicketType$inboundSchema; + /** @deprecated use `TicketType$outboundSchema` instead. */ + export const outboundSchema = TicketType$outboundSchema; +} + +/** @internal */ +export const TicketingProjectInboundFieldMapEntity$inboundSchema: z.ZodType< + TicketingProjectInboundFieldMapEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + connection_type: z.nullable(z.string()).optional(), + ticketing_project_id: z.nullable(z.string()).optional(), + external_field_name: z.nullable(z.string()).optional(), + internal_field_name: z.nullable(z.string()).optional(), + ticket_type: z.nullable(TicketType$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "connection_id": "connectionId", + "connection_type": "connectionType", + "ticketing_project_id": "ticketingProjectId", + "external_field_name": "externalFieldName", + "internal_field_name": "internalFieldName", + "ticket_type": "ticketType", + }); +}); + +/** @internal */ +export type TicketingProjectInboundFieldMapEntity$Outbound = { + id?: string | null | undefined; + connection_id?: string | null | undefined; + connection_type?: string | null | undefined; + ticketing_project_id?: string | null | undefined; + external_field_name?: string | null | undefined; + internal_field_name?: string | null | undefined; + ticket_type?: string | null | undefined; +}; + +/** @internal */ +export const TicketingProjectInboundFieldMapEntity$outboundSchema: z.ZodType< + TicketingProjectInboundFieldMapEntity$Outbound, + z.ZodTypeDef, + TicketingProjectInboundFieldMapEntity +> = z.object({ + id: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + connectionType: z.nullable(z.string()).optional(), + ticketingProjectId: z.nullable(z.string()).optional(), + externalFieldName: z.nullable(z.string()).optional(), + internalFieldName: z.nullable(z.string()).optional(), + ticketType: z.nullable(TicketType$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + connectionId: "connection_id", + connectionType: "connection_type", + ticketingProjectId: "ticketing_project_id", + externalFieldName: "external_field_name", + internalFieldName: "internal_field_name", + ticketType: "ticket_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TicketingProjectInboundFieldMapEntity$ { + /** @deprecated use `TicketingProjectInboundFieldMapEntity$inboundSchema` instead. */ + export const inboundSchema = + TicketingProjectInboundFieldMapEntity$inboundSchema; + /** @deprecated use `TicketingProjectInboundFieldMapEntity$outboundSchema` instead. */ + export const outboundSchema = + TicketingProjectInboundFieldMapEntity$outboundSchema; + /** @deprecated use `TicketingProjectInboundFieldMapEntity$Outbound` instead. */ + export type Outbound = TicketingProjectInboundFieldMapEntity$Outbound; +} + +export function ticketingProjectInboundFieldMapEntityToJSON( + ticketingProjectInboundFieldMapEntity: TicketingProjectInboundFieldMapEntity, +): string { + return JSON.stringify( + TicketingProjectInboundFieldMapEntity$outboundSchema.parse( + ticketingProjectInboundFieldMapEntity, + ), + ); +} + +export function ticketingProjectInboundFieldMapEntityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + TicketingProjectInboundFieldMapEntity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TicketingProjectInboundFieldMapEntity' from JSON`, + ); +} diff --git a/src/models/components/ticketingprojectinboundmappablefieldentity.ts b/src/models/components/ticketingprojectinboundmappablefieldentity.ts new file mode 100644 index 00000000..35e3a0ba --- /dev/null +++ b/src/models/components/ticketingprojectinboundmappablefieldentity.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Ticketing_ProjectInboundMappableFieldEntity model + */ +export type TicketingProjectInboundMappableFieldEntity = { + /** + * The ID of the field + */ + value?: string | null | undefined; + /** + * The human-readable name of the field + */ + label?: string | null | undefined; +}; + +/** @internal */ +export const TicketingProjectInboundMappableFieldEntity$inboundSchema: + z.ZodType = + z.object({ + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type TicketingProjectInboundMappableFieldEntity$Outbound = { + value?: string | null | undefined; + label?: string | null | undefined; +}; + +/** @internal */ +export const TicketingProjectInboundMappableFieldEntity$outboundSchema: + z.ZodType< + TicketingProjectInboundMappableFieldEntity$Outbound, + z.ZodTypeDef, + TicketingProjectInboundMappableFieldEntity + > = z.object({ + value: z.nullable(z.string()).optional(), + label: z.nullable(z.string()).optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TicketingProjectInboundMappableFieldEntity$ { + /** @deprecated use `TicketingProjectInboundMappableFieldEntity$inboundSchema` instead. */ + export const inboundSchema = + TicketingProjectInboundMappableFieldEntity$inboundSchema; + /** @deprecated use `TicketingProjectInboundMappableFieldEntity$outboundSchema` instead. */ + export const outboundSchema = + TicketingProjectInboundMappableFieldEntity$outboundSchema; + /** @deprecated use `TicketingProjectInboundMappableFieldEntity$Outbound` instead. */ + export type Outbound = TicketingProjectInboundMappableFieldEntity$Outbound; +} + +export function ticketingProjectInboundMappableFieldEntityToJSON( + ticketingProjectInboundMappableFieldEntity: + TicketingProjectInboundMappableFieldEntity, +): string { + return JSON.stringify( + TicketingProjectInboundMappableFieldEntity$outboundSchema.parse( + ticketingProjectInboundMappableFieldEntity, + ), + ); +} + +export function ticketingProjectInboundMappableFieldEntityFromJSON( + jsonString: string, +): SafeParseResult< + TicketingProjectInboundMappableFieldEntity, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + TicketingProjectInboundMappableFieldEntity$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'TicketingProjectInboundMappableFieldEntity' from JSON`, + ); +} diff --git a/src/models/components/ticketingprojectsprojectlistitementity.ts b/src/models/components/ticketingprojectsprojectlistitementity.ts index 4802a14a..7b3db090 100644 --- a/src/models/components/ticketingprojectsprojectlistitementity.ts +++ b/src/models/components/ticketingprojectsprojectlistitementity.ts @@ -8,34 +8,28 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - TicketingProjectConfigEntity, - TicketingProjectConfigEntity$inboundSchema, - TicketingProjectConfigEntity$Outbound, - TicketingProjectConfigEntity$outboundSchema, -} from "./ticketingprojectconfigentity.js"; + NullableTicketingProjectConfigEntity, + NullableTicketingProjectConfigEntity$inboundSchema, + NullableTicketingProjectConfigEntity$Outbound, + NullableTicketingProjectConfigEntity$outboundSchema, +} from "./nullableticketingprojectconfigentity.js"; import { - TicketingProjectFieldMapEntity, - TicketingProjectFieldMapEntity$inboundSchema, - TicketingProjectFieldMapEntity$Outbound, - TicketingProjectFieldMapEntity$outboundSchema, -} from "./ticketingprojectfieldmapentity.js"; + NullableTicketingProjectFieldMapEntity, + NullableTicketingProjectFieldMapEntity$inboundSchema, + NullableTicketingProjectFieldMapEntity$Outbound, + NullableTicketingProjectFieldMapEntity$outboundSchema, +} from "./nullableticketingprojectfieldmapentity.js"; /** * Ticketing_Projects_ProjectListItemEntity model */ export type TicketingProjectsProjectListItemEntity = { - id?: string | undefined; - name?: string | undefined; - /** - * Ticketing_ProjectConfigEntity model - */ - config?: TicketingProjectConfigEntity | undefined; - /** - * Ticketing_ProjectFieldMapEntity model - */ - fieldMap?: TicketingProjectFieldMapEntity | undefined; - updatedAt?: Date | undefined; - connectionSlug?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + config?: NullableTicketingProjectConfigEntity | null | undefined; + fieldMap?: NullableTicketingProjectFieldMapEntity | null | undefined; + updatedAt?: Date | null | undefined; + connectionSlug?: string | null | undefined; }; /** @internal */ @@ -44,13 +38,16 @@ export const TicketingProjectsProjectListItemEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - config: TicketingProjectConfigEntity$inboundSchema.optional(), - field_map: TicketingProjectFieldMapEntity$inboundSchema.optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + config: z.nullable(NullableTicketingProjectConfigEntity$inboundSchema) .optional(), - connection_slug: z.string().optional(), + field_map: z.nullable(NullableTicketingProjectFieldMapEntity$inboundSchema) + .optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + connection_slug: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "field_map": "fieldMap", @@ -61,12 +58,15 @@ export const TicketingProjectsProjectListItemEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingProjectsProjectListItemEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - config?: TicketingProjectConfigEntity$Outbound | undefined; - field_map?: TicketingProjectFieldMapEntity$Outbound | undefined; - updated_at?: string | undefined; - connection_slug?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + config?: NullableTicketingProjectConfigEntity$Outbound | null | undefined; + field_map?: + | NullableTicketingProjectFieldMapEntity$Outbound + | null + | undefined; + updated_at?: string | null | undefined; + connection_slug?: string | null | undefined; }; /** @internal */ @@ -75,12 +75,14 @@ export const TicketingProjectsProjectListItemEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingProjectsProjectListItemEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - config: TicketingProjectConfigEntity$outboundSchema.optional(), - fieldMap: TicketingProjectFieldMapEntity$outboundSchema.optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - connectionSlug: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + config: z.nullable(NullableTicketingProjectConfigEntity$outboundSchema) + .optional(), + fieldMap: z.nullable(NullableTicketingProjectFieldMapEntity$outboundSchema) + .optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + connectionSlug: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { fieldMap: "field_map", diff --git a/src/models/components/ticketingticketentity.ts b/src/models/components/ticketingticketentity.ts index 5df6f6a1..57fb83be 100644 --- a/src/models/components/ticketingticketentity.ts +++ b/src/models/components/ticketingticketentity.ts @@ -8,12 +8,6 @@ import { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AttachmentsLinkEntity, - AttachmentsLinkEntity$inboundSchema, - AttachmentsLinkEntity$Outbound, - AttachmentsLinkEntity$outboundSchema, -} from "./attachmentslinkentity.js"; import { AuthorEntity, AuthorEntity$inboundSchema, @@ -21,11 +15,23 @@ import { AuthorEntity$outboundSchema, } from "./authorentity.js"; import { - TicketingPriorityEntity, - TicketingPriorityEntity$inboundSchema, - TicketingPriorityEntity$Outbound, - TicketingPriorityEntity$outboundSchema, -} from "./ticketingpriorityentity.js"; + NullableAttachmentsLinkEntity, + NullableAttachmentsLinkEntity$inboundSchema, + NullableAttachmentsLinkEntity$Outbound, + NullableAttachmentsLinkEntity$outboundSchema, +} from "./nullableattachmentslinkentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; +import { + NullableTicketingPriorityEntity, + NullableTicketingPriorityEntity$inboundSchema, + NullableTicketingPriorityEntity$Outbound, + NullableTicketingPriorityEntity$outboundSchema, +} from "./nullableticketingpriorityentity.js"; export const TicketingTicketEntityState = { Open: "open", @@ -46,51 +52,45 @@ export type TicketingTicketEntityType = ClosedEnum< typeof TicketingTicketEntityType >; -export type TicketingTicketEntityAttachments = {}; +export type TicketingTicketEntityAttachment = {}; /** * Ticketing_TicketEntity model */ export type TicketingTicketEntity = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - state?: TicketingTicketEntityState | undefined; - type?: TicketingTicketEntityType | undefined; - assignees?: Array | undefined; - /** - * Ticketing_PriorityEntity model - */ - priority?: TicketingPriorityEntity | undefined; - createdBy?: AuthorEntity | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + state?: TicketingTicketEntityState | null | undefined; + type?: TicketingTicketEntityType | null | undefined; + assignees?: Array | null | undefined; + priority?: NullableTicketingPriorityEntity | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; /** * A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity */ - attachments?: Array | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - tagList?: Array | undefined; + attachments?: Array | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + tagList?: Array | null | undefined; /** * ID of incident that this ticket is related to */ - incidentId?: string | undefined; + incidentId?: string | null | undefined; /** * Name of incident that this ticket is related to */ - incidentName?: string | undefined; + incidentName?: string | null | undefined; /** * Milestone of incident that this ticket is related to */ - incidentCurrentMilestone?: string | undefined; + incidentCurrentMilestone?: string | null | undefined; /** * ID of task that this ticket is related to */ - taskId?: string | undefined; - dueAt?: Date | undefined; - /** - * Attachments_LinkEntity model - */ - link?: AttachmentsLinkEntity | undefined; + taskId?: string | null | undefined; + dueAt?: Date | null | undefined; + link?: NullableAttachmentsLinkEntity | null | undefined; }; /** @internal */ @@ -136,52 +136,52 @@ export namespace TicketingTicketEntityType$ { } /** @internal */ -export const TicketingTicketEntityAttachments$inboundSchema: z.ZodType< - TicketingTicketEntityAttachments, +export const TicketingTicketEntityAttachment$inboundSchema: z.ZodType< + TicketingTicketEntityAttachment, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ -export type TicketingTicketEntityAttachments$Outbound = {}; +export type TicketingTicketEntityAttachment$Outbound = {}; /** @internal */ -export const TicketingTicketEntityAttachments$outboundSchema: z.ZodType< - TicketingTicketEntityAttachments$Outbound, +export const TicketingTicketEntityAttachment$outboundSchema: z.ZodType< + TicketingTicketEntityAttachment$Outbound, z.ZodTypeDef, - TicketingTicketEntityAttachments + TicketingTicketEntityAttachment > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace TicketingTicketEntityAttachments$ { - /** @deprecated use `TicketingTicketEntityAttachments$inboundSchema` instead. */ - export const inboundSchema = TicketingTicketEntityAttachments$inboundSchema; - /** @deprecated use `TicketingTicketEntityAttachments$outboundSchema` instead. */ - export const outboundSchema = TicketingTicketEntityAttachments$outboundSchema; - /** @deprecated use `TicketingTicketEntityAttachments$Outbound` instead. */ - export type Outbound = TicketingTicketEntityAttachments$Outbound; +export namespace TicketingTicketEntityAttachment$ { + /** @deprecated use `TicketingTicketEntityAttachment$inboundSchema` instead. */ + export const inboundSchema = TicketingTicketEntityAttachment$inboundSchema; + /** @deprecated use `TicketingTicketEntityAttachment$outboundSchema` instead. */ + export const outboundSchema = TicketingTicketEntityAttachment$outboundSchema; + /** @deprecated use `TicketingTicketEntityAttachment$Outbound` instead. */ + export type Outbound = TicketingTicketEntityAttachment$Outbound; } -export function ticketingTicketEntityAttachmentsToJSON( - ticketingTicketEntityAttachments: TicketingTicketEntityAttachments, +export function ticketingTicketEntityAttachmentToJSON( + ticketingTicketEntityAttachment: TicketingTicketEntityAttachment, ): string { return JSON.stringify( - TicketingTicketEntityAttachments$outboundSchema.parse( - ticketingTicketEntityAttachments, + TicketingTicketEntityAttachment$outboundSchema.parse( + ticketingTicketEntityAttachment, ), ); } -export function ticketingTicketEntityAttachmentsFromJSON( +export function ticketingTicketEntityAttachmentFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => TicketingTicketEntityAttachments$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TicketingTicketEntityAttachments' from JSON`, + (x) => TicketingTicketEntityAttachment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'TicketingTicketEntityAttachment' from JSON`, ); } @@ -191,29 +191,33 @@ export const TicketingTicketEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - state: TicketingTicketEntityState$inboundSchema.optional(), - type: TicketingTicketEntityType$inboundSchema.optional(), - assignees: z.array(AuthorEntity$inboundSchema).optional(), - priority: TicketingPriorityEntity$inboundSchema.optional(), - created_by: AuthorEntity$inboundSchema.optional(), - attachments: z.array( - z.lazy(() => TicketingTicketEntityAttachments$inboundSchema), - ).optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(TicketingTicketEntityState$inboundSchema).optional(), + type: z.nullable(TicketingTicketEntityType$inboundSchema).optional(), + assignees: z.nullable(z.array(AuthorEntity$inboundSchema)).optional(), + priority: z.nullable(NullableTicketingPriorityEntity$inboundSchema) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - tag_list: z.array(z.string()).optional(), - incident_id: z.string().optional(), - incident_name: z.string().optional(), - incident_current_milestone: z.string().optional(), - task_id: z.string().optional(), - due_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - link: AttachmentsLinkEntity$inboundSchema.optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + attachments: z.nullable( + z.array(z.lazy(() => TicketingTicketEntityAttachment$inboundSchema)), + ).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + incident_id: z.nullable(z.string()).optional(), + incident_name: z.nullable(z.string()).optional(), + incident_current_milestone: z.nullable(z.string()).optional(), + task_id: z.nullable(z.string()).optional(), + due_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + link: z.nullable(NullableAttachmentsLinkEntity$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "created_by": "createdBy", @@ -230,24 +234,27 @@ export const TicketingTicketEntity$inboundSchema: z.ZodType< /** @internal */ export type TicketingTicketEntity$Outbound = { - id?: string | undefined; - summary?: string | undefined; - description?: string | undefined; - state?: string | undefined; - type?: string | undefined; - assignees?: Array | undefined; - priority?: TicketingPriorityEntity$Outbound | undefined; - created_by?: AuthorEntity$Outbound | undefined; - attachments?: Array | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - tag_list?: Array | undefined; - incident_id?: string | undefined; - incident_name?: string | undefined; - incident_current_milestone?: string | undefined; - task_id?: string | undefined; - due_at?: string | undefined; - link?: AttachmentsLinkEntity$Outbound | undefined; + id?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + type?: string | null | undefined; + assignees?: Array | null | undefined; + priority?: NullableTicketingPriorityEntity$Outbound | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + attachments?: + | Array + | null + | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + tag_list?: Array | null | undefined; + incident_id?: string | null | undefined; + incident_name?: string | null | undefined; + incident_current_milestone?: string | null | undefined; + task_id?: string | null | undefined; + due_at?: string | null | undefined; + link?: NullableAttachmentsLinkEntity$Outbound | null | undefined; }; /** @internal */ @@ -256,26 +263,27 @@ export const TicketingTicketEntity$outboundSchema: z.ZodType< z.ZodTypeDef, TicketingTicketEntity > = z.object({ - id: z.string().optional(), - summary: z.string().optional(), - description: z.string().optional(), - state: TicketingTicketEntityState$outboundSchema.optional(), - type: TicketingTicketEntityType$outboundSchema.optional(), - assignees: z.array(AuthorEntity$outboundSchema).optional(), - priority: TicketingPriorityEntity$outboundSchema.optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - attachments: z.array( - z.lazy(() => TicketingTicketEntityAttachments$outboundSchema), + id: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(TicketingTicketEntityState$outboundSchema).optional(), + type: z.nullable(TicketingTicketEntityType$outboundSchema).optional(), + assignees: z.nullable(z.array(AuthorEntity$outboundSchema)).optional(), + priority: z.nullable(NullableTicketingPriorityEntity$outboundSchema) + .optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + attachments: z.nullable( + z.array(z.lazy(() => TicketingTicketEntityAttachment$outboundSchema)), ).optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - tagList: z.array(z.string()).optional(), - incidentId: z.string().optional(), - incidentName: z.string().optional(), - incidentCurrentMilestone: z.string().optional(), - taskId: z.string().optional(), - dueAt: z.date().transform(v => v.toISOString()).optional(), - link: AttachmentsLinkEntity$outboundSchema.optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + incidentId: z.nullable(z.string()).optional(), + incidentName: z.nullable(z.string()).optional(), + incidentCurrentMilestone: z.nullable(z.string()).optional(), + taskId: z.nullable(z.string()).optional(), + dueAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + link: z.nullable(NullableAttachmentsLinkEntity$outboundSchema).optional(), }).transform((v) => { return remap$(v, { createdBy: "created_by", diff --git a/src/models/components/updateawscloudtrailbatch.ts b/src/models/components/updateawscloudtrailbatch.ts new file mode 100644 index 00000000..92ab8491 --- /dev/null +++ b/src/models/components/updateawscloudtrailbatch.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a CloudTrail batch with new information. + */ +export type UpdateAwsCloudtrailBatch = { + eventsCreated?: number | null | undefined; + status?: string | null | undefined; + error?: string | null | undefined; + endsAt?: Date | null | undefined; +}; + +/** @internal */ +export const UpdateAwsCloudtrailBatch$inboundSchema: z.ZodType< + UpdateAwsCloudtrailBatch, + z.ZodTypeDef, + unknown +> = z.object({ + events_created: z.nullable(z.number().int()).optional(), + status: z.nullable(z.string()).optional(), + error: z.nullable(z.string()).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "events_created": "eventsCreated", + "ends_at": "endsAt", + }); +}); + +/** @internal */ +export type UpdateAwsCloudtrailBatch$Outbound = { + events_created?: number | null | undefined; + status?: string | null | undefined; + error?: string | null | undefined; + ends_at?: string | null | undefined; +}; + +/** @internal */ +export const UpdateAwsCloudtrailBatch$outboundSchema: z.ZodType< + UpdateAwsCloudtrailBatch$Outbound, + z.ZodTypeDef, + UpdateAwsCloudtrailBatch +> = z.object({ + eventsCreated: z.nullable(z.number().int()).optional(), + status: z.nullable(z.string()).optional(), + error: z.nullable(z.string()).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + eventsCreated: "events_created", + endsAt: "ends_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateAwsCloudtrailBatch$ { + /** @deprecated use `UpdateAwsCloudtrailBatch$inboundSchema` instead. */ + export const inboundSchema = UpdateAwsCloudtrailBatch$inboundSchema; + /** @deprecated use `UpdateAwsCloudtrailBatch$outboundSchema` instead. */ + export const outboundSchema = UpdateAwsCloudtrailBatch$outboundSchema; + /** @deprecated use `UpdateAwsCloudtrailBatch$Outbound` instead. */ + export type Outbound = UpdateAwsCloudtrailBatch$Outbound; +} + +export function updateAwsCloudtrailBatchToJSON( + updateAwsCloudtrailBatch: UpdateAwsCloudtrailBatch, +): string { + return JSON.stringify( + UpdateAwsCloudtrailBatch$outboundSchema.parse(updateAwsCloudtrailBatch), + ); +} + +export function updateAwsCloudtrailBatchFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateAwsCloudtrailBatch$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAwsCloudtrailBatch' from JSON`, + ); +} diff --git a/src/models/components/updateawsconnection.ts b/src/models/components/updateawsconnection.ts new file mode 100644 index 00000000..f0ba2460 --- /dev/null +++ b/src/models/components/updateawsconnection.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update the AWS connection with the provided data. + */ +export type UpdateAwsConnection = { + awsAccountId?: string | null | undefined; + targetArn?: string | null | undefined; + connectionStatus?: string | null | undefined; +}; + +/** @internal */ +export const UpdateAwsConnection$inboundSchema: z.ZodType< + UpdateAwsConnection, + z.ZodTypeDef, + unknown +> = z.object({ + aws_account_id: z.nullable(z.string()).optional(), + target_arn: z.nullable(z.string()).optional(), + connection_status: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "aws_account_id": "awsAccountId", + "target_arn": "targetArn", + "connection_status": "connectionStatus", + }); +}); + +/** @internal */ +export type UpdateAwsConnection$Outbound = { + aws_account_id?: string | null | undefined; + target_arn?: string | null | undefined; + connection_status?: string | null | undefined; +}; + +/** @internal */ +export const UpdateAwsConnection$outboundSchema: z.ZodType< + UpdateAwsConnection$Outbound, + z.ZodTypeDef, + UpdateAwsConnection +> = z.object({ + awsAccountId: z.nullable(z.string()).optional(), + targetArn: z.nullable(z.string()).optional(), + connectionStatus: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + awsAccountId: "aws_account_id", + targetArn: "target_arn", + connectionStatus: "connection_status", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateAwsConnection$ { + /** @deprecated use `UpdateAwsConnection$inboundSchema` instead. */ + export const inboundSchema = UpdateAwsConnection$inboundSchema; + /** @deprecated use `UpdateAwsConnection$outboundSchema` instead. */ + export const outboundSchema = UpdateAwsConnection$outboundSchema; + /** @deprecated use `UpdateAwsConnection$Outbound` instead. */ + export type Outbound = UpdateAwsConnection$Outbound; +} + +export function updateAwsConnectionToJSON( + updateAwsConnection: UpdateAwsConnection, +): string { + return JSON.stringify( + UpdateAwsConnection$outboundSchema.parse(updateAwsConnection), + ); +} + +export function updateAwsConnectionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateAwsConnection$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAwsConnection' from JSON`, + ); +} diff --git a/src/models/components/updatechange.ts b/src/models/components/updatechange.ts new file mode 100644 index 00000000..3618ed6d --- /dev/null +++ b/src/models/components/updatechange.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a change entry + */ +export type UpdateChange = { + summary?: string | null | undefined; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; +}; + +/** @internal */ +export const UpdateChange$inboundSchema: z.ZodType< + UpdateChange, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), +}); + +/** @internal */ +export type UpdateChange$Outbound = { + summary?: string | null | undefined; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; +}; + +/** @internal */ +export const UpdateChange$outboundSchema: z.ZodType< + UpdateChange$Outbound, + z.ZodTypeDef, + UpdateChange +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChange$ { + /** @deprecated use `UpdateChange$inboundSchema` instead. */ + export const inboundSchema = UpdateChange$inboundSchema; + /** @deprecated use `UpdateChange$outboundSchema` instead. */ + export const outboundSchema = UpdateChange$outboundSchema; + /** @deprecated use `UpdateChange$Outbound` instead. */ + export type Outbound = UpdateChange$Outbound; +} + +export function updateChangeToJSON(updateChange: UpdateChange): string { + return JSON.stringify(UpdateChange$outboundSchema.parse(updateChange)); +} + +export function updateChangeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateChange$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateChange' from JSON`, + ); +} diff --git a/src/models/components/updatechangeevent.ts b/src/models/components/updatechangeevent.ts new file mode 100644 index 00000000..5276c1f7 --- /dev/null +++ b/src/models/components/updatechangeevent.ts @@ -0,0 +1,212 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const UpdateChangeEventType = { + Link: "link", +} as const; +export type UpdateChangeEventType = ClosedEnum; + +export type UpdateChangeEventAttachment = { + type: UpdateChangeEventType; +}; + +/** + * Update a change event + */ +export type UpdateChangeEvent = { + summary?: string | null | undefined; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + startsAt?: Date | null | undefined; + endsAt?: Date | null | undefined; + /** + * An array of environment IDs (setting this will overwrite the current environments) + */ + environments?: Array | null | undefined; + /** + * An array of service IDs (setting this will overwrite the current services) + */ + services?: Array | null | undefined; + /** + * JSON objects representing attachments, see attachments documentation for the schema + */ + attachments?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateChangeEventType$inboundSchema: z.ZodNativeEnum< + typeof UpdateChangeEventType +> = z.nativeEnum(UpdateChangeEventType); + +/** @internal */ +export const UpdateChangeEventType$outboundSchema: z.ZodNativeEnum< + typeof UpdateChangeEventType +> = UpdateChangeEventType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChangeEventType$ { + /** @deprecated use `UpdateChangeEventType$inboundSchema` instead. */ + export const inboundSchema = UpdateChangeEventType$inboundSchema; + /** @deprecated use `UpdateChangeEventType$outboundSchema` instead. */ + export const outboundSchema = UpdateChangeEventType$outboundSchema; +} + +/** @internal */ +export const UpdateChangeEventAttachment$inboundSchema: z.ZodType< + UpdateChangeEventAttachment, + z.ZodTypeDef, + unknown +> = z.object({ + type: UpdateChangeEventType$inboundSchema, +}); + +/** @internal */ +export type UpdateChangeEventAttachment$Outbound = { + type: string; +}; + +/** @internal */ +export const UpdateChangeEventAttachment$outboundSchema: z.ZodType< + UpdateChangeEventAttachment$Outbound, + z.ZodTypeDef, + UpdateChangeEventAttachment +> = z.object({ + type: UpdateChangeEventType$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChangeEventAttachment$ { + /** @deprecated use `UpdateChangeEventAttachment$inboundSchema` instead. */ + export const inboundSchema = UpdateChangeEventAttachment$inboundSchema; + /** @deprecated use `UpdateChangeEventAttachment$outboundSchema` instead. */ + export const outboundSchema = UpdateChangeEventAttachment$outboundSchema; + /** @deprecated use `UpdateChangeEventAttachment$Outbound` instead. */ + export type Outbound = UpdateChangeEventAttachment$Outbound; +} + +export function updateChangeEventAttachmentToJSON( + updateChangeEventAttachment: UpdateChangeEventAttachment, +): string { + return JSON.stringify( + UpdateChangeEventAttachment$outboundSchema.parse( + updateChangeEventAttachment, + ), + ); +} + +export function updateChangeEventAttachmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateChangeEventAttachment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateChangeEventAttachment' from JSON`, + ); +} + +/** @internal */ +export const UpdateChangeEvent$inboundSchema: z.ZodType< + UpdateChangeEvent, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + environments: z.nullable(z.array(z.string())).optional(), + services: z.nullable(z.array(z.string())).optional(), + attachments: z.nullable( + z.array(z.lazy(() => UpdateChangeEventAttachment$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "starts_at": "startsAt", + "ends_at": "endsAt", + }); +}); + +/** @internal */ +export type UpdateChangeEvent$Outbound = { + summary?: string | null | undefined; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + environments?: Array | null | undefined; + services?: Array | null | undefined; + attachments?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateChangeEvent$outboundSchema: z.ZodType< + UpdateChangeEvent$Outbound, + z.ZodTypeDef, + UpdateChangeEvent +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + environments: z.nullable(z.array(z.string())).optional(), + services: z.nullable(z.array(z.string())).optional(), + attachments: z.nullable( + z.array(z.lazy(() => UpdateChangeEventAttachment$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + startsAt: "starts_at", + endsAt: "ends_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChangeEvent$ { + /** @deprecated use `UpdateChangeEvent$inboundSchema` instead. */ + export const inboundSchema = UpdateChangeEvent$inboundSchema; + /** @deprecated use `UpdateChangeEvent$outboundSchema` instead. */ + export const outboundSchema = UpdateChangeEvent$outboundSchema; + /** @deprecated use `UpdateChangeEvent$Outbound` instead. */ + export type Outbound = UpdateChangeEvent$Outbound; +} + +export function updateChangeEventToJSON( + updateChangeEvent: UpdateChangeEvent, +): string { + return JSON.stringify( + UpdateChangeEvent$outboundSchema.parse(updateChangeEvent), + ); +} + +export function updateChangeEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateChangeEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateChangeEvent' from JSON`, + ); +} diff --git a/src/models/components/updatechangeidentity.ts b/src/models/components/updatechangeidentity.ts new file mode 100644 index 00000000..a758816d --- /dev/null +++ b/src/models/components/updatechangeidentity.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update an identity for the change entry + */ +export type UpdateChangeIdentity = { + type: string; + value: string; +}; + +/** @internal */ +export const UpdateChangeIdentity$inboundSchema: z.ZodType< + UpdateChangeIdentity, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + value: z.string(), +}); + +/** @internal */ +export type UpdateChangeIdentity$Outbound = { + type: string; + value: string; +}; + +/** @internal */ +export const UpdateChangeIdentity$outboundSchema: z.ZodType< + UpdateChangeIdentity$Outbound, + z.ZodTypeDef, + UpdateChangeIdentity +> = z.object({ + type: z.string(), + value: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChangeIdentity$ { + /** @deprecated use `UpdateChangeIdentity$inboundSchema` instead. */ + export const inboundSchema = UpdateChangeIdentity$inboundSchema; + /** @deprecated use `UpdateChangeIdentity$outboundSchema` instead. */ + export const outboundSchema = UpdateChangeIdentity$outboundSchema; + /** @deprecated use `UpdateChangeIdentity$Outbound` instead. */ + export type Outbound = UpdateChangeIdentity$Outbound; +} + +export function updateChangeIdentityToJSON( + updateChangeIdentity: UpdateChangeIdentity, +): string { + return JSON.stringify( + UpdateChangeIdentity$outboundSchema.parse(updateChangeIdentity), + ); +} + +export function updateChangeIdentityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateChangeIdentity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateChangeIdentity' from JSON`, + ); +} diff --git a/src/models/components/updatechecklisttemplate.ts b/src/models/components/updatechecklisttemplate.ts new file mode 100644 index 00000000..78126c24 --- /dev/null +++ b/src/models/components/updatechecklisttemplate.ts @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateChecklistTemplateCheck = { + /** + * Specify the check ID when updating an already existing check + */ + id?: string | null | undefined; + /** + * The description of the check + */ + description?: string | null | undefined; + /** + * The name of the check + */ + name: string; +}; + +export type UpdateChecklistTemplateConnectedService = { + id: string; + /** + * Set to `true` to remove checklist from service + */ + remove?: boolean | null | undefined; +}; + +/** + * Update a checklist templates attributes + */ +export type UpdateChecklistTemplate = { + name?: string | null | undefined; + description?: string | null | undefined; + /** + * An array of checks for the checklist template + */ + checks?: Array | null | undefined; + /** + * The ID of the Team that owns the checklist template + */ + teamId?: string | null | undefined; + /** + * Array of service IDs to attach checklist template to + */ + connectedServices?: + | Array + | null + | undefined; + /** + * If set to true, any services tagged on the checklist that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the services + */ + removeRemainingConnectedServices?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateChecklistTemplateCheck$inboundSchema: z.ZodType< + UpdateChecklistTemplateCheck, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + name: z.string(), +}); + +/** @internal */ +export type UpdateChecklistTemplateCheck$Outbound = { + id?: string | null | undefined; + description?: string | null | undefined; + name: string; +}; + +/** @internal */ +export const UpdateChecklistTemplateCheck$outboundSchema: z.ZodType< + UpdateChecklistTemplateCheck$Outbound, + z.ZodTypeDef, + UpdateChecklistTemplateCheck +> = z.object({ + id: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + name: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChecklistTemplateCheck$ { + /** @deprecated use `UpdateChecklistTemplateCheck$inboundSchema` instead. */ + export const inboundSchema = UpdateChecklistTemplateCheck$inboundSchema; + /** @deprecated use `UpdateChecklistTemplateCheck$outboundSchema` instead. */ + export const outboundSchema = UpdateChecklistTemplateCheck$outboundSchema; + /** @deprecated use `UpdateChecklistTemplateCheck$Outbound` instead. */ + export type Outbound = UpdateChecklistTemplateCheck$Outbound; +} + +export function updateChecklistTemplateCheckToJSON( + updateChecklistTemplateCheck: UpdateChecklistTemplateCheck, +): string { + return JSON.stringify( + UpdateChecklistTemplateCheck$outboundSchema.parse( + updateChecklistTemplateCheck, + ), + ); +} + +export function updateChecklistTemplateCheckFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateChecklistTemplateCheck$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateChecklistTemplateCheck' from JSON`, + ); +} + +/** @internal */ +export const UpdateChecklistTemplateConnectedService$inboundSchema: z.ZodType< + UpdateChecklistTemplateConnectedService, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type UpdateChecklistTemplateConnectedService$Outbound = { + id: string; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateChecklistTemplateConnectedService$outboundSchema: z.ZodType< + UpdateChecklistTemplateConnectedService$Outbound, + z.ZodTypeDef, + UpdateChecklistTemplateConnectedService +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChecklistTemplateConnectedService$ { + /** @deprecated use `UpdateChecklistTemplateConnectedService$inboundSchema` instead. */ + export const inboundSchema = + UpdateChecklistTemplateConnectedService$inboundSchema; + /** @deprecated use `UpdateChecklistTemplateConnectedService$outboundSchema` instead. */ + export const outboundSchema = + UpdateChecklistTemplateConnectedService$outboundSchema; + /** @deprecated use `UpdateChecklistTemplateConnectedService$Outbound` instead. */ + export type Outbound = UpdateChecklistTemplateConnectedService$Outbound; +} + +export function updateChecklistTemplateConnectedServiceToJSON( + updateChecklistTemplateConnectedService: + UpdateChecklistTemplateConnectedService, +): string { + return JSON.stringify( + UpdateChecklistTemplateConnectedService$outboundSchema.parse( + updateChecklistTemplateConnectedService, + ), + ); +} + +export function updateChecklistTemplateConnectedServiceFromJSON( + jsonString: string, +): SafeParseResult< + UpdateChecklistTemplateConnectedService, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateChecklistTemplateConnectedService$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateChecklistTemplateConnectedService' from JSON`, + ); +} + +/** @internal */ +export const UpdateChecklistTemplate$inboundSchema: z.ZodType< + UpdateChecklistTemplate, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + checks: z.nullable( + z.array(z.lazy(() => UpdateChecklistTemplateCheck$inboundSchema)), + ).optional(), + team_id: z.nullable(z.string()).optional(), + connected_services: z.nullable( + z.array( + z.lazy(() => UpdateChecklistTemplateConnectedService$inboundSchema), + ), + ).optional(), + remove_remaining_connected_services: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "connected_services": "connectedServices", + "remove_remaining_connected_services": "removeRemainingConnectedServices", + }); +}); + +/** @internal */ +export type UpdateChecklistTemplate$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + checks?: Array | null | undefined; + team_id?: string | null | undefined; + connected_services?: + | Array + | null + | undefined; + remove_remaining_connected_services?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateChecklistTemplate$outboundSchema: z.ZodType< + UpdateChecklistTemplate$Outbound, + z.ZodTypeDef, + UpdateChecklistTemplate +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + checks: z.nullable( + z.array(z.lazy(() => UpdateChecklistTemplateCheck$outboundSchema)), + ).optional(), + teamId: z.nullable(z.string()).optional(), + connectedServices: z.nullable( + z.array( + z.lazy(() => UpdateChecklistTemplateConnectedService$outboundSchema), + ), + ).optional(), + removeRemainingConnectedServices: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + connectedServices: "connected_services", + removeRemainingConnectedServices: "remove_remaining_connected_services", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateChecklistTemplate$ { + /** @deprecated use `UpdateChecklistTemplate$inboundSchema` instead. */ + export const inboundSchema = UpdateChecklistTemplate$inboundSchema; + /** @deprecated use `UpdateChecklistTemplate$outboundSchema` instead. */ + export const outboundSchema = UpdateChecklistTemplate$outboundSchema; + /** @deprecated use `UpdateChecklistTemplate$Outbound` instead. */ + export type Outbound = UpdateChecklistTemplate$Outbound; +} + +export function updateChecklistTemplateToJSON( + updateChecklistTemplate: UpdateChecklistTemplate, +): string { + return JSON.stringify( + UpdateChecklistTemplate$outboundSchema.parse(updateChecklistTemplate), + ); +} + +export function updateChecklistTemplateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateChecklistTemplate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateChecklistTemplate' from JSON`, + ); +} diff --git a/src/models/components/updatecomment.ts b/src/models/components/updatecomment.ts new file mode 100644 index 00000000..5073ac5b --- /dev/null +++ b/src/models/components/updatecomment.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * ALPHA - Update a comment's attributes + */ +export type UpdateComment = { + /** + * Text body of comment + */ + body?: string | null | undefined; +}; + +/** @internal */ +export const UpdateComment$inboundSchema: z.ZodType< + UpdateComment, + z.ZodTypeDef, + unknown +> = z.object({ + body: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateComment$Outbound = { + body?: string | null | undefined; +}; + +/** @internal */ +export const UpdateComment$outboundSchema: z.ZodType< + UpdateComment$Outbound, + z.ZodTypeDef, + UpdateComment +> = z.object({ + body: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateComment$ { + /** @deprecated use `UpdateComment$inboundSchema` instead. */ + export const inboundSchema = UpdateComment$inboundSchema; + /** @deprecated use `UpdateComment$outboundSchema` instead. */ + export const outboundSchema = UpdateComment$outboundSchema; + /** @deprecated use `UpdateComment$Outbound` instead. */ + export type Outbound = UpdateComment$Outbound; +} + +export function updateCommentToJSON(updateComment: UpdateComment): string { + return JSON.stringify(UpdateComment$outboundSchema.parse(updateComment)); +} + +export function updateCommentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateComment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateComment' from JSON`, + ); +} diff --git a/src/models/components/updatecustomfielddefinition.ts b/src/models/components/updatecustomfielddefinition.ts new file mode 100644 index 00000000..91ff8761 --- /dev/null +++ b/src/models/components/updatecustomfielddefinition.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a single custom field definition + */ +export type UpdateCustomFieldDefinition = { + description?: string | null | undefined; + displayName?: string | null | undefined; + permissibleValues?: Array | null | undefined; + required?: boolean | null | undefined; + /** + * An optional milestone ID to specify when the field should become required, if `required` is set to `true`. If not provided, required fields are always required. + */ + requiredAtMilestoneId?: string | null | undefined; +}; + +/** @internal */ +export const UpdateCustomFieldDefinition$inboundSchema: z.ZodType< + UpdateCustomFieldDefinition, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.nullable(z.string()).optional(), + display_name: z.nullable(z.string()).optional(), + permissible_values: z.nullable(z.array(z.string())).optional(), + required: z.nullable(z.boolean()).optional(), + required_at_milestone_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "display_name": "displayName", + "permissible_values": "permissibleValues", + "required_at_milestone_id": "requiredAtMilestoneId", + }); +}); + +/** @internal */ +export type UpdateCustomFieldDefinition$Outbound = { + description?: string | null | undefined; + display_name?: string | null | undefined; + permissible_values?: Array | null | undefined; + required?: boolean | null | undefined; + required_at_milestone_id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateCustomFieldDefinition$outboundSchema: z.ZodType< + UpdateCustomFieldDefinition$Outbound, + z.ZodTypeDef, + UpdateCustomFieldDefinition +> = z.object({ + description: z.nullable(z.string()).optional(), + displayName: z.nullable(z.string()).optional(), + permissibleValues: z.nullable(z.array(z.string())).optional(), + required: z.nullable(z.boolean()).optional(), + requiredAtMilestoneId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + displayName: "display_name", + permissibleValues: "permissible_values", + requiredAtMilestoneId: "required_at_milestone_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateCustomFieldDefinition$ { + /** @deprecated use `UpdateCustomFieldDefinition$inboundSchema` instead. */ + export const inboundSchema = UpdateCustomFieldDefinition$inboundSchema; + /** @deprecated use `UpdateCustomFieldDefinition$outboundSchema` instead. */ + export const outboundSchema = UpdateCustomFieldDefinition$outboundSchema; + /** @deprecated use `UpdateCustomFieldDefinition$Outbound` instead. */ + export type Outbound = UpdateCustomFieldDefinition$Outbound; +} + +export function updateCustomFieldDefinitionToJSON( + updateCustomFieldDefinition: UpdateCustomFieldDefinition, +): string { + return JSON.stringify( + UpdateCustomFieldDefinition$outboundSchema.parse( + updateCustomFieldDefinition, + ), + ); +} + +export function updateCustomFieldDefinitionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateCustomFieldDefinition$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateCustomFieldDefinition' from JSON`, + ); +} diff --git a/src/models/components/updateenvironment.ts b/src/models/components/updateenvironment.ts new file mode 100644 index 00000000..55e437a0 --- /dev/null +++ b/src/models/components/updateenvironment.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a environments attributes + */ +export type UpdateEnvironment = { + name: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const UpdateEnvironment$inboundSchema: z.ZodType< + UpdateEnvironment, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateEnvironment$Outbound = { + name: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const UpdateEnvironment$outboundSchema: z.ZodType< + UpdateEnvironment$Outbound, + z.ZodTypeDef, + UpdateEnvironment +> = z.object({ + name: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateEnvironment$ { + /** @deprecated use `UpdateEnvironment$inboundSchema` instead. */ + export const inboundSchema = UpdateEnvironment$inboundSchema; + /** @deprecated use `UpdateEnvironment$outboundSchema` instead. */ + export const outboundSchema = UpdateEnvironment$outboundSchema; + /** @deprecated use `UpdateEnvironment$Outbound` instead. */ + export type Outbound = UpdateEnvironment$Outbound; +} + +export function updateEnvironmentToJSON( + updateEnvironment: UpdateEnvironment, +): string { + return JSON.stringify( + UpdateEnvironment$outboundSchema.parse(updateEnvironment), + ); +} + +export function updateEnvironmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateEnvironment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateEnvironment' from JSON`, + ); +} diff --git a/src/models/components/updatefunctionality.ts b/src/models/components/updatefunctionality.ts new file mode 100644 index 00000000..b43be035 --- /dev/null +++ b/src/models/components/updatefunctionality.ts @@ -0,0 +1,573 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateFunctionalityService = { + /** + * ID of a service + */ + id: string; + /** + * Set to true if you want to remove the given service from the functionality + */ + remove?: boolean | null | undefined; +}; + +export type UpdateFunctionalityLink = { + /** + * URL + */ + hrefUrl: string; + /** + * Short name used to display and identify this link + */ + name: string; + /** + * An optional URL to an icon representing this link + */ + iconUrl?: string | null | undefined; + /** + * If you are trying to remove a link, set this to 'true' + */ + remove?: boolean | null | undefined; + /** + * If updating an existing link, specify it's id. + */ + id?: string | null | undefined; +}; + +/** + * An object representing a Team that owns the functionality + */ +export type UpdateFunctionalityOwner = { + id: string; +}; + +export type UpdateFunctionalityTeam = { + id: string; + /** + * If you are trying to remove a team from a functionality, set this to 'true' + */ + remove?: boolean | null | undefined; +}; + +export type UpdateFunctionalityExternalResource = { + remoteId: string; + /** + * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, statuspage, victorops. Not required if the resource has already been imported. + */ + connectionType?: string | null | undefined; + /** + * If you are trying to remove an external resource from a service, set this to 'true'. + */ + remove?: boolean | null | undefined; +}; + +/** + * Update a functionalities attributes + */ +export type UpdateFunctionality = { + name?: string | null | undefined; + description?: string | null | undefined; + services?: Array | null | undefined; + /** + * An array of links to associate with this functionality. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. + */ + links?: Array | null | undefined; + /** + * An object representing a Team that owns the functionality + */ + owner?: UpdateFunctionalityOwner | null | undefined; + /** + * If you are trying to remove a team as an owner from a functionality, set this to 'true' + */ + removeOwner?: boolean | null | undefined; + /** + * An array of teams to attach to this functionality. + */ + teams?: Array | null | undefined; + /** + * If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams + */ + removeRemainingTeams?: boolean | null | undefined; + /** + * An array of external resources to attach to this service. + */ + externalResources?: + | Array + | null + | undefined; + /** + * If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources + */ + removeRemainingExternalResources?: boolean | null | undefined; + /** + * A hash of label keys and values + */ + labels?: { [k: string]: string } | null | undefined; + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + /** + * Set this to true if you want to remove all of the services that are not included in the services array from the functionality + */ + removeRemainingServices?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateFunctionalityService$inboundSchema: z.ZodType< + UpdateFunctionalityService, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type UpdateFunctionalityService$Outbound = { + id: string; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateFunctionalityService$outboundSchema: z.ZodType< + UpdateFunctionalityService$Outbound, + z.ZodTypeDef, + UpdateFunctionalityService +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateFunctionalityService$ { + /** @deprecated use `UpdateFunctionalityService$inboundSchema` instead. */ + export const inboundSchema = UpdateFunctionalityService$inboundSchema; + /** @deprecated use `UpdateFunctionalityService$outboundSchema` instead. */ + export const outboundSchema = UpdateFunctionalityService$outboundSchema; + /** @deprecated use `UpdateFunctionalityService$Outbound` instead. */ + export type Outbound = UpdateFunctionalityService$Outbound; +} + +export function updateFunctionalityServiceToJSON( + updateFunctionalityService: UpdateFunctionalityService, +): string { + return JSON.stringify( + UpdateFunctionalityService$outboundSchema.parse(updateFunctionalityService), + ); +} + +export function updateFunctionalityServiceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateFunctionalityService$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateFunctionalityService' from JSON`, + ); +} + +/** @internal */ +export const UpdateFunctionalityLink$inboundSchema: z.ZodType< + UpdateFunctionalityLink, + z.ZodTypeDef, + unknown +> = z.object({ + href_url: z.string(), + name: z.string(), + icon_url: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), + id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "href_url": "hrefUrl", + "icon_url": "iconUrl", + }); +}); + +/** @internal */ +export type UpdateFunctionalityLink$Outbound = { + href_url: string; + name: string; + icon_url?: string | null | undefined; + remove?: boolean | null | undefined; + id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateFunctionalityLink$outboundSchema: z.ZodType< + UpdateFunctionalityLink$Outbound, + z.ZodTypeDef, + UpdateFunctionalityLink +> = z.object({ + hrefUrl: z.string(), + name: z.string(), + iconUrl: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), + id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + hrefUrl: "href_url", + iconUrl: "icon_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateFunctionalityLink$ { + /** @deprecated use `UpdateFunctionalityLink$inboundSchema` instead. */ + export const inboundSchema = UpdateFunctionalityLink$inboundSchema; + /** @deprecated use `UpdateFunctionalityLink$outboundSchema` instead. */ + export const outboundSchema = UpdateFunctionalityLink$outboundSchema; + /** @deprecated use `UpdateFunctionalityLink$Outbound` instead. */ + export type Outbound = UpdateFunctionalityLink$Outbound; +} + +export function updateFunctionalityLinkToJSON( + updateFunctionalityLink: UpdateFunctionalityLink, +): string { + return JSON.stringify( + UpdateFunctionalityLink$outboundSchema.parse(updateFunctionalityLink), + ); +} + +export function updateFunctionalityLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateFunctionalityLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateFunctionalityLink' from JSON`, + ); +} + +/** @internal */ +export const UpdateFunctionalityOwner$inboundSchema: z.ZodType< + UpdateFunctionalityOwner, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type UpdateFunctionalityOwner$Outbound = { + id: string; +}; + +/** @internal */ +export const UpdateFunctionalityOwner$outboundSchema: z.ZodType< + UpdateFunctionalityOwner$Outbound, + z.ZodTypeDef, + UpdateFunctionalityOwner +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateFunctionalityOwner$ { + /** @deprecated use `UpdateFunctionalityOwner$inboundSchema` instead. */ + export const inboundSchema = UpdateFunctionalityOwner$inboundSchema; + /** @deprecated use `UpdateFunctionalityOwner$outboundSchema` instead. */ + export const outboundSchema = UpdateFunctionalityOwner$outboundSchema; + /** @deprecated use `UpdateFunctionalityOwner$Outbound` instead. */ + export type Outbound = UpdateFunctionalityOwner$Outbound; +} + +export function updateFunctionalityOwnerToJSON( + updateFunctionalityOwner: UpdateFunctionalityOwner, +): string { + return JSON.stringify( + UpdateFunctionalityOwner$outboundSchema.parse(updateFunctionalityOwner), + ); +} + +export function updateFunctionalityOwnerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateFunctionalityOwner$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateFunctionalityOwner' from JSON`, + ); +} + +/** @internal */ +export const UpdateFunctionalityTeam$inboundSchema: z.ZodType< + UpdateFunctionalityTeam, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type UpdateFunctionalityTeam$Outbound = { + id: string; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateFunctionalityTeam$outboundSchema: z.ZodType< + UpdateFunctionalityTeam$Outbound, + z.ZodTypeDef, + UpdateFunctionalityTeam +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateFunctionalityTeam$ { + /** @deprecated use `UpdateFunctionalityTeam$inboundSchema` instead. */ + export const inboundSchema = UpdateFunctionalityTeam$inboundSchema; + /** @deprecated use `UpdateFunctionalityTeam$outboundSchema` instead. */ + export const outboundSchema = UpdateFunctionalityTeam$outboundSchema; + /** @deprecated use `UpdateFunctionalityTeam$Outbound` instead. */ + export type Outbound = UpdateFunctionalityTeam$Outbound; +} + +export function updateFunctionalityTeamToJSON( + updateFunctionalityTeam: UpdateFunctionalityTeam, +): string { + return JSON.stringify( + UpdateFunctionalityTeam$outboundSchema.parse(updateFunctionalityTeam), + ); +} + +export function updateFunctionalityTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateFunctionalityTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateFunctionalityTeam' from JSON`, + ); +} + +/** @internal */ +export const UpdateFunctionalityExternalResource$inboundSchema: z.ZodType< + UpdateFunctionalityExternalResource, + z.ZodTypeDef, + unknown +> = z.object({ + remote_id: z.string(), + connection_type: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "remote_id": "remoteId", + "connection_type": "connectionType", + }); +}); + +/** @internal */ +export type UpdateFunctionalityExternalResource$Outbound = { + remote_id: string; + connection_type?: string | null | undefined; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateFunctionalityExternalResource$outboundSchema: z.ZodType< + UpdateFunctionalityExternalResource$Outbound, + z.ZodTypeDef, + UpdateFunctionalityExternalResource +> = z.object({ + remoteId: z.string(), + connectionType: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + remoteId: "remote_id", + connectionType: "connection_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateFunctionalityExternalResource$ { + /** @deprecated use `UpdateFunctionalityExternalResource$inboundSchema` instead. */ + export const inboundSchema = + UpdateFunctionalityExternalResource$inboundSchema; + /** @deprecated use `UpdateFunctionalityExternalResource$outboundSchema` instead. */ + export const outboundSchema = + UpdateFunctionalityExternalResource$outboundSchema; + /** @deprecated use `UpdateFunctionalityExternalResource$Outbound` instead. */ + export type Outbound = UpdateFunctionalityExternalResource$Outbound; +} + +export function updateFunctionalityExternalResourceToJSON( + updateFunctionalityExternalResource: UpdateFunctionalityExternalResource, +): string { + return JSON.stringify( + UpdateFunctionalityExternalResource$outboundSchema.parse( + updateFunctionalityExternalResource, + ), + ); +} + +export function updateFunctionalityExternalResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateFunctionalityExternalResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateFunctionalityExternalResource' from JSON`, + ); +} + +/** @internal */ +export const UpdateFunctionality$inboundSchema: z.ZodType< + UpdateFunctionality, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + services: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityService$inboundSchema)), + ).optional(), + links: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityLink$inboundSchema)), + ).optional(), + owner: z.nullable(z.lazy(() => UpdateFunctionalityOwner$inboundSchema)) + .optional(), + remove_owner: z.nullable(z.boolean()).optional(), + teams: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityTeam$inboundSchema)), + ).optional(), + remove_remaining_teams: z.nullable(z.boolean()).optional(), + external_resources: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityExternalResource$inboundSchema)), + ).optional(), + remove_remaining_external_resources: z.nullable(z.boolean()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + remove_remaining_services: z.nullable(z.boolean().default(false)), +}).transform((v) => { + return remap$(v, { + "remove_owner": "removeOwner", + "remove_remaining_teams": "removeRemainingTeams", + "external_resources": "externalResources", + "remove_remaining_external_resources": "removeRemainingExternalResources", + "alert_on_add": "alertOnAdd", + "auto_add_responding_team": "autoAddRespondingTeam", + "remove_remaining_services": "removeRemainingServices", + }); +}); + +/** @internal */ +export type UpdateFunctionality$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + services?: Array | null | undefined; + links?: Array | null | undefined; + owner?: UpdateFunctionalityOwner$Outbound | null | undefined; + remove_owner?: boolean | null | undefined; + teams?: Array | null | undefined; + remove_remaining_teams?: boolean | null | undefined; + external_resources?: + | Array + | null + | undefined; + remove_remaining_external_resources?: boolean | null | undefined; + labels?: { [k: string]: string } | null | undefined; + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + remove_remaining_services: boolean | null; +}; + +/** @internal */ +export const UpdateFunctionality$outboundSchema: z.ZodType< + UpdateFunctionality$Outbound, + z.ZodTypeDef, + UpdateFunctionality +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + services: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityService$outboundSchema)), + ).optional(), + links: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityLink$outboundSchema)), + ).optional(), + owner: z.nullable(z.lazy(() => UpdateFunctionalityOwner$outboundSchema)) + .optional(), + removeOwner: z.nullable(z.boolean()).optional(), + teams: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityTeam$outboundSchema)), + ).optional(), + removeRemainingTeams: z.nullable(z.boolean()).optional(), + externalResources: z.nullable( + z.array(z.lazy(() => UpdateFunctionalityExternalResource$outboundSchema)), + ).optional(), + removeRemainingExternalResources: z.nullable(z.boolean()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + removeRemainingServices: z.nullable(z.boolean().default(false)), +}).transform((v) => { + return remap$(v, { + removeOwner: "remove_owner", + removeRemainingTeams: "remove_remaining_teams", + externalResources: "external_resources", + removeRemainingExternalResources: "remove_remaining_external_resources", + alertOnAdd: "alert_on_add", + autoAddRespondingTeam: "auto_add_responding_team", + removeRemainingServices: "remove_remaining_services", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateFunctionality$ { + /** @deprecated use `UpdateFunctionality$inboundSchema` instead. */ + export const inboundSchema = UpdateFunctionality$inboundSchema; + /** @deprecated use `UpdateFunctionality$outboundSchema` instead. */ + export const outboundSchema = UpdateFunctionality$outboundSchema; + /** @deprecated use `UpdateFunctionality$Outbound` instead. */ + export type Outbound = UpdateFunctionality$Outbound; +} + +export function updateFunctionalityToJSON( + updateFunctionality: UpdateFunctionality, +): string { + return JSON.stringify( + UpdateFunctionality$outboundSchema.parse(updateFunctionality), + ); +} + +export function updateFunctionalityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateFunctionality$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateFunctionality' from JSON`, + ); +} diff --git a/src/models/components/updateincident.ts b/src/models/components/updateincident.ts new file mode 100644 index 00000000..cbc63941 --- /dev/null +++ b/src/models/components/updateincident.ts @@ -0,0 +1,177 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Key:value pairs to track custom data for the incident + */ +export type UpdateIncidentLabels = {}; + +/** + * Updates an incident with provided parameters + */ +export type UpdateIncident = { + name?: string | null | undefined; + summary?: string | null | undefined; + customerImpactSummary?: string | null | undefined; + description?: string | null | undefined; + /** + * Key:value pairs to track custom data for the incident + */ + labels?: UpdateIncidentLabels | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severityConditionId?: string | null | undefined; + severityImpactId?: string | null | undefined; + /** + * List of tags for the incident + */ + tagList?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentLabels$inboundSchema: z.ZodType< + UpdateIncidentLabels, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type UpdateIncidentLabels$Outbound = {}; + +/** @internal */ +export const UpdateIncidentLabels$outboundSchema: z.ZodType< + UpdateIncidentLabels$Outbound, + z.ZodTypeDef, + UpdateIncidentLabels +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentLabels$ { + /** @deprecated use `UpdateIncidentLabels$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentLabels$inboundSchema; + /** @deprecated use `UpdateIncidentLabels$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentLabels$outboundSchema; + /** @deprecated use `UpdateIncidentLabels$Outbound` instead. */ + export type Outbound = UpdateIncidentLabels$Outbound; +} + +export function updateIncidentLabelsToJSON( + updateIncidentLabels: UpdateIncidentLabels, +): string { + return JSON.stringify( + UpdateIncidentLabels$outboundSchema.parse(updateIncidentLabels), + ); +} + +export function updateIncidentLabelsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentLabels$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentLabels' from JSON`, + ); +} + +/** @internal */ +export const UpdateIncident$inboundSchema: z.ZodType< + UpdateIncident, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + customer_impact_summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.lazy(() => UpdateIncidentLabels$inboundSchema)) + .optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severity_condition_id: z.nullable(z.string()).optional(), + severity_impact_id: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "customer_impact_summary": "customerImpactSummary", + "severity_condition_id": "severityConditionId", + "severity_impact_id": "severityImpactId", + "tag_list": "tagList", + }); +}); + +/** @internal */ +export type UpdateIncident$Outbound = { + name?: string | null | undefined; + summary?: string | null | undefined; + customer_impact_summary?: string | null | undefined; + description?: string | null | undefined; + labels?: UpdateIncidentLabels$Outbound | null | undefined; + priority?: string | null | undefined; + severity?: string | null | undefined; + severity_condition_id?: string | null | undefined; + severity_impact_id?: string | null | undefined; + tag_list?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateIncident$outboundSchema: z.ZodType< + UpdateIncident$Outbound, + z.ZodTypeDef, + UpdateIncident +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + customerImpactSummary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.lazy(() => UpdateIncidentLabels$outboundSchema)) + .optional(), + priority: z.nullable(z.string()).optional(), + severity: z.nullable(z.string()).optional(), + severityConditionId: z.nullable(z.string()).optional(), + severityImpactId: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + customerImpactSummary: "customer_impact_summary", + severityConditionId: "severity_condition_id", + severityImpactId: "severity_impact_id", + tagList: "tag_list", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncident$ { + /** @deprecated use `UpdateIncident$inboundSchema` instead. */ + export const inboundSchema = UpdateIncident$inboundSchema; + /** @deprecated use `UpdateIncident$outboundSchema` instead. */ + export const outboundSchema = UpdateIncident$outboundSchema; + /** @deprecated use `UpdateIncident$Outbound` instead. */ + export type Outbound = UpdateIncident$Outbound; +} + +export function updateIncidentToJSON(updateIncident: UpdateIncident): string { + return JSON.stringify(UpdateIncident$outboundSchema.parse(updateIncident)); +} + +export function updateIncidentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncident$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncident' from JSON`, + ); +} diff --git a/src/models/components/updateincidentalertprimary.ts b/src/models/components/updateincidentalertprimary.ts new file mode 100644 index 00000000..d663b8ad --- /dev/null +++ b/src/models/components/updateincidentalertprimary.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. + */ +export type UpdateIncidentAlertPrimary = { + primary: boolean; +}; + +/** @internal */ +export const UpdateIncidentAlertPrimary$inboundSchema: z.ZodType< + UpdateIncidentAlertPrimary, + z.ZodTypeDef, + unknown +> = z.object({ + primary: z.boolean(), +}); + +/** @internal */ +export type UpdateIncidentAlertPrimary$Outbound = { + primary: boolean; +}; + +/** @internal */ +export const UpdateIncidentAlertPrimary$outboundSchema: z.ZodType< + UpdateIncidentAlertPrimary$Outbound, + z.ZodTypeDef, + UpdateIncidentAlertPrimary +> = z.object({ + primary: z.boolean(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentAlertPrimary$ { + /** @deprecated use `UpdateIncidentAlertPrimary$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentAlertPrimary$inboundSchema; + /** @deprecated use `UpdateIncidentAlertPrimary$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentAlertPrimary$outboundSchema; + /** @deprecated use `UpdateIncidentAlertPrimary$Outbound` instead. */ + export type Outbound = UpdateIncidentAlertPrimary$Outbound; +} + +export function updateIncidentAlertPrimaryToJSON( + updateIncidentAlertPrimary: UpdateIncidentAlertPrimary, +): string { + return JSON.stringify( + UpdateIncidentAlertPrimary$outboundSchema.parse(updateIncidentAlertPrimary), + ); +} + +export function updateIncidentAlertPrimaryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentAlertPrimary$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentAlertPrimary' from JSON`, + ); +} diff --git a/src/models/components/updateincidentchangeevent.ts b/src/models/components/updateincidentchangeevent.ts new file mode 100644 index 00000000..d644c5e0 --- /dev/null +++ b/src/models/components/updateincidentchangeevent.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const UpdateIncidentChangeEventType = { + Caused: "caused", + Fixed: "fixed", + Suspect: "suspect", + Dismissed: "dismissed", +} as const; +export type UpdateIncidentChangeEventType = ClosedEnum< + typeof UpdateIncidentChangeEventType +>; + +/** + * Update a change attached to an incident + */ +export type UpdateIncidentChangeEvent = { + type?: UpdateIncidentChangeEventType | null | undefined; + /** + * A short description about why this change event is related + */ + why?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentChangeEventType$inboundSchema: z.ZodNativeEnum< + typeof UpdateIncidentChangeEventType +> = z.nativeEnum(UpdateIncidentChangeEventType); + +/** @internal */ +export const UpdateIncidentChangeEventType$outboundSchema: z.ZodNativeEnum< + typeof UpdateIncidentChangeEventType +> = UpdateIncidentChangeEventType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentChangeEventType$ { + /** @deprecated use `UpdateIncidentChangeEventType$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentChangeEventType$inboundSchema; + /** @deprecated use `UpdateIncidentChangeEventType$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentChangeEventType$outboundSchema; +} + +/** @internal */ +export const UpdateIncidentChangeEvent$inboundSchema: z.ZodType< + UpdateIncidentChangeEvent, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.nullable(UpdateIncidentChangeEventType$inboundSchema).optional(), + why: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateIncidentChangeEvent$Outbound = { + type?: string | null | undefined; + why?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentChangeEvent$outboundSchema: z.ZodType< + UpdateIncidentChangeEvent$Outbound, + z.ZodTypeDef, + UpdateIncidentChangeEvent +> = z.object({ + type: z.nullable(UpdateIncidentChangeEventType$outboundSchema).optional(), + why: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentChangeEvent$ { + /** @deprecated use `UpdateIncidentChangeEvent$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentChangeEvent$inboundSchema; + /** @deprecated use `UpdateIncidentChangeEvent$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentChangeEvent$outboundSchema; + /** @deprecated use `UpdateIncidentChangeEvent$Outbound` instead. */ + export type Outbound = UpdateIncidentChangeEvent$Outbound; +} + +export function updateIncidentChangeEventToJSON( + updateIncidentChangeEvent: UpdateIncidentChangeEvent, +): string { + return JSON.stringify( + UpdateIncidentChangeEvent$outboundSchema.parse(updateIncidentChangeEvent), + ); +} + +export function updateIncidentChangeEventFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentChangeEvent$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentChangeEvent' from JSON`, + ); +} diff --git a/src/models/components/updateincidentchatmessage.ts b/src/models/components/updateincidentchatmessage.ts new file mode 100644 index 00000000..ff74b2f0 --- /dev/null +++ b/src/models/components/updateincidentchatmessage.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update an existing generic chat message on an incident. + */ +export type UpdateIncidentChatMessage = { + body: string; +}; + +/** @internal */ +export const UpdateIncidentChatMessage$inboundSchema: z.ZodType< + UpdateIncidentChatMessage, + z.ZodTypeDef, + unknown +> = z.object({ + body: z.string(), +}); + +/** @internal */ +export type UpdateIncidentChatMessage$Outbound = { + body: string; +}; + +/** @internal */ +export const UpdateIncidentChatMessage$outboundSchema: z.ZodType< + UpdateIncidentChatMessage$Outbound, + z.ZodTypeDef, + UpdateIncidentChatMessage +> = z.object({ + body: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentChatMessage$ { + /** @deprecated use `UpdateIncidentChatMessage$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentChatMessage$inboundSchema; + /** @deprecated use `UpdateIncidentChatMessage$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentChatMessage$outboundSchema; + /** @deprecated use `UpdateIncidentChatMessage$Outbound` instead. */ + export type Outbound = UpdateIncidentChatMessage$Outbound; +} + +export function updateIncidentChatMessageToJSON( + updateIncidentChatMessage: UpdateIncidentChatMessage, +): string { + return JSON.stringify( + UpdateIncidentChatMessage$outboundSchema.parse(updateIncidentChatMessage), + ); +} + +export function updateIncidentChatMessageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentChatMessage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentChatMessage' from JSON`, + ); +} diff --git a/src/models/components/updateincidentimpactpatch.ts b/src/models/components/updateincidentimpactpatch.ts new file mode 100644 index 00000000..4ac9bef4 --- /dev/null +++ b/src/models/components/updateincidentimpactpatch.ts @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentImpactPatchImpact = { + id: string; + conditionId: string; +}; + +export type UpdateIncidentImpactPatchStatusPage = { + id: string; + integrationSlug: string; +}; + +/** + * Allows updating an incident's impacted infrastructure, with the option to + * + * @remarks + * move the incident into a different milestone and provide a note to update + * the incident timeline and any attached status pages. If this method is + * requested with the PUT verb, impacts will be completely replaced with the + * information in the request body, even if not provided (effectively clearing + * all impacts). If this method is requested with the PATCH verb, the provided + * impacts will be added or updated, but no impacts will be removed. + */ +export type UpdateIncidentImpactPatch = { + note?: string | null | undefined; + milestone?: string | null | undefined; + impact?: Array | null | undefined; + statusPages?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentImpactPatchImpact$inboundSchema: z.ZodType< + UpdateIncidentImpactPatchImpact, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPatchImpact$Outbound = { + id: string; + condition_id: string; +}; + +/** @internal */ +export const UpdateIncidentImpactPatchImpact$outboundSchema: z.ZodType< + UpdateIncidentImpactPatchImpact$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPatchImpact +> = z.object({ + id: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPatchImpact$ { + /** @deprecated use `UpdateIncidentImpactPatchImpact$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentImpactPatchImpact$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPatchImpact$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentImpactPatchImpact$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPatchImpact$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPatchImpact$Outbound; +} + +export function updateIncidentImpactPatchImpactToJSON( + updateIncidentImpactPatchImpact: UpdateIncidentImpactPatchImpact, +): string { + return JSON.stringify( + UpdateIncidentImpactPatchImpact$outboundSchema.parse( + updateIncidentImpactPatchImpact, + ), + ); +} + +export function updateIncidentImpactPatchImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentImpactPatchImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPatchImpact' from JSON`, + ); +} + +/** @internal */ +export const UpdateIncidentImpactPatchStatusPage$inboundSchema: z.ZodType< + UpdateIncidentImpactPatchStatusPage, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + integration_slug: z.string(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPatchStatusPage$Outbound = { + id: string; + integration_slug: string; +}; + +/** @internal */ +export const UpdateIncidentImpactPatchStatusPage$outboundSchema: z.ZodType< + UpdateIncidentImpactPatchStatusPage$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPatchStatusPage +> = z.object({ + id: z.string(), + integrationSlug: z.string(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPatchStatusPage$ { + /** @deprecated use `UpdateIncidentImpactPatchStatusPage$inboundSchema` instead. */ + export const inboundSchema = + UpdateIncidentImpactPatchStatusPage$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPatchStatusPage$outboundSchema` instead. */ + export const outboundSchema = + UpdateIncidentImpactPatchStatusPage$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPatchStatusPage$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPatchStatusPage$Outbound; +} + +export function updateIncidentImpactPatchStatusPageToJSON( + updateIncidentImpactPatchStatusPage: UpdateIncidentImpactPatchStatusPage, +): string { + return JSON.stringify( + UpdateIncidentImpactPatchStatusPage$outboundSchema.parse( + updateIncidentImpactPatchStatusPage, + ), + ); +} + +export function updateIncidentImpactPatchStatusPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateIncidentImpactPatchStatusPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPatchStatusPage' from JSON`, + ); +} + +/** @internal */ +export const UpdateIncidentImpactPatch$inboundSchema: z.ZodType< + UpdateIncidentImpactPatch, + z.ZodTypeDef, + unknown +> = z.object({ + note: z.nullable(z.string()).optional(), + milestone: z.nullable(z.string()).optional(), + impact: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPatchImpact$inboundSchema)), + ).optional(), + status_pages: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPatchStatusPage$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "status_pages": "statusPages", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPatch$Outbound = { + note?: string | null | undefined; + milestone?: string | null | undefined; + impact?: Array | null | undefined; + status_pages?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const UpdateIncidentImpactPatch$outboundSchema: z.ZodType< + UpdateIncidentImpactPatch$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPatch +> = z.object({ + note: z.nullable(z.string()).optional(), + milestone: z.nullable(z.string()).optional(), + impact: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPatchImpact$outboundSchema)), + ).optional(), + statusPages: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPatchStatusPage$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + statusPages: "status_pages", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPatch$ { + /** @deprecated use `UpdateIncidentImpactPatch$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentImpactPatch$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPatch$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentImpactPatch$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPatch$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPatch$Outbound; +} + +export function updateIncidentImpactPatchToJSON( + updateIncidentImpactPatch: UpdateIncidentImpactPatch, +): string { + return JSON.stringify( + UpdateIncidentImpactPatch$outboundSchema.parse(updateIncidentImpactPatch), + ); +} + +export function updateIncidentImpactPatchFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentImpactPatch$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPatch' from JSON`, + ); +} diff --git a/src/models/components/updateincidentimpactput.ts b/src/models/components/updateincidentimpactput.ts new file mode 100644 index 00000000..1f1e6d2c --- /dev/null +++ b/src/models/components/updateincidentimpactput.ts @@ -0,0 +1,254 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentImpactPutImpact = { + id: string; + conditionId: string; +}; + +export type UpdateIncidentImpactPutStatusPage = { + id: string; + integrationSlug: string; +}; + +/** + * Allows updating an incident's impacted infrastructure, with the option to + * + * @remarks + * move the incident into a different milestone and provide a note to update + * the incident timeline and any attached status pages. If this method is + * requested with the PUT verb, impacts will be completely replaced with the + * information in the request body, even if not provided (effectively clearing + * all impacts). If this method is requested with the PATCH verb, the provided + * impacts will be added or updated, but no impacts will be removed. + */ +export type UpdateIncidentImpactPut = { + note?: string | null | undefined; + milestone?: string | null | undefined; + impact?: Array | null | undefined; + statusPages?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentImpactPutImpact$inboundSchema: z.ZodType< + UpdateIncidentImpactPutImpact, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPutImpact$Outbound = { + id: string; + condition_id: string; +}; + +/** @internal */ +export const UpdateIncidentImpactPutImpact$outboundSchema: z.ZodType< + UpdateIncidentImpactPutImpact$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPutImpact +> = z.object({ + id: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPutImpact$ { + /** @deprecated use `UpdateIncidentImpactPutImpact$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentImpactPutImpact$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPutImpact$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentImpactPutImpact$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPutImpact$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPutImpact$Outbound; +} + +export function updateIncidentImpactPutImpactToJSON( + updateIncidentImpactPutImpact: UpdateIncidentImpactPutImpact, +): string { + return JSON.stringify( + UpdateIncidentImpactPutImpact$outboundSchema.parse( + updateIncidentImpactPutImpact, + ), + ); +} + +export function updateIncidentImpactPutImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentImpactPutImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPutImpact' from JSON`, + ); +} + +/** @internal */ +export const UpdateIncidentImpactPutStatusPage$inboundSchema: z.ZodType< + UpdateIncidentImpactPutStatusPage, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + integration_slug: z.string(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPutStatusPage$Outbound = { + id: string; + integration_slug: string; +}; + +/** @internal */ +export const UpdateIncidentImpactPutStatusPage$outboundSchema: z.ZodType< + UpdateIncidentImpactPutStatusPage$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPutStatusPage +> = z.object({ + id: z.string(), + integrationSlug: z.string(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPutStatusPage$ { + /** @deprecated use `UpdateIncidentImpactPutStatusPage$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentImpactPutStatusPage$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPutStatusPage$outboundSchema` instead. */ + export const outboundSchema = + UpdateIncidentImpactPutStatusPage$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPutStatusPage$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPutStatusPage$Outbound; +} + +export function updateIncidentImpactPutStatusPageToJSON( + updateIncidentImpactPutStatusPage: UpdateIncidentImpactPutStatusPage, +): string { + return JSON.stringify( + UpdateIncidentImpactPutStatusPage$outboundSchema.parse( + updateIncidentImpactPutStatusPage, + ), + ); +} + +export function updateIncidentImpactPutStatusPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentImpactPutStatusPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPutStatusPage' from JSON`, + ); +} + +/** @internal */ +export const UpdateIncidentImpactPut$inboundSchema: z.ZodType< + UpdateIncidentImpactPut, + z.ZodTypeDef, + unknown +> = z.object({ + note: z.nullable(z.string()).optional(), + milestone: z.nullable(z.string()).optional(), + impact: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPutImpact$inboundSchema)), + ).optional(), + status_pages: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPutStatusPage$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "status_pages": "statusPages", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPut$Outbound = { + note?: string | null | undefined; + milestone?: string | null | undefined; + impact?: Array | null | undefined; + status_pages?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const UpdateIncidentImpactPut$outboundSchema: z.ZodType< + UpdateIncidentImpactPut$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPut +> = z.object({ + note: z.nullable(z.string()).optional(), + milestone: z.nullable(z.string()).optional(), + impact: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPutImpact$outboundSchema)), + ).optional(), + statusPages: z.nullable( + z.array(z.lazy(() => UpdateIncidentImpactPutStatusPage$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + statusPages: "status_pages", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPut$ { + /** @deprecated use `UpdateIncidentImpactPut$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentImpactPut$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPut$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentImpactPut$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPut$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPut$Outbound; +} + +export function updateIncidentImpactPutToJSON( + updateIncidentImpactPut: UpdateIncidentImpactPut, +): string { + return JSON.stringify( + UpdateIncidentImpactPut$outboundSchema.parse(updateIncidentImpactPut), + ); +} + +export function updateIncidentImpactPutFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentImpactPut$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPut' from JSON`, + ); +} diff --git a/src/models/components/updateincidentlink.ts b/src/models/components/updateincidentlink.ts new file mode 100644 index 00000000..d596d1c8 --- /dev/null +++ b/src/models/components/updateincidentlink.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update the external incident link attributes + */ +export type UpdateIncidentLink = { + displayText?: string | null | undefined; + iconUrl?: string | null | undefined; + hrefUrl?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentLink$inboundSchema: z.ZodType< + UpdateIncidentLink, + z.ZodTypeDef, + unknown +> = z.object({ + display_text: z.nullable(z.string()).optional(), + icon_url: z.nullable(z.string()).optional(), + href_url: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "display_text": "displayText", + "icon_url": "iconUrl", + "href_url": "hrefUrl", + }); +}); + +/** @internal */ +export type UpdateIncidentLink$Outbound = { + display_text?: string | null | undefined; + icon_url?: string | null | undefined; + href_url?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentLink$outboundSchema: z.ZodType< + UpdateIncidentLink$Outbound, + z.ZodTypeDef, + UpdateIncidentLink +> = z.object({ + displayText: z.nullable(z.string()).optional(), + iconUrl: z.nullable(z.string()).optional(), + hrefUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + displayText: "display_text", + iconUrl: "icon_url", + hrefUrl: "href_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentLink$ { + /** @deprecated use `UpdateIncidentLink$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentLink$inboundSchema; + /** @deprecated use `UpdateIncidentLink$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentLink$outboundSchema; + /** @deprecated use `UpdateIncidentLink$Outbound` instead. */ + export type Outbound = UpdateIncidentLink$Outbound; +} + +export function updateIncidentLinkToJSON( + updateIncidentLink: UpdateIncidentLink, +): string { + return JSON.stringify( + UpdateIncidentLink$outboundSchema.parse(updateIncidentLink), + ); +} + +export function updateIncidentLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentLink' from JSON`, + ); +} diff --git a/src/models/components/updateincidentnote.ts b/src/models/components/updateincidentnote.ts new file mode 100644 index 00000000..dcdb0ab6 --- /dev/null +++ b/src/models/components/updateincidentnote.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Updates the body of a note + */ +export type UpdateIncidentNote = { + body: string; +}; + +/** @internal */ +export const UpdateIncidentNote$inboundSchema: z.ZodType< + UpdateIncidentNote, + z.ZodTypeDef, + unknown +> = z.object({ + body: z.string(), +}); + +/** @internal */ +export type UpdateIncidentNote$Outbound = { + body: string; +}; + +/** @internal */ +export const UpdateIncidentNote$outboundSchema: z.ZodType< + UpdateIncidentNote$Outbound, + z.ZodTypeDef, + UpdateIncidentNote +> = z.object({ + body: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentNote$ { + /** @deprecated use `UpdateIncidentNote$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentNote$inboundSchema; + /** @deprecated use `UpdateIncidentNote$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentNote$outboundSchema; + /** @deprecated use `UpdateIncidentNote$Outbound` instead. */ + export type Outbound = UpdateIncidentNote$Outbound; +} + +export function updateIncidentNoteToJSON( + updateIncidentNote: UpdateIncidentNote, +): string { + return JSON.stringify( + UpdateIncidentNote$outboundSchema.parse(updateIncidentNote), + ); +} + +export function updateIncidentNoteFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentNote$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentNote' from JSON`, + ); +} diff --git a/src/models/components/updateincidentretrospective.ts b/src/models/components/updateincidentretrospective.ts new file mode 100644 index 00000000..bbadfc5e --- /dev/null +++ b/src/models/components/updateincidentretrospective.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a retrospective attached to an incident + */ +export type UpdateIncidentRetrospective = { + /** + * To hide or unhide the retrospective. + */ + isHidden?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentRetrospective$inboundSchema: z.ZodType< + UpdateIncidentRetrospective, + z.ZodTypeDef, + unknown +> = z.object({ + is_hidden: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "is_hidden": "isHidden", + }); +}); + +/** @internal */ +export type UpdateIncidentRetrospective$Outbound = { + is_hidden?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentRetrospective$outboundSchema: z.ZodType< + UpdateIncidentRetrospective$Outbound, + z.ZodTypeDef, + UpdateIncidentRetrospective +> = z.object({ + isHidden: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + isHidden: "is_hidden", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentRetrospective$ { + /** @deprecated use `UpdateIncidentRetrospective$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentRetrospective$inboundSchema; + /** @deprecated use `UpdateIncidentRetrospective$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentRetrospective$outboundSchema; + /** @deprecated use `UpdateIncidentRetrospective$Outbound` instead. */ + export type Outbound = UpdateIncidentRetrospective$Outbound; +} + +export function updateIncidentRetrospectiveToJSON( + updateIncidentRetrospective: UpdateIncidentRetrospective, +): string { + return JSON.stringify( + UpdateIncidentRetrospective$outboundSchema.parse( + updateIncidentRetrospective, + ), + ); +} + +export function updateIncidentRetrospectiveFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentRetrospective$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentRetrospective' from JSON`, + ); +} diff --git a/src/models/components/updateincidentretrospectivefield.ts b/src/models/components/updateincidentretrospectivefield.ts new file mode 100644 index 00000000..b023d543 --- /dev/null +++ b/src/models/components/updateincidentretrospectivefield.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update retrospective field value + */ +export type UpdateIncidentRetrospectiveField = { + /** + * The ID of the dynamic input field to update. + */ + dynamicInputFieldId?: string | null | undefined; + /** + * The value to set for the field. + */ + value: number; +}; + +/** @internal */ +export const UpdateIncidentRetrospectiveField$inboundSchema: z.ZodType< + UpdateIncidentRetrospectiveField, + z.ZodTypeDef, + unknown +> = z.object({ + dynamic_input_field_id: z.nullable(z.string()).optional(), + value: z.number().int(), +}).transform((v) => { + return remap$(v, { + "dynamic_input_field_id": "dynamicInputFieldId", + }); +}); + +/** @internal */ +export type UpdateIncidentRetrospectiveField$Outbound = { + dynamic_input_field_id?: string | null | undefined; + value: number; +}; + +/** @internal */ +export const UpdateIncidentRetrospectiveField$outboundSchema: z.ZodType< + UpdateIncidentRetrospectiveField$Outbound, + z.ZodTypeDef, + UpdateIncidentRetrospectiveField +> = z.object({ + dynamicInputFieldId: z.nullable(z.string()).optional(), + value: z.number().int(), +}).transform((v) => { + return remap$(v, { + dynamicInputFieldId: "dynamic_input_field_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentRetrospectiveField$ { + /** @deprecated use `UpdateIncidentRetrospectiveField$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentRetrospectiveField$inboundSchema; + /** @deprecated use `UpdateIncidentRetrospectiveField$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentRetrospectiveField$outboundSchema; + /** @deprecated use `UpdateIncidentRetrospectiveField$Outbound` instead. */ + export type Outbound = UpdateIncidentRetrospectiveField$Outbound; +} + +export function updateIncidentRetrospectiveFieldToJSON( + updateIncidentRetrospectiveField: UpdateIncidentRetrospectiveField, +): string { + return JSON.stringify( + UpdateIncidentRetrospectiveField$outboundSchema.parse( + updateIncidentRetrospectiveField, + ), + ); +} + +export function updateIncidentRetrospectiveFieldFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentRetrospectiveField$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentRetrospectiveField' from JSON`, + ); +} diff --git a/src/models/components/updateincidentrole.ts b/src/models/components/updateincidentrole.ts new file mode 100644 index 00000000..2c257b9a --- /dev/null +++ b/src/models/components/updateincidentrole.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a single incident role from its ID + */ +export type UpdateIncidentRole = { + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentRole$inboundSchema: z.ZodType< + UpdateIncidentRole, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateIncidentRole$Outbound = { + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentRole$outboundSchema: z.ZodType< + UpdateIncidentRole$Outbound, + z.ZodTypeDef, + UpdateIncidentRole +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentRole$ { + /** @deprecated use `UpdateIncidentRole$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentRole$inboundSchema; + /** @deprecated use `UpdateIncidentRole$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentRole$outboundSchema; + /** @deprecated use `UpdateIncidentRole$Outbound` instead. */ + export type Outbound = UpdateIncidentRole$Outbound; +} + +export function updateIncidentRoleToJSON( + updateIncidentRole: UpdateIncidentRole, +): string { + return JSON.stringify( + UpdateIncidentRole$outboundSchema.parse(updateIncidentRole), + ); +} + +export function updateIncidentRoleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentRole$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentRole' from JSON`, + ); +} diff --git a/src/models/components/updateincidenttask.ts b/src/models/components/updateincidenttask.ts new file mode 100644 index 00000000..89f6bcc1 --- /dev/null +++ b/src/models/components/updateincidenttask.ts @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a task's attributes + */ +export type UpdateIncidentTask = { + /** + * The title of the task. + */ + title?: string | null | undefined; + /** + * A description of what the task is for. + */ + description?: string | null | undefined; + /** + * The state of the task. One of: open, in_progress, cancelled, done + */ + state?: string | null | undefined; + /** + * The ID of the user assigned to the task. + */ + assigneeId?: string | null | undefined; + /** + * The due date of the task. Relative values are supported such as '5m' + */ + dueAt?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentTask$inboundSchema: z.ZodType< + UpdateIncidentTask, + z.ZodTypeDef, + unknown +> = z.object({ + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + assignee_id: z.nullable(z.string()).optional(), + due_at: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "assignee_id": "assigneeId", + "due_at": "dueAt", + }); +}); + +/** @internal */ +export type UpdateIncidentTask$Outbound = { + title?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + assignee_id?: string | null | undefined; + due_at?: string | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentTask$outboundSchema: z.ZodType< + UpdateIncidentTask$Outbound, + z.ZodTypeDef, + UpdateIncidentTask +> = z.object({ + title: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + assigneeId: z.nullable(z.string()).optional(), + dueAt: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + assigneeId: "assignee_id", + dueAt: "due_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentTask$ { + /** @deprecated use `UpdateIncidentTask$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentTask$inboundSchema; + /** @deprecated use `UpdateIncidentTask$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentTask$outboundSchema; + /** @deprecated use `UpdateIncidentTask$Outbound` instead. */ + export type Outbound = UpdateIncidentTask$Outbound; +} + +export function updateIncidentTaskToJSON( + updateIncidentTask: UpdateIncidentTask, +): string { + return JSON.stringify( + UpdateIncidentTask$outboundSchema.parse(updateIncidentTask), + ); +} + +export function updateIncidentTaskFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentTask$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentTask' from JSON`, + ); +} diff --git a/src/models/components/updateincidenttype.ts b/src/models/components/updateincidenttype.ts new file mode 100644 index 00000000..6ae770d0 --- /dev/null +++ b/src/models/components/updateincidenttype.ts @@ -0,0 +1,279 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentTypeImpact = { + /** + * The id of impact + */ + id: string; + /** + * The id of the condition + */ + conditionId: string; +}; + +export type UpdateIncidentTypeTemplate = { + description?: string | null | undefined; + customerImpactSummary?: string | null | undefined; + /** + * A labels hash of keys and values + */ + labels?: { [k: string]: string } | null | undefined; + severity?: string | null | undefined; + priority?: string | null | undefined; + /** + * List of tags for the incident + */ + tagList?: Array | null | undefined; + /** + * List of ids of Runbooks to attach to incidents created from this type + */ + runbookIds?: Array | null | undefined; + privateIncident?: boolean | null | undefined; + /** + * List of ids of teams to be assigned to incidents + */ + teamIds?: Array | null | undefined; + /** + * An array of impact/condition combinations + */ + impacts?: Array | null | undefined; +}; + +/** + * Update a single incident type from its ID + */ +export type UpdateIncidentType = { + name: string; + template: UpdateIncidentTypeTemplate; +}; + +/** @internal */ +export const UpdateIncidentTypeImpact$inboundSchema: z.ZodType< + UpdateIncidentTypeImpact, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type UpdateIncidentTypeImpact$Outbound = { + id: string; + condition_id: string; +}; + +/** @internal */ +export const UpdateIncidentTypeImpact$outboundSchema: z.ZodType< + UpdateIncidentTypeImpact$Outbound, + z.ZodTypeDef, + UpdateIncidentTypeImpact +> = z.object({ + id: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentTypeImpact$ { + /** @deprecated use `UpdateIncidentTypeImpact$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentTypeImpact$inboundSchema; + /** @deprecated use `UpdateIncidentTypeImpact$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentTypeImpact$outboundSchema; + /** @deprecated use `UpdateIncidentTypeImpact$Outbound` instead. */ + export type Outbound = UpdateIncidentTypeImpact$Outbound; +} + +export function updateIncidentTypeImpactToJSON( + updateIncidentTypeImpact: UpdateIncidentTypeImpact, +): string { + return JSON.stringify( + UpdateIncidentTypeImpact$outboundSchema.parse(updateIncidentTypeImpact), + ); +} + +export function updateIncidentTypeImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentTypeImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentTypeImpact' from JSON`, + ); +} + +/** @internal */ +export const UpdateIncidentTypeTemplate$inboundSchema: z.ZodType< + UpdateIncidentTypeTemplate, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.nullable(z.string()).optional(), + customer_impact_summary: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + severity: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), + runbook_ids: z.nullable(z.array(z.string())).optional(), + private_incident: z.nullable(z.boolean()).optional(), + team_ids: z.nullable(z.array(z.string())).optional(), + impacts: z.nullable( + z.array(z.lazy(() => UpdateIncidentTypeImpact$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "customer_impact_summary": "customerImpactSummary", + "tag_list": "tagList", + "runbook_ids": "runbookIds", + "private_incident": "privateIncident", + "team_ids": "teamIds", + }); +}); + +/** @internal */ +export type UpdateIncidentTypeTemplate$Outbound = { + description?: string | null | undefined; + customer_impact_summary?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + severity?: string | null | undefined; + priority?: string | null | undefined; + tag_list?: Array | null | undefined; + runbook_ids?: Array | null | undefined; + private_incident?: boolean | null | undefined; + team_ids?: Array | null | undefined; + impacts?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateIncidentTypeTemplate$outboundSchema: z.ZodType< + UpdateIncidentTypeTemplate$Outbound, + z.ZodTypeDef, + UpdateIncidentTypeTemplate +> = z.object({ + description: z.nullable(z.string()).optional(), + customerImpactSummary: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + severity: z.nullable(z.string()).optional(), + priority: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), + runbookIds: z.nullable(z.array(z.string())).optional(), + privateIncident: z.nullable(z.boolean()).optional(), + teamIds: z.nullable(z.array(z.string())).optional(), + impacts: z.nullable( + z.array(z.lazy(() => UpdateIncidentTypeImpact$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + customerImpactSummary: "customer_impact_summary", + tagList: "tag_list", + runbookIds: "runbook_ids", + privateIncident: "private_incident", + teamIds: "team_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentTypeTemplate$ { + /** @deprecated use `UpdateIncidentTypeTemplate$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentTypeTemplate$inboundSchema; + /** @deprecated use `UpdateIncidentTypeTemplate$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentTypeTemplate$outboundSchema; + /** @deprecated use `UpdateIncidentTypeTemplate$Outbound` instead. */ + export type Outbound = UpdateIncidentTypeTemplate$Outbound; +} + +export function updateIncidentTypeTemplateToJSON( + updateIncidentTypeTemplate: UpdateIncidentTypeTemplate, +): string { + return JSON.stringify( + UpdateIncidentTypeTemplate$outboundSchema.parse(updateIncidentTypeTemplate), + ); +} + +export function updateIncidentTypeTemplateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentTypeTemplate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentTypeTemplate' from JSON`, + ); +} + +/** @internal */ +export const UpdateIncidentType$inboundSchema: z.ZodType< + UpdateIncidentType, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + template: z.lazy(() => UpdateIncidentTypeTemplate$inboundSchema), +}); + +/** @internal */ +export type UpdateIncidentType$Outbound = { + name: string; + template: UpdateIncidentTypeTemplate$Outbound; +}; + +/** @internal */ +export const UpdateIncidentType$outboundSchema: z.ZodType< + UpdateIncidentType$Outbound, + z.ZodTypeDef, + UpdateIncidentType +> = z.object({ + name: z.string(), + template: z.lazy(() => UpdateIncidentTypeTemplate$outboundSchema), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentType$ { + /** @deprecated use `UpdateIncidentType$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentType$inboundSchema; + /** @deprecated use `UpdateIncidentType$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentType$outboundSchema; + /** @deprecated use `UpdateIncidentType$Outbound` instead. */ + export type Outbound = UpdateIncidentType$Outbound; +} + +export function updateIncidentTypeToJSON( + updateIncidentType: UpdateIncidentType, +): string { + return JSON.stringify( + UpdateIncidentType$outboundSchema.parse(updateIncidentType), + ); +} + +export function updateIncidentTypeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentType$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentType' from JSON`, + ); +} diff --git a/src/models/components/updatenunclink.ts b/src/models/components/updatenunclink.ts new file mode 100644 index 00000000..5fc59a8d --- /dev/null +++ b/src/models/components/updatenunclink.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a link to be displayed on a FireHydrant status page + */ +export type UpdateNuncLink = { + displayText?: string | null | undefined; + iconUrl?: string | null | undefined; + hrefUrl?: string | null | undefined; +}; + +/** @internal */ +export const UpdateNuncLink$inboundSchema: z.ZodType< + UpdateNuncLink, + z.ZodTypeDef, + unknown +> = z.object({ + display_text: z.nullable(z.string()).optional(), + icon_url: z.nullable(z.string()).optional(), + href_url: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "display_text": "displayText", + "icon_url": "iconUrl", + "href_url": "hrefUrl", + }); +}); + +/** @internal */ +export type UpdateNuncLink$Outbound = { + display_text?: string | null | undefined; + icon_url?: string | null | undefined; + href_url?: string | null | undefined; +}; + +/** @internal */ +export const UpdateNuncLink$outboundSchema: z.ZodType< + UpdateNuncLink$Outbound, + z.ZodTypeDef, + UpdateNuncLink +> = z.object({ + displayText: z.nullable(z.string()).optional(), + iconUrl: z.nullable(z.string()).optional(), + hrefUrl: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + displayText: "display_text", + iconUrl: "icon_url", + hrefUrl: "href_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncLink$ { + /** @deprecated use `UpdateNuncLink$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncLink$inboundSchema; + /** @deprecated use `UpdateNuncLink$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncLink$outboundSchema; + /** @deprecated use `UpdateNuncLink$Outbound` instead. */ + export type Outbound = UpdateNuncLink$Outbound; +} + +export function updateNuncLinkToJSON(updateNuncLink: UpdateNuncLink): string { + return JSON.stringify(UpdateNuncLink$outboundSchema.parse(updateNuncLink)); +} + +export function updateNuncLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncLink' from JSON`, + ); +} diff --git a/src/models/components/updateoncallshift.ts b/src/models/components/updateoncallshift.ts new file mode 100644 index 00000000..5f097952 --- /dev/null +++ b/src/models/components/updateoncallshift.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a Signals on-call shift by ID + */ +export type UpdateOnCallShift = { + /** + * The start time of the shift in ISO8601 format. + */ + startTime?: string | null | undefined; + /** + * The end time of the shift in ISO8601 format. + */ + endTime?: string | null | undefined; + /** + * The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned. + */ + userId?: string | null | undefined; + /** + * A description of why coverage is needed for this shift. If the shift is re-assigned, this will automatically be cleared unless provided again. + */ + coverageRequest?: string | null | undefined; +}; + +/** @internal */ +export const UpdateOnCallShift$inboundSchema: z.ZodType< + UpdateOnCallShift, + z.ZodTypeDef, + unknown +> = z.object({ + start_time: z.nullable(z.string()).optional(), + end_time: z.nullable(z.string()).optional(), + user_id: z.nullable(z.string()).optional(), + coverage_request: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "start_time": "startTime", + "end_time": "endTime", + "user_id": "userId", + "coverage_request": "coverageRequest", + }); +}); + +/** @internal */ +export type UpdateOnCallShift$Outbound = { + start_time?: string | null | undefined; + end_time?: string | null | undefined; + user_id?: string | null | undefined; + coverage_request?: string | null | undefined; +}; + +/** @internal */ +export const UpdateOnCallShift$outboundSchema: z.ZodType< + UpdateOnCallShift$Outbound, + z.ZodTypeDef, + UpdateOnCallShift +> = z.object({ + startTime: z.nullable(z.string()).optional(), + endTime: z.nullable(z.string()).optional(), + userId: z.nullable(z.string()).optional(), + coverageRequest: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + startTime: "start_time", + endTime: "end_time", + userId: "user_id", + coverageRequest: "coverage_request", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateOnCallShift$ { + /** @deprecated use `UpdateOnCallShift$inboundSchema` instead. */ + export const inboundSchema = UpdateOnCallShift$inboundSchema; + /** @deprecated use `UpdateOnCallShift$outboundSchema` instead. */ + export const outboundSchema = UpdateOnCallShift$outboundSchema; + /** @deprecated use `UpdateOnCallShift$Outbound` instead. */ + export type Outbound = UpdateOnCallShift$Outbound; +} + +export function updateOnCallShiftToJSON( + updateOnCallShift: UpdateOnCallShift, +): string { + return JSON.stringify( + UpdateOnCallShift$outboundSchema.parse(updateOnCallShift), + ); +} + +export function updateOnCallShiftFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateOnCallShift$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateOnCallShift' from JSON`, + ); +} diff --git a/src/models/components/updatepostmortemfield.ts b/src/models/components/updatepostmortemfield.ts new file mode 100644 index 00000000..304588e6 --- /dev/null +++ b/src/models/components/updatepostmortemfield.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a field value on a post mortem report + */ +export type UpdatePostMortemField = { + value: string; +}; + +/** @internal */ +export const UpdatePostMortemField$inboundSchema: z.ZodType< + UpdatePostMortemField, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string(), +}); + +/** @internal */ +export type UpdatePostMortemField$Outbound = { + value: string; +}; + +/** @internal */ +export const UpdatePostMortemField$outboundSchema: z.ZodType< + UpdatePostMortemField$Outbound, + z.ZodTypeDef, + UpdatePostMortemField +> = z.object({ + value: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemField$ { + /** @deprecated use `UpdatePostMortemField$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemField$inboundSchema; + /** @deprecated use `UpdatePostMortemField$outboundSchema` instead. */ + export const outboundSchema = UpdatePostMortemField$outboundSchema; + /** @deprecated use `UpdatePostMortemField$Outbound` instead. */ + export type Outbound = UpdatePostMortemField$Outbound; +} + +export function updatePostMortemFieldToJSON( + updatePostMortemField: UpdatePostMortemField, +): string { + return JSON.stringify( + UpdatePostMortemField$outboundSchema.parse(updatePostMortemField), + ); +} + +export function updatePostMortemFieldFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemField$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemField' from JSON`, + ); +} diff --git a/src/models/components/updatepostmortemquestions.ts b/src/models/components/updatepostmortemquestions.ts new file mode 100644 index 00000000..a531d590 --- /dev/null +++ b/src/models/components/updatepostmortemquestions.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdatePostMortemQuestionsQuestion = { + /** + * ID of a question + */ + id?: string | null | undefined; + /** + * title of a question + */ + title?: string | null | undefined; + /** + * tooltip of a question + */ + tooltip?: string | null | undefined; +}; + +/** + * Update the questions configured to be provided and filled out on future retrospective reports. + */ +export type UpdatePostMortemQuestions = { + makeSwaggerWork?: string | null | undefined; + questions?: Array | null | undefined; +}; + +/** @internal */ +export const UpdatePostMortemQuestionsQuestion$inboundSchema: z.ZodType< + UpdatePostMortemQuestionsQuestion, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + tooltip: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdatePostMortemQuestionsQuestion$Outbound = { + id?: string | null | undefined; + title?: string | null | undefined; + tooltip?: string | null | undefined; +}; + +/** @internal */ +export const UpdatePostMortemQuestionsQuestion$outboundSchema: z.ZodType< + UpdatePostMortemQuestionsQuestion$Outbound, + z.ZodTypeDef, + UpdatePostMortemQuestionsQuestion +> = z.object({ + id: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + tooltip: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemQuestionsQuestion$ { + /** @deprecated use `UpdatePostMortemQuestionsQuestion$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemQuestionsQuestion$inboundSchema; + /** @deprecated use `UpdatePostMortemQuestionsQuestion$outboundSchema` instead. */ + export const outboundSchema = + UpdatePostMortemQuestionsQuestion$outboundSchema; + /** @deprecated use `UpdatePostMortemQuestionsQuestion$Outbound` instead. */ + export type Outbound = UpdatePostMortemQuestionsQuestion$Outbound; +} + +export function updatePostMortemQuestionsQuestionToJSON( + updatePostMortemQuestionsQuestion: UpdatePostMortemQuestionsQuestion, +): string { + return JSON.stringify( + UpdatePostMortemQuestionsQuestion$outboundSchema.parse( + updatePostMortemQuestionsQuestion, + ), + ); +} + +export function updatePostMortemQuestionsQuestionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemQuestionsQuestion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemQuestionsQuestion' from JSON`, + ); +} + +/** @internal */ +export const UpdatePostMortemQuestions$inboundSchema: z.ZodType< + UpdatePostMortemQuestions, + z.ZodTypeDef, + unknown +> = z.object({ + _make_swagger_work_: z.nullable(z.string()).optional(), + questions: z.nullable( + z.array(z.lazy(() => UpdatePostMortemQuestionsQuestion$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "_make_swagger_work_": "makeSwaggerWork", + }); +}); + +/** @internal */ +export type UpdatePostMortemQuestions$Outbound = { + _make_swagger_work_?: string | null | undefined; + questions?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const UpdatePostMortemQuestions$outboundSchema: z.ZodType< + UpdatePostMortemQuestions$Outbound, + z.ZodTypeDef, + UpdatePostMortemQuestions +> = z.object({ + makeSwaggerWork: z.nullable(z.string()).optional(), + questions: z.nullable( + z.array(z.lazy(() => UpdatePostMortemQuestionsQuestion$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + makeSwaggerWork: "_make_swagger_work_", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemQuestions$ { + /** @deprecated use `UpdatePostMortemQuestions$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemQuestions$inboundSchema; + /** @deprecated use `UpdatePostMortemQuestions$outboundSchema` instead. */ + export const outboundSchema = UpdatePostMortemQuestions$outboundSchema; + /** @deprecated use `UpdatePostMortemQuestions$Outbound` instead. */ + export type Outbound = UpdatePostMortemQuestions$Outbound; +} + +export function updatePostMortemQuestionsToJSON( + updatePostMortemQuestions: UpdatePostMortemQuestions, +): string { + return JSON.stringify( + UpdatePostMortemQuestions$outboundSchema.parse(updatePostMortemQuestions), + ); +} + +export function updatePostMortemQuestionsFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemQuestions$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemQuestions' from JSON`, + ); +} diff --git a/src/models/components/updatepostmortemreason.ts b/src/models/components/updatepostmortemreason.ts new file mode 100644 index 00000000..bd808d3c --- /dev/null +++ b/src/models/components/updatepostmortemreason.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a contributing factor + */ +export type UpdatePostMortemReason = { + summary?: string | null | undefined; +}; + +/** @internal */ +export const UpdatePostMortemReason$inboundSchema: z.ZodType< + UpdatePostMortemReason, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdatePostMortemReason$Outbound = { + summary?: string | null | undefined; +}; + +/** @internal */ +export const UpdatePostMortemReason$outboundSchema: z.ZodType< + UpdatePostMortemReason$Outbound, + z.ZodTypeDef, + UpdatePostMortemReason +> = z.object({ + summary: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemReason$ { + /** @deprecated use `UpdatePostMortemReason$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemReason$inboundSchema; + /** @deprecated use `UpdatePostMortemReason$outboundSchema` instead. */ + export const outboundSchema = UpdatePostMortemReason$outboundSchema; + /** @deprecated use `UpdatePostMortemReason$Outbound` instead. */ + export type Outbound = UpdatePostMortemReason$Outbound; +} + +export function updatePostMortemReasonToJSON( + updatePostMortemReason: UpdatePostMortemReason, +): string { + return JSON.stringify( + UpdatePostMortemReason$outboundSchema.parse(updatePostMortemReason), + ); +} + +export function updatePostMortemReasonFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemReason$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemReason' from JSON`, + ); +} diff --git a/src/models/components/updatepostmortemreport.ts b/src/models/components/updatepostmortemreport.ts new file mode 100644 index 00000000..8a9226ad --- /dev/null +++ b/src/models/components/updatepostmortemreport.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdatePostMortemReportQuestion = { + /** + * ID of a question + */ + id?: string | null | undefined; + /** + * Answer to question + */ + body?: string | null | undefined; +}; + +/** + * Update a report + */ +export type UpdatePostMortemReport = { + name?: string | null | undefined; + summary?: string | null | undefined; + additionalDetails?: string | null | undefined; + questions?: Array | null | undefined; +}; + +/** @internal */ +export const UpdatePostMortemReportQuestion$inboundSchema: z.ZodType< + UpdatePostMortemReportQuestion, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdatePostMortemReportQuestion$Outbound = { + id?: string | null | undefined; + body?: string | null | undefined; +}; + +/** @internal */ +export const UpdatePostMortemReportQuestion$outboundSchema: z.ZodType< + UpdatePostMortemReportQuestion$Outbound, + z.ZodTypeDef, + UpdatePostMortemReportQuestion +> = z.object({ + id: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemReportQuestion$ { + /** @deprecated use `UpdatePostMortemReportQuestion$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemReportQuestion$inboundSchema; + /** @deprecated use `UpdatePostMortemReportQuestion$outboundSchema` instead. */ + export const outboundSchema = UpdatePostMortemReportQuestion$outboundSchema; + /** @deprecated use `UpdatePostMortemReportQuestion$Outbound` instead. */ + export type Outbound = UpdatePostMortemReportQuestion$Outbound; +} + +export function updatePostMortemReportQuestionToJSON( + updatePostMortemReportQuestion: UpdatePostMortemReportQuestion, +): string { + return JSON.stringify( + UpdatePostMortemReportQuestion$outboundSchema.parse( + updatePostMortemReportQuestion, + ), + ); +} + +export function updatePostMortemReportQuestionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemReportQuestion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemReportQuestion' from JSON`, + ); +} + +/** @internal */ +export const UpdatePostMortemReport$inboundSchema: z.ZodType< + UpdatePostMortemReport, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + additional_details: z.nullable(z.string()).optional(), + questions: z.nullable( + z.array(z.lazy(() => UpdatePostMortemReportQuestion$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "additional_details": "additionalDetails", + }); +}); + +/** @internal */ +export type UpdatePostMortemReport$Outbound = { + name?: string | null | undefined; + summary?: string | null | undefined; + additional_details?: string | null | undefined; + questions?: Array | null | undefined; +}; + +/** @internal */ +export const UpdatePostMortemReport$outboundSchema: z.ZodType< + UpdatePostMortemReport$Outbound, + z.ZodTypeDef, + UpdatePostMortemReport +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + additionalDetails: z.nullable(z.string()).optional(), + questions: z.nullable( + z.array(z.lazy(() => UpdatePostMortemReportQuestion$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + additionalDetails: "additional_details", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemReport$ { + /** @deprecated use `UpdatePostMortemReport$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemReport$inboundSchema; + /** @deprecated use `UpdatePostMortemReport$outboundSchema` instead. */ + export const outboundSchema = UpdatePostMortemReport$outboundSchema; + /** @deprecated use `UpdatePostMortemReport$Outbound` instead. */ + export type Outbound = UpdatePostMortemReport$Outbound; +} + +export function updatePostMortemReportToJSON( + updatePostMortemReport: UpdatePostMortemReport, +): string { + return JSON.stringify( + UpdatePostMortemReport$outboundSchema.parse(updatePostMortemReport), + ); +} + +export function updatePostMortemReportFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemReport$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemReport' from JSON`, + ); +} diff --git a/src/models/components/updatepriority.ts b/src/models/components/updatepriority.ts new file mode 100644 index 00000000..532043d5 --- /dev/null +++ b/src/models/components/updatepriority.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a specific priority + */ +export type UpdatePriority = { + slug?: string | null | undefined; + description?: string | null | undefined; + default?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdatePriority$inboundSchema: z.ZodType< + UpdatePriority, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type UpdatePriority$Outbound = { + slug?: string | null | undefined; + description?: string | null | undefined; + default?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdatePriority$outboundSchema: z.ZodType< + UpdatePriority$Outbound, + z.ZodTypeDef, + UpdatePriority +> = z.object({ + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePriority$ { + /** @deprecated use `UpdatePriority$inboundSchema` instead. */ + export const inboundSchema = UpdatePriority$inboundSchema; + /** @deprecated use `UpdatePriority$outboundSchema` instead. */ + export const outboundSchema = UpdatePriority$outboundSchema; + /** @deprecated use `UpdatePriority$Outbound` instead. */ + export type Outbound = UpdatePriority$Outbound; +} + +export function updatePriorityToJSON(updatePriority: UpdatePriority): string { + return JSON.stringify(UpdatePriority$outboundSchema.parse(updatePriority)); +} + +export function updatePriorityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePriority$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePriority' from JSON`, + ); +} diff --git a/src/models/components/updaterunbook.ts b/src/models/components/updaterunbook.ts new file mode 100644 index 00000000..e0c9202b --- /dev/null +++ b/src/models/components/updaterunbook.ts @@ -0,0 +1,618 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * An object representing a Team that owns the runbook + */ +export type UpdateRunbookOwner = { + id?: string | null | undefined; +}; + +export type UpdateRunbookSeverity = { + id?: string | null | undefined; +}; + +export type UpdateRunbookService = { + id?: string | null | undefined; +}; + +export type Environment = { + id?: string | null | undefined; +}; + +export type UpdateRunbookAttachmentRule = { + /** + * The JSON logic for the attaching the runbook + */ + logic: string; + /** + * The user data for the rule + */ + userData?: string | null | undefined; +}; + +export type UpdateRunbookRule = { + /** + * The JSON logic for the rule + */ + logic: string; + /** + * The user data for the rule + */ + userData?: string | null | undefined; +}; + +export type UpdateRunbookStep = { + /** + * ID of step to be updated + */ + stepId?: string | null | undefined; + /** + * Name for step + */ + name: string; + /** + * ID of action to use for this step. + */ + actionId: string; + rule?: UpdateRunbookRule | null | undefined; +}; + +/** + * Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything + * + * @remarks + * about a runbook, including but not limited to the steps, environments, attachment rules, and severities. + */ +export type UpdateRunbook = { + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + /** + * Whether or not this runbook is a tutorial runbook + */ + tutorial?: boolean | null | undefined; + /** + * An object representing a Team that owns the runbook + */ + owner?: UpdateRunbookOwner | null | undefined; + severities?: Array | null | undefined; + services?: Array | null | undefined; + environments?: Array | null | undefined; + attachmentRule?: UpdateRunbookAttachmentRule | null | undefined; + steps?: Array | null | undefined; + /** + * Whether or not this runbook should be automatically attached to restricted incidents. Note that setting this to `true` will prevent it from being attached to public incidents, even manually. Defaults to `false`. + */ + autoAttachToRestrictedIncidents?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookOwner$inboundSchema: z.ZodType< + UpdateRunbookOwner, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateRunbookOwner$Outbound = { + id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookOwner$outboundSchema: z.ZodType< + UpdateRunbookOwner$Outbound, + z.ZodTypeDef, + UpdateRunbookOwner +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookOwner$ { + /** @deprecated use `UpdateRunbookOwner$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbookOwner$inboundSchema; + /** @deprecated use `UpdateRunbookOwner$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbookOwner$outboundSchema; + /** @deprecated use `UpdateRunbookOwner$Outbound` instead. */ + export type Outbound = UpdateRunbookOwner$Outbound; +} + +export function updateRunbookOwnerToJSON( + updateRunbookOwner: UpdateRunbookOwner, +): string { + return JSON.stringify( + UpdateRunbookOwner$outboundSchema.parse(updateRunbookOwner), + ); +} + +export function updateRunbookOwnerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbookOwner$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbookOwner' from JSON`, + ); +} + +/** @internal */ +export const UpdateRunbookSeverity$inboundSchema: z.ZodType< + UpdateRunbookSeverity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateRunbookSeverity$Outbound = { + id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookSeverity$outboundSchema: z.ZodType< + UpdateRunbookSeverity$Outbound, + z.ZodTypeDef, + UpdateRunbookSeverity +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookSeverity$ { + /** @deprecated use `UpdateRunbookSeverity$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbookSeverity$inboundSchema; + /** @deprecated use `UpdateRunbookSeverity$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbookSeverity$outboundSchema; + /** @deprecated use `UpdateRunbookSeverity$Outbound` instead. */ + export type Outbound = UpdateRunbookSeverity$Outbound; +} + +export function updateRunbookSeverityToJSON( + updateRunbookSeverity: UpdateRunbookSeverity, +): string { + return JSON.stringify( + UpdateRunbookSeverity$outboundSchema.parse(updateRunbookSeverity), + ); +} + +export function updateRunbookSeverityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbookSeverity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbookSeverity' from JSON`, + ); +} + +/** @internal */ +export const UpdateRunbookService$inboundSchema: z.ZodType< + UpdateRunbookService, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateRunbookService$Outbound = { + id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookService$outboundSchema: z.ZodType< + UpdateRunbookService$Outbound, + z.ZodTypeDef, + UpdateRunbookService +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookService$ { + /** @deprecated use `UpdateRunbookService$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbookService$inboundSchema; + /** @deprecated use `UpdateRunbookService$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbookService$outboundSchema; + /** @deprecated use `UpdateRunbookService$Outbound` instead. */ + export type Outbound = UpdateRunbookService$Outbound; +} + +export function updateRunbookServiceToJSON( + updateRunbookService: UpdateRunbookService, +): string { + return JSON.stringify( + UpdateRunbookService$outboundSchema.parse(updateRunbookService), + ); +} + +export function updateRunbookServiceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbookService$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbookService' from JSON`, + ); +} + +/** @internal */ +export const Environment$inboundSchema: z.ZodType< + Environment, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type Environment$Outbound = { + id?: string | null | undefined; +}; + +/** @internal */ +export const Environment$outboundSchema: z.ZodType< + Environment$Outbound, + z.ZodTypeDef, + Environment +> = z.object({ + id: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Environment$ { + /** @deprecated use `Environment$inboundSchema` instead. */ + export const inboundSchema = Environment$inboundSchema; + /** @deprecated use `Environment$outboundSchema` instead. */ + export const outboundSchema = Environment$outboundSchema; + /** @deprecated use `Environment$Outbound` instead. */ + export type Outbound = Environment$Outbound; +} + +export function environmentToJSON(environment: Environment): string { + return JSON.stringify(Environment$outboundSchema.parse(environment)); +} + +export function environmentFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Environment$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Environment' from JSON`, + ); +} + +/** @internal */ +export const UpdateRunbookAttachmentRule$inboundSchema: z.ZodType< + UpdateRunbookAttachmentRule, + z.ZodTypeDef, + unknown +> = z.object({ + logic: z.string(), + user_data: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_data": "userData", + }); +}); + +/** @internal */ +export type UpdateRunbookAttachmentRule$Outbound = { + logic: string; + user_data?: string | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookAttachmentRule$outboundSchema: z.ZodType< + UpdateRunbookAttachmentRule$Outbound, + z.ZodTypeDef, + UpdateRunbookAttachmentRule +> = z.object({ + logic: z.string(), + userData: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userData: "user_data", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookAttachmentRule$ { + /** @deprecated use `UpdateRunbookAttachmentRule$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbookAttachmentRule$inboundSchema; + /** @deprecated use `UpdateRunbookAttachmentRule$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbookAttachmentRule$outboundSchema; + /** @deprecated use `UpdateRunbookAttachmentRule$Outbound` instead. */ + export type Outbound = UpdateRunbookAttachmentRule$Outbound; +} + +export function updateRunbookAttachmentRuleToJSON( + updateRunbookAttachmentRule: UpdateRunbookAttachmentRule, +): string { + return JSON.stringify( + UpdateRunbookAttachmentRule$outboundSchema.parse( + updateRunbookAttachmentRule, + ), + ); +} + +export function updateRunbookAttachmentRuleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbookAttachmentRule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbookAttachmentRule' from JSON`, + ); +} + +/** @internal */ +export const UpdateRunbookRule$inboundSchema: z.ZodType< + UpdateRunbookRule, + z.ZodTypeDef, + unknown +> = z.object({ + logic: z.string(), + user_data: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_data": "userData", + }); +}); + +/** @internal */ +export type UpdateRunbookRule$Outbound = { + logic: string; + user_data?: string | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookRule$outboundSchema: z.ZodType< + UpdateRunbookRule$Outbound, + z.ZodTypeDef, + UpdateRunbookRule +> = z.object({ + logic: z.string(), + userData: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userData: "user_data", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookRule$ { + /** @deprecated use `UpdateRunbookRule$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbookRule$inboundSchema; + /** @deprecated use `UpdateRunbookRule$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbookRule$outboundSchema; + /** @deprecated use `UpdateRunbookRule$Outbound` instead. */ + export type Outbound = UpdateRunbookRule$Outbound; +} + +export function updateRunbookRuleToJSON( + updateRunbookRule: UpdateRunbookRule, +): string { + return JSON.stringify( + UpdateRunbookRule$outboundSchema.parse(updateRunbookRule), + ); +} + +export function updateRunbookRuleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbookRule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbookRule' from JSON`, + ); +} + +/** @internal */ +export const UpdateRunbookStep$inboundSchema: z.ZodType< + UpdateRunbookStep, + z.ZodTypeDef, + unknown +> = z.object({ + step_id: z.nullable(z.string()).optional(), + name: z.string(), + action_id: z.string(), + rule: z.nullable(z.lazy(() => UpdateRunbookRule$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "step_id": "stepId", + "action_id": "actionId", + }); +}); + +/** @internal */ +export type UpdateRunbookStep$Outbound = { + step_id?: string | null | undefined; + name: string; + action_id: string; + rule?: UpdateRunbookRule$Outbound | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookStep$outboundSchema: z.ZodType< + UpdateRunbookStep$Outbound, + z.ZodTypeDef, + UpdateRunbookStep +> = z.object({ + stepId: z.nullable(z.string()).optional(), + name: z.string(), + actionId: z.string(), + rule: z.nullable(z.lazy(() => UpdateRunbookRule$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + stepId: "step_id", + actionId: "action_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookStep$ { + /** @deprecated use `UpdateRunbookStep$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbookStep$inboundSchema; + /** @deprecated use `UpdateRunbookStep$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbookStep$outboundSchema; + /** @deprecated use `UpdateRunbookStep$Outbound` instead. */ + export type Outbound = UpdateRunbookStep$Outbound; +} + +export function updateRunbookStepToJSON( + updateRunbookStep: UpdateRunbookStep, +): string { + return JSON.stringify( + UpdateRunbookStep$outboundSchema.parse(updateRunbookStep), + ); +} + +export function updateRunbookStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbookStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbookStep' from JSON`, + ); +} + +/** @internal */ +export const UpdateRunbook$inboundSchema: z.ZodType< + UpdateRunbook, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + tutorial: z.nullable(z.boolean()).optional(), + owner: z.nullable(z.lazy(() => UpdateRunbookOwner$inboundSchema)).optional(), + severities: z.nullable( + z.array(z.lazy(() => UpdateRunbookSeverity$inboundSchema)), + ).optional(), + services: z.nullable( + z.array(z.lazy(() => UpdateRunbookService$inboundSchema)), + ).optional(), + environments: z.nullable(z.array(z.lazy(() => Environment$inboundSchema))) + .optional(), + attachment_rule: z.nullable( + z.lazy(() => UpdateRunbookAttachmentRule$inboundSchema), + ).optional(), + steps: z.nullable(z.array(z.lazy(() => UpdateRunbookStep$inboundSchema))) + .optional(), + auto_attach_to_restricted_incidents: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "attachment_rule": "attachmentRule", + "auto_attach_to_restricted_incidents": "autoAttachToRestrictedIncidents", + }); +}); + +/** @internal */ +export type UpdateRunbook$Outbound = { + name?: string | null | undefined; + summary?: string | null | undefined; + description?: string | null | undefined; + tutorial?: boolean | null | undefined; + owner?: UpdateRunbookOwner$Outbound | null | undefined; + severities?: Array | null | undefined; + services?: Array | null | undefined; + environments?: Array | null | undefined; + attachment_rule?: UpdateRunbookAttachmentRule$Outbound | null | undefined; + steps?: Array | null | undefined; + auto_attach_to_restricted_incidents?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateRunbook$outboundSchema: z.ZodType< + UpdateRunbook$Outbound, + z.ZodTypeDef, + UpdateRunbook +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + tutorial: z.nullable(z.boolean()).optional(), + owner: z.nullable(z.lazy(() => UpdateRunbookOwner$outboundSchema)).optional(), + severities: z.nullable( + z.array(z.lazy(() => UpdateRunbookSeverity$outboundSchema)), + ).optional(), + services: z.nullable( + z.array(z.lazy(() => UpdateRunbookService$outboundSchema)), + ).optional(), + environments: z.nullable(z.array(z.lazy(() => Environment$outboundSchema))) + .optional(), + attachmentRule: z.nullable( + z.lazy(() => UpdateRunbookAttachmentRule$outboundSchema), + ).optional(), + steps: z.nullable(z.array(z.lazy(() => UpdateRunbookStep$outboundSchema))) + .optional(), + autoAttachToRestrictedIncidents: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + attachmentRule: "attachment_rule", + autoAttachToRestrictedIncidents: "auto_attach_to_restricted_incidents", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbook$ { + /** @deprecated use `UpdateRunbook$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbook$inboundSchema; + /** @deprecated use `UpdateRunbook$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbook$outboundSchema; + /** @deprecated use `UpdateRunbook$Outbound` instead. */ + export type Outbound = UpdateRunbook$Outbound; +} + +export function updateRunbookToJSON(updateRunbook: UpdateRunbook): string { + return JSON.stringify(UpdateRunbook$outboundSchema.parse(updateRunbook)); +} + +export function updateRunbookFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbook$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbook' from JSON`, + ); +} diff --git a/src/models/components/updaterunbookexecutionstep.ts b/src/models/components/updaterunbookexecutionstep.ts new file mode 100644 index 00000000..301e1481 --- /dev/null +++ b/src/models/components/updaterunbookexecutionstep.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Updates a runbook step execution, especially for changing the state of a step execution. + */ +export type UpdateRunbookExecutionStep = { + state: string; + scheduleFor?: Date | null | undefined; + /** + * Data for execution of this step + */ + data?: { [k: string]: any } | null | undefined; + repeatsAt?: Date | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookExecutionStep$inboundSchema: z.ZodType< + UpdateRunbookExecutionStep, + z.ZodTypeDef, + unknown +> = z.object({ + state: z.string(), + schedule_for: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + data: z.nullable(z.record(z.any())).optional(), + repeats_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "schedule_for": "scheduleFor", + "repeats_at": "repeatsAt", + }); +}); + +/** @internal */ +export type UpdateRunbookExecutionStep$Outbound = { + state: string; + schedule_for?: string | null | undefined; + data?: { [k: string]: any } | null | undefined; + repeats_at?: string | null | undefined; +}; + +/** @internal */ +export const UpdateRunbookExecutionStep$outboundSchema: z.ZodType< + UpdateRunbookExecutionStep$Outbound, + z.ZodTypeDef, + UpdateRunbookExecutionStep +> = z.object({ + state: z.string(), + scheduleFor: z.nullable(z.date().transform(v => v.toISOString())).optional(), + data: z.nullable(z.record(z.any())).optional(), + repeatsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + scheduleFor: "schedule_for", + repeatsAt: "repeats_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookExecutionStep$ { + /** @deprecated use `UpdateRunbookExecutionStep$inboundSchema` instead. */ + export const inboundSchema = UpdateRunbookExecutionStep$inboundSchema; + /** @deprecated use `UpdateRunbookExecutionStep$outboundSchema` instead. */ + export const outboundSchema = UpdateRunbookExecutionStep$outboundSchema; + /** @deprecated use `UpdateRunbookExecutionStep$Outbound` instead. */ + export type Outbound = UpdateRunbookExecutionStep$Outbound; +} + +export function updateRunbookExecutionStepToJSON( + updateRunbookExecutionStep: UpdateRunbookExecutionStep, +): string { + return JSON.stringify( + UpdateRunbookExecutionStep$outboundSchema.parse(updateRunbookExecutionStep), + ); +} + +export function updateRunbookExecutionStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateRunbookExecutionStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRunbookExecutionStep' from JSON`, + ); +} diff --git a/src/models/components/updatesavedsearch.ts b/src/models/components/updatesavedsearch.ts new file mode 100644 index 00000000..7d6c96c6 --- /dev/null +++ b/src/models/components/updatesavedsearch.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a specific saved search + */ +export type UpdateSavedSearch = { + isPrivate?: boolean | null | undefined; + name?: string | null | undefined; + filterValues?: { [k: string]: any } | null | undefined; +}; + +/** @internal */ +export const UpdateSavedSearch$inboundSchema: z.ZodType< + UpdateSavedSearch, + z.ZodTypeDef, + unknown +> = z.object({ + is_private: z.nullable(z.boolean()).optional(), + name: z.nullable(z.string()).optional(), + filter_values: z.nullable(z.record(z.any())).optional(), +}).transform((v) => { + return remap$(v, { + "is_private": "isPrivate", + "filter_values": "filterValues", + }); +}); + +/** @internal */ +export type UpdateSavedSearch$Outbound = { + is_private?: boolean | null | undefined; + name?: string | null | undefined; + filter_values?: { [k: string]: any } | null | undefined; +}; + +/** @internal */ +export const UpdateSavedSearch$outboundSchema: z.ZodType< + UpdateSavedSearch$Outbound, + z.ZodTypeDef, + UpdateSavedSearch +> = z.object({ + isPrivate: z.nullable(z.boolean()).optional(), + name: z.nullable(z.string()).optional(), + filterValues: z.nullable(z.record(z.any())).optional(), +}).transform((v) => { + return remap$(v, { + isPrivate: "is_private", + filterValues: "filter_values", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSavedSearch$ { + /** @deprecated use `UpdateSavedSearch$inboundSchema` instead. */ + export const inboundSchema = UpdateSavedSearch$inboundSchema; + /** @deprecated use `UpdateSavedSearch$outboundSchema` instead. */ + export const outboundSchema = UpdateSavedSearch$outboundSchema; + /** @deprecated use `UpdateSavedSearch$Outbound` instead. */ + export type Outbound = UpdateSavedSearch$Outbound; +} + +export function updateSavedSearchToJSON( + updateSavedSearch: UpdateSavedSearch, +): string { + return JSON.stringify( + UpdateSavedSearch$outboundSchema.parse(updateSavedSearch), + ); +} + +export function updateSavedSearchFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSavedSearch$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSavedSearch' from JSON`, + ); +} diff --git a/src/models/components/updatescheduledmaintenance.ts b/src/models/components/updatescheduledmaintenance.ts new file mode 100644 index 00000000..45f60c32 --- /dev/null +++ b/src/models/components/updatescheduledmaintenance.ts @@ -0,0 +1,308 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateScheduledMaintenanceStatusPage = { + /** + * The slug identifying the type of status page + */ + integrationSlug?: string | null | undefined; + /** + * The UUID of the status page to display this maintenance on + */ + connectionId: string; +}; + +export type UpdateScheduledMaintenanceImpact = { + /** + * The type of impact + */ + type: string; + /** + * The id of impact + */ + id: string; + /** + * The id of the condition + */ + conditionId: string; +}; + +/** + * Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. + */ +export type UpdateScheduledMaintenance = { + name?: string | null | undefined; + summary?: string | null | undefined; + /** + * ISO8601 timestamp for the start time of the scheduled maintenance + */ + startsAt?: Date | null | undefined; + /** + * ISO8601 timestamp for the end time of the scheduled maintenance + */ + endsAt?: Date | null | undefined; + description?: string | null | undefined; + /** + * A json object of label keys and values + */ + labels?: { [k: string]: string } | null | undefined; + /** + * An array of status pages to display this maintenance on + */ + statusPages?: Array | null | undefined; + /** + * An array of impact/condition combinations + */ + impacts?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateScheduledMaintenanceStatusPage$inboundSchema: z.ZodType< + UpdateScheduledMaintenanceStatusPage, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: z.nullable(z.string()).optional(), + connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type UpdateScheduledMaintenanceStatusPage$Outbound = { + integration_slug?: string | null | undefined; + connection_id: string; +}; + +/** @internal */ +export const UpdateScheduledMaintenanceStatusPage$outboundSchema: z.ZodType< + UpdateScheduledMaintenanceStatusPage$Outbound, + z.ZodTypeDef, + UpdateScheduledMaintenanceStatusPage +> = z.object({ + integrationSlug: z.nullable(z.string()).optional(), + connectionId: z.string(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScheduledMaintenanceStatusPage$ { + /** @deprecated use `UpdateScheduledMaintenanceStatusPage$inboundSchema` instead. */ + export const inboundSchema = + UpdateScheduledMaintenanceStatusPage$inboundSchema; + /** @deprecated use `UpdateScheduledMaintenanceStatusPage$outboundSchema` instead. */ + export const outboundSchema = + UpdateScheduledMaintenanceStatusPage$outboundSchema; + /** @deprecated use `UpdateScheduledMaintenanceStatusPage$Outbound` instead. */ + export type Outbound = UpdateScheduledMaintenanceStatusPage$Outbound; +} + +export function updateScheduledMaintenanceStatusPageToJSON( + updateScheduledMaintenanceStatusPage: UpdateScheduledMaintenanceStatusPage, +): string { + return JSON.stringify( + UpdateScheduledMaintenanceStatusPage$outboundSchema.parse( + updateScheduledMaintenanceStatusPage, + ), + ); +} + +export function updateScheduledMaintenanceStatusPageFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateScheduledMaintenanceStatusPage$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScheduledMaintenanceStatusPage' from JSON`, + ); +} + +/** @internal */ +export const UpdateScheduledMaintenanceImpact$inboundSchema: z.ZodType< + UpdateScheduledMaintenanceImpact, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string(), + id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type UpdateScheduledMaintenanceImpact$Outbound = { + type: string; + id: string; + condition_id: string; +}; + +/** @internal */ +export const UpdateScheduledMaintenanceImpact$outboundSchema: z.ZodType< + UpdateScheduledMaintenanceImpact$Outbound, + z.ZodTypeDef, + UpdateScheduledMaintenanceImpact +> = z.object({ + type: z.string(), + id: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScheduledMaintenanceImpact$ { + /** @deprecated use `UpdateScheduledMaintenanceImpact$inboundSchema` instead. */ + export const inboundSchema = UpdateScheduledMaintenanceImpact$inboundSchema; + /** @deprecated use `UpdateScheduledMaintenanceImpact$outboundSchema` instead. */ + export const outboundSchema = UpdateScheduledMaintenanceImpact$outboundSchema; + /** @deprecated use `UpdateScheduledMaintenanceImpact$Outbound` instead. */ + export type Outbound = UpdateScheduledMaintenanceImpact$Outbound; +} + +export function updateScheduledMaintenanceImpactToJSON( + updateScheduledMaintenanceImpact: UpdateScheduledMaintenanceImpact, +): string { + return JSON.stringify( + UpdateScheduledMaintenanceImpact$outboundSchema.parse( + updateScheduledMaintenanceImpact, + ), + ); +} + +export function updateScheduledMaintenanceImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScheduledMaintenanceImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScheduledMaintenanceImpact' from JSON`, + ); +} + +/** @internal */ +export const UpdateScheduledMaintenance$inboundSchema: z.ZodType< + UpdateScheduledMaintenance, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + starts_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + status_pages: z.nullable( + z.array(z.lazy(() => UpdateScheduledMaintenanceStatusPage$inboundSchema)), + ).optional(), + impacts: z.nullable( + z.array(z.lazy(() => UpdateScheduledMaintenanceImpact$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "starts_at": "startsAt", + "ends_at": "endsAt", + "status_pages": "statusPages", + }); +}); + +/** @internal */ +export type UpdateScheduledMaintenance$Outbound = { + name?: string | null | undefined; + summary?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; + description?: string | null | undefined; + labels?: { [k: string]: string } | null | undefined; + status_pages?: + | Array + | null + | undefined; + impacts?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateScheduledMaintenance$outboundSchema: z.ZodType< + UpdateScheduledMaintenance$Outbound, + z.ZodTypeDef, + UpdateScheduledMaintenance +> = z.object({ + name: z.nullable(z.string()).optional(), + summary: z.nullable(z.string()).optional(), + startsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + description: z.nullable(z.string()).optional(), + labels: z.nullable(z.record(z.string())).optional(), + statusPages: z.nullable( + z.array(z.lazy(() => UpdateScheduledMaintenanceStatusPage$outboundSchema)), + ).optional(), + impacts: z.nullable( + z.array(z.lazy(() => UpdateScheduledMaintenanceImpact$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + startsAt: "starts_at", + endsAt: "ends_at", + statusPages: "status_pages", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScheduledMaintenance$ { + /** @deprecated use `UpdateScheduledMaintenance$inboundSchema` instead. */ + export const inboundSchema = UpdateScheduledMaintenance$inboundSchema; + /** @deprecated use `UpdateScheduledMaintenance$outboundSchema` instead. */ + export const outboundSchema = UpdateScheduledMaintenance$outboundSchema; + /** @deprecated use `UpdateScheduledMaintenance$Outbound` instead. */ + export type Outbound = UpdateScheduledMaintenance$Outbound; +} + +export function updateScheduledMaintenanceToJSON( + updateScheduledMaintenance: UpdateScheduledMaintenance, +): string { + return JSON.stringify( + UpdateScheduledMaintenance$outboundSchema.parse(updateScheduledMaintenance), + ); +} + +export function updateScheduledMaintenanceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScheduledMaintenance$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScheduledMaintenance' from JSON`, + ); +} diff --git a/src/models/components/updatescimgroup.ts b/src/models/components/updatescimgroup.ts new file mode 100644 index 00000000..44473cb8 --- /dev/null +++ b/src/models/components/updatescimgroup.ts @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateScimGroupMember = { + /** + * String that represents the user's UUID to assign to the team + */ + value: string; +}; + +/** + * SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. + */ +export type UpdateScimGroup = { + /** + * The name of the team being updated + */ + displayName: string; + members: Array; +}; + +/** @internal */ +export const UpdateScimGroupMember$inboundSchema: z.ZodType< + UpdateScimGroupMember, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string(), +}); + +/** @internal */ +export type UpdateScimGroupMember$Outbound = { + value: string; +}; + +/** @internal */ +export const UpdateScimGroupMember$outboundSchema: z.ZodType< + UpdateScimGroupMember$Outbound, + z.ZodTypeDef, + UpdateScimGroupMember +> = z.object({ + value: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScimGroupMember$ { + /** @deprecated use `UpdateScimGroupMember$inboundSchema` instead. */ + export const inboundSchema = UpdateScimGroupMember$inboundSchema; + /** @deprecated use `UpdateScimGroupMember$outboundSchema` instead. */ + export const outboundSchema = UpdateScimGroupMember$outboundSchema; + /** @deprecated use `UpdateScimGroupMember$Outbound` instead. */ + export type Outbound = UpdateScimGroupMember$Outbound; +} + +export function updateScimGroupMemberToJSON( + updateScimGroupMember: UpdateScimGroupMember, +): string { + return JSON.stringify( + UpdateScimGroupMember$outboundSchema.parse(updateScimGroupMember), + ); +} + +export function updateScimGroupMemberFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScimGroupMember$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScimGroupMember' from JSON`, + ); +} + +/** @internal */ +export const UpdateScimGroup$inboundSchema: z.ZodType< + UpdateScimGroup, + z.ZodTypeDef, + unknown +> = z.object({ + displayName: z.string(), + members: z.array(z.lazy(() => UpdateScimGroupMember$inboundSchema)), +}); + +/** @internal */ +export type UpdateScimGroup$Outbound = { + displayName: string; + members: Array; +}; + +/** @internal */ +export const UpdateScimGroup$outboundSchema: z.ZodType< + UpdateScimGroup$Outbound, + z.ZodTypeDef, + UpdateScimGroup +> = z.object({ + displayName: z.string(), + members: z.array(z.lazy(() => UpdateScimGroupMember$outboundSchema)), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScimGroup$ { + /** @deprecated use `UpdateScimGroup$inboundSchema` instead. */ + export const inboundSchema = UpdateScimGroup$inboundSchema; + /** @deprecated use `UpdateScimGroup$outboundSchema` instead. */ + export const outboundSchema = UpdateScimGroup$outboundSchema; + /** @deprecated use `UpdateScimGroup$Outbound` instead. */ + export type Outbound = UpdateScimGroup$Outbound; +} + +export function updateScimGroupToJSON( + updateScimGroup: UpdateScimGroup, +): string { + return JSON.stringify(UpdateScimGroup$outboundSchema.parse(updateScimGroup)); +} + +export function updateScimGroupFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScimGroup$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScimGroup' from JSON`, + ); +} diff --git a/src/models/components/updatescimuser.ts b/src/models/components/updatescimuser.ts new file mode 100644 index 00000000..e137a585 --- /dev/null +++ b/src/models/components/updatescimuser.ts @@ -0,0 +1,291 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The components of the user's name + */ +export type UpdateScimUserName = { + /** + * The family name of the User, or last name in most Western languages + */ + givenName: string; + /** + * The given name of the User, or first name in most Western languages + */ + familyName: string; +}; + +export type UpdateScimUserEmail = { + /** + * String that represents an email address for the User + */ + value: string; + /** + * Boolean which signifies if an email is intended as the primary email for the User + */ + primary?: boolean | null | undefined; +}; + +/** + * Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. + */ +export type UpdateScimUserRoles = {}; + +/** + * PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. + */ +export type UpdateScimUser = { + /** + * A service provider's unique identifier for the user + */ + userName?: string | null | undefined; + /** + * The components of the user's name + */ + name?: UpdateScimUserName | null | undefined; + /** + * Email addresses for the User + */ + emails?: Array | null | undefined; + /** + * Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects. + */ + roles?: UpdateScimUserRoles | null | undefined; + /** + * Boolean that represents whether user is active + */ + active?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateScimUserName$inboundSchema: z.ZodType< + UpdateScimUserName, + z.ZodTypeDef, + unknown +> = z.object({ + givenName: z.string(), + familyName: z.string(), +}); + +/** @internal */ +export type UpdateScimUserName$Outbound = { + givenName: string; + familyName: string; +}; + +/** @internal */ +export const UpdateScimUserName$outboundSchema: z.ZodType< + UpdateScimUserName$Outbound, + z.ZodTypeDef, + UpdateScimUserName +> = z.object({ + givenName: z.string(), + familyName: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScimUserName$ { + /** @deprecated use `UpdateScimUserName$inboundSchema` instead. */ + export const inboundSchema = UpdateScimUserName$inboundSchema; + /** @deprecated use `UpdateScimUserName$outboundSchema` instead. */ + export const outboundSchema = UpdateScimUserName$outboundSchema; + /** @deprecated use `UpdateScimUserName$Outbound` instead. */ + export type Outbound = UpdateScimUserName$Outbound; +} + +export function updateScimUserNameToJSON( + updateScimUserName: UpdateScimUserName, +): string { + return JSON.stringify( + UpdateScimUserName$outboundSchema.parse(updateScimUserName), + ); +} + +export function updateScimUserNameFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScimUserName$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScimUserName' from JSON`, + ); +} + +/** @internal */ +export const UpdateScimUserEmail$inboundSchema: z.ZodType< + UpdateScimUserEmail, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string(), + primary: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type UpdateScimUserEmail$Outbound = { + value: string; + primary?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateScimUserEmail$outboundSchema: z.ZodType< + UpdateScimUserEmail$Outbound, + z.ZodTypeDef, + UpdateScimUserEmail +> = z.object({ + value: z.string(), + primary: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScimUserEmail$ { + /** @deprecated use `UpdateScimUserEmail$inboundSchema` instead. */ + export const inboundSchema = UpdateScimUserEmail$inboundSchema; + /** @deprecated use `UpdateScimUserEmail$outboundSchema` instead. */ + export const outboundSchema = UpdateScimUserEmail$outboundSchema; + /** @deprecated use `UpdateScimUserEmail$Outbound` instead. */ + export type Outbound = UpdateScimUserEmail$Outbound; +} + +export function updateScimUserEmailToJSON( + updateScimUserEmail: UpdateScimUserEmail, +): string { + return JSON.stringify( + UpdateScimUserEmail$outboundSchema.parse(updateScimUserEmail), + ); +} + +export function updateScimUserEmailFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScimUserEmail$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScimUserEmail' from JSON`, + ); +} + +/** @internal */ +export const UpdateScimUserRoles$inboundSchema: z.ZodType< + UpdateScimUserRoles, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type UpdateScimUserRoles$Outbound = {}; + +/** @internal */ +export const UpdateScimUserRoles$outboundSchema: z.ZodType< + UpdateScimUserRoles$Outbound, + z.ZodTypeDef, + UpdateScimUserRoles +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScimUserRoles$ { + /** @deprecated use `UpdateScimUserRoles$inboundSchema` instead. */ + export const inboundSchema = UpdateScimUserRoles$inboundSchema; + /** @deprecated use `UpdateScimUserRoles$outboundSchema` instead. */ + export const outboundSchema = UpdateScimUserRoles$outboundSchema; + /** @deprecated use `UpdateScimUserRoles$Outbound` instead. */ + export type Outbound = UpdateScimUserRoles$Outbound; +} + +export function updateScimUserRolesToJSON( + updateScimUserRoles: UpdateScimUserRoles, +): string { + return JSON.stringify( + UpdateScimUserRoles$outboundSchema.parse(updateScimUserRoles), + ); +} + +export function updateScimUserRolesFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScimUserRoles$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScimUserRoles' from JSON`, + ); +} + +/** @internal */ +export const UpdateScimUser$inboundSchema: z.ZodType< + UpdateScimUser, + z.ZodTypeDef, + unknown +> = z.object({ + userName: z.nullable(z.string()).optional(), + name: z.nullable(z.lazy(() => UpdateScimUserName$inboundSchema)).optional(), + emails: z.nullable(z.array(z.lazy(() => UpdateScimUserEmail$inboundSchema))) + .optional(), + roles: z.nullable(z.lazy(() => UpdateScimUserRoles$inboundSchema)).optional(), + active: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type UpdateScimUser$Outbound = { + userName?: string | null | undefined; + name?: UpdateScimUserName$Outbound | null | undefined; + emails?: Array | null | undefined; + roles?: UpdateScimUserRoles$Outbound | null | undefined; + active?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateScimUser$outboundSchema: z.ZodType< + UpdateScimUser$Outbound, + z.ZodTypeDef, + UpdateScimUser +> = z.object({ + userName: z.nullable(z.string()).optional(), + name: z.nullable(z.lazy(() => UpdateScimUserName$outboundSchema)).optional(), + emails: z.nullable(z.array(z.lazy(() => UpdateScimUserEmail$outboundSchema))) + .optional(), + roles: z.nullable(z.lazy(() => UpdateScimUserRoles$outboundSchema)) + .optional(), + active: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateScimUser$ { + /** @deprecated use `UpdateScimUser$inboundSchema` instead. */ + export const inboundSchema = UpdateScimUser$inboundSchema; + /** @deprecated use `UpdateScimUser$outboundSchema` instead. */ + export const outboundSchema = UpdateScimUser$outboundSchema; + /** @deprecated use `UpdateScimUser$Outbound` instead. */ + export type Outbound = UpdateScimUser$Outbound; +} + +export function updateScimUserToJSON(updateScimUser: UpdateScimUser): string { + return JSON.stringify(UpdateScimUser$outboundSchema.parse(updateScimUser)); +} + +export function updateScimUserFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateScimUser$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateScimUser' from JSON`, + ); +} diff --git a/src/models/components/updateservice.ts b/src/models/components/updateservice.ts new file mode 100644 index 00000000..4deb9815 --- /dev/null +++ b/src/models/components/updateservice.ts @@ -0,0 +1,701 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type Checklist = { + id: string; + /** + * Set to `true` to remove checklist from service + */ + remove?: boolean | null | undefined; +}; + +export type UpdateServiceExternalResource = { + remoteId: string; + /** + * The integration slug for the external resource. Can be one of: github, opsgenie, pager_duty, victorops. Not required if the resource has already been imported. + */ + connectionType?: string | null | undefined; + /** + * If you are trying to remove an external resource from a service, set this to 'true'. + */ + remove?: boolean | null | undefined; +}; + +export type UpdateServiceFunctionality = { + /** + * If you are trying to reuse a functionality, you may set the ID to attach it to the service + */ + id?: string | null | undefined; + /** + * If you are trying to remove a functionality from a service, set this to 'true' + */ + remove?: boolean | null | undefined; + /** + * If you are trying to create a new functionality and attach it to this service, set the summary key + */ + summary?: string | null | undefined; +}; + +export type UpdateServiceLink = { + /** + * URL + */ + hrefUrl: string; + /** + * Short name used to display and identify this link + */ + name: string; + /** + * An optional URL to an icon representing this link + */ + iconUrl?: string | null | undefined; + /** + * If you are trying to remove a link, set this to 'true' + */ + remove?: boolean | null | undefined; + /** + * If updating an existing link, specify it's id. + */ + id?: string | null | undefined; +}; + +/** + * An object representing a Team that owns the service + */ +export type UpdateServiceOwner = { + id: string; +}; + +/** + * Integer representing service tier + */ +export const UpdateServiceServiceTier = { + Zero: 0, + One: 1, + Two: 2, + Three: 3, + Four: 4, + Five: 5, +} as const; +/** + * Integer representing service tier + */ +export type UpdateServiceServiceTier = ClosedEnum< + typeof UpdateServiceServiceTier +>; + +export type UpdateServiceTeam = { + id: string; + /** + * If you are trying to remove a team from a service, set this to 'true' + */ + remove?: boolean | null | undefined; +}; + +/** + * Update a services attributes, you may also add or remove functionalities from the service as well. + * + * @remarks + * Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. + */ +export type UpdateService = { + alertOnAdd?: boolean | null | undefined; + autoAddRespondingTeam?: boolean | null | undefined; + /** + * Array of checklist IDs to attach to the service + */ + checklists?: Array | null | undefined; + description?: string | null | undefined; + /** + * An array of external resources to attach to this service. + */ + externalResources?: Array | null | undefined; + /** + * An array of functionalities + */ + functionalities?: Array | null | undefined; + /** + * A hash of label keys and values + */ + labels?: { [k: string]: string } | null | undefined; + /** + * An array of links to associate with this service. This will remove all links not present in the patch. Only acts if 'links' key is included in the payload. + */ + links?: Array | null | undefined; + name?: string | null | undefined; + /** + * An object representing a Team that owns the service + */ + owner?: UpdateServiceOwner | null | undefined; + /** + * If you are trying to remove a team as an owner from a service, set this to 'true' + */ + removeOwner?: boolean | null | undefined; + /** + * If set to true, any checklists tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the checklists + */ + removeRemainingChecklists?: boolean | null | undefined; + /** + * If set to true, any external_resources tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the external_resources + */ + removeRemainingExternalResources?: boolean | null | undefined; + /** + * If set to true, any functionalities tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the functionalities + */ + removeRemainingFunctionalities?: boolean | null | undefined; + /** + * If set to true, any teams tagged on the service that are not included in the given array will be removed. Set this to true if you want to do a replacement operation for the teams + */ + removeRemainingTeams?: boolean | null | undefined; + /** + * Integer representing service tier + */ + serviceTier?: UpdateServiceServiceTier | null | undefined; + /** + * An array of teams to attach to this service. + */ + teams?: Array | null | undefined; +}; + +/** @internal */ +export const Checklist$inboundSchema: z.ZodType< + Checklist, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type Checklist$Outbound = { + id: string; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const Checklist$outboundSchema: z.ZodType< + Checklist$Outbound, + z.ZodTypeDef, + Checklist +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Checklist$ { + /** @deprecated use `Checklist$inboundSchema` instead. */ + export const inboundSchema = Checklist$inboundSchema; + /** @deprecated use `Checklist$outboundSchema` instead. */ + export const outboundSchema = Checklist$outboundSchema; + /** @deprecated use `Checklist$Outbound` instead. */ + export type Outbound = Checklist$Outbound; +} + +export function checklistToJSON(checklist: Checklist): string { + return JSON.stringify(Checklist$outboundSchema.parse(checklist)); +} + +export function checklistFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Checklist$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Checklist' from JSON`, + ); +} + +/** @internal */ +export const UpdateServiceExternalResource$inboundSchema: z.ZodType< + UpdateServiceExternalResource, + z.ZodTypeDef, + unknown +> = z.object({ + remote_id: z.string(), + connection_type: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "remote_id": "remoteId", + "connection_type": "connectionType", + }); +}); + +/** @internal */ +export type UpdateServiceExternalResource$Outbound = { + remote_id: string; + connection_type?: string | null | undefined; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateServiceExternalResource$outboundSchema: z.ZodType< + UpdateServiceExternalResource$Outbound, + z.ZodTypeDef, + UpdateServiceExternalResource +> = z.object({ + remoteId: z.string(), + connectionType: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + remoteId: "remote_id", + connectionType: "connection_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServiceExternalResource$ { + /** @deprecated use `UpdateServiceExternalResource$inboundSchema` instead. */ + export const inboundSchema = UpdateServiceExternalResource$inboundSchema; + /** @deprecated use `UpdateServiceExternalResource$outboundSchema` instead. */ + export const outboundSchema = UpdateServiceExternalResource$outboundSchema; + /** @deprecated use `UpdateServiceExternalResource$Outbound` instead. */ + export type Outbound = UpdateServiceExternalResource$Outbound; +} + +export function updateServiceExternalResourceToJSON( + updateServiceExternalResource: UpdateServiceExternalResource, +): string { + return JSON.stringify( + UpdateServiceExternalResource$outboundSchema.parse( + updateServiceExternalResource, + ), + ); +} + +export function updateServiceExternalResourceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServiceExternalResource$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServiceExternalResource' from JSON`, + ); +} + +/** @internal */ +export const UpdateServiceFunctionality$inboundSchema: z.ZodType< + UpdateServiceFunctionality, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), + summary: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateServiceFunctionality$Outbound = { + id?: string | null | undefined; + remove?: boolean | null | undefined; + summary?: string | null | undefined; +}; + +/** @internal */ +export const UpdateServiceFunctionality$outboundSchema: z.ZodType< + UpdateServiceFunctionality$Outbound, + z.ZodTypeDef, + UpdateServiceFunctionality +> = z.object({ + id: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), + summary: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServiceFunctionality$ { + /** @deprecated use `UpdateServiceFunctionality$inboundSchema` instead. */ + export const inboundSchema = UpdateServiceFunctionality$inboundSchema; + /** @deprecated use `UpdateServiceFunctionality$outboundSchema` instead. */ + export const outboundSchema = UpdateServiceFunctionality$outboundSchema; + /** @deprecated use `UpdateServiceFunctionality$Outbound` instead. */ + export type Outbound = UpdateServiceFunctionality$Outbound; +} + +export function updateServiceFunctionalityToJSON( + updateServiceFunctionality: UpdateServiceFunctionality, +): string { + return JSON.stringify( + UpdateServiceFunctionality$outboundSchema.parse(updateServiceFunctionality), + ); +} + +export function updateServiceFunctionalityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServiceFunctionality$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServiceFunctionality' from JSON`, + ); +} + +/** @internal */ +export const UpdateServiceLink$inboundSchema: z.ZodType< + UpdateServiceLink, + z.ZodTypeDef, + unknown +> = z.object({ + href_url: z.string(), + name: z.string(), + icon_url: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), + id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "href_url": "hrefUrl", + "icon_url": "iconUrl", + }); +}); + +/** @internal */ +export type UpdateServiceLink$Outbound = { + href_url: string; + name: string; + icon_url?: string | null | undefined; + remove?: boolean | null | undefined; + id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateServiceLink$outboundSchema: z.ZodType< + UpdateServiceLink$Outbound, + z.ZodTypeDef, + UpdateServiceLink +> = z.object({ + hrefUrl: z.string(), + name: z.string(), + iconUrl: z.nullable(z.string()).optional(), + remove: z.nullable(z.boolean()).optional(), + id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + hrefUrl: "href_url", + iconUrl: "icon_url", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServiceLink$ { + /** @deprecated use `UpdateServiceLink$inboundSchema` instead. */ + export const inboundSchema = UpdateServiceLink$inboundSchema; + /** @deprecated use `UpdateServiceLink$outboundSchema` instead. */ + export const outboundSchema = UpdateServiceLink$outboundSchema; + /** @deprecated use `UpdateServiceLink$Outbound` instead. */ + export type Outbound = UpdateServiceLink$Outbound; +} + +export function updateServiceLinkToJSON( + updateServiceLink: UpdateServiceLink, +): string { + return JSON.stringify( + UpdateServiceLink$outboundSchema.parse(updateServiceLink), + ); +} + +export function updateServiceLinkFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServiceLink$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServiceLink' from JSON`, + ); +} + +/** @internal */ +export const UpdateServiceOwner$inboundSchema: z.ZodType< + UpdateServiceOwner, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type UpdateServiceOwner$Outbound = { + id: string; +}; + +/** @internal */ +export const UpdateServiceOwner$outboundSchema: z.ZodType< + UpdateServiceOwner$Outbound, + z.ZodTypeDef, + UpdateServiceOwner +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServiceOwner$ { + /** @deprecated use `UpdateServiceOwner$inboundSchema` instead. */ + export const inboundSchema = UpdateServiceOwner$inboundSchema; + /** @deprecated use `UpdateServiceOwner$outboundSchema` instead. */ + export const outboundSchema = UpdateServiceOwner$outboundSchema; + /** @deprecated use `UpdateServiceOwner$Outbound` instead. */ + export type Outbound = UpdateServiceOwner$Outbound; +} + +export function updateServiceOwnerToJSON( + updateServiceOwner: UpdateServiceOwner, +): string { + return JSON.stringify( + UpdateServiceOwner$outboundSchema.parse(updateServiceOwner), + ); +} + +export function updateServiceOwnerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServiceOwner$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServiceOwner' from JSON`, + ); +} + +/** @internal */ +export const UpdateServiceServiceTier$inboundSchema: z.ZodNativeEnum< + typeof UpdateServiceServiceTier +> = z.nativeEnum(UpdateServiceServiceTier); + +/** @internal */ +export const UpdateServiceServiceTier$outboundSchema: z.ZodNativeEnum< + typeof UpdateServiceServiceTier +> = UpdateServiceServiceTier$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServiceServiceTier$ { + /** @deprecated use `UpdateServiceServiceTier$inboundSchema` instead. */ + export const inboundSchema = UpdateServiceServiceTier$inboundSchema; + /** @deprecated use `UpdateServiceServiceTier$outboundSchema` instead. */ + export const outboundSchema = UpdateServiceServiceTier$outboundSchema; +} + +/** @internal */ +export const UpdateServiceTeam$inboundSchema: z.ZodType< + UpdateServiceTeam, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type UpdateServiceTeam$Outbound = { + id: string; + remove?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateServiceTeam$outboundSchema: z.ZodType< + UpdateServiceTeam$Outbound, + z.ZodTypeDef, + UpdateServiceTeam +> = z.object({ + id: z.string(), + remove: z.nullable(z.boolean()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServiceTeam$ { + /** @deprecated use `UpdateServiceTeam$inboundSchema` instead. */ + export const inboundSchema = UpdateServiceTeam$inboundSchema; + /** @deprecated use `UpdateServiceTeam$outboundSchema` instead. */ + export const outboundSchema = UpdateServiceTeam$outboundSchema; + /** @deprecated use `UpdateServiceTeam$Outbound` instead. */ + export type Outbound = UpdateServiceTeam$Outbound; +} + +export function updateServiceTeamToJSON( + updateServiceTeam: UpdateServiceTeam, +): string { + return JSON.stringify( + UpdateServiceTeam$outboundSchema.parse(updateServiceTeam), + ); +} + +export function updateServiceTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServiceTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServiceTeam' from JSON`, + ); +} + +/** @internal */ +export const UpdateService$inboundSchema: z.ZodType< + UpdateService, + z.ZodTypeDef, + unknown +> = z.object({ + alert_on_add: z.nullable(z.boolean()).optional(), + auto_add_responding_team: z.nullable(z.boolean()).optional(), + checklists: z.nullable(z.array(z.lazy(() => Checklist$inboundSchema))) + .optional(), + description: z.nullable(z.string()).optional(), + external_resources: z.nullable( + z.array(z.lazy(() => UpdateServiceExternalResource$inboundSchema)), + ).optional(), + functionalities: z.nullable( + z.array(z.lazy(() => UpdateServiceFunctionality$inboundSchema)), + ).optional(), + labels: z.nullable(z.record(z.string())).optional(), + links: z.nullable(z.array(z.lazy(() => UpdateServiceLink$inboundSchema))) + .optional(), + name: z.nullable(z.string()).optional(), + owner: z.nullable(z.lazy(() => UpdateServiceOwner$inboundSchema)).optional(), + remove_owner: z.nullable(z.boolean()).optional(), + remove_remaining_checklists: z.nullable(z.boolean()).optional(), + remove_remaining_external_resources: z.nullable(z.boolean()).optional(), + remove_remaining_functionalities: z.nullable(z.boolean()).optional(), + remove_remaining_teams: z.nullable(z.boolean()).optional(), + service_tier: z.nullable(UpdateServiceServiceTier$inboundSchema).optional(), + teams: z.nullable(z.array(z.lazy(() => UpdateServiceTeam$inboundSchema))) + .optional(), +}).transform((v) => { + return remap$(v, { + "alert_on_add": "alertOnAdd", + "auto_add_responding_team": "autoAddRespondingTeam", + "external_resources": "externalResources", + "remove_owner": "removeOwner", + "remove_remaining_checklists": "removeRemainingChecklists", + "remove_remaining_external_resources": "removeRemainingExternalResources", + "remove_remaining_functionalities": "removeRemainingFunctionalities", + "remove_remaining_teams": "removeRemainingTeams", + "service_tier": "serviceTier", + }); +}); + +/** @internal */ +export type UpdateService$Outbound = { + alert_on_add?: boolean | null | undefined; + auto_add_responding_team?: boolean | null | undefined; + checklists?: Array | null | undefined; + description?: string | null | undefined; + external_resources?: + | Array + | null + | undefined; + functionalities?: + | Array + | null + | undefined; + labels?: { [k: string]: string } | null | undefined; + links?: Array | null | undefined; + name?: string | null | undefined; + owner?: UpdateServiceOwner$Outbound | null | undefined; + remove_owner?: boolean | null | undefined; + remove_remaining_checklists?: boolean | null | undefined; + remove_remaining_external_resources?: boolean | null | undefined; + remove_remaining_functionalities?: boolean | null | undefined; + remove_remaining_teams?: boolean | null | undefined; + service_tier?: number | null | undefined; + teams?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateService$outboundSchema: z.ZodType< + UpdateService$Outbound, + z.ZodTypeDef, + UpdateService +> = z.object({ + alertOnAdd: z.nullable(z.boolean()).optional(), + autoAddRespondingTeam: z.nullable(z.boolean()).optional(), + checklists: z.nullable(z.array(z.lazy(() => Checklist$outboundSchema))) + .optional(), + description: z.nullable(z.string()).optional(), + externalResources: z.nullable( + z.array(z.lazy(() => UpdateServiceExternalResource$outboundSchema)), + ).optional(), + functionalities: z.nullable( + z.array(z.lazy(() => UpdateServiceFunctionality$outboundSchema)), + ).optional(), + labels: z.nullable(z.record(z.string())).optional(), + links: z.nullable(z.array(z.lazy(() => UpdateServiceLink$outboundSchema))) + .optional(), + name: z.nullable(z.string()).optional(), + owner: z.nullable(z.lazy(() => UpdateServiceOwner$outboundSchema)).optional(), + removeOwner: z.nullable(z.boolean()).optional(), + removeRemainingChecklists: z.nullable(z.boolean()).optional(), + removeRemainingExternalResources: z.nullable(z.boolean()).optional(), + removeRemainingFunctionalities: z.nullable(z.boolean()).optional(), + removeRemainingTeams: z.nullable(z.boolean()).optional(), + serviceTier: z.nullable(UpdateServiceServiceTier$outboundSchema).optional(), + teams: z.nullable(z.array(z.lazy(() => UpdateServiceTeam$outboundSchema))) + .optional(), +}).transform((v) => { + return remap$(v, { + alertOnAdd: "alert_on_add", + autoAddRespondingTeam: "auto_add_responding_team", + externalResources: "external_resources", + removeOwner: "remove_owner", + removeRemainingChecklists: "remove_remaining_checklists", + removeRemainingExternalResources: "remove_remaining_external_resources", + removeRemainingFunctionalities: "remove_remaining_functionalities", + removeRemainingTeams: "remove_remaining_teams", + serviceTier: "service_tier", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateService$ { + /** @deprecated use `UpdateService$inboundSchema` instead. */ + export const inboundSchema = UpdateService$inboundSchema; + /** @deprecated use `UpdateService$outboundSchema` instead. */ + export const outboundSchema = UpdateService$outboundSchema; + /** @deprecated use `UpdateService$Outbound` instead. */ + export type Outbound = UpdateService$Outbound; +} + +export function updateServiceToJSON(updateService: UpdateService): string { + return JSON.stringify(UpdateService$outboundSchema.parse(updateService)); +} + +export function updateServiceFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateService$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateService' from JSON`, + ); +} diff --git a/src/models/components/updateservicedependency.ts b/src/models/components/updateservicedependency.ts new file mode 100644 index 00000000..17bc37a6 --- /dev/null +++ b/src/models/components/updateservicedependency.ts @@ -0,0 +1,72 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update the notes of the service dependency + */ +export type UpdateServiceDependency = { + /** + * A note to describe the service dependency relationship + */ + notes?: string | null | undefined; +}; + +/** @internal */ +export const UpdateServiceDependency$inboundSchema: z.ZodType< + UpdateServiceDependency, + z.ZodTypeDef, + unknown +> = z.object({ + notes: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateServiceDependency$Outbound = { + notes?: string | null | undefined; +}; + +/** @internal */ +export const UpdateServiceDependency$outboundSchema: z.ZodType< + UpdateServiceDependency$Outbound, + z.ZodTypeDef, + UpdateServiceDependency +> = z.object({ + notes: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateServiceDependency$ { + /** @deprecated use `UpdateServiceDependency$inboundSchema` instead. */ + export const inboundSchema = UpdateServiceDependency$inboundSchema; + /** @deprecated use `UpdateServiceDependency$outboundSchema` instead. */ + export const outboundSchema = UpdateServiceDependency$outboundSchema; + /** @deprecated use `UpdateServiceDependency$Outbound` instead. */ + export type Outbound = UpdateServiceDependency$Outbound; +} + +export function updateServiceDependencyToJSON( + updateServiceDependency: UpdateServiceDependency, +): string { + return JSON.stringify( + UpdateServiceDependency$outboundSchema.parse(updateServiceDependency), + ); +} + +export function updateServiceDependencyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateServiceDependency$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateServiceDependency' from JSON`, + ); +} diff --git a/src/models/components/updateseverity.ts b/src/models/components/updateseverity.ts new file mode 100644 index 00000000..e0289a71 --- /dev/null +++ b/src/models/components/updateseverity.ts @@ -0,0 +1,109 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const UpdateSeverityColor = { + Red: "red", + Orange: "orange", + Yellow: "yellow", + Blue: "blue", + Teal: "teal", + Grey: "grey", +} as const; +export type UpdateSeverityColor = ClosedEnum; + +/** + * Update a specific severity + */ +export type UpdateSeverity = { + slug?: string | null | undefined; + description?: string | null | undefined; + position?: number | null | undefined; + color?: UpdateSeverityColor | null | undefined; +}; + +/** @internal */ +export const UpdateSeverityColor$inboundSchema: z.ZodNativeEnum< + typeof UpdateSeverityColor +> = z.nativeEnum(UpdateSeverityColor); + +/** @internal */ +export const UpdateSeverityColor$outboundSchema: z.ZodNativeEnum< + typeof UpdateSeverityColor +> = UpdateSeverityColor$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSeverityColor$ { + /** @deprecated use `UpdateSeverityColor$inboundSchema` instead. */ + export const inboundSchema = UpdateSeverityColor$inboundSchema; + /** @deprecated use `UpdateSeverityColor$outboundSchema` instead. */ + export const outboundSchema = UpdateSeverityColor$outboundSchema; +} + +/** @internal */ +export const UpdateSeverity$inboundSchema: z.ZodType< + UpdateSeverity, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + color: z.nullable(UpdateSeverityColor$inboundSchema).optional(), +}); + +/** @internal */ +export type UpdateSeverity$Outbound = { + slug?: string | null | undefined; + description?: string | null | undefined; + position?: number | null | undefined; + color?: string | null | undefined; +}; + +/** @internal */ +export const UpdateSeverity$outboundSchema: z.ZodType< + UpdateSeverity$Outbound, + z.ZodTypeDef, + UpdateSeverity +> = z.object({ + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + color: z.nullable(UpdateSeverityColor$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSeverity$ { + /** @deprecated use `UpdateSeverity$inboundSchema` instead. */ + export const inboundSchema = UpdateSeverity$inboundSchema; + /** @deprecated use `UpdateSeverity$outboundSchema` instead. */ + export const outboundSchema = UpdateSeverity$outboundSchema; + /** @deprecated use `UpdateSeverity$Outbound` instead. */ + export type Outbound = UpdateSeverity$Outbound; +} + +export function updateSeverityToJSON(updateSeverity: UpdateSeverity): string { + return JSON.stringify(UpdateSeverity$outboundSchema.parse(updateSeverity)); +} + +export function updateSeverityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSeverity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSeverity' from JSON`, + ); +} diff --git a/src/models/components/updateseveritymatrix.ts b/src/models/components/updateseveritymatrix.ts new file mode 100644 index 00000000..9cf74755 --- /dev/null +++ b/src/models/components/updateseveritymatrix.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateSeverityMatrixData = { + /** + * Slug of a severity + */ + severity: string; + /** + * Impact id + */ + impactId: string; + /** + * Condition id + */ + conditionId: string; +}; + +/** + * Update available severities and impacts in your organization's severity matrix. + */ +export type UpdateSeverityMatrix = { + summary?: string | null | undefined; + data: Array; +}; + +/** @internal */ +export const UpdateSeverityMatrixData$inboundSchema: z.ZodType< + UpdateSeverityMatrixData, + z.ZodTypeDef, + unknown +> = z.object({ + severity: z.string(), + impact_id: z.string(), + condition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "impact_id": "impactId", + "condition_id": "conditionId", + }); +}); + +/** @internal */ +export type UpdateSeverityMatrixData$Outbound = { + severity: string; + impact_id: string; + condition_id: string; +}; + +/** @internal */ +export const UpdateSeverityMatrixData$outboundSchema: z.ZodType< + UpdateSeverityMatrixData$Outbound, + z.ZodTypeDef, + UpdateSeverityMatrixData +> = z.object({ + severity: z.string(), + impactId: z.string(), + conditionId: z.string(), +}).transform((v) => { + return remap$(v, { + impactId: "impact_id", + conditionId: "condition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSeverityMatrixData$ { + /** @deprecated use `UpdateSeverityMatrixData$inboundSchema` instead. */ + export const inboundSchema = UpdateSeverityMatrixData$inboundSchema; + /** @deprecated use `UpdateSeverityMatrixData$outboundSchema` instead. */ + export const outboundSchema = UpdateSeverityMatrixData$outboundSchema; + /** @deprecated use `UpdateSeverityMatrixData$Outbound` instead. */ + export type Outbound = UpdateSeverityMatrixData$Outbound; +} + +export function updateSeverityMatrixDataToJSON( + updateSeverityMatrixData: UpdateSeverityMatrixData, +): string { + return JSON.stringify( + UpdateSeverityMatrixData$outboundSchema.parse(updateSeverityMatrixData), + ); +} + +export function updateSeverityMatrixDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSeverityMatrixData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSeverityMatrixData' from JSON`, + ); +} + +/** @internal */ +export const UpdateSeverityMatrix$inboundSchema: z.ZodType< + UpdateSeverityMatrix, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + data: z.array(z.lazy(() => UpdateSeverityMatrixData$inboundSchema)), +}); + +/** @internal */ +export type UpdateSeverityMatrix$Outbound = { + summary?: string | null | undefined; + data: Array; +}; + +/** @internal */ +export const UpdateSeverityMatrix$outboundSchema: z.ZodType< + UpdateSeverityMatrix$Outbound, + z.ZodTypeDef, + UpdateSeverityMatrix +> = z.object({ + summary: z.nullable(z.string()).optional(), + data: z.array(z.lazy(() => UpdateSeverityMatrixData$outboundSchema)), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSeverityMatrix$ { + /** @deprecated use `UpdateSeverityMatrix$inboundSchema` instead. */ + export const inboundSchema = UpdateSeverityMatrix$inboundSchema; + /** @deprecated use `UpdateSeverityMatrix$outboundSchema` instead. */ + export const outboundSchema = UpdateSeverityMatrix$outboundSchema; + /** @deprecated use `UpdateSeverityMatrix$Outbound` instead. */ + export type Outbound = UpdateSeverityMatrix$Outbound; +} + +export function updateSeverityMatrixToJSON( + updateSeverityMatrix: UpdateSeverityMatrix, +): string { + return JSON.stringify( + UpdateSeverityMatrix$outboundSchema.parse(updateSeverityMatrix), + ); +} + +export function updateSeverityMatrixFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSeverityMatrix$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSeverityMatrix' from JSON`, + ); +} diff --git a/src/models/components/updateseveritymatrixcondition.ts b/src/models/components/updateseveritymatrixcondition.ts new file mode 100644 index 00000000..acc53074 --- /dev/null +++ b/src/models/components/updateseveritymatrixcondition.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a severity matrix condition + */ +export type UpdateSeverityMatrixCondition = { + name?: string | null | undefined; + /** + * Position is used to determine ordering of conditions in API responses and dropdowns. The condition with the lowest position (typically 0) will be considered the Default Condition + */ + position?: number | null | undefined; +}; + +/** @internal */ +export const UpdateSeverityMatrixCondition$inboundSchema: z.ZodType< + UpdateSeverityMatrixCondition, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type UpdateSeverityMatrixCondition$Outbound = { + name?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const UpdateSeverityMatrixCondition$outboundSchema: z.ZodType< + UpdateSeverityMatrixCondition$Outbound, + z.ZodTypeDef, + UpdateSeverityMatrixCondition +> = z.object({ + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSeverityMatrixCondition$ { + /** @deprecated use `UpdateSeverityMatrixCondition$inboundSchema` instead. */ + export const inboundSchema = UpdateSeverityMatrixCondition$inboundSchema; + /** @deprecated use `UpdateSeverityMatrixCondition$outboundSchema` instead. */ + export const outboundSchema = UpdateSeverityMatrixCondition$outboundSchema; + /** @deprecated use `UpdateSeverityMatrixCondition$Outbound` instead. */ + export type Outbound = UpdateSeverityMatrixCondition$Outbound; +} + +export function updateSeverityMatrixConditionToJSON( + updateSeverityMatrixCondition: UpdateSeverityMatrixCondition, +): string { + return JSON.stringify( + UpdateSeverityMatrixCondition$outboundSchema.parse( + updateSeverityMatrixCondition, + ), + ); +} + +export function updateSeverityMatrixConditionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSeverityMatrixCondition$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSeverityMatrixCondition' from JSON`, + ); +} diff --git a/src/models/components/updateseveritymatriximpact.ts b/src/models/components/updateseveritymatriximpact.ts new file mode 100644 index 00000000..3baf8d40 --- /dev/null +++ b/src/models/components/updateseveritymatriximpact.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a severity matrix impact + */ +export type UpdateSeverityMatrixImpact = { + name?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const UpdateSeverityMatrixImpact$inboundSchema: z.ZodType< + UpdateSeverityMatrixImpact, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type UpdateSeverityMatrixImpact$Outbound = { + name?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const UpdateSeverityMatrixImpact$outboundSchema: z.ZodType< + UpdateSeverityMatrixImpact$Outbound, + z.ZodTypeDef, + UpdateSeverityMatrixImpact +> = z.object({ + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSeverityMatrixImpact$ { + /** @deprecated use `UpdateSeverityMatrixImpact$inboundSchema` instead. */ + export const inboundSchema = UpdateSeverityMatrixImpact$inboundSchema; + /** @deprecated use `UpdateSeverityMatrixImpact$outboundSchema` instead. */ + export const outboundSchema = UpdateSeverityMatrixImpact$outboundSchema; + /** @deprecated use `UpdateSeverityMatrixImpact$Outbound` instead. */ + export type Outbound = UpdateSeverityMatrixImpact$Outbound; +} + +export function updateSeverityMatrixImpactToJSON( + updateSeverityMatrixImpact: UpdateSeverityMatrixImpact, +): string { + return JSON.stringify( + UpdateSeverityMatrixImpact$outboundSchema.parse(updateSeverityMatrixImpact), + ); +} + +export function updateSeverityMatrixImpactFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSeverityMatrixImpact$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSeverityMatrixImpact' from JSON`, + ); +} diff --git a/src/models/components/updatesignalsemailtarget.ts b/src/models/components/updatesignalsemailtarget.ts new file mode 100644 index 00000000..74c82322 --- /dev/null +++ b/src/models/components/updatesignalsemailtarget.ts @@ -0,0 +1,314 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The type of target that the inbound email will notify when matched. + */ +export const UpdateSignalsEmailTargetType = { + Team: "Team", + EntireTeam: "EntireTeam", + EscalationPolicy: "EscalationPolicy", + OnCallSchedule: "OnCallSchedule", + User: "User", + SlackChannel: "SlackChannel", + Webhook: "Webhook", +} as const; +/** + * The type of target that the inbound email will notify when matched. + */ +export type UpdateSignalsEmailTargetType = ClosedEnum< + typeof UpdateSignalsEmailTargetType +>; + +/** + * The target that the email target will notify. This object must contain a `type` + * + * @remarks + * field that specifies the type of target and an `id` field that specifies the ID of + * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", + * "team", "user", or "slack_channel". + */ +export type UpdateSignalsEmailTargetTarget = { + /** + * The type of target that the inbound email will notify when matched. + */ + type: UpdateSignalsEmailTargetType; + /** + * The ID of the target that the inbound email will notify when matched. + */ + id: string; +}; + +/** + * Whether or not all rules must match, or if only one rule must match. + */ +export const UpdateSignalsEmailTargetRuleMatchingStrategy = { + All: "all", + Any: "any", +} as const; +/** + * Whether or not all rules must match, or if only one rule must match. + */ +export type UpdateSignalsEmailTargetRuleMatchingStrategy = ClosedEnum< + typeof UpdateSignalsEmailTargetRuleMatchingStrategy +>; + +/** + * Update a Signals email target by ID + */ +export type UpdateSignalsEmailTarget = { + /** + * The email target's name. + */ + name?: string | null | undefined; + /** + * The email address that will be listening to events. + */ + slug?: string | null | undefined; + /** + * A detailed description of the email target. + */ + description?: string | null | undefined; + /** + * The target that the email target will notify. This object must contain a `type` + * + * @remarks + * field that specifies the type of target and an `id` field that specifies the ID of + * the target. The `type` field must be one of "escalation_policy", "on_call_schedule", + * "team", "user", or "slack_channel". + */ + target?: UpdateSignalsEmailTargetTarget | null | undefined; + /** + * A list of email addresses that are allowed to send events to the target. Must be exact match. + */ + allowedSenders?: Array | null | undefined; + /** + * The CEL expression that defines the status of an incoming email that is sent to the target. + */ + statusCel?: string | null | undefined; + /** + * The CEL expression that defines the level of an incoming email that is sent to the target. + */ + levelCel?: string | null | undefined; + /** + * A list of CEL expressions that should be evaluated and matched to determine if the target should be notified. + */ + rules?: Array | null | undefined; + /** + * Whether or not all rules must match, or if only one rule must match. + */ + ruleMatchingStrategy?: + | UpdateSignalsEmailTargetRuleMatchingStrategy + | null + | undefined; +}; + +/** @internal */ +export const UpdateSignalsEmailTargetType$inboundSchema: z.ZodNativeEnum< + typeof UpdateSignalsEmailTargetType +> = z.nativeEnum(UpdateSignalsEmailTargetType); + +/** @internal */ +export const UpdateSignalsEmailTargetType$outboundSchema: z.ZodNativeEnum< + typeof UpdateSignalsEmailTargetType +> = UpdateSignalsEmailTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSignalsEmailTargetType$ { + /** @deprecated use `UpdateSignalsEmailTargetType$inboundSchema` instead. */ + export const inboundSchema = UpdateSignalsEmailTargetType$inboundSchema; + /** @deprecated use `UpdateSignalsEmailTargetType$outboundSchema` instead. */ + export const outboundSchema = UpdateSignalsEmailTargetType$outboundSchema; +} + +/** @internal */ +export const UpdateSignalsEmailTargetTarget$inboundSchema: z.ZodType< + UpdateSignalsEmailTargetTarget, + z.ZodTypeDef, + unknown +> = z.object({ + type: UpdateSignalsEmailTargetType$inboundSchema, + id: z.string(), +}); + +/** @internal */ +export type UpdateSignalsEmailTargetTarget$Outbound = { + type: string; + id: string; +}; + +/** @internal */ +export const UpdateSignalsEmailTargetTarget$outboundSchema: z.ZodType< + UpdateSignalsEmailTargetTarget$Outbound, + z.ZodTypeDef, + UpdateSignalsEmailTargetTarget +> = z.object({ + type: UpdateSignalsEmailTargetType$outboundSchema, + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSignalsEmailTargetTarget$ { + /** @deprecated use `UpdateSignalsEmailTargetTarget$inboundSchema` instead. */ + export const inboundSchema = UpdateSignalsEmailTargetTarget$inboundSchema; + /** @deprecated use `UpdateSignalsEmailTargetTarget$outboundSchema` instead. */ + export const outboundSchema = UpdateSignalsEmailTargetTarget$outboundSchema; + /** @deprecated use `UpdateSignalsEmailTargetTarget$Outbound` instead. */ + export type Outbound = UpdateSignalsEmailTargetTarget$Outbound; +} + +export function updateSignalsEmailTargetTargetToJSON( + updateSignalsEmailTargetTarget: UpdateSignalsEmailTargetTarget, +): string { + return JSON.stringify( + UpdateSignalsEmailTargetTarget$outboundSchema.parse( + updateSignalsEmailTargetTarget, + ), + ); +} + +export function updateSignalsEmailTargetTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSignalsEmailTargetTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSignalsEmailTargetTarget' from JSON`, + ); +} + +/** @internal */ +export const UpdateSignalsEmailTargetRuleMatchingStrategy$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateSignalsEmailTargetRuleMatchingStrategy); + +/** @internal */ +export const UpdateSignalsEmailTargetRuleMatchingStrategy$outboundSchema: + z.ZodNativeEnum = + UpdateSignalsEmailTargetRuleMatchingStrategy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSignalsEmailTargetRuleMatchingStrategy$ { + /** @deprecated use `UpdateSignalsEmailTargetRuleMatchingStrategy$inboundSchema` instead. */ + export const inboundSchema = + UpdateSignalsEmailTargetRuleMatchingStrategy$inboundSchema; + /** @deprecated use `UpdateSignalsEmailTargetRuleMatchingStrategy$outboundSchema` instead. */ + export const outboundSchema = + UpdateSignalsEmailTargetRuleMatchingStrategy$outboundSchema; +} + +/** @internal */ +export const UpdateSignalsEmailTarget$inboundSchema: z.ZodType< + UpdateSignalsEmailTarget, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + target: z.nullable(z.lazy(() => UpdateSignalsEmailTargetTarget$inboundSchema)) + .optional(), + allowed_senders: z.nullable(z.array(z.string())).optional(), + status_cel: z.nullable(z.string()).optional(), + level_cel: z.nullable(z.string()).optional(), + rules: z.nullable(z.array(z.string())).optional(), + rule_matching_strategy: z.nullable( + UpdateSignalsEmailTargetRuleMatchingStrategy$inboundSchema, + ).optional(), +}).transform((v) => { + return remap$(v, { + "allowed_senders": "allowedSenders", + "status_cel": "statusCel", + "level_cel": "levelCel", + "rule_matching_strategy": "ruleMatchingStrategy", + }); +}); + +/** @internal */ +export type UpdateSignalsEmailTarget$Outbound = { + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + target?: UpdateSignalsEmailTargetTarget$Outbound | null | undefined; + allowed_senders?: Array | null | undefined; + status_cel?: string | null | undefined; + level_cel?: string | null | undefined; + rules?: Array | null | undefined; + rule_matching_strategy?: string | null | undefined; +}; + +/** @internal */ +export const UpdateSignalsEmailTarget$outboundSchema: z.ZodType< + UpdateSignalsEmailTarget$Outbound, + z.ZodTypeDef, + UpdateSignalsEmailTarget +> = z.object({ + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + target: z.nullable( + z.lazy(() => UpdateSignalsEmailTargetTarget$outboundSchema), + ).optional(), + allowedSenders: z.nullable(z.array(z.string())).optional(), + statusCel: z.nullable(z.string()).optional(), + levelCel: z.nullable(z.string()).optional(), + rules: z.nullable(z.array(z.string())).optional(), + ruleMatchingStrategy: z.nullable( + UpdateSignalsEmailTargetRuleMatchingStrategy$outboundSchema, + ).optional(), +}).transform((v) => { + return remap$(v, { + allowedSenders: "allowed_senders", + statusCel: "status_cel", + levelCel: "level_cel", + ruleMatchingStrategy: "rule_matching_strategy", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSignalsEmailTarget$ { + /** @deprecated use `UpdateSignalsEmailTarget$inboundSchema` instead. */ + export const inboundSchema = UpdateSignalsEmailTarget$inboundSchema; + /** @deprecated use `UpdateSignalsEmailTarget$outboundSchema` instead. */ + export const outboundSchema = UpdateSignalsEmailTarget$outboundSchema; + /** @deprecated use `UpdateSignalsEmailTarget$Outbound` instead. */ + export type Outbound = UpdateSignalsEmailTarget$Outbound; +} + +export function updateSignalsEmailTargetToJSON( + updateSignalsEmailTarget: UpdateSignalsEmailTarget, +): string { + return JSON.stringify( + UpdateSignalsEmailTarget$outboundSchema.parse(updateSignalsEmailTarget), + ); +} + +export function updateSignalsEmailTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSignalsEmailTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSignalsEmailTarget' from JSON`, + ); +} diff --git a/src/models/components/updatesignalswebhooktarget.ts b/src/models/components/updatesignalswebhooktarget.ts new file mode 100644 index 00000000..4bf1adb0 --- /dev/null +++ b/src/models/components/updatesignalswebhooktarget.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a Signals webhook target by ID + */ +export type UpdateSignalsWebhookTarget = { + /** + * The webhook target's name. + */ + name?: string | null | undefined; + /** + * An optional detailed description of the webhook target. + */ + description?: string | null | undefined; + /** + * The URL that the webhook target will notify. + */ + url?: string | null | undefined; + /** + * An optional secret we will provide in the `FH-Signature` header + * + * @remarks + * when sending a payload to the webhook target. This key will not be + * shown in any response once configured. + */ + signingKey?: string | null | undefined; +}; + +/** @internal */ +export const UpdateSignalsWebhookTarget$inboundSchema: z.ZodType< + UpdateSignalsWebhookTarget, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + signing_key: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "signing_key": "signingKey", + }); +}); + +/** @internal */ +export type UpdateSignalsWebhookTarget$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + url?: string | null | undefined; + signing_key?: string | null | undefined; +}; + +/** @internal */ +export const UpdateSignalsWebhookTarget$outboundSchema: z.ZodType< + UpdateSignalsWebhookTarget$Outbound, + z.ZodTypeDef, + UpdateSignalsWebhookTarget +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + signingKey: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + signingKey: "signing_key", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSignalsWebhookTarget$ { + /** @deprecated use `UpdateSignalsWebhookTarget$inboundSchema` instead. */ + export const inboundSchema = UpdateSignalsWebhookTarget$inboundSchema; + /** @deprecated use `UpdateSignalsWebhookTarget$outboundSchema` instead. */ + export const outboundSchema = UpdateSignalsWebhookTarget$outboundSchema; + /** @deprecated use `UpdateSignalsWebhookTarget$Outbound` instead. */ + export type Outbound = UpdateSignalsWebhookTarget$Outbound; +} + +export function updateSignalsWebhookTargetToJSON( + updateSignalsWebhookTarget: UpdateSignalsWebhookTarget, +): string { + return JSON.stringify( + UpdateSignalsWebhookTarget$outboundSchema.parse(updateSignalsWebhookTarget), + ); +} + +export function updateSignalsWebhookTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSignalsWebhookTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSignalsWebhookTarget' from JSON`, + ); +} diff --git a/src/models/components/updatestatuspageconnection.ts b/src/models/components/updatestatuspageconnection.ts new file mode 100644 index 00000000..9475e888 --- /dev/null +++ b/src/models/components/updatestatuspageconnection.ts @@ -0,0 +1,375 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateStatuspageConnectionSeverity = { + /** + * FireHydrant severity slug + */ + severitySlug: string; + /** + * Statuspage.io severity name + */ + remoteStatus: string; +}; + +export type Condition = { + /** + * FireHydrant condition id + */ + conditionId: string; + /** + * Statuspage.io condition name + */ + statuspageioCondition: string; +}; + +/** + * Statuspage.io status + */ +export const UpdateStatuspageConnectionStatus = { + Investigating: "investigating", + Identified: "identified", + Monitoring: "monitoring", + Resolved: "resolved", +} as const; +/** + * Statuspage.io status + */ +export type UpdateStatuspageConnectionStatus = ClosedEnum< + typeof UpdateStatuspageConnectionStatus +>; + +export type MilestoneMapping = { + /** + * FireHydrant milestone id + */ + milestoneId: string; + /** + * Statuspage.io status + */ + status: UpdateStatuspageConnectionStatus; +}; + +/** + * Update the given Statuspage integration connection. + */ +export type UpdateStatuspageConnection = { + pageId?: string | null | undefined; + severities?: Array | null | undefined; + conditions?: Array | null | undefined; + milestoneMappings?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateStatuspageConnectionSeverity$inboundSchema: z.ZodType< + UpdateStatuspageConnectionSeverity, + z.ZodTypeDef, + unknown +> = z.object({ + severity_slug: z.string(), + remote_status: z.string(), +}).transform((v) => { + return remap$(v, { + "severity_slug": "severitySlug", + "remote_status": "remoteStatus", + }); +}); + +/** @internal */ +export type UpdateStatuspageConnectionSeverity$Outbound = { + severity_slug: string; + remote_status: string; +}; + +/** @internal */ +export const UpdateStatuspageConnectionSeverity$outboundSchema: z.ZodType< + UpdateStatuspageConnectionSeverity$Outbound, + z.ZodTypeDef, + UpdateStatuspageConnectionSeverity +> = z.object({ + severitySlug: z.string(), + remoteStatus: z.string(), +}).transform((v) => { + return remap$(v, { + severitySlug: "severity_slug", + remoteStatus: "remote_status", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateStatuspageConnectionSeverity$ { + /** @deprecated use `UpdateStatuspageConnectionSeverity$inboundSchema` instead. */ + export const inboundSchema = UpdateStatuspageConnectionSeverity$inboundSchema; + /** @deprecated use `UpdateStatuspageConnectionSeverity$outboundSchema` instead. */ + export const outboundSchema = + UpdateStatuspageConnectionSeverity$outboundSchema; + /** @deprecated use `UpdateStatuspageConnectionSeverity$Outbound` instead. */ + export type Outbound = UpdateStatuspageConnectionSeverity$Outbound; +} + +export function updateStatuspageConnectionSeverityToJSON( + updateStatuspageConnectionSeverity: UpdateStatuspageConnectionSeverity, +): string { + return JSON.stringify( + UpdateStatuspageConnectionSeverity$outboundSchema.parse( + updateStatuspageConnectionSeverity, + ), + ); +} + +export function updateStatuspageConnectionSeverityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateStatuspageConnectionSeverity$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateStatuspageConnectionSeverity' from JSON`, + ); +} + +/** @internal */ +export const Condition$inboundSchema: z.ZodType< + Condition, + z.ZodTypeDef, + unknown +> = z.object({ + condition_id: z.string(), + statuspageio_condition: z.string(), +}).transform((v) => { + return remap$(v, { + "condition_id": "conditionId", + "statuspageio_condition": "statuspageioCondition", + }); +}); + +/** @internal */ +export type Condition$Outbound = { + condition_id: string; + statuspageio_condition: string; +}; + +/** @internal */ +export const Condition$outboundSchema: z.ZodType< + Condition$Outbound, + z.ZodTypeDef, + Condition +> = z.object({ + conditionId: z.string(), + statuspageioCondition: z.string(), +}).transform((v) => { + return remap$(v, { + conditionId: "condition_id", + statuspageioCondition: "statuspageio_condition", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Condition$ { + /** @deprecated use `Condition$inboundSchema` instead. */ + export const inboundSchema = Condition$inboundSchema; + /** @deprecated use `Condition$outboundSchema` instead. */ + export const outboundSchema = Condition$outboundSchema; + /** @deprecated use `Condition$Outbound` instead. */ + export type Outbound = Condition$Outbound; +} + +export function conditionToJSON(condition: Condition): string { + return JSON.stringify(Condition$outboundSchema.parse(condition)); +} + +export function conditionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Condition$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Condition' from JSON`, + ); +} + +/** @internal */ +export const UpdateStatuspageConnectionStatus$inboundSchema: z.ZodNativeEnum< + typeof UpdateStatuspageConnectionStatus +> = z.nativeEnum(UpdateStatuspageConnectionStatus); + +/** @internal */ +export const UpdateStatuspageConnectionStatus$outboundSchema: z.ZodNativeEnum< + typeof UpdateStatuspageConnectionStatus +> = UpdateStatuspageConnectionStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateStatuspageConnectionStatus$ { + /** @deprecated use `UpdateStatuspageConnectionStatus$inboundSchema` instead. */ + export const inboundSchema = UpdateStatuspageConnectionStatus$inboundSchema; + /** @deprecated use `UpdateStatuspageConnectionStatus$outboundSchema` instead. */ + export const outboundSchema = UpdateStatuspageConnectionStatus$outboundSchema; +} + +/** @internal */ +export const MilestoneMapping$inboundSchema: z.ZodType< + MilestoneMapping, + z.ZodTypeDef, + unknown +> = z.object({ + milestone_id: z.string(), + status: UpdateStatuspageConnectionStatus$inboundSchema, +}).transform((v) => { + return remap$(v, { + "milestone_id": "milestoneId", + }); +}); + +/** @internal */ +export type MilestoneMapping$Outbound = { + milestone_id: string; + status: string; +}; + +/** @internal */ +export const MilestoneMapping$outboundSchema: z.ZodType< + MilestoneMapping$Outbound, + z.ZodTypeDef, + MilestoneMapping +> = z.object({ + milestoneId: z.string(), + status: UpdateStatuspageConnectionStatus$outboundSchema, +}).transform((v) => { + return remap$(v, { + milestoneId: "milestone_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MilestoneMapping$ { + /** @deprecated use `MilestoneMapping$inboundSchema` instead. */ + export const inboundSchema = MilestoneMapping$inboundSchema; + /** @deprecated use `MilestoneMapping$outboundSchema` instead. */ + export const outboundSchema = MilestoneMapping$outboundSchema; + /** @deprecated use `MilestoneMapping$Outbound` instead. */ + export type Outbound = MilestoneMapping$Outbound; +} + +export function milestoneMappingToJSON( + milestoneMapping: MilestoneMapping, +): string { + return JSON.stringify( + MilestoneMapping$outboundSchema.parse(milestoneMapping), + ); +} + +export function milestoneMappingFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MilestoneMapping$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MilestoneMapping' from JSON`, + ); +} + +/** @internal */ +export const UpdateStatuspageConnection$inboundSchema: z.ZodType< + UpdateStatuspageConnection, + z.ZodTypeDef, + unknown +> = z.object({ + page_id: z.nullable(z.string()).optional(), + severities: z.nullable( + z.array(z.lazy(() => UpdateStatuspageConnectionSeverity$inboundSchema)), + ).optional(), + conditions: z.nullable(z.array(z.lazy(() => Condition$inboundSchema))) + .optional(), + milestone_mappings: z.nullable( + z.array(z.lazy(() => MilestoneMapping$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "page_id": "pageId", + "milestone_mappings": "milestoneMappings", + }); +}); + +/** @internal */ +export type UpdateStatuspageConnection$Outbound = { + page_id?: string | null | undefined; + severities?: + | Array + | null + | undefined; + conditions?: Array | null | undefined; + milestone_mappings?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateStatuspageConnection$outboundSchema: z.ZodType< + UpdateStatuspageConnection$Outbound, + z.ZodTypeDef, + UpdateStatuspageConnection +> = z.object({ + pageId: z.nullable(z.string()).optional(), + severities: z.nullable( + z.array(z.lazy(() => UpdateStatuspageConnectionSeverity$outboundSchema)), + ).optional(), + conditions: z.nullable(z.array(z.lazy(() => Condition$outboundSchema))) + .optional(), + milestoneMappings: z.nullable( + z.array(z.lazy(() => MilestoneMapping$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + pageId: "page_id", + milestoneMappings: "milestone_mappings", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateStatuspageConnection$ { + /** @deprecated use `UpdateStatuspageConnection$inboundSchema` instead. */ + export const inboundSchema = UpdateStatuspageConnection$inboundSchema; + /** @deprecated use `UpdateStatuspageConnection$outboundSchema` instead. */ + export const outboundSchema = UpdateStatuspageConnection$outboundSchema; + /** @deprecated use `UpdateStatuspageConnection$Outbound` instead. */ + export type Outbound = UpdateStatuspageConnection$Outbound; +} + +export function updateStatuspageConnectionToJSON( + updateStatuspageConnection: UpdateStatuspageConnection, +): string { + return JSON.stringify( + UpdateStatuspageConnection$outboundSchema.parse(updateStatuspageConnection), + ); +} + +export function updateStatuspageConnectionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateStatuspageConnection$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateStatuspageConnection' from JSON`, + ); +} diff --git a/src/models/components/updatestatusupdatetemplate.ts b/src/models/components/updatestatusupdatetemplate.ts new file mode 100644 index 00000000..f5dd8a22 --- /dev/null +++ b/src/models/components/updatestatusupdatetemplate.ts @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a single status update template + */ +export type UpdateStatusUpdateTemplate = { + name?: string | null | undefined; + body?: string | null | undefined; +}; + +/** @internal */ +export const UpdateStatusUpdateTemplate$inboundSchema: z.ZodType< + UpdateStatusUpdateTemplate, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateStatusUpdateTemplate$Outbound = { + name?: string | null | undefined; + body?: string | null | undefined; +}; + +/** @internal */ +export const UpdateStatusUpdateTemplate$outboundSchema: z.ZodType< + UpdateStatusUpdateTemplate$Outbound, + z.ZodTypeDef, + UpdateStatusUpdateTemplate +> = z.object({ + name: z.nullable(z.string()).optional(), + body: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateStatusUpdateTemplate$ { + /** @deprecated use `UpdateStatusUpdateTemplate$inboundSchema` instead. */ + export const inboundSchema = UpdateStatusUpdateTemplate$inboundSchema; + /** @deprecated use `UpdateStatusUpdateTemplate$outboundSchema` instead. */ + export const outboundSchema = UpdateStatusUpdateTemplate$outboundSchema; + /** @deprecated use `UpdateStatusUpdateTemplate$Outbound` instead. */ + export type Outbound = UpdateStatusUpdateTemplate$Outbound; +} + +export function updateStatusUpdateTemplateToJSON( + updateStatusUpdateTemplate: UpdateStatusUpdateTemplate, +): string { + return JSON.stringify( + UpdateStatusUpdateTemplate$outboundSchema.parse(updateStatusUpdateTemplate), + ); +} + +export function updateStatusUpdateTemplateFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateStatusUpdateTemplate$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateStatusUpdateTemplate' from JSON`, + ); +} diff --git a/src/models/components/updatetasklist.ts b/src/models/components/updatetasklist.ts new file mode 100644 index 00000000..4efad8af --- /dev/null +++ b/src/models/components/updatetasklist.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateTaskListTaskListItem = { + /** + * A summary of the task + */ + summary: string; + /** + * A long-form description for the task if additional context is helpful + */ + description?: string | null | undefined; +}; + +/** + * Updates a task list's attributes and task list items + */ +export type UpdateTaskList = { + name?: string | null | undefined; + description?: string | null | undefined; + taskListItems?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTaskListTaskListItem$inboundSchema: z.ZodType< + UpdateTaskListTaskListItem, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateTaskListTaskListItem$Outbound = { + summary: string; + description?: string | null | undefined; +}; + +/** @internal */ +export const UpdateTaskListTaskListItem$outboundSchema: z.ZodType< + UpdateTaskListTaskListItem$Outbound, + z.ZodTypeDef, + UpdateTaskListTaskListItem +> = z.object({ + summary: z.string(), + description: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTaskListTaskListItem$ { + /** @deprecated use `UpdateTaskListTaskListItem$inboundSchema` instead. */ + export const inboundSchema = UpdateTaskListTaskListItem$inboundSchema; + /** @deprecated use `UpdateTaskListTaskListItem$outboundSchema` instead. */ + export const outboundSchema = UpdateTaskListTaskListItem$outboundSchema; + /** @deprecated use `UpdateTaskListTaskListItem$Outbound` instead. */ + export type Outbound = UpdateTaskListTaskListItem$Outbound; +} + +export function updateTaskListTaskListItemToJSON( + updateTaskListTaskListItem: UpdateTaskListTaskListItem, +): string { + return JSON.stringify( + UpdateTaskListTaskListItem$outboundSchema.parse(updateTaskListTaskListItem), + ); +} + +export function updateTaskListTaskListItemFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTaskListTaskListItem$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTaskListTaskListItem' from JSON`, + ); +} + +/** @internal */ +export const UpdateTaskList$inboundSchema: z.ZodType< + UpdateTaskList, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + task_list_items: z.nullable( + z.array(z.lazy(() => UpdateTaskListTaskListItem$inboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "task_list_items": "taskListItems", + }); +}); + +/** @internal */ +export type UpdateTaskList$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + task_list_items?: + | Array + | null + | undefined; +}; + +/** @internal */ +export const UpdateTaskList$outboundSchema: z.ZodType< + UpdateTaskList$Outbound, + z.ZodTypeDef, + UpdateTaskList +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + taskListItems: z.nullable( + z.array(z.lazy(() => UpdateTaskListTaskListItem$outboundSchema)), + ).optional(), +}).transform((v) => { + return remap$(v, { + taskListItems: "task_list_items", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTaskList$ { + /** @deprecated use `UpdateTaskList$inboundSchema` instead. */ + export const inboundSchema = UpdateTaskList$inboundSchema; + /** @deprecated use `UpdateTaskList$outboundSchema` instead. */ + export const outboundSchema = UpdateTaskList$outboundSchema; + /** @deprecated use `UpdateTaskList$Outbound` instead. */ + export type Outbound = UpdateTaskList$Outbound; +} + +export function updateTaskListToJSON(updateTaskList: UpdateTaskList): string { + return JSON.stringify(UpdateTaskList$outboundSchema.parse(updateTaskList)); +} + +export function updateTaskListFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTaskList$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTaskList' from JSON`, + ); +} diff --git a/src/models/components/updateteam.ts b/src/models/components/updateteam.ts new file mode 100644 index 00000000..d67cc7ab --- /dev/null +++ b/src/models/components/updateteam.ts @@ -0,0 +1,277 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * MS Teams channel identity for channel associated with this team + */ +export type UpdateTeamMsTeamsChannel = { + channelId: string; + msTeamId: string; +}; + +export type UpdateTeamMembership = { + userId?: string | null | undefined; + scheduleId?: string | null | undefined; + /** + * An incident role ID that this user will automatically assigned if this team is assigned to an incident + */ + incidentRoleId?: string | null | undefined; +}; + +/** + * Update a single team from its ID + */ +export type UpdateTeam = { + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + /** + * The Slack channel ID associated with this team. This may be the reference in FireHydrant's system (i.e. UUID) or the ID value from Slack (e.g. C1234567890). + * + * @remarks + */ + slackChannelId?: string | null | undefined; + /** + * MS Teams channel identity for channel associated with this team + */ + msTeamsChannel?: UpdateTeamMsTeamsChannel | null | undefined; + memberships?: Array | null | undefined; + /** + * A list of email addresses to invite to join the organization and automatically add to this team. If an email already has a pending invitation, the team will be added to their existing invitation. + */ + inviteEmails?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTeamMsTeamsChannel$inboundSchema: z.ZodType< + UpdateTeamMsTeamsChannel, + z.ZodTypeDef, + unknown +> = z.object({ + channel_id: z.string(), + ms_team_id: z.string(), +}).transform((v) => { + return remap$(v, { + "channel_id": "channelId", + "ms_team_id": "msTeamId", + }); +}); + +/** @internal */ +export type UpdateTeamMsTeamsChannel$Outbound = { + channel_id: string; + ms_team_id: string; +}; + +/** @internal */ +export const UpdateTeamMsTeamsChannel$outboundSchema: z.ZodType< + UpdateTeamMsTeamsChannel$Outbound, + z.ZodTypeDef, + UpdateTeamMsTeamsChannel +> = z.object({ + channelId: z.string(), + msTeamId: z.string(), +}).transform((v) => { + return remap$(v, { + channelId: "channel_id", + msTeamId: "ms_team_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamMsTeamsChannel$ { + /** @deprecated use `UpdateTeamMsTeamsChannel$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamMsTeamsChannel$inboundSchema; + /** @deprecated use `UpdateTeamMsTeamsChannel$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamMsTeamsChannel$outboundSchema; + /** @deprecated use `UpdateTeamMsTeamsChannel$Outbound` instead. */ + export type Outbound = UpdateTeamMsTeamsChannel$Outbound; +} + +export function updateTeamMsTeamsChannelToJSON( + updateTeamMsTeamsChannel: UpdateTeamMsTeamsChannel, +): string { + return JSON.stringify( + UpdateTeamMsTeamsChannel$outboundSchema.parse(updateTeamMsTeamsChannel), + ); +} + +export function updateTeamMsTeamsChannelFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamMsTeamsChannel$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamMsTeamsChannel' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamMembership$inboundSchema: z.ZodType< + UpdateTeamMembership, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.nullable(z.string()).optional(), + schedule_id: z.nullable(z.string()).optional(), + incident_role_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + "schedule_id": "scheduleId", + "incident_role_id": "incidentRoleId", + }); +}); + +/** @internal */ +export type UpdateTeamMembership$Outbound = { + user_id?: string | null | undefined; + schedule_id?: string | null | undefined; + incident_role_id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateTeamMembership$outboundSchema: z.ZodType< + UpdateTeamMembership$Outbound, + z.ZodTypeDef, + UpdateTeamMembership +> = z.object({ + userId: z.nullable(z.string()).optional(), + scheduleId: z.nullable(z.string()).optional(), + incidentRoleId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + scheduleId: "schedule_id", + incidentRoleId: "incident_role_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamMembership$ { + /** @deprecated use `UpdateTeamMembership$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamMembership$inboundSchema; + /** @deprecated use `UpdateTeamMembership$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamMembership$outboundSchema; + /** @deprecated use `UpdateTeamMembership$Outbound` instead. */ + export type Outbound = UpdateTeamMembership$Outbound; +} + +export function updateTeamMembershipToJSON( + updateTeamMembership: UpdateTeamMembership, +): string { + return JSON.stringify( + UpdateTeamMembership$outboundSchema.parse(updateTeamMembership), + ); +} + +export function updateTeamMembershipFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamMembership$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamMembership' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeam$inboundSchema: z.ZodType< + UpdateTeam, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + slack_channel_id: z.nullable(z.string()).optional(), + ms_teams_channel: z.nullable( + z.lazy(() => UpdateTeamMsTeamsChannel$inboundSchema), + ).optional(), + memberships: z.nullable( + z.array(z.lazy(() => UpdateTeamMembership$inboundSchema)), + ).optional(), + invite_emails: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "slack_channel_id": "slackChannelId", + "ms_teams_channel": "msTeamsChannel", + "invite_emails": "inviteEmails", + }); +}); + +/** @internal */ +export type UpdateTeam$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + slack_channel_id?: string | null | undefined; + ms_teams_channel?: UpdateTeamMsTeamsChannel$Outbound | null | undefined; + memberships?: Array | null | undefined; + invite_emails?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTeam$outboundSchema: z.ZodType< + UpdateTeam$Outbound, + z.ZodTypeDef, + UpdateTeam +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + slackChannelId: z.nullable(z.string()).optional(), + msTeamsChannel: z.nullable( + z.lazy(() => UpdateTeamMsTeamsChannel$outboundSchema), + ).optional(), + memberships: z.nullable( + z.array(z.lazy(() => UpdateTeamMembership$outboundSchema)), + ).optional(), + inviteEmails: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + slackChannelId: "slack_channel_id", + msTeamsChannel: "ms_teams_channel", + inviteEmails: "invite_emails", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeam$ { + /** @deprecated use `UpdateTeam$inboundSchema` instead. */ + export const inboundSchema = UpdateTeam$inboundSchema; + /** @deprecated use `UpdateTeam$outboundSchema` instead. */ + export const outboundSchema = UpdateTeam$outboundSchema; + /** @deprecated use `UpdateTeam$Outbound` instead. */ + export type Outbound = UpdateTeam$Outbound; +} + +export function updateTeamToJSON(updateTeam: UpdateTeam): string { + return JSON.stringify(UpdateTeam$outboundSchema.parse(updateTeam)); +} + +export function updateTeamFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeam$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeam' from JSON`, + ); +} diff --git a/src/models/components/updateteamescalationpolicy.ts b/src/models/components/updateteamescalationpolicy.ts new file mode 100644 index 00000000..653a1890 --- /dev/null +++ b/src/models/components/updateteamescalationpolicy.ts @@ -0,0 +1,1247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The type of target that the step will notify. + */ +export const UpdateTeamEscalationPolicyType = { + OnCallSchedule: "OnCallSchedule", + User: "User", + SlackChannel: "SlackChannel", + EntireTeam: "EntireTeam", + Webhook: "Webhook", +} as const; +/** + * The type of target that the step will notify. + */ +export type UpdateTeamEscalationPolicyType = ClosedEnum< + typeof UpdateTeamEscalationPolicyType +>; + +export type UpdateTeamEscalationPolicyTarget = { + /** + * The type of target that the step will notify. + */ + type: UpdateTeamEscalationPolicyType; + /** + * The ID of the target that the step will notify. + */ + id: string; +}; + +/** + * The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + */ +export const UpdateTeamEscalationPolicyDistributionType = { + Unspecified: "unspecified", + RoundRobinByAlert: "round_robin_by_alert", + RoundRobinByEscalationPolicy: "round_robin_by_escalation_policy", +} as const; +/** + * The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + */ +export type UpdateTeamEscalationPolicyDistributionType = ClosedEnum< + typeof UpdateTeamEscalationPolicyDistributionType +>; + +export type UpdateTeamEscalationPolicyStep = { + /** + * A list of targets that the step will notify. You can specify up to 15 targets per step. + */ + targets?: Array | null | undefined; + /** + * An ISO8601 duration string specifying how long to wait before moving on to the next step. For the last step, this value specifies how long to wait before the escalation policy should repeat, if it repeats. + */ + timeout: string; + /** + * The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'. + */ + distributionType?: + | UpdateTeamEscalationPolicyDistributionType + | null + | undefined; + /** + * A list of priorities (HIGH, MEDIUM, LOW) to which the step applies when using a dynamic escalation policy. + */ + priorities?: Array | null | undefined; +}; + +/** + * The type of target to which the policy will hand off. + */ +export const UpdateTeamEscalationPolicyTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +/** + * The type of target to which the policy will hand off. + */ +export type UpdateTeamEscalationPolicyTargetType = ClosedEnum< + typeof UpdateTeamEscalationPolicyTargetType +>; + +/** + * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. + */ +export type UpdateTeamEscalationPolicyHandoffStep = { + /** + * The type of target to which the policy will hand off. + */ + targetType: UpdateTeamEscalationPolicyTargetType; + /** + * The ID of the target to which the policy will hand off. + */ + targetId: string; +}; + +export const UpdateTeamEscalationPolicyHighTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +export type UpdateTeamEscalationPolicyHighTargetType = ClosedEnum< + typeof UpdateTeamEscalationPolicyHighTargetType +>; + +/** + * Handoff step for HIGH priority alerts + */ +export type UpdateTeamEscalationPolicyHighHandoffStep = { + targetType: UpdateTeamEscalationPolicyHighTargetType; + targetId: string; +}; + +/** + * Settings for HIGH priority alerts + */ +export type UpdateTeamEscalationPolicyHigh = { + /** + * Number of repetitions for HIGH priority alerts + */ + repetitions?: number | null | undefined; + /** + * Handoff step for HIGH priority alerts + */ + handoffStep?: UpdateTeamEscalationPolicyHighHandoffStep | null | undefined; +}; + +export const UpdateTeamEscalationPolicyMediumTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +export type UpdateTeamEscalationPolicyMediumTargetType = ClosedEnum< + typeof UpdateTeamEscalationPolicyMediumTargetType +>; + +/** + * Handoff step for MEDIUM priority alerts + */ +export type UpdateTeamEscalationPolicyMediumHandoffStep = { + targetType: UpdateTeamEscalationPolicyMediumTargetType; + targetId: string; +}; + +/** + * Settings for MEDIUM priority alerts + */ +export type UpdateTeamEscalationPolicyMedium = { + /** + * Number of repetitions for MEDIUM priority alerts + */ + repetitions?: number | null | undefined; + /** + * Handoff step for MEDIUM priority alerts + */ + handoffStep?: UpdateTeamEscalationPolicyMediumHandoffStep | null | undefined; +}; + +export const UpdateTeamEscalationPolicyLowTargetType = { + EscalationPolicy: "EscalationPolicy", + Team: "Team", +} as const; +export type UpdateTeamEscalationPolicyLowTargetType = ClosedEnum< + typeof UpdateTeamEscalationPolicyLowTargetType +>; + +/** + * Handoff step for LOW priority alerts + */ +export type UpdateTeamEscalationPolicyLowHandoffStep = { + targetType: UpdateTeamEscalationPolicyLowTargetType; + targetId: string; +}; + +/** + * Settings for LOW priority alerts + */ +export type UpdateTeamEscalationPolicyLow = { + /** + * Number of repetitions for LOW priority alerts + */ + repetitions?: number | null | undefined; + /** + * Handoff step for LOW priority alerts + */ + handoffStep?: UpdateTeamEscalationPolicyLowHandoffStep | null | undefined; +}; + +/** + * Priority-specific settings for dynamic escalation policies + */ +export type UpdateTeamEscalationPolicyPrioritizedSettings = { + /** + * Settings for HIGH priority alerts + */ + high?: UpdateTeamEscalationPolicyHigh | null | undefined; + /** + * Settings for MEDIUM priority alerts + */ + medium?: UpdateTeamEscalationPolicyMedium | null | undefined; + /** + * Settings for LOW priority alerts + */ + low?: UpdateTeamEscalationPolicyLow | null | undefined; +}; + +/** + * Update a Signals escalation policy by ID + */ +export type UpdateTeamEscalationPolicy = { + /** + * The escalation policy's name. + */ + name?: string | null | undefined; + /** + * A detailed description of the escalation policy. + */ + description?: string | null | undefined; + /** + * The number of times that the escalation policy should repeat before an alert is dropped. + */ + repetitions?: number | null | undefined; + /** + * Whether this escalation policy should be the default for the team. + */ + default?: boolean | null | undefined; + /** + * The strategy for handling steps in the escalation policy. Can be "static" or "dynamic_by_priority". + */ + stepStrategy?: string | null | undefined; + /** + * A list of steps that define how an alert should escalate through the policy. + */ + steps?: Array | null | undefined; + /** + * A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged. + */ + handoffStep?: UpdateTeamEscalationPolicyHandoffStep | null | undefined; + /** + * Priority-specific settings for dynamic escalation policies + */ + prioritizedSettings?: + | UpdateTeamEscalationPolicyPrioritizedSettings + | null + | undefined; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyType$inboundSchema: z.ZodNativeEnum< + typeof UpdateTeamEscalationPolicyType +> = z.nativeEnum(UpdateTeamEscalationPolicyType); + +/** @internal */ +export const UpdateTeamEscalationPolicyType$outboundSchema: z.ZodNativeEnum< + typeof UpdateTeamEscalationPolicyType +> = UpdateTeamEscalationPolicyType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyType$ { + /** @deprecated use `UpdateTeamEscalationPolicyType$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamEscalationPolicyType$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyType$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamEscalationPolicyType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamEscalationPolicyTarget$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyTarget, + z.ZodTypeDef, + unknown +> = z.object({ + type: UpdateTeamEscalationPolicyType$inboundSchema, + id: z.string(), +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyTarget$Outbound = { + type: string; + id: string; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyTarget$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicyTarget$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyTarget +> = z.object({ + type: UpdateTeamEscalationPolicyType$outboundSchema, + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyTarget$ { + /** @deprecated use `UpdateTeamEscalationPolicyTarget$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamEscalationPolicyTarget$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyTarget$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamEscalationPolicyTarget$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyTarget$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyTarget$Outbound; +} + +export function updateTeamEscalationPolicyTargetToJSON( + updateTeamEscalationPolicyTarget: UpdateTeamEscalationPolicyTarget, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyTarget$outboundSchema.parse( + updateTeamEscalationPolicyTarget, + ), + ); +} + +export function updateTeamEscalationPolicyTargetFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamEscalationPolicyTarget$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamEscalationPolicyTarget' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyDistributionType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateTeamEscalationPolicyDistributionType); + +/** @internal */ +export const UpdateTeamEscalationPolicyDistributionType$outboundSchema: + z.ZodNativeEnum = + UpdateTeamEscalationPolicyDistributionType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyDistributionType$ { + /** @deprecated use `UpdateTeamEscalationPolicyDistributionType$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyDistributionType$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyDistributionType$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyDistributionType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamEscalationPolicyStep$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyStep, + z.ZodTypeDef, + unknown +> = z.object({ + targets: z.nullable( + z.array(z.lazy(() => UpdateTeamEscalationPolicyTarget$inboundSchema)), + ).optional(), + timeout: z.string(), + distribution_type: z.nullable( + UpdateTeamEscalationPolicyDistributionType$inboundSchema, + ).optional(), + priorities: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "distribution_type": "distributionType", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyStep$Outbound = { + targets?: Array | null | undefined; + timeout: string; + distribution_type?: string | null | undefined; + priorities?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyStep$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicyStep$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyStep +> = z.object({ + targets: z.nullable( + z.array(z.lazy(() => UpdateTeamEscalationPolicyTarget$outboundSchema)), + ).optional(), + timeout: z.string(), + distributionType: z.nullable( + UpdateTeamEscalationPolicyDistributionType$outboundSchema, + ).optional(), + priorities: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + distributionType: "distribution_type", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyStep$ { + /** @deprecated use `UpdateTeamEscalationPolicyStep$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamEscalationPolicyStep$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyStep$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamEscalationPolicyStep$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyStep$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyStep$Outbound; +} + +export function updateTeamEscalationPolicyStepToJSON( + updateTeamEscalationPolicyStep: UpdateTeamEscalationPolicyStep, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyStep$outboundSchema.parse( + updateTeamEscalationPolicyStep, + ), + ); +} + +export function updateTeamEscalationPolicyStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamEscalationPolicyStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamEscalationPolicyStep' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyTargetType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + UpdateTeamEscalationPolicyTargetType, + ); + +/** @internal */ +export const UpdateTeamEscalationPolicyTargetType$outboundSchema: + z.ZodNativeEnum = + UpdateTeamEscalationPolicyTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyTargetType$ { + /** @deprecated use `UpdateTeamEscalationPolicyTargetType$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyTargetType$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyTargetType$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyTargetType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamEscalationPolicyHandoffStep$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyHandoffStep, + z.ZodTypeDef, + unknown +> = z.object({ + target_type: UpdateTeamEscalationPolicyTargetType$inboundSchema, + target_id: z.string(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyHandoffStep$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicyHandoffStep$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyHandoffStep +> = z.object({ + targetType: UpdateTeamEscalationPolicyTargetType$outboundSchema, + targetId: z.string(), +}).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyHandoffStep$ { + /** @deprecated use `UpdateTeamEscalationPolicyHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyHandoffStep$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyHandoffStep$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyHandoffStep$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyHandoffStep$Outbound; +} + +export function updateTeamEscalationPolicyHandoffStepToJSON( + updateTeamEscalationPolicyHandoffStep: UpdateTeamEscalationPolicyHandoffStep, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyHandoffStep$outboundSchema.parse( + updateTeamEscalationPolicyHandoffStep, + ), + ); +} + +export function updateTeamEscalationPolicyHandoffStepFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateTeamEscalationPolicyHandoffStep$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamEscalationPolicyHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyHighTargetType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateTeamEscalationPolicyHighTargetType); + +/** @internal */ +export const UpdateTeamEscalationPolicyHighTargetType$outboundSchema: + z.ZodNativeEnum = + UpdateTeamEscalationPolicyHighTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyHighTargetType$ { + /** @deprecated use `UpdateTeamEscalationPolicyHighTargetType$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyHighTargetType$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyHighTargetType$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyHighTargetType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamEscalationPolicyHighHandoffStep$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyHighHandoffStep, + z.ZodTypeDef, + unknown +> = z.object({ + target_type: UpdateTeamEscalationPolicyHighTargetType$inboundSchema, + target_id: z.string(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyHighHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyHighHandoffStep$outboundSchema: + z.ZodType< + UpdateTeamEscalationPolicyHighHandoffStep$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyHighHandoffStep + > = z.object({ + targetType: UpdateTeamEscalationPolicyHighTargetType$outboundSchema, + targetId: z.string(), + }).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyHighHandoffStep$ { + /** @deprecated use `UpdateTeamEscalationPolicyHighHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyHighHandoffStep$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyHighHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyHighHandoffStep$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyHighHandoffStep$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyHighHandoffStep$Outbound; +} + +export function updateTeamEscalationPolicyHighHandoffStepToJSON( + updateTeamEscalationPolicyHighHandoffStep: + UpdateTeamEscalationPolicyHighHandoffStep, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyHighHandoffStep$outboundSchema.parse( + updateTeamEscalationPolicyHighHandoffStep, + ), + ); +} + +export function updateTeamEscalationPolicyHighHandoffStepFromJSON( + jsonString: string, +): SafeParseResult< + UpdateTeamEscalationPolicyHighHandoffStep, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateTeamEscalationPolicyHighHandoffStep$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateTeamEscalationPolicyHighHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyHigh$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyHigh, + z.ZodTypeDef, + unknown +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoff_step: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyHighHandoffStep$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_step": "handoffStep", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyHigh$Outbound = { + repetitions?: number | null | undefined; + handoff_step?: + | UpdateTeamEscalationPolicyHighHandoffStep$Outbound + | null + | undefined; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyHigh$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicyHigh$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyHigh +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoffStep: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyHighHandoffStep$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + handoffStep: "handoff_step", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyHigh$ { + /** @deprecated use `UpdateTeamEscalationPolicyHigh$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamEscalationPolicyHigh$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyHigh$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamEscalationPolicyHigh$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyHigh$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyHigh$Outbound; +} + +export function updateTeamEscalationPolicyHighToJSON( + updateTeamEscalationPolicyHigh: UpdateTeamEscalationPolicyHigh, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyHigh$outboundSchema.parse( + updateTeamEscalationPolicyHigh, + ), + ); +} + +export function updateTeamEscalationPolicyHighFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamEscalationPolicyHigh$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamEscalationPolicyHigh' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyMediumTargetType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateTeamEscalationPolicyMediumTargetType); + +/** @internal */ +export const UpdateTeamEscalationPolicyMediumTargetType$outboundSchema: + z.ZodNativeEnum = + UpdateTeamEscalationPolicyMediumTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyMediumTargetType$ { + /** @deprecated use `UpdateTeamEscalationPolicyMediumTargetType$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyMediumTargetType$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyMediumTargetType$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyMediumTargetType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamEscalationPolicyMediumHandoffStep$inboundSchema: + z.ZodType< + UpdateTeamEscalationPolicyMediumHandoffStep, + z.ZodTypeDef, + unknown + > = z.object({ + target_type: UpdateTeamEscalationPolicyMediumTargetType$inboundSchema, + target_id: z.string(), + }).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); + }); + +/** @internal */ +export type UpdateTeamEscalationPolicyMediumHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyMediumHandoffStep$outboundSchema: + z.ZodType< + UpdateTeamEscalationPolicyMediumHandoffStep$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyMediumHandoffStep + > = z.object({ + targetType: UpdateTeamEscalationPolicyMediumTargetType$outboundSchema, + targetId: z.string(), + }).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyMediumHandoffStep$ { + /** @deprecated use `UpdateTeamEscalationPolicyMediumHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyMediumHandoffStep$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyMediumHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyMediumHandoffStep$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyMediumHandoffStep$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyMediumHandoffStep$Outbound; +} + +export function updateTeamEscalationPolicyMediumHandoffStepToJSON( + updateTeamEscalationPolicyMediumHandoffStep: + UpdateTeamEscalationPolicyMediumHandoffStep, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyMediumHandoffStep$outboundSchema.parse( + updateTeamEscalationPolicyMediumHandoffStep, + ), + ); +} + +export function updateTeamEscalationPolicyMediumHandoffStepFromJSON( + jsonString: string, +): SafeParseResult< + UpdateTeamEscalationPolicyMediumHandoffStep, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateTeamEscalationPolicyMediumHandoffStep$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateTeamEscalationPolicyMediumHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyMedium$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyMedium, + z.ZodTypeDef, + unknown +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoff_step: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyMediumHandoffStep$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_step": "handoffStep", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyMedium$Outbound = { + repetitions?: number | null | undefined; + handoff_step?: + | UpdateTeamEscalationPolicyMediumHandoffStep$Outbound + | null + | undefined; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyMedium$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicyMedium$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyMedium +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoffStep: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyMediumHandoffStep$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + handoffStep: "handoff_step", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyMedium$ { + /** @deprecated use `UpdateTeamEscalationPolicyMedium$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamEscalationPolicyMedium$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyMedium$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamEscalationPolicyMedium$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyMedium$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyMedium$Outbound; +} + +export function updateTeamEscalationPolicyMediumToJSON( + updateTeamEscalationPolicyMedium: UpdateTeamEscalationPolicyMedium, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyMedium$outboundSchema.parse( + updateTeamEscalationPolicyMedium, + ), + ); +} + +export function updateTeamEscalationPolicyMediumFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamEscalationPolicyMedium$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamEscalationPolicyMedium' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyLowTargetType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateTeamEscalationPolicyLowTargetType); + +/** @internal */ +export const UpdateTeamEscalationPolicyLowTargetType$outboundSchema: + z.ZodNativeEnum = + UpdateTeamEscalationPolicyLowTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyLowTargetType$ { + /** @deprecated use `UpdateTeamEscalationPolicyLowTargetType$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyLowTargetType$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyLowTargetType$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyLowTargetType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamEscalationPolicyLowHandoffStep$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyLowHandoffStep, + z.ZodTypeDef, + unknown +> = z.object({ + target_type: UpdateTeamEscalationPolicyLowTargetType$inboundSchema, + target_id: z.string(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyLowHandoffStep$Outbound = { + target_type: string; + target_id: string; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyLowHandoffStep$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicyLowHandoffStep$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyLowHandoffStep +> = z.object({ + targetType: UpdateTeamEscalationPolicyLowTargetType$outboundSchema, + targetId: z.string(), +}).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyLowHandoffStep$ { + /** @deprecated use `UpdateTeamEscalationPolicyLowHandoffStep$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyLowHandoffStep$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyLowHandoffStep$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyLowHandoffStep$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyLowHandoffStep$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyLowHandoffStep$Outbound; +} + +export function updateTeamEscalationPolicyLowHandoffStepToJSON( + updateTeamEscalationPolicyLowHandoffStep: + UpdateTeamEscalationPolicyLowHandoffStep, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyLowHandoffStep$outboundSchema.parse( + updateTeamEscalationPolicyLowHandoffStep, + ), + ); +} + +export function updateTeamEscalationPolicyLowHandoffStepFromJSON( + jsonString: string, +): SafeParseResult< + UpdateTeamEscalationPolicyLowHandoffStep, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateTeamEscalationPolicyLowHandoffStep$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateTeamEscalationPolicyLowHandoffStep' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyLow$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicyLow, + z.ZodTypeDef, + unknown +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoff_step: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyLowHandoffStep$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_step": "handoffStep", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicyLow$Outbound = { + repetitions?: number | null | undefined; + handoff_step?: + | UpdateTeamEscalationPolicyLowHandoffStep$Outbound + | null + | undefined; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyLow$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicyLow$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyLow +> = z.object({ + repetitions: z.nullable(z.number().int()).optional(), + handoffStep: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyLowHandoffStep$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + handoffStep: "handoff_step", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyLow$ { + /** @deprecated use `UpdateTeamEscalationPolicyLow$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamEscalationPolicyLow$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyLow$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamEscalationPolicyLow$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyLow$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyLow$Outbound; +} + +export function updateTeamEscalationPolicyLowToJSON( + updateTeamEscalationPolicyLow: UpdateTeamEscalationPolicyLow, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyLow$outboundSchema.parse( + updateTeamEscalationPolicyLow, + ), + ); +} + +export function updateTeamEscalationPolicyLowFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamEscalationPolicyLow$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamEscalationPolicyLow' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicyPrioritizedSettings$inboundSchema: + z.ZodType< + UpdateTeamEscalationPolicyPrioritizedSettings, + z.ZodTypeDef, + unknown + > = z.object({ + high: z.nullable(z.lazy(() => UpdateTeamEscalationPolicyHigh$inboundSchema)) + .optional(), + medium: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyMedium$inboundSchema), + ).optional(), + low: z.nullable(z.lazy(() => UpdateTeamEscalationPolicyLow$inboundSchema)) + .optional(), + }); + +/** @internal */ +export type UpdateTeamEscalationPolicyPrioritizedSettings$Outbound = { + high?: UpdateTeamEscalationPolicyHigh$Outbound | null | undefined; + medium?: UpdateTeamEscalationPolicyMedium$Outbound | null | undefined; + low?: UpdateTeamEscalationPolicyLow$Outbound | null | undefined; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicyPrioritizedSettings$outboundSchema: + z.ZodType< + UpdateTeamEscalationPolicyPrioritizedSettings$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicyPrioritizedSettings + > = z.object({ + high: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyHigh$outboundSchema), + ).optional(), + medium: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyMedium$outboundSchema), + ).optional(), + low: z.nullable(z.lazy(() => UpdateTeamEscalationPolicyLow$outboundSchema)) + .optional(), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicyPrioritizedSettings$ { + /** @deprecated use `UpdateTeamEscalationPolicyPrioritizedSettings$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamEscalationPolicyPrioritizedSettings$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyPrioritizedSettings$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamEscalationPolicyPrioritizedSettings$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicyPrioritizedSettings$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicyPrioritizedSettings$Outbound; +} + +export function updateTeamEscalationPolicyPrioritizedSettingsToJSON( + updateTeamEscalationPolicyPrioritizedSettings: + UpdateTeamEscalationPolicyPrioritizedSettings, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicyPrioritizedSettings$outboundSchema.parse( + updateTeamEscalationPolicyPrioritizedSettings, + ), + ); +} + +export function updateTeamEscalationPolicyPrioritizedSettingsFromJSON( + jsonString: string, +): SafeParseResult< + UpdateTeamEscalationPolicyPrioritizedSettings, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateTeamEscalationPolicyPrioritizedSettings$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateTeamEscalationPolicyPrioritizedSettings' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamEscalationPolicy$inboundSchema: z.ZodType< + UpdateTeamEscalationPolicy, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + repetitions: z.nullable(z.number().int().default(0)), + default: z.nullable(z.boolean().default(false)), + step_strategy: z.nullable(z.string()).optional(), + steps: z.nullable( + z.array(z.lazy(() => UpdateTeamEscalationPolicyStep$inboundSchema)), + ).optional(), + handoff_step: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyHandoffStep$inboundSchema), + ).optional(), + prioritized_settings: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyPrioritizedSettings$inboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + "step_strategy": "stepStrategy", + "handoff_step": "handoffStep", + "prioritized_settings": "prioritizedSettings", + }); +}); + +/** @internal */ +export type UpdateTeamEscalationPolicy$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + repetitions: number | null; + default: boolean | null; + step_strategy?: string | null | undefined; + steps?: Array | null | undefined; + handoff_step?: + | UpdateTeamEscalationPolicyHandoffStep$Outbound + | null + | undefined; + prioritized_settings?: + | UpdateTeamEscalationPolicyPrioritizedSettings$Outbound + | null + | undefined; +}; + +/** @internal */ +export const UpdateTeamEscalationPolicy$outboundSchema: z.ZodType< + UpdateTeamEscalationPolicy$Outbound, + z.ZodTypeDef, + UpdateTeamEscalationPolicy +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + repetitions: z.nullable(z.number().int().default(0)), + default: z.nullable(z.boolean().default(false)), + stepStrategy: z.nullable(z.string()).optional(), + steps: z.nullable( + z.array(z.lazy(() => UpdateTeamEscalationPolicyStep$outboundSchema)), + ).optional(), + handoffStep: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyHandoffStep$outboundSchema), + ).optional(), + prioritizedSettings: z.nullable( + z.lazy(() => UpdateTeamEscalationPolicyPrioritizedSettings$outboundSchema), + ).optional(), +}).transform((v) => { + return remap$(v, { + stepStrategy: "step_strategy", + handoffStep: "handoff_step", + prioritizedSettings: "prioritized_settings", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamEscalationPolicy$ { + /** @deprecated use `UpdateTeamEscalationPolicy$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamEscalationPolicy$inboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicy$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamEscalationPolicy$outboundSchema; + /** @deprecated use `UpdateTeamEscalationPolicy$Outbound` instead. */ + export type Outbound = UpdateTeamEscalationPolicy$Outbound; +} + +export function updateTeamEscalationPolicyToJSON( + updateTeamEscalationPolicy: UpdateTeamEscalationPolicy, +): string { + return JSON.stringify( + UpdateTeamEscalationPolicy$outboundSchema.parse(updateTeamEscalationPolicy), + ); +} + +export function updateTeamEscalationPolicyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamEscalationPolicy$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamEscalationPolicy' from JSON`, + ); +} diff --git a/src/models/components/updateteamoncallschedule.ts b/src/models/components/updateteamoncallschedule.ts new file mode 100644 index 00000000..f66d1f6e --- /dev/null +++ b/src/models/components/updateteamoncallschedule.ts @@ -0,0 +1,604 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateTeamOnCallScheduleMember = { + /** + * The ID of a user who should be added to the schedule's rotation. You can add a user to the schedule + * + * @remarks + * multiple times to construct more complex rotations, and you can specify a `null` user ID to create + * unassigned slots in the rotation. + */ + userId?: string | null | undefined; +}; + +/** + * The type of strategy. Must be one of "daily", "weekly", or "custom". + */ +export const UpdateTeamOnCallScheduleType = { + Daily: "daily", + Weekly: "weekly", + Custom: "custom", +} as const; +/** + * The type of strategy. Must be one of "daily", "weekly", or "custom". + */ +export type UpdateTeamOnCallScheduleType = ClosedEnum< + typeof UpdateTeamOnCallScheduleType +>; + +/** + * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + */ +export const UpdateTeamOnCallScheduleHandoffDay = { + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", +} as const; +/** + * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + */ +export type UpdateTeamOnCallScheduleHandoffDay = ClosedEnum< + typeof UpdateTeamOnCallScheduleHandoffDay +>; + +/** + * An object that specifies how the schedule's on-call shifts should be generated. + */ +export type UpdateTeamOnCallScheduleStrategy = { + /** + * The type of strategy. Must be one of "daily", "weekly", or "custom". + */ + type: UpdateTeamOnCallScheduleType; + /** + * An ISO8601 time string specifying when on-call shifts should hand off. This value is only used if the strategy type is "daily" or "weekly". + */ + handoffTime?: string | null | undefined; + /** + * The day of the week on which on-call shifts should hand off, as its long-form name (e.g. "monday", "tuesday", etc). This value is only used if the strategy type is "weekly". + */ + handoffDay?: UpdateTeamOnCallScheduleHandoffDay | null | undefined; + /** + * An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is "custom". + */ + shiftDuration?: string | null | undefined; +}; + +/** + * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export const UpdateTeamOnCallScheduleStartDay = { + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", +} as const; +/** + * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export type UpdateTeamOnCallScheduleStartDay = ClosedEnum< + typeof UpdateTeamOnCallScheduleStartDay +>; + +/** + * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export const UpdateTeamOnCallScheduleEndDay = { + Monday: "monday", + Tuesday: "tuesday", + Wednesday: "wednesday", + Thursday: "thursday", + Friday: "friday", + Saturday: "saturday", + Sunday: "sunday", +} as const; +/** + * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + */ +export type UpdateTeamOnCallScheduleEndDay = ClosedEnum< + typeof UpdateTeamOnCallScheduleEndDay +>; + +export type UpdateTeamOnCallScheduleRestriction = { + /** + * The day of the week on which the restriction should start, as its long-form name (e.g. "monday", "tuesday", etc). + */ + startDay: UpdateTeamOnCallScheduleStartDay; + /** + * An ISO8601 time string specifying when the restriction should start. + */ + startTime: string; + /** + * The day of the week on which the restriction should end, as its long-form name (e.g. "monday", "tuesday", etc). + */ + endDay: UpdateTeamOnCallScheduleEndDay; + /** + * An ISO8601 time string specifying when the restriction should end. + */ + endTime: string; +}; + +/** + * Update a Signals on-call schedule by ID + */ +export type UpdateTeamOnCallSchedule = { + /** + * The on-call schedule's name. + */ + name?: string | null | undefined; + /** + * A detailed description of the on-call schedule. + */ + description?: string | null | undefined; + /** + * The time zone in which the on-call schedule operates. This value must be a valid IANA time zone name. + */ + timeZone?: string | null | undefined; + /** + * The ID of a Slack user group for syncing purposes. If provided, we will automatically sync whoever is on call to the user group in Slack. + */ + slackUserGroupId?: string | null | undefined; + /** + * An ordered list of objects that specify members of the on-call schedule's rotation. + */ + members?: Array | null | undefined; + /** + * An object that specifies how the schedule's on-call shifts should be generated. + */ + strategy?: UpdateTeamOnCallScheduleStrategy | null | undefined; + /** + * A list of objects that restrict the schedule to speccific on-call periods. + */ + restrictions?: Array | null | undefined; + /** + * An ISO8601 time string specifying when the updated schedule should take effect. This + * + * @remarks + * value must be provided if editing an attribute that would affect how the schedule's + * shifts are generated, such as the time zone, members, strategy, or restrictions. + */ + effectiveAt?: string | null | undefined; + /** + * A hex color code that will be used to represent the schedule in the UI and iCal subscriptions. + */ + color?: string | null | undefined; + /** + * This parameter is deprecated; use `members` instead. + */ + memberIds?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTeamOnCallScheduleMember$inboundSchema: z.ZodType< + UpdateTeamOnCallScheduleMember, + z.ZodTypeDef, + unknown +> = z.object({ + user_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + }); +}); + +/** @internal */ +export type UpdateTeamOnCallScheduleMember$Outbound = { + user_id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateTeamOnCallScheduleMember$outboundSchema: z.ZodType< + UpdateTeamOnCallScheduleMember$Outbound, + z.ZodTypeDef, + UpdateTeamOnCallScheduleMember +> = z.object({ + userId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallScheduleMember$ { + /** @deprecated use `UpdateTeamOnCallScheduleMember$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamOnCallScheduleMember$inboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleMember$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamOnCallScheduleMember$outboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleMember$Outbound` instead. */ + export type Outbound = UpdateTeamOnCallScheduleMember$Outbound; +} + +export function updateTeamOnCallScheduleMemberToJSON( + updateTeamOnCallScheduleMember: UpdateTeamOnCallScheduleMember, +): string { + return JSON.stringify( + UpdateTeamOnCallScheduleMember$outboundSchema.parse( + updateTeamOnCallScheduleMember, + ), + ); +} + +export function updateTeamOnCallScheduleMemberFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamOnCallScheduleMember$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamOnCallScheduleMember' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamOnCallScheduleType$inboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleType +> = z.nativeEnum(UpdateTeamOnCallScheduleType); + +/** @internal */ +export const UpdateTeamOnCallScheduleType$outboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleType +> = UpdateTeamOnCallScheduleType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallScheduleType$ { + /** @deprecated use `UpdateTeamOnCallScheduleType$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamOnCallScheduleType$inboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleType$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamOnCallScheduleType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamOnCallScheduleHandoffDay$inboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleHandoffDay +> = z.nativeEnum(UpdateTeamOnCallScheduleHandoffDay); + +/** @internal */ +export const UpdateTeamOnCallScheduleHandoffDay$outboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleHandoffDay +> = UpdateTeamOnCallScheduleHandoffDay$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallScheduleHandoffDay$ { + /** @deprecated use `UpdateTeamOnCallScheduleHandoffDay$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamOnCallScheduleHandoffDay$inboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleHandoffDay$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamOnCallScheduleHandoffDay$outboundSchema; +} + +/** @internal */ +export const UpdateTeamOnCallScheduleStrategy$inboundSchema: z.ZodType< + UpdateTeamOnCallScheduleStrategy, + z.ZodTypeDef, + unknown +> = z.object({ + type: UpdateTeamOnCallScheduleType$inboundSchema, + handoff_time: z.nullable(z.string()).optional(), + handoff_day: z.nullable(UpdateTeamOnCallScheduleHandoffDay$inboundSchema) + .optional(), + shift_duration: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "handoff_time": "handoffTime", + "handoff_day": "handoffDay", + "shift_duration": "shiftDuration", + }); +}); + +/** @internal */ +export type UpdateTeamOnCallScheduleStrategy$Outbound = { + type: string; + handoff_time?: string | null | undefined; + handoff_day?: string | null | undefined; + shift_duration?: string | null | undefined; +}; + +/** @internal */ +export const UpdateTeamOnCallScheduleStrategy$outboundSchema: z.ZodType< + UpdateTeamOnCallScheduleStrategy$Outbound, + z.ZodTypeDef, + UpdateTeamOnCallScheduleStrategy +> = z.object({ + type: UpdateTeamOnCallScheduleType$outboundSchema, + handoffTime: z.nullable(z.string()).optional(), + handoffDay: z.nullable(UpdateTeamOnCallScheduleHandoffDay$outboundSchema) + .optional(), + shiftDuration: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + handoffTime: "handoff_time", + handoffDay: "handoff_day", + shiftDuration: "shift_duration", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallScheduleStrategy$ { + /** @deprecated use `UpdateTeamOnCallScheduleStrategy$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamOnCallScheduleStrategy$inboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleStrategy$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamOnCallScheduleStrategy$outboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleStrategy$Outbound` instead. */ + export type Outbound = UpdateTeamOnCallScheduleStrategy$Outbound; +} + +export function updateTeamOnCallScheduleStrategyToJSON( + updateTeamOnCallScheduleStrategy: UpdateTeamOnCallScheduleStrategy, +): string { + return JSON.stringify( + UpdateTeamOnCallScheduleStrategy$outboundSchema.parse( + updateTeamOnCallScheduleStrategy, + ), + ); +} + +export function updateTeamOnCallScheduleStrategyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamOnCallScheduleStrategy$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamOnCallScheduleStrategy' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamOnCallScheduleStartDay$inboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleStartDay +> = z.nativeEnum(UpdateTeamOnCallScheduleStartDay); + +/** @internal */ +export const UpdateTeamOnCallScheduleStartDay$outboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleStartDay +> = UpdateTeamOnCallScheduleStartDay$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallScheduleStartDay$ { + /** @deprecated use `UpdateTeamOnCallScheduleStartDay$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamOnCallScheduleStartDay$inboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleStartDay$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamOnCallScheduleStartDay$outboundSchema; +} + +/** @internal */ +export const UpdateTeamOnCallScheduleEndDay$inboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleEndDay +> = z.nativeEnum(UpdateTeamOnCallScheduleEndDay); + +/** @internal */ +export const UpdateTeamOnCallScheduleEndDay$outboundSchema: z.ZodNativeEnum< + typeof UpdateTeamOnCallScheduleEndDay +> = UpdateTeamOnCallScheduleEndDay$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallScheduleEndDay$ { + /** @deprecated use `UpdateTeamOnCallScheduleEndDay$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamOnCallScheduleEndDay$inboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleEndDay$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamOnCallScheduleEndDay$outboundSchema; +} + +/** @internal */ +export const UpdateTeamOnCallScheduleRestriction$inboundSchema: z.ZodType< + UpdateTeamOnCallScheduleRestriction, + z.ZodTypeDef, + unknown +> = z.object({ + start_day: UpdateTeamOnCallScheduleStartDay$inboundSchema, + start_time: z.string(), + end_day: UpdateTeamOnCallScheduleEndDay$inboundSchema, + end_time: z.string(), +}).transform((v) => { + return remap$(v, { + "start_day": "startDay", + "start_time": "startTime", + "end_day": "endDay", + "end_time": "endTime", + }); +}); + +/** @internal */ +export type UpdateTeamOnCallScheduleRestriction$Outbound = { + start_day: string; + start_time: string; + end_day: string; + end_time: string; +}; + +/** @internal */ +export const UpdateTeamOnCallScheduleRestriction$outboundSchema: z.ZodType< + UpdateTeamOnCallScheduleRestriction$Outbound, + z.ZodTypeDef, + UpdateTeamOnCallScheduleRestriction +> = z.object({ + startDay: UpdateTeamOnCallScheduleStartDay$outboundSchema, + startTime: z.string(), + endDay: UpdateTeamOnCallScheduleEndDay$outboundSchema, + endTime: z.string(), +}).transform((v) => { + return remap$(v, { + startDay: "start_day", + startTime: "start_time", + endDay: "end_day", + endTime: "end_time", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallScheduleRestriction$ { + /** @deprecated use `UpdateTeamOnCallScheduleRestriction$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamOnCallScheduleRestriction$inboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleRestriction$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamOnCallScheduleRestriction$outboundSchema; + /** @deprecated use `UpdateTeamOnCallScheduleRestriction$Outbound` instead. */ + export type Outbound = UpdateTeamOnCallScheduleRestriction$Outbound; +} + +export function updateTeamOnCallScheduleRestrictionToJSON( + updateTeamOnCallScheduleRestriction: UpdateTeamOnCallScheduleRestriction, +): string { + return JSON.stringify( + UpdateTeamOnCallScheduleRestriction$outboundSchema.parse( + updateTeamOnCallScheduleRestriction, + ), + ); +} + +export function updateTeamOnCallScheduleRestrictionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateTeamOnCallScheduleRestriction$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamOnCallScheduleRestriction' from JSON`, + ); +} + +/** @internal */ +export const UpdateTeamOnCallSchedule$inboundSchema: z.ZodType< + UpdateTeamOnCallSchedule, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + time_zone: z.nullable(z.string()).optional(), + slack_user_group_id: z.nullable(z.string()).optional(), + members: z.nullable( + z.array(z.lazy(() => UpdateTeamOnCallScheduleMember$inboundSchema)), + ).optional(), + strategy: z.nullable( + z.lazy(() => UpdateTeamOnCallScheduleStrategy$inboundSchema), + ).optional(), + restrictions: z.nullable( + z.array(z.lazy(() => UpdateTeamOnCallScheduleRestriction$inboundSchema)), + ).optional(), + effective_at: z.nullable(z.string()).optional(), + color: z.nullable(z.string()).optional(), + member_ids: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "time_zone": "timeZone", + "slack_user_group_id": "slackUserGroupId", + "effective_at": "effectiveAt", + "member_ids": "memberIds", + }); +}); + +/** @internal */ +export type UpdateTeamOnCallSchedule$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + time_zone?: string | null | undefined; + slack_user_group_id?: string | null | undefined; + members?: Array | null | undefined; + strategy?: UpdateTeamOnCallScheduleStrategy$Outbound | null | undefined; + restrictions?: + | Array + | null + | undefined; + effective_at?: string | null | undefined; + color?: string | null | undefined; + member_ids?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTeamOnCallSchedule$outboundSchema: z.ZodType< + UpdateTeamOnCallSchedule$Outbound, + z.ZodTypeDef, + UpdateTeamOnCallSchedule +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + timeZone: z.nullable(z.string()).optional(), + slackUserGroupId: z.nullable(z.string()).optional(), + members: z.nullable( + z.array(z.lazy(() => UpdateTeamOnCallScheduleMember$outboundSchema)), + ).optional(), + strategy: z.nullable( + z.lazy(() => UpdateTeamOnCallScheduleStrategy$outboundSchema), + ).optional(), + restrictions: z.nullable( + z.array(z.lazy(() => UpdateTeamOnCallScheduleRestriction$outboundSchema)), + ).optional(), + effectiveAt: z.nullable(z.string()).optional(), + color: z.nullable(z.string()).optional(), + memberIds: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + timeZone: "time_zone", + slackUserGroupId: "slack_user_group_id", + effectiveAt: "effective_at", + memberIds: "member_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamOnCallSchedule$ { + /** @deprecated use `UpdateTeamOnCallSchedule$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamOnCallSchedule$inboundSchema; + /** @deprecated use `UpdateTeamOnCallSchedule$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamOnCallSchedule$outboundSchema; + /** @deprecated use `UpdateTeamOnCallSchedule$Outbound` instead. */ + export type Outbound = UpdateTeamOnCallSchedule$Outbound; +} + +export function updateTeamOnCallScheduleToJSON( + updateTeamOnCallSchedule: UpdateTeamOnCallSchedule, +): string { + return JSON.stringify( + UpdateTeamOnCallSchedule$outboundSchema.parse(updateTeamOnCallSchedule), + ); +} + +export function updateTeamOnCallScheduleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamOnCallSchedule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamOnCallSchedule' from JSON`, + ); +} diff --git a/src/models/components/updateteamsignalrule.ts b/src/models/components/updateteamsignalrule.ts new file mode 100644 index 00000000..fdca742c --- /dev/null +++ b/src/models/components/updateteamsignalrule.ts @@ -0,0 +1,271 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The type of target that the rule will notify when matched. + */ +export const UpdateTeamSignalRuleTargetType = { + EscalationPolicy: "EscalationPolicy", + OnCallSchedule: "OnCallSchedule", + User: "User", + Webhook: "Webhook", + SlackChannel: "SlackChannel", +} as const; +/** + * The type of target that the rule will notify when matched. + */ +export type UpdateTeamSignalRuleTargetType = ClosedEnum< + typeof UpdateTeamSignalRuleTargetType +>; + +/** + * A notification priority that will be set on the resulting alert (default: HIGH) + */ +export const UpdateTeamSignalRuleNotificationPriorityOverride = { + High: "HIGH", + Medium: "MEDIUM", + Low: "LOW", + Unknown: "", +} as const; +/** + * A notification priority that will be set on the resulting alert (default: HIGH) + */ +export type UpdateTeamSignalRuleNotificationPriorityOverride = ClosedEnum< + typeof UpdateTeamSignalRuleNotificationPriorityOverride +>; + +/** + * Determines when an incident should be created when this rule is matched + */ +export const UpdateTeamSignalRuleCreateIncidentConditionWhen = { + WhenUnspecified: "WHEN_UNSPECIFIED", + WhenAlways: "WHEN_ALWAYS", +} as const; +/** + * Determines when an incident should be created when this rule is matched + */ +export type UpdateTeamSignalRuleCreateIncidentConditionWhen = ClosedEnum< + typeof UpdateTeamSignalRuleCreateIncidentConditionWhen +>; + +/** + * Update a Signals rule by ID + */ +export type UpdateTeamSignalRule = { + /** + * The rule's name. + */ + name?: string | null | undefined; + /** + * The CEL expression that defines the rule. + */ + expression?: string | null | undefined; + /** + * The type of target that the rule will notify when matched. + */ + targetType?: UpdateTeamSignalRuleTargetType | null | undefined; + /** + * The ID of the target that the rule will notify when matched. + */ + targetId?: string | null | undefined; + /** + * The ID of an incident type that should be used when an alert is promoted to an incident + */ + incidentTypeId?: string | null | undefined; + /** + * A notification priority that will be set on the resulting alert (default: HIGH) + */ + notificationPriorityOverride?: + | UpdateTeamSignalRuleNotificationPriorityOverride + | null + | undefined; + /** + * Determines when an incident should be created when this rule is matched + */ + createIncidentConditionWhen?: + | UpdateTeamSignalRuleCreateIncidentConditionWhen + | null + | undefined; + /** + * The amount of time alerts created from this rule will be deduplicated + */ + deduplicationExpiry?: string | null | undefined; +}; + +/** @internal */ +export const UpdateTeamSignalRuleTargetType$inboundSchema: z.ZodNativeEnum< + typeof UpdateTeamSignalRuleTargetType +> = z.nativeEnum(UpdateTeamSignalRuleTargetType); + +/** @internal */ +export const UpdateTeamSignalRuleTargetType$outboundSchema: z.ZodNativeEnum< + typeof UpdateTeamSignalRuleTargetType +> = UpdateTeamSignalRuleTargetType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamSignalRuleTargetType$ { + /** @deprecated use `UpdateTeamSignalRuleTargetType$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamSignalRuleTargetType$inboundSchema; + /** @deprecated use `UpdateTeamSignalRuleTargetType$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamSignalRuleTargetType$outboundSchema; +} + +/** @internal */ +export const UpdateTeamSignalRuleNotificationPriorityOverride$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateTeamSignalRuleNotificationPriorityOverride); + +/** @internal */ +export const UpdateTeamSignalRuleNotificationPriorityOverride$outboundSchema: + z.ZodNativeEnum = + UpdateTeamSignalRuleNotificationPriorityOverride$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamSignalRuleNotificationPriorityOverride$ { + /** @deprecated use `UpdateTeamSignalRuleNotificationPriorityOverride$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamSignalRuleNotificationPriorityOverride$inboundSchema; + /** @deprecated use `UpdateTeamSignalRuleNotificationPriorityOverride$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamSignalRuleNotificationPriorityOverride$outboundSchema; +} + +/** @internal */ +export const UpdateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(UpdateTeamSignalRuleCreateIncidentConditionWhen); + +/** @internal */ +export const UpdateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema: + z.ZodNativeEnum = + UpdateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamSignalRuleCreateIncidentConditionWhen$ { + /** @deprecated use `UpdateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema` instead. */ + export const inboundSchema = + UpdateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema; + /** @deprecated use `UpdateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema` instead. */ + export const outboundSchema = + UpdateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema; +} + +/** @internal */ +export const UpdateTeamSignalRule$inboundSchema: z.ZodType< + UpdateTeamSignalRule, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + expression: z.nullable(z.string()).optional(), + target_type: z.nullable(UpdateTeamSignalRuleTargetType$inboundSchema) + .optional(), + target_id: z.nullable(z.string()).optional(), + incident_type_id: z.nullable(z.string()).optional(), + notification_priority_override: z.nullable( + UpdateTeamSignalRuleNotificationPriorityOverride$inboundSchema, + ).optional(), + create_incident_condition_when: z.nullable( + UpdateTeamSignalRuleCreateIncidentConditionWhen$inboundSchema, + ).optional(), + deduplication_expiry: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "target_type": "targetType", + "target_id": "targetId", + "incident_type_id": "incidentTypeId", + "notification_priority_override": "notificationPriorityOverride", + "create_incident_condition_when": "createIncidentConditionWhen", + "deduplication_expiry": "deduplicationExpiry", + }); +}); + +/** @internal */ +export type UpdateTeamSignalRule$Outbound = { + name?: string | null | undefined; + expression?: string | null | undefined; + target_type?: string | null | undefined; + target_id?: string | null | undefined; + incident_type_id?: string | null | undefined; + notification_priority_override?: string | null | undefined; + create_incident_condition_when?: string | null | undefined; + deduplication_expiry?: string | null | undefined; +}; + +/** @internal */ +export const UpdateTeamSignalRule$outboundSchema: z.ZodType< + UpdateTeamSignalRule$Outbound, + z.ZodTypeDef, + UpdateTeamSignalRule +> = z.object({ + name: z.nullable(z.string()).optional(), + expression: z.nullable(z.string()).optional(), + targetType: z.nullable(UpdateTeamSignalRuleTargetType$outboundSchema) + .optional(), + targetId: z.nullable(z.string()).optional(), + incidentTypeId: z.nullable(z.string()).optional(), + notificationPriorityOverride: z.nullable( + UpdateTeamSignalRuleNotificationPriorityOverride$outboundSchema, + ).optional(), + createIncidentConditionWhen: z.nullable( + UpdateTeamSignalRuleCreateIncidentConditionWhen$outboundSchema, + ).optional(), + deduplicationExpiry: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + targetType: "target_type", + targetId: "target_id", + incidentTypeId: "incident_type_id", + notificationPriorityOverride: "notification_priority_override", + createIncidentConditionWhen: "create_incident_condition_when", + deduplicationExpiry: "deduplication_expiry", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTeamSignalRule$ { + /** @deprecated use `UpdateTeamSignalRule$inboundSchema` instead. */ + export const inboundSchema = UpdateTeamSignalRule$inboundSchema; + /** @deprecated use `UpdateTeamSignalRule$outboundSchema` instead. */ + export const outboundSchema = UpdateTeamSignalRule$outboundSchema; + /** @deprecated use `UpdateTeamSignalRule$Outbound` instead. */ + export type Outbound = UpdateTeamSignalRule$Outbound; +} + +export function updateTeamSignalRuleToJSON( + updateTeamSignalRule: UpdateTeamSignalRule, +): string { + return JSON.stringify( + UpdateTeamSignalRule$outboundSchema.parse(updateTeamSignalRule), + ); +} + +export function updateTeamSignalRuleFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTeamSignalRule$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTeamSignalRule' from JSON`, + ); +} diff --git a/src/models/components/updateticket.ts b/src/models/components/updateticket.ts new file mode 100644 index 00000000..ec56343c --- /dev/null +++ b/src/models/components/updateticket.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a ticket's attributes + */ +export type UpdateTicket = { + summary?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + type?: string | null | undefined; + priorityId?: string | null | undefined; + /** + * List of tags for the ticket + */ + tagList?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTicket$inboundSchema: z.ZodType< + UpdateTicket, + z.ZodTypeDef, + unknown +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + priority_id: z.nullable(z.string()).optional(), + tag_list: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "priority_id": "priorityId", + "tag_list": "tagList", + }); +}); + +/** @internal */ +export type UpdateTicket$Outbound = { + summary?: string | null | undefined; + description?: string | null | undefined; + state?: string | null | undefined; + type?: string | null | undefined; + priority_id?: string | null | undefined; + tag_list?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateTicket$outboundSchema: z.ZodType< + UpdateTicket$Outbound, + z.ZodTypeDef, + UpdateTicket +> = z.object({ + summary: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + priorityId: z.nullable(z.string()).optional(), + tagList: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + priorityId: "priority_id", + tagList: "tag_list", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTicket$ { + /** @deprecated use `UpdateTicket$inboundSchema` instead. */ + export const inboundSchema = UpdateTicket$inboundSchema; + /** @deprecated use `UpdateTicket$outboundSchema` instead. */ + export const outboundSchema = UpdateTicket$outboundSchema; + /** @deprecated use `UpdateTicket$Outbound` instead. */ + export type Outbound = UpdateTicket$Outbound; +} + +export function updateTicketToJSON(updateTicket: UpdateTicket): string { + return JSON.stringify(UpdateTicket$outboundSchema.parse(updateTicket)); +} + +export function updateTicketFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTicket$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTicket' from JSON`, + ); +} diff --git a/src/models/components/updateticketingpriority.ts b/src/models/components/updateticketingpriority.ts new file mode 100644 index 00000000..b7ed6cf5 --- /dev/null +++ b/src/models/components/updateticketingpriority.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Update a single ticketing priority's attributes + */ +export type UpdateTicketingPriority = { + name?: string | null | undefined; + /** + * The position that this priority should take in your list of priorities. Priorities should be ordered from highest to lowest, with the highest priority at 0. If a position isn't specified, the new priority will be added to the end of the list; if another priority already exists at the specified position, this priority will shift that priority and all priorities down the list. + */ + position?: number | null | undefined; +}; + +/** @internal */ +export const UpdateTicketingPriority$inboundSchema: z.ZodType< + UpdateTicketingPriority, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type UpdateTicketingPriority$Outbound = { + name?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const UpdateTicketingPriority$outboundSchema: z.ZodType< + UpdateTicketingPriority$Outbound, + z.ZodTypeDef, + UpdateTicketingPriority +> = z.object({ + name: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTicketingPriority$ { + /** @deprecated use `UpdateTicketingPriority$inboundSchema` instead. */ + export const inboundSchema = UpdateTicketingPriority$inboundSchema; + /** @deprecated use `UpdateTicketingPriority$outboundSchema` instead. */ + export const outboundSchema = UpdateTicketingPriority$outboundSchema; + /** @deprecated use `UpdateTicketingPriority$Outbound` instead. */ + export type Outbound = UpdateTicketingPriority$Outbound; +} + +export function updateTicketingPriorityToJSON( + updateTicketingPriority: UpdateTicketingPriority, +): string { + return JSON.stringify( + UpdateTicketingPriority$outboundSchema.parse(updateTicketingPriority), + ); +} + +export function updateTicketingPriorityFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTicketingPriority$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTicketingPriority' from JSON`, + ); +} diff --git a/src/models/components/updatevote.ts b/src/models/components/updatevote.ts new file mode 100644 index 00000000..af2d99e0 --- /dev/null +++ b/src/models/components/updatevote.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The direction you would like to vote, or if you dig it + */ +export const Direction = { + Up: "up", + Down: "down", + Dig: "dig", +} as const; +/** + * The direction you would like to vote, or if you dig it + */ +export type Direction = ClosedEnum; + +/** + * Upvote or downvote an object + */ +export type UpdateVote = { + /** + * The direction you would like to vote, or if you dig it + */ + direction: Direction; +}; + +/** @internal */ +export const Direction$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Direction); + +/** @internal */ +export const Direction$outboundSchema: z.ZodNativeEnum = + Direction$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Direction$ { + /** @deprecated use `Direction$inboundSchema` instead. */ + export const inboundSchema = Direction$inboundSchema; + /** @deprecated use `Direction$outboundSchema` instead. */ + export const outboundSchema = Direction$outboundSchema; +} + +/** @internal */ +export const UpdateVote$inboundSchema: z.ZodType< + UpdateVote, + z.ZodTypeDef, + unknown +> = z.object({ + direction: Direction$inboundSchema, +}); + +/** @internal */ +export type UpdateVote$Outbound = { + direction: string; +}; + +/** @internal */ +export const UpdateVote$outboundSchema: z.ZodType< + UpdateVote$Outbound, + z.ZodTypeDef, + UpdateVote +> = z.object({ + direction: Direction$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateVote$ { + /** @deprecated use `UpdateVote$inboundSchema` instead. */ + export const inboundSchema = UpdateVote$inboundSchema; + /** @deprecated use `UpdateVote$outboundSchema` instead. */ + export const outboundSchema = UpdateVote$outboundSchema; + /** @deprecated use `UpdateVote$Outbound` instead. */ + export type Outbound = UpdateVote$Outbound; +} + +export function updateVoteToJSON(updateVote: UpdateVote): string { + return JSON.stringify(UpdateVote$outboundSchema.parse(updateVote)); +} + +export function updateVoteFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateVote$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateVote' from JSON`, + ); +} diff --git a/src/models/components/updatewebhook.ts b/src/models/components/updatewebhook.ts new file mode 100644 index 00000000..ef3b7666 --- /dev/null +++ b/src/models/components/updatewebhook.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const UpdateWebhookState = { + Active: "active", + Inactive: "inactive", +} as const; +export type UpdateWebhookState = ClosedEnum; + +/** + * Update a specific webhook + */ +export type UpdateWebhook = { + url?: string | null | undefined; + state?: UpdateWebhookState | null | undefined; +}; + +/** @internal */ +export const UpdateWebhookState$inboundSchema: z.ZodNativeEnum< + typeof UpdateWebhookState +> = z.nativeEnum(UpdateWebhookState); + +/** @internal */ +export const UpdateWebhookState$outboundSchema: z.ZodNativeEnum< + typeof UpdateWebhookState +> = UpdateWebhookState$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateWebhookState$ { + /** @deprecated use `UpdateWebhookState$inboundSchema` instead. */ + export const inboundSchema = UpdateWebhookState$inboundSchema; + /** @deprecated use `UpdateWebhookState$outboundSchema` instead. */ + export const outboundSchema = UpdateWebhookState$outboundSchema; +} + +/** @internal */ +export const UpdateWebhook$inboundSchema: z.ZodType< + UpdateWebhook, + z.ZodTypeDef, + unknown +> = z.object({ + url: z.nullable(z.string()).optional(), + state: z.nullable(UpdateWebhookState$inboundSchema).optional(), +}); + +/** @internal */ +export type UpdateWebhook$Outbound = { + url?: string | null | undefined; + state?: string | null | undefined; +}; + +/** @internal */ +export const UpdateWebhook$outboundSchema: z.ZodType< + UpdateWebhook$Outbound, + z.ZodTypeDef, + UpdateWebhook +> = z.object({ + url: z.nullable(z.string()).optional(), + state: z.nullable(UpdateWebhookState$outboundSchema).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateWebhook$ { + /** @deprecated use `UpdateWebhook$inboundSchema` instead. */ + export const inboundSchema = UpdateWebhook$inboundSchema; + /** @deprecated use `UpdateWebhook$outboundSchema` instead. */ + export const outboundSchema = UpdateWebhook$outboundSchema; + /** @deprecated use `UpdateWebhook$Outbound` instead. */ + export type Outbound = UpdateWebhook$Outbound; +} + +export function updateWebhookToJSON(updateWebhook: UpdateWebhook): string { + return JSON.stringify(UpdateWebhook$outboundSchema.parse(updateWebhook)); +} + +export function updateWebhookFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateWebhook$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateWebhook' from JSON`, + ); +} diff --git a/src/models/components/userentity.ts b/src/models/components/userentity.ts index 06e58938..962d419f 100644 --- a/src/models/components/userentity.ts +++ b/src/models/components/userentity.ts @@ -12,14 +12,14 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * UserEntity model */ export type UserEntity = { - id?: string | undefined; - name?: string | undefined; - email?: string | undefined; - slackUserId?: string | undefined; - slackLinked?: boolean | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - signalsEnabledNotificationTypes?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + email?: string | null | undefined; + slackUserId?: string | null | undefined; + slackLinked?: boolean | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + signalsEnabledNotificationTypes?: Array | null | undefined; }; /** @internal */ @@ -28,16 +28,19 @@ export const UserEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - email: z.string().optional(), - slack_user_id: z.string().optional(), - "slack_linked?": z.boolean().optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + slack_user_id: z.nullable(z.string()).optional(), + "slack_linked?": z.nullable(z.boolean()).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + signals_enabled_notification_types: z.nullable(z.array(z.string())) .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - signals_enabled_notification_types: z.array(z.string()).optional(), }).transform((v) => { return remap$(v, { "slack_user_id": "slackUserId", @@ -50,14 +53,14 @@ export const UserEntity$inboundSchema: z.ZodType< /** @internal */ export type UserEntity$Outbound = { - id?: string | undefined; - name?: string | undefined; - email?: string | undefined; - slack_user_id?: string | undefined; - "slack_linked?"?: boolean | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - signals_enabled_notification_types?: Array | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + email?: string | null | undefined; + slack_user_id?: string | null | undefined; + "slack_linked?"?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + signals_enabled_notification_types?: Array | null | undefined; }; /** @internal */ @@ -66,14 +69,14 @@ export const UserEntity$outboundSchema: z.ZodType< z.ZodTypeDef, UserEntity > = z.object({ - id: z.string().optional(), - name: z.string().optional(), - email: z.string().optional(), - slackUserId: z.string().optional(), - slackLinked: z.boolean().optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - signalsEnabledNotificationTypes: z.array(z.string()).optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + email: z.nullable(z.string()).optional(), + slackUserId: z.nullable(z.string()).optional(), + slackLinked: z.nullable(z.boolean()).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + signalsEnabledNotificationTypes: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { slackUserId: "slack_user_id", diff --git a/src/models/components/userentitypaginated.ts b/src/models/components/userentitypaginated.ts index e9fe706f..15cc069f 100644 --- a/src/models/components/userentitypaginated.ts +++ b/src/models/components/userentitypaginated.ts @@ -7,11 +7,11 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - PaginationEntity, - PaginationEntity$inboundSchema, - PaginationEntity$Outbound, - PaginationEntity$outboundSchema, -} from "./paginationentity.js"; + NullablePaginationEntity, + NullablePaginationEntity$inboundSchema, + NullablePaginationEntity$Outbound, + NullablePaginationEntity$outboundSchema, +} from "./nullablepaginationentity.js"; import { UserEntity, UserEntity$inboundSchema, @@ -23,8 +23,8 @@ import { * UserEntityPaginated model */ export type UserEntityPaginated = { - data?: Array | undefined; - pagination?: PaginationEntity | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; }; /** @internal */ @@ -33,14 +33,14 @@ export const UserEntityPaginated$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - data: z.array(UserEntity$inboundSchema).optional(), - pagination: PaginationEntity$inboundSchema.optional(), + data: z.nullable(z.array(UserEntity$inboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$inboundSchema).optional(), }); /** @internal */ export type UserEntityPaginated$Outbound = { - data?: Array | undefined; - pagination?: PaginationEntity$Outbound | undefined; + data?: Array | null | undefined; + pagination?: NullablePaginationEntity$Outbound | null | undefined; }; /** @internal */ @@ -49,8 +49,8 @@ export const UserEntityPaginated$outboundSchema: z.ZodType< z.ZodTypeDef, UserEntityPaginated > = z.object({ - data: z.array(UserEntity$outboundSchema).optional(), - pagination: PaginationEntity$outboundSchema.optional(), + data: z.nullable(z.array(UserEntity$outboundSchema)).optional(), + pagination: z.nullable(NullablePaginationEntity$outboundSchema).optional(), }); /** diff --git a/src/models/components/votesentity.ts b/src/models/components/votesentity.ts index e1a15bf8..8349bec3 100644 --- a/src/models/components/votesentity.ts +++ b/src/models/components/votesentity.ts @@ -14,17 +14,17 @@ export type VotesEntity = { /** * Whether or not the current actor has voted */ - voted?: boolean | undefined; + voted?: boolean | null | undefined; /** * Whether or not the current actor has voted positively */ - liked?: boolean | undefined; + liked?: boolean | null | undefined; /** * Whether or not the current actor has voted negatively */ - disliked?: boolean | undefined; - likes?: number | undefined; - dislikes?: number | undefined; + disliked?: boolean | null | undefined; + likes?: number | null | undefined; + dislikes?: number | null | undefined; }; /** @internal */ @@ -33,20 +33,20 @@ export const VotesEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - voted: z.boolean().optional(), - liked: z.boolean().optional(), - disliked: z.boolean().optional(), - likes: z.number().int().optional(), - dislikes: z.number().int().optional(), + voted: z.nullable(z.boolean()).optional(), + liked: z.nullable(z.boolean()).optional(), + disliked: z.nullable(z.boolean()).optional(), + likes: z.nullable(z.number().int()).optional(), + dislikes: z.nullable(z.number().int()).optional(), }); /** @internal */ export type VotesEntity$Outbound = { - voted?: boolean | undefined; - liked?: boolean | undefined; - disliked?: boolean | undefined; - likes?: number | undefined; - dislikes?: number | undefined; + voted?: boolean | null | undefined; + liked?: boolean | null | undefined; + disliked?: boolean | null | undefined; + likes?: number | null | undefined; + dislikes?: number | null | undefined; }; /** @internal */ @@ -55,11 +55,11 @@ export const VotesEntity$outboundSchema: z.ZodType< z.ZodTypeDef, VotesEntity > = z.object({ - voted: z.boolean().optional(), - liked: z.boolean().optional(), - disliked: z.boolean().optional(), - likes: z.number().int().optional(), - dislikes: z.number().int().optional(), + voted: z.nullable(z.boolean()).optional(), + liked: z.nullable(z.boolean()).optional(), + disliked: z.nullable(z.boolean()).optional(), + likes: z.nullable(z.number().int()).optional(), + dislikes: z.nullable(z.number().int()).optional(), }); /** diff --git a/src/models/components/webhooksentitieswebhookentity.ts b/src/models/components/webhooksentitieswebhookentity.ts index 1e346567..a71a36e4 100644 --- a/src/models/components/webhooksentitieswebhookentity.ts +++ b/src/models/components/webhooksentitieswebhookentity.ts @@ -8,23 +8,23 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - AuthorEntity, - AuthorEntity$inboundSchema, - AuthorEntity$Outbound, - AuthorEntity$outboundSchema, -} from "./authorentity.js"; + NullableAuthorEntity, + NullableAuthorEntity$inboundSchema, + NullableAuthorEntity$Outbound, + NullableAuthorEntity$outboundSchema, +} from "./nullableauthorentity.js"; /** * Webhooks_Entities_WebhookEntity model */ export type WebhooksEntitiesWebhookEntity = { - id?: string | undefined; - url?: string | undefined; - state?: string | undefined; - createdBy?: AuthorEntity | undefined; - createdAt?: Date | undefined; - updatedAt?: Date | undefined; - subscriptions?: string | undefined; + id?: string | null | undefined; + url?: string | null | undefined; + state?: string | null | undefined; + createdBy?: NullableAuthorEntity | null | undefined; + createdAt?: Date | null | undefined; + updatedAt?: Date | null | undefined; + subscriptions?: string | null | undefined; }; /** @internal */ @@ -33,15 +33,17 @@ export const WebhooksEntitiesWebhookEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - id: z.string().optional(), - url: z.string().optional(), - state: z.string().optional(), - created_by: AuthorEntity$inboundSchema.optional(), - created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - subscriptions: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + created_by: z.nullable(NullableAuthorEntity$inboundSchema).optional(), + created_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + updated_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + subscriptions: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "created_by": "createdBy", @@ -52,13 +54,13 @@ export const WebhooksEntitiesWebhookEntity$inboundSchema: z.ZodType< /** @internal */ export type WebhooksEntitiesWebhookEntity$Outbound = { - id?: string | undefined; - url?: string | undefined; - state?: string | undefined; - created_by?: AuthorEntity$Outbound | undefined; - created_at?: string | undefined; - updated_at?: string | undefined; - subscriptions?: string | undefined; + id?: string | null | undefined; + url?: string | null | undefined; + state?: string | null | undefined; + created_by?: NullableAuthorEntity$Outbound | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + subscriptions?: string | null | undefined; }; /** @internal */ @@ -67,13 +69,13 @@ export const WebhooksEntitiesWebhookEntity$outboundSchema: z.ZodType< z.ZodTypeDef, WebhooksEntitiesWebhookEntity > = z.object({ - id: z.string().optional(), - url: z.string().optional(), - state: z.string().optional(), - createdBy: AuthorEntity$outboundSchema.optional(), - createdAt: z.date().transform(v => v.toISOString()).optional(), - updatedAt: z.date().transform(v => v.toISOString()).optional(), - subscriptions: z.string().optional(), + id: z.nullable(z.string()).optional(), + url: z.nullable(z.string()).optional(), + state: z.nullable(z.string()).optional(), + createdBy: z.nullable(NullableAuthorEntity$outboundSchema).optional(), + createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + subscriptions: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { createdBy: "created_by", diff --git a/src/models/errors/badrequest.ts b/src/models/errors/badrequest.ts deleted file mode 100644 index 97ea4099..00000000 --- a/src/models/errors/badrequest.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; - -/** - * A collection of codes that generally means the end user got something wrong in making the request - */ -export type BadRequestData = { - message?: string | undefined; - - additionalProperties: { [k: string]: any }; -}; - -/** - * A collection of codes that generally means the end user got something wrong in making the request - */ -export class BadRequest extends Error { - additionalProperties: { [k: string]: any } = {}; - - /** The original data that was passed to this error instance. */ - data$: BadRequestData; - - constructor(err: BadRequestData) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.additionalProperties != null) { - this.additionalProperties = err.additionalProperties; - } - - this.name = "BadRequest"; - } -} - -/** @internal */ -export const BadRequest$inboundSchema: z.ZodType< - BadRequest, - z.ZodTypeDef, - unknown -> = collectExtraKeys$( - z.object({ - message: z.string().optional(), - }) - .catchall(z.any()), - "additionalProperties", -) - .transform((v) => { - return new BadRequest(v); - }); - -/** @internal */ -export type BadRequest$Outbound = { - message?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const BadRequest$outboundSchema: z.ZodType< - BadRequest$Outbound, - z.ZodTypeDef, - BadRequest -> = z.instanceof(BadRequest) - .transform(v => v.data$) - .pipe( - z.object({ - message: z.string().optional(), - additionalProperties: z.record(z.any()), - }).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BadRequest$ { - /** @deprecated use `BadRequest$inboundSchema` instead. */ - export const inboundSchema = BadRequest$inboundSchema; - /** @deprecated use `BadRequest$outboundSchema` instead. */ - export const outboundSchema = BadRequest$outboundSchema; - /** @deprecated use `BadRequest$Outbound` instead. */ - export type Outbound = BadRequest$Outbound; -} diff --git a/src/models/errors/errorentity.ts b/src/models/errors/errorentity.ts index 7a524f77..c78b51d6 100644 --- a/src/models/errors/errorentity.ts +++ b/src/models/errors/errorentity.ts @@ -16,32 +16,32 @@ export type Meta = {}; * ErrorEntity model */ export type ErrorEntityData = { - detail?: string | undefined; - messages?: Array | undefined; + detail?: string | null | undefined; + messages?: Array | null | undefined; /** * An object with additional error metadata */ - meta?: Meta | undefined; + meta?: Meta | null | undefined; /** * A stable code on which to match errors */ - code?: string | undefined; + code?: string | null | undefined; }; /** * ErrorEntity model */ export class ErrorEntity extends Error { - detail?: string | undefined; - messages?: Array | undefined; + detail?: string | null | undefined; + messages?: Array | null | undefined; /** * An object with additional error metadata */ - meta?: Meta | undefined; + meta?: Meta | null | undefined; /** * A stable code on which to match errors */ - code?: string | undefined; + code?: string | null | undefined; /** The original data that was passed to this error instance. */ data$: ErrorEntityData; @@ -106,10 +106,10 @@ export const ErrorEntity$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - detail: z.string().optional(), - messages: z.array(z.string()).optional(), - meta: z.lazy(() => Meta$inboundSchema).optional(), - code: z.string().optional(), + detail: z.nullable(z.string()).optional(), + messages: z.nullable(z.array(z.string())).optional(), + meta: z.nullable(z.lazy(() => Meta$inboundSchema)).optional(), + code: z.nullable(z.string()).optional(), }) .transform((v) => { return new ErrorEntity(v); @@ -117,10 +117,10 @@ export const ErrorEntity$inboundSchema: z.ZodType< /** @internal */ export type ErrorEntity$Outbound = { - detail?: string | undefined; - messages?: Array | undefined; - meta?: Meta$Outbound | undefined; - code?: string | undefined; + detail?: string | null | undefined; + messages?: Array | null | undefined; + meta?: Meta$Outbound | null | undefined; + code?: string | null | undefined; }; /** @internal */ @@ -131,10 +131,10 @@ export const ErrorEntity$outboundSchema: z.ZodType< > = z.instanceof(ErrorEntity) .transform(v => v.data$) .pipe(z.object({ - detail: z.string().optional(), - messages: z.array(z.string()).optional(), - meta: z.lazy(() => Meta$outboundSchema).optional(), - code: z.string().optional(), + detail: z.nullable(z.string()).optional(), + messages: z.nullable(z.array(z.string())).optional(), + meta: z.nullable(z.lazy(() => Meta$outboundSchema)).optional(), + code: z.nullable(z.string()).optional(), })); /** diff --git a/src/models/errors/index.ts b/src/models/errors/index.ts index a721452f..db704496 100644 --- a/src/models/errors/index.ts +++ b/src/models/errors/index.ts @@ -3,12 +3,6 @@ */ export * from "./apierror.js"; -export * from "./badrequest.js"; export * from "./errorentity.js"; export * from "./httpclienterrors.js"; -export * from "./internalservererror.js"; -export * from "./notfound.js"; -export * from "./ratelimited.js"; export * from "./sdkvalidationerror.js"; -export * from "./timeout.js"; -export * from "./unauthorized.js"; diff --git a/src/models/errors/internalservererror.ts b/src/models/errors/internalservererror.ts deleted file mode 100644 index 89590269..00000000 --- a/src/models/errors/internalservererror.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; - -/** - * A collection of status codes that generally mean the server failed in an unexpected way - */ -export type InternalServerErrorData = { - message?: string | undefined; - - additionalProperties: { [k: string]: any }; -}; - -/** - * A collection of status codes that generally mean the server failed in an unexpected way - */ -export class InternalServerError extends Error { - additionalProperties: { [k: string]: any } = {}; - - /** The original data that was passed to this error instance. */ - data$: InternalServerErrorData; - - constructor(err: InternalServerErrorData) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.additionalProperties != null) { - this.additionalProperties = err.additionalProperties; - } - - this.name = "InternalServerError"; - } -} - -/** @internal */ -export const InternalServerError$inboundSchema: z.ZodType< - InternalServerError, - z.ZodTypeDef, - unknown -> = collectExtraKeys$( - z.object({ - message: z.string().optional(), - }) - .catchall(z.any()), - "additionalProperties", -) - .transform((v) => { - return new InternalServerError(v); - }); - -/** @internal */ -export type InternalServerError$Outbound = { - message?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const InternalServerError$outboundSchema: z.ZodType< - InternalServerError$Outbound, - z.ZodTypeDef, - InternalServerError -> = z.instanceof(InternalServerError) - .transform(v => v.data$) - .pipe( - z.object({ - message: z.string().optional(), - additionalProperties: z.record(z.any()), - }).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InternalServerError$ { - /** @deprecated use `InternalServerError$inboundSchema` instead. */ - export const inboundSchema = InternalServerError$inboundSchema; - /** @deprecated use `InternalServerError$outboundSchema` instead. */ - export const outboundSchema = InternalServerError$outboundSchema; - /** @deprecated use `InternalServerError$Outbound` instead. */ - export type Outbound = InternalServerError$Outbound; -} diff --git a/src/models/errors/notfound.ts b/src/models/errors/notfound.ts deleted file mode 100644 index cccb60f9..00000000 --- a/src/models/errors/notfound.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; - -/** - * Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing - */ -export type NotFoundData = { - message?: string | undefined; - - additionalProperties: { [k: string]: any }; -}; - -/** - * Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing - */ -export class NotFound extends Error { - additionalProperties: { [k: string]: any } = {}; - - /** The original data that was passed to this error instance. */ - data$: NotFoundData; - - constructor(err: NotFoundData) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.additionalProperties != null) { - this.additionalProperties = err.additionalProperties; - } - - this.name = "NotFound"; - } -} - -/** @internal */ -export const NotFound$inboundSchema: z.ZodType< - NotFound, - z.ZodTypeDef, - unknown -> = collectExtraKeys$( - z.object({ - message: z.string().optional(), - }) - .catchall(z.any()), - "additionalProperties", -) - .transform((v) => { - return new NotFound(v); - }); - -/** @internal */ -export type NotFound$Outbound = { - message?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const NotFound$outboundSchema: z.ZodType< - NotFound$Outbound, - z.ZodTypeDef, - NotFound -> = z.instanceof(NotFound) - .transform(v => v.data$) - .pipe( - z.object({ - message: z.string().optional(), - additionalProperties: z.record(z.any()), - }).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NotFound$ { - /** @deprecated use `NotFound$inboundSchema` instead. */ - export const inboundSchema = NotFound$inboundSchema; - /** @deprecated use `NotFound$outboundSchema` instead. */ - export const outboundSchema = NotFound$outboundSchema; - /** @deprecated use `NotFound$Outbound` instead. */ - export type Outbound = NotFound$Outbound; -} diff --git a/src/models/errors/ratelimited.ts b/src/models/errors/ratelimited.ts deleted file mode 100644 index 11459735..00000000 --- a/src/models/errors/ratelimited.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; - -/** - * Status codes relating to the client being rate limited by the server - */ -export type RateLimitedData = { - message?: string | undefined; - - additionalProperties: { [k: string]: any }; -}; - -/** - * Status codes relating to the client being rate limited by the server - */ -export class RateLimited extends Error { - additionalProperties: { [k: string]: any } = {}; - - /** The original data that was passed to this error instance. */ - data$: RateLimitedData; - - constructor(err: RateLimitedData) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.additionalProperties != null) { - this.additionalProperties = err.additionalProperties; - } - - this.name = "RateLimited"; - } -} - -/** @internal */ -export const RateLimited$inboundSchema: z.ZodType< - RateLimited, - z.ZodTypeDef, - unknown -> = collectExtraKeys$( - z.object({ - message: z.string().optional(), - }) - .catchall(z.any()), - "additionalProperties", -) - .transform((v) => { - return new RateLimited(v); - }); - -/** @internal */ -export type RateLimited$Outbound = { - message?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const RateLimited$outboundSchema: z.ZodType< - RateLimited$Outbound, - z.ZodTypeDef, - RateLimited -> = z.instanceof(RateLimited) - .transform(v => v.data$) - .pipe( - z.object({ - message: z.string().optional(), - additionalProperties: z.record(z.any()), - }).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RateLimited$ { - /** @deprecated use `RateLimited$inboundSchema` instead. */ - export const inboundSchema = RateLimited$inboundSchema; - /** @deprecated use `RateLimited$outboundSchema` instead. */ - export const outboundSchema = RateLimited$outboundSchema; - /** @deprecated use `RateLimited$Outbound` instead. */ - export type Outbound = RateLimited$Outbound; -} diff --git a/src/models/errors/timeout.ts b/src/models/errors/timeout.ts deleted file mode 100644 index 380a81e8..00000000 --- a/src/models/errors/timeout.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; - -/** - * Timeouts occurred with the request - */ -export type TimeoutData = { - message?: string | undefined; - - additionalProperties: { [k: string]: any }; -}; - -/** - * Timeouts occurred with the request - */ -export class Timeout extends Error { - additionalProperties: { [k: string]: any } = {}; - - /** The original data that was passed to this error instance. */ - data$: TimeoutData; - - constructor(err: TimeoutData) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.additionalProperties != null) { - this.additionalProperties = err.additionalProperties; - } - - this.name = "Timeout"; - } -} - -/** @internal */ -export const Timeout$inboundSchema: z.ZodType = - collectExtraKeys$( - z.object({ - message: z.string().optional(), - }) - .catchall(z.any()), - "additionalProperties", - ) - .transform((v) => { - return new Timeout(v); - }); - -/** @internal */ -export type Timeout$Outbound = { - message?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const Timeout$outboundSchema: z.ZodType< - Timeout$Outbound, - z.ZodTypeDef, - Timeout -> = z.instanceof(Timeout) - .transform(v => v.data$) - .pipe( - z.object({ - message: z.string().optional(), - additionalProperties: z.record(z.any()), - }).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Timeout$ { - /** @deprecated use `Timeout$inboundSchema` instead. */ - export const inboundSchema = Timeout$inboundSchema; - /** @deprecated use `Timeout$outboundSchema` instead. */ - export const outboundSchema = Timeout$outboundSchema; - /** @deprecated use `Timeout$Outbound` instead. */ - export type Outbound = Timeout$Outbound; -} diff --git a/src/models/errors/unauthorized.ts b/src/models/errors/unauthorized.ts deleted file mode 100644 index 38764084..00000000 --- a/src/models/errors/unauthorized.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { collectExtraKeys as collectExtraKeys$ } from "../../lib/schemas.js"; - -/** - * A collection of codes that generally means the client was not authenticated correctly for the request they want to make - */ -export type UnauthorizedData = { - message?: string | undefined; - - additionalProperties: { [k: string]: any }; -}; - -/** - * A collection of codes that generally means the client was not authenticated correctly for the request they want to make - */ -export class Unauthorized extends Error { - additionalProperties: { [k: string]: any } = {}; - - /** The original data that was passed to this error instance. */ - data$: UnauthorizedData; - - constructor(err: UnauthorizedData) { - const message = "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.additionalProperties != null) { - this.additionalProperties = err.additionalProperties; - } - - this.name = "Unauthorized"; - } -} - -/** @internal */ -export const Unauthorized$inboundSchema: z.ZodType< - Unauthorized, - z.ZodTypeDef, - unknown -> = collectExtraKeys$( - z.object({ - message: z.string().optional(), - }) - .catchall(z.any()), - "additionalProperties", -) - .transform((v) => { - return new Unauthorized(v); - }); - -/** @internal */ -export type Unauthorized$Outbound = { - message?: string | undefined; - [additionalProperties: string]: unknown; -}; - -/** @internal */ -export const Unauthorized$outboundSchema: z.ZodType< - Unauthorized$Outbound, - z.ZodTypeDef, - Unauthorized -> = z.instanceof(Unauthorized) - .transform(v => v.data$) - .pipe( - z.object({ - message: z.string().optional(), - additionalProperties: z.record(z.any()), - }).transform((v) => { - return { - ...v.additionalProperties, - ...remap$(v, { - additionalProperties: null, - }), - }; - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Unauthorized$ { - /** @deprecated use `Unauthorized$inboundSchema` instead. */ - export const inboundSchema = Unauthorized$inboundSchema; - /** @deprecated use `Unauthorized$outboundSchema` instead. */ - export const outboundSchema = Unauthorized$outboundSchema; - /** @deprecated use `Unauthorized$Outbound` instead. */ - export type Outbound = Unauthorized$Outbound; -} diff --git a/src/models/operations/archiveaudience.ts b/src/models/operations/archiveaudience.ts new file mode 100644 index 00000000..690ccc13 --- /dev/null +++ b/src/models/operations/archiveaudience.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ArchiveAudienceRequest = { + /** + * Unique identifier of the audience + */ + audienceId: string; +}; + +/** @internal */ +export const ArchiveAudienceRequest$inboundSchema: z.ZodType< + ArchiveAudienceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + audience_id: z.string(), +}).transform((v) => { + return remap$(v, { + "audience_id": "audienceId", + }); +}); + +/** @internal */ +export type ArchiveAudienceRequest$Outbound = { + audience_id: string; +}; + +/** @internal */ +export const ArchiveAudienceRequest$outboundSchema: z.ZodType< + ArchiveAudienceRequest$Outbound, + z.ZodTypeDef, + ArchiveAudienceRequest +> = z.object({ + audienceId: z.string(), +}).transform((v) => { + return remap$(v, { + audienceId: "audience_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ArchiveAudienceRequest$ { + /** @deprecated use `ArchiveAudienceRequest$inboundSchema` instead. */ + export const inboundSchema = ArchiveAudienceRequest$inboundSchema; + /** @deprecated use `ArchiveAudienceRequest$outboundSchema` instead. */ + export const outboundSchema = ArchiveAudienceRequest$outboundSchema; + /** @deprecated use `ArchiveAudienceRequest$Outbound` instead. */ + export type Outbound = ArchiveAudienceRequest$Outbound; +} + +export function archiveAudienceRequestToJSON( + archiveAudienceRequest: ArchiveAudienceRequest, +): string { + return JSON.stringify( + ArchiveAudienceRequest$outboundSchema.parse(archiveAudienceRequest), + ); +} + +export function archiveAudienceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ArchiveAudienceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ArchiveAudienceRequest' from JSON`, + ); +} diff --git a/src/models/operations/archiveincident.ts b/src/models/operations/archiveincident.ts deleted file mode 100644 index b51558d6..00000000 --- a/src/models/operations/archiveincident.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ArchiveIncidentRequest = { - incidentId: string; -}; - -/** @internal */ -export const ArchiveIncidentRequest$inboundSchema: z.ZodType< - ArchiveIncidentRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type ArchiveIncidentRequest$Outbound = { - incident_id: string; -}; - -/** @internal */ -export const ArchiveIncidentRequest$outboundSchema: z.ZodType< - ArchiveIncidentRequest$Outbound, - z.ZodTypeDef, - ArchiveIncidentRequest -> = z.object({ - incidentId: z.string(), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ArchiveIncidentRequest$ { - /** @deprecated use `ArchiveIncidentRequest$inboundSchema` instead. */ - export const inboundSchema = ArchiveIncidentRequest$inboundSchema; - /** @deprecated use `ArchiveIncidentRequest$outboundSchema` instead. */ - export const outboundSchema = ArchiveIncidentRequest$outboundSchema; - /** @deprecated use `ArchiveIncidentRequest$Outbound` instead. */ - export type Outbound = ArchiveIncidentRequest$Outbound; -} - -export function archiveIncidentRequestToJSON( - archiveIncidentRequest: ArchiveIncidentRequest, -): string { - return JSON.stringify( - ArchiveIncidentRequest$outboundSchema.parse(archiveIncidentRequest), - ); -} - -export function archiveIncidentRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ArchiveIncidentRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ArchiveIncidentRequest' from JSON`, - ); -} diff --git a/src/models/operations/archiveincidenttype.ts b/src/models/operations/archiveincidenttype.ts deleted file mode 100644 index c7cb2198..00000000 --- a/src/models/operations/archiveincidenttype.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ArchiveIncidentTypeRequest = { - id: string; -}; - -/** @internal */ -export const ArchiveIncidentTypeRequest$inboundSchema: z.ZodType< - ArchiveIncidentTypeRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type ArchiveIncidentTypeRequest$Outbound = { - id: string; -}; - -/** @internal */ -export const ArchiveIncidentTypeRequest$outboundSchema: z.ZodType< - ArchiveIncidentTypeRequest$Outbound, - z.ZodTypeDef, - ArchiveIncidentTypeRequest -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ArchiveIncidentTypeRequest$ { - /** @deprecated use `ArchiveIncidentTypeRequest$inboundSchema` instead. */ - export const inboundSchema = ArchiveIncidentTypeRequest$inboundSchema; - /** @deprecated use `ArchiveIncidentTypeRequest$outboundSchema` instead. */ - export const outboundSchema = ArchiveIncidentTypeRequest$outboundSchema; - /** @deprecated use `ArchiveIncidentTypeRequest$Outbound` instead. */ - export type Outbound = ArchiveIncidentTypeRequest$Outbound; -} - -export function archiveIncidentTypeRequestToJSON( - archiveIncidentTypeRequest: ArchiveIncidentTypeRequest, -): string { - return JSON.stringify( - ArchiveIncidentTypeRequest$outboundSchema.parse(archiveIncidentTypeRequest), - ); -} - -export function archiveIncidentTypeRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ArchiveIncidentTypeRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ArchiveIncidentTypeRequest' from JSON`, - ); -} diff --git a/src/models/operations/archiveteam.ts b/src/models/operations/archiveteam.ts deleted file mode 100644 index a69346c4..00000000 --- a/src/models/operations/archiveteam.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ArchiveTeamRequest = { - teamId: string; -}; - -/** @internal */ -export const ArchiveTeamRequest$inboundSchema: z.ZodType< - ArchiveTeamRequest, - z.ZodTypeDef, - unknown -> = z.object({ - team_id: z.string(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - }); -}); - -/** @internal */ -export type ArchiveTeamRequest$Outbound = { - team_id: string; -}; - -/** @internal */ -export const ArchiveTeamRequest$outboundSchema: z.ZodType< - ArchiveTeamRequest$Outbound, - z.ZodTypeDef, - ArchiveTeamRequest -> = z.object({ - teamId: z.string(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ArchiveTeamRequest$ { - /** @deprecated use `ArchiveTeamRequest$inboundSchema` instead. */ - export const inboundSchema = ArchiveTeamRequest$inboundSchema; - /** @deprecated use `ArchiveTeamRequest$outboundSchema` instead. */ - export const outboundSchema = ArchiveTeamRequest$outboundSchema; - /** @deprecated use `ArchiveTeamRequest$Outbound` instead. */ - export type Outbound = ArchiveTeamRequest$Outbound; -} - -export function archiveTeamRequestToJSON( - archiveTeamRequest: ArchiveTeamRequest, -): string { - return JSON.stringify( - ArchiveTeamRequest$outboundSchema.parse(archiveTeamRequest), - ); -} - -export function archiveTeamRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ArchiveTeamRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ArchiveTeamRequest' from JSON`, - ); -} diff --git a/src/models/operations/bulkupdateincidentmilestones.ts b/src/models/operations/bulkupdateincidentmilestones.ts new file mode 100644 index 00000000..737ded59 --- /dev/null +++ b/src/models/operations/bulkupdateincidentmilestones.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type BulkUpdateIncidentMilestonesRequest = { + incidentId: string; + bulkUpdateIncidentMilestones: components.BulkUpdateIncidentMilestones; +}; + +/** @internal */ +export const BulkUpdateIncidentMilestonesRequest$inboundSchema: z.ZodType< + BulkUpdateIncidentMilestonesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + bulk_update_incident_milestones: z.lazy(() => + components.BulkUpdateIncidentMilestones$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "bulk_update_incident_milestones": "bulkUpdateIncidentMilestones", + }); +}); + +/** @internal */ +export type BulkUpdateIncidentMilestonesRequest$Outbound = { + incident_id: string; + bulk_update_incident_milestones: + components.BulkUpdateIncidentMilestones$Outbound; +}; + +/** @internal */ +export const BulkUpdateIncidentMilestonesRequest$outboundSchema: z.ZodType< + BulkUpdateIncidentMilestonesRequest$Outbound, + z.ZodTypeDef, + BulkUpdateIncidentMilestonesRequest +> = z.object({ + incidentId: z.string(), + bulkUpdateIncidentMilestones: z.lazy(() => + components.BulkUpdateIncidentMilestones$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + bulkUpdateIncidentMilestones: "bulk_update_incident_milestones", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BulkUpdateIncidentMilestonesRequest$ { + /** @deprecated use `BulkUpdateIncidentMilestonesRequest$inboundSchema` instead. */ + export const inboundSchema = + BulkUpdateIncidentMilestonesRequest$inboundSchema; + /** @deprecated use `BulkUpdateIncidentMilestonesRequest$outboundSchema` instead. */ + export const outboundSchema = + BulkUpdateIncidentMilestonesRequest$outboundSchema; + /** @deprecated use `BulkUpdateIncidentMilestonesRequest$Outbound` instead. */ + export type Outbound = BulkUpdateIncidentMilestonesRequest$Outbound; +} + +export function bulkUpdateIncidentMilestonesRequestToJSON( + bulkUpdateIncidentMilestonesRequest: BulkUpdateIncidentMilestonesRequest, +): string { + return JSON.stringify( + BulkUpdateIncidentMilestonesRequest$outboundSchema.parse( + bulkUpdateIncidentMilestonesRequest, + ), + ); +} + +export function bulkUpdateIncidentMilestonesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + BulkUpdateIncidentMilestonesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'BulkUpdateIncidentMilestonesRequest' from JSON`, + ); +} diff --git a/src/models/operations/convertincidenttask.ts b/src/models/operations/convertincidenttask.ts new file mode 100644 index 00000000..b55c279e --- /dev/null +++ b/src/models/operations/convertincidenttask.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ConvertIncidentTaskRequest = { + taskId: string; + incidentId: string; + convertIncidentTask: components.ConvertIncidentTask; +}; + +/** @internal */ +export const ConvertIncidentTaskRequest$inboundSchema: z.ZodType< + ConvertIncidentTaskRequest, + z.ZodTypeDef, + unknown +> = z.object({ + task_id: z.string(), + incident_id: z.string(), + convert_incident_task: z.lazy(() => + components.ConvertIncidentTask$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "task_id": "taskId", + "incident_id": "incidentId", + "convert_incident_task": "convertIncidentTask", + }); +}); + +/** @internal */ +export type ConvertIncidentTaskRequest$Outbound = { + task_id: string; + incident_id: string; + convert_incident_task: components.ConvertIncidentTask$Outbound; +}; + +/** @internal */ +export const ConvertIncidentTaskRequest$outboundSchema: z.ZodType< + ConvertIncidentTaskRequest$Outbound, + z.ZodTypeDef, + ConvertIncidentTaskRequest +> = z.object({ + taskId: z.string(), + incidentId: z.string(), + convertIncidentTask: z.lazy(() => + components.ConvertIncidentTask$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + taskId: "task_id", + incidentId: "incident_id", + convertIncidentTask: "convert_incident_task", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ConvertIncidentTaskRequest$ { + /** @deprecated use `ConvertIncidentTaskRequest$inboundSchema` instead. */ + export const inboundSchema = ConvertIncidentTaskRequest$inboundSchema; + /** @deprecated use `ConvertIncidentTaskRequest$outboundSchema` instead. */ + export const outboundSchema = ConvertIncidentTaskRequest$outboundSchema; + /** @deprecated use `ConvertIncidentTaskRequest$Outbound` instead. */ + export type Outbound = ConvertIncidentTaskRequest$Outbound; +} + +export function convertIncidentTaskRequestToJSON( + convertIncidentTaskRequest: ConvertIncidentTaskRequest, +): string { + return JSON.stringify( + ConvertIncidentTaskRequest$outboundSchema.parse(convertIncidentTaskRequest), + ); +} + +export function convertIncidentTaskRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ConvertIncidentTaskRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ConvertIncidentTaskRequest' from JSON`, + ); +} diff --git a/src/models/operations/convertincidenttasktofollowup.ts b/src/models/operations/convertincidenttasktofollowup.ts deleted file mode 100644 index 3641e908..00000000 --- a/src/models/operations/convertincidenttasktofollowup.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ConvertIncidentTaskToFollowupRequest = { - taskId: string; - incidentId: string; - postV1IncidentsIncidentIdTasksTaskIdConvert: - components.PostV1IncidentsIncidentIdTasksTaskIdConvert; -}; - -/** @internal */ -export const ConvertIncidentTaskToFollowupRequest$inboundSchema: z.ZodType< - ConvertIncidentTaskToFollowupRequest, - z.ZodTypeDef, - unknown -> = z.object({ - task_id: z.string(), - incident_id: z.string(), - postV1IncidentsIncidentIdTasksTaskIdConvert: - components.PostV1IncidentsIncidentIdTasksTaskIdConvert$inboundSchema, -}).transform((v) => { - return remap$(v, { - "task_id": "taskId", - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type ConvertIncidentTaskToFollowupRequest$Outbound = { - task_id: string; - incident_id: string; - postV1IncidentsIncidentIdTasksTaskIdConvert: - components.PostV1IncidentsIncidentIdTasksTaskIdConvert$Outbound; -}; - -/** @internal */ -export const ConvertIncidentTaskToFollowupRequest$outboundSchema: z.ZodType< - ConvertIncidentTaskToFollowupRequest$Outbound, - z.ZodTypeDef, - ConvertIncidentTaskToFollowupRequest -> = z.object({ - taskId: z.string(), - incidentId: z.string(), - postV1IncidentsIncidentIdTasksTaskIdConvert: - components.PostV1IncidentsIncidentIdTasksTaskIdConvert$outboundSchema, -}).transform((v) => { - return remap$(v, { - taskId: "task_id", - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ConvertIncidentTaskToFollowupRequest$ { - /** @deprecated use `ConvertIncidentTaskToFollowupRequest$inboundSchema` instead. */ - export const inboundSchema = - ConvertIncidentTaskToFollowupRequest$inboundSchema; - /** @deprecated use `ConvertIncidentTaskToFollowupRequest$outboundSchema` instead. */ - export const outboundSchema = - ConvertIncidentTaskToFollowupRequest$outboundSchema; - /** @deprecated use `ConvertIncidentTaskToFollowupRequest$Outbound` instead. */ - export type Outbound = ConvertIncidentTaskToFollowupRequest$Outbound; -} - -export function convertIncidentTaskToFollowupRequestToJSON( - convertIncidentTaskToFollowupRequest: ConvertIncidentTaskToFollowupRequest, -): string { - return JSON.stringify( - ConvertIncidentTaskToFollowupRequest$outboundSchema.parse( - convertIncidentTaskToFollowupRequest, - ), - ); -} - -export function convertIncidentTaskToFollowupRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ConvertIncidentTaskToFollowupRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ConvertIncidentTaskToFollowupRequest' from JSON`, - ); -} diff --git a/src/models/operations/createaudience.ts b/src/models/operations/createaudience.ts new file mode 100644 index 00000000..c1a60148 --- /dev/null +++ b/src/models/operations/createaudience.ts @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateAudienceRequest = { + /** + * Name of the audience (max 255 characters) + */ + name: string; + /** + * Description of the audience (max 4000 characters) + */ + description: string; + /** + * Whether this is the default audience + */ + default?: boolean | null | undefined; + /** + * The incident detail question (max 255 characters) + */ + detailsQuestion: Array; + /** + * The prompt to display when collecting this detail + */ + detailsPrompt: Array; + /** + * Optional unique identifier for this detail + */ + detailsSlug?: Array | null | undefined; +}; + +/** @internal */ +export const CreateAudienceRequest$inboundSchema: z.ZodType< + CreateAudienceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.string(), + default: z.nullable(z.boolean().default(false)), + "details[question]": z.array(z.string()), + "details[prompt]": z.array(z.string()), + "details[slug]": z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "details[question]": "detailsQuestion", + "details[prompt]": "detailsPrompt", + "details[slug]": "detailsSlug", + }); +}); + +/** @internal */ +export type CreateAudienceRequest$Outbound = { + name: string; + description: string; + default: boolean | null; + "details[question]": Array; + "details[prompt]": Array; + "details[slug]"?: Array | null | undefined; +}; + +/** @internal */ +export const CreateAudienceRequest$outboundSchema: z.ZodType< + CreateAudienceRequest$Outbound, + z.ZodTypeDef, + CreateAudienceRequest +> = z.object({ + name: z.string(), + description: z.string(), + default: z.nullable(z.boolean().default(false)), + detailsQuestion: z.array(z.string()), + detailsPrompt: z.array(z.string()), + detailsSlug: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + detailsQuestion: "details[question]", + detailsPrompt: "details[prompt]", + detailsSlug: "details[slug]", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateAudienceRequest$ { + /** @deprecated use `CreateAudienceRequest$inboundSchema` instead. */ + export const inboundSchema = CreateAudienceRequest$inboundSchema; + /** @deprecated use `CreateAudienceRequest$outboundSchema` instead. */ + export const outboundSchema = CreateAudienceRequest$outboundSchema; + /** @deprecated use `CreateAudienceRequest$Outbound` instead. */ + export type Outbound = CreateAudienceRequest$Outbound; +} + +export function createAudienceRequestToJSON( + createAudienceRequest: CreateAudienceRequest, +): string { + return JSON.stringify( + CreateAudienceRequest$outboundSchema.parse(createAudienceRequest), + ); +} + +export function createAudienceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateAudienceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateAudienceRequest' from JSON`, + ); +} diff --git a/src/models/operations/createchangeidentity.ts b/src/models/operations/createchangeidentity.ts index 1c5d2021..c88461ff 100644 --- a/src/models/operations/createchangeidentity.ts +++ b/src/models/operations/createchangeidentity.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateChangeIdentityRequest = { changeId: string; - postV1ChangesChangeIdIdentities: components.PostV1ChangesChangeIdIdentities; + createChangeIdentity: components.CreateChangeIdentity; }; /** @internal */ @@ -21,19 +21,20 @@ export const CreateChangeIdentityRequest$inboundSchema: z.ZodType< unknown > = z.object({ change_id: z.string(), - postV1ChangesChangeIdIdentities: - components.PostV1ChangesChangeIdIdentities$inboundSchema, + create_change_identity: z.lazy(() => + components.CreateChangeIdentity$inboundSchema + ), }).transform((v) => { return remap$(v, { "change_id": "changeId", + "create_change_identity": "createChangeIdentity", }); }); /** @internal */ export type CreateChangeIdentityRequest$Outbound = { change_id: string; - postV1ChangesChangeIdIdentities: - components.PostV1ChangesChangeIdIdentities$Outbound; + create_change_identity: components.CreateChangeIdentity$Outbound; }; /** @internal */ @@ -43,11 +44,13 @@ export const CreateChangeIdentityRequest$outboundSchema: z.ZodType< CreateChangeIdentityRequest > = z.object({ changeId: z.string(), - postV1ChangesChangeIdIdentities: - components.PostV1ChangesChangeIdIdentities$outboundSchema, + createChangeIdentity: z.lazy(() => + components.CreateChangeIdentity$outboundSchema + ), }).transform((v) => { return remap$(v, { changeId: "change_id", + createChangeIdentity: "create_change_identity", }); }); diff --git a/src/models/operations/createcomment.ts b/src/models/operations/createcomment.ts new file mode 100644 index 00000000..0c836f69 --- /dev/null +++ b/src/models/operations/createcomment.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateCommentRequest = { + conversationId: string; + createComment: components.CreateComment; +}; + +/** @internal */ +export const CreateCommentRequest$inboundSchema: z.ZodType< + CreateCommentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + conversation_id: z.string(), + create_comment: z.lazy(() => components.CreateComment$inboundSchema), +}).transform((v) => { + return remap$(v, { + "conversation_id": "conversationId", + "create_comment": "createComment", + }); +}); + +/** @internal */ +export type CreateCommentRequest$Outbound = { + conversation_id: string; + create_comment: components.CreateComment$Outbound; +}; + +/** @internal */ +export const CreateCommentRequest$outboundSchema: z.ZodType< + CreateCommentRequest$Outbound, + z.ZodTypeDef, + CreateCommentRequest +> = z.object({ + conversationId: z.string(), + createComment: z.lazy(() => components.CreateComment$outboundSchema), +}).transform((v) => { + return remap$(v, { + conversationId: "conversation_id", + createComment: "create_comment", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCommentRequest$ { + /** @deprecated use `CreateCommentRequest$inboundSchema` instead. */ + export const inboundSchema = CreateCommentRequest$inboundSchema; + /** @deprecated use `CreateCommentRequest$outboundSchema` instead. */ + export const outboundSchema = CreateCommentRequest$outboundSchema; + /** @deprecated use `CreateCommentRequest$Outbound` instead. */ + export type Outbound = CreateCommentRequest$Outbound; +} + +export function createCommentRequestToJSON( + createCommentRequest: CreateCommentRequest, +): string { + return JSON.stringify( + CreateCommentRequest$outboundSchema.parse(createCommentRequest), + ); +} + +export function createCommentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCommentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCommentRequest' from JSON`, + ); +} diff --git a/src/models/operations/createcommentreaction.ts b/src/models/operations/createcommentreaction.ts new file mode 100644 index 00000000..eff30a5b --- /dev/null +++ b/src/models/operations/createcommentreaction.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateCommentReactionRequest = { + conversationId: string; + commentId: string; + createCommentReaction: components.CreateCommentReaction; +}; + +/** @internal */ +export const CreateCommentReactionRequest$inboundSchema: z.ZodType< + CreateCommentReactionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + conversation_id: z.string(), + comment_id: z.string(), + create_comment_reaction: z.lazy(() => + components.CreateCommentReaction$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "conversation_id": "conversationId", + "comment_id": "commentId", + "create_comment_reaction": "createCommentReaction", + }); +}); + +/** @internal */ +export type CreateCommentReactionRequest$Outbound = { + conversation_id: string; + comment_id: string; + create_comment_reaction: components.CreateCommentReaction$Outbound; +}; + +/** @internal */ +export const CreateCommentReactionRequest$outboundSchema: z.ZodType< + CreateCommentReactionRequest$Outbound, + z.ZodTypeDef, + CreateCommentReactionRequest +> = z.object({ + conversationId: z.string(), + commentId: z.string(), + createCommentReaction: z.lazy(() => + components.CreateCommentReaction$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + conversationId: "conversation_id", + commentId: "comment_id", + createCommentReaction: "create_comment_reaction", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateCommentReactionRequest$ { + /** @deprecated use `CreateCommentReactionRequest$inboundSchema` instead. */ + export const inboundSchema = CreateCommentReactionRequest$inboundSchema; + /** @deprecated use `CreateCommentReactionRequest$outboundSchema` instead. */ + export const outboundSchema = CreateCommentReactionRequest$outboundSchema; + /** @deprecated use `CreateCommentReactionRequest$Outbound` instead. */ + export type Outbound = CreateCommentReactionRequest$Outbound; +} + +export function createCommentReactionRequestToJSON( + createCommentReactionRequest: CreateCommentReactionRequest, +): string { + return JSON.stringify( + CreateCommentReactionRequest$outboundSchema.parse( + createCommentReactionRequest, + ), + ); +} + +export function createCommentReactionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateCommentReactionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateCommentReactionRequest' from JSON`, + ); +} diff --git a/src/models/operations/createconnection.ts b/src/models/operations/createconnection.ts new file mode 100644 index 00000000..3294efcf --- /dev/null +++ b/src/models/operations/createconnection.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateConnectionRequest = { + slug: string; +}; + +/** @internal */ +export const CreateConnectionRequest$inboundSchema: z.ZodType< + CreateConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.string(), +}); + +/** @internal */ +export type CreateConnectionRequest$Outbound = { + slug: string; +}; + +/** @internal */ +export const CreateConnectionRequest$outboundSchema: z.ZodType< + CreateConnectionRequest$Outbound, + z.ZodTypeDef, + CreateConnectionRequest +> = z.object({ + slug: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateConnectionRequest$ { + /** @deprecated use `CreateConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = CreateConnectionRequest$inboundSchema; + /** @deprecated use `CreateConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = CreateConnectionRequest$outboundSchema; + /** @deprecated use `CreateConnectionRequest$Outbound` instead. */ + export type Outbound = CreateConnectionRequest$Outbound; +} + +export function createConnectionRequestToJSON( + createConnectionRequest: CreateConnectionRequest, +): string { + return JSON.stringify( + CreateConnectionRequest$outboundSchema.parse(createConnectionRequest), + ); +} + +export function createConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/createconversationcomment.ts b/src/models/operations/createconversationcomment.ts deleted file mode 100644 index 60fa1af9..00000000 --- a/src/models/operations/createconversationcomment.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateConversationCommentRequest = { - conversationId: string; - postV1ConversationsConversationIdComments: - components.PostV1ConversationsConversationIdComments; -}; - -/** @internal */ -export const CreateConversationCommentRequest$inboundSchema: z.ZodType< - CreateConversationCommentRequest, - z.ZodTypeDef, - unknown -> = z.object({ - conversation_id: z.string(), - postV1ConversationsConversationIdComments: - components.PostV1ConversationsConversationIdComments$inboundSchema, -}).transform((v) => { - return remap$(v, { - "conversation_id": "conversationId", - }); -}); - -/** @internal */ -export type CreateConversationCommentRequest$Outbound = { - conversation_id: string; - postV1ConversationsConversationIdComments: - components.PostV1ConversationsConversationIdComments$Outbound; -}; - -/** @internal */ -export const CreateConversationCommentRequest$outboundSchema: z.ZodType< - CreateConversationCommentRequest$Outbound, - z.ZodTypeDef, - CreateConversationCommentRequest -> = z.object({ - conversationId: z.string(), - postV1ConversationsConversationIdComments: - components.PostV1ConversationsConversationIdComments$outboundSchema, -}).transform((v) => { - return remap$(v, { - conversationId: "conversation_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateConversationCommentRequest$ { - /** @deprecated use `CreateConversationCommentRequest$inboundSchema` instead. */ - export const inboundSchema = CreateConversationCommentRequest$inboundSchema; - /** @deprecated use `CreateConversationCommentRequest$outboundSchema` instead. */ - export const outboundSchema = CreateConversationCommentRequest$outboundSchema; - /** @deprecated use `CreateConversationCommentRequest$Outbound` instead. */ - export type Outbound = CreateConversationCommentRequest$Outbound; -} - -export function createConversationCommentRequestToJSON( - createConversationCommentRequest: CreateConversationCommentRequest, -): string { - return JSON.stringify( - CreateConversationCommentRequest$outboundSchema.parse( - createConversationCommentRequest, - ), - ); -} - -export function createConversationCommentRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateConversationCommentRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateConversationCommentRequest' from JSON`, - ); -} diff --git a/src/models/operations/createconversationcommentreaction.ts b/src/models/operations/createconversationcommentreaction.ts deleted file mode 100644 index 89869564..00000000 --- a/src/models/operations/createconversationcommentreaction.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateConversationCommentReactionRequest = { - conversationId: string; - commentId: string; - postV1ConversationsConversationIdCommentsCommentIdReactions: - components.PostV1ConversationsConversationIdCommentsCommentIdReactions; -}; - -/** @internal */ -export const CreateConversationCommentReactionRequest$inboundSchema: z.ZodType< - CreateConversationCommentReactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - conversation_id: z.string(), - comment_id: z.string(), - postV1ConversationsConversationIdCommentsCommentIdReactions: - components - .PostV1ConversationsConversationIdCommentsCommentIdReactions$inboundSchema, -}).transform((v) => { - return remap$(v, { - "conversation_id": "conversationId", - "comment_id": "commentId", - }); -}); - -/** @internal */ -export type CreateConversationCommentReactionRequest$Outbound = { - conversation_id: string; - comment_id: string; - postV1ConversationsConversationIdCommentsCommentIdReactions: - components.PostV1ConversationsConversationIdCommentsCommentIdReactions$Outbound; -}; - -/** @internal */ -export const CreateConversationCommentReactionRequest$outboundSchema: z.ZodType< - CreateConversationCommentReactionRequest$Outbound, - z.ZodTypeDef, - CreateConversationCommentReactionRequest -> = z.object({ - conversationId: z.string(), - commentId: z.string(), - postV1ConversationsConversationIdCommentsCommentIdReactions: - components - .PostV1ConversationsConversationIdCommentsCommentIdReactions$outboundSchema, -}).transform((v) => { - return remap$(v, { - conversationId: "conversation_id", - commentId: "comment_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateConversationCommentReactionRequest$ { - /** @deprecated use `CreateConversationCommentReactionRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateConversationCommentReactionRequest$inboundSchema; - /** @deprecated use `CreateConversationCommentReactionRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateConversationCommentReactionRequest$outboundSchema; - /** @deprecated use `CreateConversationCommentReactionRequest$Outbound` instead. */ - export type Outbound = CreateConversationCommentReactionRequest$Outbound; -} - -export function createConversationCommentReactionRequestToJSON( - createConversationCommentReactionRequest: - CreateConversationCommentReactionRequest, -): string { - return JSON.stringify( - CreateConversationCommentReactionRequest$outboundSchema.parse( - createConversationCommentReactionRequest, - ), - ); -} - -export function createConversationCommentReactionRequestFromJSON( - jsonString: string, -): SafeParseResult< - CreateConversationCommentReactionRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CreateConversationCommentReactionRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CreateConversationCommentReactionRequest' from JSON`, - ); -} diff --git a/src/models/operations/createemailsubscriber.ts b/src/models/operations/createemailsubscriber.ts new file mode 100644 index 00000000..acf47fbb --- /dev/null +++ b/src/models/operations/createemailsubscriber.ts @@ -0,0 +1,146 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateEmailSubscriberRequestBody = { + /** + * A comma-separated list of emails to subscribe. + */ + emails: string; +}; + +export type CreateEmailSubscriberRequest = { + nuncConnectionId: string; + requestBody: CreateEmailSubscriberRequestBody; +}; + +/** @internal */ +export const CreateEmailSubscriberRequestBody$inboundSchema: z.ZodType< + CreateEmailSubscriberRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + emails: z.string(), +}); + +/** @internal */ +export type CreateEmailSubscriberRequestBody$Outbound = { + emails: string; +}; + +/** @internal */ +export const CreateEmailSubscriberRequestBody$outboundSchema: z.ZodType< + CreateEmailSubscriberRequestBody$Outbound, + z.ZodTypeDef, + CreateEmailSubscriberRequestBody +> = z.object({ + emails: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateEmailSubscriberRequestBody$ { + /** @deprecated use `CreateEmailSubscriberRequestBody$inboundSchema` instead. */ + export const inboundSchema = CreateEmailSubscriberRequestBody$inboundSchema; + /** @deprecated use `CreateEmailSubscriberRequestBody$outboundSchema` instead. */ + export const outboundSchema = CreateEmailSubscriberRequestBody$outboundSchema; + /** @deprecated use `CreateEmailSubscriberRequestBody$Outbound` instead. */ + export type Outbound = CreateEmailSubscriberRequestBody$Outbound; +} + +export function createEmailSubscriberRequestBodyToJSON( + createEmailSubscriberRequestBody: CreateEmailSubscriberRequestBody, +): string { + return JSON.stringify( + CreateEmailSubscriberRequestBody$outboundSchema.parse( + createEmailSubscriberRequestBody, + ), + ); +} + +export function createEmailSubscriberRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateEmailSubscriberRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEmailSubscriberRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateEmailSubscriberRequest$inboundSchema: z.ZodType< + CreateEmailSubscriberRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + RequestBody: z.lazy(() => CreateEmailSubscriberRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type CreateEmailSubscriberRequest$Outbound = { + nunc_connection_id: string; + RequestBody: CreateEmailSubscriberRequestBody$Outbound; +}; + +/** @internal */ +export const CreateEmailSubscriberRequest$outboundSchema: z.ZodType< + CreateEmailSubscriberRequest$Outbound, + z.ZodTypeDef, + CreateEmailSubscriberRequest +> = z.object({ + nuncConnectionId: z.string(), + requestBody: z.lazy(() => CreateEmailSubscriberRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateEmailSubscriberRequest$ { + /** @deprecated use `CreateEmailSubscriberRequest$inboundSchema` instead. */ + export const inboundSchema = CreateEmailSubscriberRequest$inboundSchema; + /** @deprecated use `CreateEmailSubscriberRequest$outboundSchema` instead. */ + export const outboundSchema = CreateEmailSubscriberRequest$outboundSchema; + /** @deprecated use `CreateEmailSubscriberRequest$Outbound` instead. */ + export type Outbound = CreateEmailSubscriberRequest$Outbound; +} + +export function createEmailSubscriberRequestToJSON( + createEmailSubscriberRequest: CreateEmailSubscriberRequest, +): string { + return JSON.stringify( + CreateEmailSubscriberRequest$outboundSchema.parse( + createEmailSubscriberRequest, + ), + ); +} + +export function createEmailSubscriberRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateEmailSubscriberRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateEmailSubscriberRequest' from JSON`, + ); +} diff --git a/src/models/operations/createinboundfieldmap.ts b/src/models/operations/createinboundfieldmap.ts new file mode 100644 index 00000000..96c857dc --- /dev/null +++ b/src/models/operations/createinboundfieldmap.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateInboundFieldMapRequest = { + ticketingProjectId: string; +}; + +/** @internal */ +export const CreateInboundFieldMapRequest$inboundSchema: z.ZodType< + CreateInboundFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type CreateInboundFieldMapRequest$Outbound = { + ticketing_project_id: string; +}; + +/** @internal */ +export const CreateInboundFieldMapRequest$outboundSchema: z.ZodType< + CreateInboundFieldMapRequest$Outbound, + z.ZodTypeDef, + CreateInboundFieldMapRequest +> = z.object({ + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateInboundFieldMapRequest$ { + /** @deprecated use `CreateInboundFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = CreateInboundFieldMapRequest$inboundSchema; + /** @deprecated use `CreateInboundFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = CreateInboundFieldMapRequest$outboundSchema; + /** @deprecated use `CreateInboundFieldMapRequest$Outbound` instead. */ + export type Outbound = CreateInboundFieldMapRequest$Outbound; +} + +export function createInboundFieldMapRequestToJSON( + createInboundFieldMapRequest: CreateInboundFieldMapRequest, +): string { + return JSON.stringify( + CreateInboundFieldMapRequest$outboundSchema.parse( + createInboundFieldMapRequest, + ), + ); +} + +export function createInboundFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateInboundFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateInboundFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/createincidentalert.ts b/src/models/operations/createincidentalert.ts new file mode 100644 index 00000000..53476ecd --- /dev/null +++ b/src/models/operations/createincidentalert.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateIncidentAlertRequest = { + incidentId: string; + /** + * Array of alert IDs to be assigned to the incident + */ + requestBody: Array; +}; + +/** @internal */ +export const CreateIncidentAlertRequest$inboundSchema: z.ZodType< + CreateIncidentAlertRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + RequestBody: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type CreateIncidentAlertRequest$Outbound = { + incident_id: string; + RequestBody: Array; +}; + +/** @internal */ +export const CreateIncidentAlertRequest$outboundSchema: z.ZodType< + CreateIncidentAlertRequest$Outbound, + z.ZodTypeDef, + CreateIncidentAlertRequest +> = z.object({ + incidentId: z.string(), + requestBody: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentAlertRequest$ { + /** @deprecated use `CreateIncidentAlertRequest$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentAlertRequest$inboundSchema; + /** @deprecated use `CreateIncidentAlertRequest$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentAlertRequest$outboundSchema; + /** @deprecated use `CreateIncidentAlertRequest$Outbound` instead. */ + export type Outbound = CreateIncidentAlertRequest$Outbound; +} + +export function createIncidentAlertRequestToJSON( + createIncidentAlertRequest: CreateIncidentAlertRequest, +): string { + return JSON.stringify( + CreateIncidentAlertRequest$outboundSchema.parse(createIncidentAlertRequest), + ); +} + +export function createIncidentAlertRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentAlertRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentAlertRequest' from JSON`, + ); +} diff --git a/src/models/operations/createincidentalerts.ts b/src/models/operations/createincidentalerts.ts deleted file mode 100644 index 0b49bec7..00000000 --- a/src/models/operations/createincidentalerts.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateIncidentAlertsRequest = { - incidentId: string; - /** - * Array of alert IDs to be assigned to the incident - */ - requestBody: Array; -}; - -/** @internal */ -export const CreateIncidentAlertsRequest$inboundSchema: z.ZodType< - CreateIncidentAlertsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - RequestBody: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type CreateIncidentAlertsRequest$Outbound = { - incident_id: string; - RequestBody: Array; -}; - -/** @internal */ -export const CreateIncidentAlertsRequest$outboundSchema: z.ZodType< - CreateIncidentAlertsRequest$Outbound, - z.ZodTypeDef, - CreateIncidentAlertsRequest -> = z.object({ - incidentId: z.string(), - requestBody: z.array(z.string()), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateIncidentAlertsRequest$ { - /** @deprecated use `CreateIncidentAlertsRequest$inboundSchema` instead. */ - export const inboundSchema = CreateIncidentAlertsRequest$inboundSchema; - /** @deprecated use `CreateIncidentAlertsRequest$outboundSchema` instead. */ - export const outboundSchema = CreateIncidentAlertsRequest$outboundSchema; - /** @deprecated use `CreateIncidentAlertsRequest$Outbound` instead. */ - export type Outbound = CreateIncidentAlertsRequest$Outbound; -} - -export function createIncidentAlertsRequestToJSON( - createIncidentAlertsRequest: CreateIncidentAlertsRequest, -): string { - return JSON.stringify( - CreateIncidentAlertsRequest$outboundSchema.parse( - createIncidentAlertsRequest, - ), - ); -} - -export function createIncidentAlertsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateIncidentAlertsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateIncidentAlertsRequest' from JSON`, - ); -} diff --git a/src/models/operations/createincidentattachment.ts b/src/models/operations/createincidentattachment.ts index 772a96ab..03720f29 100644 --- a/src/models/operations/createincidentattachment.ts +++ b/src/models/operations/createincidentattachment.ts @@ -10,7 +10,7 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type FileT = { +export type CreateIncidentAttachmentFile = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; @@ -22,10 +22,10 @@ export const VoteDirection = { export type VoteDirection = ClosedEnum; export type CreateIncidentAttachmentRequestBody = { - file: FileT | Blob; - description?: string | undefined; - occurredAt?: Date | undefined; - voteDirection?: VoteDirection | undefined; + file: CreateIncidentAttachmentFile | Blob; + description?: string | null | undefined; + occurredAt?: Date | null | undefined; + voteDirection?: VoteDirection | null | undefined; }; export type CreateIncidentAttachmentRequest = { @@ -34,28 +34,31 @@ export type CreateIncidentAttachmentRequest = { }; /** @internal */ -export const FileT$inboundSchema: z.ZodType = z - .object({ - fileName: z.string(), - content: z.union([ - z.instanceof(ReadableStream), - z.instanceof(Blob), - z.instanceof(ArrayBuffer), - z.instanceof(Uint8Array), - ]), - }); +export const CreateIncidentAttachmentFile$inboundSchema: z.ZodType< + CreateIncidentAttachmentFile, + z.ZodTypeDef, + unknown +> = z.object({ + fileName: z.string(), + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Uint8Array), + ]), +}); /** @internal */ -export type FileT$Outbound = { +export type CreateIncidentAttachmentFile$Outbound = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; /** @internal */ -export const FileT$outboundSchema: z.ZodType< - FileT$Outbound, +export const CreateIncidentAttachmentFile$outboundSchema: z.ZodType< + CreateIncidentAttachmentFile$Outbound, z.ZodTypeDef, - FileT + CreateIncidentAttachmentFile > = z.object({ fileName: z.string(), content: z.union([ @@ -70,26 +73,32 @@ export const FileT$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace FileT$ { - /** @deprecated use `FileT$inboundSchema` instead. */ - export const inboundSchema = FileT$inboundSchema; - /** @deprecated use `FileT$outboundSchema` instead. */ - export const outboundSchema = FileT$outboundSchema; - /** @deprecated use `FileT$Outbound` instead. */ - export type Outbound = FileT$Outbound; +export namespace CreateIncidentAttachmentFile$ { + /** @deprecated use `CreateIncidentAttachmentFile$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentAttachmentFile$inboundSchema; + /** @deprecated use `CreateIncidentAttachmentFile$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentAttachmentFile$outboundSchema; + /** @deprecated use `CreateIncidentAttachmentFile$Outbound` instead. */ + export type Outbound = CreateIncidentAttachmentFile$Outbound; } -export function fileToJSON(fileT: FileT): string { - return JSON.stringify(FileT$outboundSchema.parse(fileT)); +export function createIncidentAttachmentFileToJSON( + createIncidentAttachmentFile: CreateIncidentAttachmentFile, +): string { + return JSON.stringify( + CreateIncidentAttachmentFile$outboundSchema.parse( + createIncidentAttachmentFile, + ), + ); } -export function fileFromJSON( +export function createIncidentAttachmentFileFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => FileT$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'FileT' from JSON`, + (x) => CreateIncidentAttachmentFile$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentAttachmentFile' from JSON`, ); } @@ -120,11 +129,12 @@ export const CreateIncidentAttachmentRequestBody$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - file: z.lazy(() => FileT$inboundSchema), - description: z.string().optional(), - occurred_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - vote_direction: VoteDirection$inboundSchema.optional(), + file: z.lazy(() => CreateIncidentAttachmentFile$inboundSchema), + description: z.nullable(z.string()).optional(), + occurred_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + vote_direction: z.nullable(VoteDirection$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "occurred_at": "occurredAt", @@ -134,10 +144,10 @@ export const CreateIncidentAttachmentRequestBody$inboundSchema: z.ZodType< /** @internal */ export type CreateIncidentAttachmentRequestBody$Outbound = { - file: FileT$Outbound | Blob; - description?: string | undefined; - occurred_at?: string | undefined; - vote_direction?: string | undefined; + file: CreateIncidentAttachmentFile$Outbound | Blob; + description?: string | null | undefined; + occurred_at?: string | null | undefined; + vote_direction?: string | null | undefined; }; /** @internal */ @@ -146,10 +156,12 @@ export const CreateIncidentAttachmentRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, CreateIncidentAttachmentRequestBody > = z.object({ - file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema), - description: z.string().optional(), - occurredAt: z.date().transform(v => v.toISOString()).optional(), - voteDirection: VoteDirection$outboundSchema.optional(), + file: z.lazy(() => CreateIncidentAttachmentFile$outboundSchema).or( + blobLikeSchema, + ), + description: z.nullable(z.string()).optional(), + occurredAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), + voteDirection: z.nullable(VoteDirection$outboundSchema).optional(), }).transform((v) => { return remap$(v, { occurredAt: "occurred_at", diff --git a/src/models/operations/createincidentchangeevent.ts b/src/models/operations/createincidentchangeevent.ts new file mode 100644 index 00000000..f99d3f4a --- /dev/null +++ b/src/models/operations/createincidentchangeevent.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateIncidentChangeEventRequest = { + incidentId: string; + createIncidentChangeEvent: components.CreateIncidentChangeEvent; +}; + +/** @internal */ +export const CreateIncidentChangeEventRequest$inboundSchema: z.ZodType< + CreateIncidentChangeEventRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + create_incident_change_event: z.lazy(() => + components.CreateIncidentChangeEvent$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "create_incident_change_event": "createIncidentChangeEvent", + }); +}); + +/** @internal */ +export type CreateIncidentChangeEventRequest$Outbound = { + incident_id: string; + create_incident_change_event: components.CreateIncidentChangeEvent$Outbound; +}; + +/** @internal */ +export const CreateIncidentChangeEventRequest$outboundSchema: z.ZodType< + CreateIncidentChangeEventRequest$Outbound, + z.ZodTypeDef, + CreateIncidentChangeEventRequest +> = z.object({ + incidentId: z.string(), + createIncidentChangeEvent: z.lazy(() => + components.CreateIncidentChangeEvent$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + createIncidentChangeEvent: "create_incident_change_event", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentChangeEventRequest$ { + /** @deprecated use `CreateIncidentChangeEventRequest$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentChangeEventRequest$inboundSchema; + /** @deprecated use `CreateIncidentChangeEventRequest$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentChangeEventRequest$outboundSchema; + /** @deprecated use `CreateIncidentChangeEventRequest$Outbound` instead. */ + export type Outbound = CreateIncidentChangeEventRequest$Outbound; +} + +export function createIncidentChangeEventRequestToJSON( + createIncidentChangeEventRequest: CreateIncidentChangeEventRequest, +): string { + return JSON.stringify( + CreateIncidentChangeEventRequest$outboundSchema.parse( + createIncidentChangeEventRequest, + ), + ); +} + +export function createIncidentChangeEventRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentChangeEventRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentChangeEventRequest' from JSON`, + ); +} diff --git a/src/models/operations/createincidentchatmessage.ts b/src/models/operations/createincidentchatmessage.ts new file mode 100644 index 00000000..ff2231af --- /dev/null +++ b/src/models/operations/createincidentchatmessage.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateIncidentChatMessageRequest = { + incidentId: string; + createIncidentChatMessage: components.CreateIncidentChatMessage; +}; + +/** @internal */ +export const CreateIncidentChatMessageRequest$inboundSchema: z.ZodType< + CreateIncidentChatMessageRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + create_incident_chat_message: z.lazy(() => + components.CreateIncidentChatMessage$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "create_incident_chat_message": "createIncidentChatMessage", + }); +}); + +/** @internal */ +export type CreateIncidentChatMessageRequest$Outbound = { + incident_id: string; + create_incident_chat_message: components.CreateIncidentChatMessage$Outbound; +}; + +/** @internal */ +export const CreateIncidentChatMessageRequest$outboundSchema: z.ZodType< + CreateIncidentChatMessageRequest$Outbound, + z.ZodTypeDef, + CreateIncidentChatMessageRequest +> = z.object({ + incidentId: z.string(), + createIncidentChatMessage: z.lazy(() => + components.CreateIncidentChatMessage$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + createIncidentChatMessage: "create_incident_chat_message", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentChatMessageRequest$ { + /** @deprecated use `CreateIncidentChatMessageRequest$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentChatMessageRequest$inboundSchema; + /** @deprecated use `CreateIncidentChatMessageRequest$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentChatMessageRequest$outboundSchema; + /** @deprecated use `CreateIncidentChatMessageRequest$Outbound` instead. */ + export type Outbound = CreateIncidentChatMessageRequest$Outbound; +} + +export function createIncidentChatMessageRequestToJSON( + createIncidentChatMessageRequest: CreateIncidentChatMessageRequest, +): string { + return JSON.stringify( + CreateIncidentChatMessageRequest$outboundSchema.parse( + createIncidentChatMessageRequest, + ), + ); +} + +export function createIncidentChatMessageRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateIncidentChatMessageRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentChatMessageRequest' from JSON`, + ); +} diff --git a/src/models/operations/createincidentgenericchatmessage.ts b/src/models/operations/createincidentgenericchatmessage.ts deleted file mode 100644 index 6a11d4f6..00000000 --- a/src/models/operations/createincidentgenericchatmessage.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateIncidentGenericChatMessageRequest = { - incidentId: string; - postV1IncidentsIncidentIdGenericChatMessages: - components.PostV1IncidentsIncidentIdGenericChatMessages; -}; - -/** @internal */ -export const CreateIncidentGenericChatMessageRequest$inboundSchema: z.ZodType< - CreateIncidentGenericChatMessageRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - postV1IncidentsIncidentIdGenericChatMessages: - components.PostV1IncidentsIncidentIdGenericChatMessages$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type CreateIncidentGenericChatMessageRequest$Outbound = { - incident_id: string; - postV1IncidentsIncidentIdGenericChatMessages: - components.PostV1IncidentsIncidentIdGenericChatMessages$Outbound; -}; - -/** @internal */ -export const CreateIncidentGenericChatMessageRequest$outboundSchema: z.ZodType< - CreateIncidentGenericChatMessageRequest$Outbound, - z.ZodTypeDef, - CreateIncidentGenericChatMessageRequest -> = z.object({ - incidentId: z.string(), - postV1IncidentsIncidentIdGenericChatMessages: - components.PostV1IncidentsIncidentIdGenericChatMessages$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateIncidentGenericChatMessageRequest$ { - /** @deprecated use `CreateIncidentGenericChatMessageRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateIncidentGenericChatMessageRequest$inboundSchema; - /** @deprecated use `CreateIncidentGenericChatMessageRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateIncidentGenericChatMessageRequest$outboundSchema; - /** @deprecated use `CreateIncidentGenericChatMessageRequest$Outbound` instead. */ - export type Outbound = CreateIncidentGenericChatMessageRequest$Outbound; -} - -export function createIncidentGenericChatMessageRequestToJSON( - createIncidentGenericChatMessageRequest: - CreateIncidentGenericChatMessageRequest, -): string { - return JSON.stringify( - CreateIncidentGenericChatMessageRequest$outboundSchema.parse( - createIncidentGenericChatMessageRequest, - ), - ); -} - -export function createIncidentGenericChatMessageRequestFromJSON( - jsonString: string, -): SafeParseResult< - CreateIncidentGenericChatMessageRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CreateIncidentGenericChatMessageRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CreateIncidentGenericChatMessageRequest' from JSON`, - ); -} diff --git a/src/models/operations/createincidentimpact.ts b/src/models/operations/createincidentimpact.ts index f4eec170..aac1644b 100644 --- a/src/models/operations/createincidentimpact.ts +++ b/src/models/operations/createincidentimpact.ts @@ -10,43 +10,41 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const CreateIncidentImpactPathParamType = { +export const CreateIncidentImpactType = { Environments: "environments", Functionalities: "functionalities", Services: "services", Customers: "customers", } as const; -export type CreateIncidentImpactPathParamType = ClosedEnum< - typeof CreateIncidentImpactPathParamType +export type CreateIncidentImpactType = ClosedEnum< + typeof CreateIncidentImpactType >; export type CreateIncidentImpactRequest = { incidentId: string; - type: CreateIncidentImpactPathParamType; - postV1IncidentsIncidentIdImpactType: - components.PostV1IncidentsIncidentIdImpactType; + type: CreateIncidentImpactType; + createIncidentImpact: components.CreateIncidentImpact; }; /** @internal */ -export const CreateIncidentImpactPathParamType$inboundSchema: z.ZodNativeEnum< - typeof CreateIncidentImpactPathParamType -> = z.nativeEnum(CreateIncidentImpactPathParamType); +export const CreateIncidentImpactType$inboundSchema: z.ZodNativeEnum< + typeof CreateIncidentImpactType +> = z.nativeEnum(CreateIncidentImpactType); /** @internal */ -export const CreateIncidentImpactPathParamType$outboundSchema: z.ZodNativeEnum< - typeof CreateIncidentImpactPathParamType -> = CreateIncidentImpactPathParamType$inboundSchema; +export const CreateIncidentImpactType$outboundSchema: z.ZodNativeEnum< + typeof CreateIncidentImpactType +> = CreateIncidentImpactType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CreateIncidentImpactPathParamType$ { - /** @deprecated use `CreateIncidentImpactPathParamType$inboundSchema` instead. */ - export const inboundSchema = CreateIncidentImpactPathParamType$inboundSchema; - /** @deprecated use `CreateIncidentImpactPathParamType$outboundSchema` instead. */ - export const outboundSchema = - CreateIncidentImpactPathParamType$outboundSchema; +export namespace CreateIncidentImpactType$ { + /** @deprecated use `CreateIncidentImpactType$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentImpactType$inboundSchema; + /** @deprecated use `CreateIncidentImpactType$outboundSchema` instead. */ + export const outboundSchema = CreateIncidentImpactType$outboundSchema; } /** @internal */ @@ -56,12 +54,14 @@ export const CreateIncidentImpactRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - type: CreateIncidentImpactPathParamType$inboundSchema, - postV1IncidentsIncidentIdImpactType: - components.PostV1IncidentsIncidentIdImpactType$inboundSchema, + type: CreateIncidentImpactType$inboundSchema, + create_incident_impact: z.lazy(() => + components.CreateIncidentImpact$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_impact": "createIncidentImpact", }); }); @@ -69,8 +69,7 @@ export const CreateIncidentImpactRequest$inboundSchema: z.ZodType< export type CreateIncidentImpactRequest$Outbound = { incident_id: string; type: string; - postV1IncidentsIncidentIdImpactType: - components.PostV1IncidentsIncidentIdImpactType$Outbound; + create_incident_impact: components.CreateIncidentImpact$Outbound; }; /** @internal */ @@ -80,12 +79,14 @@ export const CreateIncidentImpactRequest$outboundSchema: z.ZodType< CreateIncidentImpactRequest > = z.object({ incidentId: z.string(), - type: CreateIncidentImpactPathParamType$outboundSchema, - postV1IncidentsIncidentIdImpactType: - components.PostV1IncidentsIncidentIdImpactType$outboundSchema, + type: CreateIncidentImpactType$outboundSchema, + createIncidentImpact: z.lazy(() => + components.CreateIncidentImpact$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentImpact: "create_incident_impact", }); }); diff --git a/src/models/operations/createincidentlink.ts b/src/models/operations/createincidentlink.ts index de49f083..cec2c510 100644 --- a/src/models/operations/createincidentlink.ts +++ b/src/models/operations/createincidentlink.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateIncidentLinkRequest = { incidentId: string; - postV1IncidentsIncidentIdLinks: components.PostV1IncidentsIncidentIdLinks; + createIncidentLink: components.CreateIncidentLink; }; /** @internal */ @@ -21,19 +21,20 @@ export const CreateIncidentLinkRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - postV1IncidentsIncidentIdLinks: - components.PostV1IncidentsIncidentIdLinks$inboundSchema, + create_incident_link: z.lazy(() => + components.CreateIncidentLink$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_link": "createIncidentLink", }); }); /** @internal */ export type CreateIncidentLinkRequest$Outbound = { incident_id: string; - postV1IncidentsIncidentIdLinks: - components.PostV1IncidentsIncidentIdLinks$Outbound; + create_incident_link: components.CreateIncidentLink$Outbound; }; /** @internal */ @@ -43,11 +44,13 @@ export const CreateIncidentLinkRequest$outboundSchema: z.ZodType< CreateIncidentLinkRequest > = z.object({ incidentId: z.string(), - postV1IncidentsIncidentIdLinks: - components.PostV1IncidentsIncidentIdLinks$outboundSchema, + createIncidentLink: z.lazy(() => + components.CreateIncidentLink$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentLink: "create_incident_link", }); }); diff --git a/src/models/operations/createincidentnote.ts b/src/models/operations/createincidentnote.ts index 0e919993..737787c3 100644 --- a/src/models/operations/createincidentnote.ts +++ b/src/models/operations/createincidentnote.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateIncidentNoteRequest = { incidentId: string; - postV1IncidentsIncidentIdNotes: components.PostV1IncidentsIncidentIdNotes; + createIncidentNote: components.CreateIncidentNote; }; /** @internal */ @@ -21,19 +21,20 @@ export const CreateIncidentNoteRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - postV1IncidentsIncidentIdNotes: - components.PostV1IncidentsIncidentIdNotes$inboundSchema, + create_incident_note: z.lazy(() => + components.CreateIncidentNote$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_note": "createIncidentNote", }); }); /** @internal */ export type CreateIncidentNoteRequest$Outbound = { incident_id: string; - postV1IncidentsIncidentIdNotes: - components.PostV1IncidentsIncidentIdNotes$Outbound; + create_incident_note: components.CreateIncidentNote$Outbound; }; /** @internal */ @@ -43,11 +44,13 @@ export const CreateIncidentNoteRequest$outboundSchema: z.ZodType< CreateIncidentNoteRequest > = z.object({ incidentId: z.string(), - postV1IncidentsIncidentIdNotes: - components.PostV1IncidentsIncidentIdNotes$outboundSchema, + createIncidentNote: z.lazy(() => + components.CreateIncidentNote$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentNote: "create_incident_note", }); }); diff --git a/src/models/operations/createincidentrelatedchange.ts b/src/models/operations/createincidentrelatedchange.ts deleted file mode 100644 index af78fd5f..00000000 --- a/src/models/operations/createincidentrelatedchange.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateIncidentRelatedChangeRequest = { - incidentId: string; - postV1IncidentsIncidentIdRelatedChangeEvents: - components.PostV1IncidentsIncidentIdRelatedChangeEvents; -}; - -/** @internal */ -export const CreateIncidentRelatedChangeRequest$inboundSchema: z.ZodType< - CreateIncidentRelatedChangeRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - postV1IncidentsIncidentIdRelatedChangeEvents: - components.PostV1IncidentsIncidentIdRelatedChangeEvents$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type CreateIncidentRelatedChangeRequest$Outbound = { - incident_id: string; - postV1IncidentsIncidentIdRelatedChangeEvents: - components.PostV1IncidentsIncidentIdRelatedChangeEvents$Outbound; -}; - -/** @internal */ -export const CreateIncidentRelatedChangeRequest$outboundSchema: z.ZodType< - CreateIncidentRelatedChangeRequest$Outbound, - z.ZodTypeDef, - CreateIncidentRelatedChangeRequest -> = z.object({ - incidentId: z.string(), - postV1IncidentsIncidentIdRelatedChangeEvents: - components.PostV1IncidentsIncidentIdRelatedChangeEvents$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateIncidentRelatedChangeRequest$ { - /** @deprecated use `CreateIncidentRelatedChangeRequest$inboundSchema` instead. */ - export const inboundSchema = CreateIncidentRelatedChangeRequest$inboundSchema; - /** @deprecated use `CreateIncidentRelatedChangeRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateIncidentRelatedChangeRequest$outboundSchema; - /** @deprecated use `CreateIncidentRelatedChangeRequest$Outbound` instead. */ - export type Outbound = CreateIncidentRelatedChangeRequest$Outbound; -} - -export function createIncidentRelatedChangeRequestToJSON( - createIncidentRelatedChangeRequest: CreateIncidentRelatedChangeRequest, -): string { - return JSON.stringify( - CreateIncidentRelatedChangeRequest$outboundSchema.parse( - createIncidentRelatedChangeRequest, - ), - ); -} - -export function createIncidentRelatedChangeRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateIncidentRelatedChangeRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateIncidentRelatedChangeRequest' from JSON`, - ); -} diff --git a/src/models/operations/createincidentretrospective.ts b/src/models/operations/createincidentretrospective.ts new file mode 100644 index 00000000..8890ae3b --- /dev/null +++ b/src/models/operations/createincidentretrospective.ts @@ -0,0 +1,164 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateIncidentRetrospectiveRequestBody = { + /** + * The id of the retrospective template to apply. + */ + retrospectiveTemplateId: string; +}; + +export type CreateIncidentRetrospectiveRequest = { + incidentId: string; + requestBody: CreateIncidentRetrospectiveRequestBody; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveRequestBody$inboundSchema: z.ZodType< + CreateIncidentRetrospectiveRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_template_id: z.string(), +}).transform((v) => { + return remap$(v, { + "retrospective_template_id": "retrospectiveTemplateId", + }); +}); + +/** @internal */ +export type CreateIncidentRetrospectiveRequestBody$Outbound = { + retrospective_template_id: string; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveRequestBody$outboundSchema: z.ZodType< + CreateIncidentRetrospectiveRequestBody$Outbound, + z.ZodTypeDef, + CreateIncidentRetrospectiveRequestBody +> = z.object({ + retrospectiveTemplateId: z.string(), +}).transform((v) => { + return remap$(v, { + retrospectiveTemplateId: "retrospective_template_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRetrospectiveRequestBody$ { + /** @deprecated use `CreateIncidentRetrospectiveRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateIncidentRetrospectiveRequestBody$inboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateIncidentRetrospectiveRequestBody$outboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveRequestBody$Outbound` instead. */ + export type Outbound = CreateIncidentRetrospectiveRequestBody$Outbound; +} + +export function createIncidentRetrospectiveRequestBodyToJSON( + createIncidentRetrospectiveRequestBody: + CreateIncidentRetrospectiveRequestBody, +): string { + return JSON.stringify( + CreateIncidentRetrospectiveRequestBody$outboundSchema.parse( + createIncidentRetrospectiveRequestBody, + ), + ); +} + +export function createIncidentRetrospectiveRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateIncidentRetrospectiveRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentRetrospectiveRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateIncidentRetrospectiveRequest$inboundSchema: z.ZodType< + CreateIncidentRetrospectiveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + RequestBody: z.lazy(() => + CreateIncidentRetrospectiveRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type CreateIncidentRetrospectiveRequest$Outbound = { + incident_id: string; + RequestBody: CreateIncidentRetrospectiveRequestBody$Outbound; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveRequest$outboundSchema: z.ZodType< + CreateIncidentRetrospectiveRequest$Outbound, + z.ZodTypeDef, + CreateIncidentRetrospectiveRequest +> = z.object({ + incidentId: z.string(), + requestBody: z.lazy(() => + CreateIncidentRetrospectiveRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRetrospectiveRequest$ { + /** @deprecated use `CreateIncidentRetrospectiveRequest$inboundSchema` instead. */ + export const inboundSchema = CreateIncidentRetrospectiveRequest$inboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateIncidentRetrospectiveRequest$outboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveRequest$Outbound` instead. */ + export type Outbound = CreateIncidentRetrospectiveRequest$Outbound; +} + +export function createIncidentRetrospectiveRequestToJSON( + createIncidentRetrospectiveRequest: CreateIncidentRetrospectiveRequest, +): string { + return JSON.stringify( + CreateIncidentRetrospectiveRequest$outboundSchema.parse( + createIncidentRetrospectiveRequest, + ), + ); +} + +export function createIncidentRetrospectiveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateIncidentRetrospectiveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateIncidentRetrospectiveRequest' from JSON`, + ); +} diff --git a/src/models/operations/createincidentretrospectivedynamicinput.ts b/src/models/operations/createincidentretrospectivedynamicinput.ts new file mode 100644 index 00000000..8a0920e9 --- /dev/null +++ b/src/models/operations/createincidentretrospectivedynamicinput.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateIncidentRetrospectiveDynamicInputRequest = { + retrospectiveId: string; + fieldId: string; + incidentId: string; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveDynamicInputRequest$inboundSchema: + z.ZodType< + CreateIncidentRetrospectiveDynamicInputRequest, + z.ZodTypeDef, + unknown + > = z.object({ + retrospective_id: z.string(), + field_id: z.string(), + incident_id: z.string(), + }).transform((v) => { + return remap$(v, { + "retrospective_id": "retrospectiveId", + "field_id": "fieldId", + "incident_id": "incidentId", + }); + }); + +/** @internal */ +export type CreateIncidentRetrospectiveDynamicInputRequest$Outbound = { + retrospective_id: string; + field_id: string; + incident_id: string; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveDynamicInputRequest$outboundSchema: + z.ZodType< + CreateIncidentRetrospectiveDynamicInputRequest$Outbound, + z.ZodTypeDef, + CreateIncidentRetrospectiveDynamicInputRequest + > = z.object({ + retrospectiveId: z.string(), + fieldId: z.string(), + incidentId: z.string(), + }).transform((v) => { + return remap$(v, { + retrospectiveId: "retrospective_id", + fieldId: "field_id", + incidentId: "incident_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRetrospectiveDynamicInputRequest$ { + /** @deprecated use `CreateIncidentRetrospectiveDynamicInputRequest$inboundSchema` instead. */ + export const inboundSchema = + CreateIncidentRetrospectiveDynamicInputRequest$inboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveDynamicInputRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateIncidentRetrospectiveDynamicInputRequest$outboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveDynamicInputRequest$Outbound` instead. */ + export type Outbound = + CreateIncidentRetrospectiveDynamicInputRequest$Outbound; +} + +export function createIncidentRetrospectiveDynamicInputRequestToJSON( + createIncidentRetrospectiveDynamicInputRequest: + CreateIncidentRetrospectiveDynamicInputRequest, +): string { + return JSON.stringify( + CreateIncidentRetrospectiveDynamicInputRequest$outboundSchema.parse( + createIncidentRetrospectiveDynamicInputRequest, + ), + ); +} + +export function createIncidentRetrospectiveDynamicInputRequestFromJSON( + jsonString: string, +): SafeParseResult< + CreateIncidentRetrospectiveDynamicInputRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateIncidentRetrospectiveDynamicInputRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateIncidentRetrospectiveDynamicInputRequest' from JSON`, + ); +} diff --git a/src/models/operations/createincidentretrospectivefield.ts b/src/models/operations/createincidentretrospectivefield.ts new file mode 100644 index 00000000..19131ff6 --- /dev/null +++ b/src/models/operations/createincidentretrospectivefield.ts @@ -0,0 +1,244 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const CreateIncidentRetrospectiveFieldType = { + Text: "text", + SingleSelect: "single_select", + MultiSelect: "multi_select", + Numeric: "numeric", + Datetime: "datetime", + DynamicInputGroup: "dynamic_input_group", + Markdown: "markdown", + MarkdownText: "markdown_text", +} as const; +export type CreateIncidentRetrospectiveFieldType = ClosedEnum< + typeof CreateIncidentRetrospectiveFieldType +>; + +export type CreateIncidentRetrospectiveFieldRequestBody = { + label: string; + type: CreateIncidentRetrospectiveFieldType; + helpText?: string | null | undefined; + permissibleValues?: Array | null | undefined; + isRequired?: boolean | null | undefined; + schema?: Array | null | undefined; +}; + +export type CreateIncidentRetrospectiveFieldRequest = { + retrospectiveId: string; + incidentId: string; + requestBody: CreateIncidentRetrospectiveFieldRequestBody; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveFieldType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + CreateIncidentRetrospectiveFieldType, + ); + +/** @internal */ +export const CreateIncidentRetrospectiveFieldType$outboundSchema: + z.ZodNativeEnum = + CreateIncidentRetrospectiveFieldType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRetrospectiveFieldType$ { + /** @deprecated use `CreateIncidentRetrospectiveFieldType$inboundSchema` instead. */ + export const inboundSchema = + CreateIncidentRetrospectiveFieldType$inboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveFieldType$outboundSchema` instead. */ + export const outboundSchema = + CreateIncidentRetrospectiveFieldType$outboundSchema; +} + +/** @internal */ +export const CreateIncidentRetrospectiveFieldRequestBody$inboundSchema: + z.ZodType< + CreateIncidentRetrospectiveFieldRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + label: z.string(), + type: CreateIncidentRetrospectiveFieldType$inboundSchema, + help_text: z.nullable(z.string()).optional(), + permissible_values: z.nullable(z.array(z.string())).optional(), + is_required: z.nullable(z.boolean()).optional(), + schema: z.nullable(z.array(z.string())).optional(), + }).transform((v) => { + return remap$(v, { + "help_text": "helpText", + "permissible_values": "permissibleValues", + "is_required": "isRequired", + }); + }); + +/** @internal */ +export type CreateIncidentRetrospectiveFieldRequestBody$Outbound = { + label: string; + type: string; + help_text?: string | null | undefined; + permissible_values?: Array | null | undefined; + is_required?: boolean | null | undefined; + schema?: Array | null | undefined; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveFieldRequestBody$outboundSchema: + z.ZodType< + CreateIncidentRetrospectiveFieldRequestBody$Outbound, + z.ZodTypeDef, + CreateIncidentRetrospectiveFieldRequestBody + > = z.object({ + label: z.string(), + type: CreateIncidentRetrospectiveFieldType$outboundSchema, + helpText: z.nullable(z.string()).optional(), + permissibleValues: z.nullable(z.array(z.string())).optional(), + isRequired: z.nullable(z.boolean()).optional(), + schema: z.nullable(z.array(z.string())).optional(), + }).transform((v) => { + return remap$(v, { + helpText: "help_text", + permissibleValues: "permissible_values", + isRequired: "is_required", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRetrospectiveFieldRequestBody$ { + /** @deprecated use `CreateIncidentRetrospectiveFieldRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateIncidentRetrospectiveFieldRequestBody$inboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveFieldRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateIncidentRetrospectiveFieldRequestBody$outboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveFieldRequestBody$Outbound` instead. */ + export type Outbound = CreateIncidentRetrospectiveFieldRequestBody$Outbound; +} + +export function createIncidentRetrospectiveFieldRequestBodyToJSON( + createIncidentRetrospectiveFieldRequestBody: + CreateIncidentRetrospectiveFieldRequestBody, +): string { + return JSON.stringify( + CreateIncidentRetrospectiveFieldRequestBody$outboundSchema.parse( + createIncidentRetrospectiveFieldRequestBody, + ), + ); +} + +export function createIncidentRetrospectiveFieldRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + CreateIncidentRetrospectiveFieldRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateIncidentRetrospectiveFieldRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateIncidentRetrospectiveFieldRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateIncidentRetrospectiveFieldRequest$inboundSchema: z.ZodType< + CreateIncidentRetrospectiveFieldRequest, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_id: z.string(), + incident_id: z.string(), + RequestBody: z.lazy(() => + CreateIncidentRetrospectiveFieldRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "retrospective_id": "retrospectiveId", + "incident_id": "incidentId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type CreateIncidentRetrospectiveFieldRequest$Outbound = { + retrospective_id: string; + incident_id: string; + RequestBody: CreateIncidentRetrospectiveFieldRequestBody$Outbound; +}; + +/** @internal */ +export const CreateIncidentRetrospectiveFieldRequest$outboundSchema: z.ZodType< + CreateIncidentRetrospectiveFieldRequest$Outbound, + z.ZodTypeDef, + CreateIncidentRetrospectiveFieldRequest +> = z.object({ + retrospectiveId: z.string(), + incidentId: z.string(), + requestBody: z.lazy(() => + CreateIncidentRetrospectiveFieldRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + retrospectiveId: "retrospective_id", + incidentId: "incident_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateIncidentRetrospectiveFieldRequest$ { + /** @deprecated use `CreateIncidentRetrospectiveFieldRequest$inboundSchema` instead. */ + export const inboundSchema = + CreateIncidentRetrospectiveFieldRequest$inboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveFieldRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateIncidentRetrospectiveFieldRequest$outboundSchema; + /** @deprecated use `CreateIncidentRetrospectiveFieldRequest$Outbound` instead. */ + export type Outbound = CreateIncidentRetrospectiveFieldRequest$Outbound; +} + +export function createIncidentRetrospectiveFieldRequestToJSON( + createIncidentRetrospectiveFieldRequest: + CreateIncidentRetrospectiveFieldRequest, +): string { + return JSON.stringify( + CreateIncidentRetrospectiveFieldRequest$outboundSchema.parse( + createIncidentRetrospectiveFieldRequest, + ), + ); +} + +export function createIncidentRetrospectiveFieldRequestFromJSON( + jsonString: string, +): SafeParseResult< + CreateIncidentRetrospectiveFieldRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateIncidentRetrospectiveFieldRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateIncidentRetrospectiveFieldRequest' from JSON`, + ); +} diff --git a/src/models/operations/createincidentroleassignment.ts b/src/models/operations/createincidentroleassignment.ts index a6eefefa..593bb1b1 100644 --- a/src/models/operations/createincidentroleassignment.ts +++ b/src/models/operations/createincidentroleassignment.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateIncidentRoleAssignmentRequest = { incidentId: string; - postV1IncidentsIncidentIdRoleAssignments: - components.PostV1IncidentsIncidentIdRoleAssignments; + createIncidentRoleAssignment: components.CreateIncidentRoleAssignment; }; /** @internal */ @@ -22,19 +21,21 @@ export const CreateIncidentRoleAssignmentRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - postV1IncidentsIncidentIdRoleAssignments: - components.PostV1IncidentsIncidentIdRoleAssignments$inboundSchema, + create_incident_role_assignment: z.lazy(() => + components.CreateIncidentRoleAssignment$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_role_assignment": "createIncidentRoleAssignment", }); }); /** @internal */ export type CreateIncidentRoleAssignmentRequest$Outbound = { incident_id: string; - postV1IncidentsIncidentIdRoleAssignments: - components.PostV1IncidentsIncidentIdRoleAssignments$Outbound; + create_incident_role_assignment: + components.CreateIncidentRoleAssignment$Outbound; }; /** @internal */ @@ -44,11 +45,13 @@ export const CreateIncidentRoleAssignmentRequest$outboundSchema: z.ZodType< CreateIncidentRoleAssignmentRequest > = z.object({ incidentId: z.string(), - postV1IncidentsIncidentIdRoleAssignments: - components.PostV1IncidentsIncidentIdRoleAssignments$outboundSchema, + createIncidentRoleAssignment: z.lazy(() => + components.CreateIncidentRoleAssignment$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentRoleAssignment: "create_incident_role_assignment", }); }); diff --git a/src/models/operations/createincidentstatuspage.ts b/src/models/operations/createincidentstatuspage.ts index e214c52d..4c4b4e3a 100644 --- a/src/models/operations/createincidentstatuspage.ts +++ b/src/models/operations/createincidentstatuspage.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateIncidentStatusPageRequest = { incidentId: string; - postV1IncidentsIncidentIdStatusPages: - components.PostV1IncidentsIncidentIdStatusPages; + createIncidentStatusPage: components.CreateIncidentStatusPage; }; /** @internal */ @@ -22,19 +21,20 @@ export const CreateIncidentStatusPageRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - postV1IncidentsIncidentIdStatusPages: - components.PostV1IncidentsIncidentIdStatusPages$inboundSchema, + create_incident_status_page: z.lazy(() => + components.CreateIncidentStatusPage$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_status_page": "createIncidentStatusPage", }); }); /** @internal */ export type CreateIncidentStatusPageRequest$Outbound = { incident_id: string; - postV1IncidentsIncidentIdStatusPages: - components.PostV1IncidentsIncidentIdStatusPages$Outbound; + create_incident_status_page: components.CreateIncidentStatusPage$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const CreateIncidentStatusPageRequest$outboundSchema: z.ZodType< CreateIncidentStatusPageRequest > = z.object({ incidentId: z.string(), - postV1IncidentsIncidentIdStatusPages: - components.PostV1IncidentsIncidentIdStatusPages$outboundSchema, + createIncidentStatusPage: z.lazy(() => + components.CreateIncidentStatusPage$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentStatusPage: "create_incident_status_page", }); }); diff --git a/src/models/operations/createincidenttask.ts b/src/models/operations/createincidenttask.ts index 25a4458f..df1cc7d7 100644 --- a/src/models/operations/createincidenttask.ts +++ b/src/models/operations/createincidenttask.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateIncidentTaskRequest = { incidentId: string; - postV1IncidentsIncidentIdTasks: components.PostV1IncidentsIncidentIdTasks; + createIncidentTask: components.CreateIncidentTask; }; /** @internal */ @@ -21,19 +21,20 @@ export const CreateIncidentTaskRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - postV1IncidentsIncidentIdTasks: - components.PostV1IncidentsIncidentIdTasks$inboundSchema, + create_incident_task: z.lazy(() => + components.CreateIncidentTask$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_task": "createIncidentTask", }); }); /** @internal */ export type CreateIncidentTaskRequest$Outbound = { incident_id: string; - postV1IncidentsIncidentIdTasks: - components.PostV1IncidentsIncidentIdTasks$Outbound; + create_incident_task: components.CreateIncidentTask$Outbound; }; /** @internal */ @@ -43,11 +44,13 @@ export const CreateIncidentTaskRequest$outboundSchema: z.ZodType< CreateIncidentTaskRequest > = z.object({ incidentId: z.string(), - postV1IncidentsIncidentIdTasks: - components.PostV1IncidentsIncidentIdTasks$outboundSchema, + createIncidentTask: z.lazy(() => + components.CreateIncidentTask$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentTask: "create_incident_task", }); }); diff --git a/src/models/operations/createincidenttasklist.ts b/src/models/operations/createincidenttasklist.ts index d5102315..5bdd3f9b 100644 --- a/src/models/operations/createincidenttasklist.ts +++ b/src/models/operations/createincidenttasklist.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateIncidentTaskListRequest = { incidentId: string; - postV1IncidentsIncidentIdTaskLists: - components.PostV1IncidentsIncidentIdTaskLists; + createIncidentTaskList: components.CreateIncidentTaskList; }; /** @internal */ @@ -22,19 +21,20 @@ export const CreateIncidentTaskListRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - postV1IncidentsIncidentIdTaskLists: - components.PostV1IncidentsIncidentIdTaskLists$inboundSchema, + create_incident_task_list: z.lazy(() => + components.CreateIncidentTaskList$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_task_list": "createIncidentTaskList", }); }); /** @internal */ export type CreateIncidentTaskListRequest$Outbound = { incident_id: string; - postV1IncidentsIncidentIdTaskLists: - components.PostV1IncidentsIncidentIdTaskLists$Outbound; + create_incident_task_list: components.CreateIncidentTaskList$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const CreateIncidentTaskListRequest$outboundSchema: z.ZodType< CreateIncidentTaskListRequest > = z.object({ incidentId: z.string(), - postV1IncidentsIncidentIdTaskLists: - components.PostV1IncidentsIncidentIdTaskLists$outboundSchema, + createIncidentTaskList: z.lazy(() => + components.CreateIncidentTaskList$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentTaskList: "create_incident_task_list", }); }); diff --git a/src/models/operations/createincidentteamassignment.ts b/src/models/operations/createincidentteamassignment.ts index e69a132a..72f09af2 100644 --- a/src/models/operations/createincidentteamassignment.ts +++ b/src/models/operations/createincidentteamassignment.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateIncidentTeamAssignmentRequest = { incidentId: string; - postV1IncidentsIncidentIdTeamAssignments: - components.PostV1IncidentsIncidentIdTeamAssignments; + createIncidentTeamAssignment: components.CreateIncidentTeamAssignment; }; /** @internal */ @@ -22,19 +21,21 @@ export const CreateIncidentTeamAssignmentRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - postV1IncidentsIncidentIdTeamAssignments: - components.PostV1IncidentsIncidentIdTeamAssignments$inboundSchema, + create_incident_team_assignment: z.lazy(() => + components.CreateIncidentTeamAssignment$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "create_incident_team_assignment": "createIncidentTeamAssignment", }); }); /** @internal */ export type CreateIncidentTeamAssignmentRequest$Outbound = { incident_id: string; - postV1IncidentsIncidentIdTeamAssignments: - components.PostV1IncidentsIncidentIdTeamAssignments$Outbound; + create_incident_team_assignment: + components.CreateIncidentTeamAssignment$Outbound; }; /** @internal */ @@ -44,11 +45,13 @@ export const CreateIncidentTeamAssignmentRequest$outboundSchema: z.ZodType< CreateIncidentTeamAssignmentRequest > = z.object({ incidentId: z.string(), - postV1IncidentsIncidentIdTeamAssignments: - components.PostV1IncidentsIncidentIdTeamAssignments$outboundSchema, + createIncidentTeamAssignment: z.lazy(() => + components.CreateIncidentTeamAssignment$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + createIncidentTeamAssignment: "create_incident_team_assignment", }); }); diff --git a/src/models/operations/createintegrationconnection.ts b/src/models/operations/createintegrationconnection.ts deleted file mode 100644 index 36e12ccf..00000000 --- a/src/models/operations/createintegrationconnection.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateIntegrationConnectionRequest = { - slug: string; -}; - -/** @internal */ -export const CreateIntegrationConnectionRequest$inboundSchema: z.ZodType< - CreateIntegrationConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string(), -}); - -/** @internal */ -export type CreateIntegrationConnectionRequest$Outbound = { - slug: string; -}; - -/** @internal */ -export const CreateIntegrationConnectionRequest$outboundSchema: z.ZodType< - CreateIntegrationConnectionRequest$Outbound, - z.ZodTypeDef, - CreateIntegrationConnectionRequest -> = z.object({ - slug: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateIntegrationConnectionRequest$ { - /** @deprecated use `CreateIntegrationConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = CreateIntegrationConnectionRequest$inboundSchema; - /** @deprecated use `CreateIntegrationConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateIntegrationConnectionRequest$outboundSchema; - /** @deprecated use `CreateIntegrationConnectionRequest$Outbound` instead. */ - export type Outbound = CreateIntegrationConnectionRequest$Outbound; -} - -export function createIntegrationConnectionRequestToJSON( - createIntegrationConnectionRequest: CreateIntegrationConnectionRequest, -): string { - return JSON.stringify( - CreateIntegrationConnectionRequest$outboundSchema.parse( - createIntegrationConnectionRequest, - ), - ); -} - -export function createIntegrationConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateIntegrationConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateIntegrationConnectionRequest' from JSON`, - ); -} diff --git a/src/models/operations/createlifecyclemeasurementdefinition.ts b/src/models/operations/createlifecyclemeasurementdefinition.ts new file mode 100644 index 00000000..fc2720a2 --- /dev/null +++ b/src/models/operations/createlifecyclemeasurementdefinition.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateLifecycleMeasurementDefinitionRequest = { + name: string; + slug?: string | null | undefined; + description?: string | null | undefined; + startsAtMilestoneId: string; + endsAtMilestoneId: string; +}; + +/** @internal */ +export const CreateLifecycleMeasurementDefinitionRequest$inboundSchema: + z.ZodType< + CreateLifecycleMeasurementDefinitionRequest, + z.ZodTypeDef, + unknown + > = z.object({ + name: z.string(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + starts_at_milestone_id: z.string(), + ends_at_milestone_id: z.string(), + }).transform((v) => { + return remap$(v, { + "starts_at_milestone_id": "startsAtMilestoneId", + "ends_at_milestone_id": "endsAtMilestoneId", + }); + }); + +/** @internal */ +export type CreateLifecycleMeasurementDefinitionRequest$Outbound = { + name: string; + slug?: string | null | undefined; + description?: string | null | undefined; + starts_at_milestone_id: string; + ends_at_milestone_id: string; +}; + +/** @internal */ +export const CreateLifecycleMeasurementDefinitionRequest$outboundSchema: + z.ZodType< + CreateLifecycleMeasurementDefinitionRequest$Outbound, + z.ZodTypeDef, + CreateLifecycleMeasurementDefinitionRequest + > = z.object({ + name: z.string(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + startsAtMilestoneId: z.string(), + endsAtMilestoneId: z.string(), + }).transform((v) => { + return remap$(v, { + startsAtMilestoneId: "starts_at_milestone_id", + endsAtMilestoneId: "ends_at_milestone_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateLifecycleMeasurementDefinitionRequest$ { + /** @deprecated use `CreateLifecycleMeasurementDefinitionRequest$inboundSchema` instead. */ + export const inboundSchema = + CreateLifecycleMeasurementDefinitionRequest$inboundSchema; + /** @deprecated use `CreateLifecycleMeasurementDefinitionRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateLifecycleMeasurementDefinitionRequest$outboundSchema; + /** @deprecated use `CreateLifecycleMeasurementDefinitionRequest$Outbound` instead. */ + export type Outbound = CreateLifecycleMeasurementDefinitionRequest$Outbound; +} + +export function createLifecycleMeasurementDefinitionRequestToJSON( + createLifecycleMeasurementDefinitionRequest: + CreateLifecycleMeasurementDefinitionRequest, +): string { + return JSON.stringify( + CreateLifecycleMeasurementDefinitionRequest$outboundSchema.parse( + createLifecycleMeasurementDefinitionRequest, + ), + ); +} + +export function createLifecycleMeasurementDefinitionRequestFromJSON( + jsonString: string, +): SafeParseResult< + CreateLifecycleMeasurementDefinitionRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + CreateLifecycleMeasurementDefinitionRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'CreateLifecycleMeasurementDefinitionRequest' from JSON`, + ); +} diff --git a/src/models/operations/createlifecyclemilestone.ts b/src/models/operations/createlifecyclemilestone.ts index 6019a552..7fa1f2c6 100644 --- a/src/models/operations/createlifecyclemilestone.ts +++ b/src/models/operations/createlifecyclemilestone.ts @@ -5,10 +5,26 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type CreateLifecycleMilestoneRequestBody = { +/** + * The setting for auto-assigning the milestone's timestamp during incident declaration + */ +export const CreateLifecycleMilestoneAutoAssignTimestampOnCreate = { + AlwaysSetOnCreate: "always_set_on_create", + OnlySetOnManualCreate: "only_set_on_manual_create", + NeverSetOnCreate: "never_set_on_create", +} as const; +/** + * The setting for auto-assigning the milestone's timestamp during incident declaration + */ +export type CreateLifecycleMilestoneAutoAssignTimestampOnCreate = ClosedEnum< + typeof CreateLifecycleMilestoneAutoAssignTimestampOnCreate +>; + +export type CreateLifecycleMilestoneRequest = { /** * The name of the milestone */ @@ -20,7 +36,7 @@ export type CreateLifecycleMilestoneRequestBody = { /** * A unique identifier for the milestone. If not provided, one will be generated from the name. */ - slug?: string | undefined; + slug?: string | null | undefined; /** * The ID of the phase to which the milestone should belong */ @@ -28,58 +44,97 @@ export type CreateLifecycleMilestoneRequestBody = { /** * The position of the milestone within the phase. If not provided, the milestone will be added as the last milestone in the phase. */ - position?: number | undefined; + position?: number | null | undefined; /** * The ID of a later milestone that cannot be started until this milestone has a timestamp populated */ - requiredAtMilestoneId?: string | undefined; + requiredAtMilestoneId?: string | null | undefined; + /** + * The setting for auto-assigning the milestone's timestamp during incident declaration + */ + autoAssignTimestampOnCreate?: + | CreateLifecycleMilestoneAutoAssignTimestampOnCreate + | null + | undefined; }; /** @internal */ -export const CreateLifecycleMilestoneRequestBody$inboundSchema: z.ZodType< - CreateLifecycleMilestoneRequestBody, +export const CreateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema: + z.ZodNativeEnum = + z.nativeEnum(CreateLifecycleMilestoneAutoAssignTimestampOnCreate); + +/** @internal */ +export const CreateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema: + z.ZodNativeEnum = + CreateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateLifecycleMilestoneAutoAssignTimestampOnCreate$ { + /** @deprecated use `CreateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema` instead. */ + export const inboundSchema = + CreateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema; + /** @deprecated use `CreateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema` instead. */ + export const outboundSchema = + CreateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema; +} + +/** @internal */ +export const CreateLifecycleMilestoneRequest$inboundSchema: z.ZodType< + CreateLifecycleMilestoneRequest, z.ZodTypeDef, unknown > = z.object({ name: z.string(), description: z.string(), - slug: z.string().optional(), + slug: z.nullable(z.string()).optional(), phase_id: z.string(), - position: z.number().int().optional(), - required_at_milestone_id: z.string().optional(), + position: z.nullable(z.number().int()).optional(), + required_at_milestone_id: z.nullable(z.string()).optional(), + auto_assign_timestamp_on_create: z.nullable( + CreateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { "phase_id": "phaseId", "required_at_milestone_id": "requiredAtMilestoneId", + "auto_assign_timestamp_on_create": "autoAssignTimestampOnCreate", }); }); /** @internal */ -export type CreateLifecycleMilestoneRequestBody$Outbound = { +export type CreateLifecycleMilestoneRequest$Outbound = { name: string; description: string; - slug?: string | undefined; + slug?: string | null | undefined; phase_id: string; - position?: number | undefined; - required_at_milestone_id?: string | undefined; + position?: number | null | undefined; + required_at_milestone_id?: string | null | undefined; + auto_assign_timestamp_on_create?: string | null | undefined; }; /** @internal */ -export const CreateLifecycleMilestoneRequestBody$outboundSchema: z.ZodType< - CreateLifecycleMilestoneRequestBody$Outbound, +export const CreateLifecycleMilestoneRequest$outboundSchema: z.ZodType< + CreateLifecycleMilestoneRequest$Outbound, z.ZodTypeDef, - CreateLifecycleMilestoneRequestBody + CreateLifecycleMilestoneRequest > = z.object({ name: z.string(), description: z.string(), - slug: z.string().optional(), + slug: z.nullable(z.string()).optional(), phaseId: z.string(), - position: z.number().int().optional(), - requiredAtMilestoneId: z.string().optional(), + position: z.nullable(z.number().int()).optional(), + requiredAtMilestoneId: z.nullable(z.string()).optional(), + autoAssignTimestampOnCreate: z.nullable( + CreateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { phaseId: "phase_id", requiredAtMilestoneId: "required_at_milestone_id", + autoAssignTimestampOnCreate: "auto_assign_timestamp_on_create", }); }); @@ -87,34 +142,31 @@ export const CreateLifecycleMilestoneRequestBody$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CreateLifecycleMilestoneRequestBody$ { - /** @deprecated use `CreateLifecycleMilestoneRequestBody$inboundSchema` instead. */ - export const inboundSchema = - CreateLifecycleMilestoneRequestBody$inboundSchema; - /** @deprecated use `CreateLifecycleMilestoneRequestBody$outboundSchema` instead. */ - export const outboundSchema = - CreateLifecycleMilestoneRequestBody$outboundSchema; - /** @deprecated use `CreateLifecycleMilestoneRequestBody$Outbound` instead. */ - export type Outbound = CreateLifecycleMilestoneRequestBody$Outbound; +export namespace CreateLifecycleMilestoneRequest$ { + /** @deprecated use `CreateLifecycleMilestoneRequest$inboundSchema` instead. */ + export const inboundSchema = CreateLifecycleMilestoneRequest$inboundSchema; + /** @deprecated use `CreateLifecycleMilestoneRequest$outboundSchema` instead. */ + export const outboundSchema = CreateLifecycleMilestoneRequest$outboundSchema; + /** @deprecated use `CreateLifecycleMilestoneRequest$Outbound` instead. */ + export type Outbound = CreateLifecycleMilestoneRequest$Outbound; } -export function createLifecycleMilestoneRequestBodyToJSON( - createLifecycleMilestoneRequestBody: CreateLifecycleMilestoneRequestBody, +export function createLifecycleMilestoneRequestToJSON( + createLifecycleMilestoneRequest: CreateLifecycleMilestoneRequest, ): string { return JSON.stringify( - CreateLifecycleMilestoneRequestBody$outboundSchema.parse( - createLifecycleMilestoneRequestBody, + CreateLifecycleMilestoneRequest$outboundSchema.parse( + createLifecycleMilestoneRequest, ), ); } -export function createLifecycleMilestoneRequestBodyFromJSON( +export function createLifecycleMilestoneRequestFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => - CreateLifecycleMilestoneRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateLifecycleMilestoneRequestBody' from JSON`, + (x) => CreateLifecycleMilestoneRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateLifecycleMilestoneRequest' from JSON`, ); } diff --git a/src/models/operations/createmeasurementdefinition.ts b/src/models/operations/createmeasurementdefinition.ts deleted file mode 100644 index 3bb369a9..00000000 --- a/src/models/operations/createmeasurementdefinition.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateMeasurementDefinitionRequestBody = { - name: string; - slug?: string | undefined; - description?: string | undefined; - startsAtMilestoneId: string; - endsAtMilestoneId: string; -}; - -/** @internal */ -export const CreateMeasurementDefinitionRequestBody$inboundSchema: z.ZodType< - CreateMeasurementDefinitionRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - slug: z.string().optional(), - description: z.string().optional(), - starts_at_milestone_id: z.string(), - ends_at_milestone_id: z.string(), -}).transform((v) => { - return remap$(v, { - "starts_at_milestone_id": "startsAtMilestoneId", - "ends_at_milestone_id": "endsAtMilestoneId", - }); -}); - -/** @internal */ -export type CreateMeasurementDefinitionRequestBody$Outbound = { - name: string; - slug?: string | undefined; - description?: string | undefined; - starts_at_milestone_id: string; - ends_at_milestone_id: string; -}; - -/** @internal */ -export const CreateMeasurementDefinitionRequestBody$outboundSchema: z.ZodType< - CreateMeasurementDefinitionRequestBody$Outbound, - z.ZodTypeDef, - CreateMeasurementDefinitionRequestBody -> = z.object({ - name: z.string(), - slug: z.string().optional(), - description: z.string().optional(), - startsAtMilestoneId: z.string(), - endsAtMilestoneId: z.string(), -}).transform((v) => { - return remap$(v, { - startsAtMilestoneId: "starts_at_milestone_id", - endsAtMilestoneId: "ends_at_milestone_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateMeasurementDefinitionRequestBody$ { - /** @deprecated use `CreateMeasurementDefinitionRequestBody$inboundSchema` instead. */ - export const inboundSchema = - CreateMeasurementDefinitionRequestBody$inboundSchema; - /** @deprecated use `CreateMeasurementDefinitionRequestBody$outboundSchema` instead. */ - export const outboundSchema = - CreateMeasurementDefinitionRequestBody$outboundSchema; - /** @deprecated use `CreateMeasurementDefinitionRequestBody$Outbound` instead. */ - export type Outbound = CreateMeasurementDefinitionRequestBody$Outbound; -} - -export function createMeasurementDefinitionRequestBodyToJSON( - createMeasurementDefinitionRequestBody: - CreateMeasurementDefinitionRequestBody, -): string { - return JSON.stringify( - CreateMeasurementDefinitionRequestBody$outboundSchema.parse( - createMeasurementDefinitionRequestBody, - ), - ); -} - -export function createMeasurementDefinitionRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateMeasurementDefinitionRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateMeasurementDefinitionRequestBody' from JSON`, - ); -} diff --git a/src/models/operations/createnunccomponentgroup.ts b/src/models/operations/createnunccomponentgroup.ts new file mode 100644 index 00000000..691baa1d --- /dev/null +++ b/src/models/operations/createnunccomponentgroup.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateNuncComponentGroupRequestBody = { + name: string; + componentGroupId?: string | null | undefined; + position?: number | null | undefined; +}; + +export type CreateNuncComponentGroupRequest = { + nuncConnectionId: string; + requestBody: CreateNuncComponentGroupRequestBody; +}; + +/** @internal */ +export const CreateNuncComponentGroupRequestBody$inboundSchema: z.ZodType< + CreateNuncComponentGroupRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + component_group_id: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "component_group_id": "componentGroupId", + }); +}); + +/** @internal */ +export type CreateNuncComponentGroupRequestBody$Outbound = { + name: string; + component_group_id?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const CreateNuncComponentGroupRequestBody$outboundSchema: z.ZodType< + CreateNuncComponentGroupRequestBody$Outbound, + z.ZodTypeDef, + CreateNuncComponentGroupRequestBody +> = z.object({ + name: z.string(), + componentGroupId: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + componentGroupId: "component_group_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateNuncComponentGroupRequestBody$ { + /** @deprecated use `CreateNuncComponentGroupRequestBody$inboundSchema` instead. */ + export const inboundSchema = + CreateNuncComponentGroupRequestBody$inboundSchema; + /** @deprecated use `CreateNuncComponentGroupRequestBody$outboundSchema` instead. */ + export const outboundSchema = + CreateNuncComponentGroupRequestBody$outboundSchema; + /** @deprecated use `CreateNuncComponentGroupRequestBody$Outbound` instead. */ + export type Outbound = CreateNuncComponentGroupRequestBody$Outbound; +} + +export function createNuncComponentGroupRequestBodyToJSON( + createNuncComponentGroupRequestBody: CreateNuncComponentGroupRequestBody, +): string { + return JSON.stringify( + CreateNuncComponentGroupRequestBody$outboundSchema.parse( + createNuncComponentGroupRequestBody, + ), + ); +} + +export function createNuncComponentGroupRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateNuncComponentGroupRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateNuncComponentGroupRequestBody' from JSON`, + ); +} + +/** @internal */ +export const CreateNuncComponentGroupRequest$inboundSchema: z.ZodType< + CreateNuncComponentGroupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + RequestBody: z.lazy(() => CreateNuncComponentGroupRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type CreateNuncComponentGroupRequest$Outbound = { + nunc_connection_id: string; + RequestBody: CreateNuncComponentGroupRequestBody$Outbound; +}; + +/** @internal */ +export const CreateNuncComponentGroupRequest$outboundSchema: z.ZodType< + CreateNuncComponentGroupRequest$Outbound, + z.ZodTypeDef, + CreateNuncComponentGroupRequest +> = z.object({ + nuncConnectionId: z.string(), + requestBody: z.lazy(() => CreateNuncComponentGroupRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateNuncComponentGroupRequest$ { + /** @deprecated use `CreateNuncComponentGroupRequest$inboundSchema` instead. */ + export const inboundSchema = CreateNuncComponentGroupRequest$inboundSchema; + /** @deprecated use `CreateNuncComponentGroupRequest$outboundSchema` instead. */ + export const outboundSchema = CreateNuncComponentGroupRequest$outboundSchema; + /** @deprecated use `CreateNuncComponentGroupRequest$Outbound` instead. */ + export type Outbound = CreateNuncComponentGroupRequest$Outbound; +} + +export function createNuncComponentGroupRequestToJSON( + createNuncComponentGroupRequest: CreateNuncComponentGroupRequest, +): string { + return JSON.stringify( + CreateNuncComponentGroupRequest$outboundSchema.parse( + createNuncComponentGroupRequest, + ), + ); +} + +export function createNuncComponentGroupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateNuncComponentGroupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateNuncComponentGroupRequest' from JSON`, + ); +} diff --git a/src/models/operations/createnuncconnection.ts b/src/models/operations/createnuncconnection.ts new file mode 100644 index 00000000..13270daf --- /dev/null +++ b/src/models/operations/createnuncconnection.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateNuncConnectionRequest = { + domain: string; + companyName?: string | null | undefined; + companyWebsite?: string | null | undefined; + companyTosUrl?: string | null | undefined; + greetingTitle?: string | null | undefined; + greetingBody?: string | null | undefined; + operationalMessage?: string | null | undefined; + title?: string | null | undefined; + /** + * Status page condition to map your severity matrix condition to + */ + conditionsNuncCondition: Array; + /** + * Severity matrix condition id + */ + conditionsConditionId: Array; + componentsInfrastructureType: Array; + componentsInfrastructureId: Array; + primaryColor?: string | null | undefined; + secondaryColor?: string | null | undefined; + exposedFields?: Array | null | undefined; + enableHistogram?: boolean | null | undefined; + uiVersion?: number | null | undefined; +}; + +/** @internal */ +export const CreateNuncConnectionRequest$inboundSchema: z.ZodType< + CreateNuncConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + domain: z.string(), + company_name: z.nullable(z.string()).optional(), + company_website: z.nullable(z.string()).optional(), + company_tos_url: z.nullable(z.string()).optional(), + greeting_title: z.nullable(z.string()).optional(), + greeting_body: z.nullable(z.string()).optional(), + operational_message: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + "conditions[nunc_condition]": z.array(z.string()), + "conditions[condition_id]": z.array(z.string()), + "components[infrastructure_type]": z.array(z.string()), + "components[infrastructure_id]": z.array(z.string()), + primary_color: z.nullable(z.string()).optional(), + secondary_color: z.nullable(z.string()).optional(), + exposed_fields: z.nullable(z.array(z.string())).optional(), + enable_histogram: z.nullable(z.boolean()).optional(), + ui_version: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "company_name": "companyName", + "company_website": "companyWebsite", + "company_tos_url": "companyTosUrl", + "greeting_title": "greetingTitle", + "greeting_body": "greetingBody", + "operational_message": "operationalMessage", + "conditions[nunc_condition]": "conditionsNuncCondition", + "conditions[condition_id]": "conditionsConditionId", + "components[infrastructure_type]": "componentsInfrastructureType", + "components[infrastructure_id]": "componentsInfrastructureId", + "primary_color": "primaryColor", + "secondary_color": "secondaryColor", + "exposed_fields": "exposedFields", + "enable_histogram": "enableHistogram", + "ui_version": "uiVersion", + }); +}); + +/** @internal */ +export type CreateNuncConnectionRequest$Outbound = { + domain: string; + company_name?: string | null | undefined; + company_website?: string | null | undefined; + company_tos_url?: string | null | undefined; + greeting_title?: string | null | undefined; + greeting_body?: string | null | undefined; + operational_message?: string | null | undefined; + title?: string | null | undefined; + "conditions[nunc_condition]": Array; + "conditions[condition_id]": Array; + "components[infrastructure_type]": Array; + "components[infrastructure_id]": Array; + primary_color?: string | null | undefined; + secondary_color?: string | null | undefined; + exposed_fields?: Array | null | undefined; + enable_histogram?: boolean | null | undefined; + ui_version?: number | null | undefined; +}; + +/** @internal */ +export const CreateNuncConnectionRequest$outboundSchema: z.ZodType< + CreateNuncConnectionRequest$Outbound, + z.ZodTypeDef, + CreateNuncConnectionRequest +> = z.object({ + domain: z.string(), + companyName: z.nullable(z.string()).optional(), + companyWebsite: z.nullable(z.string()).optional(), + companyTosUrl: z.nullable(z.string()).optional(), + greetingTitle: z.nullable(z.string()).optional(), + greetingBody: z.nullable(z.string()).optional(), + operationalMessage: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + conditionsNuncCondition: z.array(z.string()), + conditionsConditionId: z.array(z.string()), + componentsInfrastructureType: z.array(z.string()), + componentsInfrastructureId: z.array(z.string()), + primaryColor: z.nullable(z.string()).optional(), + secondaryColor: z.nullable(z.string()).optional(), + exposedFields: z.nullable(z.array(z.string())).optional(), + enableHistogram: z.nullable(z.boolean()).optional(), + uiVersion: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + companyName: "company_name", + companyWebsite: "company_website", + companyTosUrl: "company_tos_url", + greetingTitle: "greeting_title", + greetingBody: "greeting_body", + operationalMessage: "operational_message", + conditionsNuncCondition: "conditions[nunc_condition]", + conditionsConditionId: "conditions[condition_id]", + componentsInfrastructureType: "components[infrastructure_type]", + componentsInfrastructureId: "components[infrastructure_id]", + primaryColor: "primary_color", + secondaryColor: "secondary_color", + exposedFields: "exposed_fields", + enableHistogram: "enable_histogram", + uiVersion: "ui_version", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateNuncConnectionRequest$ { + /** @deprecated use `CreateNuncConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = CreateNuncConnectionRequest$inboundSchema; + /** @deprecated use `CreateNuncConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = CreateNuncConnectionRequest$outboundSchema; + /** @deprecated use `CreateNuncConnectionRequest$Outbound` instead. */ + export type Outbound = CreateNuncConnectionRequest$Outbound; +} + +export function createNuncConnectionRequestToJSON( + createNuncConnectionRequest: CreateNuncConnectionRequest, +): string { + return JSON.stringify( + CreateNuncConnectionRequest$outboundSchema.parse( + createNuncConnectionRequest, + ), + ); +} + +export function createNuncConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateNuncConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateNuncConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/createnunclink.ts b/src/models/operations/createnunclink.ts new file mode 100644 index 00000000..4b6d0d67 --- /dev/null +++ b/src/models/operations/createnunclink.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateNuncLinkRequest = { + nuncConnectionId: string; +}; + +/** @internal */ +export const CreateNuncLinkRequest$inboundSchema: z.ZodType< + CreateNuncLinkRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + }); +}); + +/** @internal */ +export type CreateNuncLinkRequest$Outbound = { + nunc_connection_id: string; +}; + +/** @internal */ +export const CreateNuncLinkRequest$outboundSchema: z.ZodType< + CreateNuncLinkRequest$Outbound, + z.ZodTypeDef, + CreateNuncLinkRequest +> = z.object({ + nuncConnectionId: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateNuncLinkRequest$ { + /** @deprecated use `CreateNuncLinkRequest$inboundSchema` instead. */ + export const inboundSchema = CreateNuncLinkRequest$inboundSchema; + /** @deprecated use `CreateNuncLinkRequest$outboundSchema` instead. */ + export const outboundSchema = CreateNuncLinkRequest$outboundSchema; + /** @deprecated use `CreateNuncLinkRequest$Outbound` instead. */ + export type Outbound = CreateNuncLinkRequest$Outbound; +} + +export function createNuncLinkRequestToJSON( + createNuncLinkRequest: CreateNuncLinkRequest, +): string { + return JSON.stringify( + CreateNuncLinkRequest$outboundSchema.parse(createNuncLinkRequest), + ); +} + +export function createNuncLinkRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateNuncLinkRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateNuncLinkRequest' from JSON`, + ); +} diff --git a/src/models/operations/createoncallshift.ts b/src/models/operations/createoncallshift.ts new file mode 100644 index 00000000..7dfdcb4c --- /dev/null +++ b/src/models/operations/createoncallshift.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateOnCallShiftRequest = { + teamId: string; + scheduleId: string; + createOnCallShift: components.CreateOnCallShift; +}; + +/** @internal */ +export const CreateOnCallShiftRequest$inboundSchema: z.ZodType< + CreateOnCallShiftRequest, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.string(), + schedule_id: z.string(), + create_on_call_shift: z.lazy(() => + components.CreateOnCallShift$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "schedule_id": "scheduleId", + "create_on_call_shift": "createOnCallShift", + }); +}); + +/** @internal */ +export type CreateOnCallShiftRequest$Outbound = { + team_id: string; + schedule_id: string; + create_on_call_shift: components.CreateOnCallShift$Outbound; +}; + +/** @internal */ +export const CreateOnCallShiftRequest$outboundSchema: z.ZodType< + CreateOnCallShiftRequest$Outbound, + z.ZodTypeDef, + CreateOnCallShiftRequest +> = z.object({ + teamId: z.string(), + scheduleId: z.string(), + createOnCallShift: z.lazy(() => components.CreateOnCallShift$outboundSchema), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + scheduleId: "schedule_id", + createOnCallShift: "create_on_call_shift", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateOnCallShiftRequest$ { + /** @deprecated use `CreateOnCallShiftRequest$inboundSchema` instead. */ + export const inboundSchema = CreateOnCallShiftRequest$inboundSchema; + /** @deprecated use `CreateOnCallShiftRequest$outboundSchema` instead. */ + export const outboundSchema = CreateOnCallShiftRequest$outboundSchema; + /** @deprecated use `CreateOnCallShiftRequest$Outbound` instead. */ + export type Outbound = CreateOnCallShiftRequest$Outbound; +} + +export function createOnCallShiftRequestToJSON( + createOnCallShiftRequest: CreateOnCallShiftRequest, +): string { + return JSON.stringify( + CreateOnCallShiftRequest$outboundSchema.parse(createOnCallShiftRequest), + ); +} + +export function createOnCallShiftRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateOnCallShiftRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateOnCallShiftRequest' from JSON`, + ); +} diff --git a/src/models/operations/createpostmortemreason.ts b/src/models/operations/createpostmortemreason.ts new file mode 100644 index 00000000..802d8681 --- /dev/null +++ b/src/models/operations/createpostmortemreason.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreatePostMortemReasonRequest = { + reportId: string; + createPostMortemReason: components.CreatePostMortemReason; +}; + +/** @internal */ +export const CreatePostMortemReasonRequest$inboundSchema: z.ZodType< + CreatePostMortemReasonRequest, + z.ZodTypeDef, + unknown +> = z.object({ + report_id: z.string(), + create_post_mortem_reason: z.lazy(() => + components.CreatePostMortemReason$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "report_id": "reportId", + "create_post_mortem_reason": "createPostMortemReason", + }); +}); + +/** @internal */ +export type CreatePostMortemReasonRequest$Outbound = { + report_id: string; + create_post_mortem_reason: components.CreatePostMortemReason$Outbound; +}; + +/** @internal */ +export const CreatePostMortemReasonRequest$outboundSchema: z.ZodType< + CreatePostMortemReasonRequest$Outbound, + z.ZodTypeDef, + CreatePostMortemReasonRequest +> = z.object({ + reportId: z.string(), + createPostMortemReason: z.lazy(() => + components.CreatePostMortemReason$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + reportId: "report_id", + createPostMortemReason: "create_post_mortem_reason", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreatePostMortemReasonRequest$ { + /** @deprecated use `CreatePostMortemReasonRequest$inboundSchema` instead. */ + export const inboundSchema = CreatePostMortemReasonRequest$inboundSchema; + /** @deprecated use `CreatePostMortemReasonRequest$outboundSchema` instead. */ + export const outboundSchema = CreatePostMortemReasonRequest$outboundSchema; + /** @deprecated use `CreatePostMortemReasonRequest$Outbound` instead. */ + export type Outbound = CreatePostMortemReasonRequest$Outbound; +} + +export function createPostMortemReasonRequestToJSON( + createPostMortemReasonRequest: CreatePostMortemReasonRequest, +): string { + return JSON.stringify( + CreatePostMortemReasonRequest$outboundSchema.parse( + createPostMortemReasonRequest, + ), + ); +} + +export function createPostMortemReasonRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreatePostMortemReasonRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreatePostMortemReasonRequest' from JSON`, + ); +} diff --git a/src/models/operations/createretrospectivereportreason.ts b/src/models/operations/createretrospectivereportreason.ts deleted file mode 100644 index 34509ff2..00000000 --- a/src/models/operations/createretrospectivereportreason.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateRetrospectiveReportReasonRequest = { - reportId: string; - postV1PostMortemsReportsReportIdReasons: - components.PostV1PostMortemsReportsReportIdReasons; -}; - -/** @internal */ -export const CreateRetrospectiveReportReasonRequest$inboundSchema: z.ZodType< - CreateRetrospectiveReportReasonRequest, - z.ZodTypeDef, - unknown -> = z.object({ - report_id: z.string(), - postV1PostMortemsReportsReportIdReasons: - components.PostV1PostMortemsReportsReportIdReasons$inboundSchema, -}).transform((v) => { - return remap$(v, { - "report_id": "reportId", - }); -}); - -/** @internal */ -export type CreateRetrospectiveReportReasonRequest$Outbound = { - report_id: string; - postV1PostMortemsReportsReportIdReasons: - components.PostV1PostMortemsReportsReportIdReasons$Outbound; -}; - -/** @internal */ -export const CreateRetrospectiveReportReasonRequest$outboundSchema: z.ZodType< - CreateRetrospectiveReportReasonRequest$Outbound, - z.ZodTypeDef, - CreateRetrospectiveReportReasonRequest -> = z.object({ - reportId: z.string(), - postV1PostMortemsReportsReportIdReasons: - components.PostV1PostMortemsReportsReportIdReasons$outboundSchema, -}).transform((v) => { - return remap$(v, { - reportId: "report_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateRetrospectiveReportReasonRequest$ { - /** @deprecated use `CreateRetrospectiveReportReasonRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateRetrospectiveReportReasonRequest$inboundSchema; - /** @deprecated use `CreateRetrospectiveReportReasonRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateRetrospectiveReportReasonRequest$outboundSchema; - /** @deprecated use `CreateRetrospectiveReportReasonRequest$Outbound` instead. */ - export type Outbound = CreateRetrospectiveReportReasonRequest$Outbound; -} - -export function createRetrospectiveReportReasonRequestToJSON( - createRetrospectiveReportReasonRequest: - CreateRetrospectiveReportReasonRequest, -): string { - return JSON.stringify( - CreateRetrospectiveReportReasonRequest$outboundSchema.parse( - createRetrospectiveReportReasonRequest, - ), - ); -} - -export function createRetrospectiveReportReasonRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateRetrospectiveReportReasonRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateRetrospectiveReportReasonRequest' from JSON`, - ); -} diff --git a/src/models/operations/createretrospectivetemplate.ts b/src/models/operations/createretrospectivetemplate.ts new file mode 100644 index 00000000..775cfd66 --- /dev/null +++ b/src/models/operations/createretrospectivetemplate.ts @@ -0,0 +1,202 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const SectionsSlug = { + Timeline: "timeline", + KeyData: "key_data", + Details: "details", + Resources: "resources", + Actions: "actions", +} as const; +export type SectionsSlug = ClosedEnum; + +export const CreateRetrospectiveTemplateFieldsType = { + Text: "text", + SingleSelect: "single_select", + MultiSelect: "multi_select", + Numeric: "numeric", + Datetime: "datetime", + DynamicInputGroup: "dynamic_input_group", + Markdown: "markdown", + MarkdownText: "markdown_text", +} as const; +export type CreateRetrospectiveTemplateFieldsType = ClosedEnum< + typeof CreateRetrospectiveTemplateFieldsType +>; + +export type CreateRetrospectiveTemplateRequest = { + name: string; + description: string; + isDefault?: boolean | null | undefined; + sectionsSlug: Array; + sectionsElements: Array; + fieldsLabel: Array; + fieldsType: Array; + fieldsHelpText?: Array | null | undefined; + fieldsPermissibleValues?: Array | null | undefined; + fieldsIsRequired?: Array | null | undefined; + fieldsSchema?: Array | null | undefined; +}; + +/** @internal */ +export const SectionsSlug$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(SectionsSlug); + +/** @internal */ +export const SectionsSlug$outboundSchema: z.ZodNativeEnum = + SectionsSlug$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SectionsSlug$ { + /** @deprecated use `SectionsSlug$inboundSchema` instead. */ + export const inboundSchema = SectionsSlug$inboundSchema; + /** @deprecated use `SectionsSlug$outboundSchema` instead. */ + export const outboundSchema = SectionsSlug$outboundSchema; +} + +/** @internal */ +export const CreateRetrospectiveTemplateFieldsType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + CreateRetrospectiveTemplateFieldsType, + ); + +/** @internal */ +export const CreateRetrospectiveTemplateFieldsType$outboundSchema: + z.ZodNativeEnum = + CreateRetrospectiveTemplateFieldsType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRetrospectiveTemplateFieldsType$ { + /** @deprecated use `CreateRetrospectiveTemplateFieldsType$inboundSchema` instead. */ + export const inboundSchema = + CreateRetrospectiveTemplateFieldsType$inboundSchema; + /** @deprecated use `CreateRetrospectiveTemplateFieldsType$outboundSchema` instead. */ + export const outboundSchema = + CreateRetrospectiveTemplateFieldsType$outboundSchema; +} + +/** @internal */ +export const CreateRetrospectiveTemplateRequest$inboundSchema: z.ZodType< + CreateRetrospectiveTemplateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.string(), + is_default: z.nullable(z.boolean()).optional(), + "sections[slug]": z.array(SectionsSlug$inboundSchema), + "sections[elements]": z.array(z.string()), + "fields[label]": z.array(z.string()), + "fields[type]": z.array(CreateRetrospectiveTemplateFieldsType$inboundSchema), + "fields[help_text]": z.nullable(z.array(z.string())).optional(), + "fields[permissible_values]": z.nullable(z.array(z.string())).optional(), + "fields[is_required]": z.nullable(z.array(z.boolean())).optional(), + "fields[schema]": z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "is_default": "isDefault", + "sections[slug]": "sectionsSlug", + "sections[elements]": "sectionsElements", + "fields[label]": "fieldsLabel", + "fields[type]": "fieldsType", + "fields[help_text]": "fieldsHelpText", + "fields[permissible_values]": "fieldsPermissibleValues", + "fields[is_required]": "fieldsIsRequired", + "fields[schema]": "fieldsSchema", + }); +}); + +/** @internal */ +export type CreateRetrospectiveTemplateRequest$Outbound = { + name: string; + description: string; + is_default?: boolean | null | undefined; + "sections[slug]": Array; + "sections[elements]": Array; + "fields[label]": Array; + "fields[type]": Array; + "fields[help_text]"?: Array | null | undefined; + "fields[permissible_values]"?: Array | null | undefined; + "fields[is_required]"?: Array | null | undefined; + "fields[schema]"?: Array | null | undefined; +}; + +/** @internal */ +export const CreateRetrospectiveTemplateRequest$outboundSchema: z.ZodType< + CreateRetrospectiveTemplateRequest$Outbound, + z.ZodTypeDef, + CreateRetrospectiveTemplateRequest +> = z.object({ + name: z.string(), + description: z.string(), + isDefault: z.nullable(z.boolean()).optional(), + sectionsSlug: z.array(SectionsSlug$outboundSchema), + sectionsElements: z.array(z.string()), + fieldsLabel: z.array(z.string()), + fieldsType: z.array(CreateRetrospectiveTemplateFieldsType$outboundSchema), + fieldsHelpText: z.nullable(z.array(z.string())).optional(), + fieldsPermissibleValues: z.nullable(z.array(z.string())).optional(), + fieldsIsRequired: z.nullable(z.array(z.boolean())).optional(), + fieldsSchema: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + isDefault: "is_default", + sectionsSlug: "sections[slug]", + sectionsElements: "sections[elements]", + fieldsLabel: "fields[label]", + fieldsType: "fields[type]", + fieldsHelpText: "fields[help_text]", + fieldsPermissibleValues: "fields[permissible_values]", + fieldsIsRequired: "fields[is_required]", + fieldsSchema: "fields[schema]", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateRetrospectiveTemplateRequest$ { + /** @deprecated use `CreateRetrospectiveTemplateRequest$inboundSchema` instead. */ + export const inboundSchema = CreateRetrospectiveTemplateRequest$inboundSchema; + /** @deprecated use `CreateRetrospectiveTemplateRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateRetrospectiveTemplateRequest$outboundSchema; + /** @deprecated use `CreateRetrospectiveTemplateRequest$Outbound` instead. */ + export type Outbound = CreateRetrospectiveTemplateRequest$Outbound; +} + +export function createRetrospectiveTemplateRequestToJSON( + createRetrospectiveTemplateRequest: CreateRetrospectiveTemplateRequest, +): string { + return JSON.stringify( + CreateRetrospectiveTemplateRequest$outboundSchema.parse( + createRetrospectiveTemplateRequest, + ), + ); +} + +export function createRetrospectiveTemplateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateRetrospectiveTemplateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateRetrospectiveTemplateRequest' from JSON`, + ); +} diff --git a/src/models/operations/createsavedsearch.ts b/src/models/operations/createsavedsearch.ts index 5eeba40b..591d12bf 100644 --- a/src/models/operations/createsavedsearch.ts +++ b/src/models/operations/createsavedsearch.ts @@ -10,7 +10,7 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const PathParamResourceType = { +export const CreateSavedSearchResourceType = { ChangeEvents: "change_events", Incidents: "incidents", Services: "services", @@ -22,32 +22,34 @@ export const PathParamResourceType = { Alerts: "alerts", IncidentEvents: "incident_events", } as const; -export type PathParamResourceType = ClosedEnum; +export type CreateSavedSearchResourceType = ClosedEnum< + typeof CreateSavedSearchResourceType +>; export type CreateSavedSearchRequest = { - resourceType: PathParamResourceType; - postV1SavedSearchesResourceType: components.PostV1SavedSearchesResourceType; + resourceType: CreateSavedSearchResourceType; + createSavedSearch: components.CreateSavedSearch; }; /** @internal */ -export const PathParamResourceType$inboundSchema: z.ZodNativeEnum< - typeof PathParamResourceType -> = z.nativeEnum(PathParamResourceType); +export const CreateSavedSearchResourceType$inboundSchema: z.ZodNativeEnum< + typeof CreateSavedSearchResourceType +> = z.nativeEnum(CreateSavedSearchResourceType); /** @internal */ -export const PathParamResourceType$outboundSchema: z.ZodNativeEnum< - typeof PathParamResourceType -> = PathParamResourceType$inboundSchema; +export const CreateSavedSearchResourceType$outboundSchema: z.ZodNativeEnum< + typeof CreateSavedSearchResourceType +> = CreateSavedSearchResourceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PathParamResourceType$ { - /** @deprecated use `PathParamResourceType$inboundSchema` instead. */ - export const inboundSchema = PathParamResourceType$inboundSchema; - /** @deprecated use `PathParamResourceType$outboundSchema` instead. */ - export const outboundSchema = PathParamResourceType$outboundSchema; +export namespace CreateSavedSearchResourceType$ { + /** @deprecated use `CreateSavedSearchResourceType$inboundSchema` instead. */ + export const inboundSchema = CreateSavedSearchResourceType$inboundSchema; + /** @deprecated use `CreateSavedSearchResourceType$outboundSchema` instead. */ + export const outboundSchema = CreateSavedSearchResourceType$outboundSchema; } /** @internal */ @@ -56,20 +58,19 @@ export const CreateSavedSearchRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - resource_type: PathParamResourceType$inboundSchema, - postV1SavedSearchesResourceType: - components.PostV1SavedSearchesResourceType$inboundSchema, + resource_type: CreateSavedSearchResourceType$inboundSchema, + create_saved_search: z.lazy(() => components.CreateSavedSearch$inboundSchema), }).transform((v) => { return remap$(v, { "resource_type": "resourceType", + "create_saved_search": "createSavedSearch", }); }); /** @internal */ export type CreateSavedSearchRequest$Outbound = { resource_type: string; - postV1SavedSearchesResourceType: - components.PostV1SavedSearchesResourceType$Outbound; + create_saved_search: components.CreateSavedSearch$Outbound; }; /** @internal */ @@ -78,12 +79,12 @@ export const CreateSavedSearchRequest$outboundSchema: z.ZodType< z.ZodTypeDef, CreateSavedSearchRequest > = z.object({ - resourceType: PathParamResourceType$outboundSchema, - postV1SavedSearchesResourceType: - components.PostV1SavedSearchesResourceType$outboundSchema, + resourceType: CreateSavedSearchResourceType$outboundSchema, + createSavedSearch: z.lazy(() => components.CreateSavedSearch$outboundSchema), }).transform((v) => { return remap$(v, { resourceType: "resource_type", + createSavedSearch: "create_saved_search", }); }); diff --git a/src/models/operations/createservicechecklistresponse.ts b/src/models/operations/createservicechecklistresponse.ts index ca0a1823..773d8ee4 100644 --- a/src/models/operations/createservicechecklistresponse.ts +++ b/src/models/operations/createservicechecklistresponse.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateServiceChecklistResponseRequest = { serviceId: string; checklistId: string; - postV1ServicesServiceIdChecklistResponseChecklistId: - components.PostV1ServicesServiceIdChecklistResponseChecklistId; + createServiceChecklistResponse: components.CreateServiceChecklistResponse; }; /** @internal */ @@ -24,13 +23,14 @@ export const CreateServiceChecklistResponseRequest$inboundSchema: z.ZodType< > = z.object({ service_id: z.string(), checklist_id: z.string(), - postV1ServicesServiceIdChecklistResponseChecklistId: - components - .PostV1ServicesServiceIdChecklistResponseChecklistId$inboundSchema, + create_service_checklist_response: z.lazy(() => + components.CreateServiceChecklistResponse$inboundSchema + ), }).transform((v) => { return remap$(v, { "service_id": "serviceId", "checklist_id": "checklistId", + "create_service_checklist_response": "createServiceChecklistResponse", }); }); @@ -38,8 +38,8 @@ export const CreateServiceChecklistResponseRequest$inboundSchema: z.ZodType< export type CreateServiceChecklistResponseRequest$Outbound = { service_id: string; checklist_id: string; - postV1ServicesServiceIdChecklistResponseChecklistId: - components.PostV1ServicesServiceIdChecklistResponseChecklistId$Outbound; + create_service_checklist_response: + components.CreateServiceChecklistResponse$Outbound; }; /** @internal */ @@ -50,13 +50,14 @@ export const CreateServiceChecklistResponseRequest$outboundSchema: z.ZodType< > = z.object({ serviceId: z.string(), checklistId: z.string(), - postV1ServicesServiceIdChecklistResponseChecklistId: - components - .PostV1ServicesServiceIdChecklistResponseChecklistId$outboundSchema, + createServiceChecklistResponse: z.lazy(() => + components.CreateServiceChecklistResponse$outboundSchema + ), }).transform((v) => { return remap$(v, { serviceId: "service_id", checklistId: "checklist_id", + createServiceChecklistResponse: "create_service_checklist_response", }); }); diff --git a/src/models/operations/createslackemojiaction.ts b/src/models/operations/createslackemojiaction.ts index 298df2cb..29af6af0 100644 --- a/src/models/operations/createslackemojiaction.ts +++ b/src/models/operations/createslackemojiaction.ts @@ -16,7 +16,7 @@ export type CreateSlackEmojiActionRequestBody = { /** * The ID of the incident type to associate with this emoji action */ - incidentTypeId?: string | undefined; + incidentTypeId?: string | null | undefined; }; export type CreateSlackEmojiActionRequest = { @@ -34,7 +34,7 @@ export const CreateSlackEmojiActionRequestBody$inboundSchema: z.ZodType< unknown > = z.object({ emoji_name: z.string(), - incident_type_id: z.string().optional(), + incident_type_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "emoji_name": "emojiName", @@ -45,7 +45,7 @@ export const CreateSlackEmojiActionRequestBody$inboundSchema: z.ZodType< /** @internal */ export type CreateSlackEmojiActionRequestBody$Outbound = { emoji_name: string; - incident_type_id?: string | undefined; + incident_type_id?: string | null | undefined; }; /** @internal */ @@ -55,7 +55,7 @@ export const CreateSlackEmojiActionRequestBody$outboundSchema: z.ZodType< CreateSlackEmojiActionRequestBody > = z.object({ emojiName: z.string(), - incidentTypeId: z.string().optional(), + incidentTypeId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { emojiName: "emoji_name", diff --git a/src/models/operations/createstatuspage.ts b/src/models/operations/createstatuspage.ts deleted file mode 100644 index 5e8b8ea3..00000000 --- a/src/models/operations/createstatuspage.ts +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateStatusPageRequestBody = { - domain: string; - companyName?: string | undefined; - companyWebsite?: string | undefined; - companyTosUrl?: string | undefined; - greetingTitle?: string | undefined; - greetingBody?: string | undefined; - operationalMessage?: string | undefined; - title?: string | undefined; - /** - * Status page condition to map your severity matrix condition to - */ - conditionsNuncCondition: Array; - /** - * Severity matrix condition id - */ - conditionsConditionId: Array; - componentsInfrastructureType: Array; - componentsInfrastructureId: Array; - primaryColor?: string | undefined; - secondaryColor?: string | undefined; - exposedFields?: Array | undefined; - enableHistogram?: boolean | undefined; - uiVersion?: number | undefined; -}; - -/** @internal */ -export const CreateStatusPageRequestBody$inboundSchema: z.ZodType< - CreateStatusPageRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - domain: z.string(), - company_name: z.string().optional(), - company_website: z.string().optional(), - company_tos_url: z.string().optional(), - greeting_title: z.string().optional(), - greeting_body: z.string().optional(), - operational_message: z.string().optional(), - title: z.string().optional(), - "conditions[nunc_condition]": z.array(z.string()), - "conditions[condition_id]": z.array(z.string()), - "components[infrastructure_type]": z.array(z.string()), - "components[infrastructure_id]": z.array(z.string()), - primary_color: z.string().optional(), - secondary_color: z.string().optional(), - exposed_fields: z.array(z.string()).optional(), - enable_histogram: z.boolean().optional(), - ui_version: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "company_name": "companyName", - "company_website": "companyWebsite", - "company_tos_url": "companyTosUrl", - "greeting_title": "greetingTitle", - "greeting_body": "greetingBody", - "operational_message": "operationalMessage", - "conditions[nunc_condition]": "conditionsNuncCondition", - "conditions[condition_id]": "conditionsConditionId", - "components[infrastructure_type]": "componentsInfrastructureType", - "components[infrastructure_id]": "componentsInfrastructureId", - "primary_color": "primaryColor", - "secondary_color": "secondaryColor", - "exposed_fields": "exposedFields", - "enable_histogram": "enableHistogram", - "ui_version": "uiVersion", - }); -}); - -/** @internal */ -export type CreateStatusPageRequestBody$Outbound = { - domain: string; - company_name?: string | undefined; - company_website?: string | undefined; - company_tos_url?: string | undefined; - greeting_title?: string | undefined; - greeting_body?: string | undefined; - operational_message?: string | undefined; - title?: string | undefined; - "conditions[nunc_condition]": Array; - "conditions[condition_id]": Array; - "components[infrastructure_type]": Array; - "components[infrastructure_id]": Array; - primary_color?: string | undefined; - secondary_color?: string | undefined; - exposed_fields?: Array | undefined; - enable_histogram?: boolean | undefined; - ui_version?: number | undefined; -}; - -/** @internal */ -export const CreateStatusPageRequestBody$outboundSchema: z.ZodType< - CreateStatusPageRequestBody$Outbound, - z.ZodTypeDef, - CreateStatusPageRequestBody -> = z.object({ - domain: z.string(), - companyName: z.string().optional(), - companyWebsite: z.string().optional(), - companyTosUrl: z.string().optional(), - greetingTitle: z.string().optional(), - greetingBody: z.string().optional(), - operationalMessage: z.string().optional(), - title: z.string().optional(), - conditionsNuncCondition: z.array(z.string()), - conditionsConditionId: z.array(z.string()), - componentsInfrastructureType: z.array(z.string()), - componentsInfrastructureId: z.array(z.string()), - primaryColor: z.string().optional(), - secondaryColor: z.string().optional(), - exposedFields: z.array(z.string()).optional(), - enableHistogram: z.boolean().optional(), - uiVersion: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - companyName: "company_name", - companyWebsite: "company_website", - companyTosUrl: "company_tos_url", - greetingTitle: "greeting_title", - greetingBody: "greeting_body", - operationalMessage: "operational_message", - conditionsNuncCondition: "conditions[nunc_condition]", - conditionsConditionId: "conditions[condition_id]", - componentsInfrastructureType: "components[infrastructure_type]", - componentsInfrastructureId: "components[infrastructure_id]", - primaryColor: "primary_color", - secondaryColor: "secondary_color", - exposedFields: "exposed_fields", - enableHistogram: "enable_histogram", - uiVersion: "ui_version", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateStatusPageRequestBody$ { - /** @deprecated use `CreateStatusPageRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateStatusPageRequestBody$inboundSchema; - /** @deprecated use `CreateStatusPageRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateStatusPageRequestBody$outboundSchema; - /** @deprecated use `CreateStatusPageRequestBody$Outbound` instead. */ - export type Outbound = CreateStatusPageRequestBody$Outbound; -} - -export function createStatusPageRequestBodyToJSON( - createStatusPageRequestBody: CreateStatusPageRequestBody, -): string { - return JSON.stringify( - CreateStatusPageRequestBody$outboundSchema.parse( - createStatusPageRequestBody, - ), - ); -} - -export function createStatusPageRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateStatusPageRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateStatusPageRequestBody' from JSON`, - ); -} diff --git a/src/models/operations/createstatuspagecomponentgroup.ts b/src/models/operations/createstatuspagecomponentgroup.ts deleted file mode 100644 index 6ac1c3aa..00000000 --- a/src/models/operations/createstatuspagecomponentgroup.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateStatusPageComponentGroupRequestBody = { - name: string; - componentGroupId?: string | undefined; - position?: number | undefined; -}; - -export type CreateStatusPageComponentGroupRequest = { - nuncConnectionId: string; - requestBody: CreateStatusPageComponentGroupRequestBody; -}; - -/** @internal */ -export const CreateStatusPageComponentGroupRequestBody$inboundSchema: z.ZodType< - CreateStatusPageComponentGroupRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - component_group_id: z.string().optional(), - position: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "component_group_id": "componentGroupId", - }); -}); - -/** @internal */ -export type CreateStatusPageComponentGroupRequestBody$Outbound = { - name: string; - component_group_id?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const CreateStatusPageComponentGroupRequestBody$outboundSchema: - z.ZodType< - CreateStatusPageComponentGroupRequestBody$Outbound, - z.ZodTypeDef, - CreateStatusPageComponentGroupRequestBody - > = z.object({ - name: z.string(), - componentGroupId: z.string().optional(), - position: z.number().int().optional(), - }).transform((v) => { - return remap$(v, { - componentGroupId: "component_group_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateStatusPageComponentGroupRequestBody$ { - /** @deprecated use `CreateStatusPageComponentGroupRequestBody$inboundSchema` instead. */ - export const inboundSchema = - CreateStatusPageComponentGroupRequestBody$inboundSchema; - /** @deprecated use `CreateStatusPageComponentGroupRequestBody$outboundSchema` instead. */ - export const outboundSchema = - CreateStatusPageComponentGroupRequestBody$outboundSchema; - /** @deprecated use `CreateStatusPageComponentGroupRequestBody$Outbound` instead. */ - export type Outbound = CreateStatusPageComponentGroupRequestBody$Outbound; -} - -export function createStatusPageComponentGroupRequestBodyToJSON( - createStatusPageComponentGroupRequestBody: - CreateStatusPageComponentGroupRequestBody, -): string { - return JSON.stringify( - CreateStatusPageComponentGroupRequestBody$outboundSchema.parse( - createStatusPageComponentGroupRequestBody, - ), - ); -} - -export function createStatusPageComponentGroupRequestBodyFromJSON( - jsonString: string, -): SafeParseResult< - CreateStatusPageComponentGroupRequestBody, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CreateStatusPageComponentGroupRequestBody$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CreateStatusPageComponentGroupRequestBody' from JSON`, - ); -} - -/** @internal */ -export const CreateStatusPageComponentGroupRequest$inboundSchema: z.ZodType< - CreateStatusPageComponentGroupRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - RequestBody: z.lazy(() => - CreateStatusPageComponentGroupRequestBody$inboundSchema - ), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type CreateStatusPageComponentGroupRequest$Outbound = { - nunc_connection_id: string; - RequestBody: CreateStatusPageComponentGroupRequestBody$Outbound; -}; - -/** @internal */ -export const CreateStatusPageComponentGroupRequest$outboundSchema: z.ZodType< - CreateStatusPageComponentGroupRequest$Outbound, - z.ZodTypeDef, - CreateStatusPageComponentGroupRequest -> = z.object({ - nuncConnectionId: z.string(), - requestBody: z.lazy(() => - CreateStatusPageComponentGroupRequestBody$outboundSchema - ), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateStatusPageComponentGroupRequest$ { - /** @deprecated use `CreateStatusPageComponentGroupRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateStatusPageComponentGroupRequest$inboundSchema; - /** @deprecated use `CreateStatusPageComponentGroupRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateStatusPageComponentGroupRequest$outboundSchema; - /** @deprecated use `CreateStatusPageComponentGroupRequest$Outbound` instead. */ - export type Outbound = CreateStatusPageComponentGroupRequest$Outbound; -} - -export function createStatusPageComponentGroupRequestToJSON( - createStatusPageComponentGroupRequest: CreateStatusPageComponentGroupRequest, -): string { - return JSON.stringify( - CreateStatusPageComponentGroupRequest$outboundSchema.parse( - createStatusPageComponentGroupRequest, - ), - ); -} - -export function createStatusPageComponentGroupRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateStatusPageComponentGroupRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateStatusPageComponentGroupRequest' from JSON`, - ); -} diff --git a/src/models/operations/createstatuspagelink.ts b/src/models/operations/createstatuspagelink.ts deleted file mode 100644 index 3f81bf15..00000000 --- a/src/models/operations/createstatuspagelink.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateStatusPageLinkRequest = { - nuncConnectionId: string; -}; - -/** @internal */ -export const CreateStatusPageLinkRequest$inboundSchema: z.ZodType< - CreateStatusPageLinkRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - }); -}); - -/** @internal */ -export type CreateStatusPageLinkRequest$Outbound = { - nunc_connection_id: string; -}; - -/** @internal */ -export const CreateStatusPageLinkRequest$outboundSchema: z.ZodType< - CreateStatusPageLinkRequest$Outbound, - z.ZodTypeDef, - CreateStatusPageLinkRequest -> = z.object({ - nuncConnectionId: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateStatusPageLinkRequest$ { - /** @deprecated use `CreateStatusPageLinkRequest$inboundSchema` instead. */ - export const inboundSchema = CreateStatusPageLinkRequest$inboundSchema; - /** @deprecated use `CreateStatusPageLinkRequest$outboundSchema` instead. */ - export const outboundSchema = CreateStatusPageLinkRequest$outboundSchema; - /** @deprecated use `CreateStatusPageLinkRequest$Outbound` instead. */ - export type Outbound = CreateStatusPageLinkRequest$Outbound; -} - -export function createStatusPageLinkRequestToJSON( - createStatusPageLinkRequest: CreateStatusPageLinkRequest, -): string { - return JSON.stringify( - CreateStatusPageLinkRequest$outboundSchema.parse( - createStatusPageLinkRequest, - ), - ); -} - -export function createStatusPageLinkRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateStatusPageLinkRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateStatusPageLinkRequest' from JSON`, - ); -} diff --git a/src/models/operations/createstatuspagesubscribers.ts b/src/models/operations/createstatuspagesubscribers.ts deleted file mode 100644 index 9b99cab6..00000000 --- a/src/models/operations/createstatuspagesubscribers.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateStatusPageSubscribersRequestBody = { - /** - * A comma-separated list of emails to subscribe. - */ - emails: string; -}; - -export type CreateStatusPageSubscribersRequest = { - nuncConnectionId: string; - requestBody: CreateStatusPageSubscribersRequestBody; -}; - -/** @internal */ -export const CreateStatusPageSubscribersRequestBody$inboundSchema: z.ZodType< - CreateStatusPageSubscribersRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - emails: z.string(), -}); - -/** @internal */ -export type CreateStatusPageSubscribersRequestBody$Outbound = { - emails: string; -}; - -/** @internal */ -export const CreateStatusPageSubscribersRequestBody$outboundSchema: z.ZodType< - CreateStatusPageSubscribersRequestBody$Outbound, - z.ZodTypeDef, - CreateStatusPageSubscribersRequestBody -> = z.object({ - emails: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateStatusPageSubscribersRequestBody$ { - /** @deprecated use `CreateStatusPageSubscribersRequestBody$inboundSchema` instead. */ - export const inboundSchema = - CreateStatusPageSubscribersRequestBody$inboundSchema; - /** @deprecated use `CreateStatusPageSubscribersRequestBody$outboundSchema` instead. */ - export const outboundSchema = - CreateStatusPageSubscribersRequestBody$outboundSchema; - /** @deprecated use `CreateStatusPageSubscribersRequestBody$Outbound` instead. */ - export type Outbound = CreateStatusPageSubscribersRequestBody$Outbound; -} - -export function createStatusPageSubscribersRequestBodyToJSON( - createStatusPageSubscribersRequestBody: - CreateStatusPageSubscribersRequestBody, -): string { - return JSON.stringify( - CreateStatusPageSubscribersRequestBody$outboundSchema.parse( - createStatusPageSubscribersRequestBody, - ), - ); -} - -export function createStatusPageSubscribersRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateStatusPageSubscribersRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateStatusPageSubscribersRequestBody' from JSON`, - ); -} - -/** @internal */ -export const CreateStatusPageSubscribersRequest$inboundSchema: z.ZodType< - CreateStatusPageSubscribersRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - RequestBody: z.lazy(() => - CreateStatusPageSubscribersRequestBody$inboundSchema - ), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type CreateStatusPageSubscribersRequest$Outbound = { - nunc_connection_id: string; - RequestBody: CreateStatusPageSubscribersRequestBody$Outbound; -}; - -/** @internal */ -export const CreateStatusPageSubscribersRequest$outboundSchema: z.ZodType< - CreateStatusPageSubscribersRequest$Outbound, - z.ZodTypeDef, - CreateStatusPageSubscribersRequest -> = z.object({ - nuncConnectionId: z.string(), - requestBody: z.lazy(() => - CreateStatusPageSubscribersRequestBody$outboundSchema - ), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateStatusPageSubscribersRequest$ { - /** @deprecated use `CreateStatusPageSubscribersRequest$inboundSchema` instead. */ - export const inboundSchema = CreateStatusPageSubscribersRequest$inboundSchema; - /** @deprecated use `CreateStatusPageSubscribersRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateStatusPageSubscribersRequest$outboundSchema; - /** @deprecated use `CreateStatusPageSubscribersRequest$Outbound` instead. */ - export type Outbound = CreateStatusPageSubscribersRequest$Outbound; -} - -export function createStatusPageSubscribersRequestToJSON( - createStatusPageSubscribersRequest: CreateStatusPageSubscribersRequest, -): string { - return JSON.stringify( - CreateStatusPageSubscribersRequest$outboundSchema.parse( - createStatusPageSubscribersRequest, - ), - ); -} - -export function createStatusPageSubscribersRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateStatusPageSubscribersRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateStatusPageSubscribersRequest' from JSON`, - ); -} diff --git a/src/models/operations/createteamescalationpolicy.ts b/src/models/operations/createteamescalationpolicy.ts index ba21ad6e..a5430954 100644 --- a/src/models/operations/createteamescalationpolicy.ts +++ b/src/models/operations/createteamescalationpolicy.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateTeamEscalationPolicyRequest = { teamId: string; - postV1TeamsTeamIdEscalationPolicies: - components.PostV1TeamsTeamIdEscalationPolicies; + createTeamEscalationPolicy: components.CreateTeamEscalationPolicy; }; /** @internal */ @@ -22,19 +21,20 @@ export const CreateTeamEscalationPolicyRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - postV1TeamsTeamIdEscalationPolicies: - components.PostV1TeamsTeamIdEscalationPolicies$inboundSchema, + create_team_escalation_policy: z.lazy(() => + components.CreateTeamEscalationPolicy$inboundSchema + ), }).transform((v) => { return remap$(v, { "team_id": "teamId", + "create_team_escalation_policy": "createTeamEscalationPolicy", }); }); /** @internal */ export type CreateTeamEscalationPolicyRequest$Outbound = { team_id: string; - postV1TeamsTeamIdEscalationPolicies: - components.PostV1TeamsTeamIdEscalationPolicies$Outbound; + create_team_escalation_policy: components.CreateTeamEscalationPolicy$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const CreateTeamEscalationPolicyRequest$outboundSchema: z.ZodType< CreateTeamEscalationPolicyRequest > = z.object({ teamId: z.string(), - postV1TeamsTeamIdEscalationPolicies: - components.PostV1TeamsTeamIdEscalationPolicies$outboundSchema, + createTeamEscalationPolicy: z.lazy(() => + components.CreateTeamEscalationPolicy$outboundSchema + ), }).transform((v) => { return remap$(v, { teamId: "team_id", + createTeamEscalationPolicy: "create_team_escalation_policy", }); }); diff --git a/src/models/operations/createteamoncallschedule.ts b/src/models/operations/createteamoncallschedule.ts index 680d4215..f211edbb 100644 --- a/src/models/operations/createteamoncallschedule.ts +++ b/src/models/operations/createteamoncallschedule.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateTeamOnCallScheduleRequest = { teamId: string; - postV1TeamsTeamIdOnCallSchedules: components.PostV1TeamsTeamIdOnCallSchedules; + createTeamOnCallSchedule: components.CreateTeamOnCallSchedule; }; /** @internal */ @@ -21,19 +21,20 @@ export const CreateTeamOnCallScheduleRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - postV1TeamsTeamIdOnCallSchedules: - components.PostV1TeamsTeamIdOnCallSchedules$inboundSchema, + create_team_on_call_schedule: z.lazy(() => + components.CreateTeamOnCallSchedule$inboundSchema + ), }).transform((v) => { return remap$(v, { "team_id": "teamId", + "create_team_on_call_schedule": "createTeamOnCallSchedule", }); }); /** @internal */ export type CreateTeamOnCallScheduleRequest$Outbound = { team_id: string; - postV1TeamsTeamIdOnCallSchedules: - components.PostV1TeamsTeamIdOnCallSchedules$Outbound; + create_team_on_call_schedule: components.CreateTeamOnCallSchedule$Outbound; }; /** @internal */ @@ -43,11 +44,13 @@ export const CreateTeamOnCallScheduleRequest$outboundSchema: z.ZodType< CreateTeamOnCallScheduleRequest > = z.object({ teamId: z.string(), - postV1TeamsTeamIdOnCallSchedules: - components.PostV1TeamsTeamIdOnCallSchedules$outboundSchema, + createTeamOnCallSchedule: z.lazy(() => + components.CreateTeamOnCallSchedule$outboundSchema + ), }).transform((v) => { return remap$(v, { teamId: "team_id", + createTeamOnCallSchedule: "create_team_on_call_schedule", }); }); diff --git a/src/models/operations/createteamoncallscheduleshift.ts b/src/models/operations/createteamoncallscheduleshift.ts deleted file mode 100644 index 7bbf816f..00000000 --- a/src/models/operations/createteamoncallscheduleshift.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateTeamOnCallScheduleShiftRequest = { - teamId: string; - scheduleId: string; - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: - components.PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts; -}; - -/** @internal */ -export const CreateTeamOnCallScheduleShiftRequest$inboundSchema: z.ZodType< - CreateTeamOnCallScheduleShiftRequest, - z.ZodTypeDef, - unknown -> = z.object({ - team_id: z.string(), - schedule_id: z.string(), - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: - components.PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$inboundSchema, -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "schedule_id": "scheduleId", - }); -}); - -/** @internal */ -export type CreateTeamOnCallScheduleShiftRequest$Outbound = { - team_id: string; - schedule_id: string; - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: - components.PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$Outbound; -}; - -/** @internal */ -export const CreateTeamOnCallScheduleShiftRequest$outboundSchema: z.ZodType< - CreateTeamOnCallScheduleShiftRequest$Outbound, - z.ZodTypeDef, - CreateTeamOnCallScheduleShiftRequest -> = z.object({ - teamId: z.string(), - scheduleId: z.string(), - postV1TeamsTeamIdOnCallSchedulesScheduleIdShifts: - components.PostV1TeamsTeamIdOnCallSchedulesScheduleIdShifts$outboundSchema, -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - scheduleId: "schedule_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateTeamOnCallScheduleShiftRequest$ { - /** @deprecated use `CreateTeamOnCallScheduleShiftRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateTeamOnCallScheduleShiftRequest$inboundSchema; - /** @deprecated use `CreateTeamOnCallScheduleShiftRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateTeamOnCallScheduleShiftRequest$outboundSchema; - /** @deprecated use `CreateTeamOnCallScheduleShiftRequest$Outbound` instead. */ - export type Outbound = CreateTeamOnCallScheduleShiftRequest$Outbound; -} - -export function createTeamOnCallScheduleShiftRequestToJSON( - createTeamOnCallScheduleShiftRequest: CreateTeamOnCallScheduleShiftRequest, -): string { - return JSON.stringify( - CreateTeamOnCallScheduleShiftRequest$outboundSchema.parse( - createTeamOnCallScheduleShiftRequest, - ), - ); -} - -export function createTeamOnCallScheduleShiftRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateTeamOnCallScheduleShiftRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateTeamOnCallScheduleShiftRequest' from JSON`, - ); -} diff --git a/src/models/operations/createteamsignalrule.ts b/src/models/operations/createteamsignalrule.ts index 8bc642f4..9d582cd7 100644 --- a/src/models/operations/createteamsignalrule.ts +++ b/src/models/operations/createteamsignalrule.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateTeamSignalRuleRequest = { teamId: string; - postV1TeamsTeamIdSignalRules: components.PostV1TeamsTeamIdSignalRules; + createTeamSignalRule: components.CreateTeamSignalRule; }; /** @internal */ @@ -21,19 +21,20 @@ export const CreateTeamSignalRuleRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - postV1TeamsTeamIdSignalRules: - components.PostV1TeamsTeamIdSignalRules$inboundSchema, + create_team_signal_rule: z.lazy(() => + components.CreateTeamSignalRule$inboundSchema + ), }).transform((v) => { return remap$(v, { "team_id": "teamId", + "create_team_signal_rule": "createTeamSignalRule", }); }); /** @internal */ export type CreateTeamSignalRuleRequest$Outbound = { team_id: string; - postV1TeamsTeamIdSignalRules: - components.PostV1TeamsTeamIdSignalRules$Outbound; + create_team_signal_rule: components.CreateTeamSignalRule$Outbound; }; /** @internal */ @@ -43,11 +44,13 @@ export const CreateTeamSignalRuleRequest$outboundSchema: z.ZodType< CreateTeamSignalRuleRequest > = z.object({ teamId: z.string(), - postV1TeamsTeamIdSignalRules: - components.PostV1TeamsTeamIdSignalRules$outboundSchema, + createTeamSignalRule: z.lazy(() => + components.CreateTeamSignalRule$outboundSchema + ), }).transform((v) => { return remap$(v, { teamId: "team_id", + createTeamSignalRule: "create_team_signal_rule", }); }); diff --git a/src/models/operations/createticketingfieldmap.ts b/src/models/operations/createticketingfieldmap.ts new file mode 100644 index 00000000..b104bf5b --- /dev/null +++ b/src/models/operations/createticketingfieldmap.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateTicketingFieldMapRequest = { + ticketingProjectId: string; +}; + +/** @internal */ +export const CreateTicketingFieldMapRequest$inboundSchema: z.ZodType< + CreateTicketingFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type CreateTicketingFieldMapRequest$Outbound = { + ticketing_project_id: string; +}; + +/** @internal */ +export const CreateTicketingFieldMapRequest$outboundSchema: z.ZodType< + CreateTicketingFieldMapRequest$Outbound, + z.ZodTypeDef, + CreateTicketingFieldMapRequest +> = z.object({ + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTicketingFieldMapRequest$ { + /** @deprecated use `CreateTicketingFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = CreateTicketingFieldMapRequest$inboundSchema; + /** @deprecated use `CreateTicketingFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = CreateTicketingFieldMapRequest$outboundSchema; + /** @deprecated use `CreateTicketingFieldMapRequest$Outbound` instead. */ + export type Outbound = CreateTicketingFieldMapRequest$Outbound; +} + +export function createTicketingFieldMapRequestToJSON( + createTicketingFieldMapRequest: CreateTicketingFieldMapRequest, +): string { + return JSON.stringify( + CreateTicketingFieldMapRequest$outboundSchema.parse( + createTicketingFieldMapRequest, + ), + ); +} + +export function createTicketingFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateTicketingFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTicketingFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/createticketingprojectconfig.ts b/src/models/operations/createticketingprojectconfig.ts new file mode 100644 index 00000000..f8811f3f --- /dev/null +++ b/src/models/operations/createticketingprojectconfig.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateTicketingProjectConfigRequest = { + ticketingProjectId: string; +}; + +/** @internal */ +export const CreateTicketingProjectConfigRequest$inboundSchema: z.ZodType< + CreateTicketingProjectConfigRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type CreateTicketingProjectConfigRequest$Outbound = { + ticketing_project_id: string; +}; + +/** @internal */ +export const CreateTicketingProjectConfigRequest$outboundSchema: z.ZodType< + CreateTicketingProjectConfigRequest$Outbound, + z.ZodTypeDef, + CreateTicketingProjectConfigRequest +> = z.object({ + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateTicketingProjectConfigRequest$ { + /** @deprecated use `CreateTicketingProjectConfigRequest$inboundSchema` instead. */ + export const inboundSchema = + CreateTicketingProjectConfigRequest$inboundSchema; + /** @deprecated use `CreateTicketingProjectConfigRequest$outboundSchema` instead. */ + export const outboundSchema = + CreateTicketingProjectConfigRequest$outboundSchema; + /** @deprecated use `CreateTicketingProjectConfigRequest$Outbound` instead. */ + export type Outbound = CreateTicketingProjectConfigRequest$Outbound; +} + +export function createTicketingProjectConfigRequestToJSON( + createTicketingProjectConfigRequest: CreateTicketingProjectConfigRequest, +): string { + return JSON.stringify( + CreateTicketingProjectConfigRequest$outboundSchema.parse( + createTicketingProjectConfigRequest, + ), + ); +} + +export function createTicketingProjectConfigRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + CreateTicketingProjectConfigRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateTicketingProjectConfigRequest' from JSON`, + ); +} diff --git a/src/models/operations/createticketingprojectconfiguration.ts b/src/models/operations/createticketingprojectconfiguration.ts deleted file mode 100644 index fddc843e..00000000 --- a/src/models/operations/createticketingprojectconfiguration.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateTicketingProjectConfigurationRequest = { - ticketingProjectId: string; -}; - -/** @internal */ -export const CreateTicketingProjectConfigurationRequest$inboundSchema: - z.ZodType = - z.object({ - ticketing_project_id: z.string(), - }).transform((v) => { - return remap$(v, { - "ticketing_project_id": "ticketingProjectId", - }); - }); - -/** @internal */ -export type CreateTicketingProjectConfigurationRequest$Outbound = { - ticketing_project_id: string; -}; - -/** @internal */ -export const CreateTicketingProjectConfigurationRequest$outboundSchema: - z.ZodType< - CreateTicketingProjectConfigurationRequest$Outbound, - z.ZodTypeDef, - CreateTicketingProjectConfigurationRequest - > = z.object({ - ticketingProjectId: z.string(), - }).transform((v) => { - return remap$(v, { - ticketingProjectId: "ticketing_project_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateTicketingProjectConfigurationRequest$ { - /** @deprecated use `CreateTicketingProjectConfigurationRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateTicketingProjectConfigurationRequest$inboundSchema; - /** @deprecated use `CreateTicketingProjectConfigurationRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateTicketingProjectConfigurationRequest$outboundSchema; - /** @deprecated use `CreateTicketingProjectConfigurationRequest$Outbound` instead. */ - export type Outbound = CreateTicketingProjectConfigurationRequest$Outbound; -} - -export function createTicketingProjectConfigurationRequestToJSON( - createTicketingProjectConfigurationRequest: - CreateTicketingProjectConfigurationRequest, -): string { - return JSON.stringify( - CreateTicketingProjectConfigurationRequest$outboundSchema.parse( - createTicketingProjectConfigurationRequest, - ), - ); -} - -export function createTicketingProjectConfigurationRequestFromJSON( - jsonString: string, -): SafeParseResult< - CreateTicketingProjectConfigurationRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CreateTicketingProjectConfigurationRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CreateTicketingProjectConfigurationRequest' from JSON`, - ); -} diff --git a/src/models/operations/createticketingprojectfieldmap.ts b/src/models/operations/createticketingprojectfieldmap.ts deleted file mode 100644 index 20a70243..00000000 --- a/src/models/operations/createticketingprojectfieldmap.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type CreateTicketingProjectFieldMapRequest = { - ticketingProjectId: string; -}; - -/** @internal */ -export const CreateTicketingProjectFieldMapRequest$inboundSchema: z.ZodType< - CreateTicketingProjectFieldMapRequest, - z.ZodTypeDef, - unknown -> = z.object({ - ticketing_project_id: z.string(), -}).transform((v) => { - return remap$(v, { - "ticketing_project_id": "ticketingProjectId", - }); -}); - -/** @internal */ -export type CreateTicketingProjectFieldMapRequest$Outbound = { - ticketing_project_id: string; -}; - -/** @internal */ -export const CreateTicketingProjectFieldMapRequest$outboundSchema: z.ZodType< - CreateTicketingProjectFieldMapRequest$Outbound, - z.ZodTypeDef, - CreateTicketingProjectFieldMapRequest -> = z.object({ - ticketingProjectId: z.string(), -}).transform((v) => { - return remap$(v, { - ticketingProjectId: "ticketing_project_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateTicketingProjectFieldMapRequest$ { - /** @deprecated use `CreateTicketingProjectFieldMapRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateTicketingProjectFieldMapRequest$inboundSchema; - /** @deprecated use `CreateTicketingProjectFieldMapRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateTicketingProjectFieldMapRequest$outboundSchema; - /** @deprecated use `CreateTicketingProjectFieldMapRequest$Outbound` instead. */ - export type Outbound = CreateTicketingProjectFieldMapRequest$Outbound; -} - -export function createTicketingProjectFieldMapRequestToJSON( - createTicketingProjectFieldMapRequest: CreateTicketingProjectFieldMapRequest, -): string { - return JSON.stringify( - CreateTicketingProjectFieldMapRequest$outboundSchema.parse( - createTicketingProjectFieldMapRequest, - ), - ); -} - -export function createTicketingProjectFieldMapRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateTicketingProjectFieldMapRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateTicketingProjectFieldMapRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletecomment.ts b/src/models/operations/deletecomment.ts new file mode 100644 index 00000000..09792222 --- /dev/null +++ b/src/models/operations/deletecomment.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteCommentRequest = { + commentId: string; + conversationId: string; +}; + +/** @internal */ +export const DeleteCommentRequest$inboundSchema: z.ZodType< + DeleteCommentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + comment_id: z.string(), + conversation_id: z.string(), +}).transform((v) => { + return remap$(v, { + "comment_id": "commentId", + "conversation_id": "conversationId", + }); +}); + +/** @internal */ +export type DeleteCommentRequest$Outbound = { + comment_id: string; + conversation_id: string; +}; + +/** @internal */ +export const DeleteCommentRequest$outboundSchema: z.ZodType< + DeleteCommentRequest$Outbound, + z.ZodTypeDef, + DeleteCommentRequest +> = z.object({ + commentId: z.string(), + conversationId: z.string(), +}).transform((v) => { + return remap$(v, { + commentId: "comment_id", + conversationId: "conversation_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCommentRequest$ { + /** @deprecated use `DeleteCommentRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteCommentRequest$inboundSchema; + /** @deprecated use `DeleteCommentRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteCommentRequest$outboundSchema; + /** @deprecated use `DeleteCommentRequest$Outbound` instead. */ + export type Outbound = DeleteCommentRequest$Outbound; +} + +export function deleteCommentRequestToJSON( + deleteCommentRequest: DeleteCommentRequest, +): string { + return JSON.stringify( + DeleteCommentRequest$outboundSchema.parse(deleteCommentRequest), + ); +} + +export function deleteCommentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCommentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCommentRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletecommentreaction.ts b/src/models/operations/deletecommentreaction.ts new file mode 100644 index 00000000..437c0b08 --- /dev/null +++ b/src/models/operations/deletecommentreaction.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteCommentReactionRequest = { + reactionId: string; + conversationId: string; + commentId: string; +}; + +/** @internal */ +export const DeleteCommentReactionRequest$inboundSchema: z.ZodType< + DeleteCommentReactionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + reaction_id: z.string(), + conversation_id: z.string(), + comment_id: z.string(), +}).transform((v) => { + return remap$(v, { + "reaction_id": "reactionId", + "conversation_id": "conversationId", + "comment_id": "commentId", + }); +}); + +/** @internal */ +export type DeleteCommentReactionRequest$Outbound = { + reaction_id: string; + conversation_id: string; + comment_id: string; +}; + +/** @internal */ +export const DeleteCommentReactionRequest$outboundSchema: z.ZodType< + DeleteCommentReactionRequest$Outbound, + z.ZodTypeDef, + DeleteCommentReactionRequest +> = z.object({ + reactionId: z.string(), + conversationId: z.string(), + commentId: z.string(), +}).transform((v) => { + return remap$(v, { + reactionId: "reaction_id", + conversationId: "conversation_id", + commentId: "comment_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteCommentReactionRequest$ { + /** @deprecated use `DeleteCommentReactionRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteCommentReactionRequest$inboundSchema; + /** @deprecated use `DeleteCommentReactionRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteCommentReactionRequest$outboundSchema; + /** @deprecated use `DeleteCommentReactionRequest$Outbound` instead. */ + export type Outbound = DeleteCommentReactionRequest$Outbound; +} + +export function deleteCommentReactionRequestToJSON( + deleteCommentReactionRequest: DeleteCommentReactionRequest, +): string { + return JSON.stringify( + DeleteCommentReactionRequest$outboundSchema.parse( + deleteCommentReactionRequest, + ), + ); +} + +export function deleteCommentReactionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteCommentReactionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteCommentReactionRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteconversationcomment.ts b/src/models/operations/deleteconversationcomment.ts deleted file mode 100644 index c4083f67..00000000 --- a/src/models/operations/deleteconversationcomment.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteConversationCommentRequest = { - commentId: string; - conversationId: string; -}; - -/** @internal */ -export const DeleteConversationCommentRequest$inboundSchema: z.ZodType< - DeleteConversationCommentRequest, - z.ZodTypeDef, - unknown -> = z.object({ - comment_id: z.string(), - conversation_id: z.string(), -}).transform((v) => { - return remap$(v, { - "comment_id": "commentId", - "conversation_id": "conversationId", - }); -}); - -/** @internal */ -export type DeleteConversationCommentRequest$Outbound = { - comment_id: string; - conversation_id: string; -}; - -/** @internal */ -export const DeleteConversationCommentRequest$outboundSchema: z.ZodType< - DeleteConversationCommentRequest$Outbound, - z.ZodTypeDef, - DeleteConversationCommentRequest -> = z.object({ - commentId: z.string(), - conversationId: z.string(), -}).transform((v) => { - return remap$(v, { - commentId: "comment_id", - conversationId: "conversation_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteConversationCommentRequest$ { - /** @deprecated use `DeleteConversationCommentRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteConversationCommentRequest$inboundSchema; - /** @deprecated use `DeleteConversationCommentRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteConversationCommentRequest$outboundSchema; - /** @deprecated use `DeleteConversationCommentRequest$Outbound` instead. */ - export type Outbound = DeleteConversationCommentRequest$Outbound; -} - -export function deleteConversationCommentRequestToJSON( - deleteConversationCommentRequest: DeleteConversationCommentRequest, -): string { - return JSON.stringify( - DeleteConversationCommentRequest$outboundSchema.parse( - deleteConversationCommentRequest, - ), - ); -} - -export function deleteConversationCommentRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteConversationCommentRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteConversationCommentRequest' from JSON`, - ); -} diff --git a/src/models/operations/deleteconversationcommentreaction.ts b/src/models/operations/deleteconversationcommentreaction.ts deleted file mode 100644 index 82862b37..00000000 --- a/src/models/operations/deleteconversationcommentreaction.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteConversationCommentReactionRequest = { - reactionId: string; - conversationId: string; - commentId: string; -}; - -/** @internal */ -export const DeleteConversationCommentReactionRequest$inboundSchema: z.ZodType< - DeleteConversationCommentReactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - reaction_id: z.string(), - conversation_id: z.string(), - comment_id: z.string(), -}).transform((v) => { - return remap$(v, { - "reaction_id": "reactionId", - "conversation_id": "conversationId", - "comment_id": "commentId", - }); -}); - -/** @internal */ -export type DeleteConversationCommentReactionRequest$Outbound = { - reaction_id: string; - conversation_id: string; - comment_id: string; -}; - -/** @internal */ -export const DeleteConversationCommentReactionRequest$outboundSchema: z.ZodType< - DeleteConversationCommentReactionRequest$Outbound, - z.ZodTypeDef, - DeleteConversationCommentReactionRequest -> = z.object({ - reactionId: z.string(), - conversationId: z.string(), - commentId: z.string(), -}).transform((v) => { - return remap$(v, { - reactionId: "reaction_id", - conversationId: "conversation_id", - commentId: "comment_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteConversationCommentReactionRequest$ { - /** @deprecated use `DeleteConversationCommentReactionRequest$inboundSchema` instead. */ - export const inboundSchema = - DeleteConversationCommentReactionRequest$inboundSchema; - /** @deprecated use `DeleteConversationCommentReactionRequest$outboundSchema` instead. */ - export const outboundSchema = - DeleteConversationCommentReactionRequest$outboundSchema; - /** @deprecated use `DeleteConversationCommentReactionRequest$Outbound` instead. */ - export type Outbound = DeleteConversationCommentReactionRequest$Outbound; -} - -export function deleteConversationCommentReactionRequestToJSON( - deleteConversationCommentReactionRequest: - DeleteConversationCommentReactionRequest, -): string { - return JSON.stringify( - DeleteConversationCommentReactionRequest$outboundSchema.parse( - deleteConversationCommentReactionRequest, - ), - ); -} - -export function deleteConversationCommentReactionRequestFromJSON( - jsonString: string, -): SafeParseResult< - DeleteConversationCommentReactionRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - DeleteConversationCommentReactionRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'DeleteConversationCommentReactionRequest' from JSON`, - ); -} diff --git a/src/models/operations/deleteemailsubscriber.ts b/src/models/operations/deleteemailsubscriber.ts new file mode 100644 index 00000000..c2630c66 --- /dev/null +++ b/src/models/operations/deleteemailsubscriber.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteEmailSubscriberRequest = { + nuncConnectionId: string; + /** + * A list of subscriber IDs to unsubscribe. + */ + subscriberIds: string; +}; + +/** @internal */ +export const DeleteEmailSubscriberRequest$inboundSchema: z.ZodType< + DeleteEmailSubscriberRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + subscriber_ids: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "subscriber_ids": "subscriberIds", + }); +}); + +/** @internal */ +export type DeleteEmailSubscriberRequest$Outbound = { + nunc_connection_id: string; + subscriber_ids: string; +}; + +/** @internal */ +export const DeleteEmailSubscriberRequest$outboundSchema: z.ZodType< + DeleteEmailSubscriberRequest$Outbound, + z.ZodTypeDef, + DeleteEmailSubscriberRequest +> = z.object({ + nuncConnectionId: z.string(), + subscriberIds: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + subscriberIds: "subscriber_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteEmailSubscriberRequest$ { + /** @deprecated use `DeleteEmailSubscriberRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteEmailSubscriberRequest$inboundSchema; + /** @deprecated use `DeleteEmailSubscriberRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteEmailSubscriberRequest$outboundSchema; + /** @deprecated use `DeleteEmailSubscriberRequest$Outbound` instead. */ + export type Outbound = DeleteEmailSubscriberRequest$Outbound; +} + +export function deleteEmailSubscriberRequestToJSON( + deleteEmailSubscriberRequest: DeleteEmailSubscriberRequest, +): string { + return JSON.stringify( + DeleteEmailSubscriberRequest$outboundSchema.parse( + deleteEmailSubscriberRequest, + ), + ); +} + +export function deleteEmailSubscriberRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteEmailSubscriberRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteEmailSubscriberRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteinboundfieldmap.ts b/src/models/operations/deleteinboundfieldmap.ts new file mode 100644 index 00000000..d41c1b76 --- /dev/null +++ b/src/models/operations/deleteinboundfieldmap.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteInboundFieldMapRequest = { + mapId: string; + ticketingProjectId: string; +}; + +/** @internal */ +export const DeleteInboundFieldMapRequest$inboundSchema: z.ZodType< + DeleteInboundFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + map_id: z.string(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "map_id": "mapId", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type DeleteInboundFieldMapRequest$Outbound = { + map_id: string; + ticketing_project_id: string; +}; + +/** @internal */ +export const DeleteInboundFieldMapRequest$outboundSchema: z.ZodType< + DeleteInboundFieldMapRequest$Outbound, + z.ZodTypeDef, + DeleteInboundFieldMapRequest +> = z.object({ + mapId: z.string(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + mapId: "map_id", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteInboundFieldMapRequest$ { + /** @deprecated use `DeleteInboundFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteInboundFieldMapRequest$inboundSchema; + /** @deprecated use `DeleteInboundFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteInboundFieldMapRequest$outboundSchema; + /** @deprecated use `DeleteInboundFieldMapRequest$Outbound` instead. */ + export type Outbound = DeleteInboundFieldMapRequest$Outbound; +} + +export function deleteInboundFieldMapRequestToJSON( + deleteInboundFieldMapRequest: DeleteInboundFieldMapRequest, +): string { + return JSON.stringify( + DeleteInboundFieldMapRequest$outboundSchema.parse( + deleteInboundFieldMapRequest, + ), + ); +} + +export function deleteInboundFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteInboundFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteInboundFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteincident.ts b/src/models/operations/deleteincident.ts new file mode 100644 index 00000000..03e3aa38 --- /dev/null +++ b/src/models/operations/deleteincident.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteIncidentRequest = { + incidentId: string; +}; + +/** @internal */ +export const DeleteIncidentRequest$inboundSchema: z.ZodType< + DeleteIncidentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type DeleteIncidentRequest$Outbound = { + incident_id: string; +}; + +/** @internal */ +export const DeleteIncidentRequest$outboundSchema: z.ZodType< + DeleteIncidentRequest$Outbound, + z.ZodTypeDef, + DeleteIncidentRequest +> = z.object({ + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteIncidentRequest$ { + /** @deprecated use `DeleteIncidentRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteIncidentRequest$inboundSchema; + /** @deprecated use `DeleteIncidentRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteIncidentRequest$outboundSchema; + /** @deprecated use `DeleteIncidentRequest$Outbound` instead. */ + export type Outbound = DeleteIncidentRequest$Outbound; +} + +export function deleteIncidentRequestToJSON( + deleteIncidentRequest: DeleteIncidentRequest, +): string { + return JSON.stringify( + DeleteIncidentRequest$outboundSchema.parse(deleteIncidentRequest), + ); +} + +export function deleteIncidentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIncidentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIncidentRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteincidentimpact.ts b/src/models/operations/deleteincidentimpact.ts index eb4c17b8..2b9d7aa3 100644 --- a/src/models/operations/deleteincidentimpact.ts +++ b/src/models/operations/deleteincidentimpact.ts @@ -9,42 +9,41 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const DeleteIncidentImpactPathParamType = { +export const DeleteIncidentImpactType = { Environments: "environments", Functionalities: "functionalities", Services: "services", Customers: "customers", } as const; -export type DeleteIncidentImpactPathParamType = ClosedEnum< - typeof DeleteIncidentImpactPathParamType +export type DeleteIncidentImpactType = ClosedEnum< + typeof DeleteIncidentImpactType >; export type DeleteIncidentImpactRequest = { incidentId: string; - type: DeleteIncidentImpactPathParamType; + type: DeleteIncidentImpactType; id: string; }; /** @internal */ -export const DeleteIncidentImpactPathParamType$inboundSchema: z.ZodNativeEnum< - typeof DeleteIncidentImpactPathParamType -> = z.nativeEnum(DeleteIncidentImpactPathParamType); +export const DeleteIncidentImpactType$inboundSchema: z.ZodNativeEnum< + typeof DeleteIncidentImpactType +> = z.nativeEnum(DeleteIncidentImpactType); /** @internal */ -export const DeleteIncidentImpactPathParamType$outboundSchema: z.ZodNativeEnum< - typeof DeleteIncidentImpactPathParamType -> = DeleteIncidentImpactPathParamType$inboundSchema; +export const DeleteIncidentImpactType$outboundSchema: z.ZodNativeEnum< + typeof DeleteIncidentImpactType +> = DeleteIncidentImpactType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DeleteIncidentImpactPathParamType$ { - /** @deprecated use `DeleteIncidentImpactPathParamType$inboundSchema` instead. */ - export const inboundSchema = DeleteIncidentImpactPathParamType$inboundSchema; - /** @deprecated use `DeleteIncidentImpactPathParamType$outboundSchema` instead. */ - export const outboundSchema = - DeleteIncidentImpactPathParamType$outboundSchema; +export namespace DeleteIncidentImpactType$ { + /** @deprecated use `DeleteIncidentImpactType$inboundSchema` instead. */ + export const inboundSchema = DeleteIncidentImpactType$inboundSchema; + /** @deprecated use `DeleteIncidentImpactType$outboundSchema` instead. */ + export const outboundSchema = DeleteIncidentImpactType$outboundSchema; } /** @internal */ @@ -54,7 +53,7 @@ export const DeleteIncidentImpactRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - type: DeleteIncidentImpactPathParamType$inboundSchema, + type: DeleteIncidentImpactType$inboundSchema, id: z.string(), }).transform((v) => { return remap$(v, { @@ -76,7 +75,7 @@ export const DeleteIncidentImpactRequest$outboundSchema: z.ZodType< DeleteIncidentImpactRequest > = z.object({ incidentId: z.string(), - type: DeleteIncidentImpactPathParamType$outboundSchema, + type: DeleteIncidentImpactType$outboundSchema, id: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/operations/deleteincidentretrospectivedynamicinput.ts b/src/models/operations/deleteincidentretrospectivedynamicinput.ts new file mode 100644 index 00000000..c6ed72a2 --- /dev/null +++ b/src/models/operations/deleteincidentretrospectivedynamicinput.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteIncidentRetrospectiveDynamicInputRequest = { + retrospectiveId: string; + fieldId: string; + /** + * The ID of the dynamic input field to delete. + */ + dynamicInputFieldId: string; + incidentId: string; +}; + +/** @internal */ +export const DeleteIncidentRetrospectiveDynamicInputRequest$inboundSchema: + z.ZodType< + DeleteIncidentRetrospectiveDynamicInputRequest, + z.ZodTypeDef, + unknown + > = z.object({ + retrospective_id: z.string(), + field_id: z.string(), + dynamic_input_field_id: z.string(), + incident_id: z.string(), + }).transform((v) => { + return remap$(v, { + "retrospective_id": "retrospectiveId", + "field_id": "fieldId", + "dynamic_input_field_id": "dynamicInputFieldId", + "incident_id": "incidentId", + }); + }); + +/** @internal */ +export type DeleteIncidentRetrospectiveDynamicInputRequest$Outbound = { + retrospective_id: string; + field_id: string; + dynamic_input_field_id: string; + incident_id: string; +}; + +/** @internal */ +export const DeleteIncidentRetrospectiveDynamicInputRequest$outboundSchema: + z.ZodType< + DeleteIncidentRetrospectiveDynamicInputRequest$Outbound, + z.ZodTypeDef, + DeleteIncidentRetrospectiveDynamicInputRequest + > = z.object({ + retrospectiveId: z.string(), + fieldId: z.string(), + dynamicInputFieldId: z.string(), + incidentId: z.string(), + }).transform((v) => { + return remap$(v, { + retrospectiveId: "retrospective_id", + fieldId: "field_id", + dynamicInputFieldId: "dynamic_input_field_id", + incidentId: "incident_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteIncidentRetrospectiveDynamicInputRequest$ { + /** @deprecated use `DeleteIncidentRetrospectiveDynamicInputRequest$inboundSchema` instead. */ + export const inboundSchema = + DeleteIncidentRetrospectiveDynamicInputRequest$inboundSchema; + /** @deprecated use `DeleteIncidentRetrospectiveDynamicInputRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteIncidentRetrospectiveDynamicInputRequest$outboundSchema; + /** @deprecated use `DeleteIncidentRetrospectiveDynamicInputRequest$Outbound` instead. */ + export type Outbound = + DeleteIncidentRetrospectiveDynamicInputRequest$Outbound; +} + +export function deleteIncidentRetrospectiveDynamicInputRequestToJSON( + deleteIncidentRetrospectiveDynamicInputRequest: + DeleteIncidentRetrospectiveDynamicInputRequest, +): string { + return JSON.stringify( + DeleteIncidentRetrospectiveDynamicInputRequest$outboundSchema.parse( + deleteIncidentRetrospectiveDynamicInputRequest, + ), + ); +} + +export function deleteIncidentRetrospectiveDynamicInputRequestFromJSON( + jsonString: string, +): SafeParseResult< + DeleteIncidentRetrospectiveDynamicInputRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteIncidentRetrospectiveDynamicInputRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'DeleteIncidentRetrospectiveDynamicInputRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteincidentteamassignment.ts b/src/models/operations/deleteincidentteamassignment.ts index d2bdac1e..89b9d544 100644 --- a/src/models/operations/deleteincidentteamassignment.ts +++ b/src/models/operations/deleteincidentteamassignment.ts @@ -12,7 +12,7 @@ export type DeleteIncidentTeamAssignmentRequestBody = { /** * Team role assignments to unassign from the incident */ - roleAssignmentIds?: Array | undefined; + roleAssignmentIds?: Array | null | undefined; }; export type DeleteIncidentTeamAssignmentRequest = { @@ -27,7 +27,7 @@ export const DeleteIncidentTeamAssignmentRequestBody$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - role_assignment_ids: z.array(z.string()).optional(), + role_assignment_ids: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "role_assignment_ids": "roleAssignmentIds", @@ -36,7 +36,7 @@ export const DeleteIncidentTeamAssignmentRequestBody$inboundSchema: z.ZodType< /** @internal */ export type DeleteIncidentTeamAssignmentRequestBody$Outbound = { - role_assignment_ids?: Array | undefined; + role_assignment_ids?: Array | null | undefined; }; /** @internal */ @@ -45,7 +45,7 @@ export const DeleteIncidentTeamAssignmentRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, DeleteIncidentTeamAssignmentRequestBody > = z.object({ - roleAssignmentIds: z.array(z.string()).optional(), + roleAssignmentIds: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { roleAssignmentIds: "role_assignment_ids", diff --git a/src/models/operations/deleteincidenttranscript.ts b/src/models/operations/deleteincidenttranscript.ts deleted file mode 100644 index 43d472e3..00000000 --- a/src/models/operations/deleteincidenttranscript.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteIncidentTranscriptRequest = { - transcriptId: string; - incidentId: string; -}; - -/** @internal */ -export const DeleteIncidentTranscriptRequest$inboundSchema: z.ZodType< - DeleteIncidentTranscriptRequest, - z.ZodTypeDef, - unknown -> = z.object({ - transcript_id: z.string(), - incident_id: z.string(), -}).transform((v) => { - return remap$(v, { - "transcript_id": "transcriptId", - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type DeleteIncidentTranscriptRequest$Outbound = { - transcript_id: string; - incident_id: string; -}; - -/** @internal */ -export const DeleteIncidentTranscriptRequest$outboundSchema: z.ZodType< - DeleteIncidentTranscriptRequest$Outbound, - z.ZodTypeDef, - DeleteIncidentTranscriptRequest -> = z.object({ - transcriptId: z.string(), - incidentId: z.string(), -}).transform((v) => { - return remap$(v, { - transcriptId: "transcript_id", - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteIncidentTranscriptRequest$ { - /** @deprecated use `DeleteIncidentTranscriptRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteIncidentTranscriptRequest$inboundSchema; - /** @deprecated use `DeleteIncidentTranscriptRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteIncidentTranscriptRequest$outboundSchema; - /** @deprecated use `DeleteIncidentTranscriptRequest$Outbound` instead. */ - export type Outbound = DeleteIncidentTranscriptRequest$Outbound; -} - -export function deleteIncidentTranscriptRequestToJSON( - deleteIncidentTranscriptRequest: DeleteIncidentTranscriptRequest, -): string { - return JSON.stringify( - DeleteIncidentTranscriptRequest$outboundSchema.parse( - deleteIncidentTranscriptRequest, - ), - ); -} - -export function deleteIncidentTranscriptRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteIncidentTranscriptRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteIncidentTranscriptRequest' from JSON`, - ); -} diff --git a/src/models/operations/deleteincidenttype.ts b/src/models/operations/deleteincidenttype.ts new file mode 100644 index 00000000..59b5066f --- /dev/null +++ b/src/models/operations/deleteincidenttype.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteIncidentTypeRequest = { + id: string; +}; + +/** @internal */ +export const DeleteIncidentTypeRequest$inboundSchema: z.ZodType< + DeleteIncidentTypeRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type DeleteIncidentTypeRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const DeleteIncidentTypeRequest$outboundSchema: z.ZodType< + DeleteIncidentTypeRequest$Outbound, + z.ZodTypeDef, + DeleteIncidentTypeRequest +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteIncidentTypeRequest$ { + /** @deprecated use `DeleteIncidentTypeRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteIncidentTypeRequest$inboundSchema; + /** @deprecated use `DeleteIncidentTypeRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteIncidentTypeRequest$outboundSchema; + /** @deprecated use `DeleteIncidentTypeRequest$Outbound` instead. */ + export type Outbound = DeleteIncidentTypeRequest$Outbound; +} + +export function deleteIncidentTypeRequestToJSON( + deleteIncidentTypeRequest: DeleteIncidentTypeRequest, +): string { + return JSON.stringify( + DeleteIncidentTypeRequest$outboundSchema.parse(deleteIncidentTypeRequest), + ); +} + +export function deleteIncidentTypeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteIncidentTypeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteIncidentTypeRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletelifecyclemeasurementdefinition.ts b/src/models/operations/deletelifecyclemeasurementdefinition.ts new file mode 100644 index 00000000..69460f21 --- /dev/null +++ b/src/models/operations/deletelifecyclemeasurementdefinition.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteLifecycleMeasurementDefinitionRequest = { + measurementDefinitionId: string; +}; + +/** @internal */ +export const DeleteLifecycleMeasurementDefinitionRequest$inboundSchema: + z.ZodType< + DeleteLifecycleMeasurementDefinitionRequest, + z.ZodTypeDef, + unknown + > = z.object({ + measurement_definition_id: z.string(), + }).transform((v) => { + return remap$(v, { + "measurement_definition_id": "measurementDefinitionId", + }); + }); + +/** @internal */ +export type DeleteLifecycleMeasurementDefinitionRequest$Outbound = { + measurement_definition_id: string; +}; + +/** @internal */ +export const DeleteLifecycleMeasurementDefinitionRequest$outboundSchema: + z.ZodType< + DeleteLifecycleMeasurementDefinitionRequest$Outbound, + z.ZodTypeDef, + DeleteLifecycleMeasurementDefinitionRequest + > = z.object({ + measurementDefinitionId: z.string(), + }).transform((v) => { + return remap$(v, { + measurementDefinitionId: "measurement_definition_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteLifecycleMeasurementDefinitionRequest$ { + /** @deprecated use `DeleteLifecycleMeasurementDefinitionRequest$inboundSchema` instead. */ + export const inboundSchema = + DeleteLifecycleMeasurementDefinitionRequest$inboundSchema; + /** @deprecated use `DeleteLifecycleMeasurementDefinitionRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteLifecycleMeasurementDefinitionRequest$outboundSchema; + /** @deprecated use `DeleteLifecycleMeasurementDefinitionRequest$Outbound` instead. */ + export type Outbound = DeleteLifecycleMeasurementDefinitionRequest$Outbound; +} + +export function deleteLifecycleMeasurementDefinitionRequestToJSON( + deleteLifecycleMeasurementDefinitionRequest: + DeleteLifecycleMeasurementDefinitionRequest, +): string { + return JSON.stringify( + DeleteLifecycleMeasurementDefinitionRequest$outboundSchema.parse( + deleteLifecycleMeasurementDefinitionRequest, + ), + ); +} + +export function deleteLifecycleMeasurementDefinitionRequestFromJSON( + jsonString: string, +): SafeParseResult< + DeleteLifecycleMeasurementDefinitionRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + DeleteLifecycleMeasurementDefinitionRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'DeleteLifecycleMeasurementDefinitionRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletemeasurementdefinition.ts b/src/models/operations/deletemeasurementdefinition.ts deleted file mode 100644 index ccf513bb..00000000 --- a/src/models/operations/deletemeasurementdefinition.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteMeasurementDefinitionRequest = { - measurementDefinitionId: string; -}; - -/** @internal */ -export const DeleteMeasurementDefinitionRequest$inboundSchema: z.ZodType< - DeleteMeasurementDefinitionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - measurement_definition_id: z.string(), -}).transform((v) => { - return remap$(v, { - "measurement_definition_id": "measurementDefinitionId", - }); -}); - -/** @internal */ -export type DeleteMeasurementDefinitionRequest$Outbound = { - measurement_definition_id: string; -}; - -/** @internal */ -export const DeleteMeasurementDefinitionRequest$outboundSchema: z.ZodType< - DeleteMeasurementDefinitionRequest$Outbound, - z.ZodTypeDef, - DeleteMeasurementDefinitionRequest -> = z.object({ - measurementDefinitionId: z.string(), -}).transform((v) => { - return remap$(v, { - measurementDefinitionId: "measurement_definition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteMeasurementDefinitionRequest$ { - /** @deprecated use `DeleteMeasurementDefinitionRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteMeasurementDefinitionRequest$inboundSchema; - /** @deprecated use `DeleteMeasurementDefinitionRequest$outboundSchema` instead. */ - export const outboundSchema = - DeleteMeasurementDefinitionRequest$outboundSchema; - /** @deprecated use `DeleteMeasurementDefinitionRequest$Outbound` instead. */ - export type Outbound = DeleteMeasurementDefinitionRequest$Outbound; -} - -export function deleteMeasurementDefinitionRequestToJSON( - deleteMeasurementDefinitionRequest: DeleteMeasurementDefinitionRequest, -): string { - return JSON.stringify( - DeleteMeasurementDefinitionRequest$outboundSchema.parse( - deleteMeasurementDefinitionRequest, - ), - ); -} - -export function deleteMeasurementDefinitionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - DeleteMeasurementDefinitionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteMeasurementDefinitionRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletenunccomponentgroup.ts b/src/models/operations/deletenunccomponentgroup.ts new file mode 100644 index 00000000..332a2e94 --- /dev/null +++ b/src/models/operations/deletenunccomponentgroup.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteNuncComponentGroupRequest = { + nuncConnectionId: string; + groupId: string; +}; + +/** @internal */ +export const DeleteNuncComponentGroupRequest$inboundSchema: z.ZodType< + DeleteNuncComponentGroupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + group_id: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "group_id": "groupId", + }); +}); + +/** @internal */ +export type DeleteNuncComponentGroupRequest$Outbound = { + nunc_connection_id: string; + group_id: string; +}; + +/** @internal */ +export const DeleteNuncComponentGroupRequest$outboundSchema: z.ZodType< + DeleteNuncComponentGroupRequest$Outbound, + z.ZodTypeDef, + DeleteNuncComponentGroupRequest +> = z.object({ + nuncConnectionId: z.string(), + groupId: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + groupId: "group_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteNuncComponentGroupRequest$ { + /** @deprecated use `DeleteNuncComponentGroupRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteNuncComponentGroupRequest$inboundSchema; + /** @deprecated use `DeleteNuncComponentGroupRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteNuncComponentGroupRequest$outboundSchema; + /** @deprecated use `DeleteNuncComponentGroupRequest$Outbound` instead. */ + export type Outbound = DeleteNuncComponentGroupRequest$Outbound; +} + +export function deleteNuncComponentGroupRequestToJSON( + deleteNuncComponentGroupRequest: DeleteNuncComponentGroupRequest, +): string { + return JSON.stringify( + DeleteNuncComponentGroupRequest$outboundSchema.parse( + deleteNuncComponentGroupRequest, + ), + ); +} + +export function deleteNuncComponentGroupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteNuncComponentGroupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteNuncComponentGroupRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletenuncconnection.ts b/src/models/operations/deletenuncconnection.ts new file mode 100644 index 00000000..68d4aba8 --- /dev/null +++ b/src/models/operations/deletenuncconnection.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteNuncConnectionRequest = { + nuncConnectionId: string; +}; + +/** @internal */ +export const DeleteNuncConnectionRequest$inboundSchema: z.ZodType< + DeleteNuncConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + }); +}); + +/** @internal */ +export type DeleteNuncConnectionRequest$Outbound = { + nunc_connection_id: string; +}; + +/** @internal */ +export const DeleteNuncConnectionRequest$outboundSchema: z.ZodType< + DeleteNuncConnectionRequest$Outbound, + z.ZodTypeDef, + DeleteNuncConnectionRequest +> = z.object({ + nuncConnectionId: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteNuncConnectionRequest$ { + /** @deprecated use `DeleteNuncConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteNuncConnectionRequest$inboundSchema; + /** @deprecated use `DeleteNuncConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteNuncConnectionRequest$outboundSchema; + /** @deprecated use `DeleteNuncConnectionRequest$Outbound` instead. */ + export type Outbound = DeleteNuncConnectionRequest$Outbound; +} + +export function deleteNuncConnectionRequestToJSON( + deleteNuncConnectionRequest: DeleteNuncConnectionRequest, +): string { + return JSON.stringify( + DeleteNuncConnectionRequest$outboundSchema.parse( + deleteNuncConnectionRequest, + ), + ); +} + +export function deleteNuncConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteNuncConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteNuncConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletenuncimage.ts b/src/models/operations/deletenuncimage.ts new file mode 100644 index 00000000..773a7ac4 --- /dev/null +++ b/src/models/operations/deletenuncimage.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteNuncImageRequest = { + nuncConnectionId: string; + type: string; +}; + +/** @internal */ +export const DeleteNuncImageRequest$inboundSchema: z.ZodType< + DeleteNuncImageRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + type: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + }); +}); + +/** @internal */ +export type DeleteNuncImageRequest$Outbound = { + nunc_connection_id: string; + type: string; +}; + +/** @internal */ +export const DeleteNuncImageRequest$outboundSchema: z.ZodType< + DeleteNuncImageRequest$Outbound, + z.ZodTypeDef, + DeleteNuncImageRequest +> = z.object({ + nuncConnectionId: z.string(), + type: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteNuncImageRequest$ { + /** @deprecated use `DeleteNuncImageRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteNuncImageRequest$inboundSchema; + /** @deprecated use `DeleteNuncImageRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteNuncImageRequest$outboundSchema; + /** @deprecated use `DeleteNuncImageRequest$Outbound` instead. */ + export type Outbound = DeleteNuncImageRequest$Outbound; +} + +export function deleteNuncImageRequestToJSON( + deleteNuncImageRequest: DeleteNuncImageRequest, +): string { + return JSON.stringify( + DeleteNuncImageRequest$outboundSchema.parse(deleteNuncImageRequest), + ); +} + +export function deleteNuncImageRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteNuncImageRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteNuncImageRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletenunclink.ts b/src/models/operations/deletenunclink.ts new file mode 100644 index 00000000..5c81d5fa --- /dev/null +++ b/src/models/operations/deletenunclink.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteNuncLinkRequest = { + nuncConnectionId: string; + linkId: string; +}; + +/** @internal */ +export const DeleteNuncLinkRequest$inboundSchema: z.ZodType< + DeleteNuncLinkRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + link_id: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "link_id": "linkId", + }); +}); + +/** @internal */ +export type DeleteNuncLinkRequest$Outbound = { + nunc_connection_id: string; + link_id: string; +}; + +/** @internal */ +export const DeleteNuncLinkRequest$outboundSchema: z.ZodType< + DeleteNuncLinkRequest$Outbound, + z.ZodTypeDef, + DeleteNuncLinkRequest +> = z.object({ + nuncConnectionId: z.string(), + linkId: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + linkId: "link_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteNuncLinkRequest$ { + /** @deprecated use `DeleteNuncLinkRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteNuncLinkRequest$inboundSchema; + /** @deprecated use `DeleteNuncLinkRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteNuncLinkRequest$outboundSchema; + /** @deprecated use `DeleteNuncLinkRequest$Outbound` instead. */ + export type Outbound = DeleteNuncLinkRequest$Outbound; +} + +export function deleteNuncLinkRequestToJSON( + deleteNuncLinkRequest: DeleteNuncLinkRequest, +): string { + return JSON.stringify( + DeleteNuncLinkRequest$outboundSchema.parse(deleteNuncLinkRequest), + ); +} + +export function deleteNuncLinkRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteNuncLinkRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteNuncLinkRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteoncallshift.ts b/src/models/operations/deleteoncallshift.ts new file mode 100644 index 00000000..d734a36e --- /dev/null +++ b/src/models/operations/deleteoncallshift.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteOnCallShiftRequest = { + id: string; + teamId: string; + scheduleId: string; +}; + +/** @internal */ +export const DeleteOnCallShiftRequest$inboundSchema: z.ZodType< + DeleteOnCallShiftRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + team_id: z.string(), + schedule_id: z.string(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "schedule_id": "scheduleId", + }); +}); + +/** @internal */ +export type DeleteOnCallShiftRequest$Outbound = { + id: string; + team_id: string; + schedule_id: string; +}; + +/** @internal */ +export const DeleteOnCallShiftRequest$outboundSchema: z.ZodType< + DeleteOnCallShiftRequest$Outbound, + z.ZodTypeDef, + DeleteOnCallShiftRequest +> = z.object({ + id: z.string(), + teamId: z.string(), + scheduleId: z.string(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + scheduleId: "schedule_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteOnCallShiftRequest$ { + /** @deprecated use `DeleteOnCallShiftRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteOnCallShiftRequest$inboundSchema; + /** @deprecated use `DeleteOnCallShiftRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteOnCallShiftRequest$outboundSchema; + /** @deprecated use `DeleteOnCallShiftRequest$Outbound` instead. */ + export type Outbound = DeleteOnCallShiftRequest$Outbound; +} + +export function deleteOnCallShiftRequestToJSON( + deleteOnCallShiftRequest: DeleteOnCallShiftRequest, +): string { + return JSON.stringify( + DeleteOnCallShiftRequest$outboundSchema.parse(deleteOnCallShiftRequest), + ); +} + +export function deleteOnCallShiftRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteOnCallShiftRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteOnCallShiftRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletepostmortemreason.ts b/src/models/operations/deletepostmortemreason.ts new file mode 100644 index 00000000..f06e2548 --- /dev/null +++ b/src/models/operations/deletepostmortemreason.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeletePostMortemReasonRequest = { + reportId: string; + reasonId: string; +}; + +/** @internal */ +export const DeletePostMortemReasonRequest$inboundSchema: z.ZodType< + DeletePostMortemReasonRequest, + z.ZodTypeDef, + unknown +> = z.object({ + report_id: z.string(), + reason_id: z.string(), +}).transform((v) => { + return remap$(v, { + "report_id": "reportId", + "reason_id": "reasonId", + }); +}); + +/** @internal */ +export type DeletePostMortemReasonRequest$Outbound = { + report_id: string; + reason_id: string; +}; + +/** @internal */ +export const DeletePostMortemReasonRequest$outboundSchema: z.ZodType< + DeletePostMortemReasonRequest$Outbound, + z.ZodTypeDef, + DeletePostMortemReasonRequest +> = z.object({ + reportId: z.string(), + reasonId: z.string(), +}).transform((v) => { + return remap$(v, { + reportId: "report_id", + reasonId: "reason_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeletePostMortemReasonRequest$ { + /** @deprecated use `DeletePostMortemReasonRequest$inboundSchema` instead. */ + export const inboundSchema = DeletePostMortemReasonRequest$inboundSchema; + /** @deprecated use `DeletePostMortemReasonRequest$outboundSchema` instead. */ + export const outboundSchema = DeletePostMortemReasonRequest$outboundSchema; + /** @deprecated use `DeletePostMortemReasonRequest$Outbound` instead. */ + export type Outbound = DeletePostMortemReasonRequest$Outbound; +} + +export function deletePostMortemReasonRequestToJSON( + deletePostMortemReasonRequest: DeletePostMortemReasonRequest, +): string { + return JSON.stringify( + DeletePostMortemReasonRequest$outboundSchema.parse( + deletePostMortemReasonRequest, + ), + ); +} + +export function deletePostMortemReasonRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeletePostMortemReasonRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeletePostMortemReasonRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteretrospectivereason.ts b/src/models/operations/deleteretrospectivereason.ts deleted file mode 100644 index 0c56f481..00000000 --- a/src/models/operations/deleteretrospectivereason.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteRetrospectiveReasonRequest = { - reportId: string; - reasonId: string; -}; - -/** @internal */ -export const DeleteRetrospectiveReasonRequest$inboundSchema: z.ZodType< - DeleteRetrospectiveReasonRequest, - z.ZodTypeDef, - unknown -> = z.object({ - report_id: z.string(), - reason_id: z.string(), -}).transform((v) => { - return remap$(v, { - "report_id": "reportId", - "reason_id": "reasonId", - }); -}); - -/** @internal */ -export type DeleteRetrospectiveReasonRequest$Outbound = { - report_id: string; - reason_id: string; -}; - -/** @internal */ -export const DeleteRetrospectiveReasonRequest$outboundSchema: z.ZodType< - DeleteRetrospectiveReasonRequest$Outbound, - z.ZodTypeDef, - DeleteRetrospectiveReasonRequest -> = z.object({ - reportId: z.string(), - reasonId: z.string(), -}).transform((v) => { - return remap$(v, { - reportId: "report_id", - reasonId: "reason_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteRetrospectiveReasonRequest$ { - /** @deprecated use `DeleteRetrospectiveReasonRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteRetrospectiveReasonRequest$inboundSchema; - /** @deprecated use `DeleteRetrospectiveReasonRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteRetrospectiveReasonRequest$outboundSchema; - /** @deprecated use `DeleteRetrospectiveReasonRequest$Outbound` instead. */ - export type Outbound = DeleteRetrospectiveReasonRequest$Outbound; -} - -export function deleteRetrospectiveReasonRequestToJSON( - deleteRetrospectiveReasonRequest: DeleteRetrospectiveReasonRequest, -): string { - return JSON.stringify( - DeleteRetrospectiveReasonRequest$outboundSchema.parse( - deleteRetrospectiveReasonRequest, - ), - ); -} - -export function deleteRetrospectiveReasonRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteRetrospectiveReasonRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteRetrospectiveReasonRequest' from JSON`, - ); -} diff --git a/src/models/operations/deleteretrospectivetemplate.ts b/src/models/operations/deleteretrospectivetemplate.ts new file mode 100644 index 00000000..67be634e --- /dev/null +++ b/src/models/operations/deleteretrospectivetemplate.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteRetrospectiveTemplateRequest = { + retrospectiveTemplateId: string; +}; + +/** @internal */ +export const DeleteRetrospectiveTemplateRequest$inboundSchema: z.ZodType< + DeleteRetrospectiveTemplateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_template_id: z.string(), +}).transform((v) => { + return remap$(v, { + "retrospective_template_id": "retrospectiveTemplateId", + }); +}); + +/** @internal */ +export type DeleteRetrospectiveTemplateRequest$Outbound = { + retrospective_template_id: string; +}; + +/** @internal */ +export const DeleteRetrospectiveTemplateRequest$outboundSchema: z.ZodType< + DeleteRetrospectiveTemplateRequest$Outbound, + z.ZodTypeDef, + DeleteRetrospectiveTemplateRequest +> = z.object({ + retrospectiveTemplateId: z.string(), +}).transform((v) => { + return remap$(v, { + retrospectiveTemplateId: "retrospective_template_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteRetrospectiveTemplateRequest$ { + /** @deprecated use `DeleteRetrospectiveTemplateRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteRetrospectiveTemplateRequest$inboundSchema; + /** @deprecated use `DeleteRetrospectiveTemplateRequest$outboundSchema` instead. */ + export const outboundSchema = + DeleteRetrospectiveTemplateRequest$outboundSchema; + /** @deprecated use `DeleteRetrospectiveTemplateRequest$Outbound` instead. */ + export type Outbound = DeleteRetrospectiveTemplateRequest$Outbound; +} + +export function deleteRetrospectiveTemplateRequestToJSON( + deleteRetrospectiveTemplateRequest: DeleteRetrospectiveTemplateRequest, +): string { + return JSON.stringify( + DeleteRetrospectiveTemplateRequest$outboundSchema.parse( + deleteRetrospectiveTemplateRequest, + ), + ); +} + +export function deleteRetrospectiveTemplateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + DeleteRetrospectiveTemplateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteRetrospectiveTemplateRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletesavedsearch.ts b/src/models/operations/deletesavedsearch.ts index edffe2a6..e18f1ca2 100644 --- a/src/models/operations/deletesavedsearch.ts +++ b/src/models/operations/deletesavedsearch.ts @@ -9,7 +9,7 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const DeleteSavedSearchPathParamResourceType = { +export const DeleteSavedSearchResourceType = { ChangeEvents: "change_events", Incidents: "incidents", Services: "services", @@ -21,37 +21,34 @@ export const DeleteSavedSearchPathParamResourceType = { Alerts: "alerts", IncidentEvents: "incident_events", } as const; -export type DeleteSavedSearchPathParamResourceType = ClosedEnum< - typeof DeleteSavedSearchPathParamResourceType +export type DeleteSavedSearchResourceType = ClosedEnum< + typeof DeleteSavedSearchResourceType >; export type DeleteSavedSearchRequest = { - resourceType: DeleteSavedSearchPathParamResourceType; + resourceType: DeleteSavedSearchResourceType; savedSearchId: string; }; /** @internal */ -export const DeleteSavedSearchPathParamResourceType$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - DeleteSavedSearchPathParamResourceType, - ); +export const DeleteSavedSearchResourceType$inboundSchema: z.ZodNativeEnum< + typeof DeleteSavedSearchResourceType +> = z.nativeEnum(DeleteSavedSearchResourceType); /** @internal */ -export const DeleteSavedSearchPathParamResourceType$outboundSchema: - z.ZodNativeEnum = - DeleteSavedSearchPathParamResourceType$inboundSchema; +export const DeleteSavedSearchResourceType$outboundSchema: z.ZodNativeEnum< + typeof DeleteSavedSearchResourceType +> = DeleteSavedSearchResourceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DeleteSavedSearchPathParamResourceType$ { - /** @deprecated use `DeleteSavedSearchPathParamResourceType$inboundSchema` instead. */ - export const inboundSchema = - DeleteSavedSearchPathParamResourceType$inboundSchema; - /** @deprecated use `DeleteSavedSearchPathParamResourceType$outboundSchema` instead. */ - export const outboundSchema = - DeleteSavedSearchPathParamResourceType$outboundSchema; +export namespace DeleteSavedSearchResourceType$ { + /** @deprecated use `DeleteSavedSearchResourceType$inboundSchema` instead. */ + export const inboundSchema = DeleteSavedSearchResourceType$inboundSchema; + /** @deprecated use `DeleteSavedSearchResourceType$outboundSchema` instead. */ + export const outboundSchema = DeleteSavedSearchResourceType$outboundSchema; } /** @internal */ @@ -60,7 +57,7 @@ export const DeleteSavedSearchRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - resource_type: DeleteSavedSearchPathParamResourceType$inboundSchema, + resource_type: DeleteSavedSearchResourceType$inboundSchema, saved_search_id: z.string(), }).transform((v) => { return remap$(v, { @@ -81,7 +78,7 @@ export const DeleteSavedSearchRequest$outboundSchema: z.ZodType< z.ZodTypeDef, DeleteSavedSearchRequest > = z.object({ - resourceType: DeleteSavedSearchPathParamResourceType$outboundSchema, + resourceType: DeleteSavedSearchResourceType$outboundSchema, savedSearchId: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/operations/deletesignalemailtarget.ts b/src/models/operations/deletesignalemailtarget.ts deleted file mode 100644 index eb843dd4..00000000 --- a/src/models/operations/deletesignalemailtarget.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteSignalEmailTargetRequest = { - id: string; -}; - -/** @internal */ -export const DeleteSignalEmailTargetRequest$inboundSchema: z.ZodType< - DeleteSignalEmailTargetRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type DeleteSignalEmailTargetRequest$Outbound = { - id: string; -}; - -/** @internal */ -export const DeleteSignalEmailTargetRequest$outboundSchema: z.ZodType< - DeleteSignalEmailTargetRequest$Outbound, - z.ZodTypeDef, - DeleteSignalEmailTargetRequest -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteSignalEmailTargetRequest$ { - /** @deprecated use `DeleteSignalEmailTargetRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteSignalEmailTargetRequest$inboundSchema; - /** @deprecated use `DeleteSignalEmailTargetRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteSignalEmailTargetRequest$outboundSchema; - /** @deprecated use `DeleteSignalEmailTargetRequest$Outbound` instead. */ - export type Outbound = DeleteSignalEmailTargetRequest$Outbound; -} - -export function deleteSignalEmailTargetRequestToJSON( - deleteSignalEmailTargetRequest: DeleteSignalEmailTargetRequest, -): string { - return JSON.stringify( - DeleteSignalEmailTargetRequest$outboundSchema.parse( - deleteSignalEmailTargetRequest, - ), - ); -} - -export function deleteSignalEmailTargetRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteSignalEmailTargetRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteSignalEmailTargetRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletesignalsemailtarget.ts b/src/models/operations/deletesignalsemailtarget.ts new file mode 100644 index 00000000..5c8b7ca5 --- /dev/null +++ b/src/models/operations/deletesignalsemailtarget.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteSignalsEmailTargetRequest = { + id: string; +}; + +/** @internal */ +export const DeleteSignalsEmailTargetRequest$inboundSchema: z.ZodType< + DeleteSignalsEmailTargetRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type DeleteSignalsEmailTargetRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const DeleteSignalsEmailTargetRequest$outboundSchema: z.ZodType< + DeleteSignalsEmailTargetRequest$Outbound, + z.ZodTypeDef, + DeleteSignalsEmailTargetRequest +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteSignalsEmailTargetRequest$ { + /** @deprecated use `DeleteSignalsEmailTargetRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteSignalsEmailTargetRequest$inboundSchema; + /** @deprecated use `DeleteSignalsEmailTargetRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteSignalsEmailTargetRequest$outboundSchema; + /** @deprecated use `DeleteSignalsEmailTargetRequest$Outbound` instead. */ + export type Outbound = DeleteSignalsEmailTargetRequest$Outbound; +} + +export function deleteSignalsEmailTargetRequestToJSON( + deleteSignalsEmailTargetRequest: DeleteSignalsEmailTargetRequest, +): string { + return JSON.stringify( + DeleteSignalsEmailTargetRequest$outboundSchema.parse( + deleteSignalsEmailTargetRequest, + ), + ); +} + +export function deleteSignalsEmailTargetRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteSignalsEmailTargetRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteSignalsEmailTargetRequest' from JSON`, + ); +} diff --git a/src/models/operations/deletestatuspage.ts b/src/models/operations/deletestatuspage.ts deleted file mode 100644 index 2795ae59..00000000 --- a/src/models/operations/deletestatuspage.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteStatusPageRequest = { - nuncConnectionId: string; -}; - -/** @internal */ -export const DeleteStatusPageRequest$inboundSchema: z.ZodType< - DeleteStatusPageRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - }); -}); - -/** @internal */ -export type DeleteStatusPageRequest$Outbound = { - nunc_connection_id: string; -}; - -/** @internal */ -export const DeleteStatusPageRequest$outboundSchema: z.ZodType< - DeleteStatusPageRequest$Outbound, - z.ZodTypeDef, - DeleteStatusPageRequest -> = z.object({ - nuncConnectionId: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteStatusPageRequest$ { - /** @deprecated use `DeleteStatusPageRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteStatusPageRequest$inboundSchema; - /** @deprecated use `DeleteStatusPageRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteStatusPageRequest$outboundSchema; - /** @deprecated use `DeleteStatusPageRequest$Outbound` instead. */ - export type Outbound = DeleteStatusPageRequest$Outbound; -} - -export function deleteStatusPageRequestToJSON( - deleteStatusPageRequest: DeleteStatusPageRequest, -): string { - return JSON.stringify( - DeleteStatusPageRequest$outboundSchema.parse(deleteStatusPageRequest), - ); -} - -export function deleteStatusPageRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteStatusPageRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteStatusPageRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletestatuspagecomponentgroup.ts b/src/models/operations/deletestatuspagecomponentgroup.ts deleted file mode 100644 index c07d4581..00000000 --- a/src/models/operations/deletestatuspagecomponentgroup.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteStatusPageComponentGroupRequest = { - nuncConnectionId: string; - groupId: string; -}; - -/** @internal */ -export const DeleteStatusPageComponentGroupRequest$inboundSchema: z.ZodType< - DeleteStatusPageComponentGroupRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - group_id: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "group_id": "groupId", - }); -}); - -/** @internal */ -export type DeleteStatusPageComponentGroupRequest$Outbound = { - nunc_connection_id: string; - group_id: string; -}; - -/** @internal */ -export const DeleteStatusPageComponentGroupRequest$outboundSchema: z.ZodType< - DeleteStatusPageComponentGroupRequest$Outbound, - z.ZodTypeDef, - DeleteStatusPageComponentGroupRequest -> = z.object({ - nuncConnectionId: z.string(), - groupId: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - groupId: "group_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteStatusPageComponentGroupRequest$ { - /** @deprecated use `DeleteStatusPageComponentGroupRequest$inboundSchema` instead. */ - export const inboundSchema = - DeleteStatusPageComponentGroupRequest$inboundSchema; - /** @deprecated use `DeleteStatusPageComponentGroupRequest$outboundSchema` instead. */ - export const outboundSchema = - DeleteStatusPageComponentGroupRequest$outboundSchema; - /** @deprecated use `DeleteStatusPageComponentGroupRequest$Outbound` instead. */ - export type Outbound = DeleteStatusPageComponentGroupRequest$Outbound; -} - -export function deleteStatusPageComponentGroupRequestToJSON( - deleteStatusPageComponentGroupRequest: DeleteStatusPageComponentGroupRequest, -): string { - return JSON.stringify( - DeleteStatusPageComponentGroupRequest$outboundSchema.parse( - deleteStatusPageComponentGroupRequest, - ), - ); -} - -export function deleteStatusPageComponentGroupRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - DeleteStatusPageComponentGroupRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteStatusPageComponentGroupRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletestatuspageimage.ts b/src/models/operations/deletestatuspageimage.ts deleted file mode 100644 index 720d7da4..00000000 --- a/src/models/operations/deletestatuspageimage.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteStatusPageImageRequest = { - nuncConnectionId: string; - type: string; -}; - -/** @internal */ -export const DeleteStatusPageImageRequest$inboundSchema: z.ZodType< - DeleteStatusPageImageRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - type: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - }); -}); - -/** @internal */ -export type DeleteStatusPageImageRequest$Outbound = { - nunc_connection_id: string; - type: string; -}; - -/** @internal */ -export const DeleteStatusPageImageRequest$outboundSchema: z.ZodType< - DeleteStatusPageImageRequest$Outbound, - z.ZodTypeDef, - DeleteStatusPageImageRequest -> = z.object({ - nuncConnectionId: z.string(), - type: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteStatusPageImageRequest$ { - /** @deprecated use `DeleteStatusPageImageRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteStatusPageImageRequest$inboundSchema; - /** @deprecated use `DeleteStatusPageImageRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteStatusPageImageRequest$outboundSchema; - /** @deprecated use `DeleteStatusPageImageRequest$Outbound` instead. */ - export type Outbound = DeleteStatusPageImageRequest$Outbound; -} - -export function deleteStatusPageImageRequestToJSON( - deleteStatusPageImageRequest: DeleteStatusPageImageRequest, -): string { - return JSON.stringify( - DeleteStatusPageImageRequest$outboundSchema.parse( - deleteStatusPageImageRequest, - ), - ); -} - -export function deleteStatusPageImageRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteStatusPageImageRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteStatusPageImageRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletestatuspagelink.ts b/src/models/operations/deletestatuspagelink.ts deleted file mode 100644 index 6bf39850..00000000 --- a/src/models/operations/deletestatuspagelink.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteStatusPageLinkRequest = { - nuncConnectionId: string; - linkId: string; -}; - -/** @internal */ -export const DeleteStatusPageLinkRequest$inboundSchema: z.ZodType< - DeleteStatusPageLinkRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - link_id: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "link_id": "linkId", - }); -}); - -/** @internal */ -export type DeleteStatusPageLinkRequest$Outbound = { - nunc_connection_id: string; - link_id: string; -}; - -/** @internal */ -export const DeleteStatusPageLinkRequest$outboundSchema: z.ZodType< - DeleteStatusPageLinkRequest$Outbound, - z.ZodTypeDef, - DeleteStatusPageLinkRequest -> = z.object({ - nuncConnectionId: z.string(), - linkId: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - linkId: "link_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteStatusPageLinkRequest$ { - /** @deprecated use `DeleteStatusPageLinkRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteStatusPageLinkRequest$inboundSchema; - /** @deprecated use `DeleteStatusPageLinkRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteStatusPageLinkRequest$outboundSchema; - /** @deprecated use `DeleteStatusPageLinkRequest$Outbound` instead. */ - export type Outbound = DeleteStatusPageLinkRequest$Outbound; -} - -export function deleteStatusPageLinkRequestToJSON( - deleteStatusPageLinkRequest: DeleteStatusPageLinkRequest, -): string { - return JSON.stringify( - DeleteStatusPageLinkRequest$outboundSchema.parse( - deleteStatusPageLinkRequest, - ), - ); -} - -export function deleteStatusPageLinkRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteStatusPageLinkRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteStatusPageLinkRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletestatuspagesubscribers.ts b/src/models/operations/deletestatuspagesubscribers.ts deleted file mode 100644 index 6d9510bb..00000000 --- a/src/models/operations/deletestatuspagesubscribers.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteStatusPageSubscribersRequest = { - nuncConnectionId: string; - /** - * A list of subscriber IDs to unsubscribe. - */ - subscriberIds: string; -}; - -/** @internal */ -export const DeleteStatusPageSubscribersRequest$inboundSchema: z.ZodType< - DeleteStatusPageSubscribersRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - subscriber_ids: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "subscriber_ids": "subscriberIds", - }); -}); - -/** @internal */ -export type DeleteStatusPageSubscribersRequest$Outbound = { - nunc_connection_id: string; - subscriber_ids: string; -}; - -/** @internal */ -export const DeleteStatusPageSubscribersRequest$outboundSchema: z.ZodType< - DeleteStatusPageSubscribersRequest$Outbound, - z.ZodTypeDef, - DeleteStatusPageSubscribersRequest -> = z.object({ - nuncConnectionId: z.string(), - subscriberIds: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - subscriberIds: "subscriber_ids", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteStatusPageSubscribersRequest$ { - /** @deprecated use `DeleteStatusPageSubscribersRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteStatusPageSubscribersRequest$inboundSchema; - /** @deprecated use `DeleteStatusPageSubscribersRequest$outboundSchema` instead. */ - export const outboundSchema = - DeleteStatusPageSubscribersRequest$outboundSchema; - /** @deprecated use `DeleteStatusPageSubscribersRequest$Outbound` instead. */ - export type Outbound = DeleteStatusPageSubscribersRequest$Outbound; -} - -export function deleteStatusPageSubscribersRequestToJSON( - deleteStatusPageSubscribersRequest: DeleteStatusPageSubscribersRequest, -): string { - return JSON.stringify( - DeleteStatusPageSubscribersRequest$outboundSchema.parse( - deleteStatusPageSubscribersRequest, - ), - ); -} - -export function deleteStatusPageSubscribersRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - DeleteStatusPageSubscribersRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteStatusPageSubscribersRequest' from JSON`, - ); -} diff --git a/src/models/operations/deleteteam.ts b/src/models/operations/deleteteam.ts new file mode 100644 index 00000000..6fc06750 --- /dev/null +++ b/src/models/operations/deleteteam.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteTeamRequest = { + teamId: string; +}; + +/** @internal */ +export const DeleteTeamRequest$inboundSchema: z.ZodType< + DeleteTeamRequest, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.string(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + }); +}); + +/** @internal */ +export type DeleteTeamRequest$Outbound = { + team_id: string; +}; + +/** @internal */ +export const DeleteTeamRequest$outboundSchema: z.ZodType< + DeleteTeamRequest$Outbound, + z.ZodTypeDef, + DeleteTeamRequest +> = z.object({ + teamId: z.string(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteTeamRequest$ { + /** @deprecated use `DeleteTeamRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteTeamRequest$inboundSchema; + /** @deprecated use `DeleteTeamRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteTeamRequest$outboundSchema; + /** @deprecated use `DeleteTeamRequest$Outbound` instead. */ + export type Outbound = DeleteTeamRequest$Outbound; +} + +export function deleteTeamRequestToJSON( + deleteTeamRequest: DeleteTeamRequest, +): string { + return JSON.stringify( + DeleteTeamRequest$outboundSchema.parse(deleteTeamRequest), + ); +} + +export function deleteTeamRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteTeamRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteTeamRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteteamscheduleshift.ts b/src/models/operations/deleteteamscheduleshift.ts deleted file mode 100644 index 6ce6840c..00000000 --- a/src/models/operations/deleteteamscheduleshift.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteTeamScheduleShiftRequest = { - id: string; - teamId: string; - scheduleId: string; -}; - -/** @internal */ -export const DeleteTeamScheduleShiftRequest$inboundSchema: z.ZodType< - DeleteTeamScheduleShiftRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - team_id: z.string(), - schedule_id: z.string(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "schedule_id": "scheduleId", - }); -}); - -/** @internal */ -export type DeleteTeamScheduleShiftRequest$Outbound = { - id: string; - team_id: string; - schedule_id: string; -}; - -/** @internal */ -export const DeleteTeamScheduleShiftRequest$outboundSchema: z.ZodType< - DeleteTeamScheduleShiftRequest$Outbound, - z.ZodTypeDef, - DeleteTeamScheduleShiftRequest -> = z.object({ - id: z.string(), - teamId: z.string(), - scheduleId: z.string(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - scheduleId: "schedule_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteTeamScheduleShiftRequest$ { - /** @deprecated use `DeleteTeamScheduleShiftRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteTeamScheduleShiftRequest$inboundSchema; - /** @deprecated use `DeleteTeamScheduleShiftRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteTeamScheduleShiftRequest$outboundSchema; - /** @deprecated use `DeleteTeamScheduleShiftRequest$Outbound` instead. */ - export type Outbound = DeleteTeamScheduleShiftRequest$Outbound; -} - -export function deleteTeamScheduleShiftRequestToJSON( - deleteTeamScheduleShiftRequest: DeleteTeamScheduleShiftRequest, -): string { - return JSON.stringify( - DeleteTeamScheduleShiftRequest$outboundSchema.parse( - deleteTeamScheduleShiftRequest, - ), - ); -} - -export function deleteTeamScheduleShiftRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteTeamScheduleShiftRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteTeamScheduleShiftRequest' from JSON`, - ); -} diff --git a/src/models/operations/deleteticketingfieldmap.ts b/src/models/operations/deleteticketingfieldmap.ts new file mode 100644 index 00000000..7406369b --- /dev/null +++ b/src/models/operations/deleteticketingfieldmap.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteTicketingFieldMapRequest = { + mapId: string; + ticketingProjectId: string; +}; + +/** @internal */ +export const DeleteTicketingFieldMapRequest$inboundSchema: z.ZodType< + DeleteTicketingFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + map_id: z.string(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "map_id": "mapId", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type DeleteTicketingFieldMapRequest$Outbound = { + map_id: string; + ticketing_project_id: string; +}; + +/** @internal */ +export const DeleteTicketingFieldMapRequest$outboundSchema: z.ZodType< + DeleteTicketingFieldMapRequest$Outbound, + z.ZodTypeDef, + DeleteTicketingFieldMapRequest +> = z.object({ + mapId: z.string(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + mapId: "map_id", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteTicketingFieldMapRequest$ { + /** @deprecated use `DeleteTicketingFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteTicketingFieldMapRequest$inboundSchema; + /** @deprecated use `DeleteTicketingFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteTicketingFieldMapRequest$outboundSchema; + /** @deprecated use `DeleteTicketingFieldMapRequest$Outbound` instead. */ + export type Outbound = DeleteTicketingFieldMapRequest$Outbound; +} + +export function deleteTicketingFieldMapRequestToJSON( + deleteTicketingFieldMapRequest: DeleteTicketingFieldMapRequest, +): string { + return JSON.stringify( + DeleteTicketingFieldMapRequest$outboundSchema.parse( + deleteTicketingFieldMapRequest, + ), + ); +} + +export function deleteTicketingFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteTicketingFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteTicketingFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/deleteticketingprojectfieldmap.ts b/src/models/operations/deleteticketingprojectfieldmap.ts deleted file mode 100644 index 72a7d86c..00000000 --- a/src/models/operations/deleteticketingprojectfieldmap.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type DeleteTicketingProjectFieldMapRequest = { - mapId: string; - ticketingProjectId: string; -}; - -/** @internal */ -export const DeleteTicketingProjectFieldMapRequest$inboundSchema: z.ZodType< - DeleteTicketingProjectFieldMapRequest, - z.ZodTypeDef, - unknown -> = z.object({ - map_id: z.string(), - ticketing_project_id: z.string(), -}).transform((v) => { - return remap$(v, { - "map_id": "mapId", - "ticketing_project_id": "ticketingProjectId", - }); -}); - -/** @internal */ -export type DeleteTicketingProjectFieldMapRequest$Outbound = { - map_id: string; - ticketing_project_id: string; -}; - -/** @internal */ -export const DeleteTicketingProjectFieldMapRequest$outboundSchema: z.ZodType< - DeleteTicketingProjectFieldMapRequest$Outbound, - z.ZodTypeDef, - DeleteTicketingProjectFieldMapRequest -> = z.object({ - mapId: z.string(), - ticketingProjectId: z.string(), -}).transform((v) => { - return remap$(v, { - mapId: "map_id", - ticketingProjectId: "ticketing_project_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteTicketingProjectFieldMapRequest$ { - /** @deprecated use `DeleteTicketingProjectFieldMapRequest$inboundSchema` instead. */ - export const inboundSchema = - DeleteTicketingProjectFieldMapRequest$inboundSchema; - /** @deprecated use `DeleteTicketingProjectFieldMapRequest$outboundSchema` instead. */ - export const outboundSchema = - DeleteTicketingProjectFieldMapRequest$outboundSchema; - /** @deprecated use `DeleteTicketingProjectFieldMapRequest$Outbound` instead. */ - export type Outbound = DeleteTicketingProjectFieldMapRequest$Outbound; -} - -export function deleteTicketingProjectFieldMapRequestToJSON( - deleteTicketingProjectFieldMapRequest: DeleteTicketingProjectFieldMapRequest, -): string { - return JSON.stringify( - DeleteTicketingProjectFieldMapRequest$outboundSchema.parse( - deleteTicketingProjectFieldMapRequest, - ), - ); -} - -export function deleteTicketingProjectFieldMapRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - DeleteTicketingProjectFieldMapRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteTicketingProjectFieldMapRequest' from JSON`, - ); -} diff --git a/src/models/operations/deletetranscriptentry.ts b/src/models/operations/deletetranscriptentry.ts new file mode 100644 index 00000000..b8e8cc98 --- /dev/null +++ b/src/models/operations/deletetranscriptentry.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type DeleteTranscriptEntryRequest = { + transcriptId: string; + incidentId: string; +}; + +/** @internal */ +export const DeleteTranscriptEntryRequest$inboundSchema: z.ZodType< + DeleteTranscriptEntryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + transcript_id: z.string(), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "transcript_id": "transcriptId", + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type DeleteTranscriptEntryRequest$Outbound = { + transcript_id: string; + incident_id: string; +}; + +/** @internal */ +export const DeleteTranscriptEntryRequest$outboundSchema: z.ZodType< + DeleteTranscriptEntryRequest$Outbound, + z.ZodTypeDef, + DeleteTranscriptEntryRequest +> = z.object({ + transcriptId: z.string(), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + transcriptId: "transcript_id", + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DeleteTranscriptEntryRequest$ { + /** @deprecated use `DeleteTranscriptEntryRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteTranscriptEntryRequest$inboundSchema; + /** @deprecated use `DeleteTranscriptEntryRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteTranscriptEntryRequest$outboundSchema; + /** @deprecated use `DeleteTranscriptEntryRequest$Outbound` instead. */ + export type Outbound = DeleteTranscriptEntryRequest$Outbound; +} + +export function deleteTranscriptEntryRequestToJSON( + deleteTranscriptEntryRequest: DeleteTranscriptEntryRequest, +): string { + return JSON.stringify( + DeleteTranscriptEntryRequest$outboundSchema.parse( + deleteTranscriptEntryRequest, + ), + ); +} + +export function deleteTranscriptEntryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => DeleteTranscriptEntryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'DeleteTranscriptEntryRequest' from JSON`, + ); +} diff --git a/src/models/operations/exportincidentretrospectives.ts b/src/models/operations/exportincidentretrospectives.ts new file mode 100644 index 00000000..acf5d16d --- /dev/null +++ b/src/models/operations/exportincidentretrospectives.ts @@ -0,0 +1,213 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The name of the integration to export the retrospective to. + */ +export const IntegrationSlug = { + ConfluenceCloud: "confluence_cloud", + GoogleDocs: "google_docs", +} as const; +/** + * The name of the integration to export the retrospective to. + */ +export type IntegrationSlug = ClosedEnum; + +export type ExportIncidentRetrospectivesRequestBody = { + /** + * The name of the integration to export the retrospective to. + */ + integrationSlug: IntegrationSlug; + /** + * The ID of the parent page to export the retrospective to. + */ + parentPageId?: string | null | undefined; +}; + +export type ExportIncidentRetrospectivesRequest = { + incidentId: string; + requestBody: ExportIncidentRetrospectivesRequestBody; +}; + +/** @internal */ +export const IntegrationSlug$inboundSchema: z.ZodNativeEnum< + typeof IntegrationSlug +> = z.nativeEnum(IntegrationSlug); + +/** @internal */ +export const IntegrationSlug$outboundSchema: z.ZodNativeEnum< + typeof IntegrationSlug +> = IntegrationSlug$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace IntegrationSlug$ { + /** @deprecated use `IntegrationSlug$inboundSchema` instead. */ + export const inboundSchema = IntegrationSlug$inboundSchema; + /** @deprecated use `IntegrationSlug$outboundSchema` instead. */ + export const outboundSchema = IntegrationSlug$outboundSchema; +} + +/** @internal */ +export const ExportIncidentRetrospectivesRequestBody$inboundSchema: z.ZodType< + ExportIncidentRetrospectivesRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: IntegrationSlug$inboundSchema, + parent_page_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "parent_page_id": "parentPageId", + }); +}); + +/** @internal */ +export type ExportIncidentRetrospectivesRequestBody$Outbound = { + integration_slug: string; + parent_page_id?: string | null | undefined; +}; + +/** @internal */ +export const ExportIncidentRetrospectivesRequestBody$outboundSchema: z.ZodType< + ExportIncidentRetrospectivesRequestBody$Outbound, + z.ZodTypeDef, + ExportIncidentRetrospectivesRequestBody +> = z.object({ + integrationSlug: IntegrationSlug$outboundSchema, + parentPageId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + parentPageId: "parent_page_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExportIncidentRetrospectivesRequestBody$ { + /** @deprecated use `ExportIncidentRetrospectivesRequestBody$inboundSchema` instead. */ + export const inboundSchema = + ExportIncidentRetrospectivesRequestBody$inboundSchema; + /** @deprecated use `ExportIncidentRetrospectivesRequestBody$outboundSchema` instead. */ + export const outboundSchema = + ExportIncidentRetrospectivesRequestBody$outboundSchema; + /** @deprecated use `ExportIncidentRetrospectivesRequestBody$Outbound` instead. */ + export type Outbound = ExportIncidentRetrospectivesRequestBody$Outbound; +} + +export function exportIncidentRetrospectivesRequestBodyToJSON( + exportIncidentRetrospectivesRequestBody: + ExportIncidentRetrospectivesRequestBody, +): string { + return JSON.stringify( + ExportIncidentRetrospectivesRequestBody$outboundSchema.parse( + exportIncidentRetrospectivesRequestBody, + ), + ); +} + +export function exportIncidentRetrospectivesRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + ExportIncidentRetrospectivesRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ExportIncidentRetrospectivesRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ExportIncidentRetrospectivesRequestBody' from JSON`, + ); +} + +/** @internal */ +export const ExportIncidentRetrospectivesRequest$inboundSchema: z.ZodType< + ExportIncidentRetrospectivesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + RequestBody: z.lazy(() => + ExportIncidentRetrospectivesRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type ExportIncidentRetrospectivesRequest$Outbound = { + incident_id: string; + RequestBody: ExportIncidentRetrospectivesRequestBody$Outbound; +}; + +/** @internal */ +export const ExportIncidentRetrospectivesRequest$outboundSchema: z.ZodType< + ExportIncidentRetrospectivesRequest$Outbound, + z.ZodTypeDef, + ExportIncidentRetrospectivesRequest +> = z.object({ + incidentId: z.string(), + requestBody: z.lazy(() => + ExportIncidentRetrospectivesRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExportIncidentRetrospectivesRequest$ { + /** @deprecated use `ExportIncidentRetrospectivesRequest$inboundSchema` instead. */ + export const inboundSchema = + ExportIncidentRetrospectivesRequest$inboundSchema; + /** @deprecated use `ExportIncidentRetrospectivesRequest$outboundSchema` instead. */ + export const outboundSchema = + ExportIncidentRetrospectivesRequest$outboundSchema; + /** @deprecated use `ExportIncidentRetrospectivesRequest$Outbound` instead. */ + export type Outbound = ExportIncidentRetrospectivesRequest$Outbound; +} + +export function exportIncidentRetrospectivesRequestToJSON( + exportIncidentRetrospectivesRequest: ExportIncidentRetrospectivesRequest, +): string { + return JSON.stringify( + ExportIncidentRetrospectivesRequest$outboundSchema.parse( + exportIncidentRetrospectivesRequest, + ), + ); +} + +export function exportIncidentRetrospectivesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ExportIncidentRetrospectivesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExportIncidentRetrospectivesRequest' from JSON`, + ); +} diff --git a/src/models/operations/generateaudiencesummary.ts b/src/models/operations/generateaudiencesummary.ts new file mode 100644 index 00000000..04ed8b64 --- /dev/null +++ b/src/models/operations/generateaudiencesummary.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GenerateAudienceSummaryRequestBody = { + /** + * Whether to force regeneration of the summary + */ + forceRegenerate?: boolean | null | undefined; +}; + +export type GenerateAudienceSummaryRequest = { + /** + * Unique identifier of the audience + */ + audienceId: string; + /** + * Unique identifier of the incident to summarize + */ + incidentId: string; + requestBody?: GenerateAudienceSummaryRequestBody | undefined; +}; + +/** @internal */ +export const GenerateAudienceSummaryRequestBody$inboundSchema: z.ZodType< + GenerateAudienceSummaryRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + force_regenerate: z.nullable(z.boolean().default(true)), +}).transform((v) => { + return remap$(v, { + "force_regenerate": "forceRegenerate", + }); +}); + +/** @internal */ +export type GenerateAudienceSummaryRequestBody$Outbound = { + force_regenerate: boolean | null; +}; + +/** @internal */ +export const GenerateAudienceSummaryRequestBody$outboundSchema: z.ZodType< + GenerateAudienceSummaryRequestBody$Outbound, + z.ZodTypeDef, + GenerateAudienceSummaryRequestBody +> = z.object({ + forceRegenerate: z.nullable(z.boolean().default(true)), +}).transform((v) => { + return remap$(v, { + forceRegenerate: "force_regenerate", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GenerateAudienceSummaryRequestBody$ { + /** @deprecated use `GenerateAudienceSummaryRequestBody$inboundSchema` instead. */ + export const inboundSchema = GenerateAudienceSummaryRequestBody$inboundSchema; + /** @deprecated use `GenerateAudienceSummaryRequestBody$outboundSchema` instead. */ + export const outboundSchema = + GenerateAudienceSummaryRequestBody$outboundSchema; + /** @deprecated use `GenerateAudienceSummaryRequestBody$Outbound` instead. */ + export type Outbound = GenerateAudienceSummaryRequestBody$Outbound; +} + +export function generateAudienceSummaryRequestBodyToJSON( + generateAudienceSummaryRequestBody: GenerateAudienceSummaryRequestBody, +): string { + return JSON.stringify( + GenerateAudienceSummaryRequestBody$outboundSchema.parse( + generateAudienceSummaryRequestBody, + ), + ); +} + +export function generateAudienceSummaryRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GenerateAudienceSummaryRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GenerateAudienceSummaryRequestBody' from JSON`, + ); +} + +/** @internal */ +export const GenerateAudienceSummaryRequest$inboundSchema: z.ZodType< + GenerateAudienceSummaryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + audience_id: z.string(), + incident_id: z.string(), + RequestBody: z.lazy(() => GenerateAudienceSummaryRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "audience_id": "audienceId", + "incident_id": "incidentId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type GenerateAudienceSummaryRequest$Outbound = { + audience_id: string; + incident_id: string; + RequestBody?: GenerateAudienceSummaryRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const GenerateAudienceSummaryRequest$outboundSchema: z.ZodType< + GenerateAudienceSummaryRequest$Outbound, + z.ZodTypeDef, + GenerateAudienceSummaryRequest +> = z.object({ + audienceId: z.string(), + incidentId: z.string(), + requestBody: z.lazy(() => GenerateAudienceSummaryRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + audienceId: "audience_id", + incidentId: "incident_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GenerateAudienceSummaryRequest$ { + /** @deprecated use `GenerateAudienceSummaryRequest$inboundSchema` instead. */ + export const inboundSchema = GenerateAudienceSummaryRequest$inboundSchema; + /** @deprecated use `GenerateAudienceSummaryRequest$outboundSchema` instead. */ + export const outboundSchema = GenerateAudienceSummaryRequest$outboundSchema; + /** @deprecated use `GenerateAudienceSummaryRequest$Outbound` instead. */ + export type Outbound = GenerateAudienceSummaryRequest$Outbound; +} + +export function generateAudienceSummaryRequestToJSON( + generateAudienceSummaryRequest: GenerateAudienceSummaryRequest, +): string { + return JSON.stringify( + GenerateAudienceSummaryRequest$outboundSchema.parse( + generateAudienceSummaryRequest, + ), + ); +} + +export function generateAudienceSummaryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GenerateAudienceSummaryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GenerateAudienceSummaryRequest' from JSON`, + ); +} diff --git a/src/models/operations/getaiincidentsummaryvotestatus.ts b/src/models/operations/getaiincidentsummaryvotestatus.ts new file mode 100644 index 00000000..42766fbd --- /dev/null +++ b/src/models/operations/getaiincidentsummaryvotestatus.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetAiIncidentSummaryVoteStatusRequest = { + incidentId: string; + generatedSummaryId: string; +}; + +/** @internal */ +export const GetAiIncidentSummaryVoteStatusRequest$inboundSchema: z.ZodType< + GetAiIncidentSummaryVoteStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + generated_summary_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "generated_summary_id": "generatedSummaryId", + }); +}); + +/** @internal */ +export type GetAiIncidentSummaryVoteStatusRequest$Outbound = { + incident_id: string; + generated_summary_id: string; +}; + +/** @internal */ +export const GetAiIncidentSummaryVoteStatusRequest$outboundSchema: z.ZodType< + GetAiIncidentSummaryVoteStatusRequest$Outbound, + z.ZodTypeDef, + GetAiIncidentSummaryVoteStatusRequest +> = z.object({ + incidentId: z.string(), + generatedSummaryId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + generatedSummaryId: "generated_summary_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAiIncidentSummaryVoteStatusRequest$ { + /** @deprecated use `GetAiIncidentSummaryVoteStatusRequest$inboundSchema` instead. */ + export const inboundSchema = + GetAiIncidentSummaryVoteStatusRequest$inboundSchema; + /** @deprecated use `GetAiIncidentSummaryVoteStatusRequest$outboundSchema` instead. */ + export const outboundSchema = + GetAiIncidentSummaryVoteStatusRequest$outboundSchema; + /** @deprecated use `GetAiIncidentSummaryVoteStatusRequest$Outbound` instead. */ + export type Outbound = GetAiIncidentSummaryVoteStatusRequest$Outbound; +} + +export function getAiIncidentSummaryVoteStatusRequestToJSON( + getAiIncidentSummaryVoteStatusRequest: GetAiIncidentSummaryVoteStatusRequest, +): string { + return JSON.stringify( + GetAiIncidentSummaryVoteStatusRequest$outboundSchema.parse( + getAiIncidentSummaryVoteStatusRequest, + ), + ); +} + +export function getAiIncidentSummaryVoteStatusRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetAiIncidentSummaryVoteStatusRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAiIncidentSummaryVoteStatusRequest' from JSON`, + ); +} diff --git a/src/models/operations/getaudience.ts b/src/models/operations/getaudience.ts new file mode 100644 index 00000000..8fb56fea --- /dev/null +++ b/src/models/operations/getaudience.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetAudienceRequest = { + /** + * Unique identifier of the audience + */ + audienceId: string; +}; + +/** @internal */ +export const GetAudienceRequest$inboundSchema: z.ZodType< + GetAudienceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + audience_id: z.string(), +}).transform((v) => { + return remap$(v, { + "audience_id": "audienceId", + }); +}); + +/** @internal */ +export type GetAudienceRequest$Outbound = { + audience_id: string; +}; + +/** @internal */ +export const GetAudienceRequest$outboundSchema: z.ZodType< + GetAudienceRequest$Outbound, + z.ZodTypeDef, + GetAudienceRequest +> = z.object({ + audienceId: z.string(), +}).transform((v) => { + return remap$(v, { + audienceId: "audience_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAudienceRequest$ { + /** @deprecated use `GetAudienceRequest$inboundSchema` instead. */ + export const inboundSchema = GetAudienceRequest$inboundSchema; + /** @deprecated use `GetAudienceRequest$outboundSchema` instead. */ + export const outboundSchema = GetAudienceRequest$outboundSchema; + /** @deprecated use `GetAudienceRequest$Outbound` instead. */ + export type Outbound = GetAudienceRequest$Outbound; +} + +export function getAudienceRequestToJSON( + getAudienceRequest: GetAudienceRequest, +): string { + return JSON.stringify( + GetAudienceRequest$outboundSchema.parse(getAudienceRequest), + ); +} + +export function getAudienceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAudienceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAudienceRequest' from JSON`, + ); +} diff --git a/src/models/operations/getaudiencesummary.ts b/src/models/operations/getaudiencesummary.ts new file mode 100644 index 00000000..566b5608 --- /dev/null +++ b/src/models/operations/getaudiencesummary.ts @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetAudienceSummaryRequest = { + /** + * Unique identifier of the audience + */ + audienceId: string; + /** + * Unique identifier of the incident to summarize + */ + incidentId: string; +}; + +/** @internal */ +export const GetAudienceSummaryRequest$inboundSchema: z.ZodType< + GetAudienceSummaryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + audience_id: z.string(), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "audience_id": "audienceId", + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type GetAudienceSummaryRequest$Outbound = { + audience_id: string; + incident_id: string; +}; + +/** @internal */ +export const GetAudienceSummaryRequest$outboundSchema: z.ZodType< + GetAudienceSummaryRequest$Outbound, + z.ZodTypeDef, + GetAudienceSummaryRequest +> = z.object({ + audienceId: z.string(), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + audienceId: "audience_id", + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetAudienceSummaryRequest$ { + /** @deprecated use `GetAudienceSummaryRequest$inboundSchema` instead. */ + export const inboundSchema = GetAudienceSummaryRequest$inboundSchema; + /** @deprecated use `GetAudienceSummaryRequest$outboundSchema` instead. */ + export const outboundSchema = GetAudienceSummaryRequest$outboundSchema; + /** @deprecated use `GetAudienceSummaryRequest$Outbound` instead. */ + export type Outbound = GetAudienceSummaryRequest$Outbound; +} + +export function getAudienceSummaryRequestToJSON( + getAudienceSummaryRequest: GetAudienceSummaryRequest, +): string { + return JSON.stringify( + GetAudienceSummaryRequest$outboundSchema.parse(getAudienceSummaryRequest), + ); +} + +export function getAudienceSummaryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAudienceSummaryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAudienceSummaryRequest' from JSON`, + ); +} diff --git a/src/models/operations/getawscloudtrailbatch.ts b/src/models/operations/getawscloudtrailbatch.ts index 745d0dcb..5ae095d8 100644 --- a/src/models/operations/getawscloudtrailbatch.ts +++ b/src/models/operations/getawscloudtrailbatch.ts @@ -7,13 +7,13 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type GetAwsCloudTrailBatchRequest = { +export type GetAwsCloudtrailBatchRequest = { id: string; }; /** @internal */ -export const GetAwsCloudTrailBatchRequest$inboundSchema: z.ZodType< - GetAwsCloudTrailBatchRequest, +export const GetAwsCloudtrailBatchRequest$inboundSchema: z.ZodType< + GetAwsCloudtrailBatchRequest, z.ZodTypeDef, unknown > = z.object({ @@ -21,15 +21,15 @@ export const GetAwsCloudTrailBatchRequest$inboundSchema: z.ZodType< }); /** @internal */ -export type GetAwsCloudTrailBatchRequest$Outbound = { +export type GetAwsCloudtrailBatchRequest$Outbound = { id: string; }; /** @internal */ -export const GetAwsCloudTrailBatchRequest$outboundSchema: z.ZodType< - GetAwsCloudTrailBatchRequest$Outbound, +export const GetAwsCloudtrailBatchRequest$outboundSchema: z.ZodType< + GetAwsCloudtrailBatchRequest$Outbound, z.ZodTypeDef, - GetAwsCloudTrailBatchRequest + GetAwsCloudtrailBatchRequest > = z.object({ id: z.string(), }); @@ -38,31 +38,31 @@ export const GetAwsCloudTrailBatchRequest$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetAwsCloudTrailBatchRequest$ { - /** @deprecated use `GetAwsCloudTrailBatchRequest$inboundSchema` instead. */ - export const inboundSchema = GetAwsCloudTrailBatchRequest$inboundSchema; - /** @deprecated use `GetAwsCloudTrailBatchRequest$outboundSchema` instead. */ - export const outboundSchema = GetAwsCloudTrailBatchRequest$outboundSchema; - /** @deprecated use `GetAwsCloudTrailBatchRequest$Outbound` instead. */ - export type Outbound = GetAwsCloudTrailBatchRequest$Outbound; +export namespace GetAwsCloudtrailBatchRequest$ { + /** @deprecated use `GetAwsCloudtrailBatchRequest$inboundSchema` instead. */ + export const inboundSchema = GetAwsCloudtrailBatchRequest$inboundSchema; + /** @deprecated use `GetAwsCloudtrailBatchRequest$outboundSchema` instead. */ + export const outboundSchema = GetAwsCloudtrailBatchRequest$outboundSchema; + /** @deprecated use `GetAwsCloudtrailBatchRequest$Outbound` instead. */ + export type Outbound = GetAwsCloudtrailBatchRequest$Outbound; } -export function getAwsCloudTrailBatchRequestToJSON( - getAwsCloudTrailBatchRequest: GetAwsCloudTrailBatchRequest, +export function getAwsCloudtrailBatchRequestToJSON( + getAwsCloudtrailBatchRequest: GetAwsCloudtrailBatchRequest, ): string { return JSON.stringify( - GetAwsCloudTrailBatchRequest$outboundSchema.parse( - getAwsCloudTrailBatchRequest, + GetAwsCloudtrailBatchRequest$outboundSchema.parse( + getAwsCloudtrailBatchRequest, ), ); } -export function getAwsCloudTrailBatchRequestFromJSON( +export function getAwsCloudtrailBatchRequestFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => GetAwsCloudTrailBatchRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetAwsCloudTrailBatchRequest' from JSON`, + (x) => GetAwsCloudtrailBatchRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAwsCloudtrailBatchRequest' from JSON`, ); } diff --git a/src/models/operations/getawscloudtrailbatchevents.ts b/src/models/operations/getawscloudtrailbatchevents.ts deleted file mode 100644 index 734af350..00000000 --- a/src/models/operations/getawscloudtrailbatchevents.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetAwsCloudtrailBatchEventsRequest = { - id: string; -}; - -/** @internal */ -export const GetAwsCloudtrailBatchEventsRequest$inboundSchema: z.ZodType< - GetAwsCloudtrailBatchEventsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type GetAwsCloudtrailBatchEventsRequest$Outbound = { - id: string; -}; - -/** @internal */ -export const GetAwsCloudtrailBatchEventsRequest$outboundSchema: z.ZodType< - GetAwsCloudtrailBatchEventsRequest$Outbound, - z.ZodTypeDef, - GetAwsCloudtrailBatchEventsRequest -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetAwsCloudtrailBatchEventsRequest$ { - /** @deprecated use `GetAwsCloudtrailBatchEventsRequest$inboundSchema` instead. */ - export const inboundSchema = GetAwsCloudtrailBatchEventsRequest$inboundSchema; - /** @deprecated use `GetAwsCloudtrailBatchEventsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetAwsCloudtrailBatchEventsRequest$outboundSchema; - /** @deprecated use `GetAwsCloudtrailBatchEventsRequest$Outbound` instead. */ - export type Outbound = GetAwsCloudtrailBatchEventsRequest$Outbound; -} - -export function getAwsCloudtrailBatchEventsRequestToJSON( - getAwsCloudtrailBatchEventsRequest: GetAwsCloudtrailBatchEventsRequest, -): string { - return JSON.stringify( - GetAwsCloudtrailBatchEventsRequest$outboundSchema.parse( - getAwsCloudtrailBatchEventsRequest, - ), - ); -} - -export function getAwsCloudtrailBatchEventsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetAwsCloudtrailBatchEventsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetAwsCloudtrailBatchEventsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getcomment.ts b/src/models/operations/getcomment.ts new file mode 100644 index 00000000..0f669e1d --- /dev/null +++ b/src/models/operations/getcomment.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetCommentRequest = { + commentId: string; + conversationId: string; +}; + +/** @internal */ +export const GetCommentRequest$inboundSchema: z.ZodType< + GetCommentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + comment_id: z.string(), + conversation_id: z.string(), +}).transform((v) => { + return remap$(v, { + "comment_id": "commentId", + "conversation_id": "conversationId", + }); +}); + +/** @internal */ +export type GetCommentRequest$Outbound = { + comment_id: string; + conversation_id: string; +}; + +/** @internal */ +export const GetCommentRequest$outboundSchema: z.ZodType< + GetCommentRequest$Outbound, + z.ZodTypeDef, + GetCommentRequest +> = z.object({ + commentId: z.string(), + conversationId: z.string(), +}).transform((v) => { + return remap$(v, { + commentId: "comment_id", + conversationId: "conversation_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetCommentRequest$ { + /** @deprecated use `GetCommentRequest$inboundSchema` instead. */ + export const inboundSchema = GetCommentRequest$inboundSchema; + /** @deprecated use `GetCommentRequest$outboundSchema` instead. */ + export const outboundSchema = GetCommentRequest$outboundSchema; + /** @deprecated use `GetCommentRequest$Outbound` instead. */ + export type Outbound = GetCommentRequest$Outbound; +} + +export function getCommentRequestToJSON( + getCommentRequest: GetCommentRequest, +): string { + return JSON.stringify( + GetCommentRequest$outboundSchema.parse(getCommentRequest), + ); +} + +export function getCommentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetCommentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetCommentRequest' from JSON`, + ); +} diff --git a/src/models/operations/getconferencebridgetranslation.ts b/src/models/operations/getconferencebridgetranslation.ts new file mode 100644 index 00000000..a77feb8f --- /dev/null +++ b/src/models/operations/getconferencebridgetranslation.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetConferenceBridgeTranslationRequest = { + /** + * The ID of the conference bridge + */ + id: string; + /** + * The language code of the translation + */ + languageCode: string; + incidentId: string; +}; + +/** @internal */ +export const GetConferenceBridgeTranslationRequest$inboundSchema: z.ZodType< + GetConferenceBridgeTranslationRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + language_code: z.string(), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "language_code": "languageCode", + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type GetConferenceBridgeTranslationRequest$Outbound = { + id: string; + language_code: string; + incident_id: string; +}; + +/** @internal */ +export const GetConferenceBridgeTranslationRequest$outboundSchema: z.ZodType< + GetConferenceBridgeTranslationRequest$Outbound, + z.ZodTypeDef, + GetConferenceBridgeTranslationRequest +> = z.object({ + id: z.string(), + languageCode: z.string(), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + languageCode: "language_code", + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetConferenceBridgeTranslationRequest$ { + /** @deprecated use `GetConferenceBridgeTranslationRequest$inboundSchema` instead. */ + export const inboundSchema = + GetConferenceBridgeTranslationRequest$inboundSchema; + /** @deprecated use `GetConferenceBridgeTranslationRequest$outboundSchema` instead. */ + export const outboundSchema = + GetConferenceBridgeTranslationRequest$outboundSchema; + /** @deprecated use `GetConferenceBridgeTranslationRequest$Outbound` instead. */ + export type Outbound = GetConferenceBridgeTranslationRequest$Outbound; +} + +export function getConferenceBridgeTranslationRequestToJSON( + getConferenceBridgeTranslationRequest: GetConferenceBridgeTranslationRequest, +): string { + return JSON.stringify( + GetConferenceBridgeTranslationRequest$outboundSchema.parse( + getConferenceBridgeTranslationRequest, + ), + ); +} + +export function getConferenceBridgeTranslationRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetConferenceBridgeTranslationRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetConferenceBridgeTranslationRequest' from JSON`, + ); +} diff --git a/src/models/operations/getconfigurationoptions.ts b/src/models/operations/getconfigurationoptions.ts new file mode 100644 index 00000000..32c4271a --- /dev/null +++ b/src/models/operations/getconfigurationoptions.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetConfigurationOptionsRequest = { + ticketingProjectId: string; +}; + +/** @internal */ +export const GetConfigurationOptionsRequest$inboundSchema: z.ZodType< + GetConfigurationOptionsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type GetConfigurationOptionsRequest$Outbound = { + ticketing_project_id: string; +}; + +/** @internal */ +export const GetConfigurationOptionsRequest$outboundSchema: z.ZodType< + GetConfigurationOptionsRequest$Outbound, + z.ZodTypeDef, + GetConfigurationOptionsRequest +> = z.object({ + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetConfigurationOptionsRequest$ { + /** @deprecated use `GetConfigurationOptionsRequest$inboundSchema` instead. */ + export const inboundSchema = GetConfigurationOptionsRequest$inboundSchema; + /** @deprecated use `GetConfigurationOptionsRequest$outboundSchema` instead. */ + export const outboundSchema = GetConfigurationOptionsRequest$outboundSchema; + /** @deprecated use `GetConfigurationOptionsRequest$Outbound` instead. */ + export type Outbound = GetConfigurationOptionsRequest$Outbound; +} + +export function getConfigurationOptionsRequestToJSON( + getConfigurationOptionsRequest: GetConfigurationOptionsRequest, +): string { + return JSON.stringify( + GetConfigurationOptionsRequest$outboundSchema.parse( + getConfigurationOptionsRequest, + ), + ); +} + +export function getConfigurationOptionsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetConfigurationOptionsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetConfigurationOptionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getconversationcomment.ts b/src/models/operations/getconversationcomment.ts deleted file mode 100644 index 3f789a07..00000000 --- a/src/models/operations/getconversationcomment.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetConversationCommentRequest = { - commentId: string; - conversationId: string; -}; - -/** @internal */ -export const GetConversationCommentRequest$inboundSchema: z.ZodType< - GetConversationCommentRequest, - z.ZodTypeDef, - unknown -> = z.object({ - comment_id: z.string(), - conversation_id: z.string(), -}).transform((v) => { - return remap$(v, { - "comment_id": "commentId", - "conversation_id": "conversationId", - }); -}); - -/** @internal */ -export type GetConversationCommentRequest$Outbound = { - comment_id: string; - conversation_id: string; -}; - -/** @internal */ -export const GetConversationCommentRequest$outboundSchema: z.ZodType< - GetConversationCommentRequest$Outbound, - z.ZodTypeDef, - GetConversationCommentRequest -> = z.object({ - commentId: z.string(), - conversationId: z.string(), -}).transform((v) => { - return remap$(v, { - commentId: "comment_id", - conversationId: "conversation_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetConversationCommentRequest$ { - /** @deprecated use `GetConversationCommentRequest$inboundSchema` instead. */ - export const inboundSchema = GetConversationCommentRequest$inboundSchema; - /** @deprecated use `GetConversationCommentRequest$outboundSchema` instead. */ - export const outboundSchema = GetConversationCommentRequest$outboundSchema; - /** @deprecated use `GetConversationCommentRequest$Outbound` instead. */ - export type Outbound = GetConversationCommentRequest$Outbound; -} - -export function getConversationCommentRequestToJSON( - getConversationCommentRequest: GetConversationCommentRequest, -): string { - return JSON.stringify( - GetConversationCommentRequest$outboundSchema.parse( - getConversationCommentRequest, - ), - ); -} - -export function getConversationCommentRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetConversationCommentRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetConversationCommentRequest' from JSON`, - ); -} diff --git a/src/models/operations/getcustomfieldselectoptions.ts b/src/models/operations/getcustomfieldselectoptions.ts deleted file mode 100644 index 654a3e55..00000000 --- a/src/models/operations/getcustomfieldselectoptions.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetCustomFieldSelectOptionsRequest = { - fieldId: string; - /** - * Text string of a query for filtering values. - */ - query?: string | undefined; - /** - * If true, return all versions of the custom field definition. - */ - allVersions?: boolean | undefined; -}; - -/** @internal */ -export const GetCustomFieldSelectOptionsRequest$inboundSchema: z.ZodType< - GetCustomFieldSelectOptionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - field_id: z.string(), - query: z.string().optional(), - all_versions: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "field_id": "fieldId", - "all_versions": "allVersions", - }); -}); - -/** @internal */ -export type GetCustomFieldSelectOptionsRequest$Outbound = { - field_id: string; - query?: string | undefined; - all_versions?: boolean | undefined; -}; - -/** @internal */ -export const GetCustomFieldSelectOptionsRequest$outboundSchema: z.ZodType< - GetCustomFieldSelectOptionsRequest$Outbound, - z.ZodTypeDef, - GetCustomFieldSelectOptionsRequest -> = z.object({ - fieldId: z.string(), - query: z.string().optional(), - allVersions: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - fieldId: "field_id", - allVersions: "all_versions", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCustomFieldSelectOptionsRequest$ { - /** @deprecated use `GetCustomFieldSelectOptionsRequest$inboundSchema` instead. */ - export const inboundSchema = GetCustomFieldSelectOptionsRequest$inboundSchema; - /** @deprecated use `GetCustomFieldSelectOptionsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetCustomFieldSelectOptionsRequest$outboundSchema; - /** @deprecated use `GetCustomFieldSelectOptionsRequest$Outbound` instead. */ - export type Outbound = GetCustomFieldSelectOptionsRequest$Outbound; -} - -export function getCustomFieldSelectOptionsRequestToJSON( - getCustomFieldSelectOptionsRequest: GetCustomFieldSelectOptionsRequest, -): string { - return JSON.stringify( - GetCustomFieldSelectOptionsRequest$outboundSchema.parse( - getCustomFieldSelectOptionsRequest, - ), - ); -} - -export function getCustomFieldSelectOptionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetCustomFieldSelectOptionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCustomFieldSelectOptionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getfunctionalityservices.ts b/src/models/operations/getfunctionalityservices.ts deleted file mode 100644 index 239342da..00000000 --- a/src/models/operations/getfunctionalityservices.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetFunctionalityServicesRequest = { - functionalityId: string; -}; - -/** @internal */ -export const GetFunctionalityServicesRequest$inboundSchema: z.ZodType< - GetFunctionalityServicesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - functionality_id: z.string(), -}).transform((v) => { - return remap$(v, { - "functionality_id": "functionalityId", - }); -}); - -/** @internal */ -export type GetFunctionalityServicesRequest$Outbound = { - functionality_id: string; -}; - -/** @internal */ -export const GetFunctionalityServicesRequest$outboundSchema: z.ZodType< - GetFunctionalityServicesRequest$Outbound, - z.ZodTypeDef, - GetFunctionalityServicesRequest -> = z.object({ - functionalityId: z.string(), -}).transform((v) => { - return remap$(v, { - functionalityId: "functionality_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetFunctionalityServicesRequest$ { - /** @deprecated use `GetFunctionalityServicesRequest$inboundSchema` instead. */ - export const inboundSchema = GetFunctionalityServicesRequest$inboundSchema; - /** @deprecated use `GetFunctionalityServicesRequest$outboundSchema` instead. */ - export const outboundSchema = GetFunctionalityServicesRequest$outboundSchema; - /** @deprecated use `GetFunctionalityServicesRequest$Outbound` instead. */ - export type Outbound = GetFunctionalityServicesRequest$Outbound; -} - -export function getFunctionalityServicesRequestToJSON( - getFunctionalityServicesRequest: GetFunctionalityServicesRequest, -): string { - return JSON.stringify( - GetFunctionalityServicesRequest$outboundSchema.parse( - getFunctionalityServicesRequest, - ), - ); -} - -export function getFunctionalityServicesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetFunctionalityServicesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetFunctionalityServicesRequest' from JSON`, - ); -} diff --git a/src/models/operations/getinboundfieldmap.ts b/src/models/operations/getinboundfieldmap.ts new file mode 100644 index 00000000..58e23802 --- /dev/null +++ b/src/models/operations/getinboundfieldmap.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetInboundFieldMapRequest = { + mapId: string; + ticketingProjectId: string; +}; + +/** @internal */ +export const GetInboundFieldMapRequest$inboundSchema: z.ZodType< + GetInboundFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + map_id: z.string(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "map_id": "mapId", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type GetInboundFieldMapRequest$Outbound = { + map_id: string; + ticketing_project_id: string; +}; + +/** @internal */ +export const GetInboundFieldMapRequest$outboundSchema: z.ZodType< + GetInboundFieldMapRequest$Outbound, + z.ZodTypeDef, + GetInboundFieldMapRequest +> = z.object({ + mapId: z.string(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + mapId: "map_id", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetInboundFieldMapRequest$ { + /** @deprecated use `GetInboundFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = GetInboundFieldMapRequest$inboundSchema; + /** @deprecated use `GetInboundFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = GetInboundFieldMapRequest$outboundSchema; + /** @deprecated use `GetInboundFieldMapRequest$Outbound` instead. */ + export type Outbound = GetInboundFieldMapRequest$Outbound; +} + +export function getInboundFieldMapRequestToJSON( + getInboundFieldMapRequest: GetInboundFieldMapRequest, +): string { + return JSON.stringify( + GetInboundFieldMapRequest$outboundSchema.parse(getInboundFieldMapRequest), + ); +} + +export function getInboundFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetInboundFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetInboundFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/getincidentaisummaryvotestatus.ts b/src/models/operations/getincidentaisummaryvotestatus.ts deleted file mode 100644 index ab4541dd..00000000 --- a/src/models/operations/getincidentaisummaryvotestatus.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetIncidentAiSummaryVoteStatusRequest = { - incidentId: string; - generatedSummaryId: string; -}; - -/** @internal */ -export const GetIncidentAiSummaryVoteStatusRequest$inboundSchema: z.ZodType< - GetIncidentAiSummaryVoteStatusRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - generated_summary_id: z.string(), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - "generated_summary_id": "generatedSummaryId", - }); -}); - -/** @internal */ -export type GetIncidentAiSummaryVoteStatusRequest$Outbound = { - incident_id: string; - generated_summary_id: string; -}; - -/** @internal */ -export const GetIncidentAiSummaryVoteStatusRequest$outboundSchema: z.ZodType< - GetIncidentAiSummaryVoteStatusRequest$Outbound, - z.ZodTypeDef, - GetIncidentAiSummaryVoteStatusRequest -> = z.object({ - incidentId: z.string(), - generatedSummaryId: z.string(), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - generatedSummaryId: "generated_summary_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetIncidentAiSummaryVoteStatusRequest$ { - /** @deprecated use `GetIncidentAiSummaryVoteStatusRequest$inboundSchema` instead. */ - export const inboundSchema = - GetIncidentAiSummaryVoteStatusRequest$inboundSchema; - /** @deprecated use `GetIncidentAiSummaryVoteStatusRequest$outboundSchema` instead. */ - export const outboundSchema = - GetIncidentAiSummaryVoteStatusRequest$outboundSchema; - /** @deprecated use `GetIncidentAiSummaryVoteStatusRequest$Outbound` instead. */ - export type Outbound = GetIncidentAiSummaryVoteStatusRequest$Outbound; -} - -export function getIncidentAiSummaryVoteStatusRequestToJSON( - getIncidentAiSummaryVoteStatusRequest: GetIncidentAiSummaryVoteStatusRequest, -): string { - return JSON.stringify( - GetIncidentAiSummaryVoteStatusRequest$outboundSchema.parse( - getIncidentAiSummaryVoteStatusRequest, - ), - ); -} - -export function getIncidentAiSummaryVoteStatusRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetIncidentAiSummaryVoteStatusRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetIncidentAiSummaryVoteStatusRequest' from JSON`, - ); -} diff --git a/src/models/operations/getincidenteventvotestatus.ts b/src/models/operations/getincidenteventvotestatus.ts deleted file mode 100644 index 6266dba9..00000000 --- a/src/models/operations/getincidenteventvotestatus.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetIncidentEventVoteStatusRequest = { - incidentId: string; - eventId: string; -}; - -/** @internal */ -export const GetIncidentEventVoteStatusRequest$inboundSchema: z.ZodType< - GetIncidentEventVoteStatusRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - event_id: z.string(), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - "event_id": "eventId", - }); -}); - -/** @internal */ -export type GetIncidentEventVoteStatusRequest$Outbound = { - incident_id: string; - event_id: string; -}; - -/** @internal */ -export const GetIncidentEventVoteStatusRequest$outboundSchema: z.ZodType< - GetIncidentEventVoteStatusRequest$Outbound, - z.ZodTypeDef, - GetIncidentEventVoteStatusRequest -> = z.object({ - incidentId: z.string(), - eventId: z.string(), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - eventId: "event_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetIncidentEventVoteStatusRequest$ { - /** @deprecated use `GetIncidentEventVoteStatusRequest$inboundSchema` instead. */ - export const inboundSchema = GetIncidentEventVoteStatusRequest$inboundSchema; - /** @deprecated use `GetIncidentEventVoteStatusRequest$outboundSchema` instead. */ - export const outboundSchema = - GetIncidentEventVoteStatusRequest$outboundSchema; - /** @deprecated use `GetIncidentEventVoteStatusRequest$Outbound` instead. */ - export type Outbound = GetIncidentEventVoteStatusRequest$Outbound; -} - -export function getIncidentEventVoteStatusRequestToJSON( - getIncidentEventVoteStatusRequest: GetIncidentEventVoteStatusRequest, -): string { - return JSON.stringify( - GetIncidentEventVoteStatusRequest$outboundSchema.parse( - getIncidentEventVoteStatusRequest, - ), - ); -} - -export function getIncidentEventVoteStatusRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetIncidentEventVoteStatusRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetIncidentEventVoteStatusRequest' from JSON`, - ); -} diff --git a/src/models/operations/getincidentretrospectivefield.ts b/src/models/operations/getincidentretrospectivefield.ts new file mode 100644 index 00000000..a022e5b5 --- /dev/null +++ b/src/models/operations/getincidentretrospectivefield.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetIncidentRetrospectiveFieldRequest = { + retrospectiveId: string; + fieldId: string; + incidentId: string; +}; + +/** @internal */ +export const GetIncidentRetrospectiveFieldRequest$inboundSchema: z.ZodType< + GetIncidentRetrospectiveFieldRequest, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_id: z.string(), + field_id: z.string(), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "retrospective_id": "retrospectiveId", + "field_id": "fieldId", + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type GetIncidentRetrospectiveFieldRequest$Outbound = { + retrospective_id: string; + field_id: string; + incident_id: string; +}; + +/** @internal */ +export const GetIncidentRetrospectiveFieldRequest$outboundSchema: z.ZodType< + GetIncidentRetrospectiveFieldRequest$Outbound, + z.ZodTypeDef, + GetIncidentRetrospectiveFieldRequest +> = z.object({ + retrospectiveId: z.string(), + fieldId: z.string(), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + retrospectiveId: "retrospective_id", + fieldId: "field_id", + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetIncidentRetrospectiveFieldRequest$ { + /** @deprecated use `GetIncidentRetrospectiveFieldRequest$inboundSchema` instead. */ + export const inboundSchema = + GetIncidentRetrospectiveFieldRequest$inboundSchema; + /** @deprecated use `GetIncidentRetrospectiveFieldRequest$outboundSchema` instead. */ + export const outboundSchema = + GetIncidentRetrospectiveFieldRequest$outboundSchema; + /** @deprecated use `GetIncidentRetrospectiveFieldRequest$Outbound` instead. */ + export type Outbound = GetIncidentRetrospectiveFieldRequest$Outbound; +} + +export function getIncidentRetrospectiveFieldRequestToJSON( + getIncidentRetrospectiveFieldRequest: GetIncidentRetrospectiveFieldRequest, +): string { + return JSON.stringify( + GetIncidentRetrospectiveFieldRequest$outboundSchema.parse( + getIncidentRetrospectiveFieldRequest, + ), + ); +} + +export function getIncidentRetrospectiveFieldRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetIncidentRetrospectiveFieldRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetIncidentRetrospectiveFieldRequest' from JSON`, + ); +} diff --git a/src/models/operations/getincidenttranscript.ts b/src/models/operations/getincidenttranscript.ts deleted file mode 100644 index 7510e174..00000000 --- a/src/models/operations/getincidenttranscript.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The order to sort the transcript entries. - */ -export const QueryParamSort = { - Asc: "asc", - Desc: "desc", -} as const; -/** - * The order to sort the transcript entries. - */ -export type QueryParamSort = ClosedEnum; - -export type GetIncidentTranscriptRequest = { - /** - * The ID of the transcript entry to start after. - */ - after?: string | undefined; - /** - * The ID of the transcript entry to start before. - */ - before?: string | undefined; - /** - * The order to sort the transcript entries. - */ - sort?: QueryParamSort | undefined; - incidentId: string; -}; - -/** @internal */ -export const QueryParamSort$inboundSchema: z.ZodNativeEnum< - typeof QueryParamSort -> = z.nativeEnum(QueryParamSort); - -/** @internal */ -export const QueryParamSort$outboundSchema: z.ZodNativeEnum< - typeof QueryParamSort -> = QueryParamSort$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace QueryParamSort$ { - /** @deprecated use `QueryParamSort$inboundSchema` instead. */ - export const inboundSchema = QueryParamSort$inboundSchema; - /** @deprecated use `QueryParamSort$outboundSchema` instead. */ - export const outboundSchema = QueryParamSort$outboundSchema; -} - -/** @internal */ -export const GetIncidentTranscriptRequest$inboundSchema: z.ZodType< - GetIncidentTranscriptRequest, - z.ZodTypeDef, - unknown -> = z.object({ - after: z.string().optional(), - before: z.string().optional(), - sort: QueryParamSort$inboundSchema.default("asc"), - incident_id: z.string(), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type GetIncidentTranscriptRequest$Outbound = { - after?: string | undefined; - before?: string | undefined; - sort: string; - incident_id: string; -}; - -/** @internal */ -export const GetIncidentTranscriptRequest$outboundSchema: z.ZodType< - GetIncidentTranscriptRequest$Outbound, - z.ZodTypeDef, - GetIncidentTranscriptRequest -> = z.object({ - after: z.string().optional(), - before: z.string().optional(), - sort: QueryParamSort$outboundSchema.default("asc"), - incidentId: z.string(), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetIncidentTranscriptRequest$ { - /** @deprecated use `GetIncidentTranscriptRequest$inboundSchema` instead. */ - export const inboundSchema = GetIncidentTranscriptRequest$inboundSchema; - /** @deprecated use `GetIncidentTranscriptRequest$outboundSchema` instead. */ - export const outboundSchema = GetIncidentTranscriptRequest$outboundSchema; - /** @deprecated use `GetIncidentTranscriptRequest$Outbound` instead. */ - export type Outbound = GetIncidentTranscriptRequest$Outbound; -} - -export function getIncidentTranscriptRequestToJSON( - getIncidentTranscriptRequest: GetIncidentTranscriptRequest, -): string { - return JSON.stringify( - GetIncidentTranscriptRequest$outboundSchema.parse( - getIncidentTranscriptRequest, - ), - ); -} - -export function getIncidentTranscriptRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetIncidentTranscriptRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetIncidentTranscriptRequest' from JSON`, - ); -} diff --git a/src/models/operations/getincidentuser.ts b/src/models/operations/getincidentuser.ts new file mode 100644 index 00000000..daa7af6b --- /dev/null +++ b/src/models/operations/getincidentuser.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetIncidentUserRequest = { + incidentId: string; + userId: string; +}; + +/** @internal */ +export const GetIncidentUserRequest$inboundSchema: z.ZodType< + GetIncidentUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + user_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "user_id": "userId", + }); +}); + +/** @internal */ +export type GetIncidentUserRequest$Outbound = { + incident_id: string; + user_id: string; +}; + +/** @internal */ +export const GetIncidentUserRequest$outboundSchema: z.ZodType< + GetIncidentUserRequest$Outbound, + z.ZodTypeDef, + GetIncidentUserRequest +> = z.object({ + incidentId: z.string(), + userId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + userId: "user_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetIncidentUserRequest$ { + /** @deprecated use `GetIncidentUserRequest$inboundSchema` instead. */ + export const inboundSchema = GetIncidentUserRequest$inboundSchema; + /** @deprecated use `GetIncidentUserRequest$outboundSchema` instead. */ + export const outboundSchema = GetIncidentUserRequest$outboundSchema; + /** @deprecated use `GetIncidentUserRequest$Outbound` instead. */ + export type Outbound = GetIncidentUserRequest$Outbound; +} + +export function getIncidentUserRequestToJSON( + getIncidentUserRequest: GetIncidentUserRequest, +): string { + return JSON.stringify( + GetIncidentUserRequest$outboundSchema.parse(getIncidentUserRequest), + ); +} + +export function getIncidentUserRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetIncidentUserRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetIncidentUserRequest' from JSON`, + ); +} diff --git a/src/models/operations/getincidentuserrole.ts b/src/models/operations/getincidentuserrole.ts deleted file mode 100644 index 19cd9acc..00000000 --- a/src/models/operations/getincidentuserrole.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetIncidentUserRoleRequest = { - incidentId: string; - userId: string; -}; - -/** @internal */ -export const GetIncidentUserRoleRequest$inboundSchema: z.ZodType< - GetIncidentUserRoleRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - user_id: z.string(), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - "user_id": "userId", - }); -}); - -/** @internal */ -export type GetIncidentUserRoleRequest$Outbound = { - incident_id: string; - user_id: string; -}; - -/** @internal */ -export const GetIncidentUserRoleRequest$outboundSchema: z.ZodType< - GetIncidentUserRoleRequest$Outbound, - z.ZodTypeDef, - GetIncidentUserRoleRequest -> = z.object({ - incidentId: z.string(), - userId: z.string(), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - userId: "user_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetIncidentUserRoleRequest$ { - /** @deprecated use `GetIncidentUserRoleRequest$inboundSchema` instead. */ - export const inboundSchema = GetIncidentUserRoleRequest$inboundSchema; - /** @deprecated use `GetIncidentUserRoleRequest$outboundSchema` instead. */ - export const outboundSchema = GetIncidentUserRoleRequest$outboundSchema; - /** @deprecated use `GetIncidentUserRoleRequest$Outbound` instead. */ - export type Outbound = GetIncidentUserRoleRequest$Outbound; -} - -export function getIncidentUserRoleRequestToJSON( - getIncidentUserRoleRequest: GetIncidentUserRoleRequest, -): string { - return JSON.stringify( - GetIncidentUserRoleRequest$outboundSchema.parse(getIncidentUserRoleRequest), - ); -} - -export function getIncidentUserRoleRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetIncidentUserRoleRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetIncidentUserRoleRequest' from JSON`, - ); -} diff --git a/src/models/operations/getinfrastructuremetrics.ts b/src/models/operations/getinfrastructuremetrics.ts deleted file mode 100644 index f783ea3d..00000000 --- a/src/models/operations/getinfrastructuremetrics.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { RFCDate } from "../../types/rfcdate.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PathParamInfraType = { - Environments: "environments", - Functionalities: "functionalities", - Services: "services", - Customers: "customers", -} as const; -export type PathParamInfraType = ClosedEnum; - -export type GetInfrastructureMetricsRequest = { - infraType: PathParamInfraType; - /** - * Component UUID - */ - infraId: string; - /** - * The start date to return metrics from; defaults to 30 days ago - */ - startDate?: RFCDate | undefined; - /** - * The end date to return metrics from, defaults to today - */ - endDate?: RFCDate | undefined; -}; - -/** @internal */ -export const PathParamInfraType$inboundSchema: z.ZodNativeEnum< - typeof PathParamInfraType -> = z.nativeEnum(PathParamInfraType); - -/** @internal */ -export const PathParamInfraType$outboundSchema: z.ZodNativeEnum< - typeof PathParamInfraType -> = PathParamInfraType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PathParamInfraType$ { - /** @deprecated use `PathParamInfraType$inboundSchema` instead. */ - export const inboundSchema = PathParamInfraType$inboundSchema; - /** @deprecated use `PathParamInfraType$outboundSchema` instead. */ - export const outboundSchema = PathParamInfraType$outboundSchema; -} - -/** @internal */ -export const GetInfrastructureMetricsRequest$inboundSchema: z.ZodType< - GetInfrastructureMetricsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - infra_type: PathParamInfraType$inboundSchema, - infra_id: z.string(), - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), -}).transform((v) => { - return remap$(v, { - "infra_type": "infraType", - "infra_id": "infraId", - "start_date": "startDate", - "end_date": "endDate", - }); -}); - -/** @internal */ -export type GetInfrastructureMetricsRequest$Outbound = { - infra_type: string; - infra_id: string; - start_date?: string | undefined; - end_date?: string | undefined; -}; - -/** @internal */ -export const GetInfrastructureMetricsRequest$outboundSchema: z.ZodType< - GetInfrastructureMetricsRequest$Outbound, - z.ZodTypeDef, - GetInfrastructureMetricsRequest -> = z.object({ - infraType: PathParamInfraType$outboundSchema, - infraId: z.string(), - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), -}).transform((v) => { - return remap$(v, { - infraType: "infra_type", - infraId: "infra_id", - startDate: "start_date", - endDate: "end_date", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetInfrastructureMetricsRequest$ { - /** @deprecated use `GetInfrastructureMetricsRequest$inboundSchema` instead. */ - export const inboundSchema = GetInfrastructureMetricsRequest$inboundSchema; - /** @deprecated use `GetInfrastructureMetricsRequest$outboundSchema` instead. */ - export const outboundSchema = GetInfrastructureMetricsRequest$outboundSchema; - /** @deprecated use `GetInfrastructureMetricsRequest$Outbound` instead. */ - export type Outbound = GetInfrastructureMetricsRequest$Outbound; -} - -export function getInfrastructureMetricsRequestToJSON( - getInfrastructureMetricsRequest: GetInfrastructureMetricsRequest, -): string { - return JSON.stringify( - GetInfrastructureMetricsRequest$outboundSchema.parse( - getInfrastructureMetricsRequest, - ), - ); -} - -export function getInfrastructureMetricsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetInfrastructureMetricsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetInfrastructureMetricsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getintegrationfieldmapavailablefields.ts b/src/models/operations/getintegrationfieldmapavailablefields.ts deleted file mode 100644 index 61363c2e..00000000 --- a/src/models/operations/getintegrationfieldmapavailablefields.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetIntegrationFieldMapAvailableFieldsRequest = { - fieldMapId: string; -}; - -/** @internal */ -export const GetIntegrationFieldMapAvailableFieldsRequest$inboundSchema: - z.ZodType< - GetIntegrationFieldMapAvailableFieldsRequest, - z.ZodTypeDef, - unknown - > = z.object({ - field_map_id: z.string(), - }).transform((v) => { - return remap$(v, { - "field_map_id": "fieldMapId", - }); - }); - -/** @internal */ -export type GetIntegrationFieldMapAvailableFieldsRequest$Outbound = { - field_map_id: string; -}; - -/** @internal */ -export const GetIntegrationFieldMapAvailableFieldsRequest$outboundSchema: - z.ZodType< - GetIntegrationFieldMapAvailableFieldsRequest$Outbound, - z.ZodTypeDef, - GetIntegrationFieldMapAvailableFieldsRequest - > = z.object({ - fieldMapId: z.string(), - }).transform((v) => { - return remap$(v, { - fieldMapId: "field_map_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetIntegrationFieldMapAvailableFieldsRequest$ { - /** @deprecated use `GetIntegrationFieldMapAvailableFieldsRequest$inboundSchema` instead. */ - export const inboundSchema = - GetIntegrationFieldMapAvailableFieldsRequest$inboundSchema; - /** @deprecated use `GetIntegrationFieldMapAvailableFieldsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetIntegrationFieldMapAvailableFieldsRequest$outboundSchema; - /** @deprecated use `GetIntegrationFieldMapAvailableFieldsRequest$Outbound` instead. */ - export type Outbound = GetIntegrationFieldMapAvailableFieldsRequest$Outbound; -} - -export function getIntegrationFieldMapAvailableFieldsRequestToJSON( - getIntegrationFieldMapAvailableFieldsRequest: - GetIntegrationFieldMapAvailableFieldsRequest, -): string { - return JSON.stringify( - GetIntegrationFieldMapAvailableFieldsRequest$outboundSchema.parse( - getIntegrationFieldMapAvailableFieldsRequest, - ), - ); -} - -export function getIntegrationFieldMapAvailableFieldsRequestFromJSON( - jsonString: string, -): SafeParseResult< - GetIntegrationFieldMapAvailableFieldsRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - GetIntegrationFieldMapAvailableFieldsRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'GetIntegrationFieldMapAvailableFieldsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getintegrationstatus.ts b/src/models/operations/getintegrationstatus.ts deleted file mode 100644 index d24a3e82..00000000 --- a/src/models/operations/getintegrationstatus.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetIntegrationStatusRequest = { - slug: string; -}; - -/** @internal */ -export const GetIntegrationStatusRequest$inboundSchema: z.ZodType< - GetIntegrationStatusRequest, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string(), -}); - -/** @internal */ -export type GetIntegrationStatusRequest$Outbound = { - slug: string; -}; - -/** @internal */ -export const GetIntegrationStatusRequest$outboundSchema: z.ZodType< - GetIntegrationStatusRequest$Outbound, - z.ZodTypeDef, - GetIntegrationStatusRequest -> = z.object({ - slug: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetIntegrationStatusRequest$ { - /** @deprecated use `GetIntegrationStatusRequest$inboundSchema` instead. */ - export const inboundSchema = GetIntegrationStatusRequest$inboundSchema; - /** @deprecated use `GetIntegrationStatusRequest$outboundSchema` instead. */ - export const outboundSchema = GetIntegrationStatusRequest$outboundSchema; - /** @deprecated use `GetIntegrationStatusRequest$Outbound` instead. */ - export type Outbound = GetIntegrationStatusRequest$Outbound; -} - -export function getIntegrationStatusRequestToJSON( - getIntegrationStatusRequest: GetIntegrationStatusRequest, -): string { - return JSON.stringify( - GetIntegrationStatusRequest$outboundSchema.parse( - getIntegrationStatusRequest, - ), - ); -} - -export function getIntegrationStatusRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetIntegrationStatusRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetIntegrationStatusRequest' from JSON`, - ); -} diff --git a/src/models/operations/getlifecyclemeasurementdefinition.ts b/src/models/operations/getlifecyclemeasurementdefinition.ts new file mode 100644 index 00000000..fcc15b14 --- /dev/null +++ b/src/models/operations/getlifecyclemeasurementdefinition.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetLifecycleMeasurementDefinitionRequest = { + measurementDefinitionId: string; +}; + +/** @internal */ +export const GetLifecycleMeasurementDefinitionRequest$inboundSchema: z.ZodType< + GetLifecycleMeasurementDefinitionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + measurement_definition_id: z.string(), +}).transform((v) => { + return remap$(v, { + "measurement_definition_id": "measurementDefinitionId", + }); +}); + +/** @internal */ +export type GetLifecycleMeasurementDefinitionRequest$Outbound = { + measurement_definition_id: string; +}; + +/** @internal */ +export const GetLifecycleMeasurementDefinitionRequest$outboundSchema: z.ZodType< + GetLifecycleMeasurementDefinitionRequest$Outbound, + z.ZodTypeDef, + GetLifecycleMeasurementDefinitionRequest +> = z.object({ + measurementDefinitionId: z.string(), +}).transform((v) => { + return remap$(v, { + measurementDefinitionId: "measurement_definition_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetLifecycleMeasurementDefinitionRequest$ { + /** @deprecated use `GetLifecycleMeasurementDefinitionRequest$inboundSchema` instead. */ + export const inboundSchema = + GetLifecycleMeasurementDefinitionRequest$inboundSchema; + /** @deprecated use `GetLifecycleMeasurementDefinitionRequest$outboundSchema` instead. */ + export const outboundSchema = + GetLifecycleMeasurementDefinitionRequest$outboundSchema; + /** @deprecated use `GetLifecycleMeasurementDefinitionRequest$Outbound` instead. */ + export type Outbound = GetLifecycleMeasurementDefinitionRequest$Outbound; +} + +export function getLifecycleMeasurementDefinitionRequestToJSON( + getLifecycleMeasurementDefinitionRequest: + GetLifecycleMeasurementDefinitionRequest, +): string { + return JSON.stringify( + GetLifecycleMeasurementDefinitionRequest$outboundSchema.parse( + getLifecycleMeasurementDefinitionRequest, + ), + ); +} + +export function getLifecycleMeasurementDefinitionRequestFromJSON( + jsonString: string, +): SafeParseResult< + GetLifecycleMeasurementDefinitionRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + GetLifecycleMeasurementDefinitionRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'GetLifecycleMeasurementDefinitionRequest' from JSON`, + ); +} diff --git a/src/models/operations/getmeantimereport.ts b/src/models/operations/getmeantimereport.ts index e2c5c9d3..b45cbc8b 100644 --- a/src/models/operations/getmeantimereport.ts +++ b/src/models/operations/getmeantimereport.ts @@ -13,55 +13,55 @@ export type GetMeanTimeReportRequest = { /** * A comma separated list of environment IDs */ - environments?: string | undefined; + environments?: string | null | undefined; /** * A comma separated list of team IDs */ - teams?: string | undefined; + teams?: string | null | undefined; /** * A comma separated list of service IDs */ - services?: string | undefined; + services?: string | null | undefined; /** * Incident status */ - status?: string | undefined; + status?: string | null | undefined; /** * The start date to return incidents from */ - startDate?: RFCDate | undefined; + startDate?: RFCDate | null | undefined; /** * The end date to return incidents from */ - endDate?: RFCDate | undefined; + endDate?: RFCDate | null | undefined; /** * A text query for an incident that searches on name, summary, and desciption */ - query?: string | undefined; + query?: string | null | undefined; /** * The id of a previously saved search. */ - savedSearchId?: string | undefined; + savedSearchId?: string | null | undefined; /** * A comma separated list of priorities */ - priorities?: string | undefined; + priorities?: string | null | undefined; /** * Flag for including incidents where priority has not been set */ - priorityNotSet?: boolean | undefined; + priorityNotSet?: boolean | null | undefined; /** * A comma separated list of severities */ - severities?: string | undefined; + severities?: string | null | undefined; /** * Flag for including incidents where severity has not been set */ - severityNotSet?: boolean | undefined; + severityNotSet?: boolean | null | undefined; /** * A comma separated list of current milestones */ - currentMilestones?: string | undefined; + currentMilestones?: string | null | undefined; }; /** @internal */ @@ -70,19 +70,19 @@ export const GetMeanTimeReportRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - environments: z.string().optional(), - teams: z.string().optional(), - services: z.string().optional(), - status: z.string().optional(), - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), - query: z.string().optional(), - saved_search_id: z.string().optional(), - priorities: z.string().optional(), - priority_not_set: z.boolean().optional(), - severities: z.string().optional(), - severity_not_set: z.boolean().optional(), - current_milestones: z.string().optional(), + environments: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + query: z.nullable(z.string()).optional(), + saved_search_id: z.nullable(z.string()).optional(), + priorities: z.nullable(z.string()).optional(), + priority_not_set: z.nullable(z.boolean()).optional(), + severities: z.nullable(z.string()).optional(), + severity_not_set: z.nullable(z.boolean()).optional(), + current_milestones: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "start_date": "startDate", @@ -96,19 +96,19 @@ export const GetMeanTimeReportRequest$inboundSchema: z.ZodType< /** @internal */ export type GetMeanTimeReportRequest$Outbound = { - environments?: string | undefined; - teams?: string | undefined; - services?: string | undefined; - status?: string | undefined; - start_date?: string | undefined; - end_date?: string | undefined; - query?: string | undefined; - saved_search_id?: string | undefined; - priorities?: string | undefined; - priority_not_set?: boolean | undefined; - severities?: string | undefined; - severity_not_set?: boolean | undefined; - current_milestones?: string | undefined; + environments?: string | null | undefined; + teams?: string | null | undefined; + services?: string | null | undefined; + status?: string | null | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + query?: string | null | undefined; + saved_search_id?: string | null | undefined; + priorities?: string | null | undefined; + priority_not_set?: boolean | null | undefined; + severities?: string | null | undefined; + severity_not_set?: boolean | null | undefined; + current_milestones?: string | null | undefined; }; /** @internal */ @@ -117,19 +117,21 @@ export const GetMeanTimeReportRequest$outboundSchema: z.ZodType< z.ZodTypeDef, GetMeanTimeReportRequest > = z.object({ - environments: z.string().optional(), - teams: z.string().optional(), - services: z.string().optional(), - status: z.string().optional(), - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - query: z.string().optional(), - savedSearchId: z.string().optional(), - priorities: z.string().optional(), - priorityNotSet: z.boolean().optional(), - severities: z.string().optional(), - severityNotSet: z.boolean().optional(), - currentMilestones: z.string().optional(), + environments: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + query: z.nullable(z.string()).optional(), + savedSearchId: z.nullable(z.string()).optional(), + priorities: z.nullable(z.string()).optional(), + priorityNotSet: z.nullable(z.boolean()).optional(), + severities: z.nullable(z.string()).optional(), + severityNotSet: z.nullable(z.boolean()).optional(), + currentMilestones: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { startDate: "start_date", diff --git a/src/models/operations/getmeasurementdefinition.ts b/src/models/operations/getmeasurementdefinition.ts deleted file mode 100644 index 722c0399..00000000 --- a/src/models/operations/getmeasurementdefinition.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetMeasurementDefinitionRequest = { - measurementDefinitionId: string; -}; - -/** @internal */ -export const GetMeasurementDefinitionRequest$inboundSchema: z.ZodType< - GetMeasurementDefinitionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - measurement_definition_id: z.string(), -}).transform((v) => { - return remap$(v, { - "measurement_definition_id": "measurementDefinitionId", - }); -}); - -/** @internal */ -export type GetMeasurementDefinitionRequest$Outbound = { - measurement_definition_id: string; -}; - -/** @internal */ -export const GetMeasurementDefinitionRequest$outboundSchema: z.ZodType< - GetMeasurementDefinitionRequest$Outbound, - z.ZodTypeDef, - GetMeasurementDefinitionRequest -> = z.object({ - measurementDefinitionId: z.string(), -}).transform((v) => { - return remap$(v, { - measurementDefinitionId: "measurement_definition_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetMeasurementDefinitionRequest$ { - /** @deprecated use `GetMeasurementDefinitionRequest$inboundSchema` instead. */ - export const inboundSchema = GetMeasurementDefinitionRequest$inboundSchema; - /** @deprecated use `GetMeasurementDefinitionRequest$outboundSchema` instead. */ - export const outboundSchema = GetMeasurementDefinitionRequest$outboundSchema; - /** @deprecated use `GetMeasurementDefinitionRequest$Outbound` instead. */ - export type Outbound = GetMeasurementDefinitionRequest$Outbound; -} - -export function getMeasurementDefinitionRequestToJSON( - getMeasurementDefinitionRequest: GetMeasurementDefinitionRequest, -): string { - return JSON.stringify( - GetMeasurementDefinitionRequest$outboundSchema.parse( - getMeasurementDefinitionRequest, - ), - ); -} - -export function getMeasurementDefinitionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMeasurementDefinitionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMeasurementDefinitionRequest' from JSON`, - ); -} diff --git a/src/models/operations/getmemberdefaultaudience.ts b/src/models/operations/getmemberdefaultaudience.ts new file mode 100644 index 00000000..8b2a1d1a --- /dev/null +++ b/src/models/operations/getmemberdefaultaudience.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetMemberDefaultAudienceRequest = { + memberId: number; +}; + +/** @internal */ +export const GetMemberDefaultAudienceRequest$inboundSchema: z.ZodType< + GetMemberDefaultAudienceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + member_id: z.number().int(), +}).transform((v) => { + return remap$(v, { + "member_id": "memberId", + }); +}); + +/** @internal */ +export type GetMemberDefaultAudienceRequest$Outbound = { + member_id: number; +}; + +/** @internal */ +export const GetMemberDefaultAudienceRequest$outboundSchema: z.ZodType< + GetMemberDefaultAudienceRequest$Outbound, + z.ZodTypeDef, + GetMemberDefaultAudienceRequest +> = z.object({ + memberId: z.number().int(), +}).transform((v) => { + return remap$(v, { + memberId: "member_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetMemberDefaultAudienceRequest$ { + /** @deprecated use `GetMemberDefaultAudienceRequest$inboundSchema` instead. */ + export const inboundSchema = GetMemberDefaultAudienceRequest$inboundSchema; + /** @deprecated use `GetMemberDefaultAudienceRequest$outboundSchema` instead. */ + export const outboundSchema = GetMemberDefaultAudienceRequest$outboundSchema; + /** @deprecated use `GetMemberDefaultAudienceRequest$Outbound` instead. */ + export type Outbound = GetMemberDefaultAudienceRequest$Outbound; +} + +export function getMemberDefaultAudienceRequestToJSON( + getMemberDefaultAudienceRequest: GetMemberDefaultAudienceRequest, +): string { + return JSON.stringify( + GetMemberDefaultAudienceRequest$outboundSchema.parse( + getMemberDefaultAudienceRequest, + ), + ); +} + +export function getMemberDefaultAudienceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetMemberDefaultAudienceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetMemberDefaultAudienceRequest' from JSON`, + ); +} diff --git a/src/models/operations/getnuncconnection.ts b/src/models/operations/getnuncconnection.ts new file mode 100644 index 00000000..25b5b612 --- /dev/null +++ b/src/models/operations/getnuncconnection.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetNuncConnectionRequest = { + nuncConnectionId: string; +}; + +/** @internal */ +export const GetNuncConnectionRequest$inboundSchema: z.ZodType< + GetNuncConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + }); +}); + +/** @internal */ +export type GetNuncConnectionRequest$Outbound = { + nunc_connection_id: string; +}; + +/** @internal */ +export const GetNuncConnectionRequest$outboundSchema: z.ZodType< + GetNuncConnectionRequest$Outbound, + z.ZodTypeDef, + GetNuncConnectionRequest +> = z.object({ + nuncConnectionId: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetNuncConnectionRequest$ { + /** @deprecated use `GetNuncConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = GetNuncConnectionRequest$inboundSchema; + /** @deprecated use `GetNuncConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = GetNuncConnectionRequest$outboundSchema; + /** @deprecated use `GetNuncConnectionRequest$Outbound` instead. */ + export type Outbound = GetNuncConnectionRequest$Outbound; +} + +export function getNuncConnectionRequestToJSON( + getNuncConnectionRequest: GetNuncConnectionRequest, +): string { + return JSON.stringify( + GetNuncConnectionRequest$outboundSchema.parse(getNuncConnectionRequest), + ); +} + +export function getNuncConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetNuncConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetNuncConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/getoncallshift.ts b/src/models/operations/getoncallshift.ts new file mode 100644 index 00000000..4931349c --- /dev/null +++ b/src/models/operations/getoncallshift.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetOnCallShiftRequest = { + id: string; + teamId: string; + scheduleId: string; +}; + +/** @internal */ +export const GetOnCallShiftRequest$inboundSchema: z.ZodType< + GetOnCallShiftRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + team_id: z.string(), + schedule_id: z.string(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "schedule_id": "scheduleId", + }); +}); + +/** @internal */ +export type GetOnCallShiftRequest$Outbound = { + id: string; + team_id: string; + schedule_id: string; +}; + +/** @internal */ +export const GetOnCallShiftRequest$outboundSchema: z.ZodType< + GetOnCallShiftRequest$Outbound, + z.ZodTypeDef, + GetOnCallShiftRequest +> = z.object({ + id: z.string(), + teamId: z.string(), + scheduleId: z.string(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + scheduleId: "schedule_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetOnCallShiftRequest$ { + /** @deprecated use `GetOnCallShiftRequest$inboundSchema` instead. */ + export const inboundSchema = GetOnCallShiftRequest$inboundSchema; + /** @deprecated use `GetOnCallShiftRequest$outboundSchema` instead. */ + export const outboundSchema = GetOnCallShiftRequest$outboundSchema; + /** @deprecated use `GetOnCallShiftRequest$Outbound` instead. */ + export type Outbound = GetOnCallShiftRequest$Outbound; +} + +export function getOnCallShiftRequestToJSON( + getOnCallShiftRequest: GetOnCallShiftRequest, +): string { + return JSON.stringify( + GetOnCallShiftRequest$outboundSchema.parse(getOnCallShiftRequest), + ); +} + +export function getOnCallShiftRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetOnCallShiftRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetOnCallShiftRequest' from JSON`, + ); +} diff --git a/src/models/operations/getoptionsforfield.ts b/src/models/operations/getoptionsforfield.ts new file mode 100644 index 00000000..03c3fb70 --- /dev/null +++ b/src/models/operations/getoptionsforfield.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetOptionsForFieldRequest = { + fieldId: string; + ticketingProjectId: string; +}; + +/** @internal */ +export const GetOptionsForFieldRequest$inboundSchema: z.ZodType< + GetOptionsForFieldRequest, + z.ZodTypeDef, + unknown +> = z.object({ + field_id: z.string(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "field_id": "fieldId", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type GetOptionsForFieldRequest$Outbound = { + field_id: string; + ticketing_project_id: string; +}; + +/** @internal */ +export const GetOptionsForFieldRequest$outboundSchema: z.ZodType< + GetOptionsForFieldRequest$Outbound, + z.ZodTypeDef, + GetOptionsForFieldRequest +> = z.object({ + fieldId: z.string(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + fieldId: "field_id", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetOptionsForFieldRequest$ { + /** @deprecated use `GetOptionsForFieldRequest$inboundSchema` instead. */ + export const inboundSchema = GetOptionsForFieldRequest$inboundSchema; + /** @deprecated use `GetOptionsForFieldRequest$outboundSchema` instead. */ + export const outboundSchema = GetOptionsForFieldRequest$outboundSchema; + /** @deprecated use `GetOptionsForFieldRequest$Outbound` instead. */ + export type Outbound = GetOptionsForFieldRequest$Outbound; +} + +export function getOptionsForFieldRequestToJSON( + getOptionsForFieldRequest: GetOptionsForFieldRequest, +): string { + return JSON.stringify( + GetOptionsForFieldRequest$outboundSchema.parse(getOptionsForFieldRequest), + ); +} + +export function getOptionsForFieldRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetOptionsForFieldRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetOptionsForFieldRequest' from JSON`, + ); +} diff --git a/src/models/operations/getpostmortemquestion.ts b/src/models/operations/getpostmortemquestion.ts new file mode 100644 index 00000000..f0431572 --- /dev/null +++ b/src/models/operations/getpostmortemquestion.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetPostMortemQuestionRequest = { + questionId: string; +}; + +/** @internal */ +export const GetPostMortemQuestionRequest$inboundSchema: z.ZodType< + GetPostMortemQuestionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + question_id: z.string(), +}).transform((v) => { + return remap$(v, { + "question_id": "questionId", + }); +}); + +/** @internal */ +export type GetPostMortemQuestionRequest$Outbound = { + question_id: string; +}; + +/** @internal */ +export const GetPostMortemQuestionRequest$outboundSchema: z.ZodType< + GetPostMortemQuestionRequest$Outbound, + z.ZodTypeDef, + GetPostMortemQuestionRequest +> = z.object({ + questionId: z.string(), +}).transform((v) => { + return remap$(v, { + questionId: "question_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetPostMortemQuestionRequest$ { + /** @deprecated use `GetPostMortemQuestionRequest$inboundSchema` instead. */ + export const inboundSchema = GetPostMortemQuestionRequest$inboundSchema; + /** @deprecated use `GetPostMortemQuestionRequest$outboundSchema` instead. */ + export const outboundSchema = GetPostMortemQuestionRequest$outboundSchema; + /** @deprecated use `GetPostMortemQuestionRequest$Outbound` instead. */ + export type Outbound = GetPostMortemQuestionRequest$Outbound; +} + +export function getPostMortemQuestionRequestToJSON( + getPostMortemQuestionRequest: GetPostMortemQuestionRequest, +): string { + return JSON.stringify( + GetPostMortemQuestionRequest$outboundSchema.parse( + getPostMortemQuestionRequest, + ), + ); +} + +export function getPostMortemQuestionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetPostMortemQuestionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetPostMortemQuestionRequest' from JSON`, + ); +} diff --git a/src/models/operations/getretrospectivequestion.ts b/src/models/operations/getretrospectivequestion.ts deleted file mode 100644 index 1b8d3633..00000000 --- a/src/models/operations/getretrospectivequestion.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetRetrospectiveQuestionRequest = { - questionId: string; -}; - -/** @internal */ -export const GetRetrospectiveQuestionRequest$inboundSchema: z.ZodType< - GetRetrospectiveQuestionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - question_id: z.string(), -}).transform((v) => { - return remap$(v, { - "question_id": "questionId", - }); -}); - -/** @internal */ -export type GetRetrospectiveQuestionRequest$Outbound = { - question_id: string; -}; - -/** @internal */ -export const GetRetrospectiveQuestionRequest$outboundSchema: z.ZodType< - GetRetrospectiveQuestionRequest$Outbound, - z.ZodTypeDef, - GetRetrospectiveQuestionRequest -> = z.object({ - questionId: z.string(), -}).transform((v) => { - return remap$(v, { - questionId: "question_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRetrospectiveQuestionRequest$ { - /** @deprecated use `GetRetrospectiveQuestionRequest$inboundSchema` instead. */ - export const inboundSchema = GetRetrospectiveQuestionRequest$inboundSchema; - /** @deprecated use `GetRetrospectiveQuestionRequest$outboundSchema` instead. */ - export const outboundSchema = GetRetrospectiveQuestionRequest$outboundSchema; - /** @deprecated use `GetRetrospectiveQuestionRequest$Outbound` instead. */ - export type Outbound = GetRetrospectiveQuestionRequest$Outbound; -} - -export function getRetrospectiveQuestionRequestToJSON( - getRetrospectiveQuestionRequest: GetRetrospectiveQuestionRequest, -): string { - return JSON.stringify( - GetRetrospectiveQuestionRequest$outboundSchema.parse( - getRetrospectiveQuestionRequest, - ), - ); -} - -export function getRetrospectiveQuestionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetRetrospectiveQuestionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRetrospectiveQuestionRequest' from JSON`, - ); -} diff --git a/src/models/operations/getretrospectivetemplate.ts b/src/models/operations/getretrospectivetemplate.ts new file mode 100644 index 00000000..883fd1c0 --- /dev/null +++ b/src/models/operations/getretrospectivetemplate.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetRetrospectiveTemplateRequest = { + retrospectiveTemplateId: string; +}; + +/** @internal */ +export const GetRetrospectiveTemplateRequest$inboundSchema: z.ZodType< + GetRetrospectiveTemplateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_template_id: z.string(), +}).transform((v) => { + return remap$(v, { + "retrospective_template_id": "retrospectiveTemplateId", + }); +}); + +/** @internal */ +export type GetRetrospectiveTemplateRequest$Outbound = { + retrospective_template_id: string; +}; + +/** @internal */ +export const GetRetrospectiveTemplateRequest$outboundSchema: z.ZodType< + GetRetrospectiveTemplateRequest$Outbound, + z.ZodTypeDef, + GetRetrospectiveTemplateRequest +> = z.object({ + retrospectiveTemplateId: z.string(), +}).transform((v) => { + return remap$(v, { + retrospectiveTemplateId: "retrospective_template_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetRetrospectiveTemplateRequest$ { + /** @deprecated use `GetRetrospectiveTemplateRequest$inboundSchema` instead. */ + export const inboundSchema = GetRetrospectiveTemplateRequest$inboundSchema; + /** @deprecated use `GetRetrospectiveTemplateRequest$outboundSchema` instead. */ + export const outboundSchema = GetRetrospectiveTemplateRequest$outboundSchema; + /** @deprecated use `GetRetrospectiveTemplateRequest$Outbound` instead. */ + export type Outbound = GetRetrospectiveTemplateRequest$Outbound; +} + +export function getRetrospectiveTemplateRequestToJSON( + getRetrospectiveTemplateRequest: GetRetrospectiveTemplateRequest, +): string { + return JSON.stringify( + GetRetrospectiveTemplateRequest$outboundSchema.parse( + getRetrospectiveTemplateRequest, + ), + ); +} + +export function getRetrospectiveTemplateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetRetrospectiveTemplateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetRetrospectiveTemplateRequest' from JSON`, + ); +} diff --git a/src/models/operations/getrunbookactionfieldoptions.ts b/src/models/operations/getrunbookactionfieldoptions.ts new file mode 100644 index 00000000..5da8d1ac --- /dev/null +++ b/src/models/operations/getrunbookactionfieldoptions.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetRunbookActionFieldOptionsRequest = { + integrationSlug: string; + actionSlug: string; + field: string; + /** + * Text string of a query for filtering values. + */ + query?: string | null | undefined; + /** + * Generic params used to add specificity (eg an id of some kind) to the select options request + */ + scope?: string | null | undefined; + /** + * Maximum number of items to return. + */ + perPage?: number | null | undefined; +}; + +/** @internal */ +export const GetRunbookActionFieldOptionsRequest$inboundSchema: z.ZodType< + GetRunbookActionFieldOptionsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: z.string(), + action_slug: z.string(), + field: z.string(), + query: z.nullable(z.string()).optional(), + scope: z.nullable(z.string()).optional(), + per_page: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "action_slug": "actionSlug", + "per_page": "perPage", + }); +}); + +/** @internal */ +export type GetRunbookActionFieldOptionsRequest$Outbound = { + integration_slug: string; + action_slug: string; + field: string; + query?: string | null | undefined; + scope?: string | null | undefined; + per_page?: number | null | undefined; +}; + +/** @internal */ +export const GetRunbookActionFieldOptionsRequest$outboundSchema: z.ZodType< + GetRunbookActionFieldOptionsRequest$Outbound, + z.ZodTypeDef, + GetRunbookActionFieldOptionsRequest +> = z.object({ + integrationSlug: z.string(), + actionSlug: z.string(), + field: z.string(), + query: z.nullable(z.string()).optional(), + scope: z.nullable(z.string()).optional(), + perPage: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + actionSlug: "action_slug", + perPage: "per_page", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetRunbookActionFieldOptionsRequest$ { + /** @deprecated use `GetRunbookActionFieldOptionsRequest$inboundSchema` instead. */ + export const inboundSchema = + GetRunbookActionFieldOptionsRequest$inboundSchema; + /** @deprecated use `GetRunbookActionFieldOptionsRequest$outboundSchema` instead. */ + export const outboundSchema = + GetRunbookActionFieldOptionsRequest$outboundSchema; + /** @deprecated use `GetRunbookActionFieldOptionsRequest$Outbound` instead. */ + export type Outbound = GetRunbookActionFieldOptionsRequest$Outbound; +} + +export function getRunbookActionFieldOptionsRequestToJSON( + getRunbookActionFieldOptionsRequest: GetRunbookActionFieldOptionsRequest, +): string { + return JSON.stringify( + GetRunbookActionFieldOptionsRequest$outboundSchema.parse( + getRunbookActionFieldOptionsRequest, + ), + ); +} + +export function getRunbookActionFieldOptionsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetRunbookActionFieldOptionsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetRunbookActionFieldOptionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getrunbookexecutionvotestatus.ts b/src/models/operations/getrunbookexecutionvotestatus.ts deleted file mode 100644 index ffb807e1..00000000 --- a/src/models/operations/getrunbookexecutionvotestatus.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetRunbookExecutionVoteStatusRequest = { - executionId: string; -}; - -/** @internal */ -export const GetRunbookExecutionVoteStatusRequest$inboundSchema: z.ZodType< - GetRunbookExecutionVoteStatusRequest, - z.ZodTypeDef, - unknown -> = z.object({ - execution_id: z.string(), -}).transform((v) => { - return remap$(v, { - "execution_id": "executionId", - }); -}); - -/** @internal */ -export type GetRunbookExecutionVoteStatusRequest$Outbound = { - execution_id: string; -}; - -/** @internal */ -export const GetRunbookExecutionVoteStatusRequest$outboundSchema: z.ZodType< - GetRunbookExecutionVoteStatusRequest$Outbound, - z.ZodTypeDef, - GetRunbookExecutionVoteStatusRequest -> = z.object({ - executionId: z.string(), -}).transform((v) => { - return remap$(v, { - executionId: "execution_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRunbookExecutionVoteStatusRequest$ { - /** @deprecated use `GetRunbookExecutionVoteStatusRequest$inboundSchema` instead. */ - export const inboundSchema = - GetRunbookExecutionVoteStatusRequest$inboundSchema; - /** @deprecated use `GetRunbookExecutionVoteStatusRequest$outboundSchema` instead. */ - export const outboundSchema = - GetRunbookExecutionVoteStatusRequest$outboundSchema; - /** @deprecated use `GetRunbookExecutionVoteStatusRequest$Outbound` instead. */ - export type Outbound = GetRunbookExecutionVoteStatusRequest$Outbound; -} - -export function getRunbookExecutionVoteStatusRequestToJSON( - getRunbookExecutionVoteStatusRequest: GetRunbookExecutionVoteStatusRequest, -): string { - return JSON.stringify( - GetRunbookExecutionVoteStatusRequest$outboundSchema.parse( - getRunbookExecutionVoteStatusRequest, - ), - ); -} - -export function getRunbookExecutionVoteStatusRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetRunbookExecutionVoteStatusRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRunbookExecutionVoteStatusRequest' from JSON`, - ); -} diff --git a/src/models/operations/getrunbookselectoptions.ts b/src/models/operations/getrunbookselectoptions.ts deleted file mode 100644 index 226c797c..00000000 --- a/src/models/operations/getrunbookselectoptions.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetRunbookSelectOptionsRequest = { - integrationSlug: string; - actionSlug: string; - field: string; - /** - * Text string of a query for filtering values. - */ - query?: string | undefined; - /** - * Generic params used to add specificity (eg an id of some kind) to the select options request - */ - scope?: string | undefined; - /** - * Maximum number of items to return. - */ - perPage?: number | undefined; -}; - -/** @internal */ -export const GetRunbookSelectOptionsRequest$inboundSchema: z.ZodType< - GetRunbookSelectOptionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - integration_slug: z.string(), - action_slug: z.string(), - field: z.string(), - query: z.string().optional(), - scope: z.string().optional(), - per_page: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - "action_slug": "actionSlug", - "per_page": "perPage", - }); -}); - -/** @internal */ -export type GetRunbookSelectOptionsRequest$Outbound = { - integration_slug: string; - action_slug: string; - field: string; - query?: string | undefined; - scope?: string | undefined; - per_page?: number | undefined; -}; - -/** @internal */ -export const GetRunbookSelectOptionsRequest$outboundSchema: z.ZodType< - GetRunbookSelectOptionsRequest$Outbound, - z.ZodTypeDef, - GetRunbookSelectOptionsRequest -> = z.object({ - integrationSlug: z.string(), - actionSlug: z.string(), - field: z.string(), - query: z.string().optional(), - scope: z.string().optional(), - perPage: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - actionSlug: "action_slug", - perPage: "per_page", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRunbookSelectOptionsRequest$ { - /** @deprecated use `GetRunbookSelectOptionsRequest$inboundSchema` instead. */ - export const inboundSchema = GetRunbookSelectOptionsRequest$inboundSchema; - /** @deprecated use `GetRunbookSelectOptionsRequest$outboundSchema` instead. */ - export const outboundSchema = GetRunbookSelectOptionsRequest$outboundSchema; - /** @deprecated use `GetRunbookSelectOptionsRequest$Outbound` instead. */ - export type Outbound = GetRunbookSelectOptionsRequest$Outbound; -} - -export function getRunbookSelectOptionsRequestToJSON( - getRunbookSelectOptionsRequest: GetRunbookSelectOptionsRequest, -): string { - return JSON.stringify( - GetRunbookSelectOptionsRequest$outboundSchema.parse( - getRunbookSelectOptionsRequest, - ), - ); -} - -export function getRunbookSelectOptionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetRunbookSelectOptionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRunbookSelectOptionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getrunbookstepvotestatus.ts b/src/models/operations/getrunbookstepvotestatus.ts deleted file mode 100644 index d4af4d89..00000000 --- a/src/models/operations/getrunbookstepvotestatus.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetRunbookStepVoteStatusRequest = { - executionId: string; - stepId: string; -}; - -/** @internal */ -export const GetRunbookStepVoteStatusRequest$inboundSchema: z.ZodType< - GetRunbookStepVoteStatusRequest, - z.ZodTypeDef, - unknown -> = z.object({ - execution_id: z.string(), - step_id: z.string(), -}).transform((v) => { - return remap$(v, { - "execution_id": "executionId", - "step_id": "stepId", - }); -}); - -/** @internal */ -export type GetRunbookStepVoteStatusRequest$Outbound = { - execution_id: string; - step_id: string; -}; - -/** @internal */ -export const GetRunbookStepVoteStatusRequest$outboundSchema: z.ZodType< - GetRunbookStepVoteStatusRequest$Outbound, - z.ZodTypeDef, - GetRunbookStepVoteStatusRequest -> = z.object({ - executionId: z.string(), - stepId: z.string(), -}).transform((v) => { - return remap$(v, { - executionId: "execution_id", - stepId: "step_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetRunbookStepVoteStatusRequest$ { - /** @deprecated use `GetRunbookStepVoteStatusRequest$inboundSchema` instead. */ - export const inboundSchema = GetRunbookStepVoteStatusRequest$inboundSchema; - /** @deprecated use `GetRunbookStepVoteStatusRequest$outboundSchema` instead. */ - export const outboundSchema = GetRunbookStepVoteStatusRequest$outboundSchema; - /** @deprecated use `GetRunbookStepVoteStatusRequest$Outbound` instead. */ - export type Outbound = GetRunbookStepVoteStatusRequest$Outbound; -} - -export function getRunbookStepVoteStatusRequestToJSON( - getRunbookStepVoteStatusRequest: GetRunbookStepVoteStatusRequest, -): string { - return JSON.stringify( - GetRunbookStepVoteStatusRequest$outboundSchema.parse( - getRunbookStepVoteStatusRequest, - ), - ); -} - -export function getRunbookStepVoteStatusRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetRunbookStepVoteStatusRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetRunbookStepVoteStatusRequest' from JSON`, - ); -} diff --git a/src/models/operations/getsavedsearch.ts b/src/models/operations/getsavedsearch.ts index 284ef5be..ddb9aca1 100644 --- a/src/models/operations/getsavedsearch.ts +++ b/src/models/operations/getsavedsearch.ts @@ -9,7 +9,7 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const GetSavedSearchPathParamResourceType = { +export const GetSavedSearchResourceType = { ChangeEvents: "change_events", Incidents: "incidents", Services: "services", @@ -21,36 +21,34 @@ export const GetSavedSearchPathParamResourceType = { Alerts: "alerts", IncidentEvents: "incident_events", } as const; -export type GetSavedSearchPathParamResourceType = ClosedEnum< - typeof GetSavedSearchPathParamResourceType +export type GetSavedSearchResourceType = ClosedEnum< + typeof GetSavedSearchResourceType >; export type GetSavedSearchRequest = { - resourceType: GetSavedSearchPathParamResourceType; + resourceType: GetSavedSearchResourceType; savedSearchId: string; }; /** @internal */ -export const GetSavedSearchPathParamResourceType$inboundSchema: z.ZodNativeEnum< - typeof GetSavedSearchPathParamResourceType -> = z.nativeEnum(GetSavedSearchPathParamResourceType); +export const GetSavedSearchResourceType$inboundSchema: z.ZodNativeEnum< + typeof GetSavedSearchResourceType +> = z.nativeEnum(GetSavedSearchResourceType); /** @internal */ -export const GetSavedSearchPathParamResourceType$outboundSchema: - z.ZodNativeEnum = - GetSavedSearchPathParamResourceType$inboundSchema; +export const GetSavedSearchResourceType$outboundSchema: z.ZodNativeEnum< + typeof GetSavedSearchResourceType +> = GetSavedSearchResourceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSavedSearchPathParamResourceType$ { - /** @deprecated use `GetSavedSearchPathParamResourceType$inboundSchema` instead. */ - export const inboundSchema = - GetSavedSearchPathParamResourceType$inboundSchema; - /** @deprecated use `GetSavedSearchPathParamResourceType$outboundSchema` instead. */ - export const outboundSchema = - GetSavedSearchPathParamResourceType$outboundSchema; +export namespace GetSavedSearchResourceType$ { + /** @deprecated use `GetSavedSearchResourceType$inboundSchema` instead. */ + export const inboundSchema = GetSavedSearchResourceType$inboundSchema; + /** @deprecated use `GetSavedSearchResourceType$outboundSchema` instead. */ + export const outboundSchema = GetSavedSearchResourceType$outboundSchema; } /** @internal */ @@ -59,7 +57,7 @@ export const GetSavedSearchRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - resource_type: GetSavedSearchPathParamResourceType$inboundSchema, + resource_type: GetSavedSearchResourceType$inboundSchema, saved_search_id: z.string(), }).transform((v) => { return remap$(v, { @@ -80,7 +78,7 @@ export const GetSavedSearchRequest$outboundSchema: z.ZodType< z.ZodTypeDef, GetSavedSearchRequest > = z.object({ - resourceType: GetSavedSearchPathParamResourceType$outboundSchema, + resourceType: GetSavedSearchResourceType$outboundSchema, savedSearchId: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/operations/getscimgroups.ts b/src/models/operations/getscimgroups.ts deleted file mode 100644 index 2e4b9600..00000000 --- a/src/models/operations/getscimgroups.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetScimGroupsRequest = { - startIndex?: number | undefined; - count?: number | undefined; - /** - * This is a string used to query groups by displayName. - * - * @remarks - * Proper example syntax for this would be `?filter=displayName eq "My Team Name"`. - * Currently we only support the `eq` operator - */ - filter?: string | undefined; -}; - -/** @internal */ -export const GetScimGroupsRequest$inboundSchema: z.ZodType< - GetScimGroupsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - startIndex: z.number().int().optional(), - count: z.number().int().optional(), - filter: z.string().optional(), -}); - -/** @internal */ -export type GetScimGroupsRequest$Outbound = { - startIndex?: number | undefined; - count?: number | undefined; - filter?: string | undefined; -}; - -/** @internal */ -export const GetScimGroupsRequest$outboundSchema: z.ZodType< - GetScimGroupsRequest$Outbound, - z.ZodTypeDef, - GetScimGroupsRequest -> = z.object({ - startIndex: z.number().int().optional(), - count: z.number().int().optional(), - filter: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetScimGroupsRequest$ { - /** @deprecated use `GetScimGroupsRequest$inboundSchema` instead. */ - export const inboundSchema = GetScimGroupsRequest$inboundSchema; - /** @deprecated use `GetScimGroupsRequest$outboundSchema` instead. */ - export const outboundSchema = GetScimGroupsRequest$outboundSchema; - /** @deprecated use `GetScimGroupsRequest$Outbound` instead. */ - export type Outbound = GetScimGroupsRequest$Outbound; -} - -export function getScimGroupsRequestToJSON( - getScimGroupsRequest: GetScimGroupsRequest, -): string { - return JSON.stringify( - GetScimGroupsRequest$outboundSchema.parse(getScimGroupsRequest), - ); -} - -export function getScimGroupsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetScimGroupsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetScimGroupsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getscimusers.ts b/src/models/operations/getscimusers.ts deleted file mode 100644 index ebd539a0..00000000 --- a/src/models/operations/getscimusers.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetScimUsersRequest = { - /** - * This is a string used to query users by either userName or email. - * - * @remarks - * Proper example syntax for this would be `?filter=userName eq john` or `?filter=userName eq "john@firehydrant.com"`. - * Currently we only support the `eq` operator - */ - filter?: string | undefined; - /** - * This is an integer which represents a pagination offset - */ - startIndex?: number | undefined; - /** - * This is an integer which represents the number of items per page in the response - */ - count?: number | undefined; -}; - -/** @internal */ -export const GetScimUsersRequest$inboundSchema: z.ZodType< - GetScimUsersRequest, - z.ZodTypeDef, - unknown -> = z.object({ - filter: z.string().optional(), - startIndex: z.number().int().optional(), - count: z.number().int().optional(), -}); - -/** @internal */ -export type GetScimUsersRequest$Outbound = { - filter?: string | undefined; - startIndex?: number | undefined; - count?: number | undefined; -}; - -/** @internal */ -export const GetScimUsersRequest$outboundSchema: z.ZodType< - GetScimUsersRequest$Outbound, - z.ZodTypeDef, - GetScimUsersRequest -> = z.object({ - filter: z.string().optional(), - startIndex: z.number().int().optional(), - count: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetScimUsersRequest$ { - /** @deprecated use `GetScimUsersRequest$inboundSchema` instead. */ - export const inboundSchema = GetScimUsersRequest$inboundSchema; - /** @deprecated use `GetScimUsersRequest$outboundSchema` instead. */ - export const outboundSchema = GetScimUsersRequest$outboundSchema; - /** @deprecated use `GetScimUsersRequest$Outbound` instead. */ - export type Outbound = GetScimUsersRequest$Outbound; -} - -export function getScimUsersRequestToJSON( - getScimUsersRequest: GetScimUsersRequest, -): string { - return JSON.stringify( - GetScimUsersRequest$outboundSchema.parse(getScimUsersRequest), - ); -} - -export function getScimUsersRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetScimUsersRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetScimUsersRequest' from JSON`, - ); -} diff --git a/src/models/operations/getservicedependencies.ts b/src/models/operations/getservicedependencies.ts index f1ba6315..18356316 100644 --- a/src/models/operations/getservicedependencies.ts +++ b/src/models/operations/getservicedependencies.ts @@ -13,7 +13,7 @@ export type GetServiceDependenciesRequest = { /** * If true, returns all dependencies in one array. If false, splits dependencies into different arrays for child and parent dependencies */ - flatten?: boolean | undefined; + flatten?: boolean | null | undefined; }; /** @internal */ @@ -23,7 +23,7 @@ export const GetServiceDependenciesRequest$inboundSchema: z.ZodType< unknown > = z.object({ service_id: z.string(), - flatten: z.boolean().optional(), + flatten: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "service_id": "serviceId", @@ -33,7 +33,7 @@ export const GetServiceDependenciesRequest$inboundSchema: z.ZodType< /** @internal */ export type GetServiceDependenciesRequest$Outbound = { service_id: string; - flatten?: boolean | undefined; + flatten?: boolean | null | undefined; }; /** @internal */ @@ -43,7 +43,7 @@ export const GetServiceDependenciesRequest$outboundSchema: z.ZodType< GetServiceDependenciesRequest > = z.object({ serviceId: z.string(), - flatten: z.boolean().optional(), + flatten: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { serviceId: "service_id", diff --git a/src/models/operations/getsignalemailtarget.ts b/src/models/operations/getsignalemailtarget.ts deleted file mode 100644 index 0f2b18fd..00000000 --- a/src/models/operations/getsignalemailtarget.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetSignalEmailTargetRequest = { - id: string; -}; - -/** @internal */ -export const GetSignalEmailTargetRequest$inboundSchema: z.ZodType< - GetSignalEmailTargetRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - -/** @internal */ -export type GetSignalEmailTargetRequest$Outbound = { - id: string; -}; - -/** @internal */ -export const GetSignalEmailTargetRequest$outboundSchema: z.ZodType< - GetSignalEmailTargetRequest$Outbound, - z.ZodTypeDef, - GetSignalEmailTargetRequest -> = z.object({ - id: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalEmailTargetRequest$ { - /** @deprecated use `GetSignalEmailTargetRequest$inboundSchema` instead. */ - export const inboundSchema = GetSignalEmailTargetRequest$inboundSchema; - /** @deprecated use `GetSignalEmailTargetRequest$outboundSchema` instead. */ - export const outboundSchema = GetSignalEmailTargetRequest$outboundSchema; - /** @deprecated use `GetSignalEmailTargetRequest$Outbound` instead. */ - export type Outbound = GetSignalEmailTargetRequest$Outbound; -} - -export function getSignalEmailTargetRequestToJSON( - getSignalEmailTargetRequest: GetSignalEmailTargetRequest, -): string { - return JSON.stringify( - GetSignalEmailTargetRequest$outboundSchema.parse( - getSignalEmailTargetRequest, - ), - ); -} - -export function getSignalEmailTargetRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSignalEmailTargetRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSignalEmailTargetRequest' from JSON`, - ); -} diff --git a/src/models/operations/getsignalgroupedmetrics.ts b/src/models/operations/getsignalgroupedmetrics.ts deleted file mode 100644 index 446a065c..00000000 --- a/src/models/operations/getsignalgroupedmetrics.ts +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * String that determines how records are grouped - */ -export const GroupBy = { - SignalRules: "signal_rules", - Teams: "teams", - Services: "services", - Environments: "environments", - Tags: "tags", -} as const; -/** - * String that determines how records are grouped - */ -export type GroupBy = ClosedEnum; - -/** - * String that determines how records are sorted - */ -export const SortBy = { - TotalOpenedAlerts: "total_opened_alerts", - TotalAckedAlerts: "total_acked_alerts", - TotalIncidents: "total_incidents", - AckedPercentage: "acked_percentage", - IncidentsPercentage: "incidents_percentage", -} as const; -/** - * String that determines how records are sorted - */ -export type SortBy = ClosedEnum; - -/** - * String that determines how records are sorted - */ -export const GetSignalGroupedMetricsQueryParamSortDirection = { - Asc: "asc", - Desc: "desc", -} as const; -/** - * String that determines how records are sorted - */ -export type GetSignalGroupedMetricsQueryParamSortDirection = ClosedEnum< - typeof GetSignalGroupedMetricsQueryParamSortDirection ->; - -export type GetSignalGroupedMetricsRequest = { - /** - * A comma separated list of signal rule IDs - */ - signalRules?: string | undefined; - /** - * A comma separated list of team IDs - */ - teams?: string | undefined; - /** - * A comma separated list of environment IDs - */ - environments?: string | undefined; - /** - * A comma separated list of service IDs - */ - services?: string | undefined; - /** - * A comma separated list of tags - */ - tags?: string | undefined; - /** - * A comma separated list of user IDs - */ - users?: string | undefined; - /** - * String that determines how records are grouped - */ - groupBy?: GroupBy | undefined; - /** - * String that determines how records are sorted - */ - sortBy?: SortBy | undefined; - /** - * String that determines how records are sorted - */ - sortDirection?: GetSignalGroupedMetricsQueryParamSortDirection | undefined; - /** - * The start date to return metrics from - */ - startDate?: Date | undefined; - /** - * The end date to return metrics from - */ - endDate?: Date | undefined; -}; - -/** @internal */ -export const GroupBy$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(GroupBy); - -/** @internal */ -export const GroupBy$outboundSchema: z.ZodNativeEnum = - GroupBy$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GroupBy$ { - /** @deprecated use `GroupBy$inboundSchema` instead. */ - export const inboundSchema = GroupBy$inboundSchema; - /** @deprecated use `GroupBy$outboundSchema` instead. */ - export const outboundSchema = GroupBy$outboundSchema; -} - -/** @internal */ -export const SortBy$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(SortBy); - -/** @internal */ -export const SortBy$outboundSchema: z.ZodNativeEnum = - SortBy$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SortBy$ { - /** @deprecated use `SortBy$inboundSchema` instead. */ - export const inboundSchema = SortBy$inboundSchema; - /** @deprecated use `SortBy$outboundSchema` instead. */ - export const outboundSchema = SortBy$outboundSchema; -} - -/** @internal */ -export const GetSignalGroupedMetricsQueryParamSortDirection$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(GetSignalGroupedMetricsQueryParamSortDirection); - -/** @internal */ -export const GetSignalGroupedMetricsQueryParamSortDirection$outboundSchema: - z.ZodNativeEnum = - GetSignalGroupedMetricsQueryParamSortDirection$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalGroupedMetricsQueryParamSortDirection$ { - /** @deprecated use `GetSignalGroupedMetricsQueryParamSortDirection$inboundSchema` instead. */ - export const inboundSchema = - GetSignalGroupedMetricsQueryParamSortDirection$inboundSchema; - /** @deprecated use `GetSignalGroupedMetricsQueryParamSortDirection$outboundSchema` instead. */ - export const outboundSchema = - GetSignalGroupedMetricsQueryParamSortDirection$outboundSchema; -} - -/** @internal */ -export const GetSignalGroupedMetricsRequest$inboundSchema: z.ZodType< - GetSignalGroupedMetricsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - signal_rules: z.string().optional(), - teams: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - users: z.string().optional(), - group_by: GroupBy$inboundSchema.optional(), - sort_by: SortBy$inboundSchema.optional(), - sort_direction: GetSignalGroupedMetricsQueryParamSortDirection$inboundSchema - .optional(), - start_date: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - end_date: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), -}).transform((v) => { - return remap$(v, { - "signal_rules": "signalRules", - "group_by": "groupBy", - "sort_by": "sortBy", - "sort_direction": "sortDirection", - "start_date": "startDate", - "end_date": "endDate", - }); -}); - -/** @internal */ -export type GetSignalGroupedMetricsRequest$Outbound = { - signal_rules?: string | undefined; - teams?: string | undefined; - environments?: string | undefined; - services?: string | undefined; - tags?: string | undefined; - users?: string | undefined; - group_by?: string | undefined; - sort_by?: string | undefined; - sort_direction?: string | undefined; - start_date?: string | undefined; - end_date?: string | undefined; -}; - -/** @internal */ -export const GetSignalGroupedMetricsRequest$outboundSchema: z.ZodType< - GetSignalGroupedMetricsRequest$Outbound, - z.ZodTypeDef, - GetSignalGroupedMetricsRequest -> = z.object({ - signalRules: z.string().optional(), - teams: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - users: z.string().optional(), - groupBy: GroupBy$outboundSchema.optional(), - sortBy: SortBy$outboundSchema.optional(), - sortDirection: GetSignalGroupedMetricsQueryParamSortDirection$outboundSchema - .optional(), - startDate: z.date().transform(v => v.toISOString()).optional(), - endDate: z.date().transform(v => v.toISOString()).optional(), -}).transform((v) => { - return remap$(v, { - signalRules: "signal_rules", - groupBy: "group_by", - sortBy: "sort_by", - sortDirection: "sort_direction", - startDate: "start_date", - endDate: "end_date", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalGroupedMetricsRequest$ { - /** @deprecated use `GetSignalGroupedMetricsRequest$inboundSchema` instead. */ - export const inboundSchema = GetSignalGroupedMetricsRequest$inboundSchema; - /** @deprecated use `GetSignalGroupedMetricsRequest$outboundSchema` instead. */ - export const outboundSchema = GetSignalGroupedMetricsRequest$outboundSchema; - /** @deprecated use `GetSignalGroupedMetricsRequest$Outbound` instead. */ - export type Outbound = GetSignalGroupedMetricsRequest$Outbound; -} - -export function getSignalGroupedMetricsRequestToJSON( - getSignalGroupedMetricsRequest: GetSignalGroupedMetricsRequest, -): string { - return JSON.stringify( - GetSignalGroupedMetricsRequest$outboundSchema.parse( - getSignalGroupedMetricsRequest, - ), - ); -} - -export function getSignalGroupedMetricsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSignalGroupedMetricsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSignalGroupedMetricsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getsignalingesturl.ts b/src/models/operations/getsignalingesturl.ts deleted file mode 100644 index 557e4a27..00000000 --- a/src/models/operations/getsignalingesturl.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetSignalIngestUrlRequest = { - /** - * Team ID to send signals to directly - */ - teamId?: string | undefined; - /** - * Escalation policy ID to send signals to directly. `team_id` is required if this is provided. - */ - escalationPolicyId?: string | undefined; - /** - * On-call schedule ID to send signals to directly. `team_id` is required if this is provided. - */ - onCallScheduleId?: string | undefined; - /** - * User ID to send signals to directly - */ - userId?: string | undefined; -}; - -/** @internal */ -export const GetSignalIngestUrlRequest$inboundSchema: z.ZodType< - GetSignalIngestUrlRequest, - z.ZodTypeDef, - unknown -> = z.object({ - team_id: z.string().optional(), - escalation_policy_id: z.string().optional(), - on_call_schedule_id: z.string().optional(), - user_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "escalation_policy_id": "escalationPolicyId", - "on_call_schedule_id": "onCallScheduleId", - "user_id": "userId", - }); -}); - -/** @internal */ -export type GetSignalIngestUrlRequest$Outbound = { - team_id?: string | undefined; - escalation_policy_id?: string | undefined; - on_call_schedule_id?: string | undefined; - user_id?: string | undefined; -}; - -/** @internal */ -export const GetSignalIngestUrlRequest$outboundSchema: z.ZodType< - GetSignalIngestUrlRequest$Outbound, - z.ZodTypeDef, - GetSignalIngestUrlRequest -> = z.object({ - teamId: z.string().optional(), - escalationPolicyId: z.string().optional(), - onCallScheduleId: z.string().optional(), - userId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - escalationPolicyId: "escalation_policy_id", - onCallScheduleId: "on_call_schedule_id", - userId: "user_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalIngestUrlRequest$ { - /** @deprecated use `GetSignalIngestUrlRequest$inboundSchema` instead. */ - export const inboundSchema = GetSignalIngestUrlRequest$inboundSchema; - /** @deprecated use `GetSignalIngestUrlRequest$outboundSchema` instead. */ - export const outboundSchema = GetSignalIngestUrlRequest$outboundSchema; - /** @deprecated use `GetSignalIngestUrlRequest$Outbound` instead. */ - export type Outbound = GetSignalIngestUrlRequest$Outbound; -} - -export function getSignalIngestUrlRequestToJSON( - getSignalIngestUrlRequest: GetSignalIngestUrlRequest, -): string { - return JSON.stringify( - GetSignalIngestUrlRequest$outboundSchema.parse(getSignalIngestUrlRequest), - ); -} - -export function getSignalIngestUrlRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSignalIngestUrlRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSignalIngestUrlRequest' from JSON`, - ); -} diff --git a/src/models/operations/getsignalsanalyticstimeseries.ts b/src/models/operations/getsignalsanalyticstimeseries.ts deleted file mode 100644 index 46180fff..00000000 --- a/src/models/operations/getsignalsanalyticstimeseries.ts +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * String that determines how records are grouped - */ -export const Bucket = { - Month: "month", - Week: "week", - Day: "day", -} as const; -/** - * String that determines how records are grouped - */ -export type Bucket = ClosedEnum; - -/** - * String that determines how records are grouped - */ -export const GetSignalsAnalyticsTimeseriesQueryParamGroupBy = { - SignalRules: "signal_rules", - Teams: "teams", - Services: "services", - Environments: "environments", - Tags: "tags", -} as const; -/** - * String that determines how records are grouped - */ -export type GetSignalsAnalyticsTimeseriesQueryParamGroupBy = ClosedEnum< - typeof GetSignalsAnalyticsTimeseriesQueryParamGroupBy ->; - -/** - * String that determines how records are sorted - */ -export const GetSignalsAnalyticsTimeseriesQueryParamSortBy = { - TotalOpenedAlerts: "total_opened_alerts", - TotalAckedAlerts: "total_acked_alerts", - TotalIncidents: "total_incidents", - AckedPercentage: "acked_percentage", - IncidentsPercentage: "incidents_percentage", -} as const; -/** - * String that determines how records are sorted - */ -export type GetSignalsAnalyticsTimeseriesQueryParamSortBy = ClosedEnum< - typeof GetSignalsAnalyticsTimeseriesQueryParamSortBy ->; - -/** - * String that determines how records are sorted - */ -export const GetSignalsAnalyticsTimeseriesQueryParamSortDirection = { - Asc: "asc", - Desc: "desc", -} as const; -/** - * String that determines how records are sorted - */ -export type GetSignalsAnalyticsTimeseriesQueryParamSortDirection = ClosedEnum< - typeof GetSignalsAnalyticsTimeseriesQueryParamSortDirection ->; - -export type GetSignalsAnalyticsTimeseriesRequest = { - /** - * String that determines how records are grouped - */ - bucket?: Bucket | undefined; - /** - * A comma separated list of signal rule IDs - */ - signalRules?: string | undefined; - /** - * A comma separated list of team IDs - */ - teams?: string | undefined; - /** - * A comma separated list of environment IDs - */ - environments?: string | undefined; - /** - * A comma separated list of service IDs - */ - services?: string | undefined; - /** - * A comma separated list of tags - */ - tags?: string | undefined; - /** - * A comma separated list of user IDs - */ - users?: string | undefined; - /** - * String that determines how records are grouped - */ - groupBy?: GetSignalsAnalyticsTimeseriesQueryParamGroupBy | undefined; - /** - * String that determines how records are sorted - */ - sortBy?: GetSignalsAnalyticsTimeseriesQueryParamSortBy | undefined; - /** - * String that determines how records are sorted - */ - sortDirection?: - | GetSignalsAnalyticsTimeseriesQueryParamSortDirection - | undefined; - /** - * The start date to return metrics from - */ - startDate?: Date | undefined; - /** - * The end date to return metrics from - */ - endDate?: Date | undefined; -}; - -/** @internal */ -export const Bucket$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Bucket); - -/** @internal */ -export const Bucket$outboundSchema: z.ZodNativeEnum = - Bucket$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Bucket$ { - /** @deprecated use `Bucket$inboundSchema` instead. */ - export const inboundSchema = Bucket$inboundSchema; - /** @deprecated use `Bucket$outboundSchema` instead. */ - export const outboundSchema = Bucket$outboundSchema; -} - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesQueryParamGroupBy$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(GetSignalsAnalyticsTimeseriesQueryParamGroupBy); - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesQueryParamGroupBy$outboundSchema: - z.ZodNativeEnum = - GetSignalsAnalyticsTimeseriesQueryParamGroupBy$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalsAnalyticsTimeseriesQueryParamGroupBy$ { - /** @deprecated use `GetSignalsAnalyticsTimeseriesQueryParamGroupBy$inboundSchema` instead. */ - export const inboundSchema = - GetSignalsAnalyticsTimeseriesQueryParamGroupBy$inboundSchema; - /** @deprecated use `GetSignalsAnalyticsTimeseriesQueryParamGroupBy$outboundSchema` instead. */ - export const outboundSchema = - GetSignalsAnalyticsTimeseriesQueryParamGroupBy$outboundSchema; -} - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesQueryParamSortBy$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(GetSignalsAnalyticsTimeseriesQueryParamSortBy); - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesQueryParamSortBy$outboundSchema: - z.ZodNativeEnum = - GetSignalsAnalyticsTimeseriesQueryParamSortBy$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalsAnalyticsTimeseriesQueryParamSortBy$ { - /** @deprecated use `GetSignalsAnalyticsTimeseriesQueryParamSortBy$inboundSchema` instead. */ - export const inboundSchema = - GetSignalsAnalyticsTimeseriesQueryParamSortBy$inboundSchema; - /** @deprecated use `GetSignalsAnalyticsTimeseriesQueryParamSortBy$outboundSchema` instead. */ - export const outboundSchema = - GetSignalsAnalyticsTimeseriesQueryParamSortBy$outboundSchema; -} - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesQueryParamSortDirection$inboundSchema: - z.ZodNativeEnum = - z.nativeEnum(GetSignalsAnalyticsTimeseriesQueryParamSortDirection); - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesQueryParamSortDirection$outboundSchema: - z.ZodNativeEnum = - GetSignalsAnalyticsTimeseriesQueryParamSortDirection$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalsAnalyticsTimeseriesQueryParamSortDirection$ { - /** @deprecated use `GetSignalsAnalyticsTimeseriesQueryParamSortDirection$inboundSchema` instead. */ - export const inboundSchema = - GetSignalsAnalyticsTimeseriesQueryParamSortDirection$inboundSchema; - /** @deprecated use `GetSignalsAnalyticsTimeseriesQueryParamSortDirection$outboundSchema` instead. */ - export const outboundSchema = - GetSignalsAnalyticsTimeseriesQueryParamSortDirection$outboundSchema; -} - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesRequest$inboundSchema: z.ZodType< - GetSignalsAnalyticsTimeseriesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - bucket: Bucket$inboundSchema.optional(), - signal_rules: z.string().optional(), - teams: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - users: z.string().optional(), - group_by: GetSignalsAnalyticsTimeseriesQueryParamGroupBy$inboundSchema - .optional(), - sort_by: GetSignalsAnalyticsTimeseriesQueryParamSortBy$inboundSchema - .optional(), - sort_direction: - GetSignalsAnalyticsTimeseriesQueryParamSortDirection$inboundSchema - .optional(), - start_date: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - end_date: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), -}).transform((v) => { - return remap$(v, { - "signal_rules": "signalRules", - "group_by": "groupBy", - "sort_by": "sortBy", - "sort_direction": "sortDirection", - "start_date": "startDate", - "end_date": "endDate", - }); -}); - -/** @internal */ -export type GetSignalsAnalyticsTimeseriesRequest$Outbound = { - bucket?: string | undefined; - signal_rules?: string | undefined; - teams?: string | undefined; - environments?: string | undefined; - services?: string | undefined; - tags?: string | undefined; - users?: string | undefined; - group_by?: string | undefined; - sort_by?: string | undefined; - sort_direction?: string | undefined; - start_date?: string | undefined; - end_date?: string | undefined; -}; - -/** @internal */ -export const GetSignalsAnalyticsTimeseriesRequest$outboundSchema: z.ZodType< - GetSignalsAnalyticsTimeseriesRequest$Outbound, - z.ZodTypeDef, - GetSignalsAnalyticsTimeseriesRequest -> = z.object({ - bucket: Bucket$outboundSchema.optional(), - signalRules: z.string().optional(), - teams: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - users: z.string().optional(), - groupBy: GetSignalsAnalyticsTimeseriesQueryParamGroupBy$outboundSchema - .optional(), - sortBy: GetSignalsAnalyticsTimeseriesQueryParamSortBy$outboundSchema - .optional(), - sortDirection: - GetSignalsAnalyticsTimeseriesQueryParamSortDirection$outboundSchema - .optional(), - startDate: z.date().transform(v => v.toISOString()).optional(), - endDate: z.date().transform(v => v.toISOString()).optional(), -}).transform((v) => { - return remap$(v, { - signalRules: "signal_rules", - groupBy: "group_by", - sortBy: "sort_by", - sortDirection: "sort_direction", - startDate: "start_date", - endDate: "end_date", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSignalsAnalyticsTimeseriesRequest$ { - /** @deprecated use `GetSignalsAnalyticsTimeseriesRequest$inboundSchema` instead. */ - export const inboundSchema = - GetSignalsAnalyticsTimeseriesRequest$inboundSchema; - /** @deprecated use `GetSignalsAnalyticsTimeseriesRequest$outboundSchema` instead. */ - export const outboundSchema = - GetSignalsAnalyticsTimeseriesRequest$outboundSchema; - /** @deprecated use `GetSignalsAnalyticsTimeseriesRequest$Outbound` instead. */ - export type Outbound = GetSignalsAnalyticsTimeseriesRequest$Outbound; -} - -export function getSignalsAnalyticsTimeseriesRequestToJSON( - getSignalsAnalyticsTimeseriesRequest: GetSignalsAnalyticsTimeseriesRequest, -): string { - return JSON.stringify( - GetSignalsAnalyticsTimeseriesRequest$outboundSchema.parse( - getSignalsAnalyticsTimeseriesRequest, - ), - ); -} - -export function getSignalsAnalyticsTimeseriesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetSignalsAnalyticsTimeseriesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSignalsAnalyticsTimeseriesRequest' from JSON`, - ); -} diff --git a/src/models/operations/getsignalsemailtarget.ts b/src/models/operations/getsignalsemailtarget.ts new file mode 100644 index 00000000..4ff8a11c --- /dev/null +++ b/src/models/operations/getsignalsemailtarget.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetSignalsEmailTargetRequest = { + id: string; +}; + +/** @internal */ +export const GetSignalsEmailTargetRequest$inboundSchema: z.ZodType< + GetSignalsEmailTargetRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type GetSignalsEmailTargetRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const GetSignalsEmailTargetRequest$outboundSchema: z.ZodType< + GetSignalsEmailTargetRequest$Outbound, + z.ZodTypeDef, + GetSignalsEmailTargetRequest +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsEmailTargetRequest$ { + /** @deprecated use `GetSignalsEmailTargetRequest$inboundSchema` instead. */ + export const inboundSchema = GetSignalsEmailTargetRequest$inboundSchema; + /** @deprecated use `GetSignalsEmailTargetRequest$outboundSchema` instead. */ + export const outboundSchema = GetSignalsEmailTargetRequest$outboundSchema; + /** @deprecated use `GetSignalsEmailTargetRequest$Outbound` instead. */ + export type Outbound = GetSignalsEmailTargetRequest$Outbound; +} + +export function getSignalsEmailTargetRequestToJSON( + getSignalsEmailTargetRequest: GetSignalsEmailTargetRequest, +): string { + return JSON.stringify( + GetSignalsEmailTargetRequest$outboundSchema.parse( + getSignalsEmailTargetRequest, + ), + ); +} + +export function getSignalsEmailTargetRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetSignalsEmailTargetRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetSignalsEmailTargetRequest' from JSON`, + ); +} diff --git a/src/models/operations/getsignalsgroupedmetrics.ts b/src/models/operations/getsignalsgroupedmetrics.ts new file mode 100644 index 00000000..b38d6e15 --- /dev/null +++ b/src/models/operations/getsignalsgroupedmetrics.ts @@ -0,0 +1,285 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * String that determines how records are grouped + */ +export const GetSignalsGroupedMetricsGroupBy = { + SignalRules: "signal_rules", + Teams: "teams", + Services: "services", + Environments: "environments", + Tags: "tags", +} as const; +/** + * String that determines how records are grouped + */ +export type GetSignalsGroupedMetricsGroupBy = ClosedEnum< + typeof GetSignalsGroupedMetricsGroupBy +>; + +/** + * String that determines how records are sorted + */ +export const GetSignalsGroupedMetricsSortBy = { + TotalOpenedAlerts: "total_opened_alerts", + TotalAckedAlerts: "total_acked_alerts", + TotalIncidents: "total_incidents", + AckedPercentage: "acked_percentage", + IncidentsPercentage: "incidents_percentage", +} as const; +/** + * String that determines how records are sorted + */ +export type GetSignalsGroupedMetricsSortBy = ClosedEnum< + typeof GetSignalsGroupedMetricsSortBy +>; + +/** + * String that determines how records are sorted + */ +export const GetSignalsGroupedMetricsSortDirection = { + Asc: "asc", + Desc: "desc", +} as const; +/** + * String that determines how records are sorted + */ +export type GetSignalsGroupedMetricsSortDirection = ClosedEnum< + typeof GetSignalsGroupedMetricsSortDirection +>; + +export type GetSignalsGroupedMetricsRequest = { + /** + * A comma separated list of signal rule IDs + */ + signalRules?: string | null | undefined; + /** + * A comma separated list of team IDs + */ + teams?: string | null | undefined; + /** + * A comma separated list of environment IDs + */ + environments?: string | null | undefined; + /** + * A comma separated list of service IDs + */ + services?: string | null | undefined; + /** + * A comma separated list of tags + */ + tags?: string | null | undefined; + /** + * A comma separated list of user IDs + */ + users?: string | null | undefined; + /** + * String that determines how records are grouped + */ + groupBy?: GetSignalsGroupedMetricsGroupBy | null | undefined; + /** + * String that determines how records are sorted + */ + sortBy?: GetSignalsGroupedMetricsSortBy | null | undefined; + /** + * String that determines how records are sorted + */ + sortDirection?: GetSignalsGroupedMetricsSortDirection | null | undefined; + /** + * The start date to return metrics from + */ + startDate?: Date | null | undefined; + /** + * The end date to return metrics from + */ + endDate?: Date | null | undefined; +}; + +/** @internal */ +export const GetSignalsGroupedMetricsGroupBy$inboundSchema: z.ZodNativeEnum< + typeof GetSignalsGroupedMetricsGroupBy +> = z.nativeEnum(GetSignalsGroupedMetricsGroupBy); + +/** @internal */ +export const GetSignalsGroupedMetricsGroupBy$outboundSchema: z.ZodNativeEnum< + typeof GetSignalsGroupedMetricsGroupBy +> = GetSignalsGroupedMetricsGroupBy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsGroupedMetricsGroupBy$ { + /** @deprecated use `GetSignalsGroupedMetricsGroupBy$inboundSchema` instead. */ + export const inboundSchema = GetSignalsGroupedMetricsGroupBy$inboundSchema; + /** @deprecated use `GetSignalsGroupedMetricsGroupBy$outboundSchema` instead. */ + export const outboundSchema = GetSignalsGroupedMetricsGroupBy$outboundSchema; +} + +/** @internal */ +export const GetSignalsGroupedMetricsSortBy$inboundSchema: z.ZodNativeEnum< + typeof GetSignalsGroupedMetricsSortBy +> = z.nativeEnum(GetSignalsGroupedMetricsSortBy); + +/** @internal */ +export const GetSignalsGroupedMetricsSortBy$outboundSchema: z.ZodNativeEnum< + typeof GetSignalsGroupedMetricsSortBy +> = GetSignalsGroupedMetricsSortBy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsGroupedMetricsSortBy$ { + /** @deprecated use `GetSignalsGroupedMetricsSortBy$inboundSchema` instead. */ + export const inboundSchema = GetSignalsGroupedMetricsSortBy$inboundSchema; + /** @deprecated use `GetSignalsGroupedMetricsSortBy$outboundSchema` instead. */ + export const outboundSchema = GetSignalsGroupedMetricsSortBy$outboundSchema; +} + +/** @internal */ +export const GetSignalsGroupedMetricsSortDirection$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + GetSignalsGroupedMetricsSortDirection, + ); + +/** @internal */ +export const GetSignalsGroupedMetricsSortDirection$outboundSchema: + z.ZodNativeEnum = + GetSignalsGroupedMetricsSortDirection$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsGroupedMetricsSortDirection$ { + /** @deprecated use `GetSignalsGroupedMetricsSortDirection$inboundSchema` instead. */ + export const inboundSchema = + GetSignalsGroupedMetricsSortDirection$inboundSchema; + /** @deprecated use `GetSignalsGroupedMetricsSortDirection$outboundSchema` instead. */ + export const outboundSchema = + GetSignalsGroupedMetricsSortDirection$outboundSchema; +} + +/** @internal */ +export const GetSignalsGroupedMetricsRequest$inboundSchema: z.ZodType< + GetSignalsGroupedMetricsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + signal_rules: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + group_by: z.nullable(GetSignalsGroupedMetricsGroupBy$inboundSchema) + .optional(), + sort_by: z.nullable(GetSignalsGroupedMetricsSortBy$inboundSchema).optional(), + sort_direction: z.nullable( + GetSignalsGroupedMetricsSortDirection$inboundSchema, + ).optional(), + start_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + end_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "signal_rules": "signalRules", + "group_by": "groupBy", + "sort_by": "sortBy", + "sort_direction": "sortDirection", + "start_date": "startDate", + "end_date": "endDate", + }); +}); + +/** @internal */ +export type GetSignalsGroupedMetricsRequest$Outbound = { + signal_rules?: string | null | undefined; + teams?: string | null | undefined; + environments?: string | null | undefined; + services?: string | null | undefined; + tags?: string | null | undefined; + users?: string | null | undefined; + group_by?: string | null | undefined; + sort_by?: string | null | undefined; + sort_direction?: string | null | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; +}; + +/** @internal */ +export const GetSignalsGroupedMetricsRequest$outboundSchema: z.ZodType< + GetSignalsGroupedMetricsRequest$Outbound, + z.ZodTypeDef, + GetSignalsGroupedMetricsRequest +> = z.object({ + signalRules: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + groupBy: z.nullable(GetSignalsGroupedMetricsGroupBy$outboundSchema) + .optional(), + sortBy: z.nullable(GetSignalsGroupedMetricsSortBy$outboundSchema).optional(), + sortDirection: z.nullable( + GetSignalsGroupedMetricsSortDirection$outboundSchema, + ).optional(), + startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + signalRules: "signal_rules", + groupBy: "group_by", + sortBy: "sort_by", + sortDirection: "sort_direction", + startDate: "start_date", + endDate: "end_date", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsGroupedMetricsRequest$ { + /** @deprecated use `GetSignalsGroupedMetricsRequest$inboundSchema` instead. */ + export const inboundSchema = GetSignalsGroupedMetricsRequest$inboundSchema; + /** @deprecated use `GetSignalsGroupedMetricsRequest$outboundSchema` instead. */ + export const outboundSchema = GetSignalsGroupedMetricsRequest$outboundSchema; + /** @deprecated use `GetSignalsGroupedMetricsRequest$Outbound` instead. */ + export type Outbound = GetSignalsGroupedMetricsRequest$Outbound; +} + +export function getSignalsGroupedMetricsRequestToJSON( + getSignalsGroupedMetricsRequest: GetSignalsGroupedMetricsRequest, +): string { + return JSON.stringify( + GetSignalsGroupedMetricsRequest$outboundSchema.parse( + getSignalsGroupedMetricsRequest, + ), + ); +} + +export function getSignalsGroupedMetricsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetSignalsGroupedMetricsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetSignalsGroupedMetricsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getsignalsingesturl.ts b/src/models/operations/getsignalsingesturl.ts new file mode 100644 index 00000000..cdf4a94b --- /dev/null +++ b/src/models/operations/getsignalsingesturl.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetSignalsIngestUrlRequest = { + /** + * Team ID to send signals to directly + */ + teamId?: string | null | undefined; + /** + * Escalation policy ID to send signals to directly. `team_id` is required if this is provided. + */ + escalationPolicyId?: string | null | undefined; + /** + * On-call schedule ID to send signals to directly. `team_id` is required if this is provided. + */ + onCallScheduleId?: string | null | undefined; + /** + * User ID to send signals to directly + */ + userId?: string | null | undefined; +}; + +/** @internal */ +export const GetSignalsIngestUrlRequest$inboundSchema: z.ZodType< + GetSignalsIngestUrlRequest, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.nullable(z.string()).optional(), + escalation_policy_id: z.nullable(z.string()).optional(), + on_call_schedule_id: z.nullable(z.string()).optional(), + user_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "escalation_policy_id": "escalationPolicyId", + "on_call_schedule_id": "onCallScheduleId", + "user_id": "userId", + }); +}); + +/** @internal */ +export type GetSignalsIngestUrlRequest$Outbound = { + team_id?: string | null | undefined; + escalation_policy_id?: string | null | undefined; + on_call_schedule_id?: string | null | undefined; + user_id?: string | null | undefined; +}; + +/** @internal */ +export const GetSignalsIngestUrlRequest$outboundSchema: z.ZodType< + GetSignalsIngestUrlRequest$Outbound, + z.ZodTypeDef, + GetSignalsIngestUrlRequest +> = z.object({ + teamId: z.nullable(z.string()).optional(), + escalationPolicyId: z.nullable(z.string()).optional(), + onCallScheduleId: z.nullable(z.string()).optional(), + userId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + escalationPolicyId: "escalation_policy_id", + onCallScheduleId: "on_call_schedule_id", + userId: "user_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsIngestUrlRequest$ { + /** @deprecated use `GetSignalsIngestUrlRequest$inboundSchema` instead. */ + export const inboundSchema = GetSignalsIngestUrlRequest$inboundSchema; + /** @deprecated use `GetSignalsIngestUrlRequest$outboundSchema` instead. */ + export const outboundSchema = GetSignalsIngestUrlRequest$outboundSchema; + /** @deprecated use `GetSignalsIngestUrlRequest$Outbound` instead. */ + export type Outbound = GetSignalsIngestUrlRequest$Outbound; +} + +export function getSignalsIngestUrlRequestToJSON( + getSignalsIngestUrlRequest: GetSignalsIngestUrlRequest, +): string { + return JSON.stringify( + GetSignalsIngestUrlRequest$outboundSchema.parse(getSignalsIngestUrlRequest), + ); +} + +export function getSignalsIngestUrlRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetSignalsIngestUrlRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetSignalsIngestUrlRequest' from JSON`, + ); +} diff --git a/src/models/operations/getsignalsmttxanalytics.ts b/src/models/operations/getsignalsmttxanalytics.ts index af197e8e..624dbe79 100644 --- a/src/models/operations/getsignalsmttxanalytics.ts +++ b/src/models/operations/getsignalsmttxanalytics.ts @@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * String that determines how records are grouped */ -export const QueryParamGroupBy = { +export const GetSignalsMttxAnalyticsGroupBy = { SignalRules: "signal_rules", Teams: "teams", Services: "services", @@ -22,12 +22,14 @@ export const QueryParamGroupBy = { /** * String that determines how records are grouped */ -export type QueryParamGroupBy = ClosedEnum; +export type GetSignalsMttxAnalyticsGroupBy = ClosedEnum< + typeof GetSignalsMttxAnalyticsGroupBy +>; /** * String that determines how records are sorted */ -export const QueryParamSortBy = { +export const GetSignalsMttxAnalyticsSortBy = { TotalOpenedAlerts: "total_opened_alerts", TotalAckedAlerts: "total_acked_alerts", TotalIncidents: "total_incidents", @@ -37,132 +39,135 @@ export const QueryParamSortBy = { /** * String that determines how records are sorted */ -export type QueryParamSortBy = ClosedEnum; +export type GetSignalsMttxAnalyticsSortBy = ClosedEnum< + typeof GetSignalsMttxAnalyticsSortBy +>; /** * String that determines how records are sorted */ -export const GetSignalsMttxAnalyticsQueryParamSortDirection = { +export const GetSignalsMttxAnalyticsSortDirection = { Asc: "asc", Desc: "desc", } as const; /** * String that determines how records are sorted */ -export type GetSignalsMttxAnalyticsQueryParamSortDirection = ClosedEnum< - typeof GetSignalsMttxAnalyticsQueryParamSortDirection +export type GetSignalsMttxAnalyticsSortDirection = ClosedEnum< + typeof GetSignalsMttxAnalyticsSortDirection >; export type GetSignalsMttxAnalyticsRequest = { /** * A comma separated list of signal rule IDs */ - signalRules?: string | undefined; + signalRules?: string | null | undefined; /** * A comma separated list of team IDs */ - teams?: string | undefined; + teams?: string | null | undefined; /** * A comma separated list of environment IDs */ - environments?: string | undefined; + environments?: string | null | undefined; /** * A comma separated list of service IDs */ - services?: string | undefined; + services?: string | null | undefined; /** * A comma separated list of tags */ - tags?: string | undefined; + tags?: string | null | undefined; /** * A comma separated list of user IDs */ - users?: string | undefined; + users?: string | null | undefined; /** * String that determines how records are grouped */ - groupBy?: QueryParamGroupBy | undefined; + groupBy?: GetSignalsMttxAnalyticsGroupBy | null | undefined; /** * String that determines how records are sorted */ - sortBy?: QueryParamSortBy | undefined; + sortBy?: GetSignalsMttxAnalyticsSortBy | null | undefined; /** * String that determines how records are sorted */ - sortDirection?: GetSignalsMttxAnalyticsQueryParamSortDirection | undefined; + sortDirection?: GetSignalsMttxAnalyticsSortDirection | null | undefined; /** * The start date to return metrics from */ - startDate?: Date | undefined; + startDate?: Date | null | undefined; /** * The end date to return metrics from */ - endDate?: Date | undefined; + endDate?: Date | null | undefined; }; /** @internal */ -export const QueryParamGroupBy$inboundSchema: z.ZodNativeEnum< - typeof QueryParamGroupBy -> = z.nativeEnum(QueryParamGroupBy); +export const GetSignalsMttxAnalyticsGroupBy$inboundSchema: z.ZodNativeEnum< + typeof GetSignalsMttxAnalyticsGroupBy +> = z.nativeEnum(GetSignalsMttxAnalyticsGroupBy); /** @internal */ -export const QueryParamGroupBy$outboundSchema: z.ZodNativeEnum< - typeof QueryParamGroupBy -> = QueryParamGroupBy$inboundSchema; +export const GetSignalsMttxAnalyticsGroupBy$outboundSchema: z.ZodNativeEnum< + typeof GetSignalsMttxAnalyticsGroupBy +> = GetSignalsMttxAnalyticsGroupBy$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace QueryParamGroupBy$ { - /** @deprecated use `QueryParamGroupBy$inboundSchema` instead. */ - export const inboundSchema = QueryParamGroupBy$inboundSchema; - /** @deprecated use `QueryParamGroupBy$outboundSchema` instead. */ - export const outboundSchema = QueryParamGroupBy$outboundSchema; +export namespace GetSignalsMttxAnalyticsGroupBy$ { + /** @deprecated use `GetSignalsMttxAnalyticsGroupBy$inboundSchema` instead. */ + export const inboundSchema = GetSignalsMttxAnalyticsGroupBy$inboundSchema; + /** @deprecated use `GetSignalsMttxAnalyticsGroupBy$outboundSchema` instead. */ + export const outboundSchema = GetSignalsMttxAnalyticsGroupBy$outboundSchema; } /** @internal */ -export const QueryParamSortBy$inboundSchema: z.ZodNativeEnum< - typeof QueryParamSortBy -> = z.nativeEnum(QueryParamSortBy); +export const GetSignalsMttxAnalyticsSortBy$inboundSchema: z.ZodNativeEnum< + typeof GetSignalsMttxAnalyticsSortBy +> = z.nativeEnum(GetSignalsMttxAnalyticsSortBy); /** @internal */ -export const QueryParamSortBy$outboundSchema: z.ZodNativeEnum< - typeof QueryParamSortBy -> = QueryParamSortBy$inboundSchema; +export const GetSignalsMttxAnalyticsSortBy$outboundSchema: z.ZodNativeEnum< + typeof GetSignalsMttxAnalyticsSortBy +> = GetSignalsMttxAnalyticsSortBy$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace QueryParamSortBy$ { - /** @deprecated use `QueryParamSortBy$inboundSchema` instead. */ - export const inboundSchema = QueryParamSortBy$inboundSchema; - /** @deprecated use `QueryParamSortBy$outboundSchema` instead. */ - export const outboundSchema = QueryParamSortBy$outboundSchema; +export namespace GetSignalsMttxAnalyticsSortBy$ { + /** @deprecated use `GetSignalsMttxAnalyticsSortBy$inboundSchema` instead. */ + export const inboundSchema = GetSignalsMttxAnalyticsSortBy$inboundSchema; + /** @deprecated use `GetSignalsMttxAnalyticsSortBy$outboundSchema` instead. */ + export const outboundSchema = GetSignalsMttxAnalyticsSortBy$outboundSchema; } /** @internal */ -export const GetSignalsMttxAnalyticsQueryParamSortDirection$inboundSchema: - z.ZodNativeEnum = z - .nativeEnum(GetSignalsMttxAnalyticsQueryParamSortDirection); +export const GetSignalsMttxAnalyticsSortDirection$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + GetSignalsMttxAnalyticsSortDirection, + ); /** @internal */ -export const GetSignalsMttxAnalyticsQueryParamSortDirection$outboundSchema: - z.ZodNativeEnum = - GetSignalsMttxAnalyticsQueryParamSortDirection$inboundSchema; +export const GetSignalsMttxAnalyticsSortDirection$outboundSchema: + z.ZodNativeEnum = + GetSignalsMttxAnalyticsSortDirection$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSignalsMttxAnalyticsQueryParamSortDirection$ { - /** @deprecated use `GetSignalsMttxAnalyticsQueryParamSortDirection$inboundSchema` instead. */ +export namespace GetSignalsMttxAnalyticsSortDirection$ { + /** @deprecated use `GetSignalsMttxAnalyticsSortDirection$inboundSchema` instead. */ export const inboundSchema = - GetSignalsMttxAnalyticsQueryParamSortDirection$inboundSchema; - /** @deprecated use `GetSignalsMttxAnalyticsQueryParamSortDirection$outboundSchema` instead. */ + GetSignalsMttxAnalyticsSortDirection$inboundSchema; + /** @deprecated use `GetSignalsMttxAnalyticsSortDirection$outboundSchema` instead. */ export const outboundSchema = - GetSignalsMttxAnalyticsQueryParamSortDirection$outboundSchema; + GetSignalsMttxAnalyticsSortDirection$outboundSchema; } /** @internal */ @@ -171,20 +176,22 @@ export const GetSignalsMttxAnalyticsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - signal_rules: z.string().optional(), - teams: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - users: z.string().optional(), - group_by: QueryParamGroupBy$inboundSchema.optional(), - sort_by: QueryParamSortBy$inboundSchema.optional(), - sort_direction: GetSignalsMttxAnalyticsQueryParamSortDirection$inboundSchema - .optional(), - start_date: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - end_date: z.string().datetime({ offset: true }).transform(v => new Date(v)) + signal_rules: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + group_by: z.nullable(GetSignalsMttxAnalyticsGroupBy$inboundSchema).optional(), + sort_by: z.nullable(GetSignalsMttxAnalyticsSortBy$inboundSchema).optional(), + sort_direction: z.nullable(GetSignalsMttxAnalyticsSortDirection$inboundSchema) .optional(), + start_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + end_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "signal_rules": "signalRules", @@ -198,17 +205,17 @@ export const GetSignalsMttxAnalyticsRequest$inboundSchema: z.ZodType< /** @internal */ export type GetSignalsMttxAnalyticsRequest$Outbound = { - signal_rules?: string | undefined; - teams?: string | undefined; - environments?: string | undefined; - services?: string | undefined; - tags?: string | undefined; - users?: string | undefined; - group_by?: string | undefined; - sort_by?: string | undefined; - sort_direction?: string | undefined; - start_date?: string | undefined; - end_date?: string | undefined; + signal_rules?: string | null | undefined; + teams?: string | null | undefined; + environments?: string | null | undefined; + services?: string | null | undefined; + tags?: string | null | undefined; + users?: string | null | undefined; + group_by?: string | null | undefined; + sort_by?: string | null | undefined; + sort_direction?: string | null | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; }; /** @internal */ @@ -217,18 +224,18 @@ export const GetSignalsMttxAnalyticsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, GetSignalsMttxAnalyticsRequest > = z.object({ - signalRules: z.string().optional(), - teams: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - users: z.string().optional(), - groupBy: QueryParamGroupBy$outboundSchema.optional(), - sortBy: QueryParamSortBy$outboundSchema.optional(), - sortDirection: GetSignalsMttxAnalyticsQueryParamSortDirection$outboundSchema + signalRules: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + groupBy: z.nullable(GetSignalsMttxAnalyticsGroupBy$outboundSchema).optional(), + sortBy: z.nullable(GetSignalsMttxAnalyticsSortBy$outboundSchema).optional(), + sortDirection: z.nullable(GetSignalsMttxAnalyticsSortDirection$outboundSchema) .optional(), - startDate: z.date().transform(v => v.toISOString()).optional(), - endDate: z.date().transform(v => v.toISOString()).optional(), + startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { signalRules: "signal_rules", diff --git a/src/models/operations/getsignalstimeseriesanalytics.ts b/src/models/operations/getsignalstimeseriesanalytics.ts new file mode 100644 index 00000000..80e70e27 --- /dev/null +++ b/src/models/operations/getsignalstimeseriesanalytics.ts @@ -0,0 +1,333 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * String that determines how records are grouped + */ +export const Bucket = { + Month: "month", + Week: "week", + Day: "day", +} as const; +/** + * String that determines how records are grouped + */ +export type Bucket = ClosedEnum; + +/** + * String that determines how records are grouped + */ +export const GetSignalsTimeseriesAnalyticsGroupBy = { + SignalRules: "signal_rules", + Teams: "teams", + Services: "services", + Environments: "environments", + Tags: "tags", +} as const; +/** + * String that determines how records are grouped + */ +export type GetSignalsTimeseriesAnalyticsGroupBy = ClosedEnum< + typeof GetSignalsTimeseriesAnalyticsGroupBy +>; + +/** + * String that determines how records are sorted + */ +export const GetSignalsTimeseriesAnalyticsSortBy = { + TotalOpenedAlerts: "total_opened_alerts", + TotalAckedAlerts: "total_acked_alerts", + TotalIncidents: "total_incidents", + AckedPercentage: "acked_percentage", + IncidentsPercentage: "incidents_percentage", +} as const; +/** + * String that determines how records are sorted + */ +export type GetSignalsTimeseriesAnalyticsSortBy = ClosedEnum< + typeof GetSignalsTimeseriesAnalyticsSortBy +>; + +/** + * String that determines how records are sorted + */ +export const GetSignalsTimeseriesAnalyticsSortDirection = { + Asc: "asc", + Desc: "desc", +} as const; +/** + * String that determines how records are sorted + */ +export type GetSignalsTimeseriesAnalyticsSortDirection = ClosedEnum< + typeof GetSignalsTimeseriesAnalyticsSortDirection +>; + +export type GetSignalsTimeseriesAnalyticsRequest = { + /** + * String that determines how records are grouped + */ + bucket?: Bucket | null | undefined; + /** + * A comma separated list of signal rule IDs + */ + signalRules?: string | null | undefined; + /** + * A comma separated list of team IDs + */ + teams?: string | null | undefined; + /** + * A comma separated list of environment IDs + */ + environments?: string | null | undefined; + /** + * A comma separated list of service IDs + */ + services?: string | null | undefined; + /** + * A comma separated list of tags + */ + tags?: string | null | undefined; + /** + * A comma separated list of user IDs + */ + users?: string | null | undefined; + /** + * String that determines how records are grouped + */ + groupBy?: GetSignalsTimeseriesAnalyticsGroupBy | null | undefined; + /** + * String that determines how records are sorted + */ + sortBy?: GetSignalsTimeseriesAnalyticsSortBy | null | undefined; + /** + * String that determines how records are sorted + */ + sortDirection?: GetSignalsTimeseriesAnalyticsSortDirection | null | undefined; + /** + * The start date to return metrics from + */ + startDate?: Date | null | undefined; + /** + * The end date to return metrics from + */ + endDate?: Date | null | undefined; +}; + +/** @internal */ +export const Bucket$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Bucket); + +/** @internal */ +export const Bucket$outboundSchema: z.ZodNativeEnum = + Bucket$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Bucket$ { + /** @deprecated use `Bucket$inboundSchema` instead. */ + export const inboundSchema = Bucket$inboundSchema; + /** @deprecated use `Bucket$outboundSchema` instead. */ + export const outboundSchema = Bucket$outboundSchema; +} + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsGroupBy$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + GetSignalsTimeseriesAnalyticsGroupBy, + ); + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsGroupBy$outboundSchema: + z.ZodNativeEnum = + GetSignalsTimeseriesAnalyticsGroupBy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsTimeseriesAnalyticsGroupBy$ { + /** @deprecated use `GetSignalsTimeseriesAnalyticsGroupBy$inboundSchema` instead. */ + export const inboundSchema = + GetSignalsTimeseriesAnalyticsGroupBy$inboundSchema; + /** @deprecated use `GetSignalsTimeseriesAnalyticsGroupBy$outboundSchema` instead. */ + export const outboundSchema = + GetSignalsTimeseriesAnalyticsGroupBy$outboundSchema; +} + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsSortBy$inboundSchema: z.ZodNativeEnum< + typeof GetSignalsTimeseriesAnalyticsSortBy +> = z.nativeEnum(GetSignalsTimeseriesAnalyticsSortBy); + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsSortBy$outboundSchema: + z.ZodNativeEnum = + GetSignalsTimeseriesAnalyticsSortBy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsTimeseriesAnalyticsSortBy$ { + /** @deprecated use `GetSignalsTimeseriesAnalyticsSortBy$inboundSchema` instead. */ + export const inboundSchema = + GetSignalsTimeseriesAnalyticsSortBy$inboundSchema; + /** @deprecated use `GetSignalsTimeseriesAnalyticsSortBy$outboundSchema` instead. */ + export const outboundSchema = + GetSignalsTimeseriesAnalyticsSortBy$outboundSchema; +} + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsSortDirection$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(GetSignalsTimeseriesAnalyticsSortDirection); + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsSortDirection$outboundSchema: + z.ZodNativeEnum = + GetSignalsTimeseriesAnalyticsSortDirection$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsTimeseriesAnalyticsSortDirection$ { + /** @deprecated use `GetSignalsTimeseriesAnalyticsSortDirection$inboundSchema` instead. */ + export const inboundSchema = + GetSignalsTimeseriesAnalyticsSortDirection$inboundSchema; + /** @deprecated use `GetSignalsTimeseriesAnalyticsSortDirection$outboundSchema` instead. */ + export const outboundSchema = + GetSignalsTimeseriesAnalyticsSortDirection$outboundSchema; +} + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsRequest$inboundSchema: z.ZodType< + GetSignalsTimeseriesAnalyticsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + bucket: z.nullable(Bucket$inboundSchema).optional(), + signal_rules: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + group_by: z.nullable(GetSignalsTimeseriesAnalyticsGroupBy$inboundSchema) + .optional(), + sort_by: z.nullable(GetSignalsTimeseriesAnalyticsSortBy$inboundSchema) + .optional(), + sort_direction: z.nullable( + GetSignalsTimeseriesAnalyticsSortDirection$inboundSchema, + ).optional(), + start_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + end_date: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "signal_rules": "signalRules", + "group_by": "groupBy", + "sort_by": "sortBy", + "sort_direction": "sortDirection", + "start_date": "startDate", + "end_date": "endDate", + }); +}); + +/** @internal */ +export type GetSignalsTimeseriesAnalyticsRequest$Outbound = { + bucket?: string | null | undefined; + signal_rules?: string | null | undefined; + teams?: string | null | undefined; + environments?: string | null | undefined; + services?: string | null | undefined; + tags?: string | null | undefined; + users?: string | null | undefined; + group_by?: string | null | undefined; + sort_by?: string | null | undefined; + sort_direction?: string | null | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; +}; + +/** @internal */ +export const GetSignalsTimeseriesAnalyticsRequest$outboundSchema: z.ZodType< + GetSignalsTimeseriesAnalyticsRequest$Outbound, + z.ZodTypeDef, + GetSignalsTimeseriesAnalyticsRequest +> = z.object({ + bucket: z.nullable(Bucket$outboundSchema).optional(), + signalRules: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + groupBy: z.nullable(GetSignalsTimeseriesAnalyticsGroupBy$outboundSchema) + .optional(), + sortBy: z.nullable(GetSignalsTimeseriesAnalyticsSortBy$outboundSchema) + .optional(), + sortDirection: z.nullable( + GetSignalsTimeseriesAnalyticsSortDirection$outboundSchema, + ).optional(), + startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), + endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + signalRules: "signal_rules", + groupBy: "group_by", + sortBy: "sort_by", + sortDirection: "sort_direction", + startDate: "start_date", + endDate: "end_date", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetSignalsTimeseriesAnalyticsRequest$ { + /** @deprecated use `GetSignalsTimeseriesAnalyticsRequest$inboundSchema` instead. */ + export const inboundSchema = + GetSignalsTimeseriesAnalyticsRequest$inboundSchema; + /** @deprecated use `GetSignalsTimeseriesAnalyticsRequest$outboundSchema` instead. */ + export const outboundSchema = + GetSignalsTimeseriesAnalyticsRequest$outboundSchema; + /** @deprecated use `GetSignalsTimeseriesAnalyticsRequest$Outbound` instead. */ + export type Outbound = GetSignalsTimeseriesAnalyticsRequest$Outbound; +} + +export function getSignalsTimeseriesAnalyticsRequestToJSON( + getSignalsTimeseriesAnalyticsRequest: GetSignalsTimeseriesAnalyticsRequest, +): string { + return JSON.stringify( + GetSignalsTimeseriesAnalyticsRequest$outboundSchema.parse( + getSignalsTimeseriesAnalyticsRequest, + ), + ); +} + +export function getSignalsTimeseriesAnalyticsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetSignalsTimeseriesAnalyticsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetSignalsTimeseriesAnalyticsRequest' from JSON`, + ); +} diff --git a/src/models/operations/getsimilarincidents.ts b/src/models/operations/getsimilarincidents.ts deleted file mode 100644 index f438ef31..00000000 --- a/src/models/operations/getsimilarincidents.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetSimilarIncidentsRequest = { - threshold?: number | undefined; - limit?: number | undefined; - incidentId: string; -}; - -/** @internal */ -export const GetSimilarIncidentsRequest$inboundSchema: z.ZodType< - GetSimilarIncidentsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - threshold: z.number().default(0.2), - limit: z.number().int().default(5), - incident_id: z.string(), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type GetSimilarIncidentsRequest$Outbound = { - threshold: number; - limit: number; - incident_id: string; -}; - -/** @internal */ -export const GetSimilarIncidentsRequest$outboundSchema: z.ZodType< - GetSimilarIncidentsRequest$Outbound, - z.ZodTypeDef, - GetSimilarIncidentsRequest -> = z.object({ - threshold: z.number().default(0.2), - limit: z.number().int().default(5), - incidentId: z.string(), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSimilarIncidentsRequest$ { - /** @deprecated use `GetSimilarIncidentsRequest$inboundSchema` instead. */ - export const inboundSchema = GetSimilarIncidentsRequest$inboundSchema; - /** @deprecated use `GetSimilarIncidentsRequest$outboundSchema` instead. */ - export const outboundSchema = GetSimilarIncidentsRequest$outboundSchema; - /** @deprecated use `GetSimilarIncidentsRequest$Outbound` instead. */ - export type Outbound = GetSimilarIncidentsRequest$Outbound; -} - -export function getSimilarIncidentsRequestToJSON( - getSimilarIncidentsRequest: GetSimilarIncidentsRequest, -): string { - return JSON.stringify( - GetSimilarIncidentsRequest$outboundSchema.parse(getSimilarIncidentsRequest), - ); -} - -export function getSimilarIncidentsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSimilarIncidentsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSimilarIncidentsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getslackworkspaces.ts b/src/models/operations/getslackworkspaces.ts deleted file mode 100644 index b3297ae6..00000000 --- a/src/models/operations/getslackworkspaces.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetSlackWorkspacesRequest = { - /** - * Connection UUID - */ - connectionId: string; -}; - -/** @internal */ -export const GetSlackWorkspacesRequest$inboundSchema: z.ZodType< - GetSlackWorkspacesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "connection_id": "connectionId", - }); -}); - -/** @internal */ -export type GetSlackWorkspacesRequest$Outbound = { - connection_id: string; -}; - -/** @internal */ -export const GetSlackWorkspacesRequest$outboundSchema: z.ZodType< - GetSlackWorkspacesRequest$Outbound, - z.ZodTypeDef, - GetSlackWorkspacesRequest -> = z.object({ - connectionId: z.string(), -}).transform((v) => { - return remap$(v, { - connectionId: "connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSlackWorkspacesRequest$ { - /** @deprecated use `GetSlackWorkspacesRequest$inboundSchema` instead. */ - export const inboundSchema = GetSlackWorkspacesRequest$inboundSchema; - /** @deprecated use `GetSlackWorkspacesRequest$outboundSchema` instead. */ - export const outboundSchema = GetSlackWorkspacesRequest$outboundSchema; - /** @deprecated use `GetSlackWorkspacesRequest$Outbound` instead. */ - export type Outbound = GetSlackWorkspacesRequest$Outbound; -} - -export function getSlackWorkspacesRequestToJSON( - getSlackWorkspacesRequest: GetSlackWorkspacesRequest, -): string { - return JSON.stringify( - GetSlackWorkspacesRequest$outboundSchema.parse(getSlackWorkspacesRequest), - ); -} - -export function getSlackWorkspacesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSlackWorkspacesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSlackWorkspacesRequest' from JSON`, - ); -} diff --git a/src/models/operations/getstatuspage.ts b/src/models/operations/getstatuspage.ts deleted file mode 100644 index e0b6710c..00000000 --- a/src/models/operations/getstatuspage.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetStatusPageRequest = { - nuncConnectionId: string; -}; - -/** @internal */ -export const GetStatusPageRequest$inboundSchema: z.ZodType< - GetStatusPageRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - }); -}); - -/** @internal */ -export type GetStatusPageRequest$Outbound = { - nunc_connection_id: string; -}; - -/** @internal */ -export const GetStatusPageRequest$outboundSchema: z.ZodType< - GetStatusPageRequest$Outbound, - z.ZodTypeDef, - GetStatusPageRequest -> = z.object({ - nuncConnectionId: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetStatusPageRequest$ { - /** @deprecated use `GetStatusPageRequest$inboundSchema` instead. */ - export const inboundSchema = GetStatusPageRequest$inboundSchema; - /** @deprecated use `GetStatusPageRequest$outboundSchema` instead. */ - export const outboundSchema = GetStatusPageRequest$outboundSchema; - /** @deprecated use `GetStatusPageRequest$Outbound` instead. */ - export type Outbound = GetStatusPageRequest$Outbound; -} - -export function getStatusPageRequestToJSON( - getStatusPageRequest: GetStatusPageRequest, -): string { - return JSON.stringify( - GetStatusPageRequest$outboundSchema.parse(getStatusPageRequest), - ); -} - -export function getStatusPageRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetStatusPageRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetStatusPageRequest' from JSON`, - ); -} diff --git a/src/models/operations/getteam.ts b/src/models/operations/getteam.ts index 07a738d0..da025958 100644 --- a/src/models/operations/getteam.ts +++ b/src/models/operations/getteam.ts @@ -13,7 +13,7 @@ export type GetTeamRequest = { /** * Boolean to determine whether to return a slimified version of the teams object */ - lite?: boolean | undefined; + lite?: boolean | null | undefined; }; /** @internal */ @@ -23,7 +23,7 @@ export const GetTeamRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - lite: z.boolean().optional(), + lite: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "team_id": "teamId", @@ -33,7 +33,7 @@ export const GetTeamRequest$inboundSchema: z.ZodType< /** @internal */ export type GetTeamRequest$Outbound = { team_id: string; - lite?: boolean | undefined; + lite?: boolean | null | undefined; }; /** @internal */ @@ -43,7 +43,7 @@ export const GetTeamRequest$outboundSchema: z.ZodType< GetTeamRequest > = z.object({ teamId: z.string(), - lite: z.boolean().optional(), + lite: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { teamId: "team_id", diff --git a/src/models/operations/getteamscheduleshift.ts b/src/models/operations/getteamscheduleshift.ts deleted file mode 100644 index 05d76562..00000000 --- a/src/models/operations/getteamscheduleshift.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetTeamScheduleShiftRequest = { - id: string; - teamId: string; - scheduleId: string; -}; - -/** @internal */ -export const GetTeamScheduleShiftRequest$inboundSchema: z.ZodType< - GetTeamScheduleShiftRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - team_id: z.string(), - schedule_id: z.string(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "schedule_id": "scheduleId", - }); -}); - -/** @internal */ -export type GetTeamScheduleShiftRequest$Outbound = { - id: string; - team_id: string; - schedule_id: string; -}; - -/** @internal */ -export const GetTeamScheduleShiftRequest$outboundSchema: z.ZodType< - GetTeamScheduleShiftRequest$Outbound, - z.ZodTypeDef, - GetTeamScheduleShiftRequest -> = z.object({ - id: z.string(), - teamId: z.string(), - scheduleId: z.string(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - scheduleId: "schedule_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTeamScheduleShiftRequest$ { - /** @deprecated use `GetTeamScheduleShiftRequest$inboundSchema` instead. */ - export const inboundSchema = GetTeamScheduleShiftRequest$inboundSchema; - /** @deprecated use `GetTeamScheduleShiftRequest$outboundSchema` instead. */ - export const outboundSchema = GetTeamScheduleShiftRequest$outboundSchema; - /** @deprecated use `GetTeamScheduleShiftRequest$Outbound` instead. */ - export type Outbound = GetTeamScheduleShiftRequest$Outbound; -} - -export function getTeamScheduleShiftRequestToJSON( - getTeamScheduleShiftRequest: GetTeamScheduleShiftRequest, -): string { - return JSON.stringify( - GetTeamScheduleShiftRequest$outboundSchema.parse( - getTeamScheduleShiftRequest, - ), - ); -} - -export function getTeamScheduleShiftRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetTeamScheduleShiftRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTeamScheduleShiftRequest' from JSON`, - ); -} diff --git a/src/models/operations/getticketingfieldmap.ts b/src/models/operations/getticketingfieldmap.ts new file mode 100644 index 00000000..0dd40d8d --- /dev/null +++ b/src/models/operations/getticketingfieldmap.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetTicketingFieldMapRequest = { + mapId: string; + ticketingProjectId: string; +}; + +/** @internal */ +export const GetTicketingFieldMapRequest$inboundSchema: z.ZodType< + GetTicketingFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + map_id: z.string(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "map_id": "mapId", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type GetTicketingFieldMapRequest$Outbound = { + map_id: string; + ticketing_project_id: string; +}; + +/** @internal */ +export const GetTicketingFieldMapRequest$outboundSchema: z.ZodType< + GetTicketingFieldMapRequest$Outbound, + z.ZodTypeDef, + GetTicketingFieldMapRequest +> = z.object({ + mapId: z.string(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + mapId: "map_id", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTicketingFieldMapRequest$ { + /** @deprecated use `GetTicketingFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = GetTicketingFieldMapRequest$inboundSchema; + /** @deprecated use `GetTicketingFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = GetTicketingFieldMapRequest$outboundSchema; + /** @deprecated use `GetTicketingFieldMapRequest$Outbound` instead. */ + export type Outbound = GetTicketingFieldMapRequest$Outbound; +} + +export function getTicketingFieldMapRequestToJSON( + getTicketingFieldMapRequest: GetTicketingFieldMapRequest, +): string { + return JSON.stringify( + GetTicketingFieldMapRequest$outboundSchema.parse( + getTicketingFieldMapRequest, + ), + ); +} + +export function getTicketingFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetTicketingFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetTicketingFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/getticketingprojectavailablefields.ts b/src/models/operations/getticketingprojectavailablefields.ts deleted file mode 100644 index 569820bf..00000000 --- a/src/models/operations/getticketingprojectavailablefields.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetTicketingProjectAvailableFieldsRequest = { - ticketingProjectId: string; -}; - -/** @internal */ -export const GetTicketingProjectAvailableFieldsRequest$inboundSchema: z.ZodType< - GetTicketingProjectAvailableFieldsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - ticketing_project_id: z.string(), -}).transform((v) => { - return remap$(v, { - "ticketing_project_id": "ticketingProjectId", - }); -}); - -/** @internal */ -export type GetTicketingProjectAvailableFieldsRequest$Outbound = { - ticketing_project_id: string; -}; - -/** @internal */ -export const GetTicketingProjectAvailableFieldsRequest$outboundSchema: - z.ZodType< - GetTicketingProjectAvailableFieldsRequest$Outbound, - z.ZodTypeDef, - GetTicketingProjectAvailableFieldsRequest - > = z.object({ - ticketingProjectId: z.string(), - }).transform((v) => { - return remap$(v, { - ticketingProjectId: "ticketing_project_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTicketingProjectAvailableFieldsRequest$ { - /** @deprecated use `GetTicketingProjectAvailableFieldsRequest$inboundSchema` instead. */ - export const inboundSchema = - GetTicketingProjectAvailableFieldsRequest$inboundSchema; - /** @deprecated use `GetTicketingProjectAvailableFieldsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetTicketingProjectAvailableFieldsRequest$outboundSchema; - /** @deprecated use `GetTicketingProjectAvailableFieldsRequest$Outbound` instead. */ - export type Outbound = GetTicketingProjectAvailableFieldsRequest$Outbound; -} - -export function getTicketingProjectAvailableFieldsRequestToJSON( - getTicketingProjectAvailableFieldsRequest: - GetTicketingProjectAvailableFieldsRequest, -): string { - return JSON.stringify( - GetTicketingProjectAvailableFieldsRequest$outboundSchema.parse( - getTicketingProjectAvailableFieldsRequest, - ), - ); -} - -export function getTicketingProjectAvailableFieldsRequestFromJSON( - jsonString: string, -): SafeParseResult< - GetTicketingProjectAvailableFieldsRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - GetTicketingProjectAvailableFieldsRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'GetTicketingProjectAvailableFieldsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getticketingprojectconfigurationoptions.ts b/src/models/operations/getticketingprojectconfigurationoptions.ts deleted file mode 100644 index f5b8dd37..00000000 --- a/src/models/operations/getticketingprojectconfigurationoptions.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetTicketingProjectConfigurationOptionsRequest = { - ticketingProjectId: string; -}; - -/** @internal */ -export const GetTicketingProjectConfigurationOptionsRequest$inboundSchema: - z.ZodType< - GetTicketingProjectConfigurationOptionsRequest, - z.ZodTypeDef, - unknown - > = z.object({ - ticketing_project_id: z.string(), - }).transform((v) => { - return remap$(v, { - "ticketing_project_id": "ticketingProjectId", - }); - }); - -/** @internal */ -export type GetTicketingProjectConfigurationOptionsRequest$Outbound = { - ticketing_project_id: string; -}; - -/** @internal */ -export const GetTicketingProjectConfigurationOptionsRequest$outboundSchema: - z.ZodType< - GetTicketingProjectConfigurationOptionsRequest$Outbound, - z.ZodTypeDef, - GetTicketingProjectConfigurationOptionsRequest - > = z.object({ - ticketingProjectId: z.string(), - }).transform((v) => { - return remap$(v, { - ticketingProjectId: "ticketing_project_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTicketingProjectConfigurationOptionsRequest$ { - /** @deprecated use `GetTicketingProjectConfigurationOptionsRequest$inboundSchema` instead. */ - export const inboundSchema = - GetTicketingProjectConfigurationOptionsRequest$inboundSchema; - /** @deprecated use `GetTicketingProjectConfigurationOptionsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetTicketingProjectConfigurationOptionsRequest$outboundSchema; - /** @deprecated use `GetTicketingProjectConfigurationOptionsRequest$Outbound` instead. */ - export type Outbound = - GetTicketingProjectConfigurationOptionsRequest$Outbound; -} - -export function getTicketingProjectConfigurationOptionsRequestToJSON( - getTicketingProjectConfigurationOptionsRequest: - GetTicketingProjectConfigurationOptionsRequest, -): string { - return JSON.stringify( - GetTicketingProjectConfigurationOptionsRequest$outboundSchema.parse( - getTicketingProjectConfigurationOptionsRequest, - ), - ); -} - -export function getTicketingProjectConfigurationOptionsRequestFromJSON( - jsonString: string, -): SafeParseResult< - GetTicketingProjectConfigurationOptionsRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - GetTicketingProjectConfigurationOptionsRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'GetTicketingProjectConfigurationOptionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getticketingprojectfieldmap.ts b/src/models/operations/getticketingprojectfieldmap.ts deleted file mode 100644 index fc488abc..00000000 --- a/src/models/operations/getticketingprojectfieldmap.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetTicketingProjectFieldMapRequest = { - mapId: string; - ticketingProjectId: string; -}; - -/** @internal */ -export const GetTicketingProjectFieldMapRequest$inboundSchema: z.ZodType< - GetTicketingProjectFieldMapRequest, - z.ZodTypeDef, - unknown -> = z.object({ - map_id: z.string(), - ticketing_project_id: z.string(), -}).transform((v) => { - return remap$(v, { - "map_id": "mapId", - "ticketing_project_id": "ticketingProjectId", - }); -}); - -/** @internal */ -export type GetTicketingProjectFieldMapRequest$Outbound = { - map_id: string; - ticketing_project_id: string; -}; - -/** @internal */ -export const GetTicketingProjectFieldMapRequest$outboundSchema: z.ZodType< - GetTicketingProjectFieldMapRequest$Outbound, - z.ZodTypeDef, - GetTicketingProjectFieldMapRequest -> = z.object({ - mapId: z.string(), - ticketingProjectId: z.string(), -}).transform((v) => { - return remap$(v, { - mapId: "map_id", - ticketingProjectId: "ticketing_project_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTicketingProjectFieldMapRequest$ { - /** @deprecated use `GetTicketingProjectFieldMapRequest$inboundSchema` instead. */ - export const inboundSchema = GetTicketingProjectFieldMapRequest$inboundSchema; - /** @deprecated use `GetTicketingProjectFieldMapRequest$outboundSchema` instead. */ - export const outboundSchema = - GetTicketingProjectFieldMapRequest$outboundSchema; - /** @deprecated use `GetTicketingProjectFieldMapRequest$Outbound` instead. */ - export type Outbound = GetTicketingProjectFieldMapRequest$Outbound; -} - -export function getTicketingProjectFieldMapRequestToJSON( - getTicketingProjectFieldMapRequest: GetTicketingProjectFieldMapRequest, -): string { - return JSON.stringify( - GetTicketingProjectFieldMapRequest$outboundSchema.parse( - getTicketingProjectFieldMapRequest, - ), - ); -} - -export function getTicketingProjectFieldMapRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetTicketingProjectFieldMapRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTicketingProjectFieldMapRequest' from JSON`, - ); -} diff --git a/src/models/operations/getticketingprojectfieldoptions.ts b/src/models/operations/getticketingprojectfieldoptions.ts deleted file mode 100644 index bb9b002f..00000000 --- a/src/models/operations/getticketingprojectfieldoptions.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type GetTicketingProjectFieldOptionsRequest = { - fieldId: string; - ticketingProjectId: string; -}; - -/** @internal */ -export const GetTicketingProjectFieldOptionsRequest$inboundSchema: z.ZodType< - GetTicketingProjectFieldOptionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - field_id: z.string(), - ticketing_project_id: z.string(), -}).transform((v) => { - return remap$(v, { - "field_id": "fieldId", - "ticketing_project_id": "ticketingProjectId", - }); -}); - -/** @internal */ -export type GetTicketingProjectFieldOptionsRequest$Outbound = { - field_id: string; - ticketing_project_id: string; -}; - -/** @internal */ -export const GetTicketingProjectFieldOptionsRequest$outboundSchema: z.ZodType< - GetTicketingProjectFieldOptionsRequest$Outbound, - z.ZodTypeDef, - GetTicketingProjectFieldOptionsRequest -> = z.object({ - fieldId: z.string(), - ticketingProjectId: z.string(), -}).transform((v) => { - return remap$(v, { - fieldId: "field_id", - ticketingProjectId: "ticketing_project_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetTicketingProjectFieldOptionsRequest$ { - /** @deprecated use `GetTicketingProjectFieldOptionsRequest$inboundSchema` instead. */ - export const inboundSchema = - GetTicketingProjectFieldOptionsRequest$inboundSchema; - /** @deprecated use `GetTicketingProjectFieldOptionsRequest$outboundSchema` instead. */ - export const outboundSchema = - GetTicketingProjectFieldOptionsRequest$outboundSchema; - /** @deprecated use `GetTicketingProjectFieldOptionsRequest$Outbound` instead. */ - export type Outbound = GetTicketingProjectFieldOptionsRequest$Outbound; -} - -export function getTicketingProjectFieldOptionsRequestToJSON( - getTicketingProjectFieldOptionsRequest: - GetTicketingProjectFieldOptionsRequest, -): string { - return JSON.stringify( - GetTicketingProjectFieldOptionsRequest$outboundSchema.parse( - getTicketingProjectFieldOptionsRequest, - ), - ); -} - -export function getTicketingProjectFieldOptionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetTicketingProjectFieldOptionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetTicketingProjectFieldOptionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getvotestatus.ts b/src/models/operations/getvotestatus.ts new file mode 100644 index 00000000..b9e47011 --- /dev/null +++ b/src/models/operations/getvotestatus.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetVoteStatusRequest = { + incidentId: string; + eventId: string; +}; + +/** @internal */ +export const GetVoteStatusRequest$inboundSchema: z.ZodType< + GetVoteStatusRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + event_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "event_id": "eventId", + }); +}); + +/** @internal */ +export type GetVoteStatusRequest$Outbound = { + incident_id: string; + event_id: string; +}; + +/** @internal */ +export const GetVoteStatusRequest$outboundSchema: z.ZodType< + GetVoteStatusRequest$Outbound, + z.ZodTypeDef, + GetVoteStatusRequest +> = z.object({ + incidentId: z.string(), + eventId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + eventId: "event_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetVoteStatusRequest$ { + /** @deprecated use `GetVoteStatusRequest$inboundSchema` instead. */ + export const inboundSchema = GetVoteStatusRequest$inboundSchema; + /** @deprecated use `GetVoteStatusRequest$outboundSchema` instead. */ + export const outboundSchema = GetVoteStatusRequest$outboundSchema; + /** @deprecated use `GetVoteStatusRequest$Outbound` instead. */ + export type Outbound = GetVoteStatusRequest$Outbound; +} + +export function getVoteStatusRequestToJSON( + getVoteStatusRequest: GetVoteStatusRequest, +): string { + return JSON.stringify( + GetVoteStatusRequest$outboundSchema.parse(getVoteStatusRequest), + ); +} + +export function getVoteStatusRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetVoteStatusRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetVoteStatusRequest' from JSON`, + ); +} diff --git a/src/models/operations/getzendeskcustomersupportissue.ts b/src/models/operations/getzendeskcustomersupportissue.ts new file mode 100644 index 00000000..3fd8378b --- /dev/null +++ b/src/models/operations/getzendeskcustomersupportissue.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type GetZendeskCustomerSupportIssueRequest = { + /** + * Zendesk ticket ID + */ + ticketId: string; + /** + * Use to include attached_incidents + */ + include?: string | null | undefined; +}; + +/** @internal */ +export const GetZendeskCustomerSupportIssueRequest$inboundSchema: z.ZodType< + GetZendeskCustomerSupportIssueRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ticket_id: z.string(), + include: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "ticket_id": "ticketId", + }); +}); + +/** @internal */ +export type GetZendeskCustomerSupportIssueRequest$Outbound = { + ticket_id: string; + include?: string | null | undefined; +}; + +/** @internal */ +export const GetZendeskCustomerSupportIssueRequest$outboundSchema: z.ZodType< + GetZendeskCustomerSupportIssueRequest$Outbound, + z.ZodTypeDef, + GetZendeskCustomerSupportIssueRequest +> = z.object({ + ticketId: z.string(), + include: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + ticketId: "ticket_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetZendeskCustomerSupportIssueRequest$ { + /** @deprecated use `GetZendeskCustomerSupportIssueRequest$inboundSchema` instead. */ + export const inboundSchema = + GetZendeskCustomerSupportIssueRequest$inboundSchema; + /** @deprecated use `GetZendeskCustomerSupportIssueRequest$outboundSchema` instead. */ + export const outboundSchema = + GetZendeskCustomerSupportIssueRequest$outboundSchema; + /** @deprecated use `GetZendeskCustomerSupportIssueRequest$Outbound` instead. */ + export type Outbound = GetZendeskCustomerSupportIssueRequest$Outbound; +} + +export function getZendeskCustomerSupportIssueRequestToJSON( + getZendeskCustomerSupportIssueRequest: GetZendeskCustomerSupportIssueRequest, +): string { + return JSON.stringify( + GetZendeskCustomerSupportIssueRequest$outboundSchema.parse( + getZendeskCustomerSupportIssueRequest, + ), + ); +} + +export function getZendeskCustomerSupportIssueRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetZendeskCustomerSupportIssueRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetZendeskCustomerSupportIssueRequest' from JSON`, + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 6bbd1fb5..a4ea7584 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -2,68 +2,83 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./archiveincident.js"; -export * from "./archiveincidenttype.js"; -export * from "./archiveteam.js"; +export * from "./archiveaudience.js"; +export * from "./bulkupdateincidentmilestones.js"; export * from "./closeincident.js"; -export * from "./convertincidenttasktofollowup.js"; +export * from "./convertincidenttask.js"; +export * from "./createaudience.js"; export * from "./createchangeidentity.js"; -export * from "./createconversationcomment.js"; -export * from "./createconversationcommentreaction.js"; -export * from "./createincidentalerts.js"; +export * from "./createcomment.js"; +export * from "./createcommentreaction.js"; +export * from "./createconnection.js"; +export * from "./createemailsubscriber.js"; +export * from "./createinboundfieldmap.js"; +export * from "./createincidentalert.js"; export * from "./createincidentattachment.js"; -export * from "./createincidentgenericchatmessage.js"; +export * from "./createincidentchangeevent.js"; +export * from "./createincidentchatmessage.js"; export * from "./createincidentimpact.js"; export * from "./createincidentlink.js"; export * from "./createincidentnote.js"; -export * from "./createincidentrelatedchange.js"; +export * from "./createincidentretrospective.js"; +export * from "./createincidentretrospectivedynamicinput.js"; +export * from "./createincidentretrospectivefield.js"; export * from "./createincidentroleassignment.js"; export * from "./createincidentstatuspage.js"; export * from "./createincidenttask.js"; export * from "./createincidenttasklist.js"; export * from "./createincidentteamassignment.js"; -export * from "./createintegrationconnection.js"; +export * from "./createlifecyclemeasurementdefinition.js"; export * from "./createlifecyclemilestone.js"; -export * from "./createmeasurementdefinition.js"; -export * from "./createretrospectivereportreason.js"; +export * from "./createnunccomponentgroup.js"; +export * from "./createnuncconnection.js"; +export * from "./createnunclink.js"; +export * from "./createoncallshift.js"; +export * from "./createpostmortemreason.js"; +export * from "./createretrospectivetemplate.js"; export * from "./createsavedsearch.js"; export * from "./createservicechecklistresponse.js"; export * from "./createslackemojiaction.js"; -export * from "./createstatuspage.js"; -export * from "./createstatuspagecomponentgroup.js"; -export * from "./createstatuspagelink.js"; -export * from "./createstatuspagesubscribers.js"; export * from "./createteamescalationpolicy.js"; export * from "./createteamoncallschedule.js"; -export * from "./createteamoncallscheduleshift.js"; export * from "./createteamsignalrule.js"; -export * from "./createticketingprojectconfiguration.js"; -export * from "./createticketingprojectfieldmap.js"; +export * from "./createticketingfieldmap.js"; +export * from "./createticketingprojectconfig.js"; export * from "./deletechange.js"; export * from "./deletechangeevent.js"; export * from "./deletechangeidentity.js"; export * from "./deletechecklisttemplate.js"; -export * from "./deleteconversationcomment.js"; -export * from "./deleteconversationcommentreaction.js"; +export * from "./deletecomment.js"; +export * from "./deletecommentreaction.js"; export * from "./deletecustomfielddefinition.js"; +export * from "./deleteemailsubscriber.js"; export * from "./deleteenvironment.js"; export * from "./deletefunctionality.js"; +export * from "./deleteinboundfieldmap.js"; +export * from "./deleteincident.js"; export * from "./deleteincidentalert.js"; export * from "./deleteincidentchatmessage.js"; export * from "./deleteincidentevent.js"; export * from "./deleteincidentimpact.js"; export * from "./deleteincidentlink.js"; +export * from "./deleteincidentretrospectivedynamicinput.js"; export * from "./deleteincidentrole.js"; export * from "./deleteincidentroleassignment.js"; export * from "./deleteincidentstatuspage.js"; export * from "./deleteincidenttask.js"; export * from "./deleteincidentteamassignment.js"; -export * from "./deleteincidenttranscript.js"; +export * from "./deleteincidenttype.js"; +export * from "./deletelifecyclemeasurementdefinition.js"; export * from "./deletelifecyclemilestone.js"; -export * from "./deletemeasurementdefinition.js"; +export * from "./deletenunccomponentgroup.js"; +export * from "./deletenuncconnection.js"; +export * from "./deletenuncimage.js"; +export * from "./deletenunclink.js"; export * from "./deletenuncsubscription.js"; +export * from "./deleteoncallshift.js"; +export * from "./deletepostmortemreason.js"; export * from "./deletepriority.js"; -export * from "./deleteretrospectivereason.js"; +export * from "./deleteretrospectivetemplate.js"; export * from "./deleterunbook.js"; export * from "./deleterunbookexecution.js"; export * from "./deletesavedsearch.js"; @@ -76,127 +91,134 @@ export * from "./deleteservicelink.js"; export * from "./deleteseverity.js"; export * from "./deleteseveritymatrixcondition.js"; export * from "./deleteseveritymatriximpact.js"; -export * from "./deletesignalemailtarget.js"; +export * from "./deletesignalsemailtarget.js"; export * from "./deletesignalswebhooktarget.js"; export * from "./deleteslackemojiaction.js"; -export * from "./deletestatuspage.js"; -export * from "./deletestatuspagecomponentgroup.js"; export * from "./deletestatuspageconnection.js"; -export * from "./deletestatuspageimage.js"; -export * from "./deletestatuspagelink.js"; -export * from "./deletestatuspagesubscribers.js"; export * from "./deletestatusupdatetemplate.js"; export * from "./deletetasklist.js"; +export * from "./deleteteam.js"; export * from "./deleteteamescalationpolicy.js"; export * from "./deleteteamoncallschedule.js"; -export * from "./deleteteamscheduleshift.js"; export * from "./deleteteamsignalrule.js"; export * from "./deleteticket.js"; +export * from "./deleteticketingfieldmap.js"; export * from "./deleteticketingpriority.js"; export * from "./deleteticketingprojectconfig.js"; -export * from "./deleteticketingprojectfieldmap.js"; +export * from "./deletetranscriptentry.js"; export * from "./deletewebhook.js"; +export * from "./exportincidentretrospectives.js"; +export * from "./generateaudiencesummary.js"; +export * from "./getaiincidentsummaryvotestatus.js"; export * from "./getalert.js"; +export * from "./getaudience.js"; +export * from "./getaudiencesummary.js"; export * from "./getawscloudtrailbatch.js"; -export * from "./getawscloudtrailbatchevents.js"; export * from "./getawsconnection.js"; export * from "./getchangeevent.js"; export * from "./getchecklisttemplate.js"; -export * from "./getconversationcomment.js"; -export * from "./getcustomfieldselectoptions.js"; +export * from "./getcomment.js"; +export * from "./getconferencebridgetranslation.js"; +export * from "./getconfigurationoptions.js"; export * from "./getenvironment.js"; export * from "./getformconfiguration.js"; export * from "./getfunctionality.js"; -export * from "./getfunctionalityservices.js"; +export * from "./getinboundfieldmap.js"; export * from "./getincident.js"; -export * from "./getincidentaisummaryvotestatus.js"; export * from "./getincidentchannel.js"; export * from "./getincidentevent.js"; -export * from "./getincidenteventvotestatus.js"; export * from "./getincidentrelationships.js"; +export * from "./getincidentretrospectivefield.js"; export * from "./getincidentrole.js"; export * from "./getincidenttask.js"; -export * from "./getincidenttranscript.js"; export * from "./getincidenttype.js"; -export * from "./getincidentuserrole.js"; -export * from "./getinfrastructuremetrics.js"; +export * from "./getincidentuser.js"; export * from "./getintegration.js"; -export * from "./getintegrationfieldmapavailablefields.js"; -export * from "./getintegrationstatus.js"; +export * from "./getlifecyclemeasurementdefinition.js"; export * from "./getmeantimereport.js"; -export * from "./getmeasurementdefinition.js"; +export * from "./getmemberdefaultaudience.js"; +export * from "./getnuncconnection.js"; +export * from "./getoncallshift.js"; +export * from "./getoptionsforfield.js"; +export * from "./getpostmortemquestion.js"; export * from "./getpostmortemreport.js"; export * from "./getpriority.js"; -export * from "./getretrospectivequestion.js"; +export * from "./getretrospectivetemplate.js"; export * from "./getrunbook.js"; +export * from "./getrunbookactionfieldoptions.js"; export * from "./getrunbookexecution.js"; export * from "./getrunbookexecutionstepscript.js"; -export * from "./getrunbookexecutionvotestatus.js"; -export * from "./getrunbookselectoptions.js"; -export * from "./getrunbookstepvotestatus.js"; export * from "./getsavedsearch.js"; export * from "./getscheduledmaintenance.js"; export * from "./getscimgroup.js"; -export * from "./getscimgroups.js"; export * from "./getscimuser.js"; -export * from "./getscimusers.js"; export * from "./getservice.js"; export * from "./getservicedependencies.js"; export * from "./getservicedependency.js"; export * from "./getseverity.js"; export * from "./getseveritymatrixcondition.js"; -export * from "./getsignalemailtarget.js"; -export * from "./getsignalgroupedmetrics.js"; -export * from "./getsignalingesturl.js"; -export * from "./getsignalsanalyticstimeseries.js"; +export * from "./getsignalsemailtarget.js"; +export * from "./getsignalsgroupedmetrics.js"; +export * from "./getsignalsingesturl.js"; export * from "./getsignalsmttxanalytics.js"; +export * from "./getsignalstimeseriesanalytics.js"; export * from "./getsignalswebhooktarget.js"; -export * from "./getsimilarincidents.js"; export * from "./getslackemojiaction.js"; -export * from "./getslackworkspaces.js"; -export * from "./getstatuspage.js"; export * from "./getstatuspageconnection.js"; export * from "./getstatusupdatetemplate.js"; export * from "./gettasklist.js"; export * from "./getteam.js"; export * from "./getteamescalationpolicy.js"; export * from "./getteamoncallschedule.js"; -export * from "./getteamscheduleshift.js"; export * from "./getteamsignalrule.js"; export * from "./getticket.js"; +export * from "./getticketingfieldmap.js"; export * from "./getticketingpriority.js"; export * from "./getticketingproject.js"; -export * from "./getticketingprojectavailablefields.js"; export * from "./getticketingprojectconfig.js"; -export * from "./getticketingprojectconfigurationoptions.js"; -export * from "./getticketingprojectfieldmap.js"; -export * from "./getticketingprojectfieldoptions.js"; export * from "./getuser.js"; +export * from "./getvotestatus.js"; export * from "./getwebhook.js"; +export * from "./getzendeskcustomersupportissue.js"; export * from "./ingestcatalogdata.js"; -export * from "./listalertprocessinglogs.js"; export * from "./listalerts.js"; +export * from "./listaudiences.js"; +export * from "./listaudiencesummaries.js"; +export * from "./listauthedproviders.js"; +export * from "./listavailableinboundfieldmaps.js"; +export * from "./listavailableticketingfieldmaps.js"; export * from "./listawscloudtrailbatches.js"; +export * from "./listawscloudtrailbatchevents.js"; export * from "./listawsconnections.js"; +export * from "./listcallroutes.js"; export * from "./listchangeevents.js"; export * from "./listchangeidentities.js"; export * from "./listchanges.js"; export * from "./listchangetypes.js"; export * from "./listchecklisttemplates.js"; -export * from "./listconfluencespaces.js"; -export * from "./listconversationcommentreactions.js"; -export * from "./listconversationcomments.js"; +export * from "./listcommentreactions.js"; +export * from "./listcomments.js"; +export * from "./listconnections.js"; +export * from "./listconnectionstatusesbyslug.js"; +export * from "./listconnectionstatusesbyslugandid.js"; +export * from "./listcustomfieldselectoptions.js"; +export * from "./listemailsubscribers.js"; export * from "./listentitlements.js"; export * from "./listenvironments.js"; +export * from "./listfieldmapavailablefields.js"; export * from "./listfunctionalities.js"; +export * from "./listfunctionalityservices.js"; +export * from "./listinboundfieldmaps.js"; export * from "./listincidentalerts.js"; export * from "./listincidentattachments.js"; +export * from "./listincidentchangeevents.js"; +export * from "./listincidentconferencebridges.js"; export * from "./listincidentevents.js"; -export * from "./listincidentimpact.js"; +export * from "./listincidentimpacts.js"; export * from "./listincidentlinks.js"; export * from "./listincidentmetrics.js"; export * from "./listincidentmilestones.js"; -export * from "./listincidentrelatedchanges.js"; +export * from "./listincidentretrospectives.js"; export * from "./listincidentroleassignments.js"; export * from "./listincidentroles.js"; export * from "./listincidents.js"; @@ -206,13 +228,17 @@ export * from "./listincidenttasks.js"; export * from "./listincidenttypes.js"; export * from "./listinfrastructuremetrics.js"; export * from "./listinfrastructures.js"; -export * from "./listintegrationconnections.js"; -export * from "./listmeasurementdefinitions.js"; +export * from "./listinfrastructuretypemetrics.js"; +export * from "./listlifecyclemeasurementdefinitions.js"; +export * from "./listorganizationoncallschedules.js"; +export * from "./listpostmortemquestions.js"; +export * from "./listpostmortemreasons.js"; +export * from "./listpostmortemreports.js"; export * from "./listpriorities.js"; +export * from "./listprocessinglogentries.js"; export * from "./listretrospectivemetrics.js"; -export * from "./listretrospectivequestions.js"; -export * from "./listretrospectivereportreasons.js"; -export * from "./listretrospectivereports.js"; +export * from "./listretrospectives.js"; +export * from "./listretrospectivetemplates.js"; export * from "./listrunbookactions.js"; export * from "./listrunbookaudits.js"; export * from "./listrunbookexecutions.js"; @@ -220,20 +246,22 @@ export * from "./listrunbooks.js"; export * from "./listsavedsearches.js"; export * from "./listscheduledmaintenances.js"; export * from "./listschedules.js"; +export * from "./listscimgroups.js"; +export * from "./listscimusers.js"; export * from "./listserviceavailabledownstreamdependencies.js"; export * from "./listserviceavailableupstreamdependencies.js"; export * from "./listservices.js"; export * from "./listseverities.js"; export * from "./listseveritymatrixconditions.js"; export * from "./listseveritymatriximpacts.js"; -export * from "./listsignalemailtargets.js"; -export * from "./listsignaleventsources.js"; -export * from "./listsignalsoncall.js"; -export * from "./listsignalwebhooktargets.js"; +export * from "./listsignalsemailtargets.js"; +export * from "./listsignalseventsources.js"; +export * from "./listsignalswebhooktargets.js"; +export * from "./listsimilarincidents.js"; export * from "./listslackemojiactions.js"; +export * from "./listslackworkspaces.js"; +export * from "./liststatuspageconnectionpages.js"; export * from "./liststatuspageconnections.js"; -export * from "./liststatuspagepages.js"; -export * from "./liststatuspagesubscribers.js"; export * from "./liststatusupdatetemplates.js"; export * from "./listtasklists.js"; export * from "./listteamescalationpolicies.js"; @@ -243,57 +271,69 @@ export * from "./listteamsignalrules.js"; export * from "./listticketingprojects.js"; export * from "./listtickets.js"; export * from "./listtickettags.js"; +export * from "./listtranscriptentries.js"; export * from "./listuserinvolvementmetrics.js"; +export * from "./listuserownedservices.js"; export * from "./listusers.js"; -export * from "./listuserservices.js"; export * from "./listwebhookdeliveries.js"; export * from "./listwebhooks.js"; -export * from "./partialupdateincidentimpacts.js"; -export * from "./publishretrospectivereport.js"; +export * from "./patchscimuser.js"; +export * from "./publishpostmortemreport.js"; export * from "./refreshcatalog.js"; -export * from "./refreshintegrationconnection.js"; -export * from "./replacescimuser.js"; +export * from "./refreshconnection.js"; +export * from "./reorderpostmortemreasons.js"; export * from "./resolveincident.js"; +export * from "./restoreaudience.js"; +export * from "./searchconfluencespaces.js"; export * from "./searchzendesktickets.js"; -export * from "./setincidentalertasprimary.js"; +export * from "./setmemberdefaultaudience.js"; +export * from "./shareincidentretrospectives.js"; export * from "./unarchiveincident.js"; export * from "./updateaipreferences.js"; +export * from "./updateaudience.js"; +export * from "./updateauthedprovider.js"; export * from "./updateawscloudtrailbatch.js"; export * from "./updateawsconnection.js"; export * from "./updatechange.js"; export * from "./updatechangeevent.js"; export * from "./updatechangeidentity.js"; export * from "./updatechecklisttemplate.js"; -export * from "./updateconversationcomment.js"; +export * from "./updatecomment.js"; +export * from "./updateconnection.js"; export * from "./updatecustomfielddefinition.js"; export * from "./updateenvironment.js"; +export * from "./updatefieldmap.js"; export * from "./updatefunctionality.js"; +export * from "./updateinboundfieldmap.js"; export * from "./updateincident.js"; +export * from "./updateincidentalertprimary.js"; +export * from "./updateincidentchangeevent.js"; export * from "./updateincidentchatmessage.js"; export * from "./updateincidentevent.js"; -export * from "./updateincidenteventvotes.js"; -export * from "./updateincidentimpacts.js"; +export * from "./updateincidentimpactpatch.js"; +export * from "./updateincidentimpactput.js"; export * from "./updateincidentlink.js"; -export * from "./updateincidentmilestonesbulk.js"; export * from "./updateincidentnote.js"; -export * from "./updateincidentrelatedchangeevent.js"; +export * from "./updateincidentretrospective.js"; +export * from "./updateincidentretrospectivefield.js"; export * from "./updateincidentrole.js"; export * from "./updateincidenttask.js"; export * from "./updateincidenttype.js"; -export * from "./updateintegrationconnection.js"; -export * from "./updateintegrationfieldmap.js"; +export * from "./updatelifecyclemeasurementdefinition.js"; export * from "./updatelifecyclemilestone.js"; -export * from "./updatemeasurementdefinition.js"; +export * from "./updatenunccomponentgroup.js"; +export * from "./updatenuncconnection.js"; +export * from "./updatenuncimage.js"; +export * from "./updatenunclink.js"; +export * from "./updateoncallshift.js"; +export * from "./updatepostmortemfield.js"; +export * from "./updatepostmortemreason.js"; export * from "./updatepostmortemreport.js"; export * from "./updatepriority.js"; -export * from "./updateretrospectivefield.js"; -export * from "./updateretrospectivereason.js"; -export * from "./updateretrospectivereportreasonorder.js"; +export * from "./updateretrospectivetemplate.js"; export * from "./updaterunbook.js"; export * from "./updaterunbookexecutionstep.js"; -export * from "./updaterunbookexecutionstepscriptstate.js"; -export * from "./updaterunbookexecutionstepvotes.js"; -export * from "./updaterunbookexecutionvotes.js"; +export * from "./updaterunbookexecutionstepscript.js"; export * from "./updatesavedsearch.js"; export * from "./updatescheduledmaintenance.js"; export * from "./updatescimgroup.js"; @@ -303,24 +343,21 @@ export * from "./updateservicedependency.js"; export * from "./updateseverity.js"; export * from "./updateseveritymatrixcondition.js"; export * from "./updateseveritymatriximpact.js"; -export * from "./updatesignalemailtarget.js"; +export * from "./updatesignalsemailtarget.js"; export * from "./updatesignalswebhooktarget.js"; export * from "./updateslackemojiaction.js"; -export * from "./updatestatuspage.js"; -export * from "./updatestatuspagecomponentgroup.js"; export * from "./updatestatuspageconnection.js"; -export * from "./updatestatuspageimage.js"; -export * from "./updatestatuspagelink.js"; export * from "./updatestatusupdatetemplate.js"; export * from "./updatetasklist.js"; export * from "./updateteam.js"; export * from "./updateteamescalationpolicy.js"; export * from "./updateteamoncallschedule.js"; -export * from "./updateteamscheduleshift.js"; export * from "./updateteamsignalrule.js"; export * from "./updateticket.js"; +export * from "./updateticketingfieldmap.js"; export * from "./updateticketingpriority.js"; export * from "./updateticketingprojectconfig.js"; -export * from "./updateticketingprojectfieldmap.js"; +export * from "./updatetranscriptattribution.js"; +export * from "./updatevote.js"; export * from "./updatewebhook.js"; -export * from "./voteonincidentsummary.js"; +export * from "./voteaiincidentsummary.js"; diff --git a/src/models/operations/ingestcatalogdata.ts b/src/models/operations/ingestcatalogdata.ts index 5a52f9ce..a43e2464 100644 --- a/src/models/operations/ingestcatalogdata.ts +++ b/src/models/operations/ingestcatalogdata.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type IngestCatalogDataRequest = { catalogId: string; - postV1CatalogsCatalogIdIngest: components.PostV1CatalogsCatalogIdIngest; + ingestCatalogData: components.IngestCatalogData; }; /** @internal */ @@ -21,19 +21,18 @@ export const IngestCatalogDataRequest$inboundSchema: z.ZodType< unknown > = z.object({ catalog_id: z.string(), - postV1CatalogsCatalogIdIngest: - components.PostV1CatalogsCatalogIdIngest$inboundSchema, + ingest_catalog_data: z.lazy(() => components.IngestCatalogData$inboundSchema), }).transform((v) => { return remap$(v, { "catalog_id": "catalogId", + "ingest_catalog_data": "ingestCatalogData", }); }); /** @internal */ export type IngestCatalogDataRequest$Outbound = { catalog_id: string; - postV1CatalogsCatalogIdIngest: - components.PostV1CatalogsCatalogIdIngest$Outbound; + ingest_catalog_data: components.IngestCatalogData$Outbound; }; /** @internal */ @@ -43,11 +42,11 @@ export const IngestCatalogDataRequest$outboundSchema: z.ZodType< IngestCatalogDataRequest > = z.object({ catalogId: z.string(), - postV1CatalogsCatalogIdIngest: - components.PostV1CatalogsCatalogIdIngest$outboundSchema, + ingestCatalogData: z.lazy(() => components.IngestCatalogData$outboundSchema), }).transform((v) => { return remap$(v, { catalogId: "catalog_id", + ingestCatalogData: "ingest_catalog_data", }); }); diff --git a/src/models/operations/listalertprocessinglogs.ts b/src/models/operations/listalertprocessinglogs.ts deleted file mode 100644 index e9125546..00000000 --- a/src/models/operations/listalertprocessinglogs.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Returns logs of all levels equal to or above the provided level - */ -export const OfLevel = { - Unknown: "unknown", - Debug: "debug", - Info: "info", - Warn: "warn", - Error: "error", - Fatal: "fatal", -} as const; -/** - * Returns logs of all levels equal to or above the provided level - */ -export type OfLevel = ClosedEnum; - -/** - * Returns log entries of all levels equal to the provided level - */ -export const ExactLevel = { - Unknown: "unknown", - Debug: "debug", - Info: "info", - Warn: "warn", - Error: "error", - Fatal: "fatal", -} as const; -/** - * Returns log entries of all levels equal to the provided level - */ -export type ExactLevel = ClosedEnum; - -export type ListAlertProcessingLogsRequest = { - page?: number | undefined; - perPage?: number | undefined; - /** - * Scopes returned log entries to a specific integration ID - */ - integrationSlug?: string | undefined; - /** - * Scopes returned log entries to a specific connection ID - */ - connectionId?: string | undefined; - /** - * Returns logs of all levels equal to or above the provided level - */ - ofLevel?: OfLevel | undefined; - /** - * Returns log entries of all levels equal to the provided level - */ - exactLevel?: ExactLevel | undefined; -}; - -/** @internal */ -export const OfLevel$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(OfLevel); - -/** @internal */ -export const OfLevel$outboundSchema: z.ZodNativeEnum = - OfLevel$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OfLevel$ { - /** @deprecated use `OfLevel$inboundSchema` instead. */ - export const inboundSchema = OfLevel$inboundSchema; - /** @deprecated use `OfLevel$outboundSchema` instead. */ - export const outboundSchema = OfLevel$outboundSchema; -} - -/** @internal */ -export const ExactLevel$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(ExactLevel); - -/** @internal */ -export const ExactLevel$outboundSchema: z.ZodNativeEnum = - ExactLevel$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExactLevel$ { - /** @deprecated use `ExactLevel$inboundSchema` instead. */ - export const inboundSchema = ExactLevel$inboundSchema; - /** @deprecated use `ExactLevel$outboundSchema` instead. */ - export const outboundSchema = ExactLevel$outboundSchema; -} - -/** @internal */ -export const ListAlertProcessingLogsRequest$inboundSchema: z.ZodType< - ListAlertProcessingLogsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - integration_slug: z.string().optional(), - connection_id: z.string().optional(), - of_level: OfLevel$inboundSchema.optional(), - exact_level: ExactLevel$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "per_page": "perPage", - "integration_slug": "integrationSlug", - "connection_id": "connectionId", - "of_level": "ofLevel", - "exact_level": "exactLevel", - }); -}); - -/** @internal */ -export type ListAlertProcessingLogsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - integration_slug?: string | undefined; - connection_id?: string | undefined; - of_level?: string | undefined; - exact_level?: string | undefined; -}; - -/** @internal */ -export const ListAlertProcessingLogsRequest$outboundSchema: z.ZodType< - ListAlertProcessingLogsRequest$Outbound, - z.ZodTypeDef, - ListAlertProcessingLogsRequest -> = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - integrationSlug: z.string().optional(), - connectionId: z.string().optional(), - ofLevel: OfLevel$outboundSchema.optional(), - exactLevel: ExactLevel$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - perPage: "per_page", - integrationSlug: "integration_slug", - connectionId: "connection_id", - ofLevel: "of_level", - exactLevel: "exact_level", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListAlertProcessingLogsRequest$ { - /** @deprecated use `ListAlertProcessingLogsRequest$inboundSchema` instead. */ - export const inboundSchema = ListAlertProcessingLogsRequest$inboundSchema; - /** @deprecated use `ListAlertProcessingLogsRequest$outboundSchema` instead. */ - export const outboundSchema = ListAlertProcessingLogsRequest$outboundSchema; - /** @deprecated use `ListAlertProcessingLogsRequest$Outbound` instead. */ - export type Outbound = ListAlertProcessingLogsRequest$Outbound; -} - -export function listAlertProcessingLogsRequestToJSON( - listAlertProcessingLogsRequest: ListAlertProcessingLogsRequest, -): string { - return JSON.stringify( - ListAlertProcessingLogsRequest$outboundSchema.parse( - listAlertProcessingLogsRequest, - ), - ); -} - -export function listAlertProcessingLogsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListAlertProcessingLogsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListAlertProcessingLogsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listalerts.ts b/src/models/operations/listalerts.ts index 9dca517c..20a89330 100644 --- a/src/models/operations/listalerts.ts +++ b/src/models/operations/listalerts.ts @@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The strategy to match tags. `any` will return alerts that have at least one of the supplied tags, `match_all` will return only alerts that have all of the supplied tags, and `exclude` will only return alerts that have none of the supplied tags. This currently only works for Signals alerts. */ -export const TagMatchStrategy = { +export const ListAlertsTagMatchStrategy = { Any: "any", MatchAll: "match_all", Exclude: "exclude", @@ -20,72 +20,74 @@ export const TagMatchStrategy = { /** * The strategy to match tags. `any` will return alerts that have at least one of the supplied tags, `match_all` will return only alerts that have all of the supplied tags, and `exclude` will only return alerts that have none of the supplied tags. This currently only works for Signals alerts. */ -export type TagMatchStrategy = ClosedEnum; +export type ListAlertsTagMatchStrategy = ClosedEnum< + typeof ListAlertsTagMatchStrategy +>; export type ListAlertsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A text query for alerts */ - query?: string | undefined; + query?: string | null | undefined; /** * A comma separated list of user IDs. This currently only works for Signals alerts. */ - users?: string | undefined; + users?: string | null | undefined; /** * A comma separated list of team IDs. This currently only works for Signals alerts. */ - teams?: string | undefined; + teams?: string | null | undefined; /** * A comma separated list of signals rule IDs. This currently only works for Signals alerts. */ - signalRules?: string | undefined; + signalRules?: string | null | undefined; /** * A comma separated list of environment IDs. This currently only works for Signals alerts. */ - environments?: string | undefined; + environments?: string | null | undefined; /** * A comma separated list of functionality IDs. This currently only works for Signals alerts. */ - functionalities?: string | undefined; + functionalities?: string | null | undefined; /** * A comma separated list of service IDs. This currently only works for Signals alerts. */ - services?: string | undefined; + services?: string | null | undefined; /** * A comma separated list of tags. This currently only works for Signals alerts. */ - tags?: string | undefined; + tags?: string | null | undefined; /** * The strategy to match tags. `any` will return alerts that have at least one of the supplied tags, `match_all` will return only alerts that have all of the supplied tags, and `exclude` will only return alerts that have none of the supplied tags. This currently only works for Signals alerts. */ - tagMatchStrategy?: TagMatchStrategy | undefined; + tagMatchStrategy?: ListAlertsTagMatchStrategy | null | undefined; /** - * A comma separated list of statuses to filter by. Valid statuses are: opened, acknowledged, resolved, ignored, or expired + * A comma separated list of statuses to filter by. Valid statuses are: opened, acknowledged, resolved, ignored, expired, or linked */ - statuses?: string | undefined; + statuses?: string | null | undefined; }; /** @internal */ -export const TagMatchStrategy$inboundSchema: z.ZodNativeEnum< - typeof TagMatchStrategy -> = z.nativeEnum(TagMatchStrategy); +export const ListAlertsTagMatchStrategy$inboundSchema: z.ZodNativeEnum< + typeof ListAlertsTagMatchStrategy +> = z.nativeEnum(ListAlertsTagMatchStrategy); /** @internal */ -export const TagMatchStrategy$outboundSchema: z.ZodNativeEnum< - typeof TagMatchStrategy -> = TagMatchStrategy$inboundSchema; +export const ListAlertsTagMatchStrategy$outboundSchema: z.ZodNativeEnum< + typeof ListAlertsTagMatchStrategy +> = ListAlertsTagMatchStrategy$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace TagMatchStrategy$ { - /** @deprecated use `TagMatchStrategy$inboundSchema` instead. */ - export const inboundSchema = TagMatchStrategy$inboundSchema; - /** @deprecated use `TagMatchStrategy$outboundSchema` instead. */ - export const outboundSchema = TagMatchStrategy$outboundSchema; +export namespace ListAlertsTagMatchStrategy$ { + /** @deprecated use `ListAlertsTagMatchStrategy$inboundSchema` instead. */ + export const inboundSchema = ListAlertsTagMatchStrategy$inboundSchema; + /** @deprecated use `ListAlertsTagMatchStrategy$outboundSchema` instead. */ + export const outboundSchema = ListAlertsTagMatchStrategy$outboundSchema; } /** @internal */ @@ -94,18 +96,19 @@ export const ListAlertsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - query: z.string().optional(), - users: z.string().optional(), - teams: z.string().optional(), - signal_rules: z.string().optional(), - environments: z.string().optional(), - functionalities: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - tag_match_strategy: TagMatchStrategy$inboundSchema.optional(), - statuses: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + signal_rules: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + functionalities: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + tag_match_strategy: z.nullable(ListAlertsTagMatchStrategy$inboundSchema) + .optional(), + statuses: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -116,18 +119,18 @@ export const ListAlertsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListAlertsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - query?: string | undefined; - users?: string | undefined; - teams?: string | undefined; - signal_rules?: string | undefined; - environments?: string | undefined; - functionalities?: string | undefined; - services?: string | undefined; - tags?: string | undefined; - tag_match_strategy?: string | undefined; - statuses?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + query?: string | null | undefined; + users?: string | null | undefined; + teams?: string | null | undefined; + signal_rules?: string | null | undefined; + environments?: string | null | undefined; + functionalities?: string | null | undefined; + services?: string | null | undefined; + tags?: string | null | undefined; + tag_match_strategy?: string | null | undefined; + statuses?: string | null | undefined; }; /** @internal */ @@ -136,18 +139,19 @@ export const ListAlertsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListAlertsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - query: z.string().optional(), - users: z.string().optional(), - teams: z.string().optional(), - signalRules: z.string().optional(), - environments: z.string().optional(), - functionalities: z.string().optional(), - services: z.string().optional(), - tags: z.string().optional(), - tagMatchStrategy: TagMatchStrategy$outboundSchema.optional(), - statuses: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + users: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + signalRules: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + functionalities: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + tagMatchStrategy: z.nullable(ListAlertsTagMatchStrategy$outboundSchema) + .optional(), + statuses: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listaudiences.ts b/src/models/operations/listaudiences.ts new file mode 100644 index 00000000..be1efcac --- /dev/null +++ b/src/models/operations/listaudiences.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListAudiencesRequest = { + /** + * Include archived (discarded) audiences + */ + includeArchived?: boolean | null | undefined; +}; + +/** @internal */ +export const ListAudiencesRequest$inboundSchema: z.ZodType< + ListAudiencesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + include_archived: z.nullable(z.boolean().default(false)), +}).transform((v) => { + return remap$(v, { + "include_archived": "includeArchived", + }); +}); + +/** @internal */ +export type ListAudiencesRequest$Outbound = { + include_archived: boolean | null; +}; + +/** @internal */ +export const ListAudiencesRequest$outboundSchema: z.ZodType< + ListAudiencesRequest$Outbound, + z.ZodTypeDef, + ListAudiencesRequest +> = z.object({ + includeArchived: z.nullable(z.boolean().default(false)), +}).transform((v) => { + return remap$(v, { + includeArchived: "include_archived", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListAudiencesRequest$ { + /** @deprecated use `ListAudiencesRequest$inboundSchema` instead. */ + export const inboundSchema = ListAudiencesRequest$inboundSchema; + /** @deprecated use `ListAudiencesRequest$outboundSchema` instead. */ + export const outboundSchema = ListAudiencesRequest$outboundSchema; + /** @deprecated use `ListAudiencesRequest$Outbound` instead. */ + export type Outbound = ListAudiencesRequest$Outbound; +} + +export function listAudiencesRequestToJSON( + listAudiencesRequest: ListAudiencesRequest, +): string { + return JSON.stringify( + ListAudiencesRequest$outboundSchema.parse(listAudiencesRequest), + ); +} + +export function listAudiencesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListAudiencesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListAudiencesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listaudiencesummaries.ts b/src/models/operations/listaudiencesummaries.ts new file mode 100644 index 00000000..df4d0dee --- /dev/null +++ b/src/models/operations/listaudiencesummaries.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListAudienceSummariesRequest = { + /** + * Unique identifier of the incident to summarize + */ + incidentId: string; +}; + +/** @internal */ +export const ListAudienceSummariesRequest$inboundSchema: z.ZodType< + ListAudienceSummariesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type ListAudienceSummariesRequest$Outbound = { + incident_id: string; +}; + +/** @internal */ +export const ListAudienceSummariesRequest$outboundSchema: z.ZodType< + ListAudienceSummariesRequest$Outbound, + z.ZodTypeDef, + ListAudienceSummariesRequest +> = z.object({ + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListAudienceSummariesRequest$ { + /** @deprecated use `ListAudienceSummariesRequest$inboundSchema` instead. */ + export const inboundSchema = ListAudienceSummariesRequest$inboundSchema; + /** @deprecated use `ListAudienceSummariesRequest$outboundSchema` instead. */ + export const outboundSchema = ListAudienceSummariesRequest$outboundSchema; + /** @deprecated use `ListAudienceSummariesRequest$Outbound` instead. */ + export type Outbound = ListAudienceSummariesRequest$Outbound; +} + +export function listAudienceSummariesRequestToJSON( + listAudienceSummariesRequest: ListAudienceSummariesRequest, +): string { + return JSON.stringify( + ListAudienceSummariesRequest$outboundSchema.parse( + listAudienceSummariesRequest, + ), + ); +} + +export function listAudienceSummariesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListAudienceSummariesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListAudienceSummariesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listauthedproviders.ts b/src/models/operations/listauthedproviders.ts new file mode 100644 index 00000000..d7cbb8d2 --- /dev/null +++ b/src/models/operations/listauthedproviders.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListAuthedProvidersRequest = { + /** + * Integration slug + */ + integrationSlug: string; + /** + * Connection ID + */ + connectionId: string; + /** + * Query for users by name + */ + query?: string | null | undefined; +}; + +/** @internal */ +export const ListAuthedProvidersRequest$inboundSchema: z.ZodType< + ListAuthedProvidersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: z.string(), + connection_id: z.string(), + query: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type ListAuthedProvidersRequest$Outbound = { + integration_slug: string; + connection_id: string; + query?: string | null | undefined; +}; + +/** @internal */ +export const ListAuthedProvidersRequest$outboundSchema: z.ZodType< + ListAuthedProvidersRequest$Outbound, + z.ZodTypeDef, + ListAuthedProvidersRequest +> = z.object({ + integrationSlug: z.string(), + connectionId: z.string(), + query: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListAuthedProvidersRequest$ { + /** @deprecated use `ListAuthedProvidersRequest$inboundSchema` instead. */ + export const inboundSchema = ListAuthedProvidersRequest$inboundSchema; + /** @deprecated use `ListAuthedProvidersRequest$outboundSchema` instead. */ + export const outboundSchema = ListAuthedProvidersRequest$outboundSchema; + /** @deprecated use `ListAuthedProvidersRequest$Outbound` instead. */ + export type Outbound = ListAuthedProvidersRequest$Outbound; +} + +export function listAuthedProvidersRequestToJSON( + listAuthedProvidersRequest: ListAuthedProvidersRequest, +): string { + return JSON.stringify( + ListAuthedProvidersRequest$outboundSchema.parse(listAuthedProvidersRequest), + ); +} + +export function listAuthedProvidersRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListAuthedProvidersRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListAuthedProvidersRequest' from JSON`, + ); +} diff --git a/src/models/operations/listavailableinboundfieldmaps.ts b/src/models/operations/listavailableinboundfieldmaps.ts new file mode 100644 index 00000000..e3d1a2dd --- /dev/null +++ b/src/models/operations/listavailableinboundfieldmaps.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListAvailableInboundFieldMapsRequest = { + ticketingProjectId: string; +}; + +/** @internal */ +export const ListAvailableInboundFieldMapsRequest$inboundSchema: z.ZodType< + ListAvailableInboundFieldMapsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type ListAvailableInboundFieldMapsRequest$Outbound = { + ticketing_project_id: string; +}; + +/** @internal */ +export const ListAvailableInboundFieldMapsRequest$outboundSchema: z.ZodType< + ListAvailableInboundFieldMapsRequest$Outbound, + z.ZodTypeDef, + ListAvailableInboundFieldMapsRequest +> = z.object({ + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListAvailableInboundFieldMapsRequest$ { + /** @deprecated use `ListAvailableInboundFieldMapsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListAvailableInboundFieldMapsRequest$inboundSchema; + /** @deprecated use `ListAvailableInboundFieldMapsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListAvailableInboundFieldMapsRequest$outboundSchema; + /** @deprecated use `ListAvailableInboundFieldMapsRequest$Outbound` instead. */ + export type Outbound = ListAvailableInboundFieldMapsRequest$Outbound; +} + +export function listAvailableInboundFieldMapsRequestToJSON( + listAvailableInboundFieldMapsRequest: ListAvailableInboundFieldMapsRequest, +): string { + return JSON.stringify( + ListAvailableInboundFieldMapsRequest$outboundSchema.parse( + listAvailableInboundFieldMapsRequest, + ), + ); +} + +export function listAvailableInboundFieldMapsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListAvailableInboundFieldMapsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListAvailableInboundFieldMapsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listavailableticketingfieldmaps.ts b/src/models/operations/listavailableticketingfieldmaps.ts new file mode 100644 index 00000000..15e41e23 --- /dev/null +++ b/src/models/operations/listavailableticketingfieldmaps.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListAvailableTicketingFieldMapsRequest = { + ticketingProjectId: string; +}; + +/** @internal */ +export const ListAvailableTicketingFieldMapsRequest$inboundSchema: z.ZodType< + ListAvailableTicketingFieldMapsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type ListAvailableTicketingFieldMapsRequest$Outbound = { + ticketing_project_id: string; +}; + +/** @internal */ +export const ListAvailableTicketingFieldMapsRequest$outboundSchema: z.ZodType< + ListAvailableTicketingFieldMapsRequest$Outbound, + z.ZodTypeDef, + ListAvailableTicketingFieldMapsRequest +> = z.object({ + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListAvailableTicketingFieldMapsRequest$ { + /** @deprecated use `ListAvailableTicketingFieldMapsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListAvailableTicketingFieldMapsRequest$inboundSchema; + /** @deprecated use `ListAvailableTicketingFieldMapsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListAvailableTicketingFieldMapsRequest$outboundSchema; + /** @deprecated use `ListAvailableTicketingFieldMapsRequest$Outbound` instead. */ + export type Outbound = ListAvailableTicketingFieldMapsRequest$Outbound; +} + +export function listAvailableTicketingFieldMapsRequestToJSON( + listAvailableTicketingFieldMapsRequest: + ListAvailableTicketingFieldMapsRequest, +): string { + return JSON.stringify( + ListAvailableTicketingFieldMapsRequest$outboundSchema.parse( + listAvailableTicketingFieldMapsRequest, + ), + ); +} + +export function listAvailableTicketingFieldMapsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListAvailableTicketingFieldMapsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListAvailableTicketingFieldMapsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listawscloudtrailbatches.ts b/src/models/operations/listawscloudtrailbatches.ts index 03f4fe08..36d0bb02 100644 --- a/src/models/operations/listawscloudtrailbatches.ts +++ b/src/models/operations/listawscloudtrailbatches.ts @@ -9,12 +9,12 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListAwsCloudtrailBatchesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * AWS connection ID */ - connectionId?: string | undefined; + connectionId?: string | null | undefined; }; /** @internal */ @@ -23,9 +23,9 @@ export const ListAwsCloudtrailBatchesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - connection_id: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + connection_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -35,9 +35,9 @@ export const ListAwsCloudtrailBatchesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListAwsCloudtrailBatchesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - connection_id?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + connection_id?: string | null | undefined; }; /** @internal */ @@ -46,9 +46,9 @@ export const ListAwsCloudtrailBatchesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListAwsCloudtrailBatchesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - connectionId: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + connectionId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listawscloudtrailbatchevents.ts b/src/models/operations/listawscloudtrailbatchevents.ts new file mode 100644 index 00000000..d291ec59 --- /dev/null +++ b/src/models/operations/listawscloudtrailbatchevents.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListAwsCloudtrailBatchEventsRequest = { + id: string; +}; + +/** @internal */ +export const ListAwsCloudtrailBatchEventsRequest$inboundSchema: z.ZodType< + ListAwsCloudtrailBatchEventsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), +}); + +/** @internal */ +export type ListAwsCloudtrailBatchEventsRequest$Outbound = { + id: string; +}; + +/** @internal */ +export const ListAwsCloudtrailBatchEventsRequest$outboundSchema: z.ZodType< + ListAwsCloudtrailBatchEventsRequest$Outbound, + z.ZodTypeDef, + ListAwsCloudtrailBatchEventsRequest +> = z.object({ + id: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListAwsCloudtrailBatchEventsRequest$ { + /** @deprecated use `ListAwsCloudtrailBatchEventsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListAwsCloudtrailBatchEventsRequest$inboundSchema; + /** @deprecated use `ListAwsCloudtrailBatchEventsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListAwsCloudtrailBatchEventsRequest$outboundSchema; + /** @deprecated use `ListAwsCloudtrailBatchEventsRequest$Outbound` instead. */ + export type Outbound = ListAwsCloudtrailBatchEventsRequest$Outbound; +} + +export function listAwsCloudtrailBatchEventsRequestToJSON( + listAwsCloudtrailBatchEventsRequest: ListAwsCloudtrailBatchEventsRequest, +): string { + return JSON.stringify( + ListAwsCloudtrailBatchEventsRequest$outboundSchema.parse( + listAwsCloudtrailBatchEventsRequest, + ), + ); +} + +export function listAwsCloudtrailBatchEventsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListAwsCloudtrailBatchEventsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListAwsCloudtrailBatchEventsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listawsconnections.ts b/src/models/operations/listawsconnections.ts index 0631ad7a..967a2a6e 100644 --- a/src/models/operations/listawsconnections.ts +++ b/src/models/operations/listawsconnections.ts @@ -9,20 +9,20 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListAwsConnectionsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * AWS account ID containing the role to be assumed */ - awsAccountId?: string | undefined; + awsAccountId?: string | null | undefined; /** * ARN of the role to be assumed */ - targetArn?: string | undefined; + targetArn?: string | null | undefined; /** * The external ID supplied when assuming the role */ - externalId?: string | undefined; + externalId?: string | null | undefined; }; /** @internal */ @@ -31,11 +31,11 @@ export const ListAwsConnectionsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - aws_account_id: z.string().optional(), - target_arn: z.string().optional(), - external_id: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + aws_account_id: z.nullable(z.string()).optional(), + target_arn: z.nullable(z.string()).optional(), + external_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -47,11 +47,11 @@ export const ListAwsConnectionsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListAwsConnectionsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - aws_account_id?: string | undefined; - target_arn?: string | undefined; - external_id?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + aws_account_id?: string | null | undefined; + target_arn?: string | null | undefined; + external_id?: string | null | undefined; }; /** @internal */ @@ -60,11 +60,11 @@ export const ListAwsConnectionsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListAwsConnectionsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - awsAccountId: z.string().optional(), - targetArn: z.string().optional(), - externalId: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + awsAccountId: z.nullable(z.string()).optional(), + targetArn: z.nullable(z.string()).optional(), + externalId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listcallroutes.ts b/src/models/operations/listcallroutes.ts new file mode 100644 index 00000000..826ed222 --- /dev/null +++ b/src/models/operations/listcallroutes.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListCallRoutesRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; +}; + +/** @internal */ +export const ListCallRoutesRequest$inboundSchema: z.ZodType< + ListCallRoutesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + }); +}); + +/** @internal */ +export type ListCallRoutesRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; +}; + +/** @internal */ +export const ListCallRoutesRequest$outboundSchema: z.ZodType< + ListCallRoutesRequest$Outbound, + z.ZodTypeDef, + ListCallRoutesRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListCallRoutesRequest$ { + /** @deprecated use `ListCallRoutesRequest$inboundSchema` instead. */ + export const inboundSchema = ListCallRoutesRequest$inboundSchema; + /** @deprecated use `ListCallRoutesRequest$outboundSchema` instead. */ + export const outboundSchema = ListCallRoutesRequest$outboundSchema; + /** @deprecated use `ListCallRoutesRequest$Outbound` instead. */ + export type Outbound = ListCallRoutesRequest$Outbound; +} + +export function listCallRoutesRequestToJSON( + listCallRoutesRequest: ListCallRoutesRequest, +): string { + return JSON.stringify( + ListCallRoutesRequest$outboundSchema.parse(listCallRoutesRequest), + ); +} + +export function listCallRoutesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListCallRoutesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListCallRoutesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listchangeevents.ts b/src/models/operations/listchangeevents.ts index 0d703f32..7f3be32c 100644 --- a/src/models/operations/listchangeevents.ts +++ b/src/models/operations/listchangeevents.ts @@ -9,36 +9,36 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListChangeEventsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * The id of a previously saved search. */ - savedSearchId?: string | undefined; + savedSearchId?: string | null | undefined; /** * A text query for change events */ - query?: string | undefined; + query?: string | null | undefined; /** * A comma separated list of label key / values in the format of "key=value,key2=value2". To filter change events that have a key (with no specific value), omit the value */ - labels?: string | undefined; + labels?: string | null | undefined; /** * A comma separated list of environment IDs */ - environments?: string | undefined; + environments?: string | null | undefined; /** * A comma separated list of service IDs */ - services?: string | undefined; + services?: string | null | undefined; /** * The start time to start returning change events from */ - startsAt?: string | undefined; + startsAt?: string | null | undefined; /** * The end time to return change events up to */ - endsAt?: Date | undefined; + endsAt?: Date | null | undefined; }; /** @internal */ @@ -47,16 +47,17 @@ export const ListChangeEventsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - saved_search_id: z.string().optional(), - query: z.string().optional(), - labels: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - starts_at: z.string().optional(), - ends_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + saved_search_id: z.nullable(z.string()).optional(), + query: z.nullable(z.string()).optional(), + labels: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + starts_at: z.nullable(z.string()).optional(), + ends_at: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -68,15 +69,15 @@ export const ListChangeEventsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListChangeEventsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - saved_search_id?: string | undefined; - query?: string | undefined; - labels?: string | undefined; - environments?: string | undefined; - services?: string | undefined; - starts_at?: string | undefined; - ends_at?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + saved_search_id?: string | null | undefined; + query?: string | null | undefined; + labels?: string | null | undefined; + environments?: string | null | undefined; + services?: string | null | undefined; + starts_at?: string | null | undefined; + ends_at?: string | null | undefined; }; /** @internal */ @@ -85,15 +86,15 @@ export const ListChangeEventsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListChangeEventsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - savedSearchId: z.string().optional(), - query: z.string().optional(), - labels: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - startsAt: z.string().optional(), - endsAt: z.date().transform(v => v.toISOString()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + savedSearchId: z.nullable(z.string()).optional(), + query: z.nullable(z.string()).optional(), + labels: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + startsAt: z.nullable(z.string()).optional(), + endsAt: z.nullable(z.date().transform(v => v.toISOString())).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listchangeidentities.ts b/src/models/operations/listchangeidentities.ts index 4f03f6e7..fc45ac4c 100644 --- a/src/models/operations/listchangeidentities.ts +++ b/src/models/operations/listchangeidentities.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListChangeIdentitiesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; changeId: string; }; @@ -20,8 +20,8 @@ export const ListChangeIdentitiesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), change_id: z.string(), }).transform((v) => { return remap$(v, { @@ -32,8 +32,8 @@ export const ListChangeIdentitiesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListChangeIdentitiesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; change_id: string; }; @@ -43,8 +43,8 @@ export const ListChangeIdentitiesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListChangeIdentitiesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), changeId: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/operations/listchanges.ts b/src/models/operations/listchanges.ts index 11551510..dcffaa4d 100644 --- a/src/models/operations/listchanges.ts +++ b/src/models/operations/listchanges.ts @@ -9,12 +9,12 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListChangesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * Filter changes by summary */ - query?: string | undefined; + query?: string | null | undefined; }; /** @internal */ @@ -23,9 +23,9 @@ export const ListChangesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - query: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -34,9 +34,9 @@ export const ListChangesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListChangesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - query?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + query?: string | null | undefined; }; /** @internal */ @@ -45,9 +45,9 @@ export const ListChangesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListChangesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - query: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listchangetypes.ts b/src/models/operations/listchangetypes.ts index c31063e5..3e4cf9da 100644 --- a/src/models/operations/listchangetypes.ts +++ b/src/models/operations/listchangetypes.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListChangeTypesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListChangeTypesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListChangeTypesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListChangeTypesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListChangeTypesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListChangeTypesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listchecklisttemplates.ts b/src/models/operations/listchecklisttemplates.ts index ef5a8ff2..3a639a58 100644 --- a/src/models/operations/listchecklisttemplates.ts +++ b/src/models/operations/listchecklisttemplates.ts @@ -9,12 +9,12 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListChecklistTemplatesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A query to search checklist templates by their name */ - query?: string | undefined; + query?: string | null | undefined; }; /** @internal */ @@ -23,9 +23,9 @@ export const ListChecklistTemplatesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - query: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -34,9 +34,9 @@ export const ListChecklistTemplatesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListChecklistTemplatesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - query?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + query?: string | null | undefined; }; /** @internal */ @@ -45,9 +45,9 @@ export const ListChecklistTemplatesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListChecklistTemplatesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - query: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listcommentreactions.ts b/src/models/operations/listcommentreactions.ts new file mode 100644 index 00000000..b10310dd --- /dev/null +++ b/src/models/operations/listcommentreactions.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListCommentReactionsRequest = { + conversationId: string; + commentId: string; +}; + +/** @internal */ +export const ListCommentReactionsRequest$inboundSchema: z.ZodType< + ListCommentReactionsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + conversation_id: z.string(), + comment_id: z.string(), +}).transform((v) => { + return remap$(v, { + "conversation_id": "conversationId", + "comment_id": "commentId", + }); +}); + +/** @internal */ +export type ListCommentReactionsRequest$Outbound = { + conversation_id: string; + comment_id: string; +}; + +/** @internal */ +export const ListCommentReactionsRequest$outboundSchema: z.ZodType< + ListCommentReactionsRequest$Outbound, + z.ZodTypeDef, + ListCommentReactionsRequest +> = z.object({ + conversationId: z.string(), + commentId: z.string(), +}).transform((v) => { + return remap$(v, { + conversationId: "conversation_id", + commentId: "comment_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListCommentReactionsRequest$ { + /** @deprecated use `ListCommentReactionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListCommentReactionsRequest$inboundSchema; + /** @deprecated use `ListCommentReactionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListCommentReactionsRequest$outboundSchema; + /** @deprecated use `ListCommentReactionsRequest$Outbound` instead. */ + export type Outbound = ListCommentReactionsRequest$Outbound; +} + +export function listCommentReactionsRequestToJSON( + listCommentReactionsRequest: ListCommentReactionsRequest, +): string { + return JSON.stringify( + ListCommentReactionsRequest$outboundSchema.parse( + listCommentReactionsRequest, + ), + ); +} + +export function listCommentReactionsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListCommentReactionsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListCommentReactionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listcomments.ts b/src/models/operations/listcomments.ts new file mode 100644 index 00000000..61d96c93 --- /dev/null +++ b/src/models/operations/listcomments.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Allows sorting comments by the time they were posted, ascending or descending. + */ +export const ListCommentsSort = { + Asc: "asc", + Desc: "desc", +} as const; +/** + * Allows sorting comments by the time they were posted, ascending or descending. + */ +export type ListCommentsSort = ClosedEnum; + +export type ListCommentsRequest = { + /** + * An ISO8601 timestamp that allows filtering for comments posted before the provided time. + */ + before?: Date | null | undefined; + /** + * An ISO8601 timestamp that allows filtering for comments posted after the provided time. + */ + after?: Date | null | undefined; + /** + * Allows sorting comments by the time they were posted, ascending or descending. + */ + sort?: ListCommentsSort | null | undefined; + conversationId: string; +}; + +/** @internal */ +export const ListCommentsSort$inboundSchema: z.ZodNativeEnum< + typeof ListCommentsSort +> = z.nativeEnum(ListCommentsSort); + +/** @internal */ +export const ListCommentsSort$outboundSchema: z.ZodNativeEnum< + typeof ListCommentsSort +> = ListCommentsSort$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListCommentsSort$ { + /** @deprecated use `ListCommentsSort$inboundSchema` instead. */ + export const inboundSchema = ListCommentsSort$inboundSchema; + /** @deprecated use `ListCommentsSort$outboundSchema` instead. */ + export const outboundSchema = ListCommentsSort$outboundSchema; +} + +/** @internal */ +export const ListCommentsRequest$inboundSchema: z.ZodType< + ListCommentsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + before: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + after: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + sort: z.nullable(ListCommentsSort$inboundSchema.default("asc")), + conversation_id: z.string(), +}).transform((v) => { + return remap$(v, { + "conversation_id": "conversationId", + }); +}); + +/** @internal */ +export type ListCommentsRequest$Outbound = { + before?: string | null | undefined; + after?: string | null | undefined; + sort: string | null; + conversation_id: string; +}; + +/** @internal */ +export const ListCommentsRequest$outboundSchema: z.ZodType< + ListCommentsRequest$Outbound, + z.ZodTypeDef, + ListCommentsRequest +> = z.object({ + before: z.nullable(z.date().transform(v => v.toISOString())).optional(), + after: z.nullable(z.date().transform(v => v.toISOString())).optional(), + sort: z.nullable(ListCommentsSort$outboundSchema.default("asc")), + conversationId: z.string(), +}).transform((v) => { + return remap$(v, { + conversationId: "conversation_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListCommentsRequest$ { + /** @deprecated use `ListCommentsRequest$inboundSchema` instead. */ + export const inboundSchema = ListCommentsRequest$inboundSchema; + /** @deprecated use `ListCommentsRequest$outboundSchema` instead. */ + export const outboundSchema = ListCommentsRequest$outboundSchema; + /** @deprecated use `ListCommentsRequest$Outbound` instead. */ + export type Outbound = ListCommentsRequest$Outbound; +} + +export function listCommentsRequestToJSON( + listCommentsRequest: ListCommentsRequest, +): string { + return JSON.stringify( + ListCommentsRequest$outboundSchema.parse(listCommentsRequest), + ); +} + +export function listCommentsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListCommentsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListCommentsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listconfluencespaces.ts b/src/models/operations/listconfluencespaces.ts deleted file mode 100644 index 382a4cb9..00000000 --- a/src/models/operations/listconfluencespaces.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListConfluenceSpacesRequest = { - id: string; - /** - * Space Key - */ - keyword?: string | undefined; -}; - -/** @internal */ -export const ListConfluenceSpacesRequest$inboundSchema: z.ZodType< - ListConfluenceSpacesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - keyword: z.string().optional(), -}); - -/** @internal */ -export type ListConfluenceSpacesRequest$Outbound = { - id: string; - keyword?: string | undefined; -}; - -/** @internal */ -export const ListConfluenceSpacesRequest$outboundSchema: z.ZodType< - ListConfluenceSpacesRequest$Outbound, - z.ZodTypeDef, - ListConfluenceSpacesRequest -> = z.object({ - id: z.string(), - keyword: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListConfluenceSpacesRequest$ { - /** @deprecated use `ListConfluenceSpacesRequest$inboundSchema` instead. */ - export const inboundSchema = ListConfluenceSpacesRequest$inboundSchema; - /** @deprecated use `ListConfluenceSpacesRequest$outboundSchema` instead. */ - export const outboundSchema = ListConfluenceSpacesRequest$outboundSchema; - /** @deprecated use `ListConfluenceSpacesRequest$Outbound` instead. */ - export type Outbound = ListConfluenceSpacesRequest$Outbound; -} - -export function listConfluenceSpacesRequestToJSON( - listConfluenceSpacesRequest: ListConfluenceSpacesRequest, -): string { - return JSON.stringify( - ListConfluenceSpacesRequest$outboundSchema.parse( - listConfluenceSpacesRequest, - ), - ); -} - -export function listConfluenceSpacesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListConfluenceSpacesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListConfluenceSpacesRequest' from JSON`, - ); -} diff --git a/src/models/operations/listconnections.ts b/src/models/operations/listconnections.ts new file mode 100644 index 00000000..149e5cd9 --- /dev/null +++ b/src/models/operations/listconnections.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListConnectionsRequest = { + /** + * Only return installed integrations with the supplied slugs (types). + */ + integrationSlug?: string | null | undefined; +}; + +/** @internal */ +export const ListConnectionsRequest$inboundSchema: z.ZodType< + ListConnectionsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + }); +}); + +/** @internal */ +export type ListConnectionsRequest$Outbound = { + integration_slug?: string | null | undefined; +}; + +/** @internal */ +export const ListConnectionsRequest$outboundSchema: z.ZodType< + ListConnectionsRequest$Outbound, + z.ZodTypeDef, + ListConnectionsRequest +> = z.object({ + integrationSlug: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListConnectionsRequest$ { + /** @deprecated use `ListConnectionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListConnectionsRequest$inboundSchema; + /** @deprecated use `ListConnectionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListConnectionsRequest$outboundSchema; + /** @deprecated use `ListConnectionsRequest$Outbound` instead. */ + export type Outbound = ListConnectionsRequest$Outbound; +} + +export function listConnectionsRequestToJSON( + listConnectionsRequest: ListConnectionsRequest, +): string { + return JSON.stringify( + ListConnectionsRequest$outboundSchema.parse(listConnectionsRequest), + ); +} + +export function listConnectionsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListConnectionsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListConnectionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listconnectionstatusesbyslug.ts b/src/models/operations/listconnectionstatusesbyslug.ts new file mode 100644 index 00000000..168486ae --- /dev/null +++ b/src/models/operations/listconnectionstatusesbyslug.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListConnectionStatusesBySlugRequest = { + slug: string; +}; + +/** @internal */ +export const ListConnectionStatusesBySlugRequest$inboundSchema: z.ZodType< + ListConnectionStatusesBySlugRequest, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.string(), +}); + +/** @internal */ +export type ListConnectionStatusesBySlugRequest$Outbound = { + slug: string; +}; + +/** @internal */ +export const ListConnectionStatusesBySlugRequest$outboundSchema: z.ZodType< + ListConnectionStatusesBySlugRequest$Outbound, + z.ZodTypeDef, + ListConnectionStatusesBySlugRequest +> = z.object({ + slug: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListConnectionStatusesBySlugRequest$ { + /** @deprecated use `ListConnectionStatusesBySlugRequest$inboundSchema` instead. */ + export const inboundSchema = + ListConnectionStatusesBySlugRequest$inboundSchema; + /** @deprecated use `ListConnectionStatusesBySlugRequest$outboundSchema` instead. */ + export const outboundSchema = + ListConnectionStatusesBySlugRequest$outboundSchema; + /** @deprecated use `ListConnectionStatusesBySlugRequest$Outbound` instead. */ + export type Outbound = ListConnectionStatusesBySlugRequest$Outbound; +} + +export function listConnectionStatusesBySlugRequestToJSON( + listConnectionStatusesBySlugRequest: ListConnectionStatusesBySlugRequest, +): string { + return JSON.stringify( + ListConnectionStatusesBySlugRequest$outboundSchema.parse( + listConnectionStatusesBySlugRequest, + ), + ); +} + +export function listConnectionStatusesBySlugRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListConnectionStatusesBySlugRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListConnectionStatusesBySlugRequest' from JSON`, + ); +} diff --git a/src/models/operations/listconnectionstatusesbyslugandid.ts b/src/models/operations/listconnectionstatusesbyslugandid.ts new file mode 100644 index 00000000..23089aa3 --- /dev/null +++ b/src/models/operations/listconnectionstatusesbyslugandid.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListConnectionStatusesBySlugAndIdRequest = { + slug: string; + byConnectionId: string; +}; + +/** @internal */ +export const ListConnectionStatusesBySlugAndIdRequest$inboundSchema: z.ZodType< + ListConnectionStatusesBySlugAndIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.string(), + by_connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "by_connection_id": "byConnectionId", + }); +}); + +/** @internal */ +export type ListConnectionStatusesBySlugAndIdRequest$Outbound = { + slug: string; + by_connection_id: string; +}; + +/** @internal */ +export const ListConnectionStatusesBySlugAndIdRequest$outboundSchema: z.ZodType< + ListConnectionStatusesBySlugAndIdRequest$Outbound, + z.ZodTypeDef, + ListConnectionStatusesBySlugAndIdRequest +> = z.object({ + slug: z.string(), + byConnectionId: z.string(), +}).transform((v) => { + return remap$(v, { + byConnectionId: "by_connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListConnectionStatusesBySlugAndIdRequest$ { + /** @deprecated use `ListConnectionStatusesBySlugAndIdRequest$inboundSchema` instead. */ + export const inboundSchema = + ListConnectionStatusesBySlugAndIdRequest$inboundSchema; + /** @deprecated use `ListConnectionStatusesBySlugAndIdRequest$outboundSchema` instead. */ + export const outboundSchema = + ListConnectionStatusesBySlugAndIdRequest$outboundSchema; + /** @deprecated use `ListConnectionStatusesBySlugAndIdRequest$Outbound` instead. */ + export type Outbound = ListConnectionStatusesBySlugAndIdRequest$Outbound; +} + +export function listConnectionStatusesBySlugAndIdRequestToJSON( + listConnectionStatusesBySlugAndIdRequest: + ListConnectionStatusesBySlugAndIdRequest, +): string { + return JSON.stringify( + ListConnectionStatusesBySlugAndIdRequest$outboundSchema.parse( + listConnectionStatusesBySlugAndIdRequest, + ), + ); +} + +export function listConnectionStatusesBySlugAndIdRequestFromJSON( + jsonString: string, +): SafeParseResult< + ListConnectionStatusesBySlugAndIdRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ListConnectionStatusesBySlugAndIdRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ListConnectionStatusesBySlugAndIdRequest' from JSON`, + ); +} diff --git a/src/models/operations/listconversationcommentreactions.ts b/src/models/operations/listconversationcommentreactions.ts deleted file mode 100644 index 5fe9e242..00000000 --- a/src/models/operations/listconversationcommentreactions.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListConversationCommentReactionsRequest = { - conversationId: string; - commentId: string; -}; - -/** @internal */ -export const ListConversationCommentReactionsRequest$inboundSchema: z.ZodType< - ListConversationCommentReactionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - conversation_id: z.string(), - comment_id: z.string(), -}).transform((v) => { - return remap$(v, { - "conversation_id": "conversationId", - "comment_id": "commentId", - }); -}); - -/** @internal */ -export type ListConversationCommentReactionsRequest$Outbound = { - conversation_id: string; - comment_id: string; -}; - -/** @internal */ -export const ListConversationCommentReactionsRequest$outboundSchema: z.ZodType< - ListConversationCommentReactionsRequest$Outbound, - z.ZodTypeDef, - ListConversationCommentReactionsRequest -> = z.object({ - conversationId: z.string(), - commentId: z.string(), -}).transform((v) => { - return remap$(v, { - conversationId: "conversation_id", - commentId: "comment_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListConversationCommentReactionsRequest$ { - /** @deprecated use `ListConversationCommentReactionsRequest$inboundSchema` instead. */ - export const inboundSchema = - ListConversationCommentReactionsRequest$inboundSchema; - /** @deprecated use `ListConversationCommentReactionsRequest$outboundSchema` instead. */ - export const outboundSchema = - ListConversationCommentReactionsRequest$outboundSchema; - /** @deprecated use `ListConversationCommentReactionsRequest$Outbound` instead. */ - export type Outbound = ListConversationCommentReactionsRequest$Outbound; -} - -export function listConversationCommentReactionsRequestToJSON( - listConversationCommentReactionsRequest: - ListConversationCommentReactionsRequest, -): string { - return JSON.stringify( - ListConversationCommentReactionsRequest$outboundSchema.parse( - listConversationCommentReactionsRequest, - ), - ); -} - -export function listConversationCommentReactionsRequestFromJSON( - jsonString: string, -): SafeParseResult< - ListConversationCommentReactionsRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - ListConversationCommentReactionsRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'ListConversationCommentReactionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listconversationcomments.ts b/src/models/operations/listconversationcomments.ts deleted file mode 100644 index 7f97f22c..00000000 --- a/src/models/operations/listconversationcomments.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Allows sorting comments by the time they were posted, ascending or descending. - */ -export const Sort = { - Asc: "asc", - Desc: "desc", -} as const; -/** - * Allows sorting comments by the time they were posted, ascending or descending. - */ -export type Sort = ClosedEnum; - -export type ListConversationCommentsRequest = { - /** - * An ISO8601 timestamp that allows filtering for comments posted before the provided time. - */ - before?: Date | undefined; - /** - * An ISO8601 timestamp that allows filtering for comments posted after the provided time. - */ - after?: Date | undefined; - /** - * Allows sorting comments by the time they were posted, ascending or descending. - */ - sort?: Sort | undefined; - conversationId: string; -}; - -/** @internal */ -export const Sort$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Sort, -); - -/** @internal */ -export const Sort$outboundSchema: z.ZodNativeEnum = - Sort$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Sort$ { - /** @deprecated use `Sort$inboundSchema` instead. */ - export const inboundSchema = Sort$inboundSchema; - /** @deprecated use `Sort$outboundSchema` instead. */ - export const outboundSchema = Sort$outboundSchema; -} - -/** @internal */ -export const ListConversationCommentsRequest$inboundSchema: z.ZodType< - ListConversationCommentsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - before: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - after: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - sort: Sort$inboundSchema.default("asc"), - conversation_id: z.string(), -}).transform((v) => { - return remap$(v, { - "conversation_id": "conversationId", - }); -}); - -/** @internal */ -export type ListConversationCommentsRequest$Outbound = { - before?: string | undefined; - after?: string | undefined; - sort: string; - conversation_id: string; -}; - -/** @internal */ -export const ListConversationCommentsRequest$outboundSchema: z.ZodType< - ListConversationCommentsRequest$Outbound, - z.ZodTypeDef, - ListConversationCommentsRequest -> = z.object({ - before: z.date().transform(v => v.toISOString()).optional(), - after: z.date().transform(v => v.toISOString()).optional(), - sort: Sort$outboundSchema.default("asc"), - conversationId: z.string(), -}).transform((v) => { - return remap$(v, { - conversationId: "conversation_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListConversationCommentsRequest$ { - /** @deprecated use `ListConversationCommentsRequest$inboundSchema` instead. */ - export const inboundSchema = ListConversationCommentsRequest$inboundSchema; - /** @deprecated use `ListConversationCommentsRequest$outboundSchema` instead. */ - export const outboundSchema = ListConversationCommentsRequest$outboundSchema; - /** @deprecated use `ListConversationCommentsRequest$Outbound` instead. */ - export type Outbound = ListConversationCommentsRequest$Outbound; -} - -export function listConversationCommentsRequestToJSON( - listConversationCommentsRequest: ListConversationCommentsRequest, -): string { - return JSON.stringify( - ListConversationCommentsRequest$outboundSchema.parse( - listConversationCommentsRequest, - ), - ); -} - -export function listConversationCommentsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListConversationCommentsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListConversationCommentsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listcustomfieldselectoptions.ts b/src/models/operations/listcustomfieldselectoptions.ts new file mode 100644 index 00000000..24f9c35a --- /dev/null +++ b/src/models/operations/listcustomfieldselectoptions.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListCustomFieldSelectOptionsRequest = { + fieldId: string; + /** + * Text string of a query for filtering values. + */ + query?: string | null | undefined; + /** + * If true, return all versions of the custom field definition. + */ + allVersions?: boolean | null | undefined; +}; + +/** @internal */ +export const ListCustomFieldSelectOptionsRequest$inboundSchema: z.ZodType< + ListCustomFieldSelectOptionsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + field_id: z.string(), + query: z.nullable(z.string()).optional(), + all_versions: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "field_id": "fieldId", + "all_versions": "allVersions", + }); +}); + +/** @internal */ +export type ListCustomFieldSelectOptionsRequest$Outbound = { + field_id: string; + query?: string | null | undefined; + all_versions?: boolean | null | undefined; +}; + +/** @internal */ +export const ListCustomFieldSelectOptionsRequest$outboundSchema: z.ZodType< + ListCustomFieldSelectOptionsRequest$Outbound, + z.ZodTypeDef, + ListCustomFieldSelectOptionsRequest +> = z.object({ + fieldId: z.string(), + query: z.nullable(z.string()).optional(), + allVersions: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + fieldId: "field_id", + allVersions: "all_versions", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListCustomFieldSelectOptionsRequest$ { + /** @deprecated use `ListCustomFieldSelectOptionsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListCustomFieldSelectOptionsRequest$inboundSchema; + /** @deprecated use `ListCustomFieldSelectOptionsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListCustomFieldSelectOptionsRequest$outboundSchema; + /** @deprecated use `ListCustomFieldSelectOptionsRequest$Outbound` instead. */ + export type Outbound = ListCustomFieldSelectOptionsRequest$Outbound; +} + +export function listCustomFieldSelectOptionsRequestToJSON( + listCustomFieldSelectOptionsRequest: ListCustomFieldSelectOptionsRequest, +): string { + return JSON.stringify( + ListCustomFieldSelectOptionsRequest$outboundSchema.parse( + listCustomFieldSelectOptionsRequest, + ), + ); +} + +export function listCustomFieldSelectOptionsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListCustomFieldSelectOptionsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListCustomFieldSelectOptionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listemailsubscribers.ts b/src/models/operations/listemailsubscribers.ts new file mode 100644 index 00000000..f83a174f --- /dev/null +++ b/src/models/operations/listemailsubscribers.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListEmailSubscribersRequest = { + nuncConnectionId: string; +}; + +/** @internal */ +export const ListEmailSubscribersRequest$inboundSchema: z.ZodType< + ListEmailSubscribersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + }); +}); + +/** @internal */ +export type ListEmailSubscribersRequest$Outbound = { + nunc_connection_id: string; +}; + +/** @internal */ +export const ListEmailSubscribersRequest$outboundSchema: z.ZodType< + ListEmailSubscribersRequest$Outbound, + z.ZodTypeDef, + ListEmailSubscribersRequest +> = z.object({ + nuncConnectionId: z.string(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListEmailSubscribersRequest$ { + /** @deprecated use `ListEmailSubscribersRequest$inboundSchema` instead. */ + export const inboundSchema = ListEmailSubscribersRequest$inboundSchema; + /** @deprecated use `ListEmailSubscribersRequest$outboundSchema` instead. */ + export const outboundSchema = ListEmailSubscribersRequest$outboundSchema; + /** @deprecated use `ListEmailSubscribersRequest$Outbound` instead. */ + export type Outbound = ListEmailSubscribersRequest$Outbound; +} + +export function listEmailSubscribersRequestToJSON( + listEmailSubscribersRequest: ListEmailSubscribersRequest, +): string { + return JSON.stringify( + ListEmailSubscribersRequest$outboundSchema.parse( + listEmailSubscribersRequest, + ), + ); +} + +export function listEmailSubscribersRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListEmailSubscribersRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListEmailSubscribersRequest' from JSON`, + ); +} diff --git a/src/models/operations/listentitlements.ts b/src/models/operations/listentitlements.ts index 902b7861..2f2497f2 100644 --- a/src/models/operations/listentitlements.ts +++ b/src/models/operations/listentitlements.ts @@ -11,44 +11,45 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Type of Entitlement */ -export const Type = { +export const ListEntitlementsType = { Quota: "quota", Access: "access", } as const; /** * Type of Entitlement */ -export type Type = ClosedEnum; +export type ListEntitlementsType = ClosedEnum; export type ListEntitlementsRequest = { /** * Name of Entitlement */ - name?: string | undefined; + name?: string | null | undefined; /** * Type of Entitlement */ - type?: Type | undefined; + type?: ListEntitlementsType | null | undefined; }; /** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( - Type, -); +export const ListEntitlementsType$inboundSchema: z.ZodNativeEnum< + typeof ListEntitlementsType +> = z.nativeEnum(ListEntitlementsType); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = - Type$inboundSchema; +export const ListEntitlementsType$outboundSchema: z.ZodNativeEnum< + typeof ListEntitlementsType +> = ListEntitlementsType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; +export namespace ListEntitlementsType$ { + /** @deprecated use `ListEntitlementsType$inboundSchema` instead. */ + export const inboundSchema = ListEntitlementsType$inboundSchema; + /** @deprecated use `ListEntitlementsType$outboundSchema` instead. */ + export const outboundSchema = ListEntitlementsType$outboundSchema; } /** @internal */ @@ -57,14 +58,14 @@ export const ListEntitlementsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - name: z.string().optional(), - type: Type$inboundSchema.optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(ListEntitlementsType$inboundSchema).optional(), }); /** @internal */ export type ListEntitlementsRequest$Outbound = { - name?: string | undefined; - type?: string | undefined; + name?: string | null | undefined; + type?: string | null | undefined; }; /** @internal */ @@ -73,8 +74,8 @@ export const ListEntitlementsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListEntitlementsRequest > = z.object({ - name: z.string().optional(), - type: Type$outboundSchema.optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(ListEntitlementsType$outboundSchema).optional(), }); /** diff --git a/src/models/operations/listenvironments.ts b/src/models/operations/listenvironments.ts index d6218dbd..8fe71984 100644 --- a/src/models/operations/listenvironments.ts +++ b/src/models/operations/listenvironments.ts @@ -9,16 +9,16 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListEnvironmentsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A query to search environments by their name or description */ - query?: string | undefined; + query?: string | null | undefined; /** * A query to search environments by their name */ - name?: string | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -27,10 +27,10 @@ export const ListEnvironmentsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - query: z.string().optional(), - name: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -39,10 +39,10 @@ export const ListEnvironmentsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListEnvironmentsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - query?: string | undefined; - name?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + query?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -51,10 +51,10 @@ export const ListEnvironmentsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListEnvironmentsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - query: z.string().optional(), - name: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listfieldmapavailablefields.ts b/src/models/operations/listfieldmapavailablefields.ts new file mode 100644 index 00000000..3a6ad063 --- /dev/null +++ b/src/models/operations/listfieldmapavailablefields.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListFieldMapAvailableFieldsRequest = { + fieldMapId: string; +}; + +/** @internal */ +export const ListFieldMapAvailableFieldsRequest$inboundSchema: z.ZodType< + ListFieldMapAvailableFieldsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + field_map_id: z.string(), +}).transform((v) => { + return remap$(v, { + "field_map_id": "fieldMapId", + }); +}); + +/** @internal */ +export type ListFieldMapAvailableFieldsRequest$Outbound = { + field_map_id: string; +}; + +/** @internal */ +export const ListFieldMapAvailableFieldsRequest$outboundSchema: z.ZodType< + ListFieldMapAvailableFieldsRequest$Outbound, + z.ZodTypeDef, + ListFieldMapAvailableFieldsRequest +> = z.object({ + fieldMapId: z.string(), +}).transform((v) => { + return remap$(v, { + fieldMapId: "field_map_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListFieldMapAvailableFieldsRequest$ { + /** @deprecated use `ListFieldMapAvailableFieldsRequest$inboundSchema` instead. */ + export const inboundSchema = ListFieldMapAvailableFieldsRequest$inboundSchema; + /** @deprecated use `ListFieldMapAvailableFieldsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListFieldMapAvailableFieldsRequest$outboundSchema; + /** @deprecated use `ListFieldMapAvailableFieldsRequest$Outbound` instead. */ + export type Outbound = ListFieldMapAvailableFieldsRequest$Outbound; +} + +export function listFieldMapAvailableFieldsRequestToJSON( + listFieldMapAvailableFieldsRequest: ListFieldMapAvailableFieldsRequest, +): string { + return JSON.stringify( + ListFieldMapAvailableFieldsRequest$outboundSchema.parse( + listFieldMapAvailableFieldsRequest, + ), + ); +} + +export function listFieldMapAvailableFieldsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListFieldMapAvailableFieldsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListFieldMapAvailableFieldsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listfunctionalities.ts b/src/models/operations/listfunctionalities.ts index 1a506ffc..7f1b8991 100644 --- a/src/models/operations/listfunctionalities.ts +++ b/src/models/operations/listfunctionalities.ts @@ -12,29 +12,29 @@ export type ListFunctionalitiesRequest = { /** * A query to search functionalities by their name or description */ - query?: string | undefined; + query?: string | null | undefined; /** * A query to search functionalities by their name */ - name?: string | undefined; + name?: string | null | undefined; /** * A query to search services by if they are impacted with active incidents */ - impacted?: string | undefined; + impacted?: string | null | undefined; /** * A comma separated list of label key / values in the format of 'key=value,key2=value2'. To filter change events that have a key (with no specific value), omit the value */ - labels?: string | undefined; + labels?: string | null | undefined; /** * A query to search functionalities by their owning team ID */ - owner?: string | undefined; + owner?: string | null | undefined; /** * Boolean to determine whether to return a slimified version of the functionalities object */ - lite?: boolean | undefined; - page?: number | undefined; - perPage?: number | undefined; + lite?: boolean | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -43,14 +43,14 @@ export const ListFunctionalitiesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - query: z.string().optional(), - name: z.string().optional(), - impacted: z.string().optional(), - labels: z.string().optional(), - owner: z.string().optional(), - lite: z.boolean().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + impacted: z.nullable(z.string()).optional(), + labels: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -59,14 +59,14 @@ export const ListFunctionalitiesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListFunctionalitiesRequest$Outbound = { - query?: string | undefined; - name?: string | undefined; - impacted?: string | undefined; - labels?: string | undefined; - owner?: string | undefined; - lite?: boolean | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + name?: string | null | undefined; + impacted?: string | null | undefined; + labels?: string | null | undefined; + owner?: string | null | undefined; + lite?: boolean | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -75,14 +75,14 @@ export const ListFunctionalitiesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListFunctionalitiesRequest > = z.object({ - query: z.string().optional(), - name: z.string().optional(), - impacted: z.string().optional(), - labels: z.string().optional(), - owner: z.string().optional(), - lite: z.boolean().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + impacted: z.nullable(z.string()).optional(), + labels: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listfunctionalityservices.ts b/src/models/operations/listfunctionalityservices.ts new file mode 100644 index 00000000..d74123e7 --- /dev/null +++ b/src/models/operations/listfunctionalityservices.ts @@ -0,0 +1,77 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListFunctionalityServicesRequest = { + functionalityId: string; +}; + +/** @internal */ +export const ListFunctionalityServicesRequest$inboundSchema: z.ZodType< + ListFunctionalityServicesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + functionality_id: z.string(), +}).transform((v) => { + return remap$(v, { + "functionality_id": "functionalityId", + }); +}); + +/** @internal */ +export type ListFunctionalityServicesRequest$Outbound = { + functionality_id: string; +}; + +/** @internal */ +export const ListFunctionalityServicesRequest$outboundSchema: z.ZodType< + ListFunctionalityServicesRequest$Outbound, + z.ZodTypeDef, + ListFunctionalityServicesRequest +> = z.object({ + functionalityId: z.string(), +}).transform((v) => { + return remap$(v, { + functionalityId: "functionality_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListFunctionalityServicesRequest$ { + /** @deprecated use `ListFunctionalityServicesRequest$inboundSchema` instead. */ + export const inboundSchema = ListFunctionalityServicesRequest$inboundSchema; + /** @deprecated use `ListFunctionalityServicesRequest$outboundSchema` instead. */ + export const outboundSchema = ListFunctionalityServicesRequest$outboundSchema; + /** @deprecated use `ListFunctionalityServicesRequest$Outbound` instead. */ + export type Outbound = ListFunctionalityServicesRequest$Outbound; +} + +export function listFunctionalityServicesRequestToJSON( + listFunctionalityServicesRequest: ListFunctionalityServicesRequest, +): string { + return JSON.stringify( + ListFunctionalityServicesRequest$outboundSchema.parse( + listFunctionalityServicesRequest, + ), + ); +} + +export function listFunctionalityServicesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListFunctionalityServicesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListFunctionalityServicesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listinboundfieldmaps.ts b/src/models/operations/listinboundfieldmaps.ts new file mode 100644 index 00000000..fe34404e --- /dev/null +++ b/src/models/operations/listinboundfieldmaps.ts @@ -0,0 +1,128 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Filter by ticket type. Values: incident, follow_up + */ +export const TicketType = { + Incident: "incident", + FollowUp: "follow_up", +} as const; +/** + * Filter by ticket type. Values: incident, follow_up + */ +export type TicketType = ClosedEnum; + +export type ListInboundFieldMapsRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; + /** + * Filter by ticket type. Values: incident, follow_up + */ + ticketType?: TicketType | null | undefined; + ticketingProjectId: string; +}; + +/** @internal */ +export const TicketType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(TicketType); + +/** @internal */ +export const TicketType$outboundSchema: z.ZodNativeEnum = + TicketType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TicketType$ { + /** @deprecated use `TicketType$inboundSchema` instead. */ + export const inboundSchema = TicketType$inboundSchema; + /** @deprecated use `TicketType$outboundSchema` instead. */ + export const outboundSchema = TicketType$outboundSchema; +} + +/** @internal */ +export const ListInboundFieldMapsRequest$inboundSchema: z.ZodType< + ListInboundFieldMapsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + ticket_type: z.nullable(TicketType$inboundSchema).optional(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + "ticket_type": "ticketType", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type ListInboundFieldMapsRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; + ticket_type?: string | null | undefined; + ticketing_project_id: string; +}; + +/** @internal */ +export const ListInboundFieldMapsRequest$outboundSchema: z.ZodType< + ListInboundFieldMapsRequest$Outbound, + z.ZodTypeDef, + ListInboundFieldMapsRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + ticketType: z.nullable(TicketType$outboundSchema).optional(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + ticketType: "ticket_type", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListInboundFieldMapsRequest$ { + /** @deprecated use `ListInboundFieldMapsRequest$inboundSchema` instead. */ + export const inboundSchema = ListInboundFieldMapsRequest$inboundSchema; + /** @deprecated use `ListInboundFieldMapsRequest$outboundSchema` instead. */ + export const outboundSchema = ListInboundFieldMapsRequest$outboundSchema; + /** @deprecated use `ListInboundFieldMapsRequest$Outbound` instead. */ + export type Outbound = ListInboundFieldMapsRequest$Outbound; +} + +export function listInboundFieldMapsRequestToJSON( + listInboundFieldMapsRequest: ListInboundFieldMapsRequest, +): string { + return JSON.stringify( + ListInboundFieldMapsRequest$outboundSchema.parse( + listInboundFieldMapsRequest, + ), + ); +} + +export function listInboundFieldMapsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListInboundFieldMapsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListInboundFieldMapsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listincidentattachments.ts b/src/models/operations/listincidentattachments.ts index 16e18f98..94794a82 100644 --- a/src/models/operations/listincidentattachments.ts +++ b/src/models/operations/listincidentattachments.ts @@ -10,9 +10,9 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListIncidentAttachmentsRequest = { incidentId: string; - attachableType?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + attachableType?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -22,9 +22,9 @@ export const ListIncidentAttachmentsRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - attachable_type: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + attachable_type: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", @@ -36,9 +36,9 @@ export const ListIncidentAttachmentsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentAttachmentsRequest$Outbound = { incident_id: string; - attachable_type?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + attachable_type?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -48,9 +48,9 @@ export const ListIncidentAttachmentsRequest$outboundSchema: z.ZodType< ListIncidentAttachmentsRequest > = z.object({ incidentId: z.string(), - attachableType: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + attachableType: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { incidentId: "incident_id", diff --git a/src/models/operations/listincidentchangeevents.ts b/src/models/operations/listincidentchangeevents.ts new file mode 100644 index 00000000..2395cb63 --- /dev/null +++ b/src/models/operations/listincidentchangeevents.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The type of the relation to the incident + */ +export const ListIncidentChangeEventsType = { + Caused: "caused", + Fixed: "fixed", + Suspect: "suspect", + Dismissed: "dismissed", +} as const; +/** + * The type of the relation to the incident + */ +export type ListIncidentChangeEventsType = ClosedEnum< + typeof ListIncidentChangeEventsType +>; + +export type ListIncidentChangeEventsRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; + /** + * The type of the relation to the incident + */ + type?: ListIncidentChangeEventsType | null | undefined; + incidentId: string; +}; + +/** @internal */ +export const ListIncidentChangeEventsType$inboundSchema: z.ZodNativeEnum< + typeof ListIncidentChangeEventsType +> = z.nativeEnum(ListIncidentChangeEventsType); + +/** @internal */ +export const ListIncidentChangeEventsType$outboundSchema: z.ZodNativeEnum< + typeof ListIncidentChangeEventsType +> = ListIncidentChangeEventsType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListIncidentChangeEventsType$ { + /** @deprecated use `ListIncidentChangeEventsType$inboundSchema` instead. */ + export const inboundSchema = ListIncidentChangeEventsType$inboundSchema; + /** @deprecated use `ListIncidentChangeEventsType$outboundSchema` instead. */ + export const outboundSchema = ListIncidentChangeEventsType$outboundSchema; +} + +/** @internal */ +export const ListIncidentChangeEventsRequest$inboundSchema: z.ZodType< + ListIncidentChangeEventsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + type: z.nullable(ListIncidentChangeEventsType$inboundSchema).optional(), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type ListIncidentChangeEventsRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; + type?: string | null | undefined; + incident_id: string; +}; + +/** @internal */ +export const ListIncidentChangeEventsRequest$outboundSchema: z.ZodType< + ListIncidentChangeEventsRequest$Outbound, + z.ZodTypeDef, + ListIncidentChangeEventsRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + type: z.nullable(ListIncidentChangeEventsType$outboundSchema).optional(), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListIncidentChangeEventsRequest$ { + /** @deprecated use `ListIncidentChangeEventsRequest$inboundSchema` instead. */ + export const inboundSchema = ListIncidentChangeEventsRequest$inboundSchema; + /** @deprecated use `ListIncidentChangeEventsRequest$outboundSchema` instead. */ + export const outboundSchema = ListIncidentChangeEventsRequest$outboundSchema; + /** @deprecated use `ListIncidentChangeEventsRequest$Outbound` instead. */ + export type Outbound = ListIncidentChangeEventsRequest$Outbound; +} + +export function listIncidentChangeEventsRequestToJSON( + listIncidentChangeEventsRequest: ListIncidentChangeEventsRequest, +): string { + return JSON.stringify( + ListIncidentChangeEventsRequest$outboundSchema.parse( + listIncidentChangeEventsRequest, + ), + ); +} + +export function listIncidentChangeEventsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListIncidentChangeEventsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListIncidentChangeEventsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listincidentconferencebridges.ts b/src/models/operations/listincidentconferencebridges.ts new file mode 100644 index 00000000..b3957bc5 --- /dev/null +++ b/src/models/operations/listincidentconferencebridges.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListIncidentConferenceBridgesRequest = { + incidentId: string; +}; + +/** @internal */ +export const ListIncidentConferenceBridgesRequest$inboundSchema: z.ZodType< + ListIncidentConferenceBridgesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type ListIncidentConferenceBridgesRequest$Outbound = { + incident_id: string; +}; + +/** @internal */ +export const ListIncidentConferenceBridgesRequest$outboundSchema: z.ZodType< + ListIncidentConferenceBridgesRequest$Outbound, + z.ZodTypeDef, + ListIncidentConferenceBridgesRequest +> = z.object({ + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListIncidentConferenceBridgesRequest$ { + /** @deprecated use `ListIncidentConferenceBridgesRequest$inboundSchema` instead. */ + export const inboundSchema = + ListIncidentConferenceBridgesRequest$inboundSchema; + /** @deprecated use `ListIncidentConferenceBridgesRequest$outboundSchema` instead. */ + export const outboundSchema = + ListIncidentConferenceBridgesRequest$outboundSchema; + /** @deprecated use `ListIncidentConferenceBridgesRequest$Outbound` instead. */ + export type Outbound = ListIncidentConferenceBridgesRequest$Outbound; +} + +export function listIncidentConferenceBridgesRequestToJSON( + listIncidentConferenceBridgesRequest: ListIncidentConferenceBridgesRequest, +): string { + return JSON.stringify( + ListIncidentConferenceBridgesRequest$outboundSchema.parse( + listIncidentConferenceBridgesRequest, + ), + ); +} + +export function listIncidentConferenceBridgesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListIncidentConferenceBridgesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListIncidentConferenceBridgesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listincidentevents.ts b/src/models/operations/listincidentevents.ts index 26efa650..cde48765 100644 --- a/src/models/operations/listincidentevents.ts +++ b/src/models/operations/listincidentevents.ts @@ -11,11 +11,35 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListIncidentEventsRequest = { incidentId: string; /** - * A comma separated list of types of events to filter by + * A comma separated list of types of events to filter by. Possible values are: + * + * @remarks + * - `add_task_list`: Task list was added + * - `alert_event`: Someone was paged or took action on a linked alert + * - `alert_linked`: An alert was linked to the incident + * - `bulk_milestone_update`: When a milestone change occurs with no other changes + * - `bulk_update`: When an incident note/update is posted or when impacted components are updated. If other changes occur together with either of these changes (e.g., milestone change), they are all bundled together into a bulk_update + * - `change_type`: Updates to associated change events + * - `chat_message`: Any chat message event in a linked chat app like Slack or MS Teams + * - `children_changed`: When adding or updating child related incidents + * - `external_link`: When an external link is added or updated + * - `general_update`: Currently only describes Runbook stoppage events + * - `generic_chat_message`: When an event or message is manually added to the timeline via the web UI or API + * - `incident_attachment`: When attachments or files are added to the timeline + * - `generic_resource_change`: Any changes to individual fields within the incident, including custom fields + * - `incident_restriction`: When an incident is converted to private + * - `incident_status`: Only used when an incident starts and changes to an `active` state + * - `note`: When a message is posted to a status page directly and not via `/fh update` + * - `role_update`: Any updates to assigned roles + * - `runbook_attachment`: Any updates to a runbook + * - `runbook_step_execution_update`: Any Runbook step events + * - `task_update`: Task update events + * - `team_assignment`: Team assignment events + * - `ticket_update`: Updates to incident and follow-up tickets */ - types?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + types?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -25,9 +49,9 @@ export const ListIncidentEventsRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - types: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + types: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", @@ -38,9 +62,9 @@ export const ListIncidentEventsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentEventsRequest$Outbound = { incident_id: string; - types?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + types?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -50,9 +74,9 @@ export const ListIncidentEventsRequest$outboundSchema: z.ZodType< ListIncidentEventsRequest > = z.object({ incidentId: z.string(), - types: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + types: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { incidentId: "incident_id", diff --git a/src/models/operations/listincidentimpact.ts b/src/models/operations/listincidentimpact.ts deleted file mode 100644 index 835b6e08..00000000 --- a/src/models/operations/listincidentimpact.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const PathParamType = { - Environments: "environments", - Functionalities: "functionalities", - Services: "services", - Customers: "customers", -} as const; -export type PathParamType = ClosedEnum; - -export type ListIncidentImpactRequest = { - incidentId: string; - type: PathParamType; -}; - -/** @internal */ -export const PathParamType$inboundSchema: z.ZodNativeEnum< - typeof PathParamType -> = z.nativeEnum(PathParamType); - -/** @internal */ -export const PathParamType$outboundSchema: z.ZodNativeEnum< - typeof PathParamType -> = PathParamType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PathParamType$ { - /** @deprecated use `PathParamType$inboundSchema` instead. */ - export const inboundSchema = PathParamType$inboundSchema; - /** @deprecated use `PathParamType$outboundSchema` instead. */ - export const outboundSchema = PathParamType$outboundSchema; -} - -/** @internal */ -export const ListIncidentImpactRequest$inboundSchema: z.ZodType< - ListIncidentImpactRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - type: PathParamType$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type ListIncidentImpactRequest$Outbound = { - incident_id: string; - type: string; -}; - -/** @internal */ -export const ListIncidentImpactRequest$outboundSchema: z.ZodType< - ListIncidentImpactRequest$Outbound, - z.ZodTypeDef, - ListIncidentImpactRequest -> = z.object({ - incidentId: z.string(), - type: PathParamType$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListIncidentImpactRequest$ { - /** @deprecated use `ListIncidentImpactRequest$inboundSchema` instead. */ - export const inboundSchema = ListIncidentImpactRequest$inboundSchema; - /** @deprecated use `ListIncidentImpactRequest$outboundSchema` instead. */ - export const outboundSchema = ListIncidentImpactRequest$outboundSchema; - /** @deprecated use `ListIncidentImpactRequest$Outbound` instead. */ - export type Outbound = ListIncidentImpactRequest$Outbound; -} - -export function listIncidentImpactRequestToJSON( - listIncidentImpactRequest: ListIncidentImpactRequest, -): string { - return JSON.stringify( - ListIncidentImpactRequest$outboundSchema.parse(listIncidentImpactRequest), - ); -} - -export function listIncidentImpactRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListIncidentImpactRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListIncidentImpactRequest' from JSON`, - ); -} diff --git a/src/models/operations/listincidentimpacts.ts b/src/models/operations/listincidentimpacts.ts new file mode 100644 index 00000000..3910f8ba --- /dev/null +++ b/src/models/operations/listincidentimpacts.ts @@ -0,0 +1,111 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const ListIncidentImpactsType = { + Environments: "environments", + Functionalities: "functionalities", + Services: "services", + Customers: "customers", +} as const; +export type ListIncidentImpactsType = ClosedEnum< + typeof ListIncidentImpactsType +>; + +export type ListIncidentImpactsRequest = { + incidentId: string; + type: ListIncidentImpactsType; +}; + +/** @internal */ +export const ListIncidentImpactsType$inboundSchema: z.ZodNativeEnum< + typeof ListIncidentImpactsType +> = z.nativeEnum(ListIncidentImpactsType); + +/** @internal */ +export const ListIncidentImpactsType$outboundSchema: z.ZodNativeEnum< + typeof ListIncidentImpactsType +> = ListIncidentImpactsType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListIncidentImpactsType$ { + /** @deprecated use `ListIncidentImpactsType$inboundSchema` instead. */ + export const inboundSchema = ListIncidentImpactsType$inboundSchema; + /** @deprecated use `ListIncidentImpactsType$outboundSchema` instead. */ + export const outboundSchema = ListIncidentImpactsType$outboundSchema; +} + +/** @internal */ +export const ListIncidentImpactsRequest$inboundSchema: z.ZodType< + ListIncidentImpactsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + type: ListIncidentImpactsType$inboundSchema, +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type ListIncidentImpactsRequest$Outbound = { + incident_id: string; + type: string; +}; + +/** @internal */ +export const ListIncidentImpactsRequest$outboundSchema: z.ZodType< + ListIncidentImpactsRequest$Outbound, + z.ZodTypeDef, + ListIncidentImpactsRequest +> = z.object({ + incidentId: z.string(), + type: ListIncidentImpactsType$outboundSchema, +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListIncidentImpactsRequest$ { + /** @deprecated use `ListIncidentImpactsRequest$inboundSchema` instead. */ + export const inboundSchema = ListIncidentImpactsRequest$inboundSchema; + /** @deprecated use `ListIncidentImpactsRequest$outboundSchema` instead. */ + export const outboundSchema = ListIncidentImpactsRequest$outboundSchema; + /** @deprecated use `ListIncidentImpactsRequest$Outbound` instead. */ + export type Outbound = ListIncidentImpactsRequest$Outbound; +} + +export function listIncidentImpactsRequestToJSON( + listIncidentImpactsRequest: ListIncidentImpactsRequest, +): string { + return JSON.stringify( + ListIncidentImpactsRequest$outboundSchema.parse(listIncidentImpactsRequest), + ); +} + +export function listIncidentImpactsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListIncidentImpactsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListIncidentImpactsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listincidentlinks.ts b/src/models/operations/listincidentlinks.ts index 63d32dd3..9ff9a6a1 100644 --- a/src/models/operations/listincidentlinks.ts +++ b/src/models/operations/listincidentlinks.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListIncidentLinksRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; incidentId: string; }; @@ -20,8 +20,8 @@ export const ListIncidentLinksRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), incident_id: z.string(), }).transform((v) => { return remap$(v, { @@ -32,8 +32,8 @@ export const ListIncidentLinksRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentLinksRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; incident_id: string; }; @@ -43,8 +43,8 @@ export const ListIncidentLinksRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListIncidentLinksRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), incidentId: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/operations/listincidentmetrics.ts b/src/models/operations/listincidentmetrics.ts index b7d0077c..e9b3e5ef 100644 --- a/src/models/operations/listincidentmetrics.ts +++ b/src/models/operations/listincidentmetrics.ts @@ -30,7 +30,7 @@ export const By = { } as const; export type By = ClosedEnum; -export const SortField = { +export const ListIncidentMetricsSortField = { Mttd: "mttd", Mtta: "mtta", Mttm: "mttm", @@ -38,29 +38,33 @@ export const SortField = { Count: "count", TotalTime: "total_time", } as const; -export type SortField = ClosedEnum; +export type ListIncidentMetricsSortField = ClosedEnum< + typeof ListIncidentMetricsSortField +>; -export const SortDirection = { +export const ListIncidentMetricsSortDirection = { Asc: "asc", Desc: "desc", } as const; -export type SortDirection = ClosedEnum; +export type ListIncidentMetricsSortDirection = ClosedEnum< + typeof ListIncidentMetricsSortDirection +>; export type ListIncidentMetricsRequest = { /** * The start date to return metrics from */ - startDate?: RFCDate | undefined; + startDate?: RFCDate | null | undefined; /** * The end date to return metrics from */ - endDate?: RFCDate | undefined; - bucketSize?: BucketSize | undefined; - by?: By | undefined; - sortField?: SortField | undefined; - sortDirection?: SortDirection | undefined; - sortLimit?: number | undefined; - conditions?: string | undefined; + endDate?: RFCDate | null | undefined; + bucketSize?: BucketSize | null | undefined; + by?: By | null | undefined; + sortField?: ListIncidentMetricsSortField | null | undefined; + sortDirection?: ListIncidentMetricsSortDirection | null | undefined; + sortLimit?: number | null | undefined; + conditions?: string | null | undefined; }; /** @internal */ @@ -100,43 +104,45 @@ export namespace By$ { } /** @internal */ -export const SortField$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(SortField); +export const ListIncidentMetricsSortField$inboundSchema: z.ZodNativeEnum< + typeof ListIncidentMetricsSortField +> = z.nativeEnum(ListIncidentMetricsSortField); /** @internal */ -export const SortField$outboundSchema: z.ZodNativeEnum = - SortField$inboundSchema; +export const ListIncidentMetricsSortField$outboundSchema: z.ZodNativeEnum< + typeof ListIncidentMetricsSortField +> = ListIncidentMetricsSortField$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace SortField$ { - /** @deprecated use `SortField$inboundSchema` instead. */ - export const inboundSchema = SortField$inboundSchema; - /** @deprecated use `SortField$outboundSchema` instead. */ - export const outboundSchema = SortField$outboundSchema; +export namespace ListIncidentMetricsSortField$ { + /** @deprecated use `ListIncidentMetricsSortField$inboundSchema` instead. */ + export const inboundSchema = ListIncidentMetricsSortField$inboundSchema; + /** @deprecated use `ListIncidentMetricsSortField$outboundSchema` instead. */ + export const outboundSchema = ListIncidentMetricsSortField$outboundSchema; } /** @internal */ -export const SortDirection$inboundSchema: z.ZodNativeEnum< - typeof SortDirection -> = z.nativeEnum(SortDirection); +export const ListIncidentMetricsSortDirection$inboundSchema: z.ZodNativeEnum< + typeof ListIncidentMetricsSortDirection +> = z.nativeEnum(ListIncidentMetricsSortDirection); /** @internal */ -export const SortDirection$outboundSchema: z.ZodNativeEnum< - typeof SortDirection -> = SortDirection$inboundSchema; +export const ListIncidentMetricsSortDirection$outboundSchema: z.ZodNativeEnum< + typeof ListIncidentMetricsSortDirection +> = ListIncidentMetricsSortDirection$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace SortDirection$ { - /** @deprecated use `SortDirection$inboundSchema` instead. */ - export const inboundSchema = SortDirection$inboundSchema; - /** @deprecated use `SortDirection$outboundSchema` instead. */ - export const outboundSchema = SortDirection$outboundSchema; +export namespace ListIncidentMetricsSortDirection$ { + /** @deprecated use `ListIncidentMetricsSortDirection$inboundSchema` instead. */ + export const inboundSchema = ListIncidentMetricsSortDirection$inboundSchema; + /** @deprecated use `ListIncidentMetricsSortDirection$outboundSchema` instead. */ + export const outboundSchema = ListIncidentMetricsSortDirection$outboundSchema; } /** @internal */ @@ -145,14 +151,15 @@ export const ListIncidentMetricsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), - bucket_size: BucketSize$inboundSchema.optional(), - by: By$inboundSchema.optional(), - sort_field: SortField$inboundSchema.optional(), - sort_direction: SortDirection$inboundSchema.optional(), - sort_limit: z.number().int().optional(), - conditions: z.string().optional(), + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + bucket_size: z.nullable(BucketSize$inboundSchema).optional(), + by: z.nullable(By$inboundSchema).optional(), + sort_field: z.nullable(ListIncidentMetricsSortField$inboundSchema).optional(), + sort_direction: z.nullable(ListIncidentMetricsSortDirection$inboundSchema) + .optional(), + sort_limit: z.nullable(z.number().int()).optional(), + conditions: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "start_date": "startDate", @@ -166,14 +173,14 @@ export const ListIncidentMetricsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentMetricsRequest$Outbound = { - start_date?: string | undefined; - end_date?: string | undefined; - bucket_size?: string | undefined; - by?: string | undefined; - sort_field?: string | undefined; - sort_direction?: string | undefined; - sort_limit?: number | undefined; - conditions?: string | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + bucket_size?: string | null | undefined; + by?: string | null | undefined; + sort_field?: string | null | undefined; + sort_direction?: string | null | undefined; + sort_limit?: number | null | undefined; + conditions?: string | null | undefined; }; /** @internal */ @@ -182,14 +189,17 @@ export const ListIncidentMetricsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListIncidentMetricsRequest > = z.object({ - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - bucketSize: BucketSize$outboundSchema.optional(), - by: By$outboundSchema.optional(), - sortField: SortField$outboundSchema.optional(), - sortDirection: SortDirection$outboundSchema.optional(), - sortLimit: z.number().int().optional(), - conditions: z.string().optional(), + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + bucketSize: z.nullable(BucketSize$outboundSchema).optional(), + by: z.nullable(By$outboundSchema).optional(), + sortField: z.nullable(ListIncidentMetricsSortField$outboundSchema).optional(), + sortDirection: z.nullable(ListIncidentMetricsSortDirection$outboundSchema) + .optional(), + sortLimit: z.nullable(z.number().int()).optional(), + conditions: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { startDate: "start_date", diff --git a/src/models/operations/listincidentrelatedchanges.ts b/src/models/operations/listincidentrelatedchanges.ts deleted file mode 100644 index dd9fa2ab..00000000 --- a/src/models/operations/listincidentrelatedchanges.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * The type of the relation to the incident - */ -export const QueryParamType = { - Caused: "caused", - Fixed: "fixed", - Suspect: "suspect", - Dismissed: "dismissed", -} as const; -/** - * The type of the relation to the incident - */ -export type QueryParamType = ClosedEnum; - -export type ListIncidentRelatedChangesRequest = { - page?: number | undefined; - perPage?: number | undefined; - /** - * The type of the relation to the incident - */ - type?: QueryParamType | undefined; - incidentId: string; -}; - -/** @internal */ -export const QueryParamType$inboundSchema: z.ZodNativeEnum< - typeof QueryParamType -> = z.nativeEnum(QueryParamType); - -/** @internal */ -export const QueryParamType$outboundSchema: z.ZodNativeEnum< - typeof QueryParamType -> = QueryParamType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace QueryParamType$ { - /** @deprecated use `QueryParamType$inboundSchema` instead. */ - export const inboundSchema = QueryParamType$inboundSchema; - /** @deprecated use `QueryParamType$outboundSchema` instead. */ - export const outboundSchema = QueryParamType$outboundSchema; -} - -/** @internal */ -export const ListIncidentRelatedChangesRequest$inboundSchema: z.ZodType< - ListIncidentRelatedChangesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - type: QueryParamType$inboundSchema.optional(), - incident_id: z.string(), -}).transform((v) => { - return remap$(v, { - "per_page": "perPage", - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type ListIncidentRelatedChangesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - type?: string | undefined; - incident_id: string; -}; - -/** @internal */ -export const ListIncidentRelatedChangesRequest$outboundSchema: z.ZodType< - ListIncidentRelatedChangesRequest$Outbound, - z.ZodTypeDef, - ListIncidentRelatedChangesRequest -> = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - type: QueryParamType$outboundSchema.optional(), - incidentId: z.string(), -}).transform((v) => { - return remap$(v, { - perPage: "per_page", - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListIncidentRelatedChangesRequest$ { - /** @deprecated use `ListIncidentRelatedChangesRequest$inboundSchema` instead. */ - export const inboundSchema = ListIncidentRelatedChangesRequest$inboundSchema; - /** @deprecated use `ListIncidentRelatedChangesRequest$outboundSchema` instead. */ - export const outboundSchema = - ListIncidentRelatedChangesRequest$outboundSchema; - /** @deprecated use `ListIncidentRelatedChangesRequest$Outbound` instead. */ - export type Outbound = ListIncidentRelatedChangesRequest$Outbound; -} - -export function listIncidentRelatedChangesRequestToJSON( - listIncidentRelatedChangesRequest: ListIncidentRelatedChangesRequest, -): string { - return JSON.stringify( - ListIncidentRelatedChangesRequest$outboundSchema.parse( - listIncidentRelatedChangesRequest, - ), - ); -} - -export function listIncidentRelatedChangesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListIncidentRelatedChangesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListIncidentRelatedChangesRequest' from JSON`, - ); -} diff --git a/src/models/operations/listincidentretrospectives.ts b/src/models/operations/listincidentretrospectives.ts new file mode 100644 index 00000000..1a5e6ac5 --- /dev/null +++ b/src/models/operations/listincidentretrospectives.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListIncidentRetrospectivesRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; + /** + * Filter by hidden status. + */ + isHidden?: boolean | null | undefined; + incidentId: string; +}; + +/** @internal */ +export const ListIncidentRetrospectivesRequest$inboundSchema: z.ZodType< + ListIncidentRetrospectivesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + is_hidden: z.nullable(z.boolean()).optional(), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + "is_hidden": "isHidden", + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type ListIncidentRetrospectivesRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; + is_hidden?: boolean | null | undefined; + incident_id: string; +}; + +/** @internal */ +export const ListIncidentRetrospectivesRequest$outboundSchema: z.ZodType< + ListIncidentRetrospectivesRequest$Outbound, + z.ZodTypeDef, + ListIncidentRetrospectivesRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + isHidden: z.nullable(z.boolean()).optional(), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + isHidden: "is_hidden", + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListIncidentRetrospectivesRequest$ { + /** @deprecated use `ListIncidentRetrospectivesRequest$inboundSchema` instead. */ + export const inboundSchema = ListIncidentRetrospectivesRequest$inboundSchema; + /** @deprecated use `ListIncidentRetrospectivesRequest$outboundSchema` instead. */ + export const outboundSchema = + ListIncidentRetrospectivesRequest$outboundSchema; + /** @deprecated use `ListIncidentRetrospectivesRequest$Outbound` instead. */ + export type Outbound = ListIncidentRetrospectivesRequest$Outbound; +} + +export function listIncidentRetrospectivesRequestToJSON( + listIncidentRetrospectivesRequest: ListIncidentRetrospectivesRequest, +): string { + return JSON.stringify( + ListIncidentRetrospectivesRequest$outboundSchema.parse( + listIncidentRetrospectivesRequest, + ), + ); +} + +export function listIncidentRetrospectivesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListIncidentRetrospectivesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListIncidentRetrospectivesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listincidentroleassignments.ts b/src/models/operations/listincidentroleassignments.ts index 8d3e636f..265f026a 100644 --- a/src/models/operations/listincidentroleassignments.ts +++ b/src/models/operations/listincidentroleassignments.ts @@ -26,7 +26,7 @@ export type ListIncidentRoleAssignmentsRequest = { /** * Filter on status of the role assignment */ - status?: Status | undefined; + status?: Status | null | undefined; }; /** @internal */ @@ -55,7 +55,7 @@ export const ListIncidentRoleAssignmentsRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - status: Status$inboundSchema.optional(), + status: z.nullable(Status$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", @@ -65,7 +65,7 @@ export const ListIncidentRoleAssignmentsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentRoleAssignmentsRequest$Outbound = { incident_id: string; - status?: string | undefined; + status?: string | null | undefined; }; /** @internal */ @@ -75,7 +75,7 @@ export const ListIncidentRoleAssignmentsRequest$outboundSchema: z.ZodType< ListIncidentRoleAssignmentsRequest > = z.object({ incidentId: z.string(), - status: Status$outboundSchema.optional(), + status: z.nullable(Status$outboundSchema).optional(), }).transform((v) => { return remap$(v, { incidentId: "incident_id", diff --git a/src/models/operations/listincidentroles.ts b/src/models/operations/listincidentroles.ts index 01826c1a..6716f39a 100644 --- a/src/models/operations/listincidentroles.ts +++ b/src/models/operations/listincidentroles.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListIncidentRolesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListIncidentRolesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListIncidentRolesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentRolesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListIncidentRolesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListIncidentRolesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listincidents.ts b/src/models/operations/listincidents.ts index ff6e69cf..bfdac8fe 100644 --- a/src/models/operations/listincidents.ts +++ b/src/models/operations/listincidents.ts @@ -13,7 +13,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * A matching strategy for the tags provided */ -export const QueryParamTagMatchStrategy = { +export const ListIncidentsTagMatchStrategy = { Any: "any", MatchAll: "match_all", Exclude: "exclude", @@ -21,146 +21,158 @@ export const QueryParamTagMatchStrategy = { /** * A matching strategy for the tags provided */ -export type QueryParamTagMatchStrategy = ClosedEnum< - typeof QueryParamTagMatchStrategy +export type ListIncidentsTagMatchStrategy = ClosedEnum< + typeof ListIncidentsTagMatchStrategy >; export type ListIncidentsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A JSON string that defines 'logic' and 'user_data' */ - conditions?: string | undefined; + conditions?: string | null | undefined; /** * A comma separated list of environment IDs or 'is_empty' to filter for incidents with no impacted environments */ - environments?: string | undefined; + environments?: string | null | undefined; /** * A comma separated list of service IDs or 'is_empty' to filter for incidents with no impacted services */ - services?: string | undefined; + services?: string | null | undefined; /** * A comma separated list of functionality IDs or 'is_empty' to filter for incidents with no impacted functionalities */ - functionalities?: string | undefined; + functionalities?: string | null | undefined; /** * A comma separated list of infrastructure IDs. Returns incidents that do not have the following infrastructure ids associated with them. */ - excludedInfrastructureIds?: string | undefined; + excludedInfrastructureIds?: string | null | undefined; /** * A comma separated list of team IDs */ - teams?: string | undefined; + teams?: string | null | undefined; /** * A comma separated list of IDs for assigned teams or 'is_empty' to filter for incidents with no active team assignments */ - assignedTeams?: string | undefined; + assignedTeams?: string | null | undefined; /** * Incident status */ - status?: string | undefined; + status?: string | null | undefined; /** * Filters for incidents that started on or after this date */ - startDate?: RFCDate | undefined; + startDate?: RFCDate | null | undefined; /** * Filters for incidents that started on or before this date */ - endDate?: RFCDate | undefined; + endDate?: RFCDate | null | undefined; /** * Filters for incidents that were resolved at or after this time. Combine this with the `current_milestones` parameter if you wish to omit incidents that were re-opened and are still active. */ - resolvedAtOrAfter?: Date | undefined; + resolvedAtOrAfter?: Date | null | undefined; /** * Filters for incidents that were resolved at or before this time. Combine this with the `current_milestones` parameter if you wish to omit incidents that were re-opened and are still active. */ - resolvedAtOrBefore?: Date | undefined; + resolvedAtOrBefore?: Date | null | undefined; + /** + * Filters for incidents that were closed at or after this time + */ + closedAtOrAfter?: Date | null | undefined; + /** + * Filters for incidents that were closed at or before this time + */ + closedAtOrBefore?: Date | null | undefined; /** * Filters for incidents that were created at or after this time */ - createdAtOrAfter?: Date | undefined; + createdAtOrAfter?: Date | null | undefined; /** * Filters for incidents that were created at or before this time */ - createdAtOrBefore?: Date | undefined; + createdAtOrBefore?: Date | null | undefined; /** * A text query for an incident that searches on name, summary, and desciption */ - query?: string | undefined; + query?: string | null | undefined; /** * A query to search incidents by their name */ - name?: string | undefined; + name?: string | null | undefined; /** * The id of a previously saved search. */ - savedSearchId?: string | undefined; + savedSearchId?: string | null | undefined; /** * A text value of priority */ - priorities?: string | undefined; + priorities?: string | null | undefined; /** * Flag for including incidents where priority has not been set */ - priorityNotSet?: boolean | undefined; + priorityNotSet?: boolean | null | undefined; /** * A text value of severity */ - severities?: string | undefined; + severities?: string | null | undefined; /** * Flag for including incidents where severity has not been set */ - severityNotSet?: boolean | undefined; + severityNotSet?: boolean | null | undefined; /** * A comma separated list of current milestones */ - currentMilestones?: string | undefined; + currentMilestones?: string | null | undefined; /** * A comma separated list of tags */ - tags?: string | undefined; + tags?: string | null | undefined; /** * A matching strategy for the tags provided */ - tagMatchStrategy?: QueryParamTagMatchStrategy | undefined; + tagMatchStrategy?: ListIncidentsTagMatchStrategy | null | undefined; /** * Return archived incidents */ - archived?: boolean | undefined; + archived?: boolean | null | undefined; /** * Filters for incidents that were updated after this date */ - updatedAfter?: Date | undefined; + updatedAfter?: Date | null | undefined; /** * Filters for incidents that were updated before this date */ - updatedBefore?: Date | undefined; + updatedBefore?: Date | null | undefined; /** * A comma separated list of incident type IDs */ - incidentTypeId?: string | undefined; + incidentTypeId?: string | null | undefined; + /** + * A comma separated list of retrospective template IDs + */ + retrospectiveTemplate?: string | null | undefined; }; /** @internal */ -export const QueryParamTagMatchStrategy$inboundSchema: z.ZodNativeEnum< - typeof QueryParamTagMatchStrategy -> = z.nativeEnum(QueryParamTagMatchStrategy); +export const ListIncidentsTagMatchStrategy$inboundSchema: z.ZodNativeEnum< + typeof ListIncidentsTagMatchStrategy +> = z.nativeEnum(ListIncidentsTagMatchStrategy); /** @internal */ -export const QueryParamTagMatchStrategy$outboundSchema: z.ZodNativeEnum< - typeof QueryParamTagMatchStrategy -> = QueryParamTagMatchStrategy$inboundSchema; +export const ListIncidentsTagMatchStrategy$outboundSchema: z.ZodNativeEnum< + typeof ListIncidentsTagMatchStrategy +> = ListIncidentsTagMatchStrategy$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace QueryParamTagMatchStrategy$ { - /** @deprecated use `QueryParamTagMatchStrategy$inboundSchema` instead. */ - export const inboundSchema = QueryParamTagMatchStrategy$inboundSchema; - /** @deprecated use `QueryParamTagMatchStrategy$outboundSchema` instead. */ - export const outboundSchema = QueryParamTagMatchStrategy$outboundSchema; +export namespace ListIncidentsTagMatchStrategy$ { + /** @deprecated use `ListIncidentsTagMatchStrategy$inboundSchema` instead. */ + export const inboundSchema = ListIncidentsTagMatchStrategy$inboundSchema; + /** @deprecated use `ListIncidentsTagMatchStrategy$outboundSchema` instead. */ + export const outboundSchema = ListIncidentsTagMatchStrategy$outboundSchema; } /** @internal */ @@ -169,48 +181,56 @@ export const ListIncidentsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - conditions: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - functionalities: z.string().optional(), - excluded_infrastructure_ids: z.string().optional(), - teams: z.string().optional(), - assigned_teams: z.string().optional(), - status: z.string().optional(), - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), - resolved_at_or_after: z.string().datetime({ offset: true }).transform(v => - new Date(v) + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + conditions: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + functionalities: z.nullable(z.string()).optional(), + excluded_infrastructure_ids: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + assigned_teams: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + resolved_at_or_after: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + resolved_at_or_before: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + closed_at_or_after: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - resolved_at_or_before: z.string().datetime({ offset: true }).transform(v => - new Date(v) + closed_at_or_before: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - created_at_or_after: z.string().datetime({ offset: true }).transform(v => - new Date(v) + created_at_or_after: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - created_at_or_before: z.string().datetime({ offset: true }).transform(v => - new Date(v) + created_at_or_before: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - query: z.string().optional(), - name: z.string().optional(), - saved_search_id: z.string().optional(), - priorities: z.string().optional(), - priority_not_set: z.boolean().optional(), - severities: z.string().optional(), - severity_not_set: z.boolean().optional(), - current_milestones: z.string().optional(), - tags: z.string().optional(), - tag_match_strategy: QueryParamTagMatchStrategy$inboundSchema.optional(), - archived: z.boolean().optional(), - updated_after: z.string().datetime({ offset: true }).transform(v => - new Date(v) + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + saved_search_id: z.nullable(z.string()).optional(), + priorities: z.nullable(z.string()).optional(), + priority_not_set: z.nullable(z.boolean()).optional(), + severities: z.nullable(z.string()).optional(), + severity_not_set: z.nullable(z.boolean()).optional(), + current_milestones: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + tag_match_strategy: z.nullable(ListIncidentsTagMatchStrategy$inboundSchema) + .optional(), + archived: z.nullable(z.boolean()).optional(), + updated_after: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - updated_before: z.string().datetime({ offset: true }).transform(v => - new Date(v) + updated_before: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), - incident_type_id: z.string().optional(), + incident_type_id: z.nullable(z.string()).optional(), + retrospective_template: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -220,6 +240,8 @@ export const ListIncidentsRequest$inboundSchema: z.ZodType< "end_date": "endDate", "resolved_at_or_after": "resolvedAtOrAfter", "resolved_at_or_before": "resolvedAtOrBefore", + "closed_at_or_after": "closedAtOrAfter", + "closed_at_or_before": "closedAtOrBefore", "created_at_or_after": "createdAtOrAfter", "created_at_or_before": "createdAtOrBefore", "saved_search_id": "savedSearchId", @@ -230,41 +252,45 @@ export const ListIncidentsRequest$inboundSchema: z.ZodType< "updated_after": "updatedAfter", "updated_before": "updatedBefore", "incident_type_id": "incidentTypeId", + "retrospective_template": "retrospectiveTemplate", }); }); /** @internal */ export type ListIncidentsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - conditions?: string | undefined; - environments?: string | undefined; - services?: string | undefined; - functionalities?: string | undefined; - excluded_infrastructure_ids?: string | undefined; - teams?: string | undefined; - assigned_teams?: string | undefined; - status?: string | undefined; - start_date?: string | undefined; - end_date?: string | undefined; - resolved_at_or_after?: string | undefined; - resolved_at_or_before?: string | undefined; - created_at_or_after?: string | undefined; - created_at_or_before?: string | undefined; - query?: string | undefined; - name?: string | undefined; - saved_search_id?: string | undefined; - priorities?: string | undefined; - priority_not_set?: boolean | undefined; - severities?: string | undefined; - severity_not_set?: boolean | undefined; - current_milestones?: string | undefined; - tags?: string | undefined; - tag_match_strategy?: string | undefined; - archived?: boolean | undefined; - updated_after?: string | undefined; - updated_before?: string | undefined; - incident_type_id?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + conditions?: string | null | undefined; + environments?: string | null | undefined; + services?: string | null | undefined; + functionalities?: string | null | undefined; + excluded_infrastructure_ids?: string | null | undefined; + teams?: string | null | undefined; + assigned_teams?: string | null | undefined; + status?: string | null | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + resolved_at_or_after?: string | null | undefined; + resolved_at_or_before?: string | null | undefined; + closed_at_or_after?: string | null | undefined; + closed_at_or_before?: string | null | undefined; + created_at_or_after?: string | null | undefined; + created_at_or_before?: string | null | undefined; + query?: string | null | undefined; + name?: string | null | undefined; + saved_search_id?: string | null | undefined; + priorities?: string | null | undefined; + priority_not_set?: boolean | null | undefined; + severities?: string | null | undefined; + severity_not_set?: boolean | null | undefined; + current_milestones?: string | null | undefined; + tags?: string | null | undefined; + tag_match_strategy?: string | null | undefined; + archived?: boolean | null | undefined; + updated_after?: string | null | undefined; + updated_before?: string | null | undefined; + incident_type_id?: string | null | undefined; + retrospective_template?: string | null | undefined; }; /** @internal */ @@ -273,36 +299,49 @@ export const ListIncidentsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListIncidentsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - conditions: z.string().optional(), - environments: z.string().optional(), - services: z.string().optional(), - functionalities: z.string().optional(), - excludedInfrastructureIds: z.string().optional(), - teams: z.string().optional(), - assignedTeams: z.string().optional(), - status: z.string().optional(), - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - resolvedAtOrAfter: z.date().transform(v => v.toISOString()).optional(), - resolvedAtOrBefore: z.date().transform(v => v.toISOString()).optional(), - createdAtOrAfter: z.date().transform(v => v.toISOString()).optional(), - createdAtOrBefore: z.date().transform(v => v.toISOString()).optional(), - query: z.string().optional(), - name: z.string().optional(), - savedSearchId: z.string().optional(), - priorities: z.string().optional(), - priorityNotSet: z.boolean().optional(), - severities: z.string().optional(), - severityNotSet: z.boolean().optional(), - currentMilestones: z.string().optional(), - tags: z.string().optional(), - tagMatchStrategy: QueryParamTagMatchStrategy$outboundSchema.optional(), - archived: z.boolean().optional(), - updatedAfter: z.date().transform(v => v.toISOString()).optional(), - updatedBefore: z.date().transform(v => v.toISOString()).optional(), - incidentTypeId: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + conditions: z.nullable(z.string()).optional(), + environments: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + functionalities: z.nullable(z.string()).optional(), + excludedInfrastructureIds: z.nullable(z.string()).optional(), + teams: z.nullable(z.string()).optional(), + assignedTeams: z.nullable(z.string()).optional(), + status: z.nullable(z.string()).optional(), + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + resolvedAtOrAfter: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + resolvedAtOrBefore: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + closedAtOrAfter: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + closedAtOrBefore: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + createdAtOrAfter: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + createdAtOrBefore: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + savedSearchId: z.nullable(z.string()).optional(), + priorities: z.nullable(z.string()).optional(), + priorityNotSet: z.nullable(z.boolean()).optional(), + severities: z.nullable(z.string()).optional(), + severityNotSet: z.nullable(z.boolean()).optional(), + currentMilestones: z.nullable(z.string()).optional(), + tags: z.nullable(z.string()).optional(), + tagMatchStrategy: z.nullable(ListIncidentsTagMatchStrategy$outboundSchema) + .optional(), + archived: z.nullable(z.boolean()).optional(), + updatedAfter: z.nullable(z.date().transform(v => v.toISOString())).optional(), + updatedBefore: z.nullable(z.date().transform(v => v.toISOString())) + .optional(), + incidentTypeId: z.nullable(z.string()).optional(), + retrospectiveTemplate: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", @@ -312,6 +351,8 @@ export const ListIncidentsRequest$outboundSchema: z.ZodType< endDate: "end_date", resolvedAtOrAfter: "resolved_at_or_after", resolvedAtOrBefore: "resolved_at_or_before", + closedAtOrAfter: "closed_at_or_after", + closedAtOrBefore: "closed_at_or_before", createdAtOrAfter: "created_at_or_after", createdAtOrBefore: "created_at_or_before", savedSearchId: "saved_search_id", @@ -322,6 +363,7 @@ export const ListIncidentsRequest$outboundSchema: z.ZodType< updatedAfter: "updated_after", updatedBefore: "updated_before", incidentTypeId: "incident_type_id", + retrospectiveTemplate: "retrospective_template", }); }); diff --git a/src/models/operations/listincidenttags.ts b/src/models/operations/listincidenttags.ts index 0965c504..20adcc87 100644 --- a/src/models/operations/listincidenttags.ts +++ b/src/models/operations/listincidenttags.ts @@ -8,7 +8,7 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListIncidentTagsRequest = { - prefix?: string | undefined; + prefix?: string | null | undefined; }; /** @internal */ @@ -17,12 +17,12 @@ export const ListIncidentTagsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - prefix: z.string().optional(), + prefix: z.nullable(z.string()).optional(), }); /** @internal */ export type ListIncidentTagsRequest$Outbound = { - prefix?: string | undefined; + prefix?: string | null | undefined; }; /** @internal */ @@ -31,7 +31,7 @@ export const ListIncidentTagsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListIncidentTagsRequest > = z.object({ - prefix: z.string().optional(), + prefix: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/operations/listincidenttasks.ts b/src/models/operations/listincidenttasks.ts index d185bbde..0ebd7bb2 100644 --- a/src/models/operations/listincidenttasks.ts +++ b/src/models/operations/listincidenttasks.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListIncidentTasksRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; incidentId: string; }; @@ -20,8 +20,8 @@ export const ListIncidentTasksRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), incident_id: z.string(), }).transform((v) => { return remap$(v, { @@ -32,8 +32,8 @@ export const ListIncidentTasksRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentTasksRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; incident_id: string; }; @@ -43,8 +43,8 @@ export const ListIncidentTasksRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListIncidentTasksRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), incidentId: z.string(), }).transform((v) => { return remap$(v, { diff --git a/src/models/operations/listincidenttypes.ts b/src/models/operations/listincidenttypes.ts index 56289763..d1babc1d 100644 --- a/src/models/operations/listincidenttypes.ts +++ b/src/models/operations/listincidenttypes.ts @@ -12,9 +12,9 @@ export type ListIncidentTypesRequest = { /** * A query to search incident types by their name */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -23,9 +23,9 @@ export const ListIncidentTypesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -34,9 +34,9 @@ export const ListIncidentTypesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListIncidentTypesRequest$Outbound = { - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -45,9 +45,9 @@ export const ListIncidentTypesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListIncidentTypesRequest > = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listinfrastructuremetrics.ts b/src/models/operations/listinfrastructuremetrics.ts index 458e220b..ad882e18 100644 --- a/src/models/operations/listinfrastructuremetrics.ts +++ b/src/models/operations/listinfrastructuremetrics.ts @@ -10,43 +10,52 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const InfraType = { +export const ListInfrastructureMetricsInfraType = { Environments: "environments", Functionalities: "functionalities", Services: "services", Customers: "customers", } as const; -export type InfraType = ClosedEnum; +export type ListInfrastructureMetricsInfraType = ClosedEnum< + typeof ListInfrastructureMetricsInfraType +>; export type ListInfrastructureMetricsRequest = { - infraType: InfraType; + infraType: ListInfrastructureMetricsInfraType; + /** + * Component UUID + */ + infraId: string; /** * The start date to return metrics from; defaults to 30 days ago */ - startDate?: RFCDate | undefined; + startDate?: RFCDate | null | undefined; /** * The end date to return metrics from, defaults to today */ - endDate?: RFCDate | undefined; + endDate?: RFCDate | null | undefined; }; /** @internal */ -export const InfraType$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(InfraType); +export const ListInfrastructureMetricsInfraType$inboundSchema: z.ZodNativeEnum< + typeof ListInfrastructureMetricsInfraType +> = z.nativeEnum(ListInfrastructureMetricsInfraType); /** @internal */ -export const InfraType$outboundSchema: z.ZodNativeEnum = - InfraType$inboundSchema; +export const ListInfrastructureMetricsInfraType$outboundSchema: z.ZodNativeEnum< + typeof ListInfrastructureMetricsInfraType +> = ListInfrastructureMetricsInfraType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace InfraType$ { - /** @deprecated use `InfraType$inboundSchema` instead. */ - export const inboundSchema = InfraType$inboundSchema; - /** @deprecated use `InfraType$outboundSchema` instead. */ - export const outboundSchema = InfraType$outboundSchema; +export namespace ListInfrastructureMetricsInfraType$ { + /** @deprecated use `ListInfrastructureMetricsInfraType$inboundSchema` instead. */ + export const inboundSchema = ListInfrastructureMetricsInfraType$inboundSchema; + /** @deprecated use `ListInfrastructureMetricsInfraType$outboundSchema` instead. */ + export const outboundSchema = + ListInfrastructureMetricsInfraType$outboundSchema; } /** @internal */ @@ -55,12 +64,14 @@ export const ListInfrastructureMetricsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - infra_type: InfraType$inboundSchema, - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), + infra_type: ListInfrastructureMetricsInfraType$inboundSchema, + infra_id: z.string(), + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), }).transform((v) => { return remap$(v, { "infra_type": "infraType", + "infra_id": "infraId", "start_date": "startDate", "end_date": "endDate", }); @@ -69,8 +80,9 @@ export const ListInfrastructureMetricsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListInfrastructureMetricsRequest$Outbound = { infra_type: string; - start_date?: string | undefined; - end_date?: string | undefined; + infra_id: string; + start_date?: string | null | undefined; + end_date?: string | null | undefined; }; /** @internal */ @@ -79,12 +91,16 @@ export const ListInfrastructureMetricsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListInfrastructureMetricsRequest > = z.object({ - infraType: InfraType$outboundSchema, - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), + infraType: ListInfrastructureMetricsInfraType$outboundSchema, + infraId: z.string(), + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), }).transform((v) => { return remap$(v, { infraType: "infra_type", + infraId: "infra_id", startDate: "start_date", endDate: "end_date", }); diff --git a/src/models/operations/listinfrastructures.ts b/src/models/operations/listinfrastructures.ts index 9cc416eb..4df06efb 100644 --- a/src/models/operations/listinfrastructures.ts +++ b/src/models/operations/listinfrastructures.ts @@ -12,17 +12,17 @@ export type ListInfrastructuresRequest = { /** * A query to search infrastructures by their name */ - query?: string | undefined; + query?: string | null | undefined; /** * Omit for any infrastructure that is added to an incident using the format "incident/{incident_id}" */ - omitFor?: string | undefined; + omitFor?: string | null | undefined; /** * Restrict infrastructure search to given type. */ - type?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + type?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -31,11 +31,11 @@ export const ListInfrastructuresRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - query: z.string().optional(), - omit_for: z.string().optional(), - type: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + omit_for: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "omit_for": "omitFor", @@ -45,11 +45,11 @@ export const ListInfrastructuresRequest$inboundSchema: z.ZodType< /** @internal */ export type ListInfrastructuresRequest$Outbound = { - query?: string | undefined; - omit_for?: string | undefined; - type?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + omit_for?: string | null | undefined; + type?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -58,11 +58,11 @@ export const ListInfrastructuresRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListInfrastructuresRequest > = z.object({ - query: z.string().optional(), - omitFor: z.string().optional(), - type: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + omitFor: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { omitFor: "omit_for", diff --git a/src/models/operations/listinfrastructuretypemetrics.ts b/src/models/operations/listinfrastructuretypemetrics.ts new file mode 100644 index 00000000..12fac49b --- /dev/null +++ b/src/models/operations/listinfrastructuretypemetrics.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { RFCDate } from "../../types/rfcdate.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const ListInfrastructureTypeMetricsInfraType = { + Environments: "environments", + Functionalities: "functionalities", + Services: "services", + Customers: "customers", +} as const; +export type ListInfrastructureTypeMetricsInfraType = ClosedEnum< + typeof ListInfrastructureTypeMetricsInfraType +>; + +export type ListInfrastructureTypeMetricsRequest = { + infraType: ListInfrastructureTypeMetricsInfraType; + /** + * The start date to return metrics from; defaults to 30 days ago + */ + startDate?: RFCDate | null | undefined; + /** + * The end date to return metrics from, defaults to today + */ + endDate?: RFCDate | null | undefined; +}; + +/** @internal */ +export const ListInfrastructureTypeMetricsInfraType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + ListInfrastructureTypeMetricsInfraType, + ); + +/** @internal */ +export const ListInfrastructureTypeMetricsInfraType$outboundSchema: + z.ZodNativeEnum = + ListInfrastructureTypeMetricsInfraType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListInfrastructureTypeMetricsInfraType$ { + /** @deprecated use `ListInfrastructureTypeMetricsInfraType$inboundSchema` instead. */ + export const inboundSchema = + ListInfrastructureTypeMetricsInfraType$inboundSchema; + /** @deprecated use `ListInfrastructureTypeMetricsInfraType$outboundSchema` instead. */ + export const outboundSchema = + ListInfrastructureTypeMetricsInfraType$outboundSchema; +} + +/** @internal */ +export const ListInfrastructureTypeMetricsRequest$inboundSchema: z.ZodType< + ListInfrastructureTypeMetricsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + infra_type: ListInfrastructureTypeMetricsInfraType$inboundSchema, + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), +}).transform((v) => { + return remap$(v, { + "infra_type": "infraType", + "start_date": "startDate", + "end_date": "endDate", + }); +}); + +/** @internal */ +export type ListInfrastructureTypeMetricsRequest$Outbound = { + infra_type: string; + start_date?: string | null | undefined; + end_date?: string | null | undefined; +}; + +/** @internal */ +export const ListInfrastructureTypeMetricsRequest$outboundSchema: z.ZodType< + ListInfrastructureTypeMetricsRequest$Outbound, + z.ZodTypeDef, + ListInfrastructureTypeMetricsRequest +> = z.object({ + infraType: ListInfrastructureTypeMetricsInfraType$outboundSchema, + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), +}).transform((v) => { + return remap$(v, { + infraType: "infra_type", + startDate: "start_date", + endDate: "end_date", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListInfrastructureTypeMetricsRequest$ { + /** @deprecated use `ListInfrastructureTypeMetricsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListInfrastructureTypeMetricsRequest$inboundSchema; + /** @deprecated use `ListInfrastructureTypeMetricsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListInfrastructureTypeMetricsRequest$outboundSchema; + /** @deprecated use `ListInfrastructureTypeMetricsRequest$Outbound` instead. */ + export type Outbound = ListInfrastructureTypeMetricsRequest$Outbound; +} + +export function listInfrastructureTypeMetricsRequestToJSON( + listInfrastructureTypeMetricsRequest: ListInfrastructureTypeMetricsRequest, +): string { + return JSON.stringify( + ListInfrastructureTypeMetricsRequest$outboundSchema.parse( + listInfrastructureTypeMetricsRequest, + ), + ); +} + +export function listInfrastructureTypeMetricsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListInfrastructureTypeMetricsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListInfrastructureTypeMetricsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listintegrationconnections.ts b/src/models/operations/listintegrationconnections.ts deleted file mode 100644 index 5e299205..00000000 --- a/src/models/operations/listintegrationconnections.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListIntegrationConnectionsRequest = { - /** - * Only return installed integrations with the supplied slugs (types). - */ - integrationSlug?: string | undefined; -}; - -/** @internal */ -export const ListIntegrationConnectionsRequest$inboundSchema: z.ZodType< - ListIntegrationConnectionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - integration_slug: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "integration_slug": "integrationSlug", - }); -}); - -/** @internal */ -export type ListIntegrationConnectionsRequest$Outbound = { - integration_slug?: string | undefined; -}; - -/** @internal */ -export const ListIntegrationConnectionsRequest$outboundSchema: z.ZodType< - ListIntegrationConnectionsRequest$Outbound, - z.ZodTypeDef, - ListIntegrationConnectionsRequest -> = z.object({ - integrationSlug: z.string().optional(), -}).transform((v) => { - return remap$(v, { - integrationSlug: "integration_slug", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListIntegrationConnectionsRequest$ { - /** @deprecated use `ListIntegrationConnectionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListIntegrationConnectionsRequest$inboundSchema; - /** @deprecated use `ListIntegrationConnectionsRequest$outboundSchema` instead. */ - export const outboundSchema = - ListIntegrationConnectionsRequest$outboundSchema; - /** @deprecated use `ListIntegrationConnectionsRequest$Outbound` instead. */ - export type Outbound = ListIntegrationConnectionsRequest$Outbound; -} - -export function listIntegrationConnectionsRequestToJSON( - listIntegrationConnectionsRequest: ListIntegrationConnectionsRequest, -): string { - return JSON.stringify( - ListIntegrationConnectionsRequest$outboundSchema.parse( - listIntegrationConnectionsRequest, - ), - ); -} - -export function listIntegrationConnectionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListIntegrationConnectionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListIntegrationConnectionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listlifecyclemeasurementdefinitions.ts b/src/models/operations/listlifecyclemeasurementdefinitions.ts new file mode 100644 index 00000000..fd6b9970 --- /dev/null +++ b/src/models/operations/listlifecyclemeasurementdefinitions.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListLifecycleMeasurementDefinitionsRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; +}; + +/** @internal */ +export const ListLifecycleMeasurementDefinitionsRequest$inboundSchema: + z.ZodType = + z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + }).transform((v) => { + return remap$(v, { + "per_page": "perPage", + }); + }); + +/** @internal */ +export type ListLifecycleMeasurementDefinitionsRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; +}; + +/** @internal */ +export const ListLifecycleMeasurementDefinitionsRequest$outboundSchema: + z.ZodType< + ListLifecycleMeasurementDefinitionsRequest$Outbound, + z.ZodTypeDef, + ListLifecycleMeasurementDefinitionsRequest + > = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + }).transform((v) => { + return remap$(v, { + perPage: "per_page", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListLifecycleMeasurementDefinitionsRequest$ { + /** @deprecated use `ListLifecycleMeasurementDefinitionsRequest$inboundSchema` instead. */ + export const inboundSchema = + ListLifecycleMeasurementDefinitionsRequest$inboundSchema; + /** @deprecated use `ListLifecycleMeasurementDefinitionsRequest$outboundSchema` instead. */ + export const outboundSchema = + ListLifecycleMeasurementDefinitionsRequest$outboundSchema; + /** @deprecated use `ListLifecycleMeasurementDefinitionsRequest$Outbound` instead. */ + export type Outbound = ListLifecycleMeasurementDefinitionsRequest$Outbound; +} + +export function listLifecycleMeasurementDefinitionsRequestToJSON( + listLifecycleMeasurementDefinitionsRequest: + ListLifecycleMeasurementDefinitionsRequest, +): string { + return JSON.stringify( + ListLifecycleMeasurementDefinitionsRequest$outboundSchema.parse( + listLifecycleMeasurementDefinitionsRequest, + ), + ); +} + +export function listLifecycleMeasurementDefinitionsRequestFromJSON( + jsonString: string, +): SafeParseResult< + ListLifecycleMeasurementDefinitionsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + ListLifecycleMeasurementDefinitionsRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'ListLifecycleMeasurementDefinitionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listmeasurementdefinitions.ts b/src/models/operations/listmeasurementdefinitions.ts deleted file mode 100644 index 9cd7a57a..00000000 --- a/src/models/operations/listmeasurementdefinitions.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListMeasurementDefinitionsRequest = { - page?: number | undefined; - perPage?: number | undefined; -}; - -/** @internal */ -export const ListMeasurementDefinitionsRequest$inboundSchema: z.ZodType< - ListMeasurementDefinitionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "per_page": "perPage", - }); -}); - -/** @internal */ -export type ListMeasurementDefinitionsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; -}; - -/** @internal */ -export const ListMeasurementDefinitionsRequest$outboundSchema: z.ZodType< - ListMeasurementDefinitionsRequest$Outbound, - z.ZodTypeDef, - ListMeasurementDefinitionsRequest -> = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - perPage: "per_page", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListMeasurementDefinitionsRequest$ { - /** @deprecated use `ListMeasurementDefinitionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListMeasurementDefinitionsRequest$inboundSchema; - /** @deprecated use `ListMeasurementDefinitionsRequest$outboundSchema` instead. */ - export const outboundSchema = - ListMeasurementDefinitionsRequest$outboundSchema; - /** @deprecated use `ListMeasurementDefinitionsRequest$Outbound` instead. */ - export type Outbound = ListMeasurementDefinitionsRequest$Outbound; -} - -export function listMeasurementDefinitionsRequestToJSON( - listMeasurementDefinitionsRequest: ListMeasurementDefinitionsRequest, -): string { - return JSON.stringify( - ListMeasurementDefinitionsRequest$outboundSchema.parse( - listMeasurementDefinitionsRequest, - ), - ); -} - -export function listMeasurementDefinitionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListMeasurementDefinitionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListMeasurementDefinitionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listorganizationoncallschedules.ts b/src/models/operations/listorganizationoncallschedules.ts new file mode 100644 index 00000000..b508e07d --- /dev/null +++ b/src/models/operations/listorganizationoncallschedules.ts @@ -0,0 +1,84 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListOrganizationOnCallSchedulesRequest = { + /** + * An optional comma separated list of team IDs to filter currently on-call users by + */ + teamId?: string | null | undefined; +}; + +/** @internal */ +export const ListOrganizationOnCallSchedulesRequest$inboundSchema: z.ZodType< + ListOrganizationOnCallSchedulesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + }); +}); + +/** @internal */ +export type ListOrganizationOnCallSchedulesRequest$Outbound = { + team_id?: string | null | undefined; +}; + +/** @internal */ +export const ListOrganizationOnCallSchedulesRequest$outboundSchema: z.ZodType< + ListOrganizationOnCallSchedulesRequest$Outbound, + z.ZodTypeDef, + ListOrganizationOnCallSchedulesRequest +> = z.object({ + teamId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListOrganizationOnCallSchedulesRequest$ { + /** @deprecated use `ListOrganizationOnCallSchedulesRequest$inboundSchema` instead. */ + export const inboundSchema = + ListOrganizationOnCallSchedulesRequest$inboundSchema; + /** @deprecated use `ListOrganizationOnCallSchedulesRequest$outboundSchema` instead. */ + export const outboundSchema = + ListOrganizationOnCallSchedulesRequest$outboundSchema; + /** @deprecated use `ListOrganizationOnCallSchedulesRequest$Outbound` instead. */ + export type Outbound = ListOrganizationOnCallSchedulesRequest$Outbound; +} + +export function listOrganizationOnCallSchedulesRequestToJSON( + listOrganizationOnCallSchedulesRequest: + ListOrganizationOnCallSchedulesRequest, +): string { + return JSON.stringify( + ListOrganizationOnCallSchedulesRequest$outboundSchema.parse( + listOrganizationOnCallSchedulesRequest, + ), + ); +} + +export function listOrganizationOnCallSchedulesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListOrganizationOnCallSchedulesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListOrganizationOnCallSchedulesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listpostmortemquestions.ts b/src/models/operations/listpostmortemquestions.ts new file mode 100644 index 00000000..b4971181 --- /dev/null +++ b/src/models/operations/listpostmortemquestions.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListPostMortemQuestionsRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; +}; + +/** @internal */ +export const ListPostMortemQuestionsRequest$inboundSchema: z.ZodType< + ListPostMortemQuestionsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + }); +}); + +/** @internal */ +export type ListPostMortemQuestionsRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; +}; + +/** @internal */ +export const ListPostMortemQuestionsRequest$outboundSchema: z.ZodType< + ListPostMortemQuestionsRequest$Outbound, + z.ZodTypeDef, + ListPostMortemQuestionsRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListPostMortemQuestionsRequest$ { + /** @deprecated use `ListPostMortemQuestionsRequest$inboundSchema` instead. */ + export const inboundSchema = ListPostMortemQuestionsRequest$inboundSchema; + /** @deprecated use `ListPostMortemQuestionsRequest$outboundSchema` instead. */ + export const outboundSchema = ListPostMortemQuestionsRequest$outboundSchema; + /** @deprecated use `ListPostMortemQuestionsRequest$Outbound` instead. */ + export type Outbound = ListPostMortemQuestionsRequest$Outbound; +} + +export function listPostMortemQuestionsRequestToJSON( + listPostMortemQuestionsRequest: ListPostMortemQuestionsRequest, +): string { + return JSON.stringify( + ListPostMortemQuestionsRequest$outboundSchema.parse( + listPostMortemQuestionsRequest, + ), + ); +} + +export function listPostMortemQuestionsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListPostMortemQuestionsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListPostMortemQuestionsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listpostmortemreasons.ts b/src/models/operations/listpostmortemreasons.ts new file mode 100644 index 00000000..557a2bc2 --- /dev/null +++ b/src/models/operations/listpostmortemreasons.ts @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListPostMortemReasonsRequest = { + reportId: string; + page?: number | null | undefined; + perPage?: number | null | undefined; +}; + +/** @internal */ +export const ListPostMortemReasonsRequest$inboundSchema: z.ZodType< + ListPostMortemReasonsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + report_id: z.string(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "report_id": "reportId", + "per_page": "perPage", + }); +}); + +/** @internal */ +export type ListPostMortemReasonsRequest$Outbound = { + report_id: string; + page?: number | null | undefined; + per_page?: number | null | undefined; +}; + +/** @internal */ +export const ListPostMortemReasonsRequest$outboundSchema: z.ZodType< + ListPostMortemReasonsRequest$Outbound, + z.ZodTypeDef, + ListPostMortemReasonsRequest +> = z.object({ + reportId: z.string(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + reportId: "report_id", + perPage: "per_page", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListPostMortemReasonsRequest$ { + /** @deprecated use `ListPostMortemReasonsRequest$inboundSchema` instead. */ + export const inboundSchema = ListPostMortemReasonsRequest$inboundSchema; + /** @deprecated use `ListPostMortemReasonsRequest$outboundSchema` instead. */ + export const outboundSchema = ListPostMortemReasonsRequest$outboundSchema; + /** @deprecated use `ListPostMortemReasonsRequest$Outbound` instead. */ + export type Outbound = ListPostMortemReasonsRequest$Outbound; +} + +export function listPostMortemReasonsRequestToJSON( + listPostMortemReasonsRequest: ListPostMortemReasonsRequest, +): string { + return JSON.stringify( + ListPostMortemReasonsRequest$outboundSchema.parse( + listPostMortemReasonsRequest, + ), + ); +} + +export function listPostMortemReasonsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListPostMortemReasonsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListPostMortemReasonsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listpostmortemreports.ts b/src/models/operations/listpostmortemreports.ts new file mode 100644 index 00000000..725aada6 --- /dev/null +++ b/src/models/operations/listpostmortemreports.ts @@ -0,0 +1,101 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListPostMortemReportsRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; + /** + * Filter the reports by an incident ID + */ + incidentId?: string | null | undefined; + /** + * Filter for reports updated after the given ISO8601 timestamp + */ + updatedSince?: Date | null | undefined; +}; + +/** @internal */ +export const ListPostMortemReportsRequest$inboundSchema: z.ZodType< + ListPostMortemReportsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + incident_id: z.nullable(z.string()).optional(), + updated_since: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + "incident_id": "incidentId", + "updated_since": "updatedSince", + }); +}); + +/** @internal */ +export type ListPostMortemReportsRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; + incident_id?: string | null | undefined; + updated_since?: string | null | undefined; +}; + +/** @internal */ +export const ListPostMortemReportsRequest$outboundSchema: z.ZodType< + ListPostMortemReportsRequest$Outbound, + z.ZodTypeDef, + ListPostMortemReportsRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + incidentId: z.nullable(z.string()).optional(), + updatedSince: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + incidentId: "incident_id", + updatedSince: "updated_since", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListPostMortemReportsRequest$ { + /** @deprecated use `ListPostMortemReportsRequest$inboundSchema` instead. */ + export const inboundSchema = ListPostMortemReportsRequest$inboundSchema; + /** @deprecated use `ListPostMortemReportsRequest$outboundSchema` instead. */ + export const outboundSchema = ListPostMortemReportsRequest$outboundSchema; + /** @deprecated use `ListPostMortemReportsRequest$Outbound` instead. */ + export type Outbound = ListPostMortemReportsRequest$Outbound; +} + +export function listPostMortemReportsRequestToJSON( + listPostMortemReportsRequest: ListPostMortemReportsRequest, +): string { + return JSON.stringify( + ListPostMortemReportsRequest$outboundSchema.parse( + listPostMortemReportsRequest, + ), + ); +} + +export function listPostMortemReportsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListPostMortemReportsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListPostMortemReportsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listpriorities.ts b/src/models/operations/listpriorities.ts index 4342a567..2fa0f1eb 100644 --- a/src/models/operations/listpriorities.ts +++ b/src/models/operations/listpriorities.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListPrioritiesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListPrioritiesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListPrioritiesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListPrioritiesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListPrioritiesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListPrioritiesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listprocessinglogentries.ts b/src/models/operations/listprocessinglogentries.ts new file mode 100644 index 00000000..a3b8dad8 --- /dev/null +++ b/src/models/operations/listprocessinglogentries.ts @@ -0,0 +1,188 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * Returns logs of all levels equal to or above the provided level + */ +export const OfLevel = { + Unknown: "unknown", + Debug: "debug", + Info: "info", + Warn: "warn", + Error: "error", + Fatal: "fatal", +} as const; +/** + * Returns logs of all levels equal to or above the provided level + */ +export type OfLevel = ClosedEnum; + +/** + * Returns log entries of all levels equal to the provided level + */ +export const ExactLevel = { + Unknown: "unknown", + Debug: "debug", + Info: "info", + Warn: "warn", + Error: "error", + Fatal: "fatal", +} as const; +/** + * Returns log entries of all levels equal to the provided level + */ +export type ExactLevel = ClosedEnum; + +export type ListProcessingLogEntriesRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; + /** + * Scopes returned log entries to a specific integration ID + */ + integrationSlug?: string | null | undefined; + /** + * Scopes returned log entries to a specific connection ID + */ + connectionId?: string | null | undefined; + /** + * Returns logs of all levels equal to or above the provided level + */ + ofLevel?: OfLevel | null | undefined; + /** + * Returns log entries of all levels equal to the provided level + */ + exactLevel?: ExactLevel | null | undefined; +}; + +/** @internal */ +export const OfLevel$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(OfLevel); + +/** @internal */ +export const OfLevel$outboundSchema: z.ZodNativeEnum = + OfLevel$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace OfLevel$ { + /** @deprecated use `OfLevel$inboundSchema` instead. */ + export const inboundSchema = OfLevel$inboundSchema; + /** @deprecated use `OfLevel$outboundSchema` instead. */ + export const outboundSchema = OfLevel$outboundSchema; +} + +/** @internal */ +export const ExactLevel$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ExactLevel); + +/** @internal */ +export const ExactLevel$outboundSchema: z.ZodNativeEnum = + ExactLevel$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExactLevel$ { + /** @deprecated use `ExactLevel$inboundSchema` instead. */ + export const inboundSchema = ExactLevel$inboundSchema; + /** @deprecated use `ExactLevel$outboundSchema` instead. */ + export const outboundSchema = ExactLevel$outboundSchema; +} + +/** @internal */ +export const ListProcessingLogEntriesRequest$inboundSchema: z.ZodType< + ListProcessingLogEntriesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + integration_slug: z.nullable(z.string()).optional(), + connection_id: z.nullable(z.string()).optional(), + of_level: z.nullable(OfLevel$inboundSchema).optional(), + exact_level: z.nullable(ExactLevel$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + "integration_slug": "integrationSlug", + "connection_id": "connectionId", + "of_level": "ofLevel", + "exact_level": "exactLevel", + }); +}); + +/** @internal */ +export type ListProcessingLogEntriesRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; + integration_slug?: string | null | undefined; + connection_id?: string | null | undefined; + of_level?: string | null | undefined; + exact_level?: string | null | undefined; +}; + +/** @internal */ +export const ListProcessingLogEntriesRequest$outboundSchema: z.ZodType< + ListProcessingLogEntriesRequest$Outbound, + z.ZodTypeDef, + ListProcessingLogEntriesRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + integrationSlug: z.nullable(z.string()).optional(), + connectionId: z.nullable(z.string()).optional(), + ofLevel: z.nullable(OfLevel$outboundSchema).optional(), + exactLevel: z.nullable(ExactLevel$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + integrationSlug: "integration_slug", + connectionId: "connection_id", + ofLevel: "of_level", + exactLevel: "exact_level", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListProcessingLogEntriesRequest$ { + /** @deprecated use `ListProcessingLogEntriesRequest$inboundSchema` instead. */ + export const inboundSchema = ListProcessingLogEntriesRequest$inboundSchema; + /** @deprecated use `ListProcessingLogEntriesRequest$outboundSchema` instead. */ + export const outboundSchema = ListProcessingLogEntriesRequest$outboundSchema; + /** @deprecated use `ListProcessingLogEntriesRequest$Outbound` instead. */ + export type Outbound = ListProcessingLogEntriesRequest$Outbound; +} + +export function listProcessingLogEntriesRequestToJSON( + listProcessingLogEntriesRequest: ListProcessingLogEntriesRequest, +): string { + return JSON.stringify( + ListProcessingLogEntriesRequest$outboundSchema.parse( + listProcessingLogEntriesRequest, + ), + ); +} + +export function listProcessingLogEntriesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListProcessingLogEntriesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListProcessingLogEntriesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listretrospectivemetrics.ts b/src/models/operations/listretrospectivemetrics.ts index 281c0375..1df90e05 100644 --- a/src/models/operations/listretrospectivemetrics.ts +++ b/src/models/operations/listretrospectivemetrics.ts @@ -13,11 +13,11 @@ export type ListRetrospectiveMetricsRequest = { /** * The start date to return metrics from */ - startDate?: RFCDate | undefined; + startDate?: RFCDate | null | undefined; /** * The end date to return metrics from */ - endDate?: RFCDate | undefined; + endDate?: RFCDate | null | undefined; }; /** @internal */ @@ -26,8 +26,8 @@ export const ListRetrospectiveMetricsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), }).transform((v) => { return remap$(v, { "start_date": "startDate", @@ -37,8 +37,8 @@ export const ListRetrospectiveMetricsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListRetrospectiveMetricsRequest$Outbound = { - start_date?: string | undefined; - end_date?: string | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; }; /** @internal */ @@ -47,8 +47,10 @@ export const ListRetrospectiveMetricsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListRetrospectiveMetricsRequest > = z.object({ - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), }).transform((v) => { return remap$(v, { startDate: "start_date", diff --git a/src/models/operations/listretrospectivequestions.ts b/src/models/operations/listretrospectivequestions.ts deleted file mode 100644 index 761760da..00000000 --- a/src/models/operations/listretrospectivequestions.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListRetrospectiveQuestionsRequest = { - page?: number | undefined; - perPage?: number | undefined; -}; - -/** @internal */ -export const ListRetrospectiveQuestionsRequest$inboundSchema: z.ZodType< - ListRetrospectiveQuestionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "per_page": "perPage", - }); -}); - -/** @internal */ -export type ListRetrospectiveQuestionsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; -}; - -/** @internal */ -export const ListRetrospectiveQuestionsRequest$outboundSchema: z.ZodType< - ListRetrospectiveQuestionsRequest$Outbound, - z.ZodTypeDef, - ListRetrospectiveQuestionsRequest -> = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - perPage: "per_page", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListRetrospectiveQuestionsRequest$ { - /** @deprecated use `ListRetrospectiveQuestionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListRetrospectiveQuestionsRequest$inboundSchema; - /** @deprecated use `ListRetrospectiveQuestionsRequest$outboundSchema` instead. */ - export const outboundSchema = - ListRetrospectiveQuestionsRequest$outboundSchema; - /** @deprecated use `ListRetrospectiveQuestionsRequest$Outbound` instead. */ - export type Outbound = ListRetrospectiveQuestionsRequest$Outbound; -} - -export function listRetrospectiveQuestionsRequestToJSON( - listRetrospectiveQuestionsRequest: ListRetrospectiveQuestionsRequest, -): string { - return JSON.stringify( - ListRetrospectiveQuestionsRequest$outboundSchema.parse( - listRetrospectiveQuestionsRequest, - ), - ); -} - -export function listRetrospectiveQuestionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListRetrospectiveQuestionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListRetrospectiveQuestionsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listretrospectivereportreasons.ts b/src/models/operations/listretrospectivereportreasons.ts deleted file mode 100644 index 5dcb6f1d..00000000 --- a/src/models/operations/listretrospectivereportreasons.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListRetrospectiveReportReasonsRequest = { - reportId: string; - page?: number | undefined; - perPage?: number | undefined; -}; - -/** @internal */ -export const ListRetrospectiveReportReasonsRequest$inboundSchema: z.ZodType< - ListRetrospectiveReportReasonsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - report_id: z.string(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "report_id": "reportId", - "per_page": "perPage", - }); -}); - -/** @internal */ -export type ListRetrospectiveReportReasonsRequest$Outbound = { - report_id: string; - page?: number | undefined; - per_page?: number | undefined; -}; - -/** @internal */ -export const ListRetrospectiveReportReasonsRequest$outboundSchema: z.ZodType< - ListRetrospectiveReportReasonsRequest$Outbound, - z.ZodTypeDef, - ListRetrospectiveReportReasonsRequest -> = z.object({ - reportId: z.string(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - reportId: "report_id", - perPage: "per_page", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListRetrospectiveReportReasonsRequest$ { - /** @deprecated use `ListRetrospectiveReportReasonsRequest$inboundSchema` instead. */ - export const inboundSchema = - ListRetrospectiveReportReasonsRequest$inboundSchema; - /** @deprecated use `ListRetrospectiveReportReasonsRequest$outboundSchema` instead. */ - export const outboundSchema = - ListRetrospectiveReportReasonsRequest$outboundSchema; - /** @deprecated use `ListRetrospectiveReportReasonsRequest$Outbound` instead. */ - export type Outbound = ListRetrospectiveReportReasonsRequest$Outbound; -} - -export function listRetrospectiveReportReasonsRequestToJSON( - listRetrospectiveReportReasonsRequest: ListRetrospectiveReportReasonsRequest, -): string { - return JSON.stringify( - ListRetrospectiveReportReasonsRequest$outboundSchema.parse( - listRetrospectiveReportReasonsRequest, - ), - ); -} - -export function listRetrospectiveReportReasonsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ListRetrospectiveReportReasonsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListRetrospectiveReportReasonsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listretrospectivereports.ts b/src/models/operations/listretrospectivereports.ts deleted file mode 100644 index d4ff49f8..00000000 --- a/src/models/operations/listretrospectivereports.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListRetrospectiveReportsRequest = { - page?: number | undefined; - perPage?: number | undefined; - /** - * Filter the reports by an incident ID - */ - incidentId?: string | undefined; - /** - * Filter for reports updated after the given ISO8601 timestamp - */ - updatedSince?: Date | undefined; -}; - -/** @internal */ -export const ListRetrospectiveReportsRequest$inboundSchema: z.ZodType< - ListRetrospectiveReportsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - incident_id: z.string().optional(), - updated_since: z.string().datetime({ offset: true }).transform(v => - new Date(v) - ).optional(), -}).transform((v) => { - return remap$(v, { - "per_page": "perPage", - "incident_id": "incidentId", - "updated_since": "updatedSince", - }); -}); - -/** @internal */ -export type ListRetrospectiveReportsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - incident_id?: string | undefined; - updated_since?: string | undefined; -}; - -/** @internal */ -export const ListRetrospectiveReportsRequest$outboundSchema: z.ZodType< - ListRetrospectiveReportsRequest$Outbound, - z.ZodTypeDef, - ListRetrospectiveReportsRequest -> = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - incidentId: z.string().optional(), - updatedSince: z.date().transform(v => v.toISOString()).optional(), -}).transform((v) => { - return remap$(v, { - perPage: "per_page", - incidentId: "incident_id", - updatedSince: "updated_since", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListRetrospectiveReportsRequest$ { - /** @deprecated use `ListRetrospectiveReportsRequest$inboundSchema` instead. */ - export const inboundSchema = ListRetrospectiveReportsRequest$inboundSchema; - /** @deprecated use `ListRetrospectiveReportsRequest$outboundSchema` instead. */ - export const outboundSchema = ListRetrospectiveReportsRequest$outboundSchema; - /** @deprecated use `ListRetrospectiveReportsRequest$Outbound` instead. */ - export type Outbound = ListRetrospectiveReportsRequest$Outbound; -} - -export function listRetrospectiveReportsRequestToJSON( - listRetrospectiveReportsRequest: ListRetrospectiveReportsRequest, -): string { - return JSON.stringify( - ListRetrospectiveReportsRequest$outboundSchema.parse( - listRetrospectiveReportsRequest, - ), - ); -} - -export function listRetrospectiveReportsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListRetrospectiveReportsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListRetrospectiveReportsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listretrospectives.ts b/src/models/operations/listretrospectives.ts new file mode 100644 index 00000000..331bb809 --- /dev/null +++ b/src/models/operations/listretrospectives.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListRetrospectivesRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; + /** + * Filter the reports by an incident ID + */ + incidentId?: string | null | undefined; + /** + * Filter for reports updated after the given ISO8601 timestamp + */ + updatedSince?: Date | null | undefined; +}; + +/** @internal */ +export const ListRetrospectivesRequest$inboundSchema: z.ZodType< + ListRetrospectivesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + incident_id: z.nullable(z.string()).optional(), + updated_since: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + "incident_id": "incidentId", + "updated_since": "updatedSince", + }); +}); + +/** @internal */ +export type ListRetrospectivesRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; + incident_id?: string | null | undefined; + updated_since?: string | null | undefined; +}; + +/** @internal */ +export const ListRetrospectivesRequest$outboundSchema: z.ZodType< + ListRetrospectivesRequest$Outbound, + z.ZodTypeDef, + ListRetrospectivesRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + incidentId: z.nullable(z.string()).optional(), + updatedSince: z.nullable(z.date().transform(v => v.toISOString())).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + incidentId: "incident_id", + updatedSince: "updated_since", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListRetrospectivesRequest$ { + /** @deprecated use `ListRetrospectivesRequest$inboundSchema` instead. */ + export const inboundSchema = ListRetrospectivesRequest$inboundSchema; + /** @deprecated use `ListRetrospectivesRequest$outboundSchema` instead. */ + export const outboundSchema = ListRetrospectivesRequest$outboundSchema; + /** @deprecated use `ListRetrospectivesRequest$Outbound` instead. */ + export type Outbound = ListRetrospectivesRequest$Outbound; +} + +export function listRetrospectivesRequestToJSON( + listRetrospectivesRequest: ListRetrospectivesRequest, +): string { + return JSON.stringify( + ListRetrospectivesRequest$outboundSchema.parse(listRetrospectivesRequest), + ); +} + +export function listRetrospectivesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListRetrospectivesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListRetrospectivesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listretrospectivetemplates.ts b/src/models/operations/listretrospectivetemplates.ts new file mode 100644 index 00000000..cd672eec --- /dev/null +++ b/src/models/operations/listretrospectivetemplates.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListRetrospectiveTemplatesRequest = { + page?: number | null | undefined; + perPage?: number | null | undefined; + forIncident?: string | null | undefined; +}; + +/** @internal */ +export const ListRetrospectiveTemplatesRequest$inboundSchema: z.ZodType< + ListRetrospectiveTemplatesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + for_incident: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + "for_incident": "forIncident", + }); +}); + +/** @internal */ +export type ListRetrospectiveTemplatesRequest$Outbound = { + page?: number | null | undefined; + per_page?: number | null | undefined; + for_incident?: string | null | undefined; +}; + +/** @internal */ +export const ListRetrospectiveTemplatesRequest$outboundSchema: z.ZodType< + ListRetrospectiveTemplatesRequest$Outbound, + z.ZodTypeDef, + ListRetrospectiveTemplatesRequest +> = z.object({ + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + forIncident: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + forIncident: "for_incident", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListRetrospectiveTemplatesRequest$ { + /** @deprecated use `ListRetrospectiveTemplatesRequest$inboundSchema` instead. */ + export const inboundSchema = ListRetrospectiveTemplatesRequest$inboundSchema; + /** @deprecated use `ListRetrospectiveTemplatesRequest$outboundSchema` instead. */ + export const outboundSchema = + ListRetrospectiveTemplatesRequest$outboundSchema; + /** @deprecated use `ListRetrospectiveTemplatesRequest$Outbound` instead. */ + export type Outbound = ListRetrospectiveTemplatesRequest$Outbound; +} + +export function listRetrospectiveTemplatesRequestToJSON( + listRetrospectiveTemplatesRequest: ListRetrospectiveTemplatesRequest, +): string { + return JSON.stringify( + ListRetrospectiveTemplatesRequest$outboundSchema.parse( + listRetrospectiveTemplatesRequest, + ), + ); +} + +export function listRetrospectiveTemplatesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListRetrospectiveTemplatesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListRetrospectiveTemplatesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listrunbookactions.ts b/src/models/operations/listrunbookactions.ts index 0cc506ff..30f0baa0 100644 --- a/src/models/operations/listrunbookactions.ts +++ b/src/models/operations/listrunbookactions.ts @@ -9,16 +9,16 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListRunbookActionsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * List actions supporting this specific Runbook type */ - type?: string | undefined; + type?: string | null | undefined; /** * Boolean to determine whether to return a slimified version of the action object's integration */ - lite?: boolean | undefined; + lite?: boolean | null | undefined; }; /** @internal */ @@ -27,10 +27,10 @@ export const ListRunbookActionsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - type: z.string().optional(), - lite: z.boolean().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + type: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -39,10 +39,10 @@ export const ListRunbookActionsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListRunbookActionsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - type?: string | undefined; - lite?: boolean | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + type?: string | null | undefined; + lite?: boolean | null | undefined; }; /** @internal */ @@ -51,10 +51,10 @@ export const ListRunbookActionsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListRunbookActionsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - type: z.string().optional(), - lite: z.boolean().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + type: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listrunbookaudits.ts b/src/models/operations/listrunbookaudits.ts index a7558b76..1a79b22d 100644 --- a/src/models/operations/listrunbookaudits.ts +++ b/src/models/operations/listrunbookaudits.ts @@ -22,16 +22,16 @@ export const AuditableType = { export type AuditableType = ClosedEnum; export type ListRunbookAuditsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A query to filter audits by type */ - auditableType?: AuditableType | undefined; + auditableType?: AuditableType | null | undefined; /** * A query to sort audits by their created_at timestamp. Options are 'asc' or 'desc' */ - sort?: string | undefined; + sort?: string | null | undefined; }; /** @internal */ @@ -61,10 +61,12 @@ export const ListRunbookAuditsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - auditable_type: AuditableType$inboundSchema.default("Runbooks::Step"), - sort: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + auditable_type: z.nullable( + AuditableType$inboundSchema.default("Runbooks::Step"), + ), + sort: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -74,10 +76,10 @@ export const ListRunbookAuditsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListRunbookAuditsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - auditable_type: string; - sort?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + auditable_type: string | null; + sort?: string | null | undefined; }; /** @internal */ @@ -86,10 +88,12 @@ export const ListRunbookAuditsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListRunbookAuditsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - auditableType: AuditableType$outboundSchema.default("Runbooks::Step"), - sort: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + auditableType: z.nullable( + AuditableType$outboundSchema.default("Runbooks::Step"), + ), + sort: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listrunbookexecutions.ts b/src/models/operations/listrunbookexecutions.ts index 9aa87819..6139fdd3 100644 --- a/src/models/operations/listrunbookexecutions.ts +++ b/src/models/operations/listrunbookexecutions.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListRunbookExecutionsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListRunbookExecutionsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListRunbookExecutionsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListRunbookExecutionsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListRunbookExecutionsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListRunbookExecutionsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listrunbooks.ts b/src/models/operations/listrunbooks.ts index 0891c25d..b9c01931 100644 --- a/src/models/operations/listrunbooks.ts +++ b/src/models/operations/listrunbooks.ts @@ -10,55 +10,126 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** - * Sort runbooks by their updated date. Accepts 'asc', 'desc' + * Sort runbooks by their updated date. Accepts 'asc', 'desc'. This parameter is deprecated in favor of 'order_by' and 'order_direction'. */ -export const ListRunbooksQueryParamSort = { +export const ListRunbooksSort = { Asc: "asc", Desc: "desc", } as const; /** - * Sort runbooks by their updated date. Accepts 'asc', 'desc' + * Sort runbooks by their updated date. Accepts 'asc', 'desc'. This parameter is deprecated in favor of 'order_by' and 'order_direction'. */ -export type ListRunbooksQueryParamSort = ClosedEnum< - typeof ListRunbooksQueryParamSort ->; +export type ListRunbooksSort = ClosedEnum; + +/** + * Sort runbooks by their updated date or name. Accepts 'updated_at', 'name', and 'created_at'. + */ +export const OrderBy = { + UpdatedAt: "updated_at", + Name: "name", + CreatedAt: "created_at", +} as const; +/** + * Sort runbooks by their updated date or name. Accepts 'updated_at', 'name', and 'created_at'. + */ +export type OrderBy = ClosedEnum; + +/** + * Allows assigning a direction to how the specified `order_by` parameter is sorted. This parameter must be paired with `order_by` and does nothing on its own. + */ +export const OrderDirection = { + Asc: "asc", + Desc: "desc", +} as const; +/** + * Allows assigning a direction to how the specified `order_by` parameter is sorted. This parameter must be paired with `order_by` and does nothing on its own. + */ +export type OrderDirection = ClosedEnum; export type ListRunbooksRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A query to search runbooks by their name */ - name?: string | undefined; + name?: string | null | undefined; /** * A query to search runbooks by their owners */ - owners?: string | undefined; + owners?: string | null | undefined; /** - * Sort runbooks by their updated date. Accepts 'asc', 'desc' + * Sort runbooks by their updated date. Accepts 'asc', 'desc'. This parameter is deprecated in favor of 'order_by' and 'order_direction'. */ - sort?: ListRunbooksQueryParamSort | undefined; + sort?: ListRunbooksSort | null | undefined; + /** + * Sort runbooks by their updated date or name. Accepts 'updated_at', 'name', and 'created_at'. + */ + orderBy?: OrderBy | null | undefined; + /** + * Allows assigning a direction to how the specified `order_by` parameter is sorted. This parameter must be paired with `order_by` and does nothing on its own. + */ + orderDirection?: OrderDirection | null | undefined; }; /** @internal */ -export const ListRunbooksQueryParamSort$inboundSchema: z.ZodNativeEnum< - typeof ListRunbooksQueryParamSort -> = z.nativeEnum(ListRunbooksQueryParamSort); +export const ListRunbooksSort$inboundSchema: z.ZodNativeEnum< + typeof ListRunbooksSort +> = z.nativeEnum(ListRunbooksSort); + +/** @internal */ +export const ListRunbooksSort$outboundSchema: z.ZodNativeEnum< + typeof ListRunbooksSort +> = ListRunbooksSort$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListRunbooksSort$ { + /** @deprecated use `ListRunbooksSort$inboundSchema` instead. */ + export const inboundSchema = ListRunbooksSort$inboundSchema; + /** @deprecated use `ListRunbooksSort$outboundSchema` instead. */ + export const outboundSchema = ListRunbooksSort$outboundSchema; +} + +/** @internal */ +export const OrderBy$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(OrderBy); + +/** @internal */ +export const OrderBy$outboundSchema: z.ZodNativeEnum = + OrderBy$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace OrderBy$ { + /** @deprecated use `OrderBy$inboundSchema` instead. */ + export const inboundSchema = OrderBy$inboundSchema; + /** @deprecated use `OrderBy$outboundSchema` instead. */ + export const outboundSchema = OrderBy$outboundSchema; +} + +/** @internal */ +export const OrderDirection$inboundSchema: z.ZodNativeEnum< + typeof OrderDirection +> = z.nativeEnum(OrderDirection); /** @internal */ -export const ListRunbooksQueryParamSort$outboundSchema: z.ZodNativeEnum< - typeof ListRunbooksQueryParamSort -> = ListRunbooksQueryParamSort$inboundSchema; +export const OrderDirection$outboundSchema: z.ZodNativeEnum< + typeof OrderDirection +> = OrderDirection$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ListRunbooksQueryParamSort$ { - /** @deprecated use `ListRunbooksQueryParamSort$inboundSchema` instead. */ - export const inboundSchema = ListRunbooksQueryParamSort$inboundSchema; - /** @deprecated use `ListRunbooksQueryParamSort$outboundSchema` instead. */ - export const outboundSchema = ListRunbooksQueryParamSort$outboundSchema; +export namespace OrderDirection$ { + /** @deprecated use `OrderDirection$inboundSchema` instead. */ + export const inboundSchema = OrderDirection$inboundSchema; + /** @deprecated use `OrderDirection$outboundSchema` instead. */ + export const outboundSchema = OrderDirection$outboundSchema; } /** @internal */ @@ -67,24 +138,30 @@ export const ListRunbooksRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - name: z.string().optional(), - owners: z.string().optional(), - sort: ListRunbooksQueryParamSort$inboundSchema.optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + name: z.nullable(z.string()).optional(), + owners: z.nullable(z.string()).optional(), + sort: z.nullable(ListRunbooksSort$inboundSchema).optional(), + order_by: z.nullable(OrderBy$inboundSchema).optional(), + order_direction: z.nullable(OrderDirection$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", + "order_by": "orderBy", + "order_direction": "orderDirection", }); }); /** @internal */ export type ListRunbooksRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - name?: string | undefined; - owners?: string | undefined; - sort?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + name?: string | null | undefined; + owners?: string | null | undefined; + sort?: string | null | undefined; + order_by?: string | null | undefined; + order_direction?: string | null | undefined; }; /** @internal */ @@ -93,14 +170,18 @@ export const ListRunbooksRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListRunbooksRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - name: z.string().optional(), - owners: z.string().optional(), - sort: ListRunbooksQueryParamSort$outboundSchema.optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + name: z.nullable(z.string()).optional(), + owners: z.nullable(z.string()).optional(), + sort: z.nullable(ListRunbooksSort$outboundSchema).optional(), + orderBy: z.nullable(OrderBy$outboundSchema).optional(), + orderDirection: z.nullable(OrderDirection$outboundSchema).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", + orderBy: "order_by", + orderDirection: "order_direction", }); }); diff --git a/src/models/operations/listsavedsearches.ts b/src/models/operations/listsavedsearches.ts index 44fdbe40..8cc2b5b9 100644 --- a/src/models/operations/listsavedsearches.ts +++ b/src/models/operations/listsavedsearches.ts @@ -9,7 +9,7 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const ResourceType = { +export const ListSavedSearchesResourceType = { ChangeEvents: "change_events", Incidents: "incidents", Services: "services", @@ -21,39 +21,43 @@ export const ResourceType = { Alerts: "alerts", IncidentEvents: "incident_events", } as const; -export type ResourceType = ClosedEnum; +export type ListSavedSearchesResourceType = ClosedEnum< + typeof ListSavedSearchesResourceType +>; export type ListSavedSearchesRequest = { - resourceType: ResourceType; + resourceType: ListSavedSearchesResourceType; /** * The user ID used to filter saved searches. */ - userId?: string | undefined; + userId?: string | null | undefined; /** * Filter saved searches with a query on their name */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ -export const ResourceType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(ResourceType); +export const ListSavedSearchesResourceType$inboundSchema: z.ZodNativeEnum< + typeof ListSavedSearchesResourceType +> = z.nativeEnum(ListSavedSearchesResourceType); /** @internal */ -export const ResourceType$outboundSchema: z.ZodNativeEnum = - ResourceType$inboundSchema; +export const ListSavedSearchesResourceType$outboundSchema: z.ZodNativeEnum< + typeof ListSavedSearchesResourceType +> = ListSavedSearchesResourceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ResourceType$ { - /** @deprecated use `ResourceType$inboundSchema` instead. */ - export const inboundSchema = ResourceType$inboundSchema; - /** @deprecated use `ResourceType$outboundSchema` instead. */ - export const outboundSchema = ResourceType$outboundSchema; +export namespace ListSavedSearchesResourceType$ { + /** @deprecated use `ListSavedSearchesResourceType$inboundSchema` instead. */ + export const inboundSchema = ListSavedSearchesResourceType$inboundSchema; + /** @deprecated use `ListSavedSearchesResourceType$outboundSchema` instead. */ + export const outboundSchema = ListSavedSearchesResourceType$outboundSchema; } /** @internal */ @@ -62,11 +66,11 @@ export const ListSavedSearchesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - resource_type: ResourceType$inboundSchema, - user_id: z.string().optional(), - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + resource_type: ListSavedSearchesResourceType$inboundSchema, + user_id: z.nullable(z.string()).optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "resource_type": "resourceType", @@ -78,10 +82,10 @@ export const ListSavedSearchesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListSavedSearchesRequest$Outbound = { resource_type: string; - user_id?: string | undefined; - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + user_id?: string | null | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -90,11 +94,11 @@ export const ListSavedSearchesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListSavedSearchesRequest > = z.object({ - resourceType: ResourceType$outboundSchema, - userId: z.string().optional(), - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + resourceType: ListSavedSearchesResourceType$outboundSchema, + userId: z.nullable(z.string()).optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { resourceType: "resource_type", diff --git a/src/models/operations/listscheduledmaintenances.ts b/src/models/operations/listscheduledmaintenances.ts index 0650ca73..08d177d7 100644 --- a/src/models/operations/listscheduledmaintenances.ts +++ b/src/models/operations/listscheduledmaintenances.ts @@ -12,9 +12,9 @@ export type ListScheduledMaintenancesRequest = { /** * Filter scheduled_maintenances with a query on their name */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -23,9 +23,9 @@ export const ListScheduledMaintenancesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -34,9 +34,9 @@ export const ListScheduledMaintenancesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListScheduledMaintenancesRequest$Outbound = { - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -45,9 +45,9 @@ export const ListScheduledMaintenancesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListScheduledMaintenancesRequest > = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listschedules.ts b/src/models/operations/listschedules.ts index e3e9edd5..9eab3ef8 100644 --- a/src/models/operations/listschedules.ts +++ b/src/models/operations/listschedules.ts @@ -12,9 +12,9 @@ export type ListSchedulesRequest = { /** * Filter schedules with a query on their name */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -23,9 +23,9 @@ export const ListSchedulesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -34,9 +34,9 @@ export const ListSchedulesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListSchedulesRequest$Outbound = { - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -45,9 +45,9 @@ export const ListSchedulesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListSchedulesRequest > = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listscimgroups.ts b/src/models/operations/listscimgroups.ts new file mode 100644 index 00000000..4947b305 --- /dev/null +++ b/src/models/operations/listscimgroups.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListScimGroupsRequest = { + startIndex?: number | null | undefined; + count?: number | null | undefined; + /** + * This is a string used to query groups by displayName. + * + * @remarks + * Proper example syntax for this would be `?filter=displayName eq "My Team Name"`. + * Currently we only support the `eq` operator + */ + filter?: string | null | undefined; +}; + +/** @internal */ +export const ListScimGroupsRequest$inboundSchema: z.ZodType< + ListScimGroupsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + startIndex: z.nullable(z.number().int()).optional(), + count: z.nullable(z.number().int()).optional(), + filter: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ListScimGroupsRequest$Outbound = { + startIndex?: number | null | undefined; + count?: number | null | undefined; + filter?: string | null | undefined; +}; + +/** @internal */ +export const ListScimGroupsRequest$outboundSchema: z.ZodType< + ListScimGroupsRequest$Outbound, + z.ZodTypeDef, + ListScimGroupsRequest +> = z.object({ + startIndex: z.nullable(z.number().int()).optional(), + count: z.nullable(z.number().int()).optional(), + filter: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListScimGroupsRequest$ { + /** @deprecated use `ListScimGroupsRequest$inboundSchema` instead. */ + export const inboundSchema = ListScimGroupsRequest$inboundSchema; + /** @deprecated use `ListScimGroupsRequest$outboundSchema` instead. */ + export const outboundSchema = ListScimGroupsRequest$outboundSchema; + /** @deprecated use `ListScimGroupsRequest$Outbound` instead. */ + export type Outbound = ListScimGroupsRequest$Outbound; +} + +export function listScimGroupsRequestToJSON( + listScimGroupsRequest: ListScimGroupsRequest, +): string { + return JSON.stringify( + ListScimGroupsRequest$outboundSchema.parse(listScimGroupsRequest), + ); +} + +export function listScimGroupsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListScimGroupsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListScimGroupsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listscimusers.ts b/src/models/operations/listscimusers.ts new file mode 100644 index 00000000..fbb44658 --- /dev/null +++ b/src/models/operations/listscimusers.ts @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListScimUsersRequest = { + /** + * This is a string used to query users by either userName or email. + * + * @remarks + * Proper example syntax for this would be `?filter=userName eq john` or `?filter=userName eq "john@firehydrant.com"`. + * Currently we only support the `eq` operator + */ + filter?: string | null | undefined; + /** + * This is an integer which represents a pagination offset + */ + startIndex?: number | null | undefined; + /** + * This is an integer which represents the number of items per page in the response + */ + count?: number | null | undefined; +}; + +/** @internal */ +export const ListScimUsersRequest$inboundSchema: z.ZodType< + ListScimUsersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + filter: z.nullable(z.string()).optional(), + startIndex: z.nullable(z.number().int()).optional(), + count: z.nullable(z.number().int()).optional(), +}); + +/** @internal */ +export type ListScimUsersRequest$Outbound = { + filter?: string | null | undefined; + startIndex?: number | null | undefined; + count?: number | null | undefined; +}; + +/** @internal */ +export const ListScimUsersRequest$outboundSchema: z.ZodType< + ListScimUsersRequest$Outbound, + z.ZodTypeDef, + ListScimUsersRequest +> = z.object({ + filter: z.nullable(z.string()).optional(), + startIndex: z.nullable(z.number().int()).optional(), + count: z.nullable(z.number().int()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListScimUsersRequest$ { + /** @deprecated use `ListScimUsersRequest$inboundSchema` instead. */ + export const inboundSchema = ListScimUsersRequest$inboundSchema; + /** @deprecated use `ListScimUsersRequest$outboundSchema` instead. */ + export const outboundSchema = ListScimUsersRequest$outboundSchema; + /** @deprecated use `ListScimUsersRequest$Outbound` instead. */ + export type Outbound = ListScimUsersRequest$Outbound; +} + +export function listScimUsersRequestToJSON( + listScimUsersRequest: ListScimUsersRequest, +): string { + return JSON.stringify( + ListScimUsersRequest$outboundSchema.parse(listScimUsersRequest), + ); +} + +export function listScimUsersRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListScimUsersRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListScimUsersRequest' from JSON`, + ); +} diff --git a/src/models/operations/listservices.ts b/src/models/operations/listservices.ts index 7b863ce3..3bf90420 100644 --- a/src/models/operations/listservices.ts +++ b/src/models/operations/listservices.ts @@ -9,56 +9,56 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListServicesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A comma separated list of label key / values in the format of 'key=value,key2=value2'. To filter change events that have a key (with no specific value), omit the value */ - labels?: string | undefined; + labels?: string | null | undefined; /** * A query to search services by their name or description */ - query?: string | undefined; + query?: string | null | undefined; /** * A query to search services by their name */ - name?: string | undefined; + name?: string | null | undefined; /** * A query to search services by their tier */ - tiers?: string | undefined; + tiers?: string | null | undefined; /** * A query to search services by if they are impacted with active incidents */ - impacted?: string | undefined; + impacted?: string | null | undefined; /** * A query to search services by their owner */ - owner?: string | undefined; + owner?: string | null | undefined; /** * A comma separated list of team ids */ - respondingTeams?: string | undefined; + respondingTeams?: string | null | undefined; /** * A comma separated list of functionality ids */ - functionalities?: string | undefined; + functionalities?: string | null | undefined; /** * A query to find services that are available to be downstream dependencies for the passed service ID */ - availableDownstreamDependenciesForId?: string | undefined; + availableDownstreamDependenciesForId?: string | null | undefined; /** * A query to find services that are available to be upstream dependencies for the passed service ID */ - availableUpstreamDependenciesForId?: string | undefined; + availableUpstreamDependenciesForId?: string | null | undefined; /** * Boolean to determine whether to return a slimified version of the services object */ - lite?: boolean | undefined; + lite?: boolean | null | undefined; /** * Use in conjunction with lite param to specify additional attributes to include */ - include?: Array | undefined; + include?: Array | null | undefined; }; /** @internal */ @@ -67,20 +67,20 @@ export const ListServicesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - labels: z.string().optional(), - query: z.string().optional(), - name: z.string().optional(), - tiers: z.string().optional(), - impacted: z.string().optional(), - owner: z.string().optional(), - responding_teams: z.string().optional(), - functionalities: z.string().optional(), - available_downstream_dependencies_for_id: z.string().optional(), - available_upstream_dependencies_for_id: z.string().optional(), - lite: z.boolean().optional(), - include: z.array(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + labels: z.nullable(z.string()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + tiers: z.nullable(z.string()).optional(), + impacted: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + responding_teams: z.nullable(z.string()).optional(), + functionalities: z.nullable(z.string()).optional(), + available_downstream_dependencies_for_id: z.nullable(z.string()).optional(), + available_upstream_dependencies_for_id: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), + include: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -94,20 +94,20 @@ export const ListServicesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListServicesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - labels?: string | undefined; - query?: string | undefined; - name?: string | undefined; - tiers?: string | undefined; - impacted?: string | undefined; - owner?: string | undefined; - responding_teams?: string | undefined; - functionalities?: string | undefined; - available_downstream_dependencies_for_id?: string | undefined; - available_upstream_dependencies_for_id?: string | undefined; - lite?: boolean | undefined; - include?: Array | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + labels?: string | null | undefined; + query?: string | null | undefined; + name?: string | null | undefined; + tiers?: string | null | undefined; + impacted?: string | null | undefined; + owner?: string | null | undefined; + responding_teams?: string | null | undefined; + functionalities?: string | null | undefined; + available_downstream_dependencies_for_id?: string | null | undefined; + available_upstream_dependencies_for_id?: string | null | undefined; + lite?: boolean | null | undefined; + include?: Array | null | undefined; }; /** @internal */ @@ -116,20 +116,20 @@ export const ListServicesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListServicesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - labels: z.string().optional(), - query: z.string().optional(), - name: z.string().optional(), - tiers: z.string().optional(), - impacted: z.string().optional(), - owner: z.string().optional(), - respondingTeams: z.string().optional(), - functionalities: z.string().optional(), - availableDownstreamDependenciesForId: z.string().optional(), - availableUpstreamDependenciesForId: z.string().optional(), - lite: z.boolean().optional(), - include: z.array(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + labels: z.nullable(z.string()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + tiers: z.nullable(z.string()).optional(), + impacted: z.nullable(z.string()).optional(), + owner: z.nullable(z.string()).optional(), + respondingTeams: z.nullable(z.string()).optional(), + functionalities: z.nullable(z.string()).optional(), + availableDownstreamDependenciesForId: z.nullable(z.string()).optional(), + availableUpstreamDependenciesForId: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), + include: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listseverities.ts b/src/models/operations/listseverities.ts index 0df7d4d2..bc2069d2 100644 --- a/src/models/operations/listseverities.ts +++ b/src/models/operations/listseverities.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListSeveritiesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListSeveritiesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListSeveritiesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListSeveritiesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListSeveritiesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListSeveritiesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listseveritymatrixconditions.ts b/src/models/operations/listseveritymatrixconditions.ts index b2929548..8c82e7f0 100644 --- a/src/models/operations/listseveritymatrixconditions.ts +++ b/src/models/operations/listseveritymatrixconditions.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListSeverityMatrixConditionsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListSeverityMatrixConditionsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListSeverityMatrixConditionsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListSeverityMatrixConditionsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListSeverityMatrixConditionsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListSeverityMatrixConditionsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listseveritymatriximpacts.ts b/src/models/operations/listseveritymatriximpacts.ts index c686255b..9eeb296d 100644 --- a/src/models/operations/listseveritymatriximpacts.ts +++ b/src/models/operations/listseveritymatriximpacts.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListSeverityMatrixImpactsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListSeverityMatrixImpactsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListSeverityMatrixImpactsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListSeverityMatrixImpactsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListSeverityMatrixImpactsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListSeverityMatrixImpactsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listsignalemailtargets.ts b/src/models/operations/listsignalemailtargets.ts deleted file mode 100644 index 7301bedc..00000000 --- a/src/models/operations/listsignalemailtargets.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListSignalEmailTargetsRequest = { - /** - * A query string to search the list of targets by. - */ - query?: string | undefined; -}; - -/** @internal */ -export const ListSignalEmailTargetsRequest$inboundSchema: z.ZodType< - ListSignalEmailTargetsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - query: z.string().optional(), -}); - -/** @internal */ -export type ListSignalEmailTargetsRequest$Outbound = { - query?: string | undefined; -}; - -/** @internal */ -export const ListSignalEmailTargetsRequest$outboundSchema: z.ZodType< - ListSignalEmailTargetsRequest$Outbound, - z.ZodTypeDef, - ListSignalEmailTargetsRequest -> = z.object({ - query: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListSignalEmailTargetsRequest$ { - /** @deprecated use `ListSignalEmailTargetsRequest$inboundSchema` instead. */ - export const inboundSchema = ListSignalEmailTargetsRequest$inboundSchema; - /** @deprecated use `ListSignalEmailTargetsRequest$outboundSchema` instead. */ - export const outboundSchema = ListSignalEmailTargetsRequest$outboundSchema; - /** @deprecated use `ListSignalEmailTargetsRequest$Outbound` instead. */ - export type Outbound = ListSignalEmailTargetsRequest$Outbound; -} - -export function listSignalEmailTargetsRequestToJSON( - listSignalEmailTargetsRequest: ListSignalEmailTargetsRequest, -): string { - return JSON.stringify( - ListSignalEmailTargetsRequest$outboundSchema.parse( - listSignalEmailTargetsRequest, - ), - ); -} - -export function listSignalEmailTargetsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListSignalEmailTargetsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListSignalEmailTargetsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listsignaleventsources.ts b/src/models/operations/listsignaleventsources.ts deleted file mode 100644 index c02c87b9..00000000 --- a/src/models/operations/listsignaleventsources.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListSignalEventSourcesRequest = { - /** - * Team ID to send signals to directly - */ - teamId?: string | undefined; - /** - * Escalation policy ID to send signals to directly. `team_id` is required if this is provided. - */ - escalationPolicyId?: string | undefined; - /** - * On-call schedule ID to send signals to directly. `team_id` is required if this is provided. - */ - onCallScheduleId?: string | undefined; - /** - * User ID to send signals to directly - */ - userId?: string | undefined; -}; - -/** @internal */ -export const ListSignalEventSourcesRequest$inboundSchema: z.ZodType< - ListSignalEventSourcesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - team_id: z.string().optional(), - escalation_policy_id: z.string().optional(), - on_call_schedule_id: z.string().optional(), - user_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "escalation_policy_id": "escalationPolicyId", - "on_call_schedule_id": "onCallScheduleId", - "user_id": "userId", - }); -}); - -/** @internal */ -export type ListSignalEventSourcesRequest$Outbound = { - team_id?: string | undefined; - escalation_policy_id?: string | undefined; - on_call_schedule_id?: string | undefined; - user_id?: string | undefined; -}; - -/** @internal */ -export const ListSignalEventSourcesRequest$outboundSchema: z.ZodType< - ListSignalEventSourcesRequest$Outbound, - z.ZodTypeDef, - ListSignalEventSourcesRequest -> = z.object({ - teamId: z.string().optional(), - escalationPolicyId: z.string().optional(), - onCallScheduleId: z.string().optional(), - userId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - escalationPolicyId: "escalation_policy_id", - onCallScheduleId: "on_call_schedule_id", - userId: "user_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListSignalEventSourcesRequest$ { - /** @deprecated use `ListSignalEventSourcesRequest$inboundSchema` instead. */ - export const inboundSchema = ListSignalEventSourcesRequest$inboundSchema; - /** @deprecated use `ListSignalEventSourcesRequest$outboundSchema` instead. */ - export const outboundSchema = ListSignalEventSourcesRequest$outboundSchema; - /** @deprecated use `ListSignalEventSourcesRequest$Outbound` instead. */ - export type Outbound = ListSignalEventSourcesRequest$Outbound; -} - -export function listSignalEventSourcesRequestToJSON( - listSignalEventSourcesRequest: ListSignalEventSourcesRequest, -): string { - return JSON.stringify( - ListSignalEventSourcesRequest$outboundSchema.parse( - listSignalEventSourcesRequest, - ), - ); -} - -export function listSignalEventSourcesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListSignalEventSourcesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListSignalEventSourcesRequest' from JSON`, - ); -} diff --git a/src/models/operations/listsignalsemailtargets.ts b/src/models/operations/listsignalsemailtargets.ts new file mode 100644 index 00000000..12819755 --- /dev/null +++ b/src/models/operations/listsignalsemailtargets.ts @@ -0,0 +1,71 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListSignalsEmailTargetsRequest = { + /** + * A query string to search the list of targets by. + */ + query?: string | null | undefined; +}; + +/** @internal */ +export const ListSignalsEmailTargetsRequest$inboundSchema: z.ZodType< + ListSignalsEmailTargetsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + query: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ListSignalsEmailTargetsRequest$Outbound = { + query?: string | null | undefined; +}; + +/** @internal */ +export const ListSignalsEmailTargetsRequest$outboundSchema: z.ZodType< + ListSignalsEmailTargetsRequest$Outbound, + z.ZodTypeDef, + ListSignalsEmailTargetsRequest +> = z.object({ + query: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListSignalsEmailTargetsRequest$ { + /** @deprecated use `ListSignalsEmailTargetsRequest$inboundSchema` instead. */ + export const inboundSchema = ListSignalsEmailTargetsRequest$inboundSchema; + /** @deprecated use `ListSignalsEmailTargetsRequest$outboundSchema` instead. */ + export const outboundSchema = ListSignalsEmailTargetsRequest$outboundSchema; + /** @deprecated use `ListSignalsEmailTargetsRequest$Outbound` instead. */ + export type Outbound = ListSignalsEmailTargetsRequest$Outbound; +} + +export function listSignalsEmailTargetsRequestToJSON( + listSignalsEmailTargetsRequest: ListSignalsEmailTargetsRequest, +): string { + return JSON.stringify( + ListSignalsEmailTargetsRequest$outboundSchema.parse( + listSignalsEmailTargetsRequest, + ), + ); +} + +export function listSignalsEmailTargetsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListSignalsEmailTargetsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListSignalsEmailTargetsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listsignalseventsources.ts b/src/models/operations/listsignalseventsources.ts new file mode 100644 index 00000000..7b273b4b --- /dev/null +++ b/src/models/operations/listsignalseventsources.ts @@ -0,0 +1,107 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListSignalsEventSourcesRequest = { + /** + * Team ID to send signals to directly + */ + teamId?: string | null | undefined; + /** + * Escalation policy ID to send signals to directly. `team_id` is required if this is provided. + */ + escalationPolicyId?: string | null | undefined; + /** + * On-call schedule ID to send signals to directly. `team_id` is required if this is provided. + */ + onCallScheduleId?: string | null | undefined; + /** + * User ID to send signals to directly + */ + userId?: string | null | undefined; +}; + +/** @internal */ +export const ListSignalsEventSourcesRequest$inboundSchema: z.ZodType< + ListSignalsEventSourcesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + team_id: z.nullable(z.string()).optional(), + escalation_policy_id: z.nullable(z.string()).optional(), + on_call_schedule_id: z.nullable(z.string()).optional(), + user_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "escalation_policy_id": "escalationPolicyId", + "on_call_schedule_id": "onCallScheduleId", + "user_id": "userId", + }); +}); + +/** @internal */ +export type ListSignalsEventSourcesRequest$Outbound = { + team_id?: string | null | undefined; + escalation_policy_id?: string | null | undefined; + on_call_schedule_id?: string | null | undefined; + user_id?: string | null | undefined; +}; + +/** @internal */ +export const ListSignalsEventSourcesRequest$outboundSchema: z.ZodType< + ListSignalsEventSourcesRequest$Outbound, + z.ZodTypeDef, + ListSignalsEventSourcesRequest +> = z.object({ + teamId: z.nullable(z.string()).optional(), + escalationPolicyId: z.nullable(z.string()).optional(), + onCallScheduleId: z.nullable(z.string()).optional(), + userId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + escalationPolicyId: "escalation_policy_id", + onCallScheduleId: "on_call_schedule_id", + userId: "user_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListSignalsEventSourcesRequest$ { + /** @deprecated use `ListSignalsEventSourcesRequest$inboundSchema` instead. */ + export const inboundSchema = ListSignalsEventSourcesRequest$inboundSchema; + /** @deprecated use `ListSignalsEventSourcesRequest$outboundSchema` instead. */ + export const outboundSchema = ListSignalsEventSourcesRequest$outboundSchema; + /** @deprecated use `ListSignalsEventSourcesRequest$Outbound` instead. */ + export type Outbound = ListSignalsEventSourcesRequest$Outbound; +} + +export function listSignalsEventSourcesRequestToJSON( + listSignalsEventSourcesRequest: ListSignalsEventSourcesRequest, +): string { + return JSON.stringify( + ListSignalsEventSourcesRequest$outboundSchema.parse( + listSignalsEventSourcesRequest, + ), + ); +} + +export function listSignalsEventSourcesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListSignalsEventSourcesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListSignalsEventSourcesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listsignalsoncall.ts b/src/models/operations/listsignalsoncall.ts deleted file mode 100644 index 8f709ab5..00000000 --- a/src/models/operations/listsignalsoncall.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListSignalsOnCallRequest = { - /** - * An optional comma separated list of team IDs to filter currently on-call users by - */ - teamId?: string | undefined; -}; - -/** @internal */ -export const ListSignalsOnCallRequest$inboundSchema: z.ZodType< - ListSignalsOnCallRequest, - z.ZodTypeDef, - unknown -> = z.object({ - team_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - }); -}); - -/** @internal */ -export type ListSignalsOnCallRequest$Outbound = { - team_id?: string | undefined; -}; - -/** @internal */ -export const ListSignalsOnCallRequest$outboundSchema: z.ZodType< - ListSignalsOnCallRequest$Outbound, - z.ZodTypeDef, - ListSignalsOnCallRequest -> = z.object({ - teamId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListSignalsOnCallRequest$ { - /** @deprecated use `ListSignalsOnCallRequest$inboundSchema` instead. */ - export const inboundSchema = ListSignalsOnCallRequest$inboundSchema; - /** @deprecated use `ListSignalsOnCallRequest$outboundSchema` instead. */ - export const outboundSchema = ListSignalsOnCallRequest$outboundSchema; - /** @deprecated use `ListSignalsOnCallRequest$Outbound` instead. */ - export type Outbound = ListSignalsOnCallRequest$Outbound; -} - -export function listSignalsOnCallRequestToJSON( - listSignalsOnCallRequest: ListSignalsOnCallRequest, -): string { - return JSON.stringify( - ListSignalsOnCallRequest$outboundSchema.parse(listSignalsOnCallRequest), - ); -} - -export function listSignalsOnCallRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListSignalsOnCallRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListSignalsOnCallRequest' from JSON`, - ); -} diff --git a/src/models/operations/listsignalswebhooktargets.ts b/src/models/operations/listsignalswebhooktargets.ts new file mode 100644 index 00000000..6f1a0255 --- /dev/null +++ b/src/models/operations/listsignalswebhooktargets.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListSignalsWebhookTargetsRequest = { + /** + * A query string for searching through the list of webhook targets. + */ + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; +}; + +/** @internal */ +export const ListSignalsWebhookTargetsRequest$inboundSchema: z.ZodType< + ListSignalsWebhookTargetsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + }); +}); + +/** @internal */ +export type ListSignalsWebhookTargetsRequest$Outbound = { + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; +}; + +/** @internal */ +export const ListSignalsWebhookTargetsRequest$outboundSchema: z.ZodType< + ListSignalsWebhookTargetsRequest$Outbound, + z.ZodTypeDef, + ListSignalsWebhookTargetsRequest +> = z.object({ + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListSignalsWebhookTargetsRequest$ { + /** @deprecated use `ListSignalsWebhookTargetsRequest$inboundSchema` instead. */ + export const inboundSchema = ListSignalsWebhookTargetsRequest$inboundSchema; + /** @deprecated use `ListSignalsWebhookTargetsRequest$outboundSchema` instead. */ + export const outboundSchema = ListSignalsWebhookTargetsRequest$outboundSchema; + /** @deprecated use `ListSignalsWebhookTargetsRequest$Outbound` instead. */ + export type Outbound = ListSignalsWebhookTargetsRequest$Outbound; +} + +export function listSignalsWebhookTargetsRequestToJSON( + listSignalsWebhookTargetsRequest: ListSignalsWebhookTargetsRequest, +): string { + return JSON.stringify( + ListSignalsWebhookTargetsRequest$outboundSchema.parse( + listSignalsWebhookTargetsRequest, + ), + ); +} + +export function listSignalsWebhookTargetsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListSignalsWebhookTargetsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListSignalsWebhookTargetsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listsignalwebhooktargets.ts b/src/models/operations/listsignalwebhooktargets.ts deleted file mode 100644 index b7a8f402..00000000 --- a/src/models/operations/listsignalwebhooktargets.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListSignalWebhookTargetsRequest = { - /** - * A query string for searching through the list of webhook targets. - */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; -}; - -/** @internal */ -export const ListSignalWebhookTargetsRequest$inboundSchema: z.ZodType< - ListSignalWebhookTargetsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "per_page": "perPage", - }); -}); - -/** @internal */ -export type ListSignalWebhookTargetsRequest$Outbound = { - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; -}; - -/** @internal */ -export const ListSignalWebhookTargetsRequest$outboundSchema: z.ZodType< - ListSignalWebhookTargetsRequest$Outbound, - z.ZodTypeDef, - ListSignalWebhookTargetsRequest -> = z.object({ - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - perPage: "per_page", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListSignalWebhookTargetsRequest$ { - /** @deprecated use `ListSignalWebhookTargetsRequest$inboundSchema` instead. */ - export const inboundSchema = ListSignalWebhookTargetsRequest$inboundSchema; - /** @deprecated use `ListSignalWebhookTargetsRequest$outboundSchema` instead. */ - export const outboundSchema = ListSignalWebhookTargetsRequest$outboundSchema; - /** @deprecated use `ListSignalWebhookTargetsRequest$Outbound` instead. */ - export type Outbound = ListSignalWebhookTargetsRequest$Outbound; -} - -export function listSignalWebhookTargetsRequestToJSON( - listSignalWebhookTargetsRequest: ListSignalWebhookTargetsRequest, -): string { - return JSON.stringify( - ListSignalWebhookTargetsRequest$outboundSchema.parse( - listSignalWebhookTargetsRequest, - ), - ); -} - -export function listSignalWebhookTargetsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListSignalWebhookTargetsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListSignalWebhookTargetsRequest' from JSON`, - ); -} diff --git a/src/models/operations/listsimilarincidents.ts b/src/models/operations/listsimilarincidents.ts new file mode 100644 index 00000000..487187ee --- /dev/null +++ b/src/models/operations/listsimilarincidents.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListSimilarIncidentsRequest = { + threshold?: number | null | undefined; + limit?: number | null | undefined; + incidentId: string; +}; + +/** @internal */ +export const ListSimilarIncidentsRequest$inboundSchema: z.ZodType< + ListSimilarIncidentsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + threshold: z.nullable(z.number().default(0.2)), + limit: z.nullable(z.number().int().default(5)), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type ListSimilarIncidentsRequest$Outbound = { + threshold: number | null; + limit: number | null; + incident_id: string; +}; + +/** @internal */ +export const ListSimilarIncidentsRequest$outboundSchema: z.ZodType< + ListSimilarIncidentsRequest$Outbound, + z.ZodTypeDef, + ListSimilarIncidentsRequest +> = z.object({ + threshold: z.nullable(z.number().default(0.2)), + limit: z.nullable(z.number().int().default(5)), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListSimilarIncidentsRequest$ { + /** @deprecated use `ListSimilarIncidentsRequest$inboundSchema` instead. */ + export const inboundSchema = ListSimilarIncidentsRequest$inboundSchema; + /** @deprecated use `ListSimilarIncidentsRequest$outboundSchema` instead. */ + export const outboundSchema = ListSimilarIncidentsRequest$outboundSchema; + /** @deprecated use `ListSimilarIncidentsRequest$Outbound` instead. */ + export type Outbound = ListSimilarIncidentsRequest$Outbound; +} + +export function listSimilarIncidentsRequestToJSON( + listSimilarIncidentsRequest: ListSimilarIncidentsRequest, +): string { + return JSON.stringify( + ListSimilarIncidentsRequest$outboundSchema.parse( + listSimilarIncidentsRequest, + ), + ); +} + +export function listSimilarIncidentsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListSimilarIncidentsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListSimilarIncidentsRequest' from JSON`, + ); +} diff --git a/src/models/operations/listslackemojiactions.ts b/src/models/operations/listslackemojiactions.ts index 41638117..202fc82c 100644 --- a/src/models/operations/listslackemojiactions.ts +++ b/src/models/operations/listslackemojiactions.ts @@ -13,8 +13,8 @@ export type ListSlackEmojiActionsRequest = { * Slack Connection UUID */ connectionId: string; - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -24,8 +24,8 @@ export const ListSlackEmojiActionsRequest$inboundSchema: z.ZodType< unknown > = z.object({ connection_id: z.string(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "connection_id": "connectionId", @@ -36,8 +36,8 @@ export const ListSlackEmojiActionsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListSlackEmojiActionsRequest$Outbound = { connection_id: string; - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -47,8 +47,8 @@ export const ListSlackEmojiActionsRequest$outboundSchema: z.ZodType< ListSlackEmojiActionsRequest > = z.object({ connectionId: z.string(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { connectionId: "connection_id", diff --git a/src/models/operations/listslackworkspaces.ts b/src/models/operations/listslackworkspaces.ts new file mode 100644 index 00000000..46875ec8 --- /dev/null +++ b/src/models/operations/listslackworkspaces.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListSlackWorkspacesRequest = { + /** + * Connection UUID + */ + connectionId: string; +}; + +/** @internal */ +export const ListSlackWorkspacesRequest$inboundSchema: z.ZodType< + ListSlackWorkspacesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type ListSlackWorkspacesRequest$Outbound = { + connection_id: string; +}; + +/** @internal */ +export const ListSlackWorkspacesRequest$outboundSchema: z.ZodType< + ListSlackWorkspacesRequest$Outbound, + z.ZodTypeDef, + ListSlackWorkspacesRequest +> = z.object({ + connectionId: z.string(), +}).transform((v) => { + return remap$(v, { + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListSlackWorkspacesRequest$ { + /** @deprecated use `ListSlackWorkspacesRequest$inboundSchema` instead. */ + export const inboundSchema = ListSlackWorkspacesRequest$inboundSchema; + /** @deprecated use `ListSlackWorkspacesRequest$outboundSchema` instead. */ + export const outboundSchema = ListSlackWorkspacesRequest$outboundSchema; + /** @deprecated use `ListSlackWorkspacesRequest$Outbound` instead. */ + export type Outbound = ListSlackWorkspacesRequest$Outbound; +} + +export function listSlackWorkspacesRequestToJSON( + listSlackWorkspacesRequest: ListSlackWorkspacesRequest, +): string { + return JSON.stringify( + ListSlackWorkspacesRequest$outboundSchema.parse(listSlackWorkspacesRequest), + ); +} + +export function listSlackWorkspacesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListSlackWorkspacesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListSlackWorkspacesRequest' from JSON`, + ); +} diff --git a/src/models/operations/liststatuspageconnectionpages.ts b/src/models/operations/liststatuspageconnectionpages.ts new file mode 100644 index 00000000..c1f7ec8e --- /dev/null +++ b/src/models/operations/liststatuspageconnectionpages.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListStatuspageConnectionPagesRequest = { + /** + * Connection UUID + */ + connectionId: string; +}; + +/** @internal */ +export const ListStatuspageConnectionPagesRequest$inboundSchema: z.ZodType< + ListStatuspageConnectionPagesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type ListStatuspageConnectionPagesRequest$Outbound = { + connection_id: string; +}; + +/** @internal */ +export const ListStatuspageConnectionPagesRequest$outboundSchema: z.ZodType< + ListStatuspageConnectionPagesRequest$Outbound, + z.ZodTypeDef, + ListStatuspageConnectionPagesRequest +> = z.object({ + connectionId: z.string(), +}).transform((v) => { + return remap$(v, { + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListStatuspageConnectionPagesRequest$ { + /** @deprecated use `ListStatuspageConnectionPagesRequest$inboundSchema` instead. */ + export const inboundSchema = + ListStatuspageConnectionPagesRequest$inboundSchema; + /** @deprecated use `ListStatuspageConnectionPagesRequest$outboundSchema` instead. */ + export const outboundSchema = + ListStatuspageConnectionPagesRequest$outboundSchema; + /** @deprecated use `ListStatuspageConnectionPagesRequest$Outbound` instead. */ + export type Outbound = ListStatuspageConnectionPagesRequest$Outbound; +} + +export function listStatuspageConnectionPagesRequestToJSON( + listStatuspageConnectionPagesRequest: ListStatuspageConnectionPagesRequest, +): string { + return JSON.stringify( + ListStatuspageConnectionPagesRequest$outboundSchema.parse( + listStatuspageConnectionPagesRequest, + ), + ); +} + +export function listStatuspageConnectionPagesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ListStatuspageConnectionPagesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListStatuspageConnectionPagesRequest' from JSON`, + ); +} diff --git a/src/models/operations/liststatuspageconnections.ts b/src/models/operations/liststatuspageconnections.ts index 5015d662..2ae06800 100644 --- a/src/models/operations/liststatuspageconnections.ts +++ b/src/models/operations/liststatuspageconnections.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListStatuspageConnectionsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListStatuspageConnectionsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListStatuspageConnectionsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListStatuspageConnectionsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListStatuspageConnectionsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListStatuspageConnectionsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/liststatuspagepages.ts b/src/models/operations/liststatuspagepages.ts deleted file mode 100644 index 12c976d0..00000000 --- a/src/models/operations/liststatuspagepages.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListStatuspagePagesRequest = { - /** - * Connection UUID - */ - connectionId: string; -}; - -/** @internal */ -export const ListStatuspagePagesRequest$inboundSchema: z.ZodType< - ListStatuspagePagesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "connection_id": "connectionId", - }); -}); - -/** @internal */ -export type ListStatuspagePagesRequest$Outbound = { - connection_id: string; -}; - -/** @internal */ -export const ListStatuspagePagesRequest$outboundSchema: z.ZodType< - ListStatuspagePagesRequest$Outbound, - z.ZodTypeDef, - ListStatuspagePagesRequest -> = z.object({ - connectionId: z.string(), -}).transform((v) => { - return remap$(v, { - connectionId: "connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListStatuspagePagesRequest$ { - /** @deprecated use `ListStatuspagePagesRequest$inboundSchema` instead. */ - export const inboundSchema = ListStatuspagePagesRequest$inboundSchema; - /** @deprecated use `ListStatuspagePagesRequest$outboundSchema` instead. */ - export const outboundSchema = ListStatuspagePagesRequest$outboundSchema; - /** @deprecated use `ListStatuspagePagesRequest$Outbound` instead. */ - export type Outbound = ListStatuspagePagesRequest$Outbound; -} - -export function listStatuspagePagesRequestToJSON( - listStatuspagePagesRequest: ListStatuspagePagesRequest, -): string { - return JSON.stringify( - ListStatuspagePagesRequest$outboundSchema.parse(listStatuspagePagesRequest), - ); -} - -export function listStatuspagePagesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListStatuspagePagesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListStatuspagePagesRequest' from JSON`, - ); -} diff --git a/src/models/operations/liststatuspagesubscribers.ts b/src/models/operations/liststatuspagesubscribers.ts deleted file mode 100644 index 5bd9a2f4..00000000 --- a/src/models/operations/liststatuspagesubscribers.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListStatusPageSubscribersRequest = { - nuncConnectionId: string; -}; - -/** @internal */ -export const ListStatusPageSubscribersRequest$inboundSchema: z.ZodType< - ListStatusPageSubscribersRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - }); -}); - -/** @internal */ -export type ListStatusPageSubscribersRequest$Outbound = { - nunc_connection_id: string; -}; - -/** @internal */ -export const ListStatusPageSubscribersRequest$outboundSchema: z.ZodType< - ListStatusPageSubscribersRequest$Outbound, - z.ZodTypeDef, - ListStatusPageSubscribersRequest -> = z.object({ - nuncConnectionId: z.string(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListStatusPageSubscribersRequest$ { - /** @deprecated use `ListStatusPageSubscribersRequest$inboundSchema` instead. */ - export const inboundSchema = ListStatusPageSubscribersRequest$inboundSchema; - /** @deprecated use `ListStatusPageSubscribersRequest$outboundSchema` instead. */ - export const outboundSchema = ListStatusPageSubscribersRequest$outboundSchema; - /** @deprecated use `ListStatusPageSubscribersRequest$Outbound` instead. */ - export type Outbound = ListStatusPageSubscribersRequest$Outbound; -} - -export function listStatusPageSubscribersRequestToJSON( - listStatusPageSubscribersRequest: ListStatusPageSubscribersRequest, -): string { - return JSON.stringify( - ListStatusPageSubscribersRequest$outboundSchema.parse( - listStatusPageSubscribersRequest, - ), - ); -} - -export function listStatusPageSubscribersRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListStatusPageSubscribersRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListStatusPageSubscribersRequest' from JSON`, - ); -} diff --git a/src/models/operations/liststatusupdatetemplates.ts b/src/models/operations/liststatusupdatetemplates.ts index d2f09e14..bfe25029 100644 --- a/src/models/operations/liststatusupdatetemplates.ts +++ b/src/models/operations/liststatusupdatetemplates.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListStatusUpdateTemplatesRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListStatusUpdateTemplatesRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListStatusUpdateTemplatesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListStatusUpdateTemplatesRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListStatusUpdateTemplatesRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListStatusUpdateTemplatesRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listtasklists.ts b/src/models/operations/listtasklists.ts index 5a4f94c3..e97c03f2 100644 --- a/src/models/operations/listtasklists.ts +++ b/src/models/operations/listtasklists.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListTaskListsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListTaskListsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListTaskListsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListTaskListsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListTaskListsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListTaskListsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listteamescalationpolicies.ts b/src/models/operations/listteamescalationpolicies.ts index 68cc0fd4..7b8287ba 100644 --- a/src/models/operations/listteamescalationpolicies.ts +++ b/src/models/operations/listteamescalationpolicies.ts @@ -13,9 +13,9 @@ export type ListTeamEscalationPoliciesRequest = { /** * A query string for searching through the list of escalation policies. */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -25,9 +25,9 @@ export const ListTeamEscalationPoliciesRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "team_id": "teamId", @@ -38,9 +38,9 @@ export const ListTeamEscalationPoliciesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListTeamEscalationPoliciesRequest$Outbound = { team_id: string; - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -50,9 +50,9 @@ export const ListTeamEscalationPoliciesRequest$outboundSchema: z.ZodType< ListTeamEscalationPoliciesRequest > = z.object({ teamId: z.string(), - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { teamId: "team_id", diff --git a/src/models/operations/listteamoncallschedules.ts b/src/models/operations/listteamoncallschedules.ts index 46eb5d1c..b724fbc9 100644 --- a/src/models/operations/listteamoncallschedules.ts +++ b/src/models/operations/listteamoncallschedules.ts @@ -13,9 +13,9 @@ export type ListTeamOnCallSchedulesRequest = { /** * A query string for searching through the list of on-call schedules. */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -25,9 +25,9 @@ export const ListTeamOnCallSchedulesRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "team_id": "teamId", @@ -38,9 +38,9 @@ export const ListTeamOnCallSchedulesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListTeamOnCallSchedulesRequest$Outbound = { team_id: string; - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -50,9 +50,9 @@ export const ListTeamOnCallSchedulesRequest$outboundSchema: z.ZodType< ListTeamOnCallSchedulesRequest > = z.object({ teamId: z.string(), - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { teamId: "team_id", diff --git a/src/models/operations/listteams.ts b/src/models/operations/listteams.ts index 5c37b01b..55a850cd 100644 --- a/src/models/operations/listteams.ts +++ b/src/models/operations/listteams.ts @@ -9,28 +9,28 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListTeamsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A query to search teams by their name or description */ - query?: string | undefined; + query?: string | null | undefined; /** * A query to search teams by their name */ - name?: string | undefined; + name?: string | null | undefined; /** * A comma separated list of service IDs */ - services?: string | undefined; + services?: string | null | undefined; /** * Filter by teams that have or do not have members with a default incident role asssigned. Value may be 'present', 'blank', or the ID of an incident role. */ - defaultIncidentRole?: string | undefined; + defaultIncidentRole?: string | null | undefined; /** * Boolean to determine whether to return a slimified version of the teams object */ - lite?: boolean | undefined; + lite?: boolean | null | undefined; }; /** @internal */ @@ -39,13 +39,13 @@ export const ListTeamsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - query: z.string().optional(), - name: z.string().optional(), - services: z.string().optional(), - default_incident_role: z.string().optional(), - lite: z.boolean().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + default_incident_role: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -55,13 +55,13 @@ export const ListTeamsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListTeamsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - query?: string | undefined; - name?: string | undefined; - services?: string | undefined; - default_incident_role?: string | undefined; - lite?: boolean | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + query?: string | null | undefined; + name?: string | null | undefined; + services?: string | null | undefined; + default_incident_role?: string | null | undefined; + lite?: boolean | null | undefined; }; /** @internal */ @@ -70,13 +70,13 @@ export const ListTeamsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListTeamsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - query: z.string().optional(), - name: z.string().optional(), - services: z.string().optional(), - defaultIncidentRole: z.string().optional(), - lite: z.boolean().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + services: z.nullable(z.string()).optional(), + defaultIncidentRole: z.nullable(z.string()).optional(), + lite: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listteamsignalrules.ts b/src/models/operations/listteamsignalrules.ts index 199ed9b8..9872d7d5 100644 --- a/src/models/operations/listteamsignalrules.ts +++ b/src/models/operations/listteamsignalrules.ts @@ -13,9 +13,9 @@ export type ListTeamSignalRulesRequest = { /** * A query string for searching through the list of alerting rules. */ - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -25,9 +25,9 @@ export const ListTeamSignalRulesRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "team_id": "teamId", @@ -38,9 +38,9 @@ export const ListTeamSignalRulesRequest$inboundSchema: z.ZodType< /** @internal */ export type ListTeamSignalRulesRequest$Outbound = { team_id: string; - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -50,9 +50,9 @@ export const ListTeamSignalRulesRequest$outboundSchema: z.ZodType< ListTeamSignalRulesRequest > = z.object({ teamId: z.string(), - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { teamId: "team_id", diff --git a/src/models/operations/listticketingprojects.ts b/src/models/operations/listticketingprojects.ts index 09efc982..7dec5073 100644 --- a/src/models/operations/listticketingprojects.ts +++ b/src/models/operations/listticketingprojects.ts @@ -9,13 +9,13 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListTicketingProjectsRequest = { - supportsTicketTypes?: string | undefined; - providers?: string | undefined; - connectionIds?: string | undefined; - configuredProjects?: boolean | undefined; - query?: string | undefined; - page?: number | undefined; - perPage?: number | undefined; + supportsTicketTypes?: string | null | undefined; + providers?: string | null | undefined; + connectionIds?: string | null | undefined; + configuredProjects?: boolean | null | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -24,13 +24,13 @@ export const ListTicketingProjectsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - supports_ticket_types: z.string().optional(), - providers: z.string().optional(), - connection_ids: z.string().optional(), - configured_projects: z.boolean().optional(), - query: z.string().optional(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), + supports_ticket_types: z.nullable(z.string()).optional(), + providers: z.nullable(z.string()).optional(), + connection_ids: z.nullable(z.string()).optional(), + configured_projects: z.nullable(z.boolean()).optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "supports_ticket_types": "supportsTicketTypes", @@ -42,13 +42,13 @@ export const ListTicketingProjectsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListTicketingProjectsRequest$Outbound = { - supports_ticket_types?: string | undefined; - providers?: string | undefined; - connection_ids?: string | undefined; - configured_projects?: boolean | undefined; - query?: string | undefined; - page?: number | undefined; - per_page?: number | undefined; + supports_ticket_types?: string | null | undefined; + providers?: string | null | undefined; + connection_ids?: string | null | undefined; + configured_projects?: boolean | null | undefined; + query?: string | null | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -57,13 +57,13 @@ export const ListTicketingProjectsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListTicketingProjectsRequest > = z.object({ - supportsTicketTypes: z.string().optional(), - providers: z.string().optional(), - connectionIds: z.string().optional(), - configuredProjects: z.boolean().optional(), - query: z.string().optional(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), + supportsTicketTypes: z.nullable(z.string()).optional(), + providers: z.nullable(z.string()).optional(), + connectionIds: z.nullable(z.string()).optional(), + configuredProjects: z.nullable(z.boolean()).optional(), + query: z.nullable(z.string()).optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { supportsTicketTypes: "supports_ticket_types", diff --git a/src/models/operations/listtickets.ts b/src/models/operations/listtickets.ts index 3c9bb900..cecf67dd 100644 --- a/src/models/operations/listtickets.ts +++ b/src/models/operations/listtickets.ts @@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * A matching strategy for the tags provided */ -export const ListTicketsQueryParamTagMatchStrategy = { +export const ListTicketsTagMatchStrategy = { Any: "any", MatchAll: "match_all", Exclude: "exclude", @@ -20,8 +20,8 @@ export const ListTicketsQueryParamTagMatchStrategy = { /** * A matching strategy for the tags provided */ -export type ListTicketsQueryParamTagMatchStrategy = ClosedEnum< - typeof ListTicketsQueryParamTagMatchStrategy +export type ListTicketsTagMatchStrategy = ClosedEnum< + typeof ListTicketsTagMatchStrategy >; /** @@ -39,48 +39,45 @@ export const State = { export type State = ClosedEnum; export type ListTicketsRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * A comma separated list of tags */ - tags?: string | undefined; + tags?: string | null | undefined; /** * A matching strategy for the tags provided */ - tagMatchStrategy?: ListTicketsQueryParamTagMatchStrategy | undefined; + tagMatchStrategy?: ListTicketsTagMatchStrategy | null | undefined; /** * Filter tickets assigned to this user id */ - assignedUser?: string | undefined; + assignedUser?: string | null | undefined; /** * Filter tickets by state */ - state?: State | undefined; + state?: State | null | undefined; }; /** @internal */ -export const ListTicketsQueryParamTagMatchStrategy$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - ListTicketsQueryParamTagMatchStrategy, - ); +export const ListTicketsTagMatchStrategy$inboundSchema: z.ZodNativeEnum< + typeof ListTicketsTagMatchStrategy +> = z.nativeEnum(ListTicketsTagMatchStrategy); /** @internal */ -export const ListTicketsQueryParamTagMatchStrategy$outboundSchema: - z.ZodNativeEnum = - ListTicketsQueryParamTagMatchStrategy$inboundSchema; +export const ListTicketsTagMatchStrategy$outboundSchema: z.ZodNativeEnum< + typeof ListTicketsTagMatchStrategy +> = ListTicketsTagMatchStrategy$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ListTicketsQueryParamTagMatchStrategy$ { - /** @deprecated use `ListTicketsQueryParamTagMatchStrategy$inboundSchema` instead. */ - export const inboundSchema = - ListTicketsQueryParamTagMatchStrategy$inboundSchema; - /** @deprecated use `ListTicketsQueryParamTagMatchStrategy$outboundSchema` instead. */ - export const outboundSchema = - ListTicketsQueryParamTagMatchStrategy$outboundSchema; +export namespace ListTicketsTagMatchStrategy$ { + /** @deprecated use `ListTicketsTagMatchStrategy$inboundSchema` instead. */ + export const inboundSchema = ListTicketsTagMatchStrategy$inboundSchema; + /** @deprecated use `ListTicketsTagMatchStrategy$outboundSchema` instead. */ + export const outboundSchema = ListTicketsTagMatchStrategy$outboundSchema; } /** @internal */ @@ -109,13 +106,13 @@ export const ListTicketsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - tags: z.string().optional(), - tag_match_strategy: ListTicketsQueryParamTagMatchStrategy$inboundSchema + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + tags: z.nullable(z.string()).optional(), + tag_match_strategy: z.nullable(ListTicketsTagMatchStrategy$inboundSchema) .optional(), - assigned_user: z.string().optional(), - state: State$inboundSchema.optional(), + assigned_user: z.nullable(z.string()).optional(), + state: z.nullable(State$inboundSchema).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -126,12 +123,12 @@ export const ListTicketsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListTicketsRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - tags?: string | undefined; - tag_match_strategy?: string | undefined; - assigned_user?: string | undefined; - state?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + tags?: string | null | undefined; + tag_match_strategy?: string | null | undefined; + assigned_user?: string | null | undefined; + state?: string | null | undefined; }; /** @internal */ @@ -140,13 +137,13 @@ export const ListTicketsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListTicketsRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - tags: z.string().optional(), - tagMatchStrategy: ListTicketsQueryParamTagMatchStrategy$outboundSchema + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + tags: z.nullable(z.string()).optional(), + tagMatchStrategy: z.nullable(ListTicketsTagMatchStrategy$outboundSchema) .optional(), - assignedUser: z.string().optional(), - state: State$outboundSchema.optional(), + assignedUser: z.nullable(z.string()).optional(), + state: z.nullable(State$outboundSchema).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listtickettags.ts b/src/models/operations/listtickettags.ts index 3334481d..fff4f953 100644 --- a/src/models/operations/listtickettags.ts +++ b/src/models/operations/listtickettags.ts @@ -8,7 +8,7 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListTicketTagsRequest = { - prefix?: string | undefined; + prefix?: string | null | undefined; }; /** @internal */ @@ -17,12 +17,12 @@ export const ListTicketTagsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - prefix: z.string().optional(), + prefix: z.nullable(z.string()).optional(), }); /** @internal */ export type ListTicketTagsRequest$Outbound = { - prefix?: string | undefined; + prefix?: string | null | undefined; }; /** @internal */ @@ -31,7 +31,7 @@ export const ListTicketTagsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListTicketTagsRequest > = z.object({ - prefix: z.string().optional(), + prefix: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/operations/listtranscriptentries.ts b/src/models/operations/listtranscriptentries.ts new file mode 100644 index 00000000..b20e1b75 --- /dev/null +++ b/src/models/operations/listtranscriptentries.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The order to sort the transcript entries. + */ +export const ListTranscriptEntriesSort = { + Asc: "asc", + Desc: "desc", +} as const; +/** + * The order to sort the transcript entries. + */ +export type ListTranscriptEntriesSort = ClosedEnum< + typeof ListTranscriptEntriesSort +>; + +export type ListTranscriptEntriesRequest = { + /** + * The ID of the transcript entry to start after. + */ + after?: string | null | undefined; + /** + * The ID of the transcript entry to start before. + */ + before?: string | null | undefined; + /** + * The order to sort the transcript entries. + */ + sort?: ListTranscriptEntriesSort | null | undefined; + incidentId: string; +}; + +/** @internal */ +export const ListTranscriptEntriesSort$inboundSchema: z.ZodNativeEnum< + typeof ListTranscriptEntriesSort +> = z.nativeEnum(ListTranscriptEntriesSort); + +/** @internal */ +export const ListTranscriptEntriesSort$outboundSchema: z.ZodNativeEnum< + typeof ListTranscriptEntriesSort +> = ListTranscriptEntriesSort$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListTranscriptEntriesSort$ { + /** @deprecated use `ListTranscriptEntriesSort$inboundSchema` instead. */ + export const inboundSchema = ListTranscriptEntriesSort$inboundSchema; + /** @deprecated use `ListTranscriptEntriesSort$outboundSchema` instead. */ + export const outboundSchema = ListTranscriptEntriesSort$outboundSchema; +} + +/** @internal */ +export const ListTranscriptEntriesRequest$inboundSchema: z.ZodType< + ListTranscriptEntriesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + after: z.nullable(z.string()).optional(), + before: z.nullable(z.string()).optional(), + sort: z.nullable(ListTranscriptEntriesSort$inboundSchema.default("asc")), + incident_id: z.string(), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + }); +}); + +/** @internal */ +export type ListTranscriptEntriesRequest$Outbound = { + after?: string | null | undefined; + before?: string | null | undefined; + sort: string | null; + incident_id: string; +}; + +/** @internal */ +export const ListTranscriptEntriesRequest$outboundSchema: z.ZodType< + ListTranscriptEntriesRequest$Outbound, + z.ZodTypeDef, + ListTranscriptEntriesRequest +> = z.object({ + after: z.nullable(z.string()).optional(), + before: z.nullable(z.string()).optional(), + sort: z.nullable(ListTranscriptEntriesSort$outboundSchema.default("asc")), + incidentId: z.string(), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListTranscriptEntriesRequest$ { + /** @deprecated use `ListTranscriptEntriesRequest$inboundSchema` instead. */ + export const inboundSchema = ListTranscriptEntriesRequest$inboundSchema; + /** @deprecated use `ListTranscriptEntriesRequest$outboundSchema` instead. */ + export const outboundSchema = ListTranscriptEntriesRequest$outboundSchema; + /** @deprecated use `ListTranscriptEntriesRequest$Outbound` instead. */ + export type Outbound = ListTranscriptEntriesRequest$Outbound; +} + +export function listTranscriptEntriesRequestToJSON( + listTranscriptEntriesRequest: ListTranscriptEntriesRequest, +): string { + return JSON.stringify( + ListTranscriptEntriesRequest$outboundSchema.parse( + listTranscriptEntriesRequest, + ), + ); +} + +export function listTranscriptEntriesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListTranscriptEntriesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListTranscriptEntriesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listuserinvolvementmetrics.ts b/src/models/operations/listuserinvolvementmetrics.ts index d38c5fb3..91d4a1fb 100644 --- a/src/models/operations/listuserinvolvementmetrics.ts +++ b/src/models/operations/listuserinvolvementmetrics.ts @@ -10,77 +10,83 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { RFCDate } from "../../types/rfcdate.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const QueryParamSortField = { +export const ListUserInvolvementMetricsSortField = { UserCount: "user_count", IncidentCount: "incident_count", TimeSpent: "time_spent", } as const; -export type QueryParamSortField = ClosedEnum; +export type ListUserInvolvementMetricsSortField = ClosedEnum< + typeof ListUserInvolvementMetricsSortField +>; -export const QueryParamSortDirection = { +export const ListUserInvolvementMetricsSortDirection = { Asc: "asc", Desc: "desc", } as const; -export type QueryParamSortDirection = ClosedEnum< - typeof QueryParamSortDirection +export type ListUserInvolvementMetricsSortDirection = ClosedEnum< + typeof ListUserInvolvementMetricsSortDirection >; export type ListUserInvolvementMetricsRequest = { /** * The start date to return metrics from */ - startDate?: RFCDate | undefined; + startDate?: RFCDate | null | undefined; /** * The end date to return metrics from */ - endDate?: RFCDate | undefined; - bucketSize?: string | undefined; - by?: string | undefined; - sortField?: QueryParamSortField | undefined; - sortDirection?: QueryParamSortDirection | undefined; - sortLimit?: number | undefined; + endDate?: RFCDate | null | undefined; + bucketSize?: string | null | undefined; + by?: string | null | undefined; + sortField?: ListUserInvolvementMetricsSortField | null | undefined; + sortDirection?: ListUserInvolvementMetricsSortDirection | null | undefined; + sortLimit?: number | null | undefined; }; /** @internal */ -export const QueryParamSortField$inboundSchema: z.ZodNativeEnum< - typeof QueryParamSortField -> = z.nativeEnum(QueryParamSortField); +export const ListUserInvolvementMetricsSortField$inboundSchema: z.ZodNativeEnum< + typeof ListUserInvolvementMetricsSortField +> = z.nativeEnum(ListUserInvolvementMetricsSortField); /** @internal */ -export const QueryParamSortField$outboundSchema: z.ZodNativeEnum< - typeof QueryParamSortField -> = QueryParamSortField$inboundSchema; +export const ListUserInvolvementMetricsSortField$outboundSchema: + z.ZodNativeEnum = + ListUserInvolvementMetricsSortField$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace QueryParamSortField$ { - /** @deprecated use `QueryParamSortField$inboundSchema` instead. */ - export const inboundSchema = QueryParamSortField$inboundSchema; - /** @deprecated use `QueryParamSortField$outboundSchema` instead. */ - export const outboundSchema = QueryParamSortField$outboundSchema; +export namespace ListUserInvolvementMetricsSortField$ { + /** @deprecated use `ListUserInvolvementMetricsSortField$inboundSchema` instead. */ + export const inboundSchema = + ListUserInvolvementMetricsSortField$inboundSchema; + /** @deprecated use `ListUserInvolvementMetricsSortField$outboundSchema` instead. */ + export const outboundSchema = + ListUserInvolvementMetricsSortField$outboundSchema; } /** @internal */ -export const QueryParamSortDirection$inboundSchema: z.ZodNativeEnum< - typeof QueryParamSortDirection -> = z.nativeEnum(QueryParamSortDirection); +export const ListUserInvolvementMetricsSortDirection$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(ListUserInvolvementMetricsSortDirection); /** @internal */ -export const QueryParamSortDirection$outboundSchema: z.ZodNativeEnum< - typeof QueryParamSortDirection -> = QueryParamSortDirection$inboundSchema; +export const ListUserInvolvementMetricsSortDirection$outboundSchema: + z.ZodNativeEnum = + ListUserInvolvementMetricsSortDirection$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace QueryParamSortDirection$ { - /** @deprecated use `QueryParamSortDirection$inboundSchema` instead. */ - export const inboundSchema = QueryParamSortDirection$inboundSchema; - /** @deprecated use `QueryParamSortDirection$outboundSchema` instead. */ - export const outboundSchema = QueryParamSortDirection$outboundSchema; +export namespace ListUserInvolvementMetricsSortDirection$ { + /** @deprecated use `ListUserInvolvementMetricsSortDirection$inboundSchema` instead. */ + export const inboundSchema = + ListUserInvolvementMetricsSortDirection$inboundSchema; + /** @deprecated use `ListUserInvolvementMetricsSortDirection$outboundSchema` instead. */ + export const outboundSchema = + ListUserInvolvementMetricsSortDirection$outboundSchema; } /** @internal */ @@ -89,13 +95,16 @@ export const ListUserInvolvementMetricsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - start_date: z.string().transform(v => new RFCDate(v)).optional(), - end_date: z.string().transform(v => new RFCDate(v)).optional(), - bucket_size: z.string().optional(), - by: z.string().optional(), - sort_field: QueryParamSortField$inboundSchema.optional(), - sort_direction: QueryParamSortDirection$inboundSchema.optional(), - sort_limit: z.number().int().optional(), + start_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + end_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(), + bucket_size: z.nullable(z.string()).optional(), + by: z.nullable(z.string()).optional(), + sort_field: z.nullable(ListUserInvolvementMetricsSortField$inboundSchema) + .optional(), + sort_direction: z.nullable( + ListUserInvolvementMetricsSortDirection$inboundSchema, + ).optional(), + sort_limit: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "start_date": "startDate", @@ -109,13 +118,13 @@ export const ListUserInvolvementMetricsRequest$inboundSchema: z.ZodType< /** @internal */ export type ListUserInvolvementMetricsRequest$Outbound = { - start_date?: string | undefined; - end_date?: string | undefined; - bucket_size?: string | undefined; - by?: string | undefined; - sort_field?: string | undefined; - sort_direction?: string | undefined; - sort_limit?: number | undefined; + start_date?: string | null | undefined; + end_date?: string | null | undefined; + bucket_size?: string | null | undefined; + by?: string | null | undefined; + sort_field?: string | null | undefined; + sort_direction?: string | null | undefined; + sort_limit?: number | null | undefined; }; /** @internal */ @@ -124,13 +133,18 @@ export const ListUserInvolvementMetricsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListUserInvolvementMetricsRequest > = z.object({ - startDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - endDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(), - bucketSize: z.string().optional(), - by: z.string().optional(), - sortField: QueryParamSortField$outboundSchema.optional(), - sortDirection: QueryParamSortDirection$outboundSchema.optional(), - sortLimit: z.number().int().optional(), + startDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + endDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) + .optional(), + bucketSize: z.nullable(z.string()).optional(), + by: z.nullable(z.string()).optional(), + sortField: z.nullable(ListUserInvolvementMetricsSortField$outboundSchema) + .optional(), + sortDirection: z.nullable( + ListUserInvolvementMetricsSortDirection$outboundSchema, + ).optional(), + sortLimit: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { startDate: "start_date", diff --git a/src/models/operations/listuserownedservices.ts b/src/models/operations/listuserownedservices.ts new file mode 100644 index 00000000..1b3a1f63 --- /dev/null +++ b/src/models/operations/listuserownedservices.ts @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ListUserOwnedServicesRequest = { + id: string; + page?: number | null | undefined; + perPage?: number | null | undefined; +}; + +/** @internal */ +export const ListUserOwnedServicesRequest$inboundSchema: z.ZodType< + ListUserOwnedServicesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "per_page": "perPage", + }); +}); + +/** @internal */ +export type ListUserOwnedServicesRequest$Outbound = { + id: string; + page?: number | null | undefined; + per_page?: number | null | undefined; +}; + +/** @internal */ +export const ListUserOwnedServicesRequest$outboundSchema: z.ZodType< + ListUserOwnedServicesRequest$Outbound, + z.ZodTypeDef, + ListUserOwnedServicesRequest +> = z.object({ + id: z.string(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + perPage: "per_page", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListUserOwnedServicesRequest$ { + /** @deprecated use `ListUserOwnedServicesRequest$inboundSchema` instead. */ + export const inboundSchema = ListUserOwnedServicesRequest$inboundSchema; + /** @deprecated use `ListUserOwnedServicesRequest$outboundSchema` instead. */ + export const outboundSchema = ListUserOwnedServicesRequest$outboundSchema; + /** @deprecated use `ListUserOwnedServicesRequest$Outbound` instead. */ + export type Outbound = ListUserOwnedServicesRequest$Outbound; +} + +export function listUserOwnedServicesRequestToJSON( + listUserOwnedServicesRequest: ListUserOwnedServicesRequest, +): string { + return JSON.stringify( + ListUserOwnedServicesRequest$outboundSchema.parse( + listUserOwnedServicesRequest, + ), + ); +} + +export function listUserOwnedServicesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ListUserOwnedServicesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ListUserOwnedServicesRequest' from JSON`, + ); +} diff --git a/src/models/operations/listusers.ts b/src/models/operations/listusers.ts index eb081f10..98685faf 100644 --- a/src/models/operations/listusers.ts +++ b/src/models/operations/listusers.ts @@ -9,16 +9,16 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListUsersRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; /** * Text string of a query to filter users by name or email */ - query?: string | undefined; + query?: string | null | undefined; /** * Text string of a query to filter users by name */ - name?: string | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -27,10 +27,10 @@ export const ListUsersRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), - query: z.string().optional(), - name: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -39,10 +39,10 @@ export const ListUsersRequest$inboundSchema: z.ZodType< /** @internal */ export type ListUsersRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; - query?: string | undefined; - name?: string | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; + query?: string | null | undefined; + name?: string | null | undefined; }; /** @internal */ @@ -51,10 +51,10 @@ export const ListUsersRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListUsersRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), - query: z.string().optional(), - name: z.string().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), + query: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/listuserservices.ts b/src/models/operations/listuserservices.ts deleted file mode 100644 index 4df65db8..00000000 --- a/src/models/operations/listuserservices.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ListUserServicesRequest = { - id: string; - page?: number | undefined; - perPage?: number | undefined; -}; - -/** @internal */ -export const ListUserServicesRequest$inboundSchema: z.ZodType< - ListUserServicesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - page: z.number().int().optional(), - per_page: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "per_page": "perPage", - }); -}); - -/** @internal */ -export type ListUserServicesRequest$Outbound = { - id: string; - page?: number | undefined; - per_page?: number | undefined; -}; - -/** @internal */ -export const ListUserServicesRequest$outboundSchema: z.ZodType< - ListUserServicesRequest$Outbound, - z.ZodTypeDef, - ListUserServicesRequest -> = z.object({ - id: z.string(), - page: z.number().int().optional(), - perPage: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - perPage: "per_page", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListUserServicesRequest$ { - /** @deprecated use `ListUserServicesRequest$inboundSchema` instead. */ - export const inboundSchema = ListUserServicesRequest$inboundSchema; - /** @deprecated use `ListUserServicesRequest$outboundSchema` instead. */ - export const outboundSchema = ListUserServicesRequest$outboundSchema; - /** @deprecated use `ListUserServicesRequest$Outbound` instead. */ - export type Outbound = ListUserServicesRequest$Outbound; -} - -export function listUserServicesRequestToJSON( - listUserServicesRequest: ListUserServicesRequest, -): string { - return JSON.stringify( - ListUserServicesRequest$outboundSchema.parse(listUserServicesRequest), - ); -} - -export function listUserServicesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListUserServicesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListUserServicesRequest' from JSON`, - ); -} diff --git a/src/models/operations/listwebhooks.ts b/src/models/operations/listwebhooks.ts index 91ad6a44..e364fd3c 100644 --- a/src/models/operations/listwebhooks.ts +++ b/src/models/operations/listwebhooks.ts @@ -9,8 +9,8 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListWebhooksRequest = { - page?: number | undefined; - perPage?: number | undefined; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -19,8 +19,8 @@ export const ListWebhooksRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - page: z.number().int().optional(), - per_page: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { "per_page": "perPage", @@ -29,8 +29,8 @@ export const ListWebhooksRequest$inboundSchema: z.ZodType< /** @internal */ export type ListWebhooksRequest$Outbound = { - page?: number | undefined; - per_page?: number | undefined; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -39,8 +39,8 @@ export const ListWebhooksRequest$outboundSchema: z.ZodType< z.ZodTypeDef, ListWebhooksRequest > = z.object({ - page: z.number().int().optional(), - perPage: z.number().int().optional(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { perPage: "per_page", diff --git a/src/models/operations/partialupdateincidentimpacts.ts b/src/models/operations/partialupdateincidentimpacts.ts deleted file mode 100644 index b32a7565..00000000 --- a/src/models/operations/partialupdateincidentimpacts.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PartialUpdateIncidentImpactsRequest = { - incidentId: string; - patchV1IncidentsIncidentIdImpact: components.PatchV1IncidentsIncidentIdImpact; -}; - -/** @internal */ -export const PartialUpdateIncidentImpactsRequest$inboundSchema: z.ZodType< - PartialUpdateIncidentImpactsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - patchV1IncidentsIncidentIdImpact: - components.PatchV1IncidentsIncidentIdImpact$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type PartialUpdateIncidentImpactsRequest$Outbound = { - incident_id: string; - patchV1IncidentsIncidentIdImpact: - components.PatchV1IncidentsIncidentIdImpact$Outbound; -}; - -/** @internal */ -export const PartialUpdateIncidentImpactsRequest$outboundSchema: z.ZodType< - PartialUpdateIncidentImpactsRequest$Outbound, - z.ZodTypeDef, - PartialUpdateIncidentImpactsRequest -> = z.object({ - incidentId: z.string(), - patchV1IncidentsIncidentIdImpact: - components.PatchV1IncidentsIncidentIdImpact$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PartialUpdateIncidentImpactsRequest$ { - /** @deprecated use `PartialUpdateIncidentImpactsRequest$inboundSchema` instead. */ - export const inboundSchema = - PartialUpdateIncidentImpactsRequest$inboundSchema; - /** @deprecated use `PartialUpdateIncidentImpactsRequest$outboundSchema` instead. */ - export const outboundSchema = - PartialUpdateIncidentImpactsRequest$outboundSchema; - /** @deprecated use `PartialUpdateIncidentImpactsRequest$Outbound` instead. */ - export type Outbound = PartialUpdateIncidentImpactsRequest$Outbound; -} - -export function partialUpdateIncidentImpactsRequestToJSON( - partialUpdateIncidentImpactsRequest: PartialUpdateIncidentImpactsRequest, -): string { - return JSON.stringify( - PartialUpdateIncidentImpactsRequest$outboundSchema.parse( - partialUpdateIncidentImpactsRequest, - ), - ); -} - -export function partialUpdateIncidentImpactsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - PartialUpdateIncidentImpactsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PartialUpdateIncidentImpactsRequest' from JSON`, - ); -} diff --git a/src/models/operations/patchscimuser.ts b/src/models/operations/patchscimuser.ts new file mode 100644 index 00000000..86af9468 --- /dev/null +++ b/src/models/operations/patchscimuser.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PatchScimUserRequest = { + id: string; + patchScimUser: components.PatchScimUser; +}; + +/** @internal */ +export const PatchScimUserRequest$inboundSchema: z.ZodType< + PatchScimUserRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + patch_scim_user: z.lazy(() => components.PatchScimUser$inboundSchema), +}).transform((v) => { + return remap$(v, { + "patch_scim_user": "patchScimUser", + }); +}); + +/** @internal */ +export type PatchScimUserRequest$Outbound = { + id: string; + patch_scim_user: components.PatchScimUser$Outbound; +}; + +/** @internal */ +export const PatchScimUserRequest$outboundSchema: z.ZodType< + PatchScimUserRequest$Outbound, + z.ZodTypeDef, + PatchScimUserRequest +> = z.object({ + id: z.string(), + patchScimUser: z.lazy(() => components.PatchScimUser$outboundSchema), +}).transform((v) => { + return remap$(v, { + patchScimUser: "patch_scim_user", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PatchScimUserRequest$ { + /** @deprecated use `PatchScimUserRequest$inboundSchema` instead. */ + export const inboundSchema = PatchScimUserRequest$inboundSchema; + /** @deprecated use `PatchScimUserRequest$outboundSchema` instead. */ + export const outboundSchema = PatchScimUserRequest$outboundSchema; + /** @deprecated use `PatchScimUserRequest$Outbound` instead. */ + export type Outbound = PatchScimUserRequest$Outbound; +} + +export function patchScimUserRequestToJSON( + patchScimUserRequest: PatchScimUserRequest, +): string { + return JSON.stringify( + PatchScimUserRequest$outboundSchema.parse(patchScimUserRequest), + ); +} + +export function patchScimUserRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PatchScimUserRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PatchScimUserRequest' from JSON`, + ); +} diff --git a/src/models/operations/publishpostmortemreport.ts b/src/models/operations/publishpostmortemreport.ts new file mode 100644 index 00000000..44a26483 --- /dev/null +++ b/src/models/operations/publishpostmortemreport.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type PublishPostMortemReportRequest = { + reportId: string; + publishPostMortemReport: components.PublishPostMortemReport; +}; + +/** @internal */ +export const PublishPostMortemReportRequest$inboundSchema: z.ZodType< + PublishPostMortemReportRequest, + z.ZodTypeDef, + unknown +> = z.object({ + report_id: z.string(), + publish_post_mortem_report: z.lazy(() => + components.PublishPostMortemReport$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "report_id": "reportId", + "publish_post_mortem_report": "publishPostMortemReport", + }); +}); + +/** @internal */ +export type PublishPostMortemReportRequest$Outbound = { + report_id: string; + publish_post_mortem_report: components.PublishPostMortemReport$Outbound; +}; + +/** @internal */ +export const PublishPostMortemReportRequest$outboundSchema: z.ZodType< + PublishPostMortemReportRequest$Outbound, + z.ZodTypeDef, + PublishPostMortemReportRequest +> = z.object({ + reportId: z.string(), + publishPostMortemReport: z.lazy(() => + components.PublishPostMortemReport$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + reportId: "report_id", + publishPostMortemReport: "publish_post_mortem_report", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PublishPostMortemReportRequest$ { + /** @deprecated use `PublishPostMortemReportRequest$inboundSchema` instead. */ + export const inboundSchema = PublishPostMortemReportRequest$inboundSchema; + /** @deprecated use `PublishPostMortemReportRequest$outboundSchema` instead. */ + export const outboundSchema = PublishPostMortemReportRequest$outboundSchema; + /** @deprecated use `PublishPostMortemReportRequest$Outbound` instead. */ + export type Outbound = PublishPostMortemReportRequest$Outbound; +} + +export function publishPostMortemReportRequestToJSON( + publishPostMortemReportRequest: PublishPostMortemReportRequest, +): string { + return JSON.stringify( + PublishPostMortemReportRequest$outboundSchema.parse( + publishPostMortemReportRequest, + ), + ); +} + +export function publishPostMortemReportRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PublishPostMortemReportRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PublishPostMortemReportRequest' from JSON`, + ); +} diff --git a/src/models/operations/publishretrospectivereport.ts b/src/models/operations/publishretrospectivereport.ts deleted file mode 100644 index f4d02622..00000000 --- a/src/models/operations/publishretrospectivereport.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type PublishRetrospectiveReportRequest = { - reportId: string; - postV1PostMortemsReportsReportIdPublish: - components.PostV1PostMortemsReportsReportIdPublish; -}; - -/** @internal */ -export const PublishRetrospectiveReportRequest$inboundSchema: z.ZodType< - PublishRetrospectiveReportRequest, - z.ZodTypeDef, - unknown -> = z.object({ - report_id: z.string(), - postV1PostMortemsReportsReportIdPublish: - components.PostV1PostMortemsReportsReportIdPublish$inboundSchema, -}).transform((v) => { - return remap$(v, { - "report_id": "reportId", - }); -}); - -/** @internal */ -export type PublishRetrospectiveReportRequest$Outbound = { - report_id: string; - postV1PostMortemsReportsReportIdPublish: - components.PostV1PostMortemsReportsReportIdPublish$Outbound; -}; - -/** @internal */ -export const PublishRetrospectiveReportRequest$outboundSchema: z.ZodType< - PublishRetrospectiveReportRequest$Outbound, - z.ZodTypeDef, - PublishRetrospectiveReportRequest -> = z.object({ - reportId: z.string(), - postV1PostMortemsReportsReportIdPublish: - components.PostV1PostMortemsReportsReportIdPublish$outboundSchema, -}).transform((v) => { - return remap$(v, { - reportId: "report_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PublishRetrospectiveReportRequest$ { - /** @deprecated use `PublishRetrospectiveReportRequest$inboundSchema` instead. */ - export const inboundSchema = PublishRetrospectiveReportRequest$inboundSchema; - /** @deprecated use `PublishRetrospectiveReportRequest$outboundSchema` instead. */ - export const outboundSchema = - PublishRetrospectiveReportRequest$outboundSchema; - /** @deprecated use `PublishRetrospectiveReportRequest$Outbound` instead. */ - export type Outbound = PublishRetrospectiveReportRequest$Outbound; -} - -export function publishRetrospectiveReportRequestToJSON( - publishRetrospectiveReportRequest: PublishRetrospectiveReportRequest, -): string { - return JSON.stringify( - PublishRetrospectiveReportRequest$outboundSchema.parse( - publishRetrospectiveReportRequest, - ), - ); -} - -export function publishRetrospectiveReportRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PublishRetrospectiveReportRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PublishRetrospectiveReportRequest' from JSON`, - ); -} diff --git a/src/models/operations/refreshconnection.ts b/src/models/operations/refreshconnection.ts new file mode 100644 index 00000000..ceef3ade --- /dev/null +++ b/src/models/operations/refreshconnection.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RefreshConnectionRequest = { + slug: string; + connectionId: string; +}; + +/** @internal */ +export const RefreshConnectionRequest$inboundSchema: z.ZodType< + RefreshConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.string(), + connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type RefreshConnectionRequest$Outbound = { + slug: string; + connection_id: string; +}; + +/** @internal */ +export const RefreshConnectionRequest$outboundSchema: z.ZodType< + RefreshConnectionRequest$Outbound, + z.ZodTypeDef, + RefreshConnectionRequest +> = z.object({ + slug: z.string(), + connectionId: z.string(), +}).transform((v) => { + return remap$(v, { + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RefreshConnectionRequest$ { + /** @deprecated use `RefreshConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = RefreshConnectionRequest$inboundSchema; + /** @deprecated use `RefreshConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = RefreshConnectionRequest$outboundSchema; + /** @deprecated use `RefreshConnectionRequest$Outbound` instead. */ + export type Outbound = RefreshConnectionRequest$Outbound; +} + +export function refreshConnectionRequestToJSON( + refreshConnectionRequest: RefreshConnectionRequest, +): string { + return JSON.stringify( + RefreshConnectionRequest$outboundSchema.parse(refreshConnectionRequest), + ); +} + +export function refreshConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RefreshConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RefreshConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/refreshintegrationconnection.ts b/src/models/operations/refreshintegrationconnection.ts deleted file mode 100644 index 399e4e0c..00000000 --- a/src/models/operations/refreshintegrationconnection.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type RefreshIntegrationConnectionRequest = { - slug: string; - connectionId: string; -}; - -/** @internal */ -export const RefreshIntegrationConnectionRequest$inboundSchema: z.ZodType< - RefreshIntegrationConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string(), - connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "connection_id": "connectionId", - }); -}); - -/** @internal */ -export type RefreshIntegrationConnectionRequest$Outbound = { - slug: string; - connection_id: string; -}; - -/** @internal */ -export const RefreshIntegrationConnectionRequest$outboundSchema: z.ZodType< - RefreshIntegrationConnectionRequest$Outbound, - z.ZodTypeDef, - RefreshIntegrationConnectionRequest -> = z.object({ - slug: z.string(), - connectionId: z.string(), -}).transform((v) => { - return remap$(v, { - connectionId: "connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RefreshIntegrationConnectionRequest$ { - /** @deprecated use `RefreshIntegrationConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = - RefreshIntegrationConnectionRequest$inboundSchema; - /** @deprecated use `RefreshIntegrationConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = - RefreshIntegrationConnectionRequest$outboundSchema; - /** @deprecated use `RefreshIntegrationConnectionRequest$Outbound` instead. */ - export type Outbound = RefreshIntegrationConnectionRequest$Outbound; -} - -export function refreshIntegrationConnectionRequestToJSON( - refreshIntegrationConnectionRequest: RefreshIntegrationConnectionRequest, -): string { - return JSON.stringify( - RefreshIntegrationConnectionRequest$outboundSchema.parse( - refreshIntegrationConnectionRequest, - ), - ); -} - -export function refreshIntegrationConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - RefreshIntegrationConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RefreshIntegrationConnectionRequest' from JSON`, - ); -} diff --git a/src/models/operations/reorderpostmortemreasons.ts b/src/models/operations/reorderpostmortemreasons.ts new file mode 100644 index 00000000..35e1cfc8 --- /dev/null +++ b/src/models/operations/reorderpostmortemreasons.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ReorderPostMortemReasonsRequest = { + reportId: string; + reorderPostMortemReasons: components.ReorderPostMortemReasons; +}; + +/** @internal */ +export const ReorderPostMortemReasonsRequest$inboundSchema: z.ZodType< + ReorderPostMortemReasonsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + report_id: z.string(), + reorder_post_mortem_reasons: z.lazy(() => + components.ReorderPostMortemReasons$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "report_id": "reportId", + "reorder_post_mortem_reasons": "reorderPostMortemReasons", + }); +}); + +/** @internal */ +export type ReorderPostMortemReasonsRequest$Outbound = { + report_id: string; + reorder_post_mortem_reasons: components.ReorderPostMortemReasons$Outbound; +}; + +/** @internal */ +export const ReorderPostMortemReasonsRequest$outboundSchema: z.ZodType< + ReorderPostMortemReasonsRequest$Outbound, + z.ZodTypeDef, + ReorderPostMortemReasonsRequest +> = z.object({ + reportId: z.string(), + reorderPostMortemReasons: z.lazy(() => + components.ReorderPostMortemReasons$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + reportId: "report_id", + reorderPostMortemReasons: "reorder_post_mortem_reasons", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ReorderPostMortemReasonsRequest$ { + /** @deprecated use `ReorderPostMortemReasonsRequest$inboundSchema` instead. */ + export const inboundSchema = ReorderPostMortemReasonsRequest$inboundSchema; + /** @deprecated use `ReorderPostMortemReasonsRequest$outboundSchema` instead. */ + export const outboundSchema = ReorderPostMortemReasonsRequest$outboundSchema; + /** @deprecated use `ReorderPostMortemReasonsRequest$Outbound` instead. */ + export type Outbound = ReorderPostMortemReasonsRequest$Outbound; +} + +export function reorderPostMortemReasonsRequestToJSON( + reorderPostMortemReasonsRequest: ReorderPostMortemReasonsRequest, +): string { + return JSON.stringify( + ReorderPostMortemReasonsRequest$outboundSchema.parse( + reorderPostMortemReasonsRequest, + ), + ); +} + +export function reorderPostMortemReasonsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ReorderPostMortemReasonsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ReorderPostMortemReasonsRequest' from JSON`, + ); +} diff --git a/src/models/operations/replacescimuser.ts b/src/models/operations/replacescimuser.ts deleted file mode 100644 index 41b2132b..00000000 --- a/src/models/operations/replacescimuser.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ReplaceScimUserRequest = { - id: string; - putV1ScimV2UsersId: components.PutV1ScimV2UsersId; -}; - -/** @internal */ -export const ReplaceScimUserRequest$inboundSchema: z.ZodType< - ReplaceScimUserRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - putV1ScimV2UsersId: components.PutV1ScimV2UsersId$inboundSchema, -}); - -/** @internal */ -export type ReplaceScimUserRequest$Outbound = { - id: string; - putV1ScimV2UsersId: components.PutV1ScimV2UsersId$Outbound; -}; - -/** @internal */ -export const ReplaceScimUserRequest$outboundSchema: z.ZodType< - ReplaceScimUserRequest$Outbound, - z.ZodTypeDef, - ReplaceScimUserRequest -> = z.object({ - id: z.string(), - putV1ScimV2UsersId: components.PutV1ScimV2UsersId$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReplaceScimUserRequest$ { - /** @deprecated use `ReplaceScimUserRequest$inboundSchema` instead. */ - export const inboundSchema = ReplaceScimUserRequest$inboundSchema; - /** @deprecated use `ReplaceScimUserRequest$outboundSchema` instead. */ - export const outboundSchema = ReplaceScimUserRequest$outboundSchema; - /** @deprecated use `ReplaceScimUserRequest$Outbound` instead. */ - export type Outbound = ReplaceScimUserRequest$Outbound; -} - -export function replaceScimUserRequestToJSON( - replaceScimUserRequest: ReplaceScimUserRequest, -): string { - return JSON.stringify( - ReplaceScimUserRequest$outboundSchema.parse(replaceScimUserRequest), - ); -} - -export function replaceScimUserRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReplaceScimUserRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReplaceScimUserRequest' from JSON`, - ); -} diff --git a/src/models/operations/resolveincident.ts b/src/models/operations/resolveincident.ts index 1880dbc8..4d01d0a2 100644 --- a/src/models/operations/resolveincident.ts +++ b/src/models/operations/resolveincident.ts @@ -12,7 +12,7 @@ export type ResolveIncidentRequestBody = { /** * The slug of any milestone in the post-incident or closed phase to set on the incident (and its children, if `resolve_children` os set). Must be one of the configured milestones available on this incident. */ - milestone?: string | undefined; + milestone?: string | null | undefined; }; export type ResolveIncidentRequest = { @@ -26,12 +26,12 @@ export const ResolveIncidentRequestBody$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - milestone: z.string().optional(), + milestone: z.nullable(z.string()).optional(), }); /** @internal */ export type ResolveIncidentRequestBody$Outbound = { - milestone?: string | undefined; + milestone?: string | null | undefined; }; /** @internal */ @@ -40,7 +40,7 @@ export const ResolveIncidentRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, ResolveIncidentRequestBody > = z.object({ - milestone: z.string().optional(), + milestone: z.nullable(z.string()).optional(), }); /** diff --git a/src/models/operations/restoreaudience.ts b/src/models/operations/restoreaudience.ts new file mode 100644 index 00000000..313e960c --- /dev/null +++ b/src/models/operations/restoreaudience.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type RestoreAudienceRequest = { + /** + * Unique identifier of the audience + */ + audienceId: string; +}; + +/** @internal */ +export const RestoreAudienceRequest$inboundSchema: z.ZodType< + RestoreAudienceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + audience_id: z.string(), +}).transform((v) => { + return remap$(v, { + "audience_id": "audienceId", + }); +}); + +/** @internal */ +export type RestoreAudienceRequest$Outbound = { + audience_id: string; +}; + +/** @internal */ +export const RestoreAudienceRequest$outboundSchema: z.ZodType< + RestoreAudienceRequest$Outbound, + z.ZodTypeDef, + RestoreAudienceRequest +> = z.object({ + audienceId: z.string(), +}).transform((v) => { + return remap$(v, { + audienceId: "audience_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RestoreAudienceRequest$ { + /** @deprecated use `RestoreAudienceRequest$inboundSchema` instead. */ + export const inboundSchema = RestoreAudienceRequest$inboundSchema; + /** @deprecated use `RestoreAudienceRequest$outboundSchema` instead. */ + export const outboundSchema = RestoreAudienceRequest$outboundSchema; + /** @deprecated use `RestoreAudienceRequest$Outbound` instead. */ + export type Outbound = RestoreAudienceRequest$Outbound; +} + +export function restoreAudienceRequestToJSON( + restoreAudienceRequest: RestoreAudienceRequest, +): string { + return JSON.stringify( + RestoreAudienceRequest$outboundSchema.parse(restoreAudienceRequest), + ); +} + +export function restoreAudienceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => RestoreAudienceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'RestoreAudienceRequest' from JSON`, + ); +} diff --git a/src/models/operations/searchconfluencespaces.ts b/src/models/operations/searchconfluencespaces.ts new file mode 100644 index 00000000..5f718f61 --- /dev/null +++ b/src/models/operations/searchconfluencespaces.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SearchConfluenceSpacesRequest = { + id: string; + /** + * Space Key + */ + keyword?: string | null | undefined; +}; + +/** @internal */ +export const SearchConfluenceSpacesRequest$inboundSchema: z.ZodType< + SearchConfluenceSpacesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + keyword: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type SearchConfluenceSpacesRequest$Outbound = { + id: string; + keyword?: string | null | undefined; +}; + +/** @internal */ +export const SearchConfluenceSpacesRequest$outboundSchema: z.ZodType< + SearchConfluenceSpacesRequest$Outbound, + z.ZodTypeDef, + SearchConfluenceSpacesRequest +> = z.object({ + id: z.string(), + keyword: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SearchConfluenceSpacesRequest$ { + /** @deprecated use `SearchConfluenceSpacesRequest$inboundSchema` instead. */ + export const inboundSchema = SearchConfluenceSpacesRequest$inboundSchema; + /** @deprecated use `SearchConfluenceSpacesRequest$outboundSchema` instead. */ + export const outboundSchema = SearchConfluenceSpacesRequest$outboundSchema; + /** @deprecated use `SearchConfluenceSpacesRequest$Outbound` instead. */ + export type Outbound = SearchConfluenceSpacesRequest$Outbound; +} + +export function searchConfluenceSpacesRequestToJSON( + searchConfluenceSpacesRequest: SearchConfluenceSpacesRequest, +): string { + return JSON.stringify( + SearchConfluenceSpacesRequest$outboundSchema.parse( + searchConfluenceSpacesRequest, + ), + ); +} + +export function searchConfluenceSpacesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SearchConfluenceSpacesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SearchConfluenceSpacesRequest' from JSON`, + ); +} diff --git a/src/models/operations/searchzendesktickets.ts b/src/models/operations/searchzendesktickets.ts index 3398ff31..05d3ecb0 100644 --- a/src/models/operations/searchzendesktickets.ts +++ b/src/models/operations/searchzendesktickets.ts @@ -9,14 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type SearchZendeskTicketsRequest = { - /** - * Zendesk ticket ID - */ - ticketId: string; - /** - * Use to include attached_incidents - */ - include?: string | undefined; + connectionId: string; + query: string; + page?: number | null | undefined; + perPage?: number | null | undefined; }; /** @internal */ @@ -25,18 +21,23 @@ export const SearchZendeskTicketsRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - ticket_id: z.string(), - include: z.string().optional(), + connection_id: z.string(), + query: z.string(), + page: z.nullable(z.number().int()).optional(), + per_page: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { - "ticket_id": "ticketId", + "connection_id": "connectionId", + "per_page": "perPage", }); }); /** @internal */ export type SearchZendeskTicketsRequest$Outbound = { - ticket_id: string; - include?: string | undefined; + connection_id: string; + query: string; + page?: number | null | undefined; + per_page?: number | null | undefined; }; /** @internal */ @@ -45,11 +46,14 @@ export const SearchZendeskTicketsRequest$outboundSchema: z.ZodType< z.ZodTypeDef, SearchZendeskTicketsRequest > = z.object({ - ticketId: z.string(), - include: z.string().optional(), + connectionId: z.string(), + query: z.string(), + page: z.nullable(z.number().int()).optional(), + perPage: z.nullable(z.number().int()).optional(), }).transform((v) => { return remap$(v, { - ticketId: "ticket_id", + connectionId: "connection_id", + perPage: "per_page", }); }); diff --git a/src/models/operations/setincidentalertasprimary.ts b/src/models/operations/setincidentalertasprimary.ts deleted file mode 100644 index c0362f70..00000000 --- a/src/models/operations/setincidentalertasprimary.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type SetIncidentAlertAsPrimaryRequest = { - incidentAlertId: string; - incidentId: string; - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: - components.PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary; -}; - -/** @internal */ -export const SetIncidentAlertAsPrimaryRequest$inboundSchema: z.ZodType< - SetIncidentAlertAsPrimaryRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_alert_id: z.string(), - incident_id: z.string(), - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: - components - .PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_alert_id": "incidentAlertId", - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type SetIncidentAlertAsPrimaryRequest$Outbound = { - incident_alert_id: string; - incident_id: string; - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: - components.PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$Outbound; -}; - -/** @internal */ -export const SetIncidentAlertAsPrimaryRequest$outboundSchema: z.ZodType< - SetIncidentAlertAsPrimaryRequest$Outbound, - z.ZodTypeDef, - SetIncidentAlertAsPrimaryRequest -> = z.object({ - incidentAlertId: z.string(), - incidentId: z.string(), - patchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary: - components - .PatchV1IncidentsIncidentIdAlertsIncidentAlertIdPrimary$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentAlertId: "incident_alert_id", - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetIncidentAlertAsPrimaryRequest$ { - /** @deprecated use `SetIncidentAlertAsPrimaryRequest$inboundSchema` instead. */ - export const inboundSchema = SetIncidentAlertAsPrimaryRequest$inboundSchema; - /** @deprecated use `SetIncidentAlertAsPrimaryRequest$outboundSchema` instead. */ - export const outboundSchema = SetIncidentAlertAsPrimaryRequest$outboundSchema; - /** @deprecated use `SetIncidentAlertAsPrimaryRequest$Outbound` instead. */ - export type Outbound = SetIncidentAlertAsPrimaryRequest$Outbound; -} - -export function setIncidentAlertAsPrimaryRequestToJSON( - setIncidentAlertAsPrimaryRequest: SetIncidentAlertAsPrimaryRequest, -): string { - return JSON.stringify( - SetIncidentAlertAsPrimaryRequest$outboundSchema.parse( - setIncidentAlertAsPrimaryRequest, - ), - ); -} - -export function setIncidentAlertAsPrimaryRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SetIncidentAlertAsPrimaryRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SetIncidentAlertAsPrimaryRequest' from JSON`, - ); -} diff --git a/src/models/operations/setmemberdefaultaudience.ts b/src/models/operations/setmemberdefaultaudience.ts new file mode 100644 index 00000000..06fff38e --- /dev/null +++ b/src/models/operations/setmemberdefaultaudience.ts @@ -0,0 +1,157 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SetMemberDefaultAudienceRequestBody = { + /** + * ID of the audience to set as default + */ + audienceId: string; +}; + +export type SetMemberDefaultAudienceRequest = { + memberId: number; + requestBody: SetMemberDefaultAudienceRequestBody; +}; + +/** @internal */ +export const SetMemberDefaultAudienceRequestBody$inboundSchema: z.ZodType< + SetMemberDefaultAudienceRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + audience_id: z.string(), +}).transform((v) => { + return remap$(v, { + "audience_id": "audienceId", + }); +}); + +/** @internal */ +export type SetMemberDefaultAudienceRequestBody$Outbound = { + audience_id: string; +}; + +/** @internal */ +export const SetMemberDefaultAudienceRequestBody$outboundSchema: z.ZodType< + SetMemberDefaultAudienceRequestBody$Outbound, + z.ZodTypeDef, + SetMemberDefaultAudienceRequestBody +> = z.object({ + audienceId: z.string(), +}).transform((v) => { + return remap$(v, { + audienceId: "audience_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SetMemberDefaultAudienceRequestBody$ { + /** @deprecated use `SetMemberDefaultAudienceRequestBody$inboundSchema` instead. */ + export const inboundSchema = + SetMemberDefaultAudienceRequestBody$inboundSchema; + /** @deprecated use `SetMemberDefaultAudienceRequestBody$outboundSchema` instead. */ + export const outboundSchema = + SetMemberDefaultAudienceRequestBody$outboundSchema; + /** @deprecated use `SetMemberDefaultAudienceRequestBody$Outbound` instead. */ + export type Outbound = SetMemberDefaultAudienceRequestBody$Outbound; +} + +export function setMemberDefaultAudienceRequestBodyToJSON( + setMemberDefaultAudienceRequestBody: SetMemberDefaultAudienceRequestBody, +): string { + return JSON.stringify( + SetMemberDefaultAudienceRequestBody$outboundSchema.parse( + setMemberDefaultAudienceRequestBody, + ), + ); +} + +export function setMemberDefaultAudienceRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + SetMemberDefaultAudienceRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SetMemberDefaultAudienceRequestBody' from JSON`, + ); +} + +/** @internal */ +export const SetMemberDefaultAudienceRequest$inboundSchema: z.ZodType< + SetMemberDefaultAudienceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + member_id: z.number().int(), + RequestBody: z.lazy(() => SetMemberDefaultAudienceRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "member_id": "memberId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type SetMemberDefaultAudienceRequest$Outbound = { + member_id: number; + RequestBody: SetMemberDefaultAudienceRequestBody$Outbound; +}; + +/** @internal */ +export const SetMemberDefaultAudienceRequest$outboundSchema: z.ZodType< + SetMemberDefaultAudienceRequest$Outbound, + z.ZodTypeDef, + SetMemberDefaultAudienceRequest +> = z.object({ + memberId: z.number().int(), + requestBody: z.lazy(() => SetMemberDefaultAudienceRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + memberId: "member_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SetMemberDefaultAudienceRequest$ { + /** @deprecated use `SetMemberDefaultAudienceRequest$inboundSchema` instead. */ + export const inboundSchema = SetMemberDefaultAudienceRequest$inboundSchema; + /** @deprecated use `SetMemberDefaultAudienceRequest$outboundSchema` instead. */ + export const outboundSchema = SetMemberDefaultAudienceRequest$outboundSchema; + /** @deprecated use `SetMemberDefaultAudienceRequest$Outbound` instead. */ + export type Outbound = SetMemberDefaultAudienceRequest$Outbound; +} + +export function setMemberDefaultAudienceRequestToJSON( + setMemberDefaultAudienceRequest: SetMemberDefaultAudienceRequest, +): string { + return JSON.stringify( + SetMemberDefaultAudienceRequest$outboundSchema.parse( + setMemberDefaultAudienceRequest, + ), + ); +} + +export function setMemberDefaultAudienceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => SetMemberDefaultAudienceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SetMemberDefaultAudienceRequest' from JSON`, + ); +} diff --git a/src/models/operations/shareincidentretrospectives.ts b/src/models/operations/shareincidentretrospectives.ts new file mode 100644 index 00000000..84f6c4cf --- /dev/null +++ b/src/models/operations/shareincidentretrospectives.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type ShareIncidentRetrospectivesRequestBody = { + /** + * An array of user IDs with whom to share the report + */ + userIds?: Array | null | undefined; + /** + * An array of team IDs with whom to share the report + */ + teamIds?: Array | null | undefined; + /** + * An array of retrospective IDs to share + */ + retrospectiveIds: Array; +}; + +export type ShareIncidentRetrospectivesRequest = { + incidentId: string; + requestBody: ShareIncidentRetrospectivesRequestBody; +}; + +/** @internal */ +export const ShareIncidentRetrospectivesRequestBody$inboundSchema: z.ZodType< + ShareIncidentRetrospectivesRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + user_ids: z.nullable(z.array(z.string())).optional(), + team_ids: z.nullable(z.array(z.string())).optional(), + retrospective_ids: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + "user_ids": "userIds", + "team_ids": "teamIds", + "retrospective_ids": "retrospectiveIds", + }); +}); + +/** @internal */ +export type ShareIncidentRetrospectivesRequestBody$Outbound = { + user_ids?: Array | null | undefined; + team_ids?: Array | null | undefined; + retrospective_ids: Array; +}; + +/** @internal */ +export const ShareIncidentRetrospectivesRequestBody$outboundSchema: z.ZodType< + ShareIncidentRetrospectivesRequestBody$Outbound, + z.ZodTypeDef, + ShareIncidentRetrospectivesRequestBody +> = z.object({ + userIds: z.nullable(z.array(z.string())).optional(), + teamIds: z.nullable(z.array(z.string())).optional(), + retrospectiveIds: z.array(z.string()), +}).transform((v) => { + return remap$(v, { + userIds: "user_ids", + teamIds: "team_ids", + retrospectiveIds: "retrospective_ids", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ShareIncidentRetrospectivesRequestBody$ { + /** @deprecated use `ShareIncidentRetrospectivesRequestBody$inboundSchema` instead. */ + export const inboundSchema = + ShareIncidentRetrospectivesRequestBody$inboundSchema; + /** @deprecated use `ShareIncidentRetrospectivesRequestBody$outboundSchema` instead. */ + export const outboundSchema = + ShareIncidentRetrospectivesRequestBody$outboundSchema; + /** @deprecated use `ShareIncidentRetrospectivesRequestBody$Outbound` instead. */ + export type Outbound = ShareIncidentRetrospectivesRequestBody$Outbound; +} + +export function shareIncidentRetrospectivesRequestBodyToJSON( + shareIncidentRetrospectivesRequestBody: + ShareIncidentRetrospectivesRequestBody, +): string { + return JSON.stringify( + ShareIncidentRetrospectivesRequestBody$outboundSchema.parse( + shareIncidentRetrospectivesRequestBody, + ), + ); +} + +export function shareIncidentRetrospectivesRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ShareIncidentRetrospectivesRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ShareIncidentRetrospectivesRequestBody' from JSON`, + ); +} + +/** @internal */ +export const ShareIncidentRetrospectivesRequest$inboundSchema: z.ZodType< + ShareIncidentRetrospectivesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + RequestBody: z.lazy(() => + ShareIncidentRetrospectivesRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type ShareIncidentRetrospectivesRequest$Outbound = { + incident_id: string; + RequestBody: ShareIncidentRetrospectivesRequestBody$Outbound; +}; + +/** @internal */ +export const ShareIncidentRetrospectivesRequest$outboundSchema: z.ZodType< + ShareIncidentRetrospectivesRequest$Outbound, + z.ZodTypeDef, + ShareIncidentRetrospectivesRequest +> = z.object({ + incidentId: z.string(), + requestBody: z.lazy(() => + ShareIncidentRetrospectivesRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ShareIncidentRetrospectivesRequest$ { + /** @deprecated use `ShareIncidentRetrospectivesRequest$inboundSchema` instead. */ + export const inboundSchema = ShareIncidentRetrospectivesRequest$inboundSchema; + /** @deprecated use `ShareIncidentRetrospectivesRequest$outboundSchema` instead. */ + export const outboundSchema = + ShareIncidentRetrospectivesRequest$outboundSchema; + /** @deprecated use `ShareIncidentRetrospectivesRequest$Outbound` instead. */ + export type Outbound = ShareIncidentRetrospectivesRequest$Outbound; +} + +export function shareIncidentRetrospectivesRequestToJSON( + shareIncidentRetrospectivesRequest: ShareIncidentRetrospectivesRequest, +): string { + return JSON.stringify( + ShareIncidentRetrospectivesRequest$outboundSchema.parse( + shareIncidentRetrospectivesRequest, + ), + ); +} + +export function shareIncidentRetrospectivesRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + ShareIncidentRetrospectivesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ShareIncidentRetrospectivesRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateaipreferences.ts b/src/models/operations/updateaipreferences.ts index cf345e98..781eae45 100644 --- a/src/models/operations/updateaipreferences.ts +++ b/src/models/operations/updateaipreferences.ts @@ -8,55 +8,55 @@ import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type UpdateAiPreferencesRequestBody = { +export type UpdateAiPreferencesRequest = { /** * Whether to enable AI features */ - ai?: boolean | undefined; + ai?: boolean | null | undefined; /** * Whether to enable incident summaries */ - summaries?: boolean | undefined; + summaries?: boolean | null | undefined; /** * Whether to enable incident descriptions */ - description?: boolean | undefined; + description?: boolean | null | undefined; /** * Whether to enable incident impact */ - impact?: boolean | undefined; + impact?: boolean | null | undefined; /** * Whether to enable incident updates */ - updates?: boolean | undefined; + updates?: boolean | null | undefined; /** * Whether to enable incident retrospectives */ - retros?: boolean | undefined; + retros?: boolean | null | undefined; /** * Whether to enable incident followups */ - followups?: boolean | undefined; + followups?: boolean | null | undefined; /** * Whether to enable similar incidents */ - similarIncidents?: boolean | undefined; + similarIncidents?: boolean | null | undefined; }; /** @internal */ -export const UpdateAiPreferencesRequestBody$inboundSchema: z.ZodType< - UpdateAiPreferencesRequestBody, +export const UpdateAiPreferencesRequest$inboundSchema: z.ZodType< + UpdateAiPreferencesRequest, z.ZodTypeDef, unknown > = z.object({ - ai: z.boolean().optional(), - summaries: z.boolean().optional(), - description: z.boolean().optional(), - impact: z.boolean().optional(), - updates: z.boolean().optional(), - retros: z.boolean().optional(), - followups: z.boolean().optional(), - similar_incidents: z.boolean().optional(), + ai: z.nullable(z.boolean()).optional(), + summaries: z.nullable(z.boolean()).optional(), + description: z.nullable(z.boolean()).optional(), + impact: z.nullable(z.boolean()).optional(), + updates: z.nullable(z.boolean()).optional(), + retros: z.nullable(z.boolean()).optional(), + followups: z.nullable(z.boolean()).optional(), + similar_incidents: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { "similar_incidents": "similarIncidents", @@ -64,31 +64,31 @@ export const UpdateAiPreferencesRequestBody$inboundSchema: z.ZodType< }); /** @internal */ -export type UpdateAiPreferencesRequestBody$Outbound = { - ai?: boolean | undefined; - summaries?: boolean | undefined; - description?: boolean | undefined; - impact?: boolean | undefined; - updates?: boolean | undefined; - retros?: boolean | undefined; - followups?: boolean | undefined; - similar_incidents?: boolean | undefined; +export type UpdateAiPreferencesRequest$Outbound = { + ai?: boolean | null | undefined; + summaries?: boolean | null | undefined; + description?: boolean | null | undefined; + impact?: boolean | null | undefined; + updates?: boolean | null | undefined; + retros?: boolean | null | undefined; + followups?: boolean | null | undefined; + similar_incidents?: boolean | null | undefined; }; /** @internal */ -export const UpdateAiPreferencesRequestBody$outboundSchema: z.ZodType< - UpdateAiPreferencesRequestBody$Outbound, +export const UpdateAiPreferencesRequest$outboundSchema: z.ZodType< + UpdateAiPreferencesRequest$Outbound, z.ZodTypeDef, - UpdateAiPreferencesRequestBody + UpdateAiPreferencesRequest > = z.object({ - ai: z.boolean().optional(), - summaries: z.boolean().optional(), - description: z.boolean().optional(), - impact: z.boolean().optional(), - updates: z.boolean().optional(), - retros: z.boolean().optional(), - followups: z.boolean().optional(), - similarIncidents: z.boolean().optional(), + ai: z.nullable(z.boolean()).optional(), + summaries: z.nullable(z.boolean()).optional(), + description: z.nullable(z.boolean()).optional(), + impact: z.nullable(z.boolean()).optional(), + updates: z.nullable(z.boolean()).optional(), + retros: z.nullable(z.boolean()).optional(), + followups: z.nullable(z.boolean()).optional(), + similarIncidents: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { similarIncidents: "similar_incidents", @@ -99,31 +99,29 @@ export const UpdateAiPreferencesRequestBody$outboundSchema: z.ZodType< * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UpdateAiPreferencesRequestBody$ { - /** @deprecated use `UpdateAiPreferencesRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateAiPreferencesRequestBody$inboundSchema; - /** @deprecated use `UpdateAiPreferencesRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateAiPreferencesRequestBody$outboundSchema; - /** @deprecated use `UpdateAiPreferencesRequestBody$Outbound` instead. */ - export type Outbound = UpdateAiPreferencesRequestBody$Outbound; +export namespace UpdateAiPreferencesRequest$ { + /** @deprecated use `UpdateAiPreferencesRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateAiPreferencesRequest$inboundSchema; + /** @deprecated use `UpdateAiPreferencesRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateAiPreferencesRequest$outboundSchema; + /** @deprecated use `UpdateAiPreferencesRequest$Outbound` instead. */ + export type Outbound = UpdateAiPreferencesRequest$Outbound; } -export function updateAiPreferencesRequestBodyToJSON( - updateAiPreferencesRequestBody: UpdateAiPreferencesRequestBody, +export function updateAiPreferencesRequestToJSON( + updateAiPreferencesRequest: UpdateAiPreferencesRequest, ): string { return JSON.stringify( - UpdateAiPreferencesRequestBody$outboundSchema.parse( - updateAiPreferencesRequestBody, - ), + UpdateAiPreferencesRequest$outboundSchema.parse(updateAiPreferencesRequest), ); } -export function updateAiPreferencesRequestBodyFromJSON( +export function updateAiPreferencesRequestFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => UpdateAiPreferencesRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateAiPreferencesRequestBody' from JSON`, + (x) => UpdateAiPreferencesRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAiPreferencesRequest' from JSON`, ); } diff --git a/src/models/operations/updateaudience.ts b/src/models/operations/updateaudience.ts new file mode 100644 index 00000000..f3529eb6 --- /dev/null +++ b/src/models/operations/updateaudience.ts @@ -0,0 +1,209 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateAudienceRequestBody = { + /** + * Name of the audience (max 255 characters) + */ + name?: string | null | undefined; + /** + * Description of the audience (max 4000 characters) + */ + description?: string | null | undefined; + /** + * Whether this is the default audience + */ + default?: boolean | null | undefined; + /** + * Whether the audience is active or discarded + */ + active?: boolean | null | undefined; + /** + * The incident detail question (max 255 characters) + */ + detailsQuestion?: Array | null | undefined; + /** + * The prompt to display when collecting this detail + */ + detailsPrompt?: Array | null | undefined; + /** + * Optional unique identifier for this detail + */ + detailsSlug?: Array | null | undefined; + /** + * Position of the question in the list (1-based indexing) + */ + detailsPosition?: Array | null | undefined; +}; + +export type UpdateAudienceRequest = { + /** + * Unique identifier of the audience + */ + audienceId: string; + requestBody?: UpdateAudienceRequestBody | undefined; +}; + +/** @internal */ +export const UpdateAudienceRequestBody$inboundSchema: z.ZodType< + UpdateAudienceRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), + active: z.nullable(z.boolean()).optional(), + "details[question]": z.nullable(z.array(z.string())).optional(), + "details[prompt]": z.nullable(z.array(z.string())).optional(), + "details[slug]": z.nullable(z.array(z.string())).optional(), + "details[position]": z.nullable(z.array(z.number().int())).optional(), +}).transform((v) => { + return remap$(v, { + "details[question]": "detailsQuestion", + "details[prompt]": "detailsPrompt", + "details[slug]": "detailsSlug", + "details[position]": "detailsPosition", + }); +}); + +/** @internal */ +export type UpdateAudienceRequestBody$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + default?: boolean | null | undefined; + active?: boolean | null | undefined; + "details[question]"?: Array | null | undefined; + "details[prompt]"?: Array | null | undefined; + "details[slug]"?: Array | null | undefined; + "details[position]"?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateAudienceRequestBody$outboundSchema: z.ZodType< + UpdateAudienceRequestBody$Outbound, + z.ZodTypeDef, + UpdateAudienceRequestBody +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + default: z.nullable(z.boolean()).optional(), + active: z.nullable(z.boolean()).optional(), + detailsQuestion: z.nullable(z.array(z.string())).optional(), + detailsPrompt: z.nullable(z.array(z.string())).optional(), + detailsSlug: z.nullable(z.array(z.string())).optional(), + detailsPosition: z.nullable(z.array(z.number().int())).optional(), +}).transform((v) => { + return remap$(v, { + detailsQuestion: "details[question]", + detailsPrompt: "details[prompt]", + detailsSlug: "details[slug]", + detailsPosition: "details[position]", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateAudienceRequestBody$ { + /** @deprecated use `UpdateAudienceRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateAudienceRequestBody$inboundSchema; + /** @deprecated use `UpdateAudienceRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateAudienceRequestBody$outboundSchema; + /** @deprecated use `UpdateAudienceRequestBody$Outbound` instead. */ + export type Outbound = UpdateAudienceRequestBody$Outbound; +} + +export function updateAudienceRequestBodyToJSON( + updateAudienceRequestBody: UpdateAudienceRequestBody, +): string { + return JSON.stringify( + UpdateAudienceRequestBody$outboundSchema.parse(updateAudienceRequestBody), + ); +} + +export function updateAudienceRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateAudienceRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAudienceRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateAudienceRequest$inboundSchema: z.ZodType< + UpdateAudienceRequest, + z.ZodTypeDef, + unknown +> = z.object({ + audience_id: z.string(), + RequestBody: z.lazy(() => UpdateAudienceRequestBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "audience_id": "audienceId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateAudienceRequest$Outbound = { + audience_id: string; + RequestBody?: UpdateAudienceRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const UpdateAudienceRequest$outboundSchema: z.ZodType< + UpdateAudienceRequest$Outbound, + z.ZodTypeDef, + UpdateAudienceRequest +> = z.object({ + audienceId: z.string(), + requestBody: z.lazy(() => UpdateAudienceRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + audienceId: "audience_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateAudienceRequest$ { + /** @deprecated use `UpdateAudienceRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateAudienceRequest$inboundSchema; + /** @deprecated use `UpdateAudienceRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateAudienceRequest$outboundSchema; + /** @deprecated use `UpdateAudienceRequest$Outbound` instead. */ + export type Outbound = UpdateAudienceRequest$Outbound; +} + +export function updateAudienceRequestToJSON( + updateAudienceRequest: UpdateAudienceRequest, +): string { + return JSON.stringify( + UpdateAudienceRequest$outboundSchema.parse(updateAudienceRequest), + ); +} + +export function updateAudienceRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateAudienceRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAudienceRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateauthedprovider.ts b/src/models/operations/updateauthedprovider.ts new file mode 100644 index 00000000..84b4b416 --- /dev/null +++ b/src/models/operations/updateauthedprovider.ts @@ -0,0 +1,177 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateAuthedProviderRequestBody = { + /** + * Set as the default integration for the account + */ + integrationDefault?: boolean | null | undefined; +}; + +export type UpdateAuthedProviderRequest = { + /** + * Integration slug + */ + integrationSlug: string; + /** + * Connection ID + */ + connectionId: string; + /** + * Authed provider ID + */ + authedProviderId: string; + requestBody?: UpdateAuthedProviderRequestBody | undefined; +}; + +/** @internal */ +export const UpdateAuthedProviderRequestBody$inboundSchema: z.ZodType< + UpdateAuthedProviderRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + integration_default: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + "integration_default": "integrationDefault", + }); +}); + +/** @internal */ +export type UpdateAuthedProviderRequestBody$Outbound = { + integration_default?: boolean | null | undefined; +}; + +/** @internal */ +export const UpdateAuthedProviderRequestBody$outboundSchema: z.ZodType< + UpdateAuthedProviderRequestBody$Outbound, + z.ZodTypeDef, + UpdateAuthedProviderRequestBody +> = z.object({ + integrationDefault: z.nullable(z.boolean()).optional(), +}).transform((v) => { + return remap$(v, { + integrationDefault: "integration_default", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateAuthedProviderRequestBody$ { + /** @deprecated use `UpdateAuthedProviderRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateAuthedProviderRequestBody$inboundSchema; + /** @deprecated use `UpdateAuthedProviderRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateAuthedProviderRequestBody$outboundSchema; + /** @deprecated use `UpdateAuthedProviderRequestBody$Outbound` instead. */ + export type Outbound = UpdateAuthedProviderRequestBody$Outbound; +} + +export function updateAuthedProviderRequestBodyToJSON( + updateAuthedProviderRequestBody: UpdateAuthedProviderRequestBody, +): string { + return JSON.stringify( + UpdateAuthedProviderRequestBody$outboundSchema.parse( + updateAuthedProviderRequestBody, + ), + ); +} + +export function updateAuthedProviderRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateAuthedProviderRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAuthedProviderRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateAuthedProviderRequest$inboundSchema: z.ZodType< + UpdateAuthedProviderRequest, + z.ZodTypeDef, + unknown +> = z.object({ + integration_slug: z.string(), + connection_id: z.string(), + authed_provider_id: z.string(), + RequestBody: z.lazy(() => UpdateAuthedProviderRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "integration_slug": "integrationSlug", + "connection_id": "connectionId", + "authed_provider_id": "authedProviderId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateAuthedProviderRequest$Outbound = { + integration_slug: string; + connection_id: string; + authed_provider_id: string; + RequestBody?: UpdateAuthedProviderRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const UpdateAuthedProviderRequest$outboundSchema: z.ZodType< + UpdateAuthedProviderRequest$Outbound, + z.ZodTypeDef, + UpdateAuthedProviderRequest +> = z.object({ + integrationSlug: z.string(), + connectionId: z.string(), + authedProviderId: z.string(), + requestBody: z.lazy(() => UpdateAuthedProviderRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + integrationSlug: "integration_slug", + connectionId: "connection_id", + authedProviderId: "authed_provider_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateAuthedProviderRequest$ { + /** @deprecated use `UpdateAuthedProviderRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateAuthedProviderRequest$inboundSchema; + /** @deprecated use `UpdateAuthedProviderRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateAuthedProviderRequest$outboundSchema; + /** @deprecated use `UpdateAuthedProviderRequest$Outbound` instead. */ + export type Outbound = UpdateAuthedProviderRequest$Outbound; +} + +export function updateAuthedProviderRequestToJSON( + updateAuthedProviderRequest: UpdateAuthedProviderRequest, +): string { + return JSON.stringify( + UpdateAuthedProviderRequest$outboundSchema.parse( + updateAuthedProviderRequest, + ), + ); +} + +export function updateAuthedProviderRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateAuthedProviderRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAuthedProviderRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateawscloudtrailbatch.ts b/src/models/operations/updateawscloudtrailbatch.ts index b8b6435a..51cdfab8 100644 --- a/src/models/operations/updateawscloudtrailbatch.ts +++ b/src/models/operations/updateawscloudtrailbatch.ts @@ -3,75 +3,84 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export type UpdateAwsCloudTrailBatchRequest = { +export type UpdateAwsCloudtrailBatchRequest = { id: string; - patchV1IntegrationsAwsCloudtrailBatchesId: - components.PatchV1IntegrationsAwsCloudtrailBatchesId; + updateAwsCloudtrailBatch: components.UpdateAwsCloudtrailBatch; }; /** @internal */ -export const UpdateAwsCloudTrailBatchRequest$inboundSchema: z.ZodType< - UpdateAwsCloudTrailBatchRequest, +export const UpdateAwsCloudtrailBatchRequest$inboundSchema: z.ZodType< + UpdateAwsCloudtrailBatchRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), - patchV1IntegrationsAwsCloudtrailBatchesId: - components.PatchV1IntegrationsAwsCloudtrailBatchesId$inboundSchema, + update_aws_cloudtrail_batch: z.lazy(() => + components.UpdateAwsCloudtrailBatch$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "update_aws_cloudtrail_batch": "updateAwsCloudtrailBatch", + }); }); /** @internal */ -export type UpdateAwsCloudTrailBatchRequest$Outbound = { +export type UpdateAwsCloudtrailBatchRequest$Outbound = { id: string; - patchV1IntegrationsAwsCloudtrailBatchesId: - components.PatchV1IntegrationsAwsCloudtrailBatchesId$Outbound; + update_aws_cloudtrail_batch: components.UpdateAwsCloudtrailBatch$Outbound; }; /** @internal */ -export const UpdateAwsCloudTrailBatchRequest$outboundSchema: z.ZodType< - UpdateAwsCloudTrailBatchRequest$Outbound, +export const UpdateAwsCloudtrailBatchRequest$outboundSchema: z.ZodType< + UpdateAwsCloudtrailBatchRequest$Outbound, z.ZodTypeDef, - UpdateAwsCloudTrailBatchRequest + UpdateAwsCloudtrailBatchRequest > = z.object({ id: z.string(), - patchV1IntegrationsAwsCloudtrailBatchesId: - components.PatchV1IntegrationsAwsCloudtrailBatchesId$outboundSchema, + updateAwsCloudtrailBatch: z.lazy(() => + components.UpdateAwsCloudtrailBatch$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + updateAwsCloudtrailBatch: "update_aws_cloudtrail_batch", + }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UpdateAwsCloudTrailBatchRequest$ { - /** @deprecated use `UpdateAwsCloudTrailBatchRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateAwsCloudTrailBatchRequest$inboundSchema; - /** @deprecated use `UpdateAwsCloudTrailBatchRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateAwsCloudTrailBatchRequest$outboundSchema; - /** @deprecated use `UpdateAwsCloudTrailBatchRequest$Outbound` instead. */ - export type Outbound = UpdateAwsCloudTrailBatchRequest$Outbound; +export namespace UpdateAwsCloudtrailBatchRequest$ { + /** @deprecated use `UpdateAwsCloudtrailBatchRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateAwsCloudtrailBatchRequest$inboundSchema; + /** @deprecated use `UpdateAwsCloudtrailBatchRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateAwsCloudtrailBatchRequest$outboundSchema; + /** @deprecated use `UpdateAwsCloudtrailBatchRequest$Outbound` instead. */ + export type Outbound = UpdateAwsCloudtrailBatchRequest$Outbound; } -export function updateAwsCloudTrailBatchRequestToJSON( - updateAwsCloudTrailBatchRequest: UpdateAwsCloudTrailBatchRequest, +export function updateAwsCloudtrailBatchRequestToJSON( + updateAwsCloudtrailBatchRequest: UpdateAwsCloudtrailBatchRequest, ): string { return JSON.stringify( - UpdateAwsCloudTrailBatchRequest$outboundSchema.parse( - updateAwsCloudTrailBatchRequest, + UpdateAwsCloudtrailBatchRequest$outboundSchema.parse( + updateAwsCloudtrailBatchRequest, ), ); } -export function updateAwsCloudTrailBatchRequestFromJSON( +export function updateAwsCloudtrailBatchRequestFromJSON( jsonString: string, -): SafeParseResult { +): SafeParseResult { return safeParse( jsonString, - (x) => UpdateAwsCloudTrailBatchRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateAwsCloudTrailBatchRequest' from JSON`, + (x) => UpdateAwsCloudtrailBatchRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateAwsCloudtrailBatchRequest' from JSON`, ); } diff --git a/src/models/operations/updateawsconnection.ts b/src/models/operations/updateawsconnection.ts index bdb10361..29c82726 100644 --- a/src/models/operations/updateawsconnection.ts +++ b/src/models/operations/updateawsconnection.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -10,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateAwsConnectionRequest = { id: string; - patchV1IntegrationsAwsConnectionsId: - components.PatchV1IntegrationsAwsConnectionsId; + updateAwsConnection: components.UpdateAwsConnection; }; /** @internal */ @@ -21,15 +21,19 @@ export const UpdateAwsConnectionRequest$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - patchV1IntegrationsAwsConnectionsId: - components.PatchV1IntegrationsAwsConnectionsId$inboundSchema, + update_aws_connection: z.lazy(() => + components.UpdateAwsConnection$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "update_aws_connection": "updateAwsConnection", + }); }); /** @internal */ export type UpdateAwsConnectionRequest$Outbound = { id: string; - patchV1IntegrationsAwsConnectionsId: - components.PatchV1IntegrationsAwsConnectionsId$Outbound; + update_aws_connection: components.UpdateAwsConnection$Outbound; }; /** @internal */ @@ -39,8 +43,13 @@ export const UpdateAwsConnectionRequest$outboundSchema: z.ZodType< UpdateAwsConnectionRequest > = z.object({ id: z.string(), - patchV1IntegrationsAwsConnectionsId: - components.PatchV1IntegrationsAwsConnectionsId$outboundSchema, + updateAwsConnection: z.lazy(() => + components.UpdateAwsConnection$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + updateAwsConnection: "update_aws_connection", + }); }); /** diff --git a/src/models/operations/updatechange.ts b/src/models/operations/updatechange.ts index d0e8e5aa..a8fdfae1 100644 --- a/src/models/operations/updatechange.ts +++ b/src/models/operations/updatechange.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateChangeRequest = { changeId: string; - patchV1ChangesChangeId: components.PatchV1ChangesChangeId; + updateChange: components.UpdateChange; }; /** @internal */ @@ -21,17 +21,18 @@ export const UpdateChangeRequest$inboundSchema: z.ZodType< unknown > = z.object({ change_id: z.string(), - patchV1ChangesChangeId: components.PatchV1ChangesChangeId$inboundSchema, + update_change: z.lazy(() => components.UpdateChange$inboundSchema), }).transform((v) => { return remap$(v, { "change_id": "changeId", + "update_change": "updateChange", }); }); /** @internal */ export type UpdateChangeRequest$Outbound = { change_id: string; - patchV1ChangesChangeId: components.PatchV1ChangesChangeId$Outbound; + update_change: components.UpdateChange$Outbound; }; /** @internal */ @@ -41,10 +42,11 @@ export const UpdateChangeRequest$outboundSchema: z.ZodType< UpdateChangeRequest > = z.object({ changeId: z.string(), - patchV1ChangesChangeId: components.PatchV1ChangesChangeId$outboundSchema, + updateChange: z.lazy(() => components.UpdateChange$outboundSchema), }).transform((v) => { return remap$(v, { changeId: "change_id", + updateChange: "update_change", }); }); diff --git a/src/models/operations/updatechangeevent.ts b/src/models/operations/updatechangeevent.ts index 3558a87d..93d87e19 100644 --- a/src/models/operations/updatechangeevent.ts +++ b/src/models/operations/updatechangeevent.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateChangeEventRequest = { changeEventId: string; - patchV1ChangesEventsChangeEventId: - components.PatchV1ChangesEventsChangeEventId; + updateChangeEvent: components.UpdateChangeEvent; }; /** @internal */ @@ -22,19 +21,18 @@ export const UpdateChangeEventRequest$inboundSchema: z.ZodType< unknown > = z.object({ change_event_id: z.string(), - patchV1ChangesEventsChangeEventId: - components.PatchV1ChangesEventsChangeEventId$inboundSchema, + update_change_event: z.lazy(() => components.UpdateChangeEvent$inboundSchema), }).transform((v) => { return remap$(v, { "change_event_id": "changeEventId", + "update_change_event": "updateChangeEvent", }); }); /** @internal */ export type UpdateChangeEventRequest$Outbound = { change_event_id: string; - patchV1ChangesEventsChangeEventId: - components.PatchV1ChangesEventsChangeEventId$Outbound; + update_change_event: components.UpdateChangeEvent$Outbound; }; /** @internal */ @@ -44,11 +42,11 @@ export const UpdateChangeEventRequest$outboundSchema: z.ZodType< UpdateChangeEventRequest > = z.object({ changeEventId: z.string(), - patchV1ChangesEventsChangeEventId: - components.PatchV1ChangesEventsChangeEventId$outboundSchema, + updateChangeEvent: z.lazy(() => components.UpdateChangeEvent$outboundSchema), }).transform((v) => { return remap$(v, { changeEventId: "change_event_id", + updateChangeEvent: "update_change_event", }); }); diff --git a/src/models/operations/updatechangeidentity.ts b/src/models/operations/updatechangeidentity.ts index 108653b6..04ed8c83 100644 --- a/src/models/operations/updatechangeidentity.ts +++ b/src/models/operations/updatechangeidentity.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateChangeIdentityRequest = { identityId: string; changeId: string; - patchV1ChangesChangeIdIdentitiesIdentityId: - components.PatchV1ChangesChangeIdIdentitiesIdentityId; + updateChangeIdentity: components.UpdateChangeIdentity; }; /** @internal */ @@ -24,12 +23,14 @@ export const UpdateChangeIdentityRequest$inboundSchema: z.ZodType< > = z.object({ identity_id: z.string(), change_id: z.string(), - patchV1ChangesChangeIdIdentitiesIdentityId: - components.PatchV1ChangesChangeIdIdentitiesIdentityId$inboundSchema, + update_change_identity: z.lazy(() => + components.UpdateChangeIdentity$inboundSchema + ), }).transform((v) => { return remap$(v, { "identity_id": "identityId", "change_id": "changeId", + "update_change_identity": "updateChangeIdentity", }); }); @@ -37,8 +38,7 @@ export const UpdateChangeIdentityRequest$inboundSchema: z.ZodType< export type UpdateChangeIdentityRequest$Outbound = { identity_id: string; change_id: string; - patchV1ChangesChangeIdIdentitiesIdentityId: - components.PatchV1ChangesChangeIdIdentitiesIdentityId$Outbound; + update_change_identity: components.UpdateChangeIdentity$Outbound; }; /** @internal */ @@ -49,12 +49,14 @@ export const UpdateChangeIdentityRequest$outboundSchema: z.ZodType< > = z.object({ identityId: z.string(), changeId: z.string(), - patchV1ChangesChangeIdIdentitiesIdentityId: - components.PatchV1ChangesChangeIdIdentitiesIdentityId$outboundSchema, + updateChangeIdentity: z.lazy(() => + components.UpdateChangeIdentity$outboundSchema + ), }).transform((v) => { return remap$(v, { identityId: "identity_id", changeId: "change_id", + updateChangeIdentity: "update_change_identity", }); }); diff --git a/src/models/operations/updatechecklisttemplate.ts b/src/models/operations/updatechecklisttemplate.ts index 789d9249..3514efa1 100644 --- a/src/models/operations/updatechecklisttemplate.ts +++ b/src/models/operations/updatechecklisttemplate.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -10,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateChecklistTemplateRequest = { id: string; - patchV1ChecklistTemplatesId: components.PatchV1ChecklistTemplatesId; + updateChecklistTemplate: components.UpdateChecklistTemplate; }; /** @internal */ @@ -20,14 +21,19 @@ export const UpdateChecklistTemplateRequest$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - patchV1ChecklistTemplatesId: - components.PatchV1ChecklistTemplatesId$inboundSchema, + update_checklist_template: z.lazy(() => + components.UpdateChecklistTemplate$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "update_checklist_template": "updateChecklistTemplate", + }); }); /** @internal */ export type UpdateChecklistTemplateRequest$Outbound = { id: string; - patchV1ChecklistTemplatesId: components.PatchV1ChecklistTemplatesId$Outbound; + update_checklist_template: components.UpdateChecklistTemplate$Outbound; }; /** @internal */ @@ -37,8 +43,13 @@ export const UpdateChecklistTemplateRequest$outboundSchema: z.ZodType< UpdateChecklistTemplateRequest > = z.object({ id: z.string(), - patchV1ChecklistTemplatesId: - components.PatchV1ChecklistTemplatesId$outboundSchema, + updateChecklistTemplate: z.lazy(() => + components.UpdateChecklistTemplate$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + updateChecklistTemplate: "update_checklist_template", + }); }); /** diff --git a/src/models/operations/updatecomment.ts b/src/models/operations/updatecomment.ts new file mode 100644 index 00000000..f6235ed5 --- /dev/null +++ b/src/models/operations/updatecomment.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateCommentRequest = { + commentId: string; + conversationId: string; + updateComment: components.UpdateComment; +}; + +/** @internal */ +export const UpdateCommentRequest$inboundSchema: z.ZodType< + UpdateCommentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + comment_id: z.string(), + conversation_id: z.string(), + update_comment: z.lazy(() => components.UpdateComment$inboundSchema), +}).transform((v) => { + return remap$(v, { + "comment_id": "commentId", + "conversation_id": "conversationId", + "update_comment": "updateComment", + }); +}); + +/** @internal */ +export type UpdateCommentRequest$Outbound = { + comment_id: string; + conversation_id: string; + update_comment: components.UpdateComment$Outbound; +}; + +/** @internal */ +export const UpdateCommentRequest$outboundSchema: z.ZodType< + UpdateCommentRequest$Outbound, + z.ZodTypeDef, + UpdateCommentRequest +> = z.object({ + commentId: z.string(), + conversationId: z.string(), + updateComment: z.lazy(() => components.UpdateComment$outboundSchema), +}).transform((v) => { + return remap$(v, { + commentId: "comment_id", + conversationId: "conversation_id", + updateComment: "update_comment", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateCommentRequest$ { + /** @deprecated use `UpdateCommentRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateCommentRequest$inboundSchema; + /** @deprecated use `UpdateCommentRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateCommentRequest$outboundSchema; + /** @deprecated use `UpdateCommentRequest$Outbound` instead. */ + export type Outbound = UpdateCommentRequest$Outbound; +} + +export function updateCommentRequestToJSON( + updateCommentRequest: UpdateCommentRequest, +): string { + return JSON.stringify( + UpdateCommentRequest$outboundSchema.parse(updateCommentRequest), + ); +} + +export function updateCommentRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateCommentRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateCommentRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateconnection.ts b/src/models/operations/updateconnection.ts new file mode 100644 index 00000000..ca3edb9a --- /dev/null +++ b/src/models/operations/updateconnection.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateConnectionRequest = { + slug: string; + connectionId: string; +}; + +/** @internal */ +export const UpdateConnectionRequest$inboundSchema: z.ZodType< + UpdateConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + slug: z.string(), + connection_id: z.string(), +}).transform((v) => { + return remap$(v, { + "connection_id": "connectionId", + }); +}); + +/** @internal */ +export type UpdateConnectionRequest$Outbound = { + slug: string; + connection_id: string; +}; + +/** @internal */ +export const UpdateConnectionRequest$outboundSchema: z.ZodType< + UpdateConnectionRequest$Outbound, + z.ZodTypeDef, + UpdateConnectionRequest +> = z.object({ + slug: z.string(), + connectionId: z.string(), +}).transform((v) => { + return remap$(v, { + connectionId: "connection_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateConnectionRequest$ { + /** @deprecated use `UpdateConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateConnectionRequest$inboundSchema; + /** @deprecated use `UpdateConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateConnectionRequest$outboundSchema; + /** @deprecated use `UpdateConnectionRequest$Outbound` instead. */ + export type Outbound = UpdateConnectionRequest$Outbound; +} + +export function updateConnectionRequestToJSON( + updateConnectionRequest: UpdateConnectionRequest, +): string { + return JSON.stringify( + UpdateConnectionRequest$outboundSchema.parse(updateConnectionRequest), + ); +} + +export function updateConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateconversationcomment.ts b/src/models/operations/updateconversationcomment.ts deleted file mode 100644 index 58b41c23..00000000 --- a/src/models/operations/updateconversationcomment.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateConversationCommentRequest = { - commentId: string; - conversationId: string; - patchV1ConversationsConversationIdCommentsCommentId: - components.PatchV1ConversationsConversationIdCommentsCommentId; -}; - -/** @internal */ -export const UpdateConversationCommentRequest$inboundSchema: z.ZodType< - UpdateConversationCommentRequest, - z.ZodTypeDef, - unknown -> = z.object({ - comment_id: z.string(), - conversation_id: z.string(), - patchV1ConversationsConversationIdCommentsCommentId: - components - .PatchV1ConversationsConversationIdCommentsCommentId$inboundSchema, -}).transform((v) => { - return remap$(v, { - "comment_id": "commentId", - "conversation_id": "conversationId", - }); -}); - -/** @internal */ -export type UpdateConversationCommentRequest$Outbound = { - comment_id: string; - conversation_id: string; - patchV1ConversationsConversationIdCommentsCommentId: - components.PatchV1ConversationsConversationIdCommentsCommentId$Outbound; -}; - -/** @internal */ -export const UpdateConversationCommentRequest$outboundSchema: z.ZodType< - UpdateConversationCommentRequest$Outbound, - z.ZodTypeDef, - UpdateConversationCommentRequest -> = z.object({ - commentId: z.string(), - conversationId: z.string(), - patchV1ConversationsConversationIdCommentsCommentId: - components - .PatchV1ConversationsConversationIdCommentsCommentId$outboundSchema, -}).transform((v) => { - return remap$(v, { - commentId: "comment_id", - conversationId: "conversation_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateConversationCommentRequest$ { - /** @deprecated use `UpdateConversationCommentRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateConversationCommentRequest$inboundSchema; - /** @deprecated use `UpdateConversationCommentRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateConversationCommentRequest$outboundSchema; - /** @deprecated use `UpdateConversationCommentRequest$Outbound` instead. */ - export type Outbound = UpdateConversationCommentRequest$Outbound; -} - -export function updateConversationCommentRequestToJSON( - updateConversationCommentRequest: UpdateConversationCommentRequest, -): string { - return JSON.stringify( - UpdateConversationCommentRequest$outboundSchema.parse( - updateConversationCommentRequest, - ), - ); -} - -export function updateConversationCommentRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateConversationCommentRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateConversationCommentRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatecustomfielddefinition.ts b/src/models/operations/updatecustomfielddefinition.ts index 00f6c24f..18b660a4 100644 --- a/src/models/operations/updatecustomfielddefinition.ts +++ b/src/models/operations/updatecustomfielddefinition.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateCustomFieldDefinitionRequest = { fieldId: string; - patchV1CustomFieldsDefinitionsFieldId: - components.PatchV1CustomFieldsDefinitionsFieldId; + updateCustomFieldDefinition: components.UpdateCustomFieldDefinition; }; /** @internal */ @@ -22,19 +21,21 @@ export const UpdateCustomFieldDefinitionRequest$inboundSchema: z.ZodType< unknown > = z.object({ field_id: z.string(), - patchV1CustomFieldsDefinitionsFieldId: - components.PatchV1CustomFieldsDefinitionsFieldId$inboundSchema, + update_custom_field_definition: z.lazy(() => + components.UpdateCustomFieldDefinition$inboundSchema + ), }).transform((v) => { return remap$(v, { "field_id": "fieldId", + "update_custom_field_definition": "updateCustomFieldDefinition", }); }); /** @internal */ export type UpdateCustomFieldDefinitionRequest$Outbound = { field_id: string; - patchV1CustomFieldsDefinitionsFieldId: - components.PatchV1CustomFieldsDefinitionsFieldId$Outbound; + update_custom_field_definition: + components.UpdateCustomFieldDefinition$Outbound; }; /** @internal */ @@ -44,11 +45,13 @@ export const UpdateCustomFieldDefinitionRequest$outboundSchema: z.ZodType< UpdateCustomFieldDefinitionRequest > = z.object({ fieldId: z.string(), - patchV1CustomFieldsDefinitionsFieldId: - components.PatchV1CustomFieldsDefinitionsFieldId$outboundSchema, + updateCustomFieldDefinition: z.lazy(() => + components.UpdateCustomFieldDefinition$outboundSchema + ), }).transform((v) => { return remap$(v, { fieldId: "field_id", + updateCustomFieldDefinition: "update_custom_field_definition", }); }); diff --git a/src/models/operations/updateenvironment.ts b/src/models/operations/updateenvironment.ts index e3e74595..292d31e5 100644 --- a/src/models/operations/updateenvironment.ts +++ b/src/models/operations/updateenvironment.ts @@ -14,7 +14,7 @@ export type UpdateEnvironmentRequest = { * Environment UUID */ environmentId: string; - patchV1EnvironmentsEnvironmentId: components.PatchV1EnvironmentsEnvironmentId; + updateEnvironment: components.UpdateEnvironment; }; /** @internal */ @@ -24,19 +24,18 @@ export const UpdateEnvironmentRequest$inboundSchema: z.ZodType< unknown > = z.object({ environment_id: z.string(), - patchV1EnvironmentsEnvironmentId: - components.PatchV1EnvironmentsEnvironmentId$inboundSchema, + update_environment: z.lazy(() => components.UpdateEnvironment$inboundSchema), }).transform((v) => { return remap$(v, { "environment_id": "environmentId", + "update_environment": "updateEnvironment", }); }); /** @internal */ export type UpdateEnvironmentRequest$Outbound = { environment_id: string; - patchV1EnvironmentsEnvironmentId: - components.PatchV1EnvironmentsEnvironmentId$Outbound; + update_environment: components.UpdateEnvironment$Outbound; }; /** @internal */ @@ -46,11 +45,11 @@ export const UpdateEnvironmentRequest$outboundSchema: z.ZodType< UpdateEnvironmentRequest > = z.object({ environmentId: z.string(), - patchV1EnvironmentsEnvironmentId: - components.PatchV1EnvironmentsEnvironmentId$outboundSchema, + updateEnvironment: z.lazy(() => components.UpdateEnvironment$outboundSchema), }).transform((v) => { return remap$(v, { environmentId: "environment_id", + updateEnvironment: "update_environment", }); }); diff --git a/src/models/operations/updatefieldmap.ts b/src/models/operations/updatefieldmap.ts new file mode 100644 index 00000000..6ab1bb63 --- /dev/null +++ b/src/models/operations/updatefieldmap.ts @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateFieldMapRequest = { + fieldMapId: string; +}; + +/** @internal */ +export const UpdateFieldMapRequest$inboundSchema: z.ZodType< + UpdateFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + field_map_id: z.string(), +}).transform((v) => { + return remap$(v, { + "field_map_id": "fieldMapId", + }); +}); + +/** @internal */ +export type UpdateFieldMapRequest$Outbound = { + field_map_id: string; +}; + +/** @internal */ +export const UpdateFieldMapRequest$outboundSchema: z.ZodType< + UpdateFieldMapRequest$Outbound, + z.ZodTypeDef, + UpdateFieldMapRequest +> = z.object({ + fieldMapId: z.string(), +}).transform((v) => { + return remap$(v, { + fieldMapId: "field_map_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateFieldMapRequest$ { + /** @deprecated use `UpdateFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateFieldMapRequest$inboundSchema; + /** @deprecated use `UpdateFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateFieldMapRequest$outboundSchema; + /** @deprecated use `UpdateFieldMapRequest$Outbound` instead. */ + export type Outbound = UpdateFieldMapRequest$Outbound; +} + +export function updateFieldMapRequestToJSON( + updateFieldMapRequest: UpdateFieldMapRequest, +): string { + return JSON.stringify( + UpdateFieldMapRequest$outboundSchema.parse(updateFieldMapRequest), + ); +} + +export function updateFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatefunctionality.ts b/src/models/operations/updatefunctionality.ts index 94be86e8..835a0683 100644 --- a/src/models/operations/updatefunctionality.ts +++ b/src/models/operations/updatefunctionality.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateFunctionalityRequest = { functionalityId: string; - patchV1FunctionalitiesFunctionalityId: - components.PatchV1FunctionalitiesFunctionalityId; + updateFunctionality: components.UpdateFunctionality; }; /** @internal */ @@ -22,19 +21,20 @@ export const UpdateFunctionalityRequest$inboundSchema: z.ZodType< unknown > = z.object({ functionality_id: z.string(), - patchV1FunctionalitiesFunctionalityId: - components.PatchV1FunctionalitiesFunctionalityId$inboundSchema, + update_functionality: z.lazy(() => + components.UpdateFunctionality$inboundSchema + ), }).transform((v) => { return remap$(v, { "functionality_id": "functionalityId", + "update_functionality": "updateFunctionality", }); }); /** @internal */ export type UpdateFunctionalityRequest$Outbound = { functionality_id: string; - patchV1FunctionalitiesFunctionalityId: - components.PatchV1FunctionalitiesFunctionalityId$Outbound; + update_functionality: components.UpdateFunctionality$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const UpdateFunctionalityRequest$outboundSchema: z.ZodType< UpdateFunctionalityRequest > = z.object({ functionalityId: z.string(), - patchV1FunctionalitiesFunctionalityId: - components.PatchV1FunctionalitiesFunctionalityId$outboundSchema, + updateFunctionality: z.lazy(() => + components.UpdateFunctionality$outboundSchema + ), }).transform((v) => { return remap$(v, { functionalityId: "functionality_id", + updateFunctionality: "update_functionality", }); }); diff --git a/src/models/operations/updateinboundfieldmap.ts b/src/models/operations/updateinboundfieldmap.ts new file mode 100644 index 00000000..c1797921 --- /dev/null +++ b/src/models/operations/updateinboundfieldmap.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateInboundFieldMapRequest = { + mapId: string; + ticketingProjectId: string; +}; + +/** @internal */ +export const UpdateInboundFieldMapRequest$inboundSchema: z.ZodType< + UpdateInboundFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + map_id: z.string(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "map_id": "mapId", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type UpdateInboundFieldMapRequest$Outbound = { + map_id: string; + ticketing_project_id: string; +}; + +/** @internal */ +export const UpdateInboundFieldMapRequest$outboundSchema: z.ZodType< + UpdateInboundFieldMapRequest$Outbound, + z.ZodTypeDef, + UpdateInboundFieldMapRequest +> = z.object({ + mapId: z.string(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + mapId: "map_id", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateInboundFieldMapRequest$ { + /** @deprecated use `UpdateInboundFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateInboundFieldMapRequest$inboundSchema; + /** @deprecated use `UpdateInboundFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateInboundFieldMapRequest$outboundSchema; + /** @deprecated use `UpdateInboundFieldMapRequest$Outbound` instead. */ + export type Outbound = UpdateInboundFieldMapRequest$Outbound; +} + +export function updateInboundFieldMapRequestToJSON( + updateInboundFieldMapRequest: UpdateInboundFieldMapRequest, +): string { + return JSON.stringify( + UpdateInboundFieldMapRequest$outboundSchema.parse( + updateInboundFieldMapRequest, + ), + ); +} + +export function updateInboundFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateInboundFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateInboundFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateincident.ts b/src/models/operations/updateincident.ts index 0d594431..7af5feab 100644 --- a/src/models/operations/updateincident.ts +++ b/src/models/operations/updateincident.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateIncidentRequest = { incidentId: string; - patchV1IncidentsIncidentId: components.PatchV1IncidentsIncidentId; + updateIncident: components.UpdateIncident; }; /** @internal */ @@ -21,18 +21,18 @@ export const UpdateIncidentRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_id: z.string(), - patchV1IncidentsIncidentId: - components.PatchV1IncidentsIncidentId$inboundSchema, + update_incident: z.lazy(() => components.UpdateIncident$inboundSchema), }).transform((v) => { return remap$(v, { "incident_id": "incidentId", + "update_incident": "updateIncident", }); }); /** @internal */ export type UpdateIncidentRequest$Outbound = { incident_id: string; - patchV1IncidentsIncidentId: components.PatchV1IncidentsIncidentId$Outbound; + update_incident: components.UpdateIncident$Outbound; }; /** @internal */ @@ -42,11 +42,11 @@ export const UpdateIncidentRequest$outboundSchema: z.ZodType< UpdateIncidentRequest > = z.object({ incidentId: z.string(), - patchV1IncidentsIncidentId: - components.PatchV1IncidentsIncidentId$outboundSchema, + updateIncident: z.lazy(() => components.UpdateIncident$outboundSchema), }).transform((v) => { return remap$(v, { incidentId: "incident_id", + updateIncident: "update_incident", }); }); diff --git a/src/models/operations/updateincidentalertprimary.ts b/src/models/operations/updateincidentalertprimary.ts new file mode 100644 index 00000000..565d4cee --- /dev/null +++ b/src/models/operations/updateincidentalertprimary.ts @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentAlertPrimaryRequest = { + incidentAlertId: string; + incidentId: string; + updateIncidentAlertPrimary: components.UpdateIncidentAlertPrimary; +}; + +/** @internal */ +export const UpdateIncidentAlertPrimaryRequest$inboundSchema: z.ZodType< + UpdateIncidentAlertPrimaryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_alert_id: z.string(), + incident_id: z.string(), + update_incident_alert_primary: z.lazy(() => + components.UpdateIncidentAlertPrimary$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_alert_id": "incidentAlertId", + "incident_id": "incidentId", + "update_incident_alert_primary": "updateIncidentAlertPrimary", + }); +}); + +/** @internal */ +export type UpdateIncidentAlertPrimaryRequest$Outbound = { + incident_alert_id: string; + incident_id: string; + update_incident_alert_primary: components.UpdateIncidentAlertPrimary$Outbound; +}; + +/** @internal */ +export const UpdateIncidentAlertPrimaryRequest$outboundSchema: z.ZodType< + UpdateIncidentAlertPrimaryRequest$Outbound, + z.ZodTypeDef, + UpdateIncidentAlertPrimaryRequest +> = z.object({ + incidentAlertId: z.string(), + incidentId: z.string(), + updateIncidentAlertPrimary: z.lazy(() => + components.UpdateIncidentAlertPrimary$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentAlertId: "incident_alert_id", + incidentId: "incident_id", + updateIncidentAlertPrimary: "update_incident_alert_primary", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentAlertPrimaryRequest$ { + /** @deprecated use `UpdateIncidentAlertPrimaryRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentAlertPrimaryRequest$inboundSchema; + /** @deprecated use `UpdateIncidentAlertPrimaryRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateIncidentAlertPrimaryRequest$outboundSchema; + /** @deprecated use `UpdateIncidentAlertPrimaryRequest$Outbound` instead. */ + export type Outbound = UpdateIncidentAlertPrimaryRequest$Outbound; +} + +export function updateIncidentAlertPrimaryRequestToJSON( + updateIncidentAlertPrimaryRequest: UpdateIncidentAlertPrimaryRequest, +): string { + return JSON.stringify( + UpdateIncidentAlertPrimaryRequest$outboundSchema.parse( + updateIncidentAlertPrimaryRequest, + ), + ); +} + +export function updateIncidentAlertPrimaryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentAlertPrimaryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentAlertPrimaryRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateincidentchangeevent.ts b/src/models/operations/updateincidentchangeevent.ts new file mode 100644 index 00000000..6919f1b9 --- /dev/null +++ b/src/models/operations/updateincidentchangeevent.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentChangeEventRequest = { + relatedChangeEventId: string; + incidentId: string; + updateIncidentChangeEvent: components.UpdateIncidentChangeEvent; +}; + +/** @internal */ +export const UpdateIncidentChangeEventRequest$inboundSchema: z.ZodType< + UpdateIncidentChangeEventRequest, + z.ZodTypeDef, + unknown +> = z.object({ + related_change_event_id: z.string(), + incident_id: z.string(), + update_incident_change_event: z.lazy(() => + components.UpdateIncidentChangeEvent$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "related_change_event_id": "relatedChangeEventId", + "incident_id": "incidentId", + "update_incident_change_event": "updateIncidentChangeEvent", + }); +}); + +/** @internal */ +export type UpdateIncidentChangeEventRequest$Outbound = { + related_change_event_id: string; + incident_id: string; + update_incident_change_event: components.UpdateIncidentChangeEvent$Outbound; +}; + +/** @internal */ +export const UpdateIncidentChangeEventRequest$outboundSchema: z.ZodType< + UpdateIncidentChangeEventRequest$Outbound, + z.ZodTypeDef, + UpdateIncidentChangeEventRequest +> = z.object({ + relatedChangeEventId: z.string(), + incidentId: z.string(), + updateIncidentChangeEvent: z.lazy(() => + components.UpdateIncidentChangeEvent$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + relatedChangeEventId: "related_change_event_id", + incidentId: "incident_id", + updateIncidentChangeEvent: "update_incident_change_event", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentChangeEventRequest$ { + /** @deprecated use `UpdateIncidentChangeEventRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentChangeEventRequest$inboundSchema; + /** @deprecated use `UpdateIncidentChangeEventRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentChangeEventRequest$outboundSchema; + /** @deprecated use `UpdateIncidentChangeEventRequest$Outbound` instead. */ + export type Outbound = UpdateIncidentChangeEventRequest$Outbound; +} + +export function updateIncidentChangeEventRequestToJSON( + updateIncidentChangeEventRequest: UpdateIncidentChangeEventRequest, +): string { + return JSON.stringify( + UpdateIncidentChangeEventRequest$outboundSchema.parse( + updateIncidentChangeEventRequest, + ), + ); +} + +export function updateIncidentChangeEventRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentChangeEventRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentChangeEventRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateincidentchatmessage.ts b/src/models/operations/updateincidentchatmessage.ts index 3c39658f..b69bee09 100644 --- a/src/models/operations/updateincidentchatmessage.ts +++ b/src/models/operations/updateincidentchatmessage.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateIncidentChatMessageRequest = { messageId: string; incidentId: string; - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: - components.PatchV1IncidentsIncidentIdGenericChatMessagesMessageId; + updateIncidentChatMessage: components.UpdateIncidentChatMessage; }; /** @internal */ @@ -24,13 +23,14 @@ export const UpdateIncidentChatMessageRequest$inboundSchema: z.ZodType< > = z.object({ message_id: z.string(), incident_id: z.string(), - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: - components - .PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$inboundSchema, + update_incident_chat_message: z.lazy(() => + components.UpdateIncidentChatMessage$inboundSchema + ), }).transform((v) => { return remap$(v, { "message_id": "messageId", "incident_id": "incidentId", + "update_incident_chat_message": "updateIncidentChatMessage", }); }); @@ -38,8 +38,7 @@ export const UpdateIncidentChatMessageRequest$inboundSchema: z.ZodType< export type UpdateIncidentChatMessageRequest$Outbound = { message_id: string; incident_id: string; - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: - components.PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$Outbound; + update_incident_chat_message: components.UpdateIncidentChatMessage$Outbound; }; /** @internal */ @@ -50,13 +49,14 @@ export const UpdateIncidentChatMessageRequest$outboundSchema: z.ZodType< > = z.object({ messageId: z.string(), incidentId: z.string(), - patchV1IncidentsIncidentIdGenericChatMessagesMessageId: - components - .PatchV1IncidentsIncidentIdGenericChatMessagesMessageId$outboundSchema, + updateIncidentChatMessage: z.lazy(() => + components.UpdateIncidentChatMessage$outboundSchema + ), }).transform((v) => { return remap$(v, { messageId: "message_id", incidentId: "incident_id", + updateIncidentChatMessage: "update_incident_chat_message", }); }); diff --git a/src/models/operations/updateincidenteventvotes.ts b/src/models/operations/updateincidenteventvotes.ts deleted file mode 100644 index e4b01f6e..00000000 --- a/src/models/operations/updateincidenteventvotes.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateIncidentEventVotesRequest = { - incidentId: string; - eventId: string; - patchV1IncidentsIncidentIdEventsEventIdVotes: - components.PatchV1IncidentsIncidentIdEventsEventIdVotes; -}; - -/** @internal */ -export const UpdateIncidentEventVotesRequest$inboundSchema: z.ZodType< - UpdateIncidentEventVotesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - event_id: z.string(), - patchV1IncidentsIncidentIdEventsEventIdVotes: - components.PatchV1IncidentsIncidentIdEventsEventIdVotes$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - "event_id": "eventId", - }); -}); - -/** @internal */ -export type UpdateIncidentEventVotesRequest$Outbound = { - incident_id: string; - event_id: string; - patchV1IncidentsIncidentIdEventsEventIdVotes: - components.PatchV1IncidentsIncidentIdEventsEventIdVotes$Outbound; -}; - -/** @internal */ -export const UpdateIncidentEventVotesRequest$outboundSchema: z.ZodType< - UpdateIncidentEventVotesRequest$Outbound, - z.ZodTypeDef, - UpdateIncidentEventVotesRequest -> = z.object({ - incidentId: z.string(), - eventId: z.string(), - patchV1IncidentsIncidentIdEventsEventIdVotes: - components.PatchV1IncidentsIncidentIdEventsEventIdVotes$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - eventId: "event_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIncidentEventVotesRequest$ { - /** @deprecated use `UpdateIncidentEventVotesRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateIncidentEventVotesRequest$inboundSchema; - /** @deprecated use `UpdateIncidentEventVotesRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateIncidentEventVotesRequest$outboundSchema; - /** @deprecated use `UpdateIncidentEventVotesRequest$Outbound` instead. */ - export type Outbound = UpdateIncidentEventVotesRequest$Outbound; -} - -export function updateIncidentEventVotesRequestToJSON( - updateIncidentEventVotesRequest: UpdateIncidentEventVotesRequest, -): string { - return JSON.stringify( - UpdateIncidentEventVotesRequest$outboundSchema.parse( - updateIncidentEventVotesRequest, - ), - ); -} - -export function updateIncidentEventVotesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateIncidentEventVotesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateIncidentEventVotesRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateincidentimpactpatch.ts b/src/models/operations/updateincidentimpactpatch.ts new file mode 100644 index 00000000..e807a232 --- /dev/null +++ b/src/models/operations/updateincidentimpactpatch.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentImpactPatchRequest = { + incidentId: string; + updateIncidentImpactPatch: components.UpdateIncidentImpactPatch; +}; + +/** @internal */ +export const UpdateIncidentImpactPatchRequest$inboundSchema: z.ZodType< + UpdateIncidentImpactPatchRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + update_incident_impact_patch: z.lazy(() => + components.UpdateIncidentImpactPatch$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "update_incident_impact_patch": "updateIncidentImpactPatch", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPatchRequest$Outbound = { + incident_id: string; + update_incident_impact_patch: components.UpdateIncidentImpactPatch$Outbound; +}; + +/** @internal */ +export const UpdateIncidentImpactPatchRequest$outboundSchema: z.ZodType< + UpdateIncidentImpactPatchRequest$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPatchRequest +> = z.object({ + incidentId: z.string(), + updateIncidentImpactPatch: z.lazy(() => + components.UpdateIncidentImpactPatch$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + updateIncidentImpactPatch: "update_incident_impact_patch", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPatchRequest$ { + /** @deprecated use `UpdateIncidentImpactPatchRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentImpactPatchRequest$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPatchRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentImpactPatchRequest$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPatchRequest$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPatchRequest$Outbound; +} + +export function updateIncidentImpactPatchRequestToJSON( + updateIncidentImpactPatchRequest: UpdateIncidentImpactPatchRequest, +): string { + return JSON.stringify( + UpdateIncidentImpactPatchRequest$outboundSchema.parse( + updateIncidentImpactPatchRequest, + ), + ); +} + +export function updateIncidentImpactPatchRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentImpactPatchRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPatchRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateincidentimpactput.ts b/src/models/operations/updateincidentimpactput.ts new file mode 100644 index 00000000..80222f15 --- /dev/null +++ b/src/models/operations/updateincidentimpactput.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentImpactPutRequest = { + incidentId: string; + updateIncidentImpactPut: components.UpdateIncidentImpactPut; +}; + +/** @internal */ +export const UpdateIncidentImpactPutRequest$inboundSchema: z.ZodType< + UpdateIncidentImpactPutRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + update_incident_impact_put: z.lazy(() => + components.UpdateIncidentImpactPut$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "update_incident_impact_put": "updateIncidentImpactPut", + }); +}); + +/** @internal */ +export type UpdateIncidentImpactPutRequest$Outbound = { + incident_id: string; + update_incident_impact_put: components.UpdateIncidentImpactPut$Outbound; +}; + +/** @internal */ +export const UpdateIncidentImpactPutRequest$outboundSchema: z.ZodType< + UpdateIncidentImpactPutRequest$Outbound, + z.ZodTypeDef, + UpdateIncidentImpactPutRequest +> = z.object({ + incidentId: z.string(), + updateIncidentImpactPut: z.lazy(() => + components.UpdateIncidentImpactPut$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + updateIncidentImpactPut: "update_incident_impact_put", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentImpactPutRequest$ { + /** @deprecated use `UpdateIncidentImpactPutRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentImpactPutRequest$inboundSchema; + /** @deprecated use `UpdateIncidentImpactPutRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateIncidentImpactPutRequest$outboundSchema; + /** @deprecated use `UpdateIncidentImpactPutRequest$Outbound` instead. */ + export type Outbound = UpdateIncidentImpactPutRequest$Outbound; +} + +export function updateIncidentImpactPutRequestToJSON( + updateIncidentImpactPutRequest: UpdateIncidentImpactPutRequest, +): string { + return JSON.stringify( + UpdateIncidentImpactPutRequest$outboundSchema.parse( + updateIncidentImpactPutRequest, + ), + ); +} + +export function updateIncidentImpactPutRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateIncidentImpactPutRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentImpactPutRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateincidentimpacts.ts b/src/models/operations/updateincidentimpacts.ts deleted file mode 100644 index cdaf5239..00000000 --- a/src/models/operations/updateincidentimpacts.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateIncidentImpactsRequest = { - incidentId: string; - putV1IncidentsIncidentIdImpact: components.PutV1IncidentsIncidentIdImpact; -}; - -/** @internal */ -export const UpdateIncidentImpactsRequest$inboundSchema: z.ZodType< - UpdateIncidentImpactsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - putV1IncidentsIncidentIdImpact: - components.PutV1IncidentsIncidentIdImpact$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type UpdateIncidentImpactsRequest$Outbound = { - incident_id: string; - putV1IncidentsIncidentIdImpact: - components.PutV1IncidentsIncidentIdImpact$Outbound; -}; - -/** @internal */ -export const UpdateIncidentImpactsRequest$outboundSchema: z.ZodType< - UpdateIncidentImpactsRequest$Outbound, - z.ZodTypeDef, - UpdateIncidentImpactsRequest -> = z.object({ - incidentId: z.string(), - putV1IncidentsIncidentIdImpact: - components.PutV1IncidentsIncidentIdImpact$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIncidentImpactsRequest$ { - /** @deprecated use `UpdateIncidentImpactsRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateIncidentImpactsRequest$inboundSchema; - /** @deprecated use `UpdateIncidentImpactsRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateIncidentImpactsRequest$outboundSchema; - /** @deprecated use `UpdateIncidentImpactsRequest$Outbound` instead. */ - export type Outbound = UpdateIncidentImpactsRequest$Outbound; -} - -export function updateIncidentImpactsRequestToJSON( - updateIncidentImpactsRequest: UpdateIncidentImpactsRequest, -): string { - return JSON.stringify( - UpdateIncidentImpactsRequest$outboundSchema.parse( - updateIncidentImpactsRequest, - ), - ); -} - -export function updateIncidentImpactsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateIncidentImpactsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateIncidentImpactsRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateincidentlink.ts b/src/models/operations/updateincidentlink.ts index 994fc9d9..9fc3b585 100644 --- a/src/models/operations/updateincidentlink.ts +++ b/src/models/operations/updateincidentlink.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateIncidentLinkRequest = { linkId: string; incidentId: string; - putV1IncidentsIncidentIdLinksLinkId: - components.PutV1IncidentsIncidentIdLinksLinkId; + updateIncidentLink: components.UpdateIncidentLink; }; /** @internal */ @@ -24,12 +23,14 @@ export const UpdateIncidentLinkRequest$inboundSchema: z.ZodType< > = z.object({ link_id: z.string(), incident_id: z.string(), - putV1IncidentsIncidentIdLinksLinkId: - components.PutV1IncidentsIncidentIdLinksLinkId$inboundSchema, + update_incident_link: z.lazy(() => + components.UpdateIncidentLink$inboundSchema + ), }).transform((v) => { return remap$(v, { "link_id": "linkId", "incident_id": "incidentId", + "update_incident_link": "updateIncidentLink", }); }); @@ -37,8 +38,7 @@ export const UpdateIncidentLinkRequest$inboundSchema: z.ZodType< export type UpdateIncidentLinkRequest$Outbound = { link_id: string; incident_id: string; - putV1IncidentsIncidentIdLinksLinkId: - components.PutV1IncidentsIncidentIdLinksLinkId$Outbound; + update_incident_link: components.UpdateIncidentLink$Outbound; }; /** @internal */ @@ -49,12 +49,14 @@ export const UpdateIncidentLinkRequest$outboundSchema: z.ZodType< > = z.object({ linkId: z.string(), incidentId: z.string(), - putV1IncidentsIncidentIdLinksLinkId: - components.PutV1IncidentsIncidentIdLinksLinkId$outboundSchema, + updateIncidentLink: z.lazy(() => + components.UpdateIncidentLink$outboundSchema + ), }).transform((v) => { return remap$(v, { linkId: "link_id", incidentId: "incident_id", + updateIncidentLink: "update_incident_link", }); }); diff --git a/src/models/operations/updateincidentmilestonesbulk.ts b/src/models/operations/updateincidentmilestonesbulk.ts deleted file mode 100644 index f4368a7d..00000000 --- a/src/models/operations/updateincidentmilestonesbulk.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateIncidentMilestonesBulkRequest = { - incidentId: string; - putV1IncidentsIncidentIdMilestonesBulkUpdate: - components.PutV1IncidentsIncidentIdMilestonesBulkUpdate; -}; - -/** @internal */ -export const UpdateIncidentMilestonesBulkRequest$inboundSchema: z.ZodType< - UpdateIncidentMilestonesBulkRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - putV1IncidentsIncidentIdMilestonesBulkUpdate: - components.PutV1IncidentsIncidentIdMilestonesBulkUpdate$inboundSchema, -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type UpdateIncidentMilestonesBulkRequest$Outbound = { - incident_id: string; - putV1IncidentsIncidentIdMilestonesBulkUpdate: - components.PutV1IncidentsIncidentIdMilestonesBulkUpdate$Outbound; -}; - -/** @internal */ -export const UpdateIncidentMilestonesBulkRequest$outboundSchema: z.ZodType< - UpdateIncidentMilestonesBulkRequest$Outbound, - z.ZodTypeDef, - UpdateIncidentMilestonesBulkRequest -> = z.object({ - incidentId: z.string(), - putV1IncidentsIncidentIdMilestonesBulkUpdate: - components.PutV1IncidentsIncidentIdMilestonesBulkUpdate$outboundSchema, -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIncidentMilestonesBulkRequest$ { - /** @deprecated use `UpdateIncidentMilestonesBulkRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateIncidentMilestonesBulkRequest$inboundSchema; - /** @deprecated use `UpdateIncidentMilestonesBulkRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateIncidentMilestonesBulkRequest$outboundSchema; - /** @deprecated use `UpdateIncidentMilestonesBulkRequest$Outbound` instead. */ - export type Outbound = UpdateIncidentMilestonesBulkRequest$Outbound; -} - -export function updateIncidentMilestonesBulkRequestToJSON( - updateIncidentMilestonesBulkRequest: UpdateIncidentMilestonesBulkRequest, -): string { - return JSON.stringify( - UpdateIncidentMilestonesBulkRequest$outboundSchema.parse( - updateIncidentMilestonesBulkRequest, - ), - ); -} - -export function updateIncidentMilestonesBulkRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateIncidentMilestonesBulkRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateIncidentMilestonesBulkRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateincidentnote.ts b/src/models/operations/updateincidentnote.ts index b56d3edd..fd25ff01 100644 --- a/src/models/operations/updateincidentnote.ts +++ b/src/models/operations/updateincidentnote.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateIncidentNoteRequest = { noteId: string; incidentId: string; - patchV1IncidentsIncidentIdNotesNoteId: - components.PatchV1IncidentsIncidentIdNotesNoteId; + updateIncidentNote: components.UpdateIncidentNote; }; /** @internal */ @@ -24,12 +23,14 @@ export const UpdateIncidentNoteRequest$inboundSchema: z.ZodType< > = z.object({ note_id: z.string(), incident_id: z.string(), - patchV1IncidentsIncidentIdNotesNoteId: - components.PatchV1IncidentsIncidentIdNotesNoteId$inboundSchema, + update_incident_note: z.lazy(() => + components.UpdateIncidentNote$inboundSchema + ), }).transform((v) => { return remap$(v, { "note_id": "noteId", "incident_id": "incidentId", + "update_incident_note": "updateIncidentNote", }); }); @@ -37,8 +38,7 @@ export const UpdateIncidentNoteRequest$inboundSchema: z.ZodType< export type UpdateIncidentNoteRequest$Outbound = { note_id: string; incident_id: string; - patchV1IncidentsIncidentIdNotesNoteId: - components.PatchV1IncidentsIncidentIdNotesNoteId$Outbound; + update_incident_note: components.UpdateIncidentNote$Outbound; }; /** @internal */ @@ -49,12 +49,14 @@ export const UpdateIncidentNoteRequest$outboundSchema: z.ZodType< > = z.object({ noteId: z.string(), incidentId: z.string(), - patchV1IncidentsIncidentIdNotesNoteId: - components.PatchV1IncidentsIncidentIdNotesNoteId$outboundSchema, + updateIncidentNote: z.lazy(() => + components.UpdateIncidentNote$outboundSchema + ), }).transform((v) => { return remap$(v, { noteId: "note_id", incidentId: "incident_id", + updateIncidentNote: "update_incident_note", }); }); diff --git a/src/models/operations/updateincidentrelatedchangeevent.ts b/src/models/operations/updateincidentrelatedchangeevent.ts deleted file mode 100644 index 6934fd6e..00000000 --- a/src/models/operations/updateincidentrelatedchangeevent.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateIncidentRelatedChangeEventRequest = { - relatedChangeEventId: string; - incidentId: string; - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: - components.PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId; -}; - -/** @internal */ -export const UpdateIncidentRelatedChangeEventRequest$inboundSchema: z.ZodType< - UpdateIncidentRelatedChangeEventRequest, - z.ZodTypeDef, - unknown -> = z.object({ - related_change_event_id: z.string(), - incident_id: z.string(), - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: - components - .PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$inboundSchema, -}).transform((v) => { - return remap$(v, { - "related_change_event_id": "relatedChangeEventId", - "incident_id": "incidentId", - }); -}); - -/** @internal */ -export type UpdateIncidentRelatedChangeEventRequest$Outbound = { - related_change_event_id: string; - incident_id: string; - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: - components.PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$Outbound; -}; - -/** @internal */ -export const UpdateIncidentRelatedChangeEventRequest$outboundSchema: z.ZodType< - UpdateIncidentRelatedChangeEventRequest$Outbound, - z.ZodTypeDef, - UpdateIncidentRelatedChangeEventRequest -> = z.object({ - relatedChangeEventId: z.string(), - incidentId: z.string(), - patchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId: - components - .PatchV1IncidentsIncidentIdRelatedChangeEventsRelatedChangeEventId$outboundSchema, -}).transform((v) => { - return remap$(v, { - relatedChangeEventId: "related_change_event_id", - incidentId: "incident_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIncidentRelatedChangeEventRequest$ { - /** @deprecated use `UpdateIncidentRelatedChangeEventRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateIncidentRelatedChangeEventRequest$inboundSchema; - /** @deprecated use `UpdateIncidentRelatedChangeEventRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateIncidentRelatedChangeEventRequest$outboundSchema; - /** @deprecated use `UpdateIncidentRelatedChangeEventRequest$Outbound` instead. */ - export type Outbound = UpdateIncidentRelatedChangeEventRequest$Outbound; -} - -export function updateIncidentRelatedChangeEventRequestToJSON( - updateIncidentRelatedChangeEventRequest: - UpdateIncidentRelatedChangeEventRequest, -): string { - return JSON.stringify( - UpdateIncidentRelatedChangeEventRequest$outboundSchema.parse( - updateIncidentRelatedChangeEventRequest, - ), - ); -} - -export function updateIncidentRelatedChangeEventRequestFromJSON( - jsonString: string, -): SafeParseResult< - UpdateIncidentRelatedChangeEventRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - UpdateIncidentRelatedChangeEventRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'UpdateIncidentRelatedChangeEventRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateincidentretrospective.ts b/src/models/operations/updateincidentretrospective.ts new file mode 100644 index 00000000..6db5c1bf --- /dev/null +++ b/src/models/operations/updateincidentretrospective.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentRetrospectiveRequest = { + retrospectiveId: string; + incidentId: string; + updateIncidentRetrospective: components.UpdateIncidentRetrospective; +}; + +/** @internal */ +export const UpdateIncidentRetrospectiveRequest$inboundSchema: z.ZodType< + UpdateIncidentRetrospectiveRequest, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_id: z.string(), + incident_id: z.string(), + update_incident_retrospective: z.lazy(() => + components.UpdateIncidentRetrospective$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "retrospective_id": "retrospectiveId", + "incident_id": "incidentId", + "update_incident_retrospective": "updateIncidentRetrospective", + }); +}); + +/** @internal */ +export type UpdateIncidentRetrospectiveRequest$Outbound = { + retrospective_id: string; + incident_id: string; + update_incident_retrospective: + components.UpdateIncidentRetrospective$Outbound; +}; + +/** @internal */ +export const UpdateIncidentRetrospectiveRequest$outboundSchema: z.ZodType< + UpdateIncidentRetrospectiveRequest$Outbound, + z.ZodTypeDef, + UpdateIncidentRetrospectiveRequest +> = z.object({ + retrospectiveId: z.string(), + incidentId: z.string(), + updateIncidentRetrospective: z.lazy(() => + components.UpdateIncidentRetrospective$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + retrospectiveId: "retrospective_id", + incidentId: "incident_id", + updateIncidentRetrospective: "update_incident_retrospective", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentRetrospectiveRequest$ { + /** @deprecated use `UpdateIncidentRetrospectiveRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateIncidentRetrospectiveRequest$inboundSchema; + /** @deprecated use `UpdateIncidentRetrospectiveRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateIncidentRetrospectiveRequest$outboundSchema; + /** @deprecated use `UpdateIncidentRetrospectiveRequest$Outbound` instead. */ + export type Outbound = UpdateIncidentRetrospectiveRequest$Outbound; +} + +export function updateIncidentRetrospectiveRequestToJSON( + updateIncidentRetrospectiveRequest: UpdateIncidentRetrospectiveRequest, +): string { + return JSON.stringify( + UpdateIncidentRetrospectiveRequest$outboundSchema.parse( + updateIncidentRetrospectiveRequest, + ), + ); +} + +export function updateIncidentRetrospectiveRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateIncidentRetrospectiveRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateIncidentRetrospectiveRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateincidentretrospectivefield.ts b/src/models/operations/updateincidentretrospectivefield.ts new file mode 100644 index 00000000..e3f71a39 --- /dev/null +++ b/src/models/operations/updateincidentretrospectivefield.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateIncidentRetrospectiveFieldRequest = { + retrospectiveId: string; + fieldId: string; + incidentId: string; + updateIncidentRetrospectiveField: components.UpdateIncidentRetrospectiveField; +}; + +/** @internal */ +export const UpdateIncidentRetrospectiveFieldRequest$inboundSchema: z.ZodType< + UpdateIncidentRetrospectiveFieldRequest, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_id: z.string(), + field_id: z.string(), + incident_id: z.string(), + update_incident_retrospective_field: z.lazy(() => + components.UpdateIncidentRetrospectiveField$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "retrospective_id": "retrospectiveId", + "field_id": "fieldId", + "incident_id": "incidentId", + "update_incident_retrospective_field": "updateIncidentRetrospectiveField", + }); +}); + +/** @internal */ +export type UpdateIncidentRetrospectiveFieldRequest$Outbound = { + retrospective_id: string; + field_id: string; + incident_id: string; + update_incident_retrospective_field: + components.UpdateIncidentRetrospectiveField$Outbound; +}; + +/** @internal */ +export const UpdateIncidentRetrospectiveFieldRequest$outboundSchema: z.ZodType< + UpdateIncidentRetrospectiveFieldRequest$Outbound, + z.ZodTypeDef, + UpdateIncidentRetrospectiveFieldRequest +> = z.object({ + retrospectiveId: z.string(), + fieldId: z.string(), + incidentId: z.string(), + updateIncidentRetrospectiveField: z.lazy(() => + components.UpdateIncidentRetrospectiveField$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + retrospectiveId: "retrospective_id", + fieldId: "field_id", + incidentId: "incident_id", + updateIncidentRetrospectiveField: "update_incident_retrospective_field", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateIncidentRetrospectiveFieldRequest$ { + /** @deprecated use `UpdateIncidentRetrospectiveFieldRequest$inboundSchema` instead. */ + export const inboundSchema = + UpdateIncidentRetrospectiveFieldRequest$inboundSchema; + /** @deprecated use `UpdateIncidentRetrospectiveFieldRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateIncidentRetrospectiveFieldRequest$outboundSchema; + /** @deprecated use `UpdateIncidentRetrospectiveFieldRequest$Outbound` instead. */ + export type Outbound = UpdateIncidentRetrospectiveFieldRequest$Outbound; +} + +export function updateIncidentRetrospectiveFieldRequestToJSON( + updateIncidentRetrospectiveFieldRequest: + UpdateIncidentRetrospectiveFieldRequest, +): string { + return JSON.stringify( + UpdateIncidentRetrospectiveFieldRequest$outboundSchema.parse( + updateIncidentRetrospectiveFieldRequest, + ), + ); +} + +export function updateIncidentRetrospectiveFieldRequestFromJSON( + jsonString: string, +): SafeParseResult< + UpdateIncidentRetrospectiveFieldRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateIncidentRetrospectiveFieldRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateIncidentRetrospectiveFieldRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateincidentrole.ts b/src/models/operations/updateincidentrole.ts index 1993db43..3979bc09 100644 --- a/src/models/operations/updateincidentrole.ts +++ b/src/models/operations/updateincidentrole.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateIncidentRoleRequest = { incidentRoleId: string; - patchV1IncidentRolesIncidentRoleId: - components.PatchV1IncidentRolesIncidentRoleId; + updateIncidentRole: components.UpdateIncidentRole; }; /** @internal */ @@ -22,19 +21,20 @@ export const UpdateIncidentRoleRequest$inboundSchema: z.ZodType< unknown > = z.object({ incident_role_id: z.string(), - patchV1IncidentRolesIncidentRoleId: - components.PatchV1IncidentRolesIncidentRoleId$inboundSchema, + update_incident_role: z.lazy(() => + components.UpdateIncidentRole$inboundSchema + ), }).transform((v) => { return remap$(v, { "incident_role_id": "incidentRoleId", + "update_incident_role": "updateIncidentRole", }); }); /** @internal */ export type UpdateIncidentRoleRequest$Outbound = { incident_role_id: string; - patchV1IncidentRolesIncidentRoleId: - components.PatchV1IncidentRolesIncidentRoleId$Outbound; + update_incident_role: components.UpdateIncidentRole$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const UpdateIncidentRoleRequest$outboundSchema: z.ZodType< UpdateIncidentRoleRequest > = z.object({ incidentRoleId: z.string(), - patchV1IncidentRolesIncidentRoleId: - components.PatchV1IncidentRolesIncidentRoleId$outboundSchema, + updateIncidentRole: z.lazy(() => + components.UpdateIncidentRole$outboundSchema + ), }).transform((v) => { return remap$(v, { incidentRoleId: "incident_role_id", + updateIncidentRole: "update_incident_role", }); }); diff --git a/src/models/operations/updateincidenttask.ts b/src/models/operations/updateincidenttask.ts index f100fb94..156c8a51 100644 --- a/src/models/operations/updateincidenttask.ts +++ b/src/models/operations/updateincidenttask.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateIncidentTaskRequest = { taskId: string; incidentId: string; - patchV1IncidentsIncidentIdTasksTaskId: - components.PatchV1IncidentsIncidentIdTasksTaskId; + updateIncidentTask: components.UpdateIncidentTask; }; /** @internal */ @@ -24,12 +23,14 @@ export const UpdateIncidentTaskRequest$inboundSchema: z.ZodType< > = z.object({ task_id: z.string(), incident_id: z.string(), - patchV1IncidentsIncidentIdTasksTaskId: - components.PatchV1IncidentsIncidentIdTasksTaskId$inboundSchema, + update_incident_task: z.lazy(() => + components.UpdateIncidentTask$inboundSchema + ), }).transform((v) => { return remap$(v, { "task_id": "taskId", "incident_id": "incidentId", + "update_incident_task": "updateIncidentTask", }); }); @@ -37,8 +38,7 @@ export const UpdateIncidentTaskRequest$inboundSchema: z.ZodType< export type UpdateIncidentTaskRequest$Outbound = { task_id: string; incident_id: string; - patchV1IncidentsIncidentIdTasksTaskId: - components.PatchV1IncidentsIncidentIdTasksTaskId$Outbound; + update_incident_task: components.UpdateIncidentTask$Outbound; }; /** @internal */ @@ -49,12 +49,14 @@ export const UpdateIncidentTaskRequest$outboundSchema: z.ZodType< > = z.object({ taskId: z.string(), incidentId: z.string(), - patchV1IncidentsIncidentIdTasksTaskId: - components.PatchV1IncidentsIncidentIdTasksTaskId$outboundSchema, + updateIncidentTask: z.lazy(() => + components.UpdateIncidentTask$outboundSchema + ), }).transform((v) => { return remap$(v, { taskId: "task_id", incidentId: "incident_id", + updateIncidentTask: "update_incident_task", }); }); diff --git a/src/models/operations/updateincidenttype.ts b/src/models/operations/updateincidenttype.ts index 85b03668..8e3f6ee7 100644 --- a/src/models/operations/updateincidenttype.ts +++ b/src/models/operations/updateincidenttype.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -10,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateIncidentTypeRequest = { id: string; - patchV1IncidentTypesId: components.PatchV1IncidentTypesId; + updateIncidentType: components.UpdateIncidentType; }; /** @internal */ @@ -20,13 +21,19 @@ export const UpdateIncidentTypeRequest$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - patchV1IncidentTypesId: components.PatchV1IncidentTypesId$inboundSchema, + update_incident_type: z.lazy(() => + components.UpdateIncidentType$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "update_incident_type": "updateIncidentType", + }); }); /** @internal */ export type UpdateIncidentTypeRequest$Outbound = { id: string; - patchV1IncidentTypesId: components.PatchV1IncidentTypesId$Outbound; + update_incident_type: components.UpdateIncidentType$Outbound; }; /** @internal */ @@ -36,7 +43,13 @@ export const UpdateIncidentTypeRequest$outboundSchema: z.ZodType< UpdateIncidentTypeRequest > = z.object({ id: z.string(), - patchV1IncidentTypesId: components.PatchV1IncidentTypesId$outboundSchema, + updateIncidentType: z.lazy(() => + components.UpdateIncidentType$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + updateIncidentType: "update_incident_type", + }); }); /** diff --git a/src/models/operations/updateintegrationconnection.ts b/src/models/operations/updateintegrationconnection.ts deleted file mode 100644 index b7ea3ddc..00000000 --- a/src/models/operations/updateintegrationconnection.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateIntegrationConnectionRequest = { - slug: string; - connectionId: string; -}; - -/** @internal */ -export const UpdateIntegrationConnectionRequest$inboundSchema: z.ZodType< - UpdateIntegrationConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - slug: z.string(), - connection_id: z.string(), -}).transform((v) => { - return remap$(v, { - "connection_id": "connectionId", - }); -}); - -/** @internal */ -export type UpdateIntegrationConnectionRequest$Outbound = { - slug: string; - connection_id: string; -}; - -/** @internal */ -export const UpdateIntegrationConnectionRequest$outboundSchema: z.ZodType< - UpdateIntegrationConnectionRequest$Outbound, - z.ZodTypeDef, - UpdateIntegrationConnectionRequest -> = z.object({ - slug: z.string(), - connectionId: z.string(), -}).transform((v) => { - return remap$(v, { - connectionId: "connection_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIntegrationConnectionRequest$ { - /** @deprecated use `UpdateIntegrationConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateIntegrationConnectionRequest$inboundSchema; - /** @deprecated use `UpdateIntegrationConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateIntegrationConnectionRequest$outboundSchema; - /** @deprecated use `UpdateIntegrationConnectionRequest$Outbound` instead. */ - export type Outbound = UpdateIntegrationConnectionRequest$Outbound; -} - -export function updateIntegrationConnectionRequestToJSON( - updateIntegrationConnectionRequest: UpdateIntegrationConnectionRequest, -): string { - return JSON.stringify( - UpdateIntegrationConnectionRequest$outboundSchema.parse( - updateIntegrationConnectionRequest, - ), - ); -} - -export function updateIntegrationConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateIntegrationConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateIntegrationConnectionRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateintegrationfieldmap.ts b/src/models/operations/updateintegrationfieldmap.ts deleted file mode 100644 index eb669d44..00000000 --- a/src/models/operations/updateintegrationfieldmap.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateIntegrationFieldMapRequest = { - fieldMapId: string; -}; - -/** @internal */ -export const UpdateIntegrationFieldMapRequest$inboundSchema: z.ZodType< - UpdateIntegrationFieldMapRequest, - z.ZodTypeDef, - unknown -> = z.object({ - field_map_id: z.string(), -}).transform((v) => { - return remap$(v, { - "field_map_id": "fieldMapId", - }); -}); - -/** @internal */ -export type UpdateIntegrationFieldMapRequest$Outbound = { - field_map_id: string; -}; - -/** @internal */ -export const UpdateIntegrationFieldMapRequest$outboundSchema: z.ZodType< - UpdateIntegrationFieldMapRequest$Outbound, - z.ZodTypeDef, - UpdateIntegrationFieldMapRequest -> = z.object({ - fieldMapId: z.string(), -}).transform((v) => { - return remap$(v, { - fieldMapId: "field_map_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateIntegrationFieldMapRequest$ { - /** @deprecated use `UpdateIntegrationFieldMapRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateIntegrationFieldMapRequest$inboundSchema; - /** @deprecated use `UpdateIntegrationFieldMapRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateIntegrationFieldMapRequest$outboundSchema; - /** @deprecated use `UpdateIntegrationFieldMapRequest$Outbound` instead. */ - export type Outbound = UpdateIntegrationFieldMapRequest$Outbound; -} - -export function updateIntegrationFieldMapRequestToJSON( - updateIntegrationFieldMapRequest: UpdateIntegrationFieldMapRequest, -): string { - return JSON.stringify( - UpdateIntegrationFieldMapRequest$outboundSchema.parse( - updateIntegrationFieldMapRequest, - ), - ); -} - -export function updateIntegrationFieldMapRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateIntegrationFieldMapRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateIntegrationFieldMapRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatelifecyclemeasurementdefinition.ts b/src/models/operations/updatelifecyclemeasurementdefinition.ts new file mode 100644 index 00000000..bbada745 --- /dev/null +++ b/src/models/operations/updatelifecyclemeasurementdefinition.ts @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateLifecycleMeasurementDefinitionRequestBody = { + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + startsAtMilestoneId?: string | null | undefined; + endsAtMilestoneId?: string | null | undefined; +}; + +export type UpdateLifecycleMeasurementDefinitionRequest = { + measurementDefinitionId: string; + requestBody?: UpdateLifecycleMeasurementDefinitionRequestBody | undefined; +}; + +/** @internal */ +export const UpdateLifecycleMeasurementDefinitionRequestBody$inboundSchema: + z.ZodType< + UpdateLifecycleMeasurementDefinitionRequestBody, + z.ZodTypeDef, + unknown + > = z.object({ + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + starts_at_milestone_id: z.nullable(z.string()).optional(), + ends_at_milestone_id: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + "starts_at_milestone_id": "startsAtMilestoneId", + "ends_at_milestone_id": "endsAtMilestoneId", + }); + }); + +/** @internal */ +export type UpdateLifecycleMeasurementDefinitionRequestBody$Outbound = { + name?: string | null | undefined; + slug?: string | null | undefined; + description?: string | null | undefined; + starts_at_milestone_id?: string | null | undefined; + ends_at_milestone_id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateLifecycleMeasurementDefinitionRequestBody$outboundSchema: + z.ZodType< + UpdateLifecycleMeasurementDefinitionRequestBody$Outbound, + z.ZodTypeDef, + UpdateLifecycleMeasurementDefinitionRequestBody + > = z.object({ + name: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + startsAtMilestoneId: z.nullable(z.string()).optional(), + endsAtMilestoneId: z.nullable(z.string()).optional(), + }).transform((v) => { + return remap$(v, { + startsAtMilestoneId: "starts_at_milestone_id", + endsAtMilestoneId: "ends_at_milestone_id", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateLifecycleMeasurementDefinitionRequestBody$ { + /** @deprecated use `UpdateLifecycleMeasurementDefinitionRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateLifecycleMeasurementDefinitionRequestBody$inboundSchema; + /** @deprecated use `UpdateLifecycleMeasurementDefinitionRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateLifecycleMeasurementDefinitionRequestBody$outboundSchema; + /** @deprecated use `UpdateLifecycleMeasurementDefinitionRequestBody$Outbound` instead. */ + export type Outbound = + UpdateLifecycleMeasurementDefinitionRequestBody$Outbound; +} + +export function updateLifecycleMeasurementDefinitionRequestBodyToJSON( + updateLifecycleMeasurementDefinitionRequestBody: + UpdateLifecycleMeasurementDefinitionRequestBody, +): string { + return JSON.stringify( + UpdateLifecycleMeasurementDefinitionRequestBody$outboundSchema.parse( + updateLifecycleMeasurementDefinitionRequestBody, + ), + ); +} + +export function updateLifecycleMeasurementDefinitionRequestBodyFromJSON( + jsonString: string, +): SafeParseResult< + UpdateLifecycleMeasurementDefinitionRequestBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateLifecycleMeasurementDefinitionRequestBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateLifecycleMeasurementDefinitionRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateLifecycleMeasurementDefinitionRequest$inboundSchema: + z.ZodType< + UpdateLifecycleMeasurementDefinitionRequest, + z.ZodTypeDef, + unknown + > = z.object({ + measurement_definition_id: z.string(), + RequestBody: z.lazy(() => + UpdateLifecycleMeasurementDefinitionRequestBody$inboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + "measurement_definition_id": "measurementDefinitionId", + "RequestBody": "requestBody", + }); + }); + +/** @internal */ +export type UpdateLifecycleMeasurementDefinitionRequest$Outbound = { + measurement_definition_id: string; + RequestBody?: + | UpdateLifecycleMeasurementDefinitionRequestBody$Outbound + | undefined; +}; + +/** @internal */ +export const UpdateLifecycleMeasurementDefinitionRequest$outboundSchema: + z.ZodType< + UpdateLifecycleMeasurementDefinitionRequest$Outbound, + z.ZodTypeDef, + UpdateLifecycleMeasurementDefinitionRequest + > = z.object({ + measurementDefinitionId: z.string(), + requestBody: z.lazy(() => + UpdateLifecycleMeasurementDefinitionRequestBody$outboundSchema + ).optional(), + }).transform((v) => { + return remap$(v, { + measurementDefinitionId: "measurement_definition_id", + requestBody: "RequestBody", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateLifecycleMeasurementDefinitionRequest$ { + /** @deprecated use `UpdateLifecycleMeasurementDefinitionRequest$inboundSchema` instead. */ + export const inboundSchema = + UpdateLifecycleMeasurementDefinitionRequest$inboundSchema; + /** @deprecated use `UpdateLifecycleMeasurementDefinitionRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateLifecycleMeasurementDefinitionRequest$outboundSchema; + /** @deprecated use `UpdateLifecycleMeasurementDefinitionRequest$Outbound` instead. */ + export type Outbound = UpdateLifecycleMeasurementDefinitionRequest$Outbound; +} + +export function updateLifecycleMeasurementDefinitionRequestToJSON( + updateLifecycleMeasurementDefinitionRequest: + UpdateLifecycleMeasurementDefinitionRequest, +): string { + return JSON.stringify( + UpdateLifecycleMeasurementDefinitionRequest$outboundSchema.parse( + updateLifecycleMeasurementDefinitionRequest, + ), + ); +} + +export function updateLifecycleMeasurementDefinitionRequestFromJSON( + jsonString: string, +): SafeParseResult< + UpdateLifecycleMeasurementDefinitionRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateLifecycleMeasurementDefinitionRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateLifecycleMeasurementDefinitionRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatelifecyclemilestone.ts b/src/models/operations/updatelifecyclemilestone.ts index 2702a0f1..45896e41 100644 --- a/src/models/operations/updatelifecyclemilestone.ts +++ b/src/models/operations/updatelifecyclemilestone.ts @@ -5,30 +5,53 @@ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +/** + * The setting for auto-assigning the milestone's timestamp during incident declaration + */ +export const UpdateLifecycleMilestoneAutoAssignTimestampOnCreate = { + AlwaysSetOnCreate: "always_set_on_create", + OnlySetOnManualCreate: "only_set_on_manual_create", + NeverSetOnCreate: "never_set_on_create", +} as const; +/** + * The setting for auto-assigning the milestone's timestamp during incident declaration + */ +export type UpdateLifecycleMilestoneAutoAssignTimestampOnCreate = ClosedEnum< + typeof UpdateLifecycleMilestoneAutoAssignTimestampOnCreate +>; + export type UpdateLifecycleMilestoneRequestBody = { /** * The name of the milestone */ - name?: string | undefined; + name?: string | null | undefined; /** * A long-form description of the milestone's purpose */ - description?: string | undefined; + description?: string | null | undefined; /** * A unique identifier for the milestone. If not provided, one will be generated from the name. */ - slug?: string | undefined; + slug?: string | null | undefined; /** * The position of the milestone within the phase. If not provided, the milestone will be added as the last milestone in the phase. */ - position?: number | undefined; + position?: number | null | undefined; /** * The ID of a later milestone that cannot be started until this milestone has a timestamp populated */ - requiredAtMilestoneId?: string | undefined; + requiredAtMilestoneId?: string | null | undefined; + /** + * The setting for auto-assigning the milestone's timestamp during incident declaration + */ + autoAssignTimestampOnCreate?: + | UpdateLifecycleMilestoneAutoAssignTimestampOnCreate + | null + | undefined; }; export type UpdateLifecycleMilestoneRequest = { @@ -36,30 +59,58 @@ export type UpdateLifecycleMilestoneRequest = { requestBody?: UpdateLifecycleMilestoneRequestBody | undefined; }; +/** @internal */ +export const UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema: + z.ZodNativeEnum = + z.nativeEnum(UpdateLifecycleMilestoneAutoAssignTimestampOnCreate); + +/** @internal */ +export const UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema: + z.ZodNativeEnum = + UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$ { + /** @deprecated use `UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema` instead. */ + export const inboundSchema = + UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema; + /** @deprecated use `UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema` instead. */ + export const outboundSchema = + UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema; +} + /** @internal */ export const UpdateLifecycleMilestoneRequestBody$inboundSchema: z.ZodType< UpdateLifecycleMilestoneRequestBody, z.ZodTypeDef, unknown > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - position: z.number().int().optional(), - required_at_milestone_id: z.string().optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + required_at_milestone_id: z.nullable(z.string()).optional(), + auto_assign_timestamp_on_create: z.nullable( + UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$inboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { "required_at_milestone_id": "requiredAtMilestoneId", + "auto_assign_timestamp_on_create": "autoAssignTimestampOnCreate", }); }); /** @internal */ export type UpdateLifecycleMilestoneRequestBody$Outbound = { - name?: string | undefined; - description?: string | undefined; - slug?: string | undefined; - position?: number | undefined; - required_at_milestone_id?: string | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + slug?: string | null | undefined; + position?: number | null | undefined; + required_at_milestone_id?: string | null | undefined; + auto_assign_timestamp_on_create?: string | null | undefined; }; /** @internal */ @@ -68,14 +119,18 @@ export const UpdateLifecycleMilestoneRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateLifecycleMilestoneRequestBody > = z.object({ - name: z.string().optional(), - description: z.string().optional(), - slug: z.string().optional(), - position: z.number().int().optional(), - requiredAtMilestoneId: z.string().optional(), + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + slug: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), + requiredAtMilestoneId: z.nullable(z.string()).optional(), + autoAssignTimestampOnCreate: z.nullable( + UpdateLifecycleMilestoneAutoAssignTimestampOnCreate$outboundSchema, + ).optional(), }).transform((v) => { return remap$(v, { requiredAtMilestoneId: "required_at_milestone_id", + autoAssignTimestampOnCreate: "auto_assign_timestamp_on_create", }); }); diff --git a/src/models/operations/updatemeasurementdefinition.ts b/src/models/operations/updatemeasurementdefinition.ts deleted file mode 100644 index 6f3754ca..00000000 --- a/src/models/operations/updatemeasurementdefinition.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateMeasurementDefinitionRequestBody = { - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - startsAtMilestoneId?: string | undefined; - endsAtMilestoneId?: string | undefined; -}; - -export type UpdateMeasurementDefinitionRequest = { - measurementDefinitionId: string; - requestBody?: UpdateMeasurementDefinitionRequestBody | undefined; -}; - -/** @internal */ -export const UpdateMeasurementDefinitionRequestBody$inboundSchema: z.ZodType< - UpdateMeasurementDefinitionRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - starts_at_milestone_id: z.string().optional(), - ends_at_milestone_id: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "starts_at_milestone_id": "startsAtMilestoneId", - "ends_at_milestone_id": "endsAtMilestoneId", - }); -}); - -/** @internal */ -export type UpdateMeasurementDefinitionRequestBody$Outbound = { - name?: string | undefined; - slug?: string | undefined; - description?: string | undefined; - starts_at_milestone_id?: string | undefined; - ends_at_milestone_id?: string | undefined; -}; - -/** @internal */ -export const UpdateMeasurementDefinitionRequestBody$outboundSchema: z.ZodType< - UpdateMeasurementDefinitionRequestBody$Outbound, - z.ZodTypeDef, - UpdateMeasurementDefinitionRequestBody -> = z.object({ - name: z.string().optional(), - slug: z.string().optional(), - description: z.string().optional(), - startsAtMilestoneId: z.string().optional(), - endsAtMilestoneId: z.string().optional(), -}).transform((v) => { - return remap$(v, { - startsAtMilestoneId: "starts_at_milestone_id", - endsAtMilestoneId: "ends_at_milestone_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateMeasurementDefinitionRequestBody$ { - /** @deprecated use `UpdateMeasurementDefinitionRequestBody$inboundSchema` instead. */ - export const inboundSchema = - UpdateMeasurementDefinitionRequestBody$inboundSchema; - /** @deprecated use `UpdateMeasurementDefinitionRequestBody$outboundSchema` instead. */ - export const outboundSchema = - UpdateMeasurementDefinitionRequestBody$outboundSchema; - /** @deprecated use `UpdateMeasurementDefinitionRequestBody$Outbound` instead. */ - export type Outbound = UpdateMeasurementDefinitionRequestBody$Outbound; -} - -export function updateMeasurementDefinitionRequestBodyToJSON( - updateMeasurementDefinitionRequestBody: - UpdateMeasurementDefinitionRequestBody, -): string { - return JSON.stringify( - UpdateMeasurementDefinitionRequestBody$outboundSchema.parse( - updateMeasurementDefinitionRequestBody, - ), - ); -} - -export function updateMeasurementDefinitionRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateMeasurementDefinitionRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateMeasurementDefinitionRequestBody' from JSON`, - ); -} - -/** @internal */ -export const UpdateMeasurementDefinitionRequest$inboundSchema: z.ZodType< - UpdateMeasurementDefinitionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - measurement_definition_id: z.string(), - RequestBody: z.lazy(() => - UpdateMeasurementDefinitionRequestBody$inboundSchema - ).optional(), -}).transform((v) => { - return remap$(v, { - "measurement_definition_id": "measurementDefinitionId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type UpdateMeasurementDefinitionRequest$Outbound = { - measurement_definition_id: string; - RequestBody?: UpdateMeasurementDefinitionRequestBody$Outbound | undefined; -}; - -/** @internal */ -export const UpdateMeasurementDefinitionRequest$outboundSchema: z.ZodType< - UpdateMeasurementDefinitionRequest$Outbound, - z.ZodTypeDef, - UpdateMeasurementDefinitionRequest -> = z.object({ - measurementDefinitionId: z.string(), - requestBody: z.lazy(() => - UpdateMeasurementDefinitionRequestBody$outboundSchema - ).optional(), -}).transform((v) => { - return remap$(v, { - measurementDefinitionId: "measurement_definition_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateMeasurementDefinitionRequest$ { - /** @deprecated use `UpdateMeasurementDefinitionRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateMeasurementDefinitionRequest$inboundSchema; - /** @deprecated use `UpdateMeasurementDefinitionRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateMeasurementDefinitionRequest$outboundSchema; - /** @deprecated use `UpdateMeasurementDefinitionRequest$Outbound` instead. */ - export type Outbound = UpdateMeasurementDefinitionRequest$Outbound; -} - -export function updateMeasurementDefinitionRequestToJSON( - updateMeasurementDefinitionRequest: UpdateMeasurementDefinitionRequest, -): string { - return JSON.stringify( - UpdateMeasurementDefinitionRequest$outboundSchema.parse( - updateMeasurementDefinitionRequest, - ), - ); -} - -export function updateMeasurementDefinitionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateMeasurementDefinitionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateMeasurementDefinitionRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatenunccomponentgroup.ts b/src/models/operations/updatenunccomponentgroup.ts new file mode 100644 index 00000000..d81d1fad --- /dev/null +++ b/src/models/operations/updatenunccomponentgroup.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateNuncComponentGroupRequestBody = { + name?: string | null | undefined; + componentGroupId?: string | null | undefined; + position?: number | null | undefined; +}; + +export type UpdateNuncComponentGroupRequest = { + nuncConnectionId: string; + groupId: string; + requestBody?: UpdateNuncComponentGroupRequestBody | undefined; +}; + +/** @internal */ +export const UpdateNuncComponentGroupRequestBody$inboundSchema: z.ZodType< + UpdateNuncComponentGroupRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + component_group_id: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "component_group_id": "componentGroupId", + }); +}); + +/** @internal */ +export type UpdateNuncComponentGroupRequestBody$Outbound = { + name?: string | null | undefined; + component_group_id?: string | null | undefined; + position?: number | null | undefined; +}; + +/** @internal */ +export const UpdateNuncComponentGroupRequestBody$outboundSchema: z.ZodType< + UpdateNuncComponentGroupRequestBody$Outbound, + z.ZodTypeDef, + UpdateNuncComponentGroupRequestBody +> = z.object({ + name: z.nullable(z.string()).optional(), + componentGroupId: z.nullable(z.string()).optional(), + position: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + componentGroupId: "component_group_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncComponentGroupRequestBody$ { + /** @deprecated use `UpdateNuncComponentGroupRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateNuncComponentGroupRequestBody$inboundSchema; + /** @deprecated use `UpdateNuncComponentGroupRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateNuncComponentGroupRequestBody$outboundSchema; + /** @deprecated use `UpdateNuncComponentGroupRequestBody$Outbound` instead. */ + export type Outbound = UpdateNuncComponentGroupRequestBody$Outbound; +} + +export function updateNuncComponentGroupRequestBodyToJSON( + updateNuncComponentGroupRequestBody: UpdateNuncComponentGroupRequestBody, +): string { + return JSON.stringify( + UpdateNuncComponentGroupRequestBody$outboundSchema.parse( + updateNuncComponentGroupRequestBody, + ), + ); +} + +export function updateNuncComponentGroupRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateNuncComponentGroupRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncComponentGroupRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateNuncComponentGroupRequest$inboundSchema: z.ZodType< + UpdateNuncComponentGroupRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + group_id: z.string(), + RequestBody: z.lazy(() => UpdateNuncComponentGroupRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "group_id": "groupId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateNuncComponentGroupRequest$Outbound = { + nunc_connection_id: string; + group_id: string; + RequestBody?: UpdateNuncComponentGroupRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const UpdateNuncComponentGroupRequest$outboundSchema: z.ZodType< + UpdateNuncComponentGroupRequest$Outbound, + z.ZodTypeDef, + UpdateNuncComponentGroupRequest +> = z.object({ + nuncConnectionId: z.string(), + groupId: z.string(), + requestBody: z.lazy(() => UpdateNuncComponentGroupRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + groupId: "group_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncComponentGroupRequest$ { + /** @deprecated use `UpdateNuncComponentGroupRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncComponentGroupRequest$inboundSchema; + /** @deprecated use `UpdateNuncComponentGroupRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncComponentGroupRequest$outboundSchema; + /** @deprecated use `UpdateNuncComponentGroupRequest$Outbound` instead. */ + export type Outbound = UpdateNuncComponentGroupRequest$Outbound; +} + +export function updateNuncComponentGroupRequestToJSON( + updateNuncComponentGroupRequest: UpdateNuncComponentGroupRequest, +): string { + return JSON.stringify( + UpdateNuncComponentGroupRequest$outboundSchema.parse( + updateNuncComponentGroupRequest, + ), + ); +} + +export function updateNuncComponentGroupRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncComponentGroupRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncComponentGroupRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatenuncconnection.ts b/src/models/operations/updatenuncconnection.ts new file mode 100644 index 00000000..c69dfad6 --- /dev/null +++ b/src/models/operations/updatenuncconnection.ts @@ -0,0 +1,245 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateNuncConnectionRequestBody = { + companyName?: string | null | undefined; + companyWebsite?: string | null | undefined; + companyTosUrl?: string | null | undefined; + greetingTitle?: string | null | undefined; + greetingBody?: string | null | undefined; + operationalMessage?: string | null | undefined; + title?: string | null | undefined; + /** + * Status page condition to map your severity matrix condition to + */ + conditionsNuncCondition: Array; + /** + * Severity matrix condition id + */ + conditionsConditionId: Array; + componentsInfrastructureType: Array; + componentsInfrastructureId: Array; + primaryColor?: string | null | undefined; + secondaryColor?: string | null | undefined; + exposedFields?: Array | null | undefined; + enableHistogram?: boolean | null | undefined; + uiVersion?: number | null | undefined; +}; + +export type UpdateNuncConnectionRequest = { + nuncConnectionId: string; + requestBody: UpdateNuncConnectionRequestBody; +}; + +/** @internal */ +export const UpdateNuncConnectionRequestBody$inboundSchema: z.ZodType< + UpdateNuncConnectionRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + company_name: z.nullable(z.string()).optional(), + company_website: z.nullable(z.string()).optional(), + company_tos_url: z.nullable(z.string()).optional(), + greeting_title: z.nullable(z.string()).optional(), + greeting_body: z.nullable(z.string()).optional(), + operational_message: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + "conditions[nunc_condition]": z.array(z.string()), + "conditions[condition_id]": z.array(z.string()), + "components[infrastructure_type]": z.array(z.string()), + "components[infrastructure_id]": z.array(z.string()), + primary_color: z.nullable(z.string()).optional(), + secondary_color: z.nullable(z.string()).optional(), + exposed_fields: z.nullable(z.array(z.string())).optional(), + enable_histogram: z.nullable(z.boolean()).optional(), + ui_version: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + "company_name": "companyName", + "company_website": "companyWebsite", + "company_tos_url": "companyTosUrl", + "greeting_title": "greetingTitle", + "greeting_body": "greetingBody", + "operational_message": "operationalMessage", + "conditions[nunc_condition]": "conditionsNuncCondition", + "conditions[condition_id]": "conditionsConditionId", + "components[infrastructure_type]": "componentsInfrastructureType", + "components[infrastructure_id]": "componentsInfrastructureId", + "primary_color": "primaryColor", + "secondary_color": "secondaryColor", + "exposed_fields": "exposedFields", + "enable_histogram": "enableHistogram", + "ui_version": "uiVersion", + }); +}); + +/** @internal */ +export type UpdateNuncConnectionRequestBody$Outbound = { + company_name?: string | null | undefined; + company_website?: string | null | undefined; + company_tos_url?: string | null | undefined; + greeting_title?: string | null | undefined; + greeting_body?: string | null | undefined; + operational_message?: string | null | undefined; + title?: string | null | undefined; + "conditions[nunc_condition]": Array; + "conditions[condition_id]": Array; + "components[infrastructure_type]": Array; + "components[infrastructure_id]": Array; + primary_color?: string | null | undefined; + secondary_color?: string | null | undefined; + exposed_fields?: Array | null | undefined; + enable_histogram?: boolean | null | undefined; + ui_version?: number | null | undefined; +}; + +/** @internal */ +export const UpdateNuncConnectionRequestBody$outboundSchema: z.ZodType< + UpdateNuncConnectionRequestBody$Outbound, + z.ZodTypeDef, + UpdateNuncConnectionRequestBody +> = z.object({ + companyName: z.nullable(z.string()).optional(), + companyWebsite: z.nullable(z.string()).optional(), + companyTosUrl: z.nullable(z.string()).optional(), + greetingTitle: z.nullable(z.string()).optional(), + greetingBody: z.nullable(z.string()).optional(), + operationalMessage: z.nullable(z.string()).optional(), + title: z.nullable(z.string()).optional(), + conditionsNuncCondition: z.array(z.string()), + conditionsConditionId: z.array(z.string()), + componentsInfrastructureType: z.array(z.string()), + componentsInfrastructureId: z.array(z.string()), + primaryColor: z.nullable(z.string()).optional(), + secondaryColor: z.nullable(z.string()).optional(), + exposedFields: z.nullable(z.array(z.string())).optional(), + enableHistogram: z.nullable(z.boolean()).optional(), + uiVersion: z.nullable(z.number().int()).optional(), +}).transform((v) => { + return remap$(v, { + companyName: "company_name", + companyWebsite: "company_website", + companyTosUrl: "company_tos_url", + greetingTitle: "greeting_title", + greetingBody: "greeting_body", + operationalMessage: "operational_message", + conditionsNuncCondition: "conditions[nunc_condition]", + conditionsConditionId: "conditions[condition_id]", + componentsInfrastructureType: "components[infrastructure_type]", + componentsInfrastructureId: "components[infrastructure_id]", + primaryColor: "primary_color", + secondaryColor: "secondary_color", + exposedFields: "exposed_fields", + enableHistogram: "enable_histogram", + uiVersion: "ui_version", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncConnectionRequestBody$ { + /** @deprecated use `UpdateNuncConnectionRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncConnectionRequestBody$inboundSchema; + /** @deprecated use `UpdateNuncConnectionRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncConnectionRequestBody$outboundSchema; + /** @deprecated use `UpdateNuncConnectionRequestBody$Outbound` instead. */ + export type Outbound = UpdateNuncConnectionRequestBody$Outbound; +} + +export function updateNuncConnectionRequestBodyToJSON( + updateNuncConnectionRequestBody: UpdateNuncConnectionRequestBody, +): string { + return JSON.stringify( + UpdateNuncConnectionRequestBody$outboundSchema.parse( + updateNuncConnectionRequestBody, + ), + ); +} + +export function updateNuncConnectionRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncConnectionRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncConnectionRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateNuncConnectionRequest$inboundSchema: z.ZodType< + UpdateNuncConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + RequestBody: z.lazy(() => UpdateNuncConnectionRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateNuncConnectionRequest$Outbound = { + nunc_connection_id: string; + RequestBody: UpdateNuncConnectionRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateNuncConnectionRequest$outboundSchema: z.ZodType< + UpdateNuncConnectionRequest$Outbound, + z.ZodTypeDef, + UpdateNuncConnectionRequest +> = z.object({ + nuncConnectionId: z.string(), + requestBody: z.lazy(() => UpdateNuncConnectionRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncConnectionRequest$ { + /** @deprecated use `UpdateNuncConnectionRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncConnectionRequest$inboundSchema; + /** @deprecated use `UpdateNuncConnectionRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncConnectionRequest$outboundSchema; + /** @deprecated use `UpdateNuncConnectionRequest$Outbound` instead. */ + export type Outbound = UpdateNuncConnectionRequest$Outbound; +} + +export function updateNuncConnectionRequestToJSON( + updateNuncConnectionRequest: UpdateNuncConnectionRequest, +): string { + return JSON.stringify( + UpdateNuncConnectionRequest$outboundSchema.parse( + updateNuncConnectionRequest, + ), + ); +} + +export function updateNuncConnectionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncConnectionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncConnectionRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatenuncimage.ts b/src/models/operations/updatenuncimage.ts new file mode 100644 index 00000000..b79c77e1 --- /dev/null +++ b/src/models/operations/updatenuncimage.ts @@ -0,0 +1,219 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { blobLikeSchema } from "../../types/blobs.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateNuncImageFile = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +export type UpdateNuncImageRequestBody = { + file?: UpdateNuncImageFile | Blob | undefined; +}; + +export type UpdateNuncImageRequest = { + nuncConnectionId: string; + type: string; + requestBody?: UpdateNuncImageRequestBody | undefined; +}; + +/** @internal */ +export const UpdateNuncImageFile$inboundSchema: z.ZodType< + UpdateNuncImageFile, + z.ZodTypeDef, + unknown +> = z.object({ + fileName: z.string(), + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Uint8Array), + ]), +}); + +/** @internal */ +export type UpdateNuncImageFile$Outbound = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Uint8Array; +}; + +/** @internal */ +export const UpdateNuncImageFile$outboundSchema: z.ZodType< + UpdateNuncImageFile$Outbound, + z.ZodTypeDef, + UpdateNuncImageFile +> = z.object({ + fileName: z.string(), + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Uint8Array), + ]), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncImageFile$ { + /** @deprecated use `UpdateNuncImageFile$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncImageFile$inboundSchema; + /** @deprecated use `UpdateNuncImageFile$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncImageFile$outboundSchema; + /** @deprecated use `UpdateNuncImageFile$Outbound` instead. */ + export type Outbound = UpdateNuncImageFile$Outbound; +} + +export function updateNuncImageFileToJSON( + updateNuncImageFile: UpdateNuncImageFile, +): string { + return JSON.stringify( + UpdateNuncImageFile$outboundSchema.parse(updateNuncImageFile), + ); +} + +export function updateNuncImageFileFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncImageFile$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncImageFile' from JSON`, + ); +} + +/** @internal */ +export const UpdateNuncImageRequestBody$inboundSchema: z.ZodType< + UpdateNuncImageRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + file: z.lazy(() => UpdateNuncImageFile$inboundSchema).optional(), +}); + +/** @internal */ +export type UpdateNuncImageRequestBody$Outbound = { + file?: UpdateNuncImageFile$Outbound | Blob | undefined; +}; + +/** @internal */ +export const UpdateNuncImageRequestBody$outboundSchema: z.ZodType< + UpdateNuncImageRequestBody$Outbound, + z.ZodTypeDef, + UpdateNuncImageRequestBody +> = z.object({ + file: z.lazy(() => UpdateNuncImageFile$outboundSchema).or(blobLikeSchema) + .optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncImageRequestBody$ { + /** @deprecated use `UpdateNuncImageRequestBody$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncImageRequestBody$inboundSchema; + /** @deprecated use `UpdateNuncImageRequestBody$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncImageRequestBody$outboundSchema; + /** @deprecated use `UpdateNuncImageRequestBody$Outbound` instead. */ + export type Outbound = UpdateNuncImageRequestBody$Outbound; +} + +export function updateNuncImageRequestBodyToJSON( + updateNuncImageRequestBody: UpdateNuncImageRequestBody, +): string { + return JSON.stringify( + UpdateNuncImageRequestBody$outboundSchema.parse(updateNuncImageRequestBody), + ); +} + +export function updateNuncImageRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncImageRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncImageRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateNuncImageRequest$inboundSchema: z.ZodType< + UpdateNuncImageRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + type: z.string(), + RequestBody: z.lazy(() => UpdateNuncImageRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateNuncImageRequest$Outbound = { + nunc_connection_id: string; + type: string; + RequestBody?: UpdateNuncImageRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const UpdateNuncImageRequest$outboundSchema: z.ZodType< + UpdateNuncImageRequest$Outbound, + z.ZodTypeDef, + UpdateNuncImageRequest +> = z.object({ + nuncConnectionId: z.string(), + type: z.string(), + requestBody: z.lazy(() => UpdateNuncImageRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncImageRequest$ { + /** @deprecated use `UpdateNuncImageRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncImageRequest$inboundSchema; + /** @deprecated use `UpdateNuncImageRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncImageRequest$outboundSchema; + /** @deprecated use `UpdateNuncImageRequest$Outbound` instead. */ + export type Outbound = UpdateNuncImageRequest$Outbound; +} + +export function updateNuncImageRequestToJSON( + updateNuncImageRequest: UpdateNuncImageRequest, +): string { + return JSON.stringify( + UpdateNuncImageRequest$outboundSchema.parse(updateNuncImageRequest), + ); +} + +export function updateNuncImageRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncImageRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncImageRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatenunclink.ts b/src/models/operations/updatenunclink.ts new file mode 100644 index 00000000..83d85282 --- /dev/null +++ b/src/models/operations/updatenunclink.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateNuncLinkRequest = { + nuncConnectionId: string; + linkId: string; + updateNuncLink: components.UpdateNuncLink; +}; + +/** @internal */ +export const UpdateNuncLinkRequest$inboundSchema: z.ZodType< + UpdateNuncLinkRequest, + z.ZodTypeDef, + unknown +> = z.object({ + nunc_connection_id: z.string(), + link_id: z.string(), + update_nunc_link: z.lazy(() => components.UpdateNuncLink$inboundSchema), +}).transform((v) => { + return remap$(v, { + "nunc_connection_id": "nuncConnectionId", + "link_id": "linkId", + "update_nunc_link": "updateNuncLink", + }); +}); + +/** @internal */ +export type UpdateNuncLinkRequest$Outbound = { + nunc_connection_id: string; + link_id: string; + update_nunc_link: components.UpdateNuncLink$Outbound; +}; + +/** @internal */ +export const UpdateNuncLinkRequest$outboundSchema: z.ZodType< + UpdateNuncLinkRequest$Outbound, + z.ZodTypeDef, + UpdateNuncLinkRequest +> = z.object({ + nuncConnectionId: z.string(), + linkId: z.string(), + updateNuncLink: z.lazy(() => components.UpdateNuncLink$outboundSchema), +}).transform((v) => { + return remap$(v, { + nuncConnectionId: "nunc_connection_id", + linkId: "link_id", + updateNuncLink: "update_nunc_link", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateNuncLinkRequest$ { + /** @deprecated use `UpdateNuncLinkRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateNuncLinkRequest$inboundSchema; + /** @deprecated use `UpdateNuncLinkRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateNuncLinkRequest$outboundSchema; + /** @deprecated use `UpdateNuncLinkRequest$Outbound` instead. */ + export type Outbound = UpdateNuncLinkRequest$Outbound; +} + +export function updateNuncLinkRequestToJSON( + updateNuncLinkRequest: UpdateNuncLinkRequest, +): string { + return JSON.stringify( + UpdateNuncLinkRequest$outboundSchema.parse(updateNuncLinkRequest), + ); +} + +export function updateNuncLinkRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateNuncLinkRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateNuncLinkRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateoncallshift.ts b/src/models/operations/updateoncallshift.ts new file mode 100644 index 00000000..b4f82f3d --- /dev/null +++ b/src/models/operations/updateoncallshift.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateOnCallShiftRequest = { + id: string; + teamId: string; + scheduleId: string; + updateOnCallShift: components.UpdateOnCallShift; +}; + +/** @internal */ +export const UpdateOnCallShiftRequest$inboundSchema: z.ZodType< + UpdateOnCallShiftRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + team_id: z.string(), + schedule_id: z.string(), + update_on_call_shift: z.lazy(() => + components.UpdateOnCallShift$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "team_id": "teamId", + "schedule_id": "scheduleId", + "update_on_call_shift": "updateOnCallShift", + }); +}); + +/** @internal */ +export type UpdateOnCallShiftRequest$Outbound = { + id: string; + team_id: string; + schedule_id: string; + update_on_call_shift: components.UpdateOnCallShift$Outbound; +}; + +/** @internal */ +export const UpdateOnCallShiftRequest$outboundSchema: z.ZodType< + UpdateOnCallShiftRequest$Outbound, + z.ZodTypeDef, + UpdateOnCallShiftRequest +> = z.object({ + id: z.string(), + teamId: z.string(), + scheduleId: z.string(), + updateOnCallShift: z.lazy(() => components.UpdateOnCallShift$outboundSchema), +}).transform((v) => { + return remap$(v, { + teamId: "team_id", + scheduleId: "schedule_id", + updateOnCallShift: "update_on_call_shift", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateOnCallShiftRequest$ { + /** @deprecated use `UpdateOnCallShiftRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateOnCallShiftRequest$inboundSchema; + /** @deprecated use `UpdateOnCallShiftRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateOnCallShiftRequest$outboundSchema; + /** @deprecated use `UpdateOnCallShiftRequest$Outbound` instead. */ + export type Outbound = UpdateOnCallShiftRequest$Outbound; +} + +export function updateOnCallShiftRequestToJSON( + updateOnCallShiftRequest: UpdateOnCallShiftRequest, +): string { + return JSON.stringify( + UpdateOnCallShiftRequest$outboundSchema.parse(updateOnCallShiftRequest), + ); +} + +export function updateOnCallShiftRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateOnCallShiftRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateOnCallShiftRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatepostmortemfield.ts b/src/models/operations/updatepostmortemfield.ts new file mode 100644 index 00000000..22c26e94 --- /dev/null +++ b/src/models/operations/updatepostmortemfield.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdatePostMortemFieldRequest = { + fieldId: string; + reportId: string; + updatePostMortemField: components.UpdatePostMortemField; +}; + +/** @internal */ +export const UpdatePostMortemFieldRequest$inboundSchema: z.ZodType< + UpdatePostMortemFieldRequest, + z.ZodTypeDef, + unknown +> = z.object({ + field_id: z.string(), + report_id: z.string(), + update_post_mortem_field: z.lazy(() => + components.UpdatePostMortemField$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "field_id": "fieldId", + "report_id": "reportId", + "update_post_mortem_field": "updatePostMortemField", + }); +}); + +/** @internal */ +export type UpdatePostMortemFieldRequest$Outbound = { + field_id: string; + report_id: string; + update_post_mortem_field: components.UpdatePostMortemField$Outbound; +}; + +/** @internal */ +export const UpdatePostMortemFieldRequest$outboundSchema: z.ZodType< + UpdatePostMortemFieldRequest$Outbound, + z.ZodTypeDef, + UpdatePostMortemFieldRequest +> = z.object({ + fieldId: z.string(), + reportId: z.string(), + updatePostMortemField: z.lazy(() => + components.UpdatePostMortemField$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + fieldId: "field_id", + reportId: "report_id", + updatePostMortemField: "update_post_mortem_field", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemFieldRequest$ { + /** @deprecated use `UpdatePostMortemFieldRequest$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemFieldRequest$inboundSchema; + /** @deprecated use `UpdatePostMortemFieldRequest$outboundSchema` instead. */ + export const outboundSchema = UpdatePostMortemFieldRequest$outboundSchema; + /** @deprecated use `UpdatePostMortemFieldRequest$Outbound` instead. */ + export type Outbound = UpdatePostMortemFieldRequest$Outbound; +} + +export function updatePostMortemFieldRequestToJSON( + updatePostMortemFieldRequest: UpdatePostMortemFieldRequest, +): string { + return JSON.stringify( + UpdatePostMortemFieldRequest$outboundSchema.parse( + updatePostMortemFieldRequest, + ), + ); +} + +export function updatePostMortemFieldRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemFieldRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemFieldRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatepostmortemreason.ts b/src/models/operations/updatepostmortemreason.ts new file mode 100644 index 00000000..0165144f --- /dev/null +++ b/src/models/operations/updatepostmortemreason.ts @@ -0,0 +1,94 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdatePostMortemReasonRequest = { + reportId: string; + reasonId: string; + updatePostMortemReason: components.UpdatePostMortemReason; +}; + +/** @internal */ +export const UpdatePostMortemReasonRequest$inboundSchema: z.ZodType< + UpdatePostMortemReasonRequest, + z.ZodTypeDef, + unknown +> = z.object({ + report_id: z.string(), + reason_id: z.string(), + update_post_mortem_reason: z.lazy(() => + components.UpdatePostMortemReason$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "report_id": "reportId", + "reason_id": "reasonId", + "update_post_mortem_reason": "updatePostMortemReason", + }); +}); + +/** @internal */ +export type UpdatePostMortemReasonRequest$Outbound = { + report_id: string; + reason_id: string; + update_post_mortem_reason: components.UpdatePostMortemReason$Outbound; +}; + +/** @internal */ +export const UpdatePostMortemReasonRequest$outboundSchema: z.ZodType< + UpdatePostMortemReasonRequest$Outbound, + z.ZodTypeDef, + UpdatePostMortemReasonRequest +> = z.object({ + reportId: z.string(), + reasonId: z.string(), + updatePostMortemReason: z.lazy(() => + components.UpdatePostMortemReason$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + reportId: "report_id", + reasonId: "reason_id", + updatePostMortemReason: "update_post_mortem_reason", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdatePostMortemReasonRequest$ { + /** @deprecated use `UpdatePostMortemReasonRequest$inboundSchema` instead. */ + export const inboundSchema = UpdatePostMortemReasonRequest$inboundSchema; + /** @deprecated use `UpdatePostMortemReasonRequest$outboundSchema` instead. */ + export const outboundSchema = UpdatePostMortemReasonRequest$outboundSchema; + /** @deprecated use `UpdatePostMortemReasonRequest$Outbound` instead. */ + export type Outbound = UpdatePostMortemReasonRequest$Outbound; +} + +export function updatePostMortemReasonRequestToJSON( + updatePostMortemReasonRequest: UpdatePostMortemReasonRequest, +): string { + return JSON.stringify( + UpdatePostMortemReasonRequest$outboundSchema.parse( + updatePostMortemReasonRequest, + ), + ); +} + +export function updatePostMortemReasonRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdatePostMortemReasonRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdatePostMortemReasonRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatepostmortemreport.ts b/src/models/operations/updatepostmortemreport.ts index 5baa7217..ddb2cfe7 100644 --- a/src/models/operations/updatepostmortemreport.ts +++ b/src/models/operations/updatepostmortemreport.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdatePostMortemReportRequest = { reportId: string; - patchV1PostMortemsReportsReportId: - components.PatchV1PostMortemsReportsReportId; + updatePostMortemReport: components.UpdatePostMortemReport; }; /** @internal */ @@ -22,19 +21,20 @@ export const UpdatePostMortemReportRequest$inboundSchema: z.ZodType< unknown > = z.object({ report_id: z.string(), - patchV1PostMortemsReportsReportId: - components.PatchV1PostMortemsReportsReportId$inboundSchema, + update_post_mortem_report: z.lazy(() => + components.UpdatePostMortemReport$inboundSchema + ), }).transform((v) => { return remap$(v, { "report_id": "reportId", + "update_post_mortem_report": "updatePostMortemReport", }); }); /** @internal */ export type UpdatePostMortemReportRequest$Outbound = { report_id: string; - patchV1PostMortemsReportsReportId: - components.PatchV1PostMortemsReportsReportId$Outbound; + update_post_mortem_report: components.UpdatePostMortemReport$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const UpdatePostMortemReportRequest$outboundSchema: z.ZodType< UpdatePostMortemReportRequest > = z.object({ reportId: z.string(), - patchV1PostMortemsReportsReportId: - components.PatchV1PostMortemsReportsReportId$outboundSchema, + updatePostMortemReport: z.lazy(() => + components.UpdatePostMortemReport$outboundSchema + ), }).transform((v) => { return remap$(v, { reportId: "report_id", + updatePostMortemReport: "update_post_mortem_report", }); }); diff --git a/src/models/operations/updatepriority.ts b/src/models/operations/updatepriority.ts index 075c38dc..d610a147 100644 --- a/src/models/operations/updatepriority.ts +++ b/src/models/operations/updatepriority.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdatePriorityRequest = { prioritySlug: string; - patchV1PrioritiesPrioritySlug: components.PatchV1PrioritiesPrioritySlug; + updatePriority: components.UpdatePriority; }; /** @internal */ @@ -21,19 +21,18 @@ export const UpdatePriorityRequest$inboundSchema: z.ZodType< unknown > = z.object({ priority_slug: z.string(), - patchV1PrioritiesPrioritySlug: - components.PatchV1PrioritiesPrioritySlug$inboundSchema, + update_priority: z.lazy(() => components.UpdatePriority$inboundSchema), }).transform((v) => { return remap$(v, { "priority_slug": "prioritySlug", + "update_priority": "updatePriority", }); }); /** @internal */ export type UpdatePriorityRequest$Outbound = { priority_slug: string; - patchV1PrioritiesPrioritySlug: - components.PatchV1PrioritiesPrioritySlug$Outbound; + update_priority: components.UpdatePriority$Outbound; }; /** @internal */ @@ -43,11 +42,11 @@ export const UpdatePriorityRequest$outboundSchema: z.ZodType< UpdatePriorityRequest > = z.object({ prioritySlug: z.string(), - patchV1PrioritiesPrioritySlug: - components.PatchV1PrioritiesPrioritySlug$outboundSchema, + updatePriority: z.lazy(() => components.UpdatePriority$outboundSchema), }).transform((v) => { return remap$(v, { prioritySlug: "priority_slug", + updatePriority: "update_priority", }); }); diff --git a/src/models/operations/updateretrospectivefield.ts b/src/models/operations/updateretrospectivefield.ts deleted file mode 100644 index 7e525351..00000000 --- a/src/models/operations/updateretrospectivefield.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateRetrospectiveFieldRequest = { - fieldId: string; - reportId: string; - patchV1PostMortemsReportsReportIdFieldsFieldId: - components.PatchV1PostMortemsReportsReportIdFieldsFieldId; -}; - -/** @internal */ -export const UpdateRetrospectiveFieldRequest$inboundSchema: z.ZodType< - UpdateRetrospectiveFieldRequest, - z.ZodTypeDef, - unknown -> = z.object({ - field_id: z.string(), - report_id: z.string(), - patchV1PostMortemsReportsReportIdFieldsFieldId: - components.PatchV1PostMortemsReportsReportIdFieldsFieldId$inboundSchema, -}).transform((v) => { - return remap$(v, { - "field_id": "fieldId", - "report_id": "reportId", - }); -}); - -/** @internal */ -export type UpdateRetrospectiveFieldRequest$Outbound = { - field_id: string; - report_id: string; - patchV1PostMortemsReportsReportIdFieldsFieldId: - components.PatchV1PostMortemsReportsReportIdFieldsFieldId$Outbound; -}; - -/** @internal */ -export const UpdateRetrospectiveFieldRequest$outboundSchema: z.ZodType< - UpdateRetrospectiveFieldRequest$Outbound, - z.ZodTypeDef, - UpdateRetrospectiveFieldRequest -> = z.object({ - fieldId: z.string(), - reportId: z.string(), - patchV1PostMortemsReportsReportIdFieldsFieldId: - components.PatchV1PostMortemsReportsReportIdFieldsFieldId$outboundSchema, -}).transform((v) => { - return remap$(v, { - fieldId: "field_id", - reportId: "report_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateRetrospectiveFieldRequest$ { - /** @deprecated use `UpdateRetrospectiveFieldRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateRetrospectiveFieldRequest$inboundSchema; - /** @deprecated use `UpdateRetrospectiveFieldRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateRetrospectiveFieldRequest$outboundSchema; - /** @deprecated use `UpdateRetrospectiveFieldRequest$Outbound` instead. */ - export type Outbound = UpdateRetrospectiveFieldRequest$Outbound; -} - -export function updateRetrospectiveFieldRequestToJSON( - updateRetrospectiveFieldRequest: UpdateRetrospectiveFieldRequest, -): string { - return JSON.stringify( - UpdateRetrospectiveFieldRequest$outboundSchema.parse( - updateRetrospectiveFieldRequest, - ), - ); -} - -export function updateRetrospectiveFieldRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateRetrospectiveFieldRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateRetrospectiveFieldRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateretrospectivereason.ts b/src/models/operations/updateretrospectivereason.ts deleted file mode 100644 index 2d31d980..00000000 --- a/src/models/operations/updateretrospectivereason.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateRetrospectiveReasonRequest = { - reportId: string; - reasonId: string; - patchV1PostMortemsReportsReportIdReasonsReasonId: - components.PatchV1PostMortemsReportsReportIdReasonsReasonId; -}; - -/** @internal */ -export const UpdateRetrospectiveReasonRequest$inboundSchema: z.ZodType< - UpdateRetrospectiveReasonRequest, - z.ZodTypeDef, - unknown -> = z.object({ - report_id: z.string(), - reason_id: z.string(), - patchV1PostMortemsReportsReportIdReasonsReasonId: - components.PatchV1PostMortemsReportsReportIdReasonsReasonId$inboundSchema, -}).transform((v) => { - return remap$(v, { - "report_id": "reportId", - "reason_id": "reasonId", - }); -}); - -/** @internal */ -export type UpdateRetrospectiveReasonRequest$Outbound = { - report_id: string; - reason_id: string; - patchV1PostMortemsReportsReportIdReasonsReasonId: - components.PatchV1PostMortemsReportsReportIdReasonsReasonId$Outbound; -}; - -/** @internal */ -export const UpdateRetrospectiveReasonRequest$outboundSchema: z.ZodType< - UpdateRetrospectiveReasonRequest$Outbound, - z.ZodTypeDef, - UpdateRetrospectiveReasonRequest -> = z.object({ - reportId: z.string(), - reasonId: z.string(), - patchV1PostMortemsReportsReportIdReasonsReasonId: - components.PatchV1PostMortemsReportsReportIdReasonsReasonId$outboundSchema, -}).transform((v) => { - return remap$(v, { - reportId: "report_id", - reasonId: "reason_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateRetrospectiveReasonRequest$ { - /** @deprecated use `UpdateRetrospectiveReasonRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateRetrospectiveReasonRequest$inboundSchema; - /** @deprecated use `UpdateRetrospectiveReasonRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateRetrospectiveReasonRequest$outboundSchema; - /** @deprecated use `UpdateRetrospectiveReasonRequest$Outbound` instead. */ - export type Outbound = UpdateRetrospectiveReasonRequest$Outbound; -} - -export function updateRetrospectiveReasonRequestToJSON( - updateRetrospectiveReasonRequest: UpdateRetrospectiveReasonRequest, -): string { - return JSON.stringify( - UpdateRetrospectiveReasonRequest$outboundSchema.parse( - updateRetrospectiveReasonRequest, - ), - ); -} - -export function updateRetrospectiveReasonRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateRetrospectiveReasonRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateRetrospectiveReasonRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateretrospectivereportreasonorder.ts b/src/models/operations/updateretrospectivereportreasonorder.ts deleted file mode 100644 index c565a739..00000000 --- a/src/models/operations/updateretrospectivereportreasonorder.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateRetrospectiveReportReasonOrderRequest = { - reportId: string; - putV1PostMortemsReportsReportIdReasonsOrder: - components.PutV1PostMortemsReportsReportIdReasonsOrder; -}; - -/** @internal */ -export const UpdateRetrospectiveReportReasonOrderRequest$inboundSchema: - z.ZodType< - UpdateRetrospectiveReportReasonOrderRequest, - z.ZodTypeDef, - unknown - > = z.object({ - report_id: z.string(), - putV1PostMortemsReportsReportIdReasonsOrder: - components.PutV1PostMortemsReportsReportIdReasonsOrder$inboundSchema, - }).transform((v) => { - return remap$(v, { - "report_id": "reportId", - }); - }); - -/** @internal */ -export type UpdateRetrospectiveReportReasonOrderRequest$Outbound = { - report_id: string; - putV1PostMortemsReportsReportIdReasonsOrder: - components.PutV1PostMortemsReportsReportIdReasonsOrder$Outbound; -}; - -/** @internal */ -export const UpdateRetrospectiveReportReasonOrderRequest$outboundSchema: - z.ZodType< - UpdateRetrospectiveReportReasonOrderRequest$Outbound, - z.ZodTypeDef, - UpdateRetrospectiveReportReasonOrderRequest - > = z.object({ - reportId: z.string(), - putV1PostMortemsReportsReportIdReasonsOrder: - components.PutV1PostMortemsReportsReportIdReasonsOrder$outboundSchema, - }).transform((v) => { - return remap$(v, { - reportId: "report_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateRetrospectiveReportReasonOrderRequest$ { - /** @deprecated use `UpdateRetrospectiveReportReasonOrderRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateRetrospectiveReportReasonOrderRequest$inboundSchema; - /** @deprecated use `UpdateRetrospectiveReportReasonOrderRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateRetrospectiveReportReasonOrderRequest$outboundSchema; - /** @deprecated use `UpdateRetrospectiveReportReasonOrderRequest$Outbound` instead. */ - export type Outbound = UpdateRetrospectiveReportReasonOrderRequest$Outbound; -} - -export function updateRetrospectiveReportReasonOrderRequestToJSON( - updateRetrospectiveReportReasonOrderRequest: - UpdateRetrospectiveReportReasonOrderRequest, -): string { - return JSON.stringify( - UpdateRetrospectiveReportReasonOrderRequest$outboundSchema.parse( - updateRetrospectiveReportReasonOrderRequest, - ), - ); -} - -export function updateRetrospectiveReportReasonOrderRequestFromJSON( - jsonString: string, -): SafeParseResult< - UpdateRetrospectiveReportReasonOrderRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - UpdateRetrospectiveReportReasonOrderRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'UpdateRetrospectiveReportReasonOrderRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateretrospectivetemplate.ts b/src/models/operations/updateretrospectivetemplate.ts new file mode 100644 index 00000000..5d44b76e --- /dev/null +++ b/src/models/operations/updateretrospectivetemplate.ts @@ -0,0 +1,262 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const UpdateRetrospectiveTemplateFieldsType = { + Text: "text", + SingleSelect: "single_select", + MultiSelect: "multi_select", + Numeric: "numeric", + Datetime: "datetime", + DynamicInputGroup: "dynamic_input_group", + Markdown: "markdown", + MarkdownText: "markdown_text", +} as const; +export type UpdateRetrospectiveTemplateFieldsType = ClosedEnum< + typeof UpdateRetrospectiveTemplateFieldsType +>; + +export type UpdateRetrospectiveTemplateRequestBody = { + name?: string | null | undefined; + description?: string | null | undefined; + isDefault?: boolean | null | undefined; + sectionsSlug: Array; + sectionsElements: Array; + fieldsId?: Array | null | undefined; + fieldsLabel: Array; + fieldsType: Array; + fieldsHelpText?: Array | null | undefined; + fieldsPermissibleValues?: Array | null | undefined; + fieldsIsRequired?: Array | null | undefined; + fieldsSchema?: Array | null | undefined; +}; + +export type UpdateRetrospectiveTemplateRequest = { + retrospectiveTemplateId: string; + requestBody: UpdateRetrospectiveTemplateRequestBody; +}; + +/** @internal */ +export const UpdateRetrospectiveTemplateFieldsType$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + UpdateRetrospectiveTemplateFieldsType, + ); + +/** @internal */ +export const UpdateRetrospectiveTemplateFieldsType$outboundSchema: + z.ZodNativeEnum = + UpdateRetrospectiveTemplateFieldsType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRetrospectiveTemplateFieldsType$ { + /** @deprecated use `UpdateRetrospectiveTemplateFieldsType$inboundSchema` instead. */ + export const inboundSchema = + UpdateRetrospectiveTemplateFieldsType$inboundSchema; + /** @deprecated use `UpdateRetrospectiveTemplateFieldsType$outboundSchema` instead. */ + export const outboundSchema = + UpdateRetrospectiveTemplateFieldsType$outboundSchema; +} + +/** @internal */ +export const UpdateRetrospectiveTemplateRequestBody$inboundSchema: z.ZodType< + UpdateRetrospectiveTemplateRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + is_default: z.nullable(z.boolean()).optional(), + "sections[slug]": z.array(z.string()), + "sections[elements]": z.array(z.string()), + "fields[id]": z.nullable(z.array(z.string())).optional(), + "fields[label]": z.array(z.string()), + "fields[type]": z.array(UpdateRetrospectiveTemplateFieldsType$inboundSchema), + "fields[help_text]": z.nullable(z.array(z.string())).optional(), + "fields[permissible_values]": z.nullable(z.array(z.string())).optional(), + "fields[is_required]": z.nullable(z.array(z.boolean())).optional(), + "fields[schema]": z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "is_default": "isDefault", + "sections[slug]": "sectionsSlug", + "sections[elements]": "sectionsElements", + "fields[id]": "fieldsId", + "fields[label]": "fieldsLabel", + "fields[type]": "fieldsType", + "fields[help_text]": "fieldsHelpText", + "fields[permissible_values]": "fieldsPermissibleValues", + "fields[is_required]": "fieldsIsRequired", + "fields[schema]": "fieldsSchema", + }); +}); + +/** @internal */ +export type UpdateRetrospectiveTemplateRequestBody$Outbound = { + name?: string | null | undefined; + description?: string | null | undefined; + is_default?: boolean | null | undefined; + "sections[slug]": Array; + "sections[elements]": Array; + "fields[id]"?: Array | null | undefined; + "fields[label]": Array; + "fields[type]": Array; + "fields[help_text]"?: Array | null | undefined; + "fields[permissible_values]"?: Array | null | undefined; + "fields[is_required]"?: Array | null | undefined; + "fields[schema]"?: Array | null | undefined; +}; + +/** @internal */ +export const UpdateRetrospectiveTemplateRequestBody$outboundSchema: z.ZodType< + UpdateRetrospectiveTemplateRequestBody$Outbound, + z.ZodTypeDef, + UpdateRetrospectiveTemplateRequestBody +> = z.object({ + name: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + isDefault: z.nullable(z.boolean()).optional(), + sectionsSlug: z.array(z.string()), + sectionsElements: z.array(z.string()), + fieldsId: z.nullable(z.array(z.string())).optional(), + fieldsLabel: z.array(z.string()), + fieldsType: z.array(UpdateRetrospectiveTemplateFieldsType$outboundSchema), + fieldsHelpText: z.nullable(z.array(z.string())).optional(), + fieldsPermissibleValues: z.nullable(z.array(z.string())).optional(), + fieldsIsRequired: z.nullable(z.array(z.boolean())).optional(), + fieldsSchema: z.nullable(z.array(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + isDefault: "is_default", + sectionsSlug: "sections[slug]", + sectionsElements: "sections[elements]", + fieldsId: "fields[id]", + fieldsLabel: "fields[label]", + fieldsType: "fields[type]", + fieldsHelpText: "fields[help_text]", + fieldsPermissibleValues: "fields[permissible_values]", + fieldsIsRequired: "fields[is_required]", + fieldsSchema: "fields[schema]", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRetrospectiveTemplateRequestBody$ { + /** @deprecated use `UpdateRetrospectiveTemplateRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateRetrospectiveTemplateRequestBody$inboundSchema; + /** @deprecated use `UpdateRetrospectiveTemplateRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateRetrospectiveTemplateRequestBody$outboundSchema; + /** @deprecated use `UpdateRetrospectiveTemplateRequestBody$Outbound` instead. */ + export type Outbound = UpdateRetrospectiveTemplateRequestBody$Outbound; +} + +export function updateRetrospectiveTemplateRequestBodyToJSON( + updateRetrospectiveTemplateRequestBody: + UpdateRetrospectiveTemplateRequestBody, +): string { + return JSON.stringify( + UpdateRetrospectiveTemplateRequestBody$outboundSchema.parse( + updateRetrospectiveTemplateRequestBody, + ), + ); +} + +export function updateRetrospectiveTemplateRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateRetrospectiveTemplateRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRetrospectiveTemplateRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateRetrospectiveTemplateRequest$inboundSchema: z.ZodType< + UpdateRetrospectiveTemplateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + retrospective_template_id: z.string(), + RequestBody: z.lazy(() => + UpdateRetrospectiveTemplateRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "retrospective_template_id": "retrospectiveTemplateId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateRetrospectiveTemplateRequest$Outbound = { + retrospective_template_id: string; + RequestBody: UpdateRetrospectiveTemplateRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateRetrospectiveTemplateRequest$outboundSchema: z.ZodType< + UpdateRetrospectiveTemplateRequest$Outbound, + z.ZodTypeDef, + UpdateRetrospectiveTemplateRequest +> = z.object({ + retrospectiveTemplateId: z.string(), + requestBody: z.lazy(() => + UpdateRetrospectiveTemplateRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + retrospectiveTemplateId: "retrospective_template_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRetrospectiveTemplateRequest$ { + /** @deprecated use `UpdateRetrospectiveTemplateRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateRetrospectiveTemplateRequest$inboundSchema; + /** @deprecated use `UpdateRetrospectiveTemplateRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateRetrospectiveTemplateRequest$outboundSchema; + /** @deprecated use `UpdateRetrospectiveTemplateRequest$Outbound` instead. */ + export type Outbound = UpdateRetrospectiveTemplateRequest$Outbound; +} + +export function updateRetrospectiveTemplateRequestToJSON( + updateRetrospectiveTemplateRequest: UpdateRetrospectiveTemplateRequest, +): string { + return JSON.stringify( + UpdateRetrospectiveTemplateRequest$outboundSchema.parse( + updateRetrospectiveTemplateRequest, + ), + ); +} + +export function updateRetrospectiveTemplateRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateRetrospectiveTemplateRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateRetrospectiveTemplateRequest' from JSON`, + ); +} diff --git a/src/models/operations/updaterunbook.ts b/src/models/operations/updaterunbook.ts index 64519cdf..05dac957 100644 --- a/src/models/operations/updaterunbook.ts +++ b/src/models/operations/updaterunbook.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateRunbookRequest = { runbookId: string; - putV1RunbooksRunbookId: components.PutV1RunbooksRunbookId; + updateRunbook: components.UpdateRunbook; }; /** @internal */ @@ -21,17 +21,18 @@ export const UpdateRunbookRequest$inboundSchema: z.ZodType< unknown > = z.object({ runbook_id: z.string(), - putV1RunbooksRunbookId: components.PutV1RunbooksRunbookId$inboundSchema, + update_runbook: z.lazy(() => components.UpdateRunbook$inboundSchema), }).transform((v) => { return remap$(v, { "runbook_id": "runbookId", + "update_runbook": "updateRunbook", }); }); /** @internal */ export type UpdateRunbookRequest$Outbound = { runbook_id: string; - putV1RunbooksRunbookId: components.PutV1RunbooksRunbookId$Outbound; + update_runbook: components.UpdateRunbook$Outbound; }; /** @internal */ @@ -41,10 +42,11 @@ export const UpdateRunbookRequest$outboundSchema: z.ZodType< UpdateRunbookRequest > = z.object({ runbookId: z.string(), - putV1RunbooksRunbookId: components.PutV1RunbooksRunbookId$outboundSchema, + updateRunbook: z.lazy(() => components.UpdateRunbook$outboundSchema), }).transform((v) => { return remap$(v, { runbookId: "runbook_id", + updateRunbook: "update_runbook", }); }); diff --git a/src/models/operations/updaterunbookexecutionstep.ts b/src/models/operations/updaterunbookexecutionstep.ts index 3c5c281d..f3793b0b 100644 --- a/src/models/operations/updaterunbookexecutionstep.ts +++ b/src/models/operations/updaterunbookexecutionstep.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateRunbookExecutionStepRequest = { executionId: string; stepId: string; - putV1RunbooksExecutionsExecutionIdStepsStepId: - components.PutV1RunbooksExecutionsExecutionIdStepsStepId; + updateRunbookExecutionStep: components.UpdateRunbookExecutionStep; }; /** @internal */ @@ -24,12 +23,14 @@ export const UpdateRunbookExecutionStepRequest$inboundSchema: z.ZodType< > = z.object({ execution_id: z.string(), step_id: z.string(), - putV1RunbooksExecutionsExecutionIdStepsStepId: - components.PutV1RunbooksExecutionsExecutionIdStepsStepId$inboundSchema, + update_runbook_execution_step: z.lazy(() => + components.UpdateRunbookExecutionStep$inboundSchema + ), }).transform((v) => { return remap$(v, { "execution_id": "executionId", "step_id": "stepId", + "update_runbook_execution_step": "updateRunbookExecutionStep", }); }); @@ -37,8 +38,7 @@ export const UpdateRunbookExecutionStepRequest$inboundSchema: z.ZodType< export type UpdateRunbookExecutionStepRequest$Outbound = { execution_id: string; step_id: string; - putV1RunbooksExecutionsExecutionIdStepsStepId: - components.PutV1RunbooksExecutionsExecutionIdStepsStepId$Outbound; + update_runbook_execution_step: components.UpdateRunbookExecutionStep$Outbound; }; /** @internal */ @@ -49,12 +49,14 @@ export const UpdateRunbookExecutionStepRequest$outboundSchema: z.ZodType< > = z.object({ executionId: z.string(), stepId: z.string(), - putV1RunbooksExecutionsExecutionIdStepsStepId: - components.PutV1RunbooksExecutionsExecutionIdStepsStepId$outboundSchema, + updateRunbookExecutionStep: z.lazy(() => + components.UpdateRunbookExecutionStep$outboundSchema + ), }).transform((v) => { return remap$(v, { executionId: "execution_id", stepId: "step_id", + updateRunbookExecutionStep: "update_runbook_execution_step", }); }); diff --git a/src/models/operations/updaterunbookexecutionstepscript.ts b/src/models/operations/updaterunbookexecutionstepscript.ts new file mode 100644 index 00000000..72f18c72 --- /dev/null +++ b/src/models/operations/updaterunbookexecutionstepscript.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateRunbookExecutionStepScriptRequest = { + executionId: string; + stepId: string; + state: string; +}; + +/** @internal */ +export const UpdateRunbookExecutionStepScriptRequest$inboundSchema: z.ZodType< + UpdateRunbookExecutionStepScriptRequest, + z.ZodTypeDef, + unknown +> = z.object({ + execution_id: z.string(), + step_id: z.string(), + state: z.string(), +}).transform((v) => { + return remap$(v, { + "execution_id": "executionId", + "step_id": "stepId", + }); +}); + +/** @internal */ +export type UpdateRunbookExecutionStepScriptRequest$Outbound = { + execution_id: string; + step_id: string; + state: string; +}; + +/** @internal */ +export const UpdateRunbookExecutionStepScriptRequest$outboundSchema: z.ZodType< + UpdateRunbookExecutionStepScriptRequest$Outbound, + z.ZodTypeDef, + UpdateRunbookExecutionStepScriptRequest +> = z.object({ + executionId: z.string(), + stepId: z.string(), + state: z.string(), +}).transform((v) => { + return remap$(v, { + executionId: "execution_id", + stepId: "step_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateRunbookExecutionStepScriptRequest$ { + /** @deprecated use `UpdateRunbookExecutionStepScriptRequest$inboundSchema` instead. */ + export const inboundSchema = + UpdateRunbookExecutionStepScriptRequest$inboundSchema; + /** @deprecated use `UpdateRunbookExecutionStepScriptRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateRunbookExecutionStepScriptRequest$outboundSchema; + /** @deprecated use `UpdateRunbookExecutionStepScriptRequest$Outbound` instead. */ + export type Outbound = UpdateRunbookExecutionStepScriptRequest$Outbound; +} + +export function updateRunbookExecutionStepScriptRequestToJSON( + updateRunbookExecutionStepScriptRequest: + UpdateRunbookExecutionStepScriptRequest, +): string { + return JSON.stringify( + UpdateRunbookExecutionStepScriptRequest$outboundSchema.parse( + updateRunbookExecutionStepScriptRequest, + ), + ); +} + +export function updateRunbookExecutionStepScriptRequestFromJSON( + jsonString: string, +): SafeParseResult< + UpdateRunbookExecutionStepScriptRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + UpdateRunbookExecutionStepScriptRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'UpdateRunbookExecutionStepScriptRequest' from JSON`, + ); +} diff --git a/src/models/operations/updaterunbookexecutionstepscriptstate.ts b/src/models/operations/updaterunbookexecutionstepscriptstate.ts deleted file mode 100644 index 131753d9..00000000 --- a/src/models/operations/updaterunbookexecutionstepscriptstate.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateRunbookExecutionStepScriptStateRequest = { - executionId: string; - stepId: string; - state: string; -}; - -/** @internal */ -export const UpdateRunbookExecutionStepScriptStateRequest$inboundSchema: - z.ZodType< - UpdateRunbookExecutionStepScriptStateRequest, - z.ZodTypeDef, - unknown - > = z.object({ - execution_id: z.string(), - step_id: z.string(), - state: z.string(), - }).transform((v) => { - return remap$(v, { - "execution_id": "executionId", - "step_id": "stepId", - }); - }); - -/** @internal */ -export type UpdateRunbookExecutionStepScriptStateRequest$Outbound = { - execution_id: string; - step_id: string; - state: string; -}; - -/** @internal */ -export const UpdateRunbookExecutionStepScriptStateRequest$outboundSchema: - z.ZodType< - UpdateRunbookExecutionStepScriptStateRequest$Outbound, - z.ZodTypeDef, - UpdateRunbookExecutionStepScriptStateRequest - > = z.object({ - executionId: z.string(), - stepId: z.string(), - state: z.string(), - }).transform((v) => { - return remap$(v, { - executionId: "execution_id", - stepId: "step_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateRunbookExecutionStepScriptStateRequest$ { - /** @deprecated use `UpdateRunbookExecutionStepScriptStateRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateRunbookExecutionStepScriptStateRequest$inboundSchema; - /** @deprecated use `UpdateRunbookExecutionStepScriptStateRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateRunbookExecutionStepScriptStateRequest$outboundSchema; - /** @deprecated use `UpdateRunbookExecutionStepScriptStateRequest$Outbound` instead. */ - export type Outbound = UpdateRunbookExecutionStepScriptStateRequest$Outbound; -} - -export function updateRunbookExecutionStepScriptStateRequestToJSON( - updateRunbookExecutionStepScriptStateRequest: - UpdateRunbookExecutionStepScriptStateRequest, -): string { - return JSON.stringify( - UpdateRunbookExecutionStepScriptStateRequest$outboundSchema.parse( - updateRunbookExecutionStepScriptStateRequest, - ), - ); -} - -export function updateRunbookExecutionStepScriptStateRequestFromJSON( - jsonString: string, -): SafeParseResult< - UpdateRunbookExecutionStepScriptStateRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - UpdateRunbookExecutionStepScriptStateRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'UpdateRunbookExecutionStepScriptStateRequest' from JSON`, - ); -} diff --git a/src/models/operations/updaterunbookexecutionstepvotes.ts b/src/models/operations/updaterunbookexecutionstepvotes.ts deleted file mode 100644 index 69532ca4..00000000 --- a/src/models/operations/updaterunbookexecutionstepvotes.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateRunbookExecutionStepVotesRequest = { - executionId: string; - stepId: string; - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: - components.PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes; -}; - -/** @internal */ -export const UpdateRunbookExecutionStepVotesRequest$inboundSchema: z.ZodType< - UpdateRunbookExecutionStepVotesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - execution_id: z.string(), - step_id: z.string(), - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: - components - .PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$inboundSchema, -}).transform((v) => { - return remap$(v, { - "execution_id": "executionId", - "step_id": "stepId", - }); -}); - -/** @internal */ -export type UpdateRunbookExecutionStepVotesRequest$Outbound = { - execution_id: string; - step_id: string; - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: - components.PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$Outbound; -}; - -/** @internal */ -export const UpdateRunbookExecutionStepVotesRequest$outboundSchema: z.ZodType< - UpdateRunbookExecutionStepVotesRequest$Outbound, - z.ZodTypeDef, - UpdateRunbookExecutionStepVotesRequest -> = z.object({ - executionId: z.string(), - stepId: z.string(), - patchV1RunbooksExecutionsExecutionIdStepsStepIdVotes: - components - .PatchV1RunbooksExecutionsExecutionIdStepsStepIdVotes$outboundSchema, -}).transform((v) => { - return remap$(v, { - executionId: "execution_id", - stepId: "step_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateRunbookExecutionStepVotesRequest$ { - /** @deprecated use `UpdateRunbookExecutionStepVotesRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateRunbookExecutionStepVotesRequest$inboundSchema; - /** @deprecated use `UpdateRunbookExecutionStepVotesRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateRunbookExecutionStepVotesRequest$outboundSchema; - /** @deprecated use `UpdateRunbookExecutionStepVotesRequest$Outbound` instead. */ - export type Outbound = UpdateRunbookExecutionStepVotesRequest$Outbound; -} - -export function updateRunbookExecutionStepVotesRequestToJSON( - updateRunbookExecutionStepVotesRequest: - UpdateRunbookExecutionStepVotesRequest, -): string { - return JSON.stringify( - UpdateRunbookExecutionStepVotesRequest$outboundSchema.parse( - updateRunbookExecutionStepVotesRequest, - ), - ); -} - -export function updateRunbookExecutionStepVotesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateRunbookExecutionStepVotesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateRunbookExecutionStepVotesRequest' from JSON`, - ); -} diff --git a/src/models/operations/updaterunbookexecutionvotes.ts b/src/models/operations/updaterunbookexecutionvotes.ts deleted file mode 100644 index a8323891..00000000 --- a/src/models/operations/updaterunbookexecutionvotes.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateRunbookExecutionVotesRequest = { - executionId: string; - patchV1RunbooksExecutionsExecutionIdVotes: - components.PatchV1RunbooksExecutionsExecutionIdVotes; -}; - -/** @internal */ -export const UpdateRunbookExecutionVotesRequest$inboundSchema: z.ZodType< - UpdateRunbookExecutionVotesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - execution_id: z.string(), - patchV1RunbooksExecutionsExecutionIdVotes: - components.PatchV1RunbooksExecutionsExecutionIdVotes$inboundSchema, -}).transform((v) => { - return remap$(v, { - "execution_id": "executionId", - }); -}); - -/** @internal */ -export type UpdateRunbookExecutionVotesRequest$Outbound = { - execution_id: string; - patchV1RunbooksExecutionsExecutionIdVotes: - components.PatchV1RunbooksExecutionsExecutionIdVotes$Outbound; -}; - -/** @internal */ -export const UpdateRunbookExecutionVotesRequest$outboundSchema: z.ZodType< - UpdateRunbookExecutionVotesRequest$Outbound, - z.ZodTypeDef, - UpdateRunbookExecutionVotesRequest -> = z.object({ - executionId: z.string(), - patchV1RunbooksExecutionsExecutionIdVotes: - components.PatchV1RunbooksExecutionsExecutionIdVotes$outboundSchema, -}).transform((v) => { - return remap$(v, { - executionId: "execution_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateRunbookExecutionVotesRequest$ { - /** @deprecated use `UpdateRunbookExecutionVotesRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateRunbookExecutionVotesRequest$inboundSchema; - /** @deprecated use `UpdateRunbookExecutionVotesRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateRunbookExecutionVotesRequest$outboundSchema; - /** @deprecated use `UpdateRunbookExecutionVotesRequest$Outbound` instead. */ - export type Outbound = UpdateRunbookExecutionVotesRequest$Outbound; -} - -export function updateRunbookExecutionVotesRequestToJSON( - updateRunbookExecutionVotesRequest: UpdateRunbookExecutionVotesRequest, -): string { - return JSON.stringify( - UpdateRunbookExecutionVotesRequest$outboundSchema.parse( - updateRunbookExecutionVotesRequest, - ), - ); -} - -export function updateRunbookExecutionVotesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateRunbookExecutionVotesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateRunbookExecutionVotesRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatesavedsearch.ts b/src/models/operations/updatesavedsearch.ts index 57a29131..43acde71 100644 --- a/src/models/operations/updatesavedsearch.ts +++ b/src/models/operations/updatesavedsearch.ts @@ -10,7 +10,7 @@ import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -export const UpdateSavedSearchPathParamResourceType = { +export const UpdateSavedSearchResourceType = { ChangeEvents: "change_events", Incidents: "incidents", Services: "services", @@ -22,39 +22,35 @@ export const UpdateSavedSearchPathParamResourceType = { Alerts: "alerts", IncidentEvents: "incident_events", } as const; -export type UpdateSavedSearchPathParamResourceType = ClosedEnum< - typeof UpdateSavedSearchPathParamResourceType +export type UpdateSavedSearchResourceType = ClosedEnum< + typeof UpdateSavedSearchResourceType >; export type UpdateSavedSearchRequest = { - resourceType: UpdateSavedSearchPathParamResourceType; + resourceType: UpdateSavedSearchResourceType; savedSearchId: string; - patchV1SavedSearchesResourceTypeSavedSearchId: - components.PatchV1SavedSearchesResourceTypeSavedSearchId; + updateSavedSearch: components.UpdateSavedSearch; }; /** @internal */ -export const UpdateSavedSearchPathParamResourceType$inboundSchema: - z.ZodNativeEnum = z.nativeEnum( - UpdateSavedSearchPathParamResourceType, - ); +export const UpdateSavedSearchResourceType$inboundSchema: z.ZodNativeEnum< + typeof UpdateSavedSearchResourceType +> = z.nativeEnum(UpdateSavedSearchResourceType); /** @internal */ -export const UpdateSavedSearchPathParamResourceType$outboundSchema: - z.ZodNativeEnum = - UpdateSavedSearchPathParamResourceType$inboundSchema; +export const UpdateSavedSearchResourceType$outboundSchema: z.ZodNativeEnum< + typeof UpdateSavedSearchResourceType +> = UpdateSavedSearchResourceType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UpdateSavedSearchPathParamResourceType$ { - /** @deprecated use `UpdateSavedSearchPathParamResourceType$inboundSchema` instead. */ - export const inboundSchema = - UpdateSavedSearchPathParamResourceType$inboundSchema; - /** @deprecated use `UpdateSavedSearchPathParamResourceType$outboundSchema` instead. */ - export const outboundSchema = - UpdateSavedSearchPathParamResourceType$outboundSchema; +export namespace UpdateSavedSearchResourceType$ { + /** @deprecated use `UpdateSavedSearchResourceType$inboundSchema` instead. */ + export const inboundSchema = UpdateSavedSearchResourceType$inboundSchema; + /** @deprecated use `UpdateSavedSearchResourceType$outboundSchema` instead. */ + export const outboundSchema = UpdateSavedSearchResourceType$outboundSchema; } /** @internal */ @@ -63,14 +59,14 @@ export const UpdateSavedSearchRequest$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - resource_type: UpdateSavedSearchPathParamResourceType$inboundSchema, + resource_type: UpdateSavedSearchResourceType$inboundSchema, saved_search_id: z.string(), - patchV1SavedSearchesResourceTypeSavedSearchId: - components.PatchV1SavedSearchesResourceTypeSavedSearchId$inboundSchema, + update_saved_search: z.lazy(() => components.UpdateSavedSearch$inboundSchema), }).transform((v) => { return remap$(v, { "resource_type": "resourceType", "saved_search_id": "savedSearchId", + "update_saved_search": "updateSavedSearch", }); }); @@ -78,8 +74,7 @@ export const UpdateSavedSearchRequest$inboundSchema: z.ZodType< export type UpdateSavedSearchRequest$Outbound = { resource_type: string; saved_search_id: string; - patchV1SavedSearchesResourceTypeSavedSearchId: - components.PatchV1SavedSearchesResourceTypeSavedSearchId$Outbound; + update_saved_search: components.UpdateSavedSearch$Outbound; }; /** @internal */ @@ -88,14 +83,14 @@ export const UpdateSavedSearchRequest$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateSavedSearchRequest > = z.object({ - resourceType: UpdateSavedSearchPathParamResourceType$outboundSchema, + resourceType: UpdateSavedSearchResourceType$outboundSchema, savedSearchId: z.string(), - patchV1SavedSearchesResourceTypeSavedSearchId: - components.PatchV1SavedSearchesResourceTypeSavedSearchId$outboundSchema, + updateSavedSearch: z.lazy(() => components.UpdateSavedSearch$outboundSchema), }).transform((v) => { return remap$(v, { resourceType: "resource_type", savedSearchId: "saved_search_id", + updateSavedSearch: "update_saved_search", }); }); diff --git a/src/models/operations/updatescheduledmaintenance.ts b/src/models/operations/updatescheduledmaintenance.ts index d0b5bb5a..45084b61 100644 --- a/src/models/operations/updatescheduledmaintenance.ts +++ b/src/models/operations/updatescheduledmaintenance.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateScheduledMaintenanceRequest = { scheduledMaintenanceId: string; - patchV1ScheduledMaintenancesScheduledMaintenanceId: - components.PatchV1ScheduledMaintenancesScheduledMaintenanceId; + updateScheduledMaintenance: components.UpdateScheduledMaintenance; }; /** @internal */ @@ -22,19 +21,20 @@ export const UpdateScheduledMaintenanceRequest$inboundSchema: z.ZodType< unknown > = z.object({ scheduled_maintenance_id: z.string(), - patchV1ScheduledMaintenancesScheduledMaintenanceId: - components.PatchV1ScheduledMaintenancesScheduledMaintenanceId$inboundSchema, + update_scheduled_maintenance: z.lazy(() => + components.UpdateScheduledMaintenance$inboundSchema + ), }).transform((v) => { return remap$(v, { "scheduled_maintenance_id": "scheduledMaintenanceId", + "update_scheduled_maintenance": "updateScheduledMaintenance", }); }); /** @internal */ export type UpdateScheduledMaintenanceRequest$Outbound = { scheduled_maintenance_id: string; - patchV1ScheduledMaintenancesScheduledMaintenanceId: - components.PatchV1ScheduledMaintenancesScheduledMaintenanceId$Outbound; + update_scheduled_maintenance: components.UpdateScheduledMaintenance$Outbound; }; /** @internal */ @@ -44,12 +44,13 @@ export const UpdateScheduledMaintenanceRequest$outboundSchema: z.ZodType< UpdateScheduledMaintenanceRequest > = z.object({ scheduledMaintenanceId: z.string(), - patchV1ScheduledMaintenancesScheduledMaintenanceId: - components - .PatchV1ScheduledMaintenancesScheduledMaintenanceId$outboundSchema, + updateScheduledMaintenance: z.lazy(() => + components.UpdateScheduledMaintenance$outboundSchema + ), }).transform((v) => { return remap$(v, { scheduledMaintenanceId: "scheduled_maintenance_id", + updateScheduledMaintenance: "update_scheduled_maintenance", }); }); diff --git a/src/models/operations/updatescimgroup.ts b/src/models/operations/updatescimgroup.ts index a058aca1..fc877f74 100644 --- a/src/models/operations/updatescimgroup.ts +++ b/src/models/operations/updatescimgroup.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -10,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateScimGroupRequest = { id: string; - putV1ScimV2GroupsId: components.PutV1ScimV2GroupsId; + updateScimGroup: components.UpdateScimGroup; }; /** @internal */ @@ -20,13 +21,17 @@ export const UpdateScimGroupRequest$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - putV1ScimV2GroupsId: components.PutV1ScimV2GroupsId$inboundSchema, + update_scim_group: z.lazy(() => components.UpdateScimGroup$inboundSchema), +}).transform((v) => { + return remap$(v, { + "update_scim_group": "updateScimGroup", + }); }); /** @internal */ export type UpdateScimGroupRequest$Outbound = { id: string; - putV1ScimV2GroupsId: components.PutV1ScimV2GroupsId$Outbound; + update_scim_group: components.UpdateScimGroup$Outbound; }; /** @internal */ @@ -36,7 +41,11 @@ export const UpdateScimGroupRequest$outboundSchema: z.ZodType< UpdateScimGroupRequest > = z.object({ id: z.string(), - putV1ScimV2GroupsId: components.PutV1ScimV2GroupsId$outboundSchema, + updateScimGroup: z.lazy(() => components.UpdateScimGroup$outboundSchema), +}).transform((v) => { + return remap$(v, { + updateScimGroup: "update_scim_group", + }); }); /** diff --git a/src/models/operations/updatescimuser.ts b/src/models/operations/updatescimuser.ts index 5fdde85c..a6cbce6e 100644 --- a/src/models/operations/updatescimuser.ts +++ b/src/models/operations/updatescimuser.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -10,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateScimUserRequest = { id: string; - patchV1ScimV2UsersId: components.PatchV1ScimV2UsersId; + updateScimUser: components.UpdateScimUser; }; /** @internal */ @@ -20,13 +21,17 @@ export const UpdateScimUserRequest$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - patchV1ScimV2UsersId: components.PatchV1ScimV2UsersId$inboundSchema, + update_scim_user: z.lazy(() => components.UpdateScimUser$inboundSchema), +}).transform((v) => { + return remap$(v, { + "update_scim_user": "updateScimUser", + }); }); /** @internal */ export type UpdateScimUserRequest$Outbound = { id: string; - patchV1ScimV2UsersId: components.PatchV1ScimV2UsersId$Outbound; + update_scim_user: components.UpdateScimUser$Outbound; }; /** @internal */ @@ -36,7 +41,11 @@ export const UpdateScimUserRequest$outboundSchema: z.ZodType< UpdateScimUserRequest > = z.object({ id: z.string(), - patchV1ScimV2UsersId: components.PatchV1ScimV2UsersId$outboundSchema, + updateScimUser: z.lazy(() => components.UpdateScimUser$outboundSchema), +}).transform((v) => { + return remap$(v, { + updateScimUser: "update_scim_user", + }); }); /** diff --git a/src/models/operations/updateservice.ts b/src/models/operations/updateservice.ts index 8eb49be9..c6fa01fd 100644 --- a/src/models/operations/updateservice.ts +++ b/src/models/operations/updateservice.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateServiceRequest = { serviceId: string; - patchV1ServicesServiceId: components.PatchV1ServicesServiceId; + updateService: components.UpdateService; }; /** @internal */ @@ -21,17 +21,18 @@ export const UpdateServiceRequest$inboundSchema: z.ZodType< unknown > = z.object({ service_id: z.string(), - patchV1ServicesServiceId: components.PatchV1ServicesServiceId$inboundSchema, + update_service: z.lazy(() => components.UpdateService$inboundSchema), }).transform((v) => { return remap$(v, { "service_id": "serviceId", + "update_service": "updateService", }); }); /** @internal */ export type UpdateServiceRequest$Outbound = { service_id: string; - patchV1ServicesServiceId: components.PatchV1ServicesServiceId$Outbound; + update_service: components.UpdateService$Outbound; }; /** @internal */ @@ -41,10 +42,11 @@ export const UpdateServiceRequest$outboundSchema: z.ZodType< UpdateServiceRequest > = z.object({ serviceId: z.string(), - patchV1ServicesServiceId: components.PatchV1ServicesServiceId$outboundSchema, + updateService: z.lazy(() => components.UpdateService$outboundSchema), }).transform((v) => { return remap$(v, { serviceId: "service_id", + updateService: "update_service", }); }); diff --git a/src/models/operations/updateservicedependency.ts b/src/models/operations/updateservicedependency.ts index 78e8acd1..1fab5630 100644 --- a/src/models/operations/updateservicedependency.ts +++ b/src/models/operations/updateservicedependency.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateServiceDependencyRequest = { serviceDependencyId: string; - patchV1ServiceDependenciesServiceDependencyId: - components.PatchV1ServiceDependenciesServiceDependencyId; + updateServiceDependency: components.UpdateServiceDependency; }; /** @internal */ @@ -22,19 +21,20 @@ export const UpdateServiceDependencyRequest$inboundSchema: z.ZodType< unknown > = z.object({ service_dependency_id: z.string(), - patchV1ServiceDependenciesServiceDependencyId: - components.PatchV1ServiceDependenciesServiceDependencyId$inboundSchema, + update_service_dependency: z.lazy(() => + components.UpdateServiceDependency$inboundSchema + ), }).transform((v) => { return remap$(v, { "service_dependency_id": "serviceDependencyId", + "update_service_dependency": "updateServiceDependency", }); }); /** @internal */ export type UpdateServiceDependencyRequest$Outbound = { service_dependency_id: string; - patchV1ServiceDependenciesServiceDependencyId: - components.PatchV1ServiceDependenciesServiceDependencyId$Outbound; + update_service_dependency: components.UpdateServiceDependency$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const UpdateServiceDependencyRequest$outboundSchema: z.ZodType< UpdateServiceDependencyRequest > = z.object({ serviceDependencyId: z.string(), - patchV1ServiceDependenciesServiceDependencyId: - components.PatchV1ServiceDependenciesServiceDependencyId$outboundSchema, + updateServiceDependency: z.lazy(() => + components.UpdateServiceDependency$outboundSchema + ), }).transform((v) => { return remap$(v, { serviceDependencyId: "service_dependency_id", + updateServiceDependency: "update_service_dependency", }); }); diff --git a/src/models/operations/updateseverity.ts b/src/models/operations/updateseverity.ts index 66dc0fdb..bd570d61 100644 --- a/src/models/operations/updateseverity.ts +++ b/src/models/operations/updateseverity.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateSeverityRequest = { severitySlug: string; - patchV1SeveritiesSeveritySlug: components.PatchV1SeveritiesSeveritySlug; + updateSeverity: components.UpdateSeverity; }; /** @internal */ @@ -21,19 +21,18 @@ export const UpdateSeverityRequest$inboundSchema: z.ZodType< unknown > = z.object({ severity_slug: z.string(), - patchV1SeveritiesSeveritySlug: - components.PatchV1SeveritiesSeveritySlug$inboundSchema, + update_severity: z.lazy(() => components.UpdateSeverity$inboundSchema), }).transform((v) => { return remap$(v, { "severity_slug": "severitySlug", + "update_severity": "updateSeverity", }); }); /** @internal */ export type UpdateSeverityRequest$Outbound = { severity_slug: string; - patchV1SeveritiesSeveritySlug: - components.PatchV1SeveritiesSeveritySlug$Outbound; + update_severity: components.UpdateSeverity$Outbound; }; /** @internal */ @@ -43,11 +42,11 @@ export const UpdateSeverityRequest$outboundSchema: z.ZodType< UpdateSeverityRequest > = z.object({ severitySlug: z.string(), - patchV1SeveritiesSeveritySlug: - components.PatchV1SeveritiesSeveritySlug$outboundSchema, + updateSeverity: z.lazy(() => components.UpdateSeverity$outboundSchema), }).transform((v) => { return remap$(v, { severitySlug: "severity_slug", + updateSeverity: "update_severity", }); }); diff --git a/src/models/operations/updateseveritymatrixcondition.ts b/src/models/operations/updateseveritymatrixcondition.ts index aad8f60c..88463b47 100644 --- a/src/models/operations/updateseveritymatrixcondition.ts +++ b/src/models/operations/updateseveritymatrixcondition.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateSeverityMatrixConditionRequest = { conditionId: string; - patchV1SeverityMatrixConditionsConditionId: - components.PatchV1SeverityMatrixConditionsConditionId; + updateSeverityMatrixCondition: components.UpdateSeverityMatrixCondition; }; /** @internal */ @@ -22,19 +21,21 @@ export const UpdateSeverityMatrixConditionRequest$inboundSchema: z.ZodType< unknown > = z.object({ condition_id: z.string(), - patchV1SeverityMatrixConditionsConditionId: - components.PatchV1SeverityMatrixConditionsConditionId$inboundSchema, + update_severity_matrix_condition: z.lazy(() => + components.UpdateSeverityMatrixCondition$inboundSchema + ), }).transform((v) => { return remap$(v, { "condition_id": "conditionId", + "update_severity_matrix_condition": "updateSeverityMatrixCondition", }); }); /** @internal */ export type UpdateSeverityMatrixConditionRequest$Outbound = { condition_id: string; - patchV1SeverityMatrixConditionsConditionId: - components.PatchV1SeverityMatrixConditionsConditionId$Outbound; + update_severity_matrix_condition: + components.UpdateSeverityMatrixCondition$Outbound; }; /** @internal */ @@ -44,11 +45,13 @@ export const UpdateSeverityMatrixConditionRequest$outboundSchema: z.ZodType< UpdateSeverityMatrixConditionRequest > = z.object({ conditionId: z.string(), - patchV1SeverityMatrixConditionsConditionId: - components.PatchV1SeverityMatrixConditionsConditionId$outboundSchema, + updateSeverityMatrixCondition: z.lazy(() => + components.UpdateSeverityMatrixCondition$outboundSchema + ), }).transform((v) => { return remap$(v, { conditionId: "condition_id", + updateSeverityMatrixCondition: "update_severity_matrix_condition", }); }); diff --git a/src/models/operations/updateseveritymatriximpact.ts b/src/models/operations/updateseveritymatriximpact.ts index 7dde1057..80eb1091 100644 --- a/src/models/operations/updateseveritymatriximpact.ts +++ b/src/models/operations/updateseveritymatriximpact.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateSeverityMatrixImpactRequest = { impactId: string; - patchV1SeverityMatrixImpactsImpactId: - components.PatchV1SeverityMatrixImpactsImpactId; + updateSeverityMatrixImpact: components.UpdateSeverityMatrixImpact; }; /** @internal */ @@ -22,19 +21,20 @@ export const UpdateSeverityMatrixImpactRequest$inboundSchema: z.ZodType< unknown > = z.object({ impact_id: z.string(), - patchV1SeverityMatrixImpactsImpactId: - components.PatchV1SeverityMatrixImpactsImpactId$inboundSchema, + update_severity_matrix_impact: z.lazy(() => + components.UpdateSeverityMatrixImpact$inboundSchema + ), }).transform((v) => { return remap$(v, { "impact_id": "impactId", + "update_severity_matrix_impact": "updateSeverityMatrixImpact", }); }); /** @internal */ export type UpdateSeverityMatrixImpactRequest$Outbound = { impact_id: string; - patchV1SeverityMatrixImpactsImpactId: - components.PatchV1SeverityMatrixImpactsImpactId$Outbound; + update_severity_matrix_impact: components.UpdateSeverityMatrixImpact$Outbound; }; /** @internal */ @@ -44,11 +44,13 @@ export const UpdateSeverityMatrixImpactRequest$outboundSchema: z.ZodType< UpdateSeverityMatrixImpactRequest > = z.object({ impactId: z.string(), - patchV1SeverityMatrixImpactsImpactId: - components.PatchV1SeverityMatrixImpactsImpactId$outboundSchema, + updateSeverityMatrixImpact: z.lazy(() => + components.UpdateSeverityMatrixImpact$outboundSchema + ), }).transform((v) => { return remap$(v, { impactId: "impact_id", + updateSeverityMatrixImpact: "update_severity_matrix_impact", }); }); diff --git a/src/models/operations/updatesignalemailtarget.ts b/src/models/operations/updatesignalemailtarget.ts deleted file mode 100644 index eedf73fc..00000000 --- a/src/models/operations/updatesignalemailtarget.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateSignalEmailTargetRequest = { - id: string; - patchV1SignalsEmailTargetsId: components.PatchV1SignalsEmailTargetsId; -}; - -/** @internal */ -export const UpdateSignalEmailTargetRequest$inboundSchema: z.ZodType< - UpdateSignalEmailTargetRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - patchV1SignalsEmailTargetsId: - components.PatchV1SignalsEmailTargetsId$inboundSchema, -}); - -/** @internal */ -export type UpdateSignalEmailTargetRequest$Outbound = { - id: string; - patchV1SignalsEmailTargetsId: - components.PatchV1SignalsEmailTargetsId$Outbound; -}; - -/** @internal */ -export const UpdateSignalEmailTargetRequest$outboundSchema: z.ZodType< - UpdateSignalEmailTargetRequest$Outbound, - z.ZodTypeDef, - UpdateSignalEmailTargetRequest -> = z.object({ - id: z.string(), - patchV1SignalsEmailTargetsId: - components.PatchV1SignalsEmailTargetsId$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateSignalEmailTargetRequest$ { - /** @deprecated use `UpdateSignalEmailTargetRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateSignalEmailTargetRequest$inboundSchema; - /** @deprecated use `UpdateSignalEmailTargetRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateSignalEmailTargetRequest$outboundSchema; - /** @deprecated use `UpdateSignalEmailTargetRequest$Outbound` instead. */ - export type Outbound = UpdateSignalEmailTargetRequest$Outbound; -} - -export function updateSignalEmailTargetRequestToJSON( - updateSignalEmailTargetRequest: UpdateSignalEmailTargetRequest, -): string { - return JSON.stringify( - UpdateSignalEmailTargetRequest$outboundSchema.parse( - updateSignalEmailTargetRequest, - ), - ); -} - -export function updateSignalEmailTargetRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateSignalEmailTargetRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateSignalEmailTargetRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatesignalsemailtarget.ts b/src/models/operations/updatesignalsemailtarget.ts new file mode 100644 index 00000000..b04f7cf1 --- /dev/null +++ b/src/models/operations/updatesignalsemailtarget.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateSignalsEmailTargetRequest = { + id: string; + updateSignalsEmailTarget: components.UpdateSignalsEmailTarget; +}; + +/** @internal */ +export const UpdateSignalsEmailTargetRequest$inboundSchema: z.ZodType< + UpdateSignalsEmailTargetRequest, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + update_signals_email_target: z.lazy(() => + components.UpdateSignalsEmailTarget$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "update_signals_email_target": "updateSignalsEmailTarget", + }); +}); + +/** @internal */ +export type UpdateSignalsEmailTargetRequest$Outbound = { + id: string; + update_signals_email_target: components.UpdateSignalsEmailTarget$Outbound; +}; + +/** @internal */ +export const UpdateSignalsEmailTargetRequest$outboundSchema: z.ZodType< + UpdateSignalsEmailTargetRequest$Outbound, + z.ZodTypeDef, + UpdateSignalsEmailTargetRequest +> = z.object({ + id: z.string(), + updateSignalsEmailTarget: z.lazy(() => + components.UpdateSignalsEmailTarget$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + updateSignalsEmailTarget: "update_signals_email_target", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateSignalsEmailTargetRequest$ { + /** @deprecated use `UpdateSignalsEmailTargetRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateSignalsEmailTargetRequest$inboundSchema; + /** @deprecated use `UpdateSignalsEmailTargetRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateSignalsEmailTargetRequest$outboundSchema; + /** @deprecated use `UpdateSignalsEmailTargetRequest$Outbound` instead. */ + export type Outbound = UpdateSignalsEmailTargetRequest$Outbound; +} + +export function updateSignalsEmailTargetRequestToJSON( + updateSignalsEmailTargetRequest: UpdateSignalsEmailTargetRequest, +): string { + return JSON.stringify( + UpdateSignalsEmailTargetRequest$outboundSchema.parse( + updateSignalsEmailTargetRequest, + ), + ); +} + +export function updateSignalsEmailTargetRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateSignalsEmailTargetRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateSignalsEmailTargetRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatesignalswebhooktarget.ts b/src/models/operations/updatesignalswebhooktarget.ts index a2c6924d..1dcc8684 100644 --- a/src/models/operations/updatesignalswebhooktarget.ts +++ b/src/models/operations/updatesignalswebhooktarget.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -10,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateSignalsWebhookTargetRequest = { id: string; - patchV1SignalsWebhookTargetsId: components.PatchV1SignalsWebhookTargetsId; + updateSignalsWebhookTarget: components.UpdateSignalsWebhookTarget; }; /** @internal */ @@ -20,15 +21,19 @@ export const UpdateSignalsWebhookTargetRequest$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - patchV1SignalsWebhookTargetsId: - components.PatchV1SignalsWebhookTargetsId$inboundSchema, + update_signals_webhook_target: z.lazy(() => + components.UpdateSignalsWebhookTarget$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "update_signals_webhook_target": "updateSignalsWebhookTarget", + }); }); /** @internal */ export type UpdateSignalsWebhookTargetRequest$Outbound = { id: string; - patchV1SignalsWebhookTargetsId: - components.PatchV1SignalsWebhookTargetsId$Outbound; + update_signals_webhook_target: components.UpdateSignalsWebhookTarget$Outbound; }; /** @internal */ @@ -38,8 +43,13 @@ export const UpdateSignalsWebhookTargetRequest$outboundSchema: z.ZodType< UpdateSignalsWebhookTargetRequest > = z.object({ id: z.string(), - patchV1SignalsWebhookTargetsId: - components.PatchV1SignalsWebhookTargetsId$outboundSchema, + updateSignalsWebhookTarget: z.lazy(() => + components.UpdateSignalsWebhookTarget$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + updateSignalsWebhookTarget: "update_signals_webhook_target", + }); }); /** diff --git a/src/models/operations/updateslackemojiaction.ts b/src/models/operations/updateslackemojiaction.ts index 064e9c50..99f2a894 100644 --- a/src/models/operations/updateslackemojiaction.ts +++ b/src/models/operations/updateslackemojiaction.ts @@ -12,11 +12,11 @@ export type UpdateSlackEmojiActionRequestBody = { /** * The name of the emoji to associate with this action */ - emojiName?: string | undefined; + emojiName?: string | null | undefined; /** * The ID of the incident type to associate with this emoji action */ - incidentTypeId?: string | undefined; + incidentTypeId?: string | null | undefined; }; export type UpdateSlackEmojiActionRequest = { @@ -34,8 +34,8 @@ export const UpdateSlackEmojiActionRequestBody$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - emoji_name: z.string().optional(), - incident_type_id: z.string().optional(), + emoji_name: z.nullable(z.string()).optional(), + incident_type_id: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "emoji_name": "emojiName", @@ -45,8 +45,8 @@ export const UpdateSlackEmojiActionRequestBody$inboundSchema: z.ZodType< /** @internal */ export type UpdateSlackEmojiActionRequestBody$Outbound = { - emoji_name?: string | undefined; - incident_type_id?: string | undefined; + emoji_name?: string | null | undefined; + incident_type_id?: string | null | undefined; }; /** @internal */ @@ -55,8 +55,8 @@ export const UpdateSlackEmojiActionRequestBody$outboundSchema: z.ZodType< z.ZodTypeDef, UpdateSlackEmojiActionRequestBody > = z.object({ - emojiName: z.string().optional(), - incidentTypeId: z.string().optional(), + emojiName: z.nullable(z.string()).optional(), + incidentTypeId: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { emojiName: "emoji_name", diff --git a/src/models/operations/updatestatuspage.ts b/src/models/operations/updatestatuspage.ts deleted file mode 100644 index 38d7d70e..00000000 --- a/src/models/operations/updatestatuspage.ts +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateStatusPageRequestBody = { - companyName?: string | undefined; - companyWebsite?: string | undefined; - companyTosUrl?: string | undefined; - greetingTitle?: string | undefined; - greetingBody?: string | undefined; - operationalMessage?: string | undefined; - title?: string | undefined; - /** - * Status page condition to map your severity matrix condition to - */ - conditionsNuncCondition: Array; - /** - * Severity matrix condition id - */ - conditionsConditionId: Array; - componentsInfrastructureType: Array; - componentsInfrastructureId: Array; - primaryColor?: string | undefined; - secondaryColor?: string | undefined; - exposedFields?: Array | undefined; - enableHistogram?: boolean | undefined; - uiVersion?: number | undefined; -}; - -export type UpdateStatusPageRequest = { - nuncConnectionId: string; - requestBody: UpdateStatusPageRequestBody; -}; - -/** @internal */ -export const UpdateStatusPageRequestBody$inboundSchema: z.ZodType< - UpdateStatusPageRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - company_name: z.string().optional(), - company_website: z.string().optional(), - company_tos_url: z.string().optional(), - greeting_title: z.string().optional(), - greeting_body: z.string().optional(), - operational_message: z.string().optional(), - title: z.string().optional(), - "conditions[nunc_condition]": z.array(z.string()), - "conditions[condition_id]": z.array(z.string()), - "components[infrastructure_type]": z.array(z.string()), - "components[infrastructure_id]": z.array(z.string()), - primary_color: z.string().optional(), - secondary_color: z.string().optional(), - exposed_fields: z.array(z.string()).optional(), - enable_histogram: z.boolean().optional(), - ui_version: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "company_name": "companyName", - "company_website": "companyWebsite", - "company_tos_url": "companyTosUrl", - "greeting_title": "greetingTitle", - "greeting_body": "greetingBody", - "operational_message": "operationalMessage", - "conditions[nunc_condition]": "conditionsNuncCondition", - "conditions[condition_id]": "conditionsConditionId", - "components[infrastructure_type]": "componentsInfrastructureType", - "components[infrastructure_id]": "componentsInfrastructureId", - "primary_color": "primaryColor", - "secondary_color": "secondaryColor", - "exposed_fields": "exposedFields", - "enable_histogram": "enableHistogram", - "ui_version": "uiVersion", - }); -}); - -/** @internal */ -export type UpdateStatusPageRequestBody$Outbound = { - company_name?: string | undefined; - company_website?: string | undefined; - company_tos_url?: string | undefined; - greeting_title?: string | undefined; - greeting_body?: string | undefined; - operational_message?: string | undefined; - title?: string | undefined; - "conditions[nunc_condition]": Array; - "conditions[condition_id]": Array; - "components[infrastructure_type]": Array; - "components[infrastructure_id]": Array; - primary_color?: string | undefined; - secondary_color?: string | undefined; - exposed_fields?: Array | undefined; - enable_histogram?: boolean | undefined; - ui_version?: number | undefined; -}; - -/** @internal */ -export const UpdateStatusPageRequestBody$outboundSchema: z.ZodType< - UpdateStatusPageRequestBody$Outbound, - z.ZodTypeDef, - UpdateStatusPageRequestBody -> = z.object({ - companyName: z.string().optional(), - companyWebsite: z.string().optional(), - companyTosUrl: z.string().optional(), - greetingTitle: z.string().optional(), - greetingBody: z.string().optional(), - operationalMessage: z.string().optional(), - title: z.string().optional(), - conditionsNuncCondition: z.array(z.string()), - conditionsConditionId: z.array(z.string()), - componentsInfrastructureType: z.array(z.string()), - componentsInfrastructureId: z.array(z.string()), - primaryColor: z.string().optional(), - secondaryColor: z.string().optional(), - exposedFields: z.array(z.string()).optional(), - enableHistogram: z.boolean().optional(), - uiVersion: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - companyName: "company_name", - companyWebsite: "company_website", - companyTosUrl: "company_tos_url", - greetingTitle: "greeting_title", - greetingBody: "greeting_body", - operationalMessage: "operational_message", - conditionsNuncCondition: "conditions[nunc_condition]", - conditionsConditionId: "conditions[condition_id]", - componentsInfrastructureType: "components[infrastructure_type]", - componentsInfrastructureId: "components[infrastructure_id]", - primaryColor: "primary_color", - secondaryColor: "secondary_color", - exposedFields: "exposed_fields", - enableHistogram: "enable_histogram", - uiVersion: "ui_version", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageRequestBody$ { - /** @deprecated use `UpdateStatusPageRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateStatusPageRequestBody$inboundSchema; - /** @deprecated use `UpdateStatusPageRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateStatusPageRequestBody$outboundSchema; - /** @deprecated use `UpdateStatusPageRequestBody$Outbound` instead. */ - export type Outbound = UpdateStatusPageRequestBody$Outbound; -} - -export function updateStatusPageRequestBodyToJSON( - updateStatusPageRequestBody: UpdateStatusPageRequestBody, -): string { - return JSON.stringify( - UpdateStatusPageRequestBody$outboundSchema.parse( - updateStatusPageRequestBody, - ), - ); -} - -export function updateStatusPageRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateStatusPageRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateStatusPageRequestBody' from JSON`, - ); -} - -/** @internal */ -export const UpdateStatusPageRequest$inboundSchema: z.ZodType< - UpdateStatusPageRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - RequestBody: z.lazy(() => UpdateStatusPageRequestBody$inboundSchema), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type UpdateStatusPageRequest$Outbound = { - nunc_connection_id: string; - RequestBody: UpdateStatusPageRequestBody$Outbound; -}; - -/** @internal */ -export const UpdateStatusPageRequest$outboundSchema: z.ZodType< - UpdateStatusPageRequest$Outbound, - z.ZodTypeDef, - UpdateStatusPageRequest -> = z.object({ - nuncConnectionId: z.string(), - requestBody: z.lazy(() => UpdateStatusPageRequestBody$outboundSchema), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageRequest$ { - /** @deprecated use `UpdateStatusPageRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateStatusPageRequest$inboundSchema; - /** @deprecated use `UpdateStatusPageRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateStatusPageRequest$outboundSchema; - /** @deprecated use `UpdateStatusPageRequest$Outbound` instead. */ - export type Outbound = UpdateStatusPageRequest$Outbound; -} - -export function updateStatusPageRequestToJSON( - updateStatusPageRequest: UpdateStatusPageRequest, -): string { - return JSON.stringify( - UpdateStatusPageRequest$outboundSchema.parse(updateStatusPageRequest), - ); -} - -export function updateStatusPageRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateStatusPageRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateStatusPageRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatestatuspagecomponentgroup.ts b/src/models/operations/updatestatuspagecomponentgroup.ts deleted file mode 100644 index 6db85ce7..00000000 --- a/src/models/operations/updatestatuspagecomponentgroup.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateStatusPageComponentGroupRequestBody = { - name?: string | undefined; - componentGroupId?: string | undefined; - position?: number | undefined; -}; - -export type UpdateStatusPageComponentGroupRequest = { - nuncConnectionId: string; - groupId: string; - requestBody?: UpdateStatusPageComponentGroupRequestBody | undefined; -}; - -/** @internal */ -export const UpdateStatusPageComponentGroupRequestBody$inboundSchema: z.ZodType< - UpdateStatusPageComponentGroupRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string().optional(), - component_group_id: z.string().optional(), - position: z.number().int().optional(), -}).transform((v) => { - return remap$(v, { - "component_group_id": "componentGroupId", - }); -}); - -/** @internal */ -export type UpdateStatusPageComponentGroupRequestBody$Outbound = { - name?: string | undefined; - component_group_id?: string | undefined; - position?: number | undefined; -}; - -/** @internal */ -export const UpdateStatusPageComponentGroupRequestBody$outboundSchema: - z.ZodType< - UpdateStatusPageComponentGroupRequestBody$Outbound, - z.ZodTypeDef, - UpdateStatusPageComponentGroupRequestBody - > = z.object({ - name: z.string().optional(), - componentGroupId: z.string().optional(), - position: z.number().int().optional(), - }).transform((v) => { - return remap$(v, { - componentGroupId: "component_group_id", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageComponentGroupRequestBody$ { - /** @deprecated use `UpdateStatusPageComponentGroupRequestBody$inboundSchema` instead. */ - export const inboundSchema = - UpdateStatusPageComponentGroupRequestBody$inboundSchema; - /** @deprecated use `UpdateStatusPageComponentGroupRequestBody$outboundSchema` instead. */ - export const outboundSchema = - UpdateStatusPageComponentGroupRequestBody$outboundSchema; - /** @deprecated use `UpdateStatusPageComponentGroupRequestBody$Outbound` instead. */ - export type Outbound = UpdateStatusPageComponentGroupRequestBody$Outbound; -} - -export function updateStatusPageComponentGroupRequestBodyToJSON( - updateStatusPageComponentGroupRequestBody: - UpdateStatusPageComponentGroupRequestBody, -): string { - return JSON.stringify( - UpdateStatusPageComponentGroupRequestBody$outboundSchema.parse( - updateStatusPageComponentGroupRequestBody, - ), - ); -} - -export function updateStatusPageComponentGroupRequestBodyFromJSON( - jsonString: string, -): SafeParseResult< - UpdateStatusPageComponentGroupRequestBody, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - UpdateStatusPageComponentGroupRequestBody$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'UpdateStatusPageComponentGroupRequestBody' from JSON`, - ); -} - -/** @internal */ -export const UpdateStatusPageComponentGroupRequest$inboundSchema: z.ZodType< - UpdateStatusPageComponentGroupRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - group_id: z.string(), - RequestBody: z.lazy(() => - UpdateStatusPageComponentGroupRequestBody$inboundSchema - ).optional(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "group_id": "groupId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type UpdateStatusPageComponentGroupRequest$Outbound = { - nunc_connection_id: string; - group_id: string; - RequestBody?: UpdateStatusPageComponentGroupRequestBody$Outbound | undefined; -}; - -/** @internal */ -export const UpdateStatusPageComponentGroupRequest$outboundSchema: z.ZodType< - UpdateStatusPageComponentGroupRequest$Outbound, - z.ZodTypeDef, - UpdateStatusPageComponentGroupRequest -> = z.object({ - nuncConnectionId: z.string(), - groupId: z.string(), - requestBody: z.lazy(() => - UpdateStatusPageComponentGroupRequestBody$outboundSchema - ).optional(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - groupId: "group_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageComponentGroupRequest$ { - /** @deprecated use `UpdateStatusPageComponentGroupRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateStatusPageComponentGroupRequest$inboundSchema; - /** @deprecated use `UpdateStatusPageComponentGroupRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateStatusPageComponentGroupRequest$outboundSchema; - /** @deprecated use `UpdateStatusPageComponentGroupRequest$Outbound` instead. */ - export type Outbound = UpdateStatusPageComponentGroupRequest$Outbound; -} - -export function updateStatusPageComponentGroupRequestToJSON( - updateStatusPageComponentGroupRequest: UpdateStatusPageComponentGroupRequest, -): string { - return JSON.stringify( - UpdateStatusPageComponentGroupRequest$outboundSchema.parse( - updateStatusPageComponentGroupRequest, - ), - ); -} - -export function updateStatusPageComponentGroupRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateStatusPageComponentGroupRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateStatusPageComponentGroupRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatestatuspageconnection.ts b/src/models/operations/updatestatuspageconnection.ts index dd42b1d3..181cea3f 100644 --- a/src/models/operations/updatestatuspageconnection.ts +++ b/src/models/operations/updatestatuspageconnection.ts @@ -14,8 +14,7 @@ export type UpdateStatuspageConnectionRequest = { * Connection UUID */ connectionId: string; - patchV1IntegrationsStatuspageConnectionsConnectionId: - components.PatchV1IntegrationsStatuspageConnectionsConnectionId; + updateStatuspageConnection: components.UpdateStatuspageConnection; }; /** @internal */ @@ -25,20 +24,20 @@ export const UpdateStatuspageConnectionRequest$inboundSchema: z.ZodType< unknown > = z.object({ connection_id: z.string(), - patchV1IntegrationsStatuspageConnectionsConnectionId: - components - .PatchV1IntegrationsStatuspageConnectionsConnectionId$inboundSchema, + update_statuspage_connection: z.lazy(() => + components.UpdateStatuspageConnection$inboundSchema + ), }).transform((v) => { return remap$(v, { "connection_id": "connectionId", + "update_statuspage_connection": "updateStatuspageConnection", }); }); /** @internal */ export type UpdateStatuspageConnectionRequest$Outbound = { connection_id: string; - patchV1IntegrationsStatuspageConnectionsConnectionId: - components.PatchV1IntegrationsStatuspageConnectionsConnectionId$Outbound; + update_statuspage_connection: components.UpdateStatuspageConnection$Outbound; }; /** @internal */ @@ -48,12 +47,13 @@ export const UpdateStatuspageConnectionRequest$outboundSchema: z.ZodType< UpdateStatuspageConnectionRequest > = z.object({ connectionId: z.string(), - patchV1IntegrationsStatuspageConnectionsConnectionId: - components - .PatchV1IntegrationsStatuspageConnectionsConnectionId$outboundSchema, + updateStatuspageConnection: z.lazy(() => + components.UpdateStatuspageConnection$outboundSchema + ), }).transform((v) => { return remap$(v, { connectionId: "connection_id", + updateStatuspageConnection: "update_statuspage_connection", }); }); diff --git a/src/models/operations/updatestatuspageimage.ts b/src/models/operations/updatestatuspageimage.ts deleted file mode 100644 index 20e0ef33..00000000 --- a/src/models/operations/updatestatuspageimage.ts +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { blobLikeSchema } from "../../types/blobs.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateStatusPageImageFile = { - fileName: string; - content: ReadableStream | Blob | ArrayBuffer | Uint8Array; -}; - -export type UpdateStatusPageImageRequestBody = { - file?: UpdateStatusPageImageFile | Blob | undefined; -}; - -export type UpdateStatusPageImageRequest = { - nuncConnectionId: string; - type: string; - requestBody?: UpdateStatusPageImageRequestBody | undefined; -}; - -/** @internal */ -export const UpdateStatusPageImageFile$inboundSchema: z.ZodType< - UpdateStatusPageImageFile, - z.ZodTypeDef, - unknown -> = z.object({ - fileName: z.string(), - content: z.union([ - z.instanceof(ReadableStream), - z.instanceof(Blob), - z.instanceof(ArrayBuffer), - z.instanceof(Uint8Array), - ]), -}); - -/** @internal */ -export type UpdateStatusPageImageFile$Outbound = { - fileName: string; - content: ReadableStream | Blob | ArrayBuffer | Uint8Array; -}; - -/** @internal */ -export const UpdateStatusPageImageFile$outboundSchema: z.ZodType< - UpdateStatusPageImageFile$Outbound, - z.ZodTypeDef, - UpdateStatusPageImageFile -> = z.object({ - fileName: z.string(), - content: z.union([ - z.instanceof(ReadableStream), - z.instanceof(Blob), - z.instanceof(ArrayBuffer), - z.instanceof(Uint8Array), - ]), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageImageFile$ { - /** @deprecated use `UpdateStatusPageImageFile$inboundSchema` instead. */ - export const inboundSchema = UpdateStatusPageImageFile$inboundSchema; - /** @deprecated use `UpdateStatusPageImageFile$outboundSchema` instead. */ - export const outboundSchema = UpdateStatusPageImageFile$outboundSchema; - /** @deprecated use `UpdateStatusPageImageFile$Outbound` instead. */ - export type Outbound = UpdateStatusPageImageFile$Outbound; -} - -export function updateStatusPageImageFileToJSON( - updateStatusPageImageFile: UpdateStatusPageImageFile, -): string { - return JSON.stringify( - UpdateStatusPageImageFile$outboundSchema.parse(updateStatusPageImageFile), - ); -} - -export function updateStatusPageImageFileFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateStatusPageImageFile$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateStatusPageImageFile' from JSON`, - ); -} - -/** @internal */ -export const UpdateStatusPageImageRequestBody$inboundSchema: z.ZodType< - UpdateStatusPageImageRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - file: z.lazy(() => UpdateStatusPageImageFile$inboundSchema).optional(), -}); - -/** @internal */ -export type UpdateStatusPageImageRequestBody$Outbound = { - file?: UpdateStatusPageImageFile$Outbound | Blob | undefined; -}; - -/** @internal */ -export const UpdateStatusPageImageRequestBody$outboundSchema: z.ZodType< - UpdateStatusPageImageRequestBody$Outbound, - z.ZodTypeDef, - UpdateStatusPageImageRequestBody -> = z.object({ - file: z.lazy(() => UpdateStatusPageImageFile$outboundSchema).or( - blobLikeSchema, - ).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageImageRequestBody$ { - /** @deprecated use `UpdateStatusPageImageRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateStatusPageImageRequestBody$inboundSchema; - /** @deprecated use `UpdateStatusPageImageRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateStatusPageImageRequestBody$outboundSchema; - /** @deprecated use `UpdateStatusPageImageRequestBody$Outbound` instead. */ - export type Outbound = UpdateStatusPageImageRequestBody$Outbound; -} - -export function updateStatusPageImageRequestBodyToJSON( - updateStatusPageImageRequestBody: UpdateStatusPageImageRequestBody, -): string { - return JSON.stringify( - UpdateStatusPageImageRequestBody$outboundSchema.parse( - updateStatusPageImageRequestBody, - ), - ); -} - -export function updateStatusPageImageRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateStatusPageImageRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateStatusPageImageRequestBody' from JSON`, - ); -} - -/** @internal */ -export const UpdateStatusPageImageRequest$inboundSchema: z.ZodType< - UpdateStatusPageImageRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - type: z.string(), - RequestBody: z.lazy(() => UpdateStatusPageImageRequestBody$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type UpdateStatusPageImageRequest$Outbound = { - nunc_connection_id: string; - type: string; - RequestBody?: UpdateStatusPageImageRequestBody$Outbound | undefined; -}; - -/** @internal */ -export const UpdateStatusPageImageRequest$outboundSchema: z.ZodType< - UpdateStatusPageImageRequest$Outbound, - z.ZodTypeDef, - UpdateStatusPageImageRequest -> = z.object({ - nuncConnectionId: z.string(), - type: z.string(), - requestBody: z.lazy(() => UpdateStatusPageImageRequestBody$outboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageImageRequest$ { - /** @deprecated use `UpdateStatusPageImageRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateStatusPageImageRequest$inboundSchema; - /** @deprecated use `UpdateStatusPageImageRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateStatusPageImageRequest$outboundSchema; - /** @deprecated use `UpdateStatusPageImageRequest$Outbound` instead. */ - export type Outbound = UpdateStatusPageImageRequest$Outbound; -} - -export function updateStatusPageImageRequestToJSON( - updateStatusPageImageRequest: UpdateStatusPageImageRequest, -): string { - return JSON.stringify( - UpdateStatusPageImageRequest$outboundSchema.parse( - updateStatusPageImageRequest, - ), - ); -} - -export function updateStatusPageImageRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateStatusPageImageRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateStatusPageImageRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatestatuspagelink.ts b/src/models/operations/updatestatuspagelink.ts deleted file mode 100644 index 3e7eb0dc..00000000 --- a/src/models/operations/updatestatuspagelink.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateStatusPageLinkRequest = { - nuncConnectionId: string; - linkId: string; - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: - components.PatchV1NuncConnectionsNuncConnectionIdLinksLinkId; -}; - -/** @internal */ -export const UpdateStatusPageLinkRequest$inboundSchema: z.ZodType< - UpdateStatusPageLinkRequest, - z.ZodTypeDef, - unknown -> = z.object({ - nunc_connection_id: z.string(), - link_id: z.string(), - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: - components.PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$inboundSchema, -}).transform((v) => { - return remap$(v, { - "nunc_connection_id": "nuncConnectionId", - "link_id": "linkId", - }); -}); - -/** @internal */ -export type UpdateStatusPageLinkRequest$Outbound = { - nunc_connection_id: string; - link_id: string; - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: - components.PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$Outbound; -}; - -/** @internal */ -export const UpdateStatusPageLinkRequest$outboundSchema: z.ZodType< - UpdateStatusPageLinkRequest$Outbound, - z.ZodTypeDef, - UpdateStatusPageLinkRequest -> = z.object({ - nuncConnectionId: z.string(), - linkId: z.string(), - patchV1NuncConnectionsNuncConnectionIdLinksLinkId: - components.PatchV1NuncConnectionsNuncConnectionIdLinksLinkId$outboundSchema, -}).transform((v) => { - return remap$(v, { - nuncConnectionId: "nunc_connection_id", - linkId: "link_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateStatusPageLinkRequest$ { - /** @deprecated use `UpdateStatusPageLinkRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateStatusPageLinkRequest$inboundSchema; - /** @deprecated use `UpdateStatusPageLinkRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateStatusPageLinkRequest$outboundSchema; - /** @deprecated use `UpdateStatusPageLinkRequest$Outbound` instead. */ - export type Outbound = UpdateStatusPageLinkRequest$Outbound; -} - -export function updateStatusPageLinkRequestToJSON( - updateStatusPageLinkRequest: UpdateStatusPageLinkRequest, -): string { - return JSON.stringify( - UpdateStatusPageLinkRequest$outboundSchema.parse( - updateStatusPageLinkRequest, - ), - ); -} - -export function updateStatusPageLinkRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateStatusPageLinkRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateStatusPageLinkRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatestatusupdatetemplate.ts b/src/models/operations/updatestatusupdatetemplate.ts index bf63a166..300aff1b 100644 --- a/src/models/operations/updatestatusupdatetemplate.ts +++ b/src/models/operations/updatestatusupdatetemplate.ts @@ -11,8 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateStatusUpdateTemplateRequest = { statusUpdateTemplateId: string; - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: - components.PatchV1StatusUpdateTemplatesStatusUpdateTemplateId; + updateStatusUpdateTemplate: components.UpdateStatusUpdateTemplate; }; /** @internal */ @@ -22,19 +21,20 @@ export const UpdateStatusUpdateTemplateRequest$inboundSchema: z.ZodType< unknown > = z.object({ status_update_template_id: z.string(), - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: - components.PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$inboundSchema, + update_status_update_template: z.lazy(() => + components.UpdateStatusUpdateTemplate$inboundSchema + ), }).transform((v) => { return remap$(v, { "status_update_template_id": "statusUpdateTemplateId", + "update_status_update_template": "updateStatusUpdateTemplate", }); }); /** @internal */ export type UpdateStatusUpdateTemplateRequest$Outbound = { status_update_template_id: string; - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: - components.PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$Outbound; + update_status_update_template: components.UpdateStatusUpdateTemplate$Outbound; }; /** @internal */ @@ -44,12 +44,13 @@ export const UpdateStatusUpdateTemplateRequest$outboundSchema: z.ZodType< UpdateStatusUpdateTemplateRequest > = z.object({ statusUpdateTemplateId: z.string(), - patchV1StatusUpdateTemplatesStatusUpdateTemplateId: - components - .PatchV1StatusUpdateTemplatesStatusUpdateTemplateId$outboundSchema, + updateStatusUpdateTemplate: z.lazy(() => + components.UpdateStatusUpdateTemplate$outboundSchema + ), }).transform((v) => { return remap$(v, { statusUpdateTemplateId: "status_update_template_id", + updateStatusUpdateTemplate: "update_status_update_template", }); }); diff --git a/src/models/operations/updatetasklist.ts b/src/models/operations/updatetasklist.ts index ac37b2b0..0a2da5db 100644 --- a/src/models/operations/updatetasklist.ts +++ b/src/models/operations/updatetasklist.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateTaskListRequest = { taskListId: string; - patchV1TaskListsTaskListId: components.PatchV1TaskListsTaskListId; + updateTaskList: components.UpdateTaskList; }; /** @internal */ @@ -21,18 +21,18 @@ export const UpdateTaskListRequest$inboundSchema: z.ZodType< unknown > = z.object({ task_list_id: z.string(), - patchV1TaskListsTaskListId: - components.PatchV1TaskListsTaskListId$inboundSchema, + update_task_list: z.lazy(() => components.UpdateTaskList$inboundSchema), }).transform((v) => { return remap$(v, { "task_list_id": "taskListId", + "update_task_list": "updateTaskList", }); }); /** @internal */ export type UpdateTaskListRequest$Outbound = { task_list_id: string; - patchV1TaskListsTaskListId: components.PatchV1TaskListsTaskListId$Outbound; + update_task_list: components.UpdateTaskList$Outbound; }; /** @internal */ @@ -42,11 +42,11 @@ export const UpdateTaskListRequest$outboundSchema: z.ZodType< UpdateTaskListRequest > = z.object({ taskListId: z.string(), - patchV1TaskListsTaskListId: - components.PatchV1TaskListsTaskListId$outboundSchema, + updateTaskList: z.lazy(() => components.UpdateTaskList$outboundSchema), }).transform((v) => { return remap$(v, { taskListId: "task_list_id", + updateTaskList: "update_task_list", }); }); diff --git a/src/models/operations/updateteam.ts b/src/models/operations/updateteam.ts index 9c47227f..0d097849 100644 --- a/src/models/operations/updateteam.ts +++ b/src/models/operations/updateteam.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateTeamRequest = { teamId: string; - patchV1TeamsTeamId: components.PatchV1TeamsTeamId; + updateTeam: components.UpdateTeam; }; /** @internal */ @@ -21,17 +21,18 @@ export const UpdateTeamRequest$inboundSchema: z.ZodType< unknown > = z.object({ team_id: z.string(), - patchV1TeamsTeamId: components.PatchV1TeamsTeamId$inboundSchema, + update_team: z.lazy(() => components.UpdateTeam$inboundSchema), }).transform((v) => { return remap$(v, { "team_id": "teamId", + "update_team": "updateTeam", }); }); /** @internal */ export type UpdateTeamRequest$Outbound = { team_id: string; - patchV1TeamsTeamId: components.PatchV1TeamsTeamId$Outbound; + update_team: components.UpdateTeam$Outbound; }; /** @internal */ @@ -41,10 +42,11 @@ export const UpdateTeamRequest$outboundSchema: z.ZodType< UpdateTeamRequest > = z.object({ teamId: z.string(), - patchV1TeamsTeamId: components.PatchV1TeamsTeamId$outboundSchema, + updateTeam: z.lazy(() => components.UpdateTeam$outboundSchema), }).transform((v) => { return remap$(v, { teamId: "team_id", + updateTeam: "update_team", }); }); diff --git a/src/models/operations/updateteamescalationpolicy.ts b/src/models/operations/updateteamescalationpolicy.ts index b88dc0e1..6fdf8317 100644 --- a/src/models/operations/updateteamescalationpolicy.ts +++ b/src/models/operations/updateteamescalationpolicy.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateTeamEscalationPolicyRequest = { teamId: string; id: string; - patchV1TeamsTeamIdEscalationPoliciesId: - components.PatchV1TeamsTeamIdEscalationPoliciesId; + updateTeamEscalationPolicy: components.UpdateTeamEscalationPolicy; }; /** @internal */ @@ -24,11 +23,13 @@ export const UpdateTeamEscalationPolicyRequest$inboundSchema: z.ZodType< > = z.object({ team_id: z.string(), id: z.string(), - patchV1TeamsTeamIdEscalationPoliciesId: - components.PatchV1TeamsTeamIdEscalationPoliciesId$inboundSchema, + update_team_escalation_policy: z.lazy(() => + components.UpdateTeamEscalationPolicy$inboundSchema + ), }).transform((v) => { return remap$(v, { "team_id": "teamId", + "update_team_escalation_policy": "updateTeamEscalationPolicy", }); }); @@ -36,8 +37,7 @@ export const UpdateTeamEscalationPolicyRequest$inboundSchema: z.ZodType< export type UpdateTeamEscalationPolicyRequest$Outbound = { team_id: string; id: string; - patchV1TeamsTeamIdEscalationPoliciesId: - components.PatchV1TeamsTeamIdEscalationPoliciesId$Outbound; + update_team_escalation_policy: components.UpdateTeamEscalationPolicy$Outbound; }; /** @internal */ @@ -48,11 +48,13 @@ export const UpdateTeamEscalationPolicyRequest$outboundSchema: z.ZodType< > = z.object({ teamId: z.string(), id: z.string(), - patchV1TeamsTeamIdEscalationPoliciesId: - components.PatchV1TeamsTeamIdEscalationPoliciesId$outboundSchema, + updateTeamEscalationPolicy: z.lazy(() => + components.UpdateTeamEscalationPolicy$outboundSchema + ), }).transform((v) => { return remap$(v, { teamId: "team_id", + updateTeamEscalationPolicy: "update_team_escalation_policy", }); }); diff --git a/src/models/operations/updateteamoncallschedule.ts b/src/models/operations/updateteamoncallschedule.ts index ef716299..2d722906 100644 --- a/src/models/operations/updateteamoncallschedule.ts +++ b/src/models/operations/updateteamoncallschedule.ts @@ -12,8 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateTeamOnCallScheduleRequest = { teamId: string; scheduleId: string; - patchV1TeamsTeamIdOnCallSchedulesScheduleId: - components.PatchV1TeamsTeamIdOnCallSchedulesScheduleId; + updateTeamOnCallSchedule: components.UpdateTeamOnCallSchedule; }; /** @internal */ @@ -24,12 +23,14 @@ export const UpdateTeamOnCallScheduleRequest$inboundSchema: z.ZodType< > = z.object({ team_id: z.string(), schedule_id: z.string(), - patchV1TeamsTeamIdOnCallSchedulesScheduleId: - components.PatchV1TeamsTeamIdOnCallSchedulesScheduleId$inboundSchema, + update_team_on_call_schedule: z.lazy(() => + components.UpdateTeamOnCallSchedule$inboundSchema + ), }).transform((v) => { return remap$(v, { "team_id": "teamId", "schedule_id": "scheduleId", + "update_team_on_call_schedule": "updateTeamOnCallSchedule", }); }); @@ -37,8 +38,7 @@ export const UpdateTeamOnCallScheduleRequest$inboundSchema: z.ZodType< export type UpdateTeamOnCallScheduleRequest$Outbound = { team_id: string; schedule_id: string; - patchV1TeamsTeamIdOnCallSchedulesScheduleId: - components.PatchV1TeamsTeamIdOnCallSchedulesScheduleId$Outbound; + update_team_on_call_schedule: components.UpdateTeamOnCallSchedule$Outbound; }; /** @internal */ @@ -49,12 +49,14 @@ export const UpdateTeamOnCallScheduleRequest$outboundSchema: z.ZodType< > = z.object({ teamId: z.string(), scheduleId: z.string(), - patchV1TeamsTeamIdOnCallSchedulesScheduleId: - components.PatchV1TeamsTeamIdOnCallSchedulesScheduleId$outboundSchema, + updateTeamOnCallSchedule: z.lazy(() => + components.UpdateTeamOnCallSchedule$outboundSchema + ), }).transform((v) => { return remap$(v, { teamId: "team_id", scheduleId: "schedule_id", + updateTeamOnCallSchedule: "update_team_on_call_schedule", }); }); diff --git a/src/models/operations/updateteamscheduleshift.ts b/src/models/operations/updateteamscheduleshift.ts deleted file mode 100644 index b36ecd4c..00000000 --- a/src/models/operations/updateteamscheduleshift.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import * as components from "../components/index.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateTeamScheduleShiftRequest = { - id: string; - teamId: string; - scheduleId: string; - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: - components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId; -}; - -/** @internal */ -export const UpdateTeamScheduleShiftRequest$inboundSchema: z.ZodType< - UpdateTeamScheduleShiftRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - team_id: z.string(), - schedule_id: z.string(), - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: - components - .PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$inboundSchema, -}).transform((v) => { - return remap$(v, { - "team_id": "teamId", - "schedule_id": "scheduleId", - }); -}); - -/** @internal */ -export type UpdateTeamScheduleShiftRequest$Outbound = { - id: string; - team_id: string; - schedule_id: string; - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: - components.PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$Outbound; -}; - -/** @internal */ -export const UpdateTeamScheduleShiftRequest$outboundSchema: z.ZodType< - UpdateTeamScheduleShiftRequest$Outbound, - z.ZodTypeDef, - UpdateTeamScheduleShiftRequest -> = z.object({ - id: z.string(), - teamId: z.string(), - scheduleId: z.string(), - patchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId: - components - .PatchV1TeamsTeamIdOnCallSchedulesScheduleIdShiftsId$outboundSchema, -}).transform((v) => { - return remap$(v, { - teamId: "team_id", - scheduleId: "schedule_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateTeamScheduleShiftRequest$ { - /** @deprecated use `UpdateTeamScheduleShiftRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateTeamScheduleShiftRequest$inboundSchema; - /** @deprecated use `UpdateTeamScheduleShiftRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateTeamScheduleShiftRequest$outboundSchema; - /** @deprecated use `UpdateTeamScheduleShiftRequest$Outbound` instead. */ - export type Outbound = UpdateTeamScheduleShiftRequest$Outbound; -} - -export function updateTeamScheduleShiftRequestToJSON( - updateTeamScheduleShiftRequest: UpdateTeamScheduleShiftRequest, -): string { - return JSON.stringify( - UpdateTeamScheduleShiftRequest$outboundSchema.parse( - updateTeamScheduleShiftRequest, - ), - ); -} - -export function updateTeamScheduleShiftRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateTeamScheduleShiftRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateTeamScheduleShiftRequest' from JSON`, - ); -} diff --git a/src/models/operations/updateteamsignalrule.ts b/src/models/operations/updateteamsignalrule.ts index 72b74bf1..26379fe8 100644 --- a/src/models/operations/updateteamsignalrule.ts +++ b/src/models/operations/updateteamsignalrule.ts @@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateTeamSignalRuleRequest = { teamId: string; id: string; - patchV1TeamsTeamIdSignalRulesId: components.PatchV1TeamsTeamIdSignalRulesId; + updateTeamSignalRule: components.UpdateTeamSignalRule; }; /** @internal */ @@ -23,11 +23,13 @@ export const UpdateTeamSignalRuleRequest$inboundSchema: z.ZodType< > = z.object({ team_id: z.string(), id: z.string(), - patchV1TeamsTeamIdSignalRulesId: - components.PatchV1TeamsTeamIdSignalRulesId$inboundSchema, + update_team_signal_rule: z.lazy(() => + components.UpdateTeamSignalRule$inboundSchema + ), }).transform((v) => { return remap$(v, { "team_id": "teamId", + "update_team_signal_rule": "updateTeamSignalRule", }); }); @@ -35,8 +37,7 @@ export const UpdateTeamSignalRuleRequest$inboundSchema: z.ZodType< export type UpdateTeamSignalRuleRequest$Outbound = { team_id: string; id: string; - patchV1TeamsTeamIdSignalRulesId: - components.PatchV1TeamsTeamIdSignalRulesId$Outbound; + update_team_signal_rule: components.UpdateTeamSignalRule$Outbound; }; /** @internal */ @@ -47,11 +48,13 @@ export const UpdateTeamSignalRuleRequest$outboundSchema: z.ZodType< > = z.object({ teamId: z.string(), id: z.string(), - patchV1TeamsTeamIdSignalRulesId: - components.PatchV1TeamsTeamIdSignalRulesId$outboundSchema, + updateTeamSignalRule: z.lazy(() => + components.UpdateTeamSignalRule$outboundSchema + ), }).transform((v) => { return remap$(v, { teamId: "team_id", + updateTeamSignalRule: "update_team_signal_rule", }); }); diff --git a/src/models/operations/updateticket.ts b/src/models/operations/updateticket.ts index 04246c96..2fdc350d 100644 --- a/src/models/operations/updateticket.ts +++ b/src/models/operations/updateticket.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateTicketRequest = { ticketId: string; - patchV1TicketingTicketsTicketId: components.PatchV1TicketingTicketsTicketId; + updateTicket: components.UpdateTicket; }; /** @internal */ @@ -21,19 +21,18 @@ export const UpdateTicketRequest$inboundSchema: z.ZodType< unknown > = z.object({ ticket_id: z.string(), - patchV1TicketingTicketsTicketId: - components.PatchV1TicketingTicketsTicketId$inboundSchema, + update_ticket: z.lazy(() => components.UpdateTicket$inboundSchema), }).transform((v) => { return remap$(v, { "ticket_id": "ticketId", + "update_ticket": "updateTicket", }); }); /** @internal */ export type UpdateTicketRequest$Outbound = { ticket_id: string; - patchV1TicketingTicketsTicketId: - components.PatchV1TicketingTicketsTicketId$Outbound; + update_ticket: components.UpdateTicket$Outbound; }; /** @internal */ @@ -43,11 +42,11 @@ export const UpdateTicketRequest$outboundSchema: z.ZodType< UpdateTicketRequest > = z.object({ ticketId: z.string(), - patchV1TicketingTicketsTicketId: - components.PatchV1TicketingTicketsTicketId$outboundSchema, + updateTicket: z.lazy(() => components.UpdateTicket$outboundSchema), }).transform((v) => { return remap$(v, { ticketId: "ticket_id", + updateTicket: "update_ticket", }); }); diff --git a/src/models/operations/updateticketingfieldmap.ts b/src/models/operations/updateticketingfieldmap.ts new file mode 100644 index 00000000..01fb7679 --- /dev/null +++ b/src/models/operations/updateticketingfieldmap.ts @@ -0,0 +1,83 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateTicketingFieldMapRequest = { + mapId: string; + ticketingProjectId: string; +}; + +/** @internal */ +export const UpdateTicketingFieldMapRequest$inboundSchema: z.ZodType< + UpdateTicketingFieldMapRequest, + z.ZodTypeDef, + unknown +> = z.object({ + map_id: z.string(), + ticketing_project_id: z.string(), +}).transform((v) => { + return remap$(v, { + "map_id": "mapId", + "ticketing_project_id": "ticketingProjectId", + }); +}); + +/** @internal */ +export type UpdateTicketingFieldMapRequest$Outbound = { + map_id: string; + ticketing_project_id: string; +}; + +/** @internal */ +export const UpdateTicketingFieldMapRequest$outboundSchema: z.ZodType< + UpdateTicketingFieldMapRequest$Outbound, + z.ZodTypeDef, + UpdateTicketingFieldMapRequest +> = z.object({ + mapId: z.string(), + ticketingProjectId: z.string(), +}).transform((v) => { + return remap$(v, { + mapId: "map_id", + ticketingProjectId: "ticketing_project_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTicketingFieldMapRequest$ { + /** @deprecated use `UpdateTicketingFieldMapRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateTicketingFieldMapRequest$inboundSchema; + /** @deprecated use `UpdateTicketingFieldMapRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateTicketingFieldMapRequest$outboundSchema; + /** @deprecated use `UpdateTicketingFieldMapRequest$Outbound` instead. */ + export type Outbound = UpdateTicketingFieldMapRequest$Outbound; +} + +export function updateTicketingFieldMapRequestToJSON( + updateTicketingFieldMapRequest: UpdateTicketingFieldMapRequest, +): string { + return JSON.stringify( + UpdateTicketingFieldMapRequest$outboundSchema.parse( + updateTicketingFieldMapRequest, + ), + ); +} + +export function updateTicketingFieldMapRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateTicketingFieldMapRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTicketingFieldMapRequest' from JSON`, + ); +} diff --git a/src/models/operations/updateticketingpriority.ts b/src/models/operations/updateticketingpriority.ts index 8480389f..357c67a5 100644 --- a/src/models/operations/updateticketingpriority.ts +++ b/src/models/operations/updateticketingpriority.ts @@ -3,6 +3,7 @@ */ import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; @@ -10,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateTicketingPriorityRequest = { id: string; - patchV1TicketingPrioritiesId: components.PatchV1TicketingPrioritiesId; + updateTicketingPriority: components.UpdateTicketingPriority; }; /** @internal */ @@ -20,15 +21,19 @@ export const UpdateTicketingPriorityRequest$inboundSchema: z.ZodType< unknown > = z.object({ id: z.string(), - patchV1TicketingPrioritiesId: - components.PatchV1TicketingPrioritiesId$inboundSchema, + update_ticketing_priority: z.lazy(() => + components.UpdateTicketingPriority$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "update_ticketing_priority": "updateTicketingPriority", + }); }); /** @internal */ export type UpdateTicketingPriorityRequest$Outbound = { id: string; - patchV1TicketingPrioritiesId: - components.PatchV1TicketingPrioritiesId$Outbound; + update_ticketing_priority: components.UpdateTicketingPriority$Outbound; }; /** @internal */ @@ -38,8 +43,13 @@ export const UpdateTicketingPriorityRequest$outboundSchema: z.ZodType< UpdateTicketingPriorityRequest > = z.object({ id: z.string(), - patchV1TicketingPrioritiesId: - components.PatchV1TicketingPrioritiesId$outboundSchema, + updateTicketingPriority: z.lazy(() => + components.UpdateTicketingPriority$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + updateTicketingPriority: "update_ticketing_priority", + }); }); /** diff --git a/src/models/operations/updateticketingprojectfieldmap.ts b/src/models/operations/updateticketingprojectfieldmap.ts deleted file mode 100644 index a2753c93..00000000 --- a/src/models/operations/updateticketingprojectfieldmap.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type UpdateTicketingProjectFieldMapRequest = { - mapId: string; - ticketingProjectId: string; -}; - -/** @internal */ -export const UpdateTicketingProjectFieldMapRequest$inboundSchema: z.ZodType< - UpdateTicketingProjectFieldMapRequest, - z.ZodTypeDef, - unknown -> = z.object({ - map_id: z.string(), - ticketing_project_id: z.string(), -}).transform((v) => { - return remap$(v, { - "map_id": "mapId", - "ticketing_project_id": "ticketingProjectId", - }); -}); - -/** @internal */ -export type UpdateTicketingProjectFieldMapRequest$Outbound = { - map_id: string; - ticketing_project_id: string; -}; - -/** @internal */ -export const UpdateTicketingProjectFieldMapRequest$outboundSchema: z.ZodType< - UpdateTicketingProjectFieldMapRequest$Outbound, - z.ZodTypeDef, - UpdateTicketingProjectFieldMapRequest -> = z.object({ - mapId: z.string(), - ticketingProjectId: z.string(), -}).transform((v) => { - return remap$(v, { - mapId: "map_id", - ticketingProjectId: "ticketing_project_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateTicketingProjectFieldMapRequest$ { - /** @deprecated use `UpdateTicketingProjectFieldMapRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateTicketingProjectFieldMapRequest$inboundSchema; - /** @deprecated use `UpdateTicketingProjectFieldMapRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateTicketingProjectFieldMapRequest$outboundSchema; - /** @deprecated use `UpdateTicketingProjectFieldMapRequest$Outbound` instead. */ - export type Outbound = UpdateTicketingProjectFieldMapRequest$Outbound; -} - -export function updateTicketingProjectFieldMapRequestToJSON( - updateTicketingProjectFieldMapRequest: UpdateTicketingProjectFieldMapRequest, -): string { - return JSON.stringify( - UpdateTicketingProjectFieldMapRequest$outboundSchema.parse( - updateTicketingProjectFieldMapRequest, - ), - ); -} - -export function updateTicketingProjectFieldMapRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - UpdateTicketingProjectFieldMapRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateTicketingProjectFieldMapRequest' from JSON`, - ); -} diff --git a/src/models/operations/updatetranscriptattribution.ts b/src/models/operations/updatetranscriptattribution.ts new file mode 100644 index 00000000..2a985b0d --- /dev/null +++ b/src/models/operations/updatetranscriptattribution.ts @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateTranscriptAttributionRequestBody = { + /** + * The speaker to attribute the transcript to. + */ + fromSpeaker?: string | null | undefined; + /** + * The user to attribute the transcript to. + */ + fromUserId?: string | null | undefined; + /** + * The ID of the user to attribute the transcript to. + */ + toUserId: string; + /** + * The ID of the specific transcript entry to change attribution for. + */ + transcriptId?: string | null | undefined; + /** + * The ID of the conference bridge to attribute the transcript to. + */ + conferenceBridgeId?: string | null | undefined; +}; + +export type UpdateTranscriptAttributionRequest = { + incidentId: string; + requestBody: UpdateTranscriptAttributionRequestBody; +}; + +/** @internal */ +export const UpdateTranscriptAttributionRequestBody$inboundSchema: z.ZodType< + UpdateTranscriptAttributionRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + from_speaker: z.nullable(z.string()).optional(), + from_user_id: z.nullable(z.string()).optional(), + to_user_id: z.string(), + transcript_id: z.nullable(z.string()).optional(), + conference_bridge_id: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + "from_speaker": "fromSpeaker", + "from_user_id": "fromUserId", + "to_user_id": "toUserId", + "transcript_id": "transcriptId", + "conference_bridge_id": "conferenceBridgeId", + }); +}); + +/** @internal */ +export type UpdateTranscriptAttributionRequestBody$Outbound = { + from_speaker?: string | null | undefined; + from_user_id?: string | null | undefined; + to_user_id: string; + transcript_id?: string | null | undefined; + conference_bridge_id?: string | null | undefined; +}; + +/** @internal */ +export const UpdateTranscriptAttributionRequestBody$outboundSchema: z.ZodType< + UpdateTranscriptAttributionRequestBody$Outbound, + z.ZodTypeDef, + UpdateTranscriptAttributionRequestBody +> = z.object({ + fromSpeaker: z.nullable(z.string()).optional(), + fromUserId: z.nullable(z.string()).optional(), + toUserId: z.string(), + transcriptId: z.nullable(z.string()).optional(), + conferenceBridgeId: z.nullable(z.string()).optional(), +}).transform((v) => { + return remap$(v, { + fromSpeaker: "from_speaker", + fromUserId: "from_user_id", + toUserId: "to_user_id", + transcriptId: "transcript_id", + conferenceBridgeId: "conference_bridge_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTranscriptAttributionRequestBody$ { + /** @deprecated use `UpdateTranscriptAttributionRequestBody$inboundSchema` instead. */ + export const inboundSchema = + UpdateTranscriptAttributionRequestBody$inboundSchema; + /** @deprecated use `UpdateTranscriptAttributionRequestBody$outboundSchema` instead. */ + export const outboundSchema = + UpdateTranscriptAttributionRequestBody$outboundSchema; + /** @deprecated use `UpdateTranscriptAttributionRequestBody$Outbound` instead. */ + export type Outbound = UpdateTranscriptAttributionRequestBody$Outbound; +} + +export function updateTranscriptAttributionRequestBodyToJSON( + updateTranscriptAttributionRequestBody: + UpdateTranscriptAttributionRequestBody, +): string { + return JSON.stringify( + UpdateTranscriptAttributionRequestBody$outboundSchema.parse( + updateTranscriptAttributionRequestBody, + ), + ); +} + +export function updateTranscriptAttributionRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateTranscriptAttributionRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTranscriptAttributionRequestBody' from JSON`, + ); +} + +/** @internal */ +export const UpdateTranscriptAttributionRequest$inboundSchema: z.ZodType< + UpdateTranscriptAttributionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + RequestBody: z.lazy(() => + UpdateTranscriptAttributionRequestBody$inboundSchema + ), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type UpdateTranscriptAttributionRequest$Outbound = { + incident_id: string; + RequestBody: UpdateTranscriptAttributionRequestBody$Outbound; +}; + +/** @internal */ +export const UpdateTranscriptAttributionRequest$outboundSchema: z.ZodType< + UpdateTranscriptAttributionRequest$Outbound, + z.ZodTypeDef, + UpdateTranscriptAttributionRequest +> = z.object({ + incidentId: z.string(), + requestBody: z.lazy(() => + UpdateTranscriptAttributionRequestBody$outboundSchema + ), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateTranscriptAttributionRequest$ { + /** @deprecated use `UpdateTranscriptAttributionRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateTranscriptAttributionRequest$inboundSchema; + /** @deprecated use `UpdateTranscriptAttributionRequest$outboundSchema` instead. */ + export const outboundSchema = + UpdateTranscriptAttributionRequest$outboundSchema; + /** @deprecated use `UpdateTranscriptAttributionRequest$Outbound` instead. */ + export type Outbound = UpdateTranscriptAttributionRequest$Outbound; +} + +export function updateTranscriptAttributionRequestToJSON( + updateTranscriptAttributionRequest: UpdateTranscriptAttributionRequest, +): string { + return JSON.stringify( + UpdateTranscriptAttributionRequest$outboundSchema.parse( + updateTranscriptAttributionRequest, + ), + ); +} + +export function updateTranscriptAttributionRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + UpdateTranscriptAttributionRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateTranscriptAttributionRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatevote.ts b/src/models/operations/updatevote.ts new file mode 100644 index 00000000..6da85190 --- /dev/null +++ b/src/models/operations/updatevote.ts @@ -0,0 +1,88 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type UpdateVoteRequest = { + incidentId: string; + eventId: string; + updateVote: components.UpdateVote; +}; + +/** @internal */ +export const UpdateVoteRequest$inboundSchema: z.ZodType< + UpdateVoteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + event_id: z.string(), + update_vote: z.lazy(() => components.UpdateVote$inboundSchema), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "event_id": "eventId", + "update_vote": "updateVote", + }); +}); + +/** @internal */ +export type UpdateVoteRequest$Outbound = { + incident_id: string; + event_id: string; + update_vote: components.UpdateVote$Outbound; +}; + +/** @internal */ +export const UpdateVoteRequest$outboundSchema: z.ZodType< + UpdateVoteRequest$Outbound, + z.ZodTypeDef, + UpdateVoteRequest +> = z.object({ + incidentId: z.string(), + eventId: z.string(), + updateVote: z.lazy(() => components.UpdateVote$outboundSchema), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + eventId: "event_id", + updateVote: "update_vote", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateVoteRequest$ { + /** @deprecated use `UpdateVoteRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateVoteRequest$inboundSchema; + /** @deprecated use `UpdateVoteRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateVoteRequest$outboundSchema; + /** @deprecated use `UpdateVoteRequest$Outbound` instead. */ + export type Outbound = UpdateVoteRequest$Outbound; +} + +export function updateVoteRequestToJSON( + updateVoteRequest: UpdateVoteRequest, +): string { + return JSON.stringify( + UpdateVoteRequest$outboundSchema.parse(updateVoteRequest), + ); +} + +export function updateVoteRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => UpdateVoteRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'UpdateVoteRequest' from JSON`, + ); +} diff --git a/src/models/operations/updatewebhook.ts b/src/models/operations/updatewebhook.ts index 0a7223dd..88142f62 100644 --- a/src/models/operations/updatewebhook.ts +++ b/src/models/operations/updatewebhook.ts @@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateWebhookRequest = { webhookId: string; - patchV1WebhooksWebhookId: components.PatchV1WebhooksWebhookId; + updateWebhook: components.UpdateWebhook; }; /** @internal */ @@ -21,17 +21,18 @@ export const UpdateWebhookRequest$inboundSchema: z.ZodType< unknown > = z.object({ webhook_id: z.string(), - patchV1WebhooksWebhookId: components.PatchV1WebhooksWebhookId$inboundSchema, + update_webhook: z.lazy(() => components.UpdateWebhook$inboundSchema), }).transform((v) => { return remap$(v, { "webhook_id": "webhookId", + "update_webhook": "updateWebhook", }); }); /** @internal */ export type UpdateWebhookRequest$Outbound = { webhook_id: string; - patchV1WebhooksWebhookId: components.PatchV1WebhooksWebhookId$Outbound; + update_webhook: components.UpdateWebhook$Outbound; }; /** @internal */ @@ -41,10 +42,11 @@ export const UpdateWebhookRequest$outboundSchema: z.ZodType< UpdateWebhookRequest > = z.object({ webhookId: z.string(), - patchV1WebhooksWebhookId: components.PatchV1WebhooksWebhookId$outboundSchema, + updateWebhook: z.lazy(() => components.UpdateWebhook$outboundSchema), }).transform((v) => { return remap$(v, { webhookId: "webhook_id", + updateWebhook: "update_webhook", }); }); diff --git a/src/models/operations/voteaiincidentsummary.ts b/src/models/operations/voteaiincidentsummary.ts new file mode 100644 index 00000000..20544de7 --- /dev/null +++ b/src/models/operations/voteaiincidentsummary.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const Direction = { + Up: "up", + Down: "down", +} as const; +export type Direction = ClosedEnum; + +export type VoteAiIncidentSummaryRequestBody = { + direction: Direction; +}; + +export type VoteAiIncidentSummaryRequest = { + incidentId: string; + generatedSummaryId: string; + requestBody: VoteAiIncidentSummaryRequestBody; +}; + +/** @internal */ +export const Direction$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Direction); + +/** @internal */ +export const Direction$outboundSchema: z.ZodNativeEnum = + Direction$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Direction$ { + /** @deprecated use `Direction$inboundSchema` instead. */ + export const inboundSchema = Direction$inboundSchema; + /** @deprecated use `Direction$outboundSchema` instead. */ + export const outboundSchema = Direction$outboundSchema; +} + +/** @internal */ +export const VoteAiIncidentSummaryRequestBody$inboundSchema: z.ZodType< + VoteAiIncidentSummaryRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + direction: Direction$inboundSchema, +}); + +/** @internal */ +export type VoteAiIncidentSummaryRequestBody$Outbound = { + direction: string; +}; + +/** @internal */ +export const VoteAiIncidentSummaryRequestBody$outboundSchema: z.ZodType< + VoteAiIncidentSummaryRequestBody$Outbound, + z.ZodTypeDef, + VoteAiIncidentSummaryRequestBody +> = z.object({ + direction: Direction$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace VoteAiIncidentSummaryRequestBody$ { + /** @deprecated use `VoteAiIncidentSummaryRequestBody$inboundSchema` instead. */ + export const inboundSchema = VoteAiIncidentSummaryRequestBody$inboundSchema; + /** @deprecated use `VoteAiIncidentSummaryRequestBody$outboundSchema` instead. */ + export const outboundSchema = VoteAiIncidentSummaryRequestBody$outboundSchema; + /** @deprecated use `VoteAiIncidentSummaryRequestBody$Outbound` instead. */ + export type Outbound = VoteAiIncidentSummaryRequestBody$Outbound; +} + +export function voteAiIncidentSummaryRequestBodyToJSON( + voteAiIncidentSummaryRequestBody: VoteAiIncidentSummaryRequestBody, +): string { + return JSON.stringify( + VoteAiIncidentSummaryRequestBody$outboundSchema.parse( + voteAiIncidentSummaryRequestBody, + ), + ); +} + +export function voteAiIncidentSummaryRequestBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VoteAiIncidentSummaryRequestBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VoteAiIncidentSummaryRequestBody' from JSON`, + ); +} + +/** @internal */ +export const VoteAiIncidentSummaryRequest$inboundSchema: z.ZodType< + VoteAiIncidentSummaryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + generated_summary_id: z.string(), + RequestBody: z.lazy(() => VoteAiIncidentSummaryRequestBody$inboundSchema), +}).transform((v) => { + return remap$(v, { + "incident_id": "incidentId", + "generated_summary_id": "generatedSummaryId", + "RequestBody": "requestBody", + }); +}); + +/** @internal */ +export type VoteAiIncidentSummaryRequest$Outbound = { + incident_id: string; + generated_summary_id: string; + RequestBody: VoteAiIncidentSummaryRequestBody$Outbound; +}; + +/** @internal */ +export const VoteAiIncidentSummaryRequest$outboundSchema: z.ZodType< + VoteAiIncidentSummaryRequest$Outbound, + z.ZodTypeDef, + VoteAiIncidentSummaryRequest +> = z.object({ + incidentId: z.string(), + generatedSummaryId: z.string(), + requestBody: z.lazy(() => VoteAiIncidentSummaryRequestBody$outboundSchema), +}).transform((v) => { + return remap$(v, { + incidentId: "incident_id", + generatedSummaryId: "generated_summary_id", + requestBody: "RequestBody", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace VoteAiIncidentSummaryRequest$ { + /** @deprecated use `VoteAiIncidentSummaryRequest$inboundSchema` instead. */ + export const inboundSchema = VoteAiIncidentSummaryRequest$inboundSchema; + /** @deprecated use `VoteAiIncidentSummaryRequest$outboundSchema` instead. */ + export const outboundSchema = VoteAiIncidentSummaryRequest$outboundSchema; + /** @deprecated use `VoteAiIncidentSummaryRequest$Outbound` instead. */ + export type Outbound = VoteAiIncidentSummaryRequest$Outbound; +} + +export function voteAiIncidentSummaryRequestToJSON( + voteAiIncidentSummaryRequest: VoteAiIncidentSummaryRequest, +): string { + return JSON.stringify( + VoteAiIncidentSummaryRequest$outboundSchema.parse( + voteAiIncidentSummaryRequest, + ), + ); +} + +export function voteAiIncidentSummaryRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VoteAiIncidentSummaryRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VoteAiIncidentSummaryRequest' from JSON`, + ); +} diff --git a/src/models/operations/voteonincidentsummary.ts b/src/models/operations/voteonincidentsummary.ts deleted file mode 100644 index e7d48c72..00000000 --- a/src/models/operations/voteonincidentsummary.ts +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export const Direction = { - Up: "up", - Down: "down", -} as const; -export type Direction = ClosedEnum; - -export type VoteOnIncidentSummaryRequestBody = { - direction: Direction; -}; - -export type VoteOnIncidentSummaryRequest = { - incidentId: string; - generatedSummaryId: string; - requestBody: VoteOnIncidentSummaryRequestBody; -}; - -/** @internal */ -export const Direction$inboundSchema: z.ZodNativeEnum = z - .nativeEnum(Direction); - -/** @internal */ -export const Direction$outboundSchema: z.ZodNativeEnum = - Direction$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Direction$ { - /** @deprecated use `Direction$inboundSchema` instead. */ - export const inboundSchema = Direction$inboundSchema; - /** @deprecated use `Direction$outboundSchema` instead. */ - export const outboundSchema = Direction$outboundSchema; -} - -/** @internal */ -export const VoteOnIncidentSummaryRequestBody$inboundSchema: z.ZodType< - VoteOnIncidentSummaryRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - direction: Direction$inboundSchema, -}); - -/** @internal */ -export type VoteOnIncidentSummaryRequestBody$Outbound = { - direction: string; -}; - -/** @internal */ -export const VoteOnIncidentSummaryRequestBody$outboundSchema: z.ZodType< - VoteOnIncidentSummaryRequestBody$Outbound, - z.ZodTypeDef, - VoteOnIncidentSummaryRequestBody -> = z.object({ - direction: Direction$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VoteOnIncidentSummaryRequestBody$ { - /** @deprecated use `VoteOnIncidentSummaryRequestBody$inboundSchema` instead. */ - export const inboundSchema = VoteOnIncidentSummaryRequestBody$inboundSchema; - /** @deprecated use `VoteOnIncidentSummaryRequestBody$outboundSchema` instead. */ - export const outboundSchema = VoteOnIncidentSummaryRequestBody$outboundSchema; - /** @deprecated use `VoteOnIncidentSummaryRequestBody$Outbound` instead. */ - export type Outbound = VoteOnIncidentSummaryRequestBody$Outbound; -} - -export function voteOnIncidentSummaryRequestBodyToJSON( - voteOnIncidentSummaryRequestBody: VoteOnIncidentSummaryRequestBody, -): string { - return JSON.stringify( - VoteOnIncidentSummaryRequestBody$outboundSchema.parse( - voteOnIncidentSummaryRequestBody, - ), - ); -} - -export function voteOnIncidentSummaryRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => VoteOnIncidentSummaryRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'VoteOnIncidentSummaryRequestBody' from JSON`, - ); -} - -/** @internal */ -export const VoteOnIncidentSummaryRequest$inboundSchema: z.ZodType< - VoteOnIncidentSummaryRequest, - z.ZodTypeDef, - unknown -> = z.object({ - incident_id: z.string(), - generated_summary_id: z.string(), - RequestBody: z.lazy(() => VoteOnIncidentSummaryRequestBody$inboundSchema), -}).transform((v) => { - return remap$(v, { - "incident_id": "incidentId", - "generated_summary_id": "generatedSummaryId", - "RequestBody": "requestBody", - }); -}); - -/** @internal */ -export type VoteOnIncidentSummaryRequest$Outbound = { - incident_id: string; - generated_summary_id: string; - RequestBody: VoteOnIncidentSummaryRequestBody$Outbound; -}; - -/** @internal */ -export const VoteOnIncidentSummaryRequest$outboundSchema: z.ZodType< - VoteOnIncidentSummaryRequest$Outbound, - z.ZodTypeDef, - VoteOnIncidentSummaryRequest -> = z.object({ - incidentId: z.string(), - generatedSummaryId: z.string(), - requestBody: z.lazy(() => VoteOnIncidentSummaryRequestBody$outboundSchema), -}).transform((v) => { - return remap$(v, { - incidentId: "incident_id", - generatedSummaryId: "generated_summary_id", - requestBody: "RequestBody", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace VoteOnIncidentSummaryRequest$ { - /** @deprecated use `VoteOnIncidentSummaryRequest$inboundSchema` instead. */ - export const inboundSchema = VoteOnIncidentSummaryRequest$inboundSchema; - /** @deprecated use `VoteOnIncidentSummaryRequest$outboundSchema` instead. */ - export const outboundSchema = VoteOnIncidentSummaryRequest$outboundSchema; - /** @deprecated use `VoteOnIncidentSummaryRequest$Outbound` instead. */ - export type Outbound = VoteOnIncidentSummaryRequest$Outbound; -} - -export function voteOnIncidentSummaryRequestToJSON( - voteOnIncidentSummaryRequest: VoteOnIncidentSummaryRequest, -): string { - return JSON.stringify( - VoteOnIncidentSummaryRequest$outboundSchema.parse( - voteOnIncidentSummaryRequest, - ), - ); -} - -export function voteOnIncidentSummaryRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => VoteOnIncidentSummaryRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'VoteOnIncidentSummaryRequest' from JSON`, - ); -} diff --git a/src/sdk/accountsettings.ts b/src/sdk/accountsettings.ts index 822762a3..b85bcf24 100644 --- a/src/sdk/accountsettings.ts +++ b/src/sdk/accountsettings.ts @@ -2,15 +2,12 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { accountSettingsDeleteSavedSearch } from "../funcs/accountSettingsDeleteSavedSearch.js"; import { accountSettingsGetAiPreferences } from "../funcs/accountSettingsGetAiPreferences.js"; import { accountSettingsGetBootstrap } from "../funcs/accountSettingsGetBootstrap.js"; -import { accountSettingsGetSavedSearch } from "../funcs/accountSettingsGetSavedSearch.js"; import { accountSettingsListEntitlements } from "../funcs/accountSettingsListEntitlements.js"; import { accountSettingsPing } from "../funcs/accountSettingsPing.js"; +import { accountSettingsPingNoauth } from "../funcs/accountSettingsPingNoauth.js"; import { accountSettingsUpdateAiPreferences } from "../funcs/accountSettingsUpdateAiPreferences.js"; -import { accountSettingsUpdateSavedSearch } from "../funcs/accountSettingsUpdateSavedSearch.js"; -import { accountSettingsVoteOnIncidentSummary } from "../funcs/accountSettingsVoteOnIncidentSummary.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -18,58 +15,15 @@ import { unwrapAsync } from "../types/fp.js"; export class AccountSettings extends ClientSDK { /** - * Get AI preferences - * - * @remarks - * Retrieves the current AI preferences - */ - async getAiPreferences( - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountSettingsGetAiPreferences( - this, - options, - )); - } - - /** - * Update AI preferences + * Check API connectivity * * @remarks - * Updates the AI preferences - */ - async updateAiPreferences( - request?: operations.UpdateAiPreferencesRequestBody | undefined, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountSettingsUpdateAiPreferences( - this, - request, - options, - )); - } - - /** - * Vote on an AI-generated incident summary - */ - async voteOnIncidentSummary( - request: operations.VoteOnIncidentSummaryRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(accountSettingsVoteOnIncidentSummary( - this, - request, - options, - )); - } - - /** - * Get initial application configuration and settings + * Simple endpoint to verify your API connection is working */ - async getBootstrap( + async ping( options?: RequestOptions, - ): Promise { - return unwrapAsync(accountSettingsGetBootstrap( + ): Promise { + return unwrapAsync(accountSettingsPing( this, options, )); @@ -79,7 +33,7 @@ export class AccountSettings extends ClientSDK { * List entitlements * * @remarks - * Retrieve all entitlements + * List the organization's entitlements */ async listEntitlements( request: operations.ListEntitlementsRequest, @@ -98,60 +52,56 @@ export class AccountSettings extends ClientSDK { * @remarks * Simple endpoint to verify your API connection is working */ - async ping( + async pingNoauth( options?: RequestOptions, ): Promise { - return unwrapAsync(accountSettingsPing( + return unwrapAsync(accountSettingsPingNoauth( this, options, )); } /** - * Get a saved search + * Get initial application configuration * * @remarks - * Retrieve a specific save search + * Get initial application configuration */ - async getSavedSearch( - request: operations.GetSavedSearchRequest, + async getBootstrap( options?: RequestOptions, - ): Promise { - return unwrapAsync(accountSettingsGetSavedSearch( + ): Promise { + return unwrapAsync(accountSettingsGetBootstrap( this, - request, options, )); } /** - * Delete a saved search + * Get AI preferences * * @remarks - * Delete a specific saved search + * Retrieves the current AI preferences */ - async deleteSavedSearch( - request: operations.DeleteSavedSearchRequest, + async getAiPreferences( options?: RequestOptions, - ): Promise { - return unwrapAsync(accountSettingsDeleteSavedSearch( + ): Promise { + return unwrapAsync(accountSettingsGetAiPreferences( this, - request, options, )); } /** - * Update a saved search + * Update AI preferences * * @remarks - * Update a specific saved search + * Updates the AI preferences */ - async updateSavedSearch( - request: operations.UpdateSavedSearchRequest, + async updateAiPreferences( + request?: operations.UpdateAiPreferencesRequest | undefined, options?: RequestOptions, - ): Promise { - return unwrapAsync(accountSettingsUpdateSavedSearch( + ): Promise { + return unwrapAsync(accountSettingsUpdateAiPreferences( this, request, options, diff --git a/src/sdk/alerts.ts b/src/sdk/alerts.ts index 774947ab..89b4f2d5 100644 --- a/src/sdk/alerts.ts +++ b/src/sdk/alerts.ts @@ -2,11 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { alertsCreate } from "../funcs/alertsCreate.js"; -import { alertsGet } from "../funcs/alertsGet.js"; -import { alertsList } from "../funcs/alertsList.js"; -import { alertsListForIncident } from "../funcs/alertsListForIncident.js"; -import { alertsListProcessingLogs } from "../funcs/alertsListProcessingLogs.js"; +import { alertsCreateIncidentAlert } from "../funcs/alertsCreateIncidentAlert.js"; +import { alertsDeleteIncidentAlert } from "../funcs/alertsDeleteIncidentAlert.js"; +import { alertsGetAlert } from "../funcs/alertsGetAlert.js"; +import { alertsListAlerts } from "../funcs/alertsListAlerts.js"; +import { alertsListIncidentAlerts } from "../funcs/alertsListIncidentAlerts.js"; +import { alertsListProcessingLogEntries } from "../funcs/alertsListProcessingLogEntries.js"; +import { alertsUpdateIncidentAlertPrimary } from "../funcs/alertsUpdateIncidentAlertPrimary.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -14,16 +16,16 @@ import { unwrapAsync } from "../types/fp.js"; export class Alerts extends ClientSDK { /** - * List alerts + * List alerts for an incident * * @remarks - * Retrieve all alerts from third parties + * List alerts that have been attached to an incident */ - async list( - request: operations.ListAlertsRequest, + async listIncidentAlerts( + request: operations.ListIncidentAlertsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(alertsList( + ): Promise { + return unwrapAsync(alertsListIncidentAlerts( this, request, options, @@ -31,16 +33,16 @@ export class Alerts extends ClientSDK { } /** - * Get an alert + * Attach an alert to an incident * * @remarks - * Retrieve a single alert + * Add an alert to an incident. FireHydrant needs to have ingested the alert from a third party system in order to attach it to the incident. */ - async get( - request: operations.GetAlertRequest, + async createIncidentAlert( + request: operations.CreateIncidentAlertRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(alertsGet( + ): Promise { + return unwrapAsync(alertsCreateIncidentAlert( this, request, options, @@ -48,16 +50,16 @@ export class Alerts extends ClientSDK { } /** - * List alerts for an incident + * Set an alert as primary for an incident * * @remarks - * List alerts that have been attached to an incident + * Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. */ - async listForIncident( - request: operations.ListIncidentAlertsRequest, + async updateIncidentAlertPrimary( + request: operations.UpdateIncidentAlertPrimaryRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(alertsListForIncident( + ): Promise { + return unwrapAsync(alertsUpdateIncidentAlertPrimary( this, request, options, @@ -65,16 +67,50 @@ export class Alerts extends ClientSDK { } /** - * Attach alerts to an incident + * Remove an alert from an incident * * @remarks - * Add an alert to an incident. FireHydrant needs to have ingested the alert from a third party system in order to attach it to the incident. + * Remove an alert from an incident */ - async create( - request: operations.CreateIncidentAlertsRequest, + async deleteIncidentAlert( + request: operations.DeleteIncidentAlertRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(alertsCreate( + return unwrapAsync(alertsDeleteIncidentAlert( + this, + request, + options, + )); + } + + /** + * List alerts + * + * @remarks + * Retrieve all alerts from third parties + */ + async listAlerts( + request: operations.ListAlertsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(alertsListAlerts( + this, + request, + options, + )); + } + + /** + * Get an alert + * + * @remarks + * Retrieve a single alert + */ + async getAlert( + request: operations.GetAlertRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(alertsGetAlert( this, request, options, @@ -87,11 +123,11 @@ export class Alerts extends ClientSDK { * @remarks * Processing Log Entries for a specific alert */ - async listProcessingLogs( - request: operations.ListAlertProcessingLogsRequest, + async listProcessingLogEntries( + request: operations.ListProcessingLogEntriesRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(alertsListProcessingLogs( + return unwrapAsync(alertsListProcessingLogEntries( this, request, options, diff --git a/src/sdk/audiences.ts b/src/sdk/audiences.ts new file mode 100644 index 00000000..f44034b1 --- /dev/null +++ b/src/sdk/audiences.ts @@ -0,0 +1,208 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { audiencesArchiveAudience } from "../funcs/audiencesArchiveAudience.js"; +import { audiencesCreateAudience } from "../funcs/audiencesCreateAudience.js"; +import { audiencesGenerateAudienceSummary } from "../funcs/audiencesGenerateAudienceSummary.js"; +import { audiencesGetAudience } from "../funcs/audiencesGetAudience.js"; +import { audiencesGetAudienceSummary } from "../funcs/audiencesGetAudienceSummary.js"; +import { audiencesGetMemberDefaultAudience } from "../funcs/audiencesGetMemberDefaultAudience.js"; +import { audiencesListAudiences } from "../funcs/audiencesListAudiences.js"; +import { audiencesListAudienceSummaries } from "../funcs/audiencesListAudienceSummaries.js"; +import { audiencesRestoreAudience } from "../funcs/audiencesRestoreAudience.js"; +import { audiencesSetMemberDefaultAudience } from "../funcs/audiencesSetMemberDefaultAudience.js"; +import { audiencesUpdateAudience } from "../funcs/audiencesUpdateAudience.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Audiences extends ClientSDK { + /** + * List audiences + * + * @remarks + * List all audiences + */ + async listAudiences( + request: operations.ListAudiencesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesListAudiences( + this, + request, + options, + )); + } + + /** + * Create audience + * + * @remarks + * Create a new audience + */ + async createAudience( + request: operations.CreateAudienceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesCreateAudience( + this, + request, + options, + )); + } + + /** + * Get audience + * + * @remarks + * Get audience details + */ + async getAudience( + request: operations.GetAudienceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesGetAudience( + this, + request, + options, + )); + } + + /** + * Archive audience + * + * @remarks + * Archive an audience + */ + async archiveAudience( + request: operations.ArchiveAudienceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesArchiveAudience( + this, + request, + options, + )); + } + + /** + * Update audience + * + * @remarks + * Update an existing audience + */ + async updateAudience( + request: operations.UpdateAudienceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesUpdateAudience( + this, + request, + options, + )); + } + + /** + * Restore audience + * + * @remarks + * Restore a previously archived audience + */ + async restoreAudience( + request: operations.RestoreAudienceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesRestoreAudience( + this, + request, + options, + )); + } + + /** + * Get default audience + * + * @remarks + * Get member's default audience + */ + async getMemberDefaultAudience( + request: operations.GetMemberDefaultAudienceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesGetMemberDefaultAudience( + this, + request, + options, + )); + } + + /** + * Set default audience + * + * @remarks + * Set member's default audience + */ + async setMemberDefaultAudience( + request: operations.SetMemberDefaultAudienceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesSetMemberDefaultAudience( + this, + request, + options, + )); + } + + /** + * Get latest summary + * + * @remarks + * Get the latest audience-specific summary for an incident + */ + async getAudienceSummary( + request: operations.GetAudienceSummaryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesGetAudienceSummary( + this, + request, + options, + )); + } + + /** + * Generate summary + * + * @remarks + * Generate a new audience-specific summary for an incident + */ + async generateAudienceSummary( + request: operations.GenerateAudienceSummaryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesGenerateAudienceSummary( + this, + request, + options, + )); + } + + /** + * List audience summaries + * + * @remarks + * List all audience summaries for an incident + */ + async listAudienceSummaries( + request: operations.ListAudienceSummariesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(audiencesListAudienceSummaries( + this, + request, + options, + )); + } +} diff --git a/src/sdk/aws.ts b/src/sdk/aws.ts deleted file mode 100644 index 3510afa9..00000000 --- a/src/sdk/aws.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { integrationsAwsGetCloudTrailBatch } from "../funcs/integrationsAwsGetCloudTrailBatch.js"; -import { integrationsAwsUpdateConnection } from "../funcs/integrationsAwsUpdateConnection.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Aws extends ClientSDK { - /** - * Get an AWS CloudTrail batch - * - * @remarks - * Retrieve a single CloudTrail batch. - */ - async getCloudTrailBatch( - request: operations.GetAwsCloudTrailBatchRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsAwsGetCloudTrailBatch( - this, - request, - options, - )); - } - - /** - * Update an AWS connection - * - * @remarks - * Update the AWS connection with the provided data. - */ - async updateConnection( - request: operations.UpdateAwsConnectionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsAwsUpdateConnection( - this, - request, - options, - )); - } -} diff --git a/src/sdk/awscloudtrailbatchevents.ts b/src/sdk/awscloudtrailbatchevents.ts deleted file mode 100644 index 32ce2af7..00000000 --- a/src/sdk/awscloudtrailbatchevents.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { awsCloudtrailBatchEventsList } from "../funcs/awsCloudtrailBatchEventsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class AwsCloudtrailBatchEvents extends ClientSDK { - /** - * List events for an AWS CloudTrail batch - */ - async list( - request: operations.GetAwsCloudtrailBatchEventsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(awsCloudtrailBatchEventsList( - this, - request, - options, - )); - } -} diff --git a/src/sdk/awsconnections.ts b/src/sdk/awsconnections.ts deleted file mode 100644 index 84b96aa5..00000000 --- a/src/sdk/awsconnections.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { awsConnectionsGet } from "../funcs/awsConnectionsGet.js"; -import { awsConnectionsList } from "../funcs/awsConnectionsList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class AwsConnections extends ClientSDK { - /** - * List AWS integration connections - * - * @remarks - * Lists the available and configured AWS integration connections for the authenticated organization. - */ - async list( - request: operations.ListAwsConnectionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(awsConnectionsList( - this, - request, - options, - )); - } - - /** - * Get an AWS connection - * - * @remarks - * Retrieves the information about the AWS connection. - */ - async get( - request: operations.GetAwsConnectionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(awsConnectionsGet( - this, - request, - options, - )); - } -} diff --git a/src/sdk/callroutes.ts b/src/sdk/callroutes.ts new file mode 100644 index 00000000..3d4b332a --- /dev/null +++ b/src/sdk/callroutes.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { callRoutesListCallRoutes } from "../funcs/callRoutesListCallRoutes.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class CallRoutes extends ClientSDK { + /** + * List call routes + * + * @remarks + * List call routes for the organization + */ + async listCallRoutes( + request: operations.ListCallRoutesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(callRoutesListCallRoutes( + this, + request, + options, + )); + } +} diff --git a/src/sdk/catalogentries.ts b/src/sdk/catalogentries.ts new file mode 100644 index 00000000..f64fd6b5 --- /dev/null +++ b/src/sdk/catalogentries.ts @@ -0,0 +1,551 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { catalogEntriesCreateEnvironment } from "../funcs/catalogEntriesCreateEnvironment.js"; +import { catalogEntriesCreateFunctionality } from "../funcs/catalogEntriesCreateFunctionality.js"; +import { catalogEntriesCreateService } from "../funcs/catalogEntriesCreateService.js"; +import { catalogEntriesCreateServiceChecklistResponse } from "../funcs/catalogEntriesCreateServiceChecklistResponse.js"; +import { catalogEntriesCreateServiceDependency } from "../funcs/catalogEntriesCreateServiceDependency.js"; +import { catalogEntriesCreateServiceLinks } from "../funcs/catalogEntriesCreateServiceLinks.js"; +import { catalogEntriesDeleteEnvironment } from "../funcs/catalogEntriesDeleteEnvironment.js"; +import { catalogEntriesDeleteFunctionality } from "../funcs/catalogEntriesDeleteFunctionality.js"; +import { catalogEntriesDeleteService } from "../funcs/catalogEntriesDeleteService.js"; +import { catalogEntriesDeleteServiceDependency } from "../funcs/catalogEntriesDeleteServiceDependency.js"; +import { catalogEntriesDeleteServiceLink } from "../funcs/catalogEntriesDeleteServiceLink.js"; +import { catalogEntriesGetEnvironment } from "../funcs/catalogEntriesGetEnvironment.js"; +import { catalogEntriesGetFunctionality } from "../funcs/catalogEntriesGetFunctionality.js"; +import { catalogEntriesGetService } from "../funcs/catalogEntriesGetService.js"; +import { catalogEntriesGetServiceDependencies } from "../funcs/catalogEntriesGetServiceDependencies.js"; +import { catalogEntriesGetServiceDependency } from "../funcs/catalogEntriesGetServiceDependency.js"; +import { catalogEntriesIngestCatalogData } from "../funcs/catalogEntriesIngestCatalogData.js"; +import { catalogEntriesListEnvironments } from "../funcs/catalogEntriesListEnvironments.js"; +import { catalogEntriesListFunctionalities } from "../funcs/catalogEntriesListFunctionalities.js"; +import { catalogEntriesListFunctionalityServices } from "../funcs/catalogEntriesListFunctionalityServices.js"; +import { catalogEntriesListInfrastructures } from "../funcs/catalogEntriesListInfrastructures.js"; +import { catalogEntriesListServiceAvailableDownstreamDependencies } from "../funcs/catalogEntriesListServiceAvailableDownstreamDependencies.js"; +import { catalogEntriesListServiceAvailableUpstreamDependencies } from "../funcs/catalogEntriesListServiceAvailableUpstreamDependencies.js"; +import { catalogEntriesListServices } from "../funcs/catalogEntriesListServices.js"; +import { catalogEntriesListUserOwnedServices } from "../funcs/catalogEntriesListUserOwnedServices.js"; +import { catalogEntriesRefreshCatalog } from "../funcs/catalogEntriesRefreshCatalog.js"; +import { catalogEntriesUpdateEnvironment } from "../funcs/catalogEntriesUpdateEnvironment.js"; +import { catalogEntriesUpdateFunctionality } from "../funcs/catalogEntriesUpdateFunctionality.js"; +import { catalogEntriesUpdateService } from "../funcs/catalogEntriesUpdateService.js"; +import { catalogEntriesUpdateServiceDependency } from "../funcs/catalogEntriesUpdateServiceDependency.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class CatalogEntries extends ClientSDK { + /** + * List environments + * + * @remarks + * List all of the environments that have been added to the organiation + */ + async listEnvironments( + request: operations.ListEnvironmentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesListEnvironments( + this, + request, + options, + )); + } + + /** + * Create an environment + * + * @remarks + * Creates an environment for the organization + */ + async createEnvironment( + request: components.CreateEnvironment, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesCreateEnvironment( + this, + request, + options, + )); + } + + /** + * Get an environment + * + * @remarks + * Retrieves a single environment by ID + */ + async getEnvironment( + request: operations.GetEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesGetEnvironment( + this, + request, + options, + )); + } + + /** + * Archive an environment + * + * @remarks + * Archive an environment + */ + async deleteEnvironment( + request: operations.DeleteEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesDeleteEnvironment( + this, + request, + options, + )); + } + + /** + * Update an environment + * + * @remarks + * Update a environments attributes + */ + async updateEnvironment( + request: operations.UpdateEnvironmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesUpdateEnvironment( + this, + request, + options, + )); + } + + /** + * List services + * + * @remarks + * List all of the services that have been added to the organization. + */ + async listServices( + request: operations.ListServicesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesListServices( + this, + request, + options, + )); + } + + /** + * Create a service + * + * @remarks + * Creates a service for the organization, you may also create or attach functionalities to the service on create. + */ + async createService( + request: components.CreateService, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesCreateService( + this, + request, + options, + )); + } + + /** + * Create multiple services linked to external services + * + * @remarks + * Creates a service with the appropriate integration for each external service ID passed + */ + async createServiceLinks( + request: components.CreateServiceLinks, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(catalogEntriesCreateServiceLinks( + this, + request, + options, + )); + } + + /** + * Get a service + * + * @remarks + * Retrieves a single service by ID + */ + async getService( + request: operations.GetServiceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesGetService( + this, + request, + options, + )); + } + + /** + * Delete a service + * + * @remarks + * Deletes the service from FireHydrant. + */ + async deleteService( + request: operations.DeleteServiceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesDeleteService( + this, + request, + options, + )); + } + + /** + * Update a service + * + * @remarks + * Update a services attributes, you may also add or remove functionalities from the service as well. + * Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. + */ + async updateService( + request: operations.UpdateServiceRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesUpdateService( + this, + request, + options, + )); + } + + /** + * List dependencies for a service + * + * @remarks + * Retrieves a service's dependencies + */ + async getServiceDependencies( + request: operations.GetServiceDependenciesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesGetServiceDependencies( + this, + request, + options, + )); + } + + /** + * List available upstream service dependencies + * + * @remarks + * Retrieves all services that are available to be upstream dependencies + */ + async listServiceAvailableUpstreamDependencies( + request: operations.ListServiceAvailableUpstreamDependenciesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesListServiceAvailableUpstreamDependencies( + this, + request, + options, + )); + } + + /** + * List available downstream service dependencies + * + * @remarks + * Retrieves all services that are available to be downstream dependencies + */ + async listServiceAvailableDownstreamDependencies( + request: operations.ListServiceAvailableDownstreamDependenciesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesListServiceAvailableDownstreamDependencies( + this, + request, + options, + )); + } + + /** + * Delete a service link + * + * @remarks + * Deletes a service link from FireHydrant. + */ + async deleteServiceLink( + request: operations.DeleteServiceLinkRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesDeleteServiceLink( + this, + request, + options, + )); + } + + /** + * Record a response for a checklist item + * + * @remarks + * Creates a response for a checklist item + */ + async createServiceChecklistResponse( + request: operations.CreateServiceChecklistResponseRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesCreateServiceChecklistResponse( + this, + request, + options, + )); + } + + /** + * Create a service dependency + * + * @remarks + * Creates a service dependency relationship between two services + */ + async createServiceDependency( + request: components.CreateServiceDependency, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesCreateServiceDependency( + this, + request, + options, + )); + } + + /** + * Get a service dependency + * + * @remarks + * Retrieves a single service dependency by ID + */ + async getServiceDependency( + request: operations.GetServiceDependencyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesGetServiceDependency( + this, + request, + options, + )); + } + + /** + * Delete a service dependency + * + * @remarks + * Deletes a single service dependency + */ + async deleteServiceDependency( + request: operations.DeleteServiceDependencyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesDeleteServiceDependency( + this, + request, + options, + )); + } + + /** + * Update a service dependency + * + * @remarks + * Update the notes of the service dependency + */ + async updateServiceDependency( + request: operations.UpdateServiceDependencyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesUpdateServiceDependency( + this, + request, + options, + )); + } + + /** + * List functionalities + * + * @remarks + * List all of the functionalities that have been added to the organiation + */ + async listFunctionalities( + request: operations.ListFunctionalitiesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesListFunctionalities( + this, + request, + options, + )); + } + + /** + * Create a functionality + * + * @remarks + * Creates a functionality for the organization + */ + async createFunctionality( + request: components.CreateFunctionality, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesCreateFunctionality( + this, + request, + options, + )); + } + + /** + * Get a functionality + * + * @remarks + * Retrieves a single functionality by ID + */ + async getFunctionality( + request: operations.GetFunctionalityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesGetFunctionality( + this, + request, + options, + )); + } + + /** + * Archive a functionality + * + * @remarks + * Archive a functionality + */ + async deleteFunctionality( + request: operations.DeleteFunctionalityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesDeleteFunctionality( + this, + request, + options, + )); + } + + /** + * Update a functionality + * + * @remarks + * Update a functionalities attributes + */ + async updateFunctionality( + request: operations.UpdateFunctionalityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesUpdateFunctionality( + this, + request, + options, + )); + } + + /** + * List services for a functionality + * + * @remarks + * List services for a functionality + */ + async listFunctionalityServices( + request: operations.ListFunctionalityServicesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesListFunctionalityServices( + this, + request, + options, + )); + } + + /** + * List services owned by a user's teams + * + * @remarks + * Retrieves a list of services owned by the teams a user is on + */ + async listUserOwnedServices( + request: operations.ListUserOwnedServicesRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(catalogEntriesListUserOwnedServices( + this, + request, + options, + )); + } + + /** + * Lists functionality, service and environment objects + * + * @remarks + * Lists functionality, service and environment objects + */ + async listInfrastructures( + request: operations.ListInfrastructuresRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesListInfrastructures( + this, + request, + options, + )); + } + + /** + * Refresh a service catalog + * + * @remarks + * Schedules an async task to re-import catalog info and update catalog data accordingly. + */ + async refreshCatalog( + request: operations.RefreshCatalogRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesRefreshCatalog( + this, + request, + options, + )); + } + + /** + * Ingest service catalog data + * + * @remarks + * Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. + */ + async ingestCatalogData( + request: operations.IngestCatalogDataRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(catalogEntriesIngestCatalogData( + this, + request, + options, + )); + } +} diff --git a/src/sdk/catalogs.ts b/src/sdk/catalogs.ts deleted file mode 100644 index abc6e0ec..00000000 --- a/src/sdk/catalogs.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { servicesCatalogsIngest } from "../funcs/servicesCatalogsIngest.js"; -import { servicesCatalogsRefresh } from "../funcs/servicesCatalogsRefresh.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Catalogs extends ClientSDK { - /** - * Ingest service catalog data - * - * @remarks - * Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog. - */ - async ingest( - request: operations.IngestCatalogDataRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesCatalogsIngest( - this, - request, - options, - )); - } - - /** - * Refresh a service catalog - * - * @remarks - * Schedules an async task to re-import catalog info and update catalog data accordingly. - */ - async refresh( - request: operations.RefreshCatalogRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesCatalogsRefresh( - this, - request, - options, - )); - } -} diff --git a/src/sdk/changes.ts b/src/sdk/changes.ts index ac7a62a3..3bccb88d 100644 --- a/src/sdk/changes.ts +++ b/src/sdk/changes.ts @@ -2,56 +2,37 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { changesCreate } from "../funcs/changesCreate.js"; -import { changesCreateEvent } from "../funcs/changesCreateEvent.js"; -import { changesCreateIdentity } from "../funcs/changesCreateIdentity.js"; -import { changesDelete } from "../funcs/changesDelete.js"; -import { changesDeleteEvent } from "../funcs/changesDeleteEvent.js"; -import { changesDeleteIdentity } from "../funcs/changesDeleteIdentity.js"; -import { changesGet } from "../funcs/changesGet.js"; -import { changesGetEvent } from "../funcs/changesGetEvent.js"; -import { changesList } from "../funcs/changesList.js"; -import { changesListEvents } from "../funcs/changesListEvents.js"; -import { changesListIdentities } from "../funcs/changesListIdentities.js"; -import { changesListTypes } from "../funcs/changesListTypes.js"; -import { changesUpdate } from "../funcs/changesUpdate.js"; -import { changesUpdateEvent } from "../funcs/changesUpdateEvent.js"; -import { changesUpdateIdentity } from "../funcs/changesUpdateIdentity.js"; -import { changesUpdateScheduledMaintenance } from "../funcs/changesUpdateScheduledMaintenance.js"; +import { changesCreateChange } from "../funcs/changesCreateChange.js"; +import { changesCreateChangeEvent } from "../funcs/changesCreateChangeEvent.js"; +import { changesCreateChangeIdentity } from "../funcs/changesCreateChangeIdentity.js"; +import { changesDeleteChange } from "../funcs/changesDeleteChange.js"; +import { changesDeleteChangeEvent } from "../funcs/changesDeleteChangeEvent.js"; +import { changesDeleteChangeIdentity } from "../funcs/changesDeleteChangeIdentity.js"; +import { changesGetChangeEvent } from "../funcs/changesGetChangeEvent.js"; +import { changesListChangeEvents } from "../funcs/changesListChangeEvents.js"; +import { changesListChangeIdentities } from "../funcs/changesListChangeIdentities.js"; +import { changesListChanges } from "../funcs/changesListChanges.js"; +import { changesListChangeTypes } from "../funcs/changesListChangeTypes.js"; +import { changesUpdateChange } from "../funcs/changesUpdateChange.js"; +import { changesUpdateChangeEvent } from "../funcs/changesUpdateChangeEvent.js"; +import { changesUpdateChangeIdentity } from "../funcs/changesUpdateChangeIdentity.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Changes extends ClientSDK { - /** - * List change types - * - * @remarks - * Lists all change types - */ - async listTypes( - request: operations.ListChangeTypesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(changesListTypes( - this, - request, - options, - )); - } - /** * List changes * * @remarks - * Lists all changes + * List changes for the organization */ - async list( + async listChanges( request: operations.ListChangesRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(changesList( + return unwrapAsync(changesListChanges( this, request, options, @@ -59,33 +40,16 @@ export class Changes extends ClientSDK { } /** - * Create a change + * Create a new change entry * * @remarks * Create a new change entry */ - async create( - request: components.PostV1Changes, + async createChange( + request: components.CreateChange, options?: RequestOptions, ): Promise { - return unwrapAsync(changesCreate( - this, - request, - options, - )); - } - - /** - * List change events - * - * @remarks - * List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it - */ - async listEvents( - request: operations.ListChangeEventsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(changesListEvents( + return unwrapAsync(changesCreateChange( this, request, options, @@ -93,16 +57,16 @@ export class Changes extends ClientSDK { } /** - * Create a change event + * Archive a change entry * * @remarks - * Create a change event + * Archive a change entry */ - async createEvent( - request: components.ChangesEvents, + async deleteChange( + request: operations.DeleteChangeRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesCreateEvent( + ): Promise { + return unwrapAsync(changesDeleteChange( this, request, options, @@ -110,16 +74,16 @@ export class Changes extends ClientSDK { } /** - * Get a change event + * Update a change entry * * @remarks - * Retrieve a change event + * Update a change entry */ - async getEvent( - request: operations.GetChangeEventRequest, + async updateChange( + request: operations.UpdateChangeRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesGetEvent( + ): Promise { + return unwrapAsync(changesUpdateChange( this, request, options, @@ -127,16 +91,16 @@ export class Changes extends ClientSDK { } /** - * Delete a change event + * List identities for a change entry * * @remarks - * Delete a change event + * Retrieve all identities for the change entry */ - async deleteEvent( - request: operations.DeleteChangeEventRequest, + async listChangeIdentities( + request: operations.ListChangeIdentitiesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesDeleteEvent( + ): Promise { + return unwrapAsync(changesListChangeIdentities( this, request, options, @@ -144,16 +108,16 @@ export class Changes extends ClientSDK { } /** - * Update a change event + * Create an identity for a change entry * * @remarks - * Update a change event + * Create an identity for the change entry */ - async updateEvent( - request: operations.UpdateChangeEventRequest, + async createChangeIdentity( + request: operations.CreateChangeIdentityRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesUpdateEvent( + ): Promise { + return unwrapAsync(changesCreateChangeIdentity( this, request, options, @@ -161,16 +125,16 @@ export class Changes extends ClientSDK { } /** - * Archive a change + * Delete an identity from a change entry * * @remarks - * Archive a change entry + * Delete an identity from the change entry */ - async delete( - request: operations.DeleteChangeRequest, + async deleteChangeIdentity( + request: operations.DeleteChangeIdentityRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(changesDelete( + return unwrapAsync(changesDeleteChangeIdentity( this, request, options, @@ -178,16 +142,16 @@ export class Changes extends ClientSDK { } /** - * Update a change + * Update an identity for a change entry * * @remarks - * Update a change entry + * Update an identity for the change entry */ - async update( - request: operations.UpdateChangeRequest, + async updateChangeIdentity( + request: operations.UpdateChangeIdentityRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesUpdate( + ): Promise { + return unwrapAsync(changesUpdateChangeIdentity( this, request, options, @@ -195,16 +159,16 @@ export class Changes extends ClientSDK { } /** - * List identities for a change + * List change events * * @remarks - * Retrieve all identities for the change + * List change events for the organization. Note: Not all information is included on a change event like attachments and related changes. You must fetch a change event separately to retrieve all of the information about it */ - async listIdentities( - request: operations.ListChangeIdentitiesRequest, + async listChangeEvents( + request: operations.ListChangeEventsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesListIdentities( + ): Promise { + return unwrapAsync(changesListChangeEvents( this, request, options, @@ -212,16 +176,16 @@ export class Changes extends ClientSDK { } /** - * Create an identity for a change + * Create a change event * * @remarks - * Create an identity for this change + * Create a change event */ - async createIdentity( - request: operations.CreateChangeIdentityRequest, + async createChangeEvent( + request: components.CreateChangeEvent, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesCreateIdentity( + ): Promise { + return unwrapAsync(changesCreateChangeEvent( this, request, options, @@ -229,16 +193,16 @@ export class Changes extends ClientSDK { } /** - * Delete an identity from a change + * Get a change event * * @remarks - * Delete an identity + * Retrieve a change event */ - async deleteIdentity( - request: operations.DeleteChangeIdentityRequest, + async getChangeEvent( + request: operations.GetChangeEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesDeleteIdentity( + ): Promise { + return unwrapAsync(changesGetChangeEvent( this, request, options, @@ -246,16 +210,16 @@ export class Changes extends ClientSDK { } /** - * Update an identity for a change + * Delete a change event * * @remarks - * Update an identity + * Delete a change event */ - async updateIdentity( - request: operations.UpdateChangeIdentityRequest, + async deleteChangeEvent( + request: operations.DeleteChangeEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesUpdateIdentity( + ): Promise { + return unwrapAsync(changesDeleteChangeEvent( this, request, options, @@ -263,16 +227,16 @@ export class Changes extends ClientSDK { } /** - * Get a scheduled maintenance event + * Update a change event * * @remarks - * Fetch the details of a scheduled maintenance event. + * Update a change event */ - async get( - request: operations.GetScheduledMaintenanceRequest, + async updateChangeEvent( + request: operations.UpdateChangeEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesGet( + ): Promise { + return unwrapAsync(changesUpdateChangeEvent( this, request, options, @@ -280,16 +244,16 @@ export class Changes extends ClientSDK { } /** - * Update a scheduled maintenance event + * List change types * * @remarks - * Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. + * List change types for the organization */ - async updateScheduledMaintenance( - request: operations.UpdateScheduledMaintenanceRequest, + async listChangeTypes( + request: operations.ListChangeTypesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(changesUpdateScheduledMaintenance( + ): Promise { + return unwrapAsync(changesListChangeTypes( this, request, options, diff --git a/src/sdk/checklisttemplates.ts b/src/sdk/checklisttemplates.ts deleted file mode 100644 index 559c9d8f..00000000 --- a/src/sdk/checklisttemplates.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { checklistTemplatesGet } from "../funcs/checklistTemplatesGet.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class ChecklistTemplates extends ClientSDK { - /** - * Get a checklist template - * - * @remarks - * Retrieves a single checklist template by ID - */ - async get( - request: operations.GetChecklistTemplateRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(checklistTemplatesGet( - this, - request, - options, - )); - } -} diff --git a/src/sdk/communication.ts b/src/sdk/communication.ts index 71f22a67..1545b66f 100644 --- a/src/sdk/communication.ts +++ b/src/sdk/communication.ts @@ -2,10 +2,11 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { communicationCreateStatusUpdateTemplate } from "../funcs/communicationCreateStatusUpdateTemplate.js"; import { communicationDeleteStatusUpdateTemplate } from "../funcs/communicationDeleteStatusUpdateTemplate.js"; -import { communicationGetTemplate } from "../funcs/communicationGetTemplate.js"; -import { communicationListTemplates } from "../funcs/communicationListTemplates.js"; -import { communicationUpdateTemplate } from "../funcs/communicationUpdateTemplate.js"; +import { communicationGetStatusUpdateTemplate } from "../funcs/communicationGetStatusUpdateTemplate.js"; +import { communicationListStatusUpdateTemplates } from "../funcs/communicationListStatusUpdateTemplates.js"; +import { communicationUpdateStatusUpdateTemplate } from "../funcs/communicationUpdateStatusUpdateTemplate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -18,11 +19,28 @@ export class Communication extends ClientSDK { * @remarks * List all status update templates for your organization */ - async listTemplates( + async listStatusUpdateTemplates( request: operations.ListStatusUpdateTemplatesRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(communicationListTemplates( + return unwrapAsync(communicationListStatusUpdateTemplates( + this, + request, + options, + )); + } + + /** + * Create a status update template + * + * @remarks + * Create a status update template for your organization + */ + async createStatusUpdateTemplate( + request: components.CreateStatusUpdateTemplate, + options?: RequestOptions, + ): Promise { + return unwrapAsync(communicationCreateStatusUpdateTemplate( this, request, options, @@ -35,11 +53,11 @@ export class Communication extends ClientSDK { * @remarks * Get a single status update template by ID */ - async getTemplate( + async getStatusUpdateTemplate( request: operations.GetStatusUpdateTemplateRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(communicationGetTemplate( + return unwrapAsync(communicationGetStatusUpdateTemplate( this, request, options, @@ -69,11 +87,11 @@ export class Communication extends ClientSDK { * @remarks * Update a single status update template */ - async updateTemplate( + async updateStatusUpdateTemplate( request: operations.UpdateStatusUpdateTemplateRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(communicationUpdateTemplate( + return unwrapAsync(communicationUpdateStatusUpdateTemplate( this, request, options, diff --git a/src/sdk/confluence.ts b/src/sdk/confluence.ts deleted file mode 100644 index 891b93ad..00000000 --- a/src/sdk/confluence.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { confluenceListSpaces } from "../funcs/confluenceListSpaces.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Confluence extends ClientSDK { - /** - * List Confluence spaces - * - * @remarks - * Lists available space keys for the Confluence integration connection. - */ - async listSpaces( - request: operations.ListConfluenceSpacesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(confluenceListSpaces( - this, - request, - options, - )); - } -} diff --git a/src/sdk/conversations.ts b/src/sdk/conversations.ts index c90431ec..0cd28e3d 100644 --- a/src/sdk/conversations.ts +++ b/src/sdk/conversations.ts @@ -7,25 +7,62 @@ import { conversationsCreateCommentReaction } from "../funcs/conversationsCreate import { conversationsDeleteComment } from "../funcs/conversationsDeleteComment.js"; import { conversationsDeleteCommentReaction } from "../funcs/conversationsDeleteCommentReaction.js"; import { conversationsGetComment } from "../funcs/conversationsGetComment.js"; +import { conversationsGetVoteStatus } from "../funcs/conversationsGetVoteStatus.js"; import { conversationsListCommentReactions } from "../funcs/conversationsListCommentReactions.js"; import { conversationsListComments } from "../funcs/conversationsListComments.js"; import { conversationsUpdateComment } from "../funcs/conversationsUpdateComment.js"; +import { conversationsUpdateVote } from "../funcs/conversationsUpdateVote.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Conversations extends ClientSDK { /** - * List comments for a conversation + * Get votes * * @remarks - * ALPHA - List all of the comments that have been added to the organization + * Get an object's current vote counts */ - async listComments( - request: operations.ListConversationCommentsRequest, + async getVoteStatus( + request: operations.GetVoteStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(conversationsGetVoteStatus( + this, + request, + options, + )); + } + + /** + * Update votes + * + * @remarks + * Upvote or downvote an object + */ + async updateVote( + request: operations.UpdateVoteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(conversationsUpdateVote( + this, + request, + options, + )); + } + + /** + * Delete a reaction from a conversation comment + * + * @remarks + * ALPHA - Archive a reaction + */ + async deleteCommentReaction( + request: operations.DeleteCommentReactionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsListComments( + return unwrapAsync(conversationsDeleteCommentReaction( this, request, options, @@ -33,16 +70,16 @@ export class Conversations extends ClientSDK { } /** - * Create a comment for a conversation + * List reactions for a conversation comment * * @remarks - * ALPHA - Creates a comment for a project + * ALPHA - List all of the reactions that have been added to a comment */ - async createComment( - request: operations.CreateConversationCommentRequest, + async listCommentReactions( + request: operations.ListCommentReactionsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsCreateComment( + return unwrapAsync(conversationsListCommentReactions( this, request, options, @@ -50,16 +87,16 @@ export class Conversations extends ClientSDK { } /** - * Get a conversation comment + * Create a reaction for a conversation comment * * @remarks - * ALPHA - Retrieves a single comment by ID + * ALPHA - Create a reaction on a comment */ - async getComment( - request: operations.GetConversationCommentRequest, + async createCommentReaction( + request: operations.CreateCommentReactionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsGetComment( + return unwrapAsync(conversationsCreateCommentReaction( this, request, options, @@ -67,16 +104,16 @@ export class Conversations extends ClientSDK { } /** - * Delete a conversation comment + * Get a conversation comment * * @remarks - * ALPHA - Archive a comment + * ALPHA - Retrieves a single comment by ID */ - async deleteComment( - request: operations.DeleteConversationCommentRequest, + async getComment( + request: operations.GetCommentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsDeleteComment( + return unwrapAsync(conversationsGetComment( this, request, options, @@ -84,16 +121,16 @@ export class Conversations extends ClientSDK { } /** - * Update a conversation comment + * Archive a conversation comment * * @remarks - * ALPHA - Update a comment's attributes + * ALPHA - Archive a comment */ - async updateComment( - request: operations.UpdateConversationCommentRequest, + async deleteComment( + request: operations.DeleteCommentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsUpdateComment( + return unwrapAsync(conversationsDeleteComment( this, request, options, @@ -101,16 +138,16 @@ export class Conversations extends ClientSDK { } /** - * List reactions for a conversation comment + * Update a conversation comment * * @remarks - * ALPHA - List all of the reactions that have been added to a comment + * ALPHA - Update a comment's attributes */ - async listCommentReactions( - request: operations.ListConversationCommentReactionsRequest, + async updateComment( + request: operations.UpdateCommentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsListCommentReactions( + return unwrapAsync(conversationsUpdateComment( this, request, options, @@ -118,16 +155,16 @@ export class Conversations extends ClientSDK { } /** - * Create a reaction for a conversation comment + * List comments for a conversation * * @remarks - * ALPHA - Create a reaction on a comment + * ALPHA - List all of the comments that have been added to the organization */ - async createCommentReaction( - request: operations.CreateConversationCommentReactionRequest, + async listComments( + request: operations.ListCommentsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsCreateCommentReaction( + return unwrapAsync(conversationsListComments( this, request, options, @@ -135,16 +172,16 @@ export class Conversations extends ClientSDK { } /** - * Delete a reaction from a conversation comment + * Create a conversation comment * * @remarks - * ALPHA - Archive a reaction + * ALPHA - Creates a comment for a project */ - async deleteCommentReaction( - request: operations.DeleteConversationCommentReactionRequest, + async createComment( + request: operations.CreateCommentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(conversationsDeleteCommentReaction( + return unwrapAsync(conversationsCreateComment( this, request, options, diff --git a/src/sdk/environments.ts b/src/sdk/environments.ts deleted file mode 100644 index f5f0564b..00000000 --- a/src/sdk/environments.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { environmentsCreate } from "../funcs/environmentsCreate.js"; -import { environmentsDelete } from "../funcs/environmentsDelete.js"; -import { environmentsGet } from "../funcs/environmentsGet.js"; -import { environmentsList } from "../funcs/environmentsList.js"; -import { environmentsUpdate } from "../funcs/environmentsUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Environments extends ClientSDK { - /** - * List environments - * - * @remarks - * List all of the environments that have been added to the organiation - */ - async list( - request: operations.ListEnvironmentsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(environmentsList( - this, - request, - options, - )); - } - - /** - * Create an environment - * - * @remarks - * Creates an environment for the organization - */ - async create( - request: components.PostV1Environments, - options?: RequestOptions, - ): Promise { - return unwrapAsync(environmentsCreate( - this, - request, - options, - )); - } - - /** - * Get an environment - * - * @remarks - * Retrieves a single environment by ID - */ - async get( - request: operations.GetEnvironmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(environmentsGet( - this, - request, - options, - )); - } - - /** - * Archive an environment - * - * @remarks - * Archive an environment - */ - async delete( - request: operations.DeleteEnvironmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(environmentsDelete( - this, - request, - options, - )); - } - - /** - * Update an environment - * - * @remarks - * Update a environments attributes - */ - async update( - request: operations.UpdateEnvironmentRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(environmentsUpdate( - this, - request, - options, - )); - } -} diff --git a/src/sdk/executions.ts b/src/sdk/executions.ts deleted file mode 100644 index a142bbc3..00000000 --- a/src/sdk/executions.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { runbooksExecutionsDelete } from "../funcs/runbooksExecutionsDelete.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Executions extends ClientSDK { - /** - * Terminate a runbook execution - * - * @remarks - * Terminates a runbook execution, preventing any further steps from being executed - */ - async delete( - request: operations.DeleteRunbookExecutionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksExecutionsDelete( - this, - request, - options, - )); - } -} diff --git a/src/sdk/firehydranttypescriptsdksignalsteams.ts b/src/sdk/firehydranttypescriptsdksignalsteams.ts deleted file mode 100644 index e1c00c2f..00000000 --- a/src/sdk/firehydranttypescriptsdksignalsteams.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { signalsTeamsGetEscalationPolicy } from "../funcs/signalsTeamsGetEscalationPolicy.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class FirehydrantTypescriptSDKSignalsTeams extends ClientSDK { - /** - * Get an escalation policy for a team - * - * @remarks - * Get a Signals escalation policy by ID - */ - async getEscalationPolicy( - request: operations.GetTeamEscalationPolicyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(signalsTeamsGetEscalationPolicy( - this, - request, - options, - )); - } -} diff --git a/src/sdk/firehydranttypescriptsdkslack.ts b/src/sdk/firehydranttypescriptsdkslack.ts deleted file mode 100644 index d25ca162..00000000 --- a/src/sdk/firehydranttypescriptsdkslack.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { integrationsSlackDeleteEmojiAction } from "../funcs/integrationsSlackDeleteEmojiAction.js"; -import { integrationsSlackGetEmojiAction } from "../funcs/integrationsSlackGetEmojiAction.js"; -import { integrationsSlackListWorkspaces } from "../funcs/integrationsSlackListWorkspaces.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class FirehydrantTypescriptSDKSlack extends ClientSDK { - /** - * Get a Slack emoji action - * - * @remarks - * Retrieves a slack emoji action - */ - async getEmojiAction( - request: operations.GetSlackEmojiActionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsSlackGetEmojiAction( - this, - request, - options, - )); - } - - /** - * Delete a Slack emoji action - * - * @remarks - * Deletes a slack emoji action - */ - async deleteEmojiAction( - request: operations.DeleteSlackEmojiActionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsSlackDeleteEmojiAction( - this, - request, - options, - )); - } - - /** - * List Slack workspaces for a connection - */ - async listWorkspaces( - request: operations.GetSlackWorkspacesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsSlackListWorkspaces( - this, - request, - options, - )); - } -} diff --git a/src/sdk/firehydranttypescriptsdkstatuspage.ts b/src/sdk/firehydranttypescriptsdkstatuspage.ts deleted file mode 100644 index 197cb0ad..00000000 --- a/src/sdk/firehydranttypescriptsdkstatuspage.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { integrationsStatuspageListConnections } from "../funcs/integrationsStatuspageListConnections.js"; -import { integrationsStatuspageListPages } from "../funcs/integrationsStatuspageListPages.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class FirehydrantTypescriptSDKStatuspage extends ClientSDK { - /** - * List Statuspage connections - * - * @remarks - * Lists the available and configured Statuspage integrations connections for the authenticated organization. - */ - async listConnections( - request: operations.ListStatuspageConnectionsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsStatuspageListConnections( - this, - request, - options, - )); - } - - /** - * List StatusPage pages for a connection - */ - async listPages( - request: operations.ListStatuspagePagesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsStatuspageListPages( - this, - request, - options, - )); - } -} diff --git a/src/sdk/firehydranttypescriptsdkticketing.ts b/src/sdk/firehydranttypescriptsdkticketing.ts deleted file mode 100644 index 03083d8e..00000000 --- a/src/sdk/firehydranttypescriptsdkticketing.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { integrationsTicketingGetProject } from "../funcs/integrationsTicketingGetProject.js"; -import { integrationsTicketingListTags } from "../funcs/integrationsTicketingListTags.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class FirehydrantTypescriptSDKTicketing extends ClientSDK { - /** - * Get a ticketing project - * - * @remarks - * Retrieve a single ticketing project by ID - */ - async getProject( - request: operations.GetTicketingProjectRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsTicketingGetProject( - this, - request, - options, - )); - } - - /** - * List ticket tags - * - * @remarks - * List all of the ticket tags in the organization - */ - async listTags( - request: operations.ListTicketTagsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsTicketingListTags( - this, - request, - options, - )); - } -} diff --git a/src/sdk/functionalities.ts b/src/sdk/functionalities.ts deleted file mode 100644 index 5b74b254..00000000 --- a/src/sdk/functionalities.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { functionalitiesCreate } from "../funcs/functionalitiesCreate.js"; -import { functionalitiesDelete } from "../funcs/functionalitiesDelete.js"; -import { functionalitiesGet } from "../funcs/functionalitiesGet.js"; -import { functionalitiesList } from "../funcs/functionalitiesList.js"; -import { functionalitiesListServices } from "../funcs/functionalitiesListServices.js"; -import { functionalitiesUpdate } from "../funcs/functionalitiesUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Functionalities extends ClientSDK { - /** - * List functionalities - * - * @remarks - * List all of the functionalities that have been added to the organiation - */ - async list( - request: operations.ListFunctionalitiesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(functionalitiesList( - this, - request, - options, - )); - } - - /** - * Create a functionality - * - * @remarks - * Creates a functionality for the organization - */ - async create( - request: components.PostV1Functionalities, - options?: RequestOptions, - ): Promise { - return unwrapAsync(functionalitiesCreate( - this, - request, - options, - )); - } - - /** - * Get a functionality - * - * @remarks - * Retrieves a single functionality by ID - */ - async get( - request: operations.GetFunctionalityRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(functionalitiesGet( - this, - request, - options, - )); - } - - /** - * Archive a functionality - * - * @remarks - * Archive a functionality - */ - async delete( - request: operations.DeleteFunctionalityRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(functionalitiesDelete( - this, - request, - options, - )); - } - - /** - * Update a functionality - * - * @remarks - * Update a functionalities attributes - */ - async update( - request: operations.UpdateFunctionalityRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(functionalitiesUpdate( - this, - request, - options, - )); - } - - /** - * List services for a functionality - */ - async listServices( - request: operations.GetFunctionalityServicesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(functionalitiesListServices( - this, - request, - options, - )); - } -} diff --git a/src/sdk/incidents.ts b/src/sdk/incidents.ts index d0041091..f96fc483 100644 --- a/src/sdk/incidents.ts +++ b/src/sdk/incidents.ts @@ -2,58 +2,62 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { incidentsAddStatusPage } from "../funcs/incidentsAddStatusPage.js"; -import { incidentsArchive } from "../funcs/incidentsArchive.js"; -import { incidentsClose } from "../funcs/incidentsClose.js"; -import { incidentsCreate } from "../funcs/incidentsCreate.js"; -import { incidentsCreateAttachment } from "../funcs/incidentsCreateAttachment.js"; -import { incidentsCreateGenericChatMessage } from "../funcs/incidentsCreateGenericChatMessage.js"; -import { incidentsCreateImpact } from "../funcs/incidentsCreateImpact.js"; -import { incidentsCreateLink } from "../funcs/incidentsCreateLink.js"; -import { incidentsCreateNote } from "../funcs/incidentsCreateNote.js"; -import { incidentsCreateRelatedChange } from "../funcs/incidentsCreateRelatedChange.js"; -import { incidentsCreateRoleAssignment } from "../funcs/incidentsCreateRoleAssignment.js"; -import { incidentsCreateTaskList } from "../funcs/incidentsCreateTaskList.js"; -import { incidentsCreateTeamAssignment } from "../funcs/incidentsCreateTeamAssignment.js"; -import { incidentsDeleteAlert } from "../funcs/incidentsDeleteAlert.js"; -import { incidentsDeleteChatMessage } from "../funcs/incidentsDeleteChatMessage.js"; -import { incidentsDeleteEvent } from "../funcs/incidentsDeleteEvent.js"; -import { incidentsDeleteImpact } from "../funcs/incidentsDeleteImpact.js"; -import { incidentsDeleteLink } from "../funcs/incidentsDeleteLink.js"; -import { incidentsDeleteRoleAssignment } from "../funcs/incidentsDeleteRoleAssignment.js"; -import { incidentsDeleteTeamAssignment } from "../funcs/incidentsDeleteTeamAssignment.js"; -import { incidentsDeleteTranscript } from "../funcs/incidentsDeleteTranscript.js"; -import { incidentsGet } from "../funcs/incidentsGet.js"; -import { incidentsGetAiSummaryVoteStatus } from "../funcs/incidentsGetAiSummaryVoteStatus.js"; -import { incidentsGetChannel } from "../funcs/incidentsGetChannel.js"; -import { incidentsGetEvent } from "../funcs/incidentsGetEvent.js"; -import { incidentsGetEventVoteStatus } from "../funcs/incidentsGetEventVoteStatus.js"; -import { incidentsGetRelationships } from "../funcs/incidentsGetRelationships.js"; -import { incidentsGetTranscript } from "../funcs/incidentsGetTranscript.js"; -import { incidentsGetUserRole } from "../funcs/incidentsGetUserRole.js"; -import { incidentsList } from "../funcs/incidentsList.js"; -import { incidentsListAttachments } from "../funcs/incidentsListAttachments.js"; -import { incidentsListEvents } from "../funcs/incidentsListEvents.js"; -import { incidentsListImpact } from "../funcs/incidentsListImpact.js"; -import { incidentsListLinks } from "../funcs/incidentsListLinks.js"; -import { incidentsListMilestones } from "../funcs/incidentsListMilestones.js"; -import { incidentsListRelatedChangeEvents } from "../funcs/incidentsListRelatedChangeEvents.js"; -import { incidentsListRoleAssignments } from "../funcs/incidentsListRoleAssignments.js"; -import { incidentsListSimilar } from "../funcs/incidentsListSimilar.js"; -import { incidentsListStatusPages } from "../funcs/incidentsListStatusPages.js"; -import { incidentsPartialUpdateImpacts } from "../funcs/incidentsPartialUpdateImpacts.js"; -import { incidentsResolve } from "../funcs/incidentsResolve.js"; -import { incidentsSetAlertAsPrimary } from "../funcs/incidentsSetAlertAsPrimary.js"; -import { incidentsUnarchive } from "../funcs/incidentsUnarchive.js"; -import { incidentsUpdate } from "../funcs/incidentsUpdate.js"; -import { incidentsUpdateChatMessage } from "../funcs/incidentsUpdateChatMessage.js"; -import { incidentsUpdateEvent } from "../funcs/incidentsUpdateEvent.js"; -import { incidentsUpdateEventVotes } from "../funcs/incidentsUpdateEventVotes.js"; -import { incidentsUpdateImpacts } from "../funcs/incidentsUpdateImpacts.js"; -import { incidentsUpdateLink } from "../funcs/incidentsUpdateLink.js"; -import { incidentsUpdateMilestonesBulk } from "../funcs/incidentsUpdateMilestonesBulk.js"; -import { incidentsUpdateNote } from "../funcs/incidentsUpdateNote.js"; -import { incidentsUpdateRelatedChangeEvent } from "../funcs/incidentsUpdateRelatedChangeEvent.js"; +import { incidentsBulkUpdateIncidentMilestones } from "../funcs/incidentsBulkUpdateIncidentMilestones.js"; +import { incidentsCloseIncident } from "../funcs/incidentsCloseIncident.js"; +import { incidentsCreateIncident } from "../funcs/incidentsCreateIncident.js"; +import { incidentsCreateIncidentAttachment } from "../funcs/incidentsCreateIncidentAttachment.js"; +import { incidentsCreateIncidentChangeEvent } from "../funcs/incidentsCreateIncidentChangeEvent.js"; +import { incidentsCreateIncidentChatMessage } from "../funcs/incidentsCreateIncidentChatMessage.js"; +import { incidentsCreateIncidentImpact } from "../funcs/incidentsCreateIncidentImpact.js"; +import { incidentsCreateIncidentLink } from "../funcs/incidentsCreateIncidentLink.js"; +import { incidentsCreateIncidentNote } from "../funcs/incidentsCreateIncidentNote.js"; +import { incidentsCreateIncidentRoleAssignment } from "../funcs/incidentsCreateIncidentRoleAssignment.js"; +import { incidentsCreateIncidentStatusPage } from "../funcs/incidentsCreateIncidentStatusPage.js"; +import { incidentsCreateIncidentTeamAssignment } from "../funcs/incidentsCreateIncidentTeamAssignment.js"; +import { incidentsCreateScheduledMaintenance } from "../funcs/incidentsCreateScheduledMaintenance.js"; +import { incidentsDeleteIncident } from "../funcs/incidentsDeleteIncident.js"; +import { incidentsDeleteIncidentChatMessage } from "../funcs/incidentsDeleteIncidentChatMessage.js"; +import { incidentsDeleteIncidentEvent } from "../funcs/incidentsDeleteIncidentEvent.js"; +import { incidentsDeleteIncidentImpact } from "../funcs/incidentsDeleteIncidentImpact.js"; +import { incidentsDeleteIncidentLink } from "../funcs/incidentsDeleteIncidentLink.js"; +import { incidentsDeleteIncidentRoleAssignment } from "../funcs/incidentsDeleteIncidentRoleAssignment.js"; +import { incidentsDeleteIncidentTeamAssignment } from "../funcs/incidentsDeleteIncidentTeamAssignment.js"; +import { incidentsDeleteScheduledMaintenance } from "../funcs/incidentsDeleteScheduledMaintenance.js"; +import { incidentsDeleteTranscriptEntry } from "../funcs/incidentsDeleteTranscriptEntry.js"; +import { incidentsGetAiIncidentSummaryVoteStatus } from "../funcs/incidentsGetAiIncidentSummaryVoteStatus.js"; +import { incidentsGetConferenceBridgeTranslation } from "../funcs/incidentsGetConferenceBridgeTranslation.js"; +import { incidentsGetIncident } from "../funcs/incidentsGetIncident.js"; +import { incidentsGetIncidentChannel } from "../funcs/incidentsGetIncidentChannel.js"; +import { incidentsGetIncidentEvent } from "../funcs/incidentsGetIncidentEvent.js"; +import { incidentsGetIncidentRelationships } from "../funcs/incidentsGetIncidentRelationships.js"; +import { incidentsGetIncidentUser } from "../funcs/incidentsGetIncidentUser.js"; +import { incidentsGetScheduledMaintenance } from "../funcs/incidentsGetScheduledMaintenance.js"; +import { incidentsListIncidentAttachments } from "../funcs/incidentsListIncidentAttachments.js"; +import { incidentsListIncidentChangeEvents } from "../funcs/incidentsListIncidentChangeEvents.js"; +import { incidentsListIncidentConferenceBridges } from "../funcs/incidentsListIncidentConferenceBridges.js"; +import { incidentsListIncidentEvents } from "../funcs/incidentsListIncidentEvents.js"; +import { incidentsListIncidentImpacts } from "../funcs/incidentsListIncidentImpacts.js"; +import { incidentsListIncidentLinks } from "../funcs/incidentsListIncidentLinks.js"; +import { incidentsListIncidentMilestones } from "../funcs/incidentsListIncidentMilestones.js"; +import { incidentsListIncidentRoleAssignments } from "../funcs/incidentsListIncidentRoleAssignments.js"; +import { incidentsListIncidents } from "../funcs/incidentsListIncidents.js"; +import { incidentsListIncidentStatusPages } from "../funcs/incidentsListIncidentStatusPages.js"; +import { incidentsListScheduledMaintenances } from "../funcs/incidentsListScheduledMaintenances.js"; +import { incidentsListSimilarIncidents } from "../funcs/incidentsListSimilarIncidents.js"; +import { incidentsListTranscriptEntries } from "../funcs/incidentsListTranscriptEntries.js"; +import { incidentsResolveIncident } from "../funcs/incidentsResolveIncident.js"; +import { incidentsUnarchiveIncident } from "../funcs/incidentsUnarchiveIncident.js"; +import { incidentsUpdateIncident } from "../funcs/incidentsUpdateIncident.js"; +import { incidentsUpdateIncidentChangeEvent } from "../funcs/incidentsUpdateIncidentChangeEvent.js"; +import { incidentsUpdateIncidentChatMessage } from "../funcs/incidentsUpdateIncidentChatMessage.js"; +import { incidentsUpdateIncidentEvent } from "../funcs/incidentsUpdateIncidentEvent.js"; +import { incidentsUpdateIncidentImpactPatch } from "../funcs/incidentsUpdateIncidentImpactPatch.js"; +import { incidentsUpdateIncidentImpactPut } from "../funcs/incidentsUpdateIncidentImpactPut.js"; +import { incidentsUpdateIncidentLink } from "../funcs/incidentsUpdateIncidentLink.js"; +import { incidentsUpdateIncidentNote } from "../funcs/incidentsUpdateIncidentNote.js"; +import { incidentsUpdateScheduledMaintenance } from "../funcs/incidentsUpdateScheduledMaintenance.js"; +import { incidentsUpdateTranscriptAttribution } from "../funcs/incidentsUpdateTranscriptAttribution.js"; +import { incidentsVoteAiIncidentSummary } from "../funcs/incidentsVoteAiIncidentSummary.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -61,13 +65,16 @@ import { unwrapAsync } from "../types/fp.js"; export class Incidents extends ClientSDK { /** - * Get the vote status for an AI-generated incident summary + * List incidents + * + * @remarks + * List all of the incidents in the organization */ - async getAiSummaryVoteStatus( - request: operations.GetIncidentAiSummaryVoteStatusRequest, + async listIncidents( + request: operations.ListIncidentsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsGetAiSummaryVoteStatus( + ): Promise { + return unwrapAsync(incidentsListIncidents( this, request, options, @@ -75,16 +82,16 @@ export class Incidents extends ClientSDK { } /** - * List incidents + * Create an incident * * @remarks - * List all of the incidents in the organization + * Create a new incident */ - async list( - request: operations.ListIncidentsRequest, + async createIncident( + request: components.CreateIncident, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsList( + ): Promise { + return unwrapAsync(incidentsCreateIncident( this, request, options, @@ -92,16 +99,50 @@ export class Incidents extends ClientSDK { } /** - * Create an incident + * Get chat channel information for an incident * * @remarks - * Create a new incident + * Gives chat channel information for the specified incident + */ + async getIncidentChannel( + request: operations.GetIncidentChannelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentsGetIncidentChannel( + this, + request, + options, + )); + } + + /** + * Close an incident + * + * @remarks + * Closes an incident and optionally close all children + */ + async closeIncident( + request: operations.CloseIncidentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentsCloseIncident( + this, + request, + options, + )); + } + + /** + * Resolve an incident + * + * @remarks + * Resolves a currently active incident */ - async create( - request: components.PostV1Incidents, + async resolveIncident( + request: operations.ResolveIncidentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsCreate( + return unwrapAsync(incidentsResolveIncident( this, request, options, @@ -114,11 +155,11 @@ export class Incidents extends ClientSDK { * @remarks * Retrieve a single incident from its ID */ - async get( + async getIncident( request: operations.GetIncidentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsGet( + return unwrapAsync(incidentsGetIncident( this, request, options, @@ -131,11 +172,11 @@ export class Incidents extends ClientSDK { * @remarks * Archives an incident which will hide it from lists and metrics */ - async archive( - request: operations.ArchiveIncidentRequest, + async deleteIncident( + request: operations.DeleteIncidentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsArchive( + return unwrapAsync(incidentsDeleteIncident( this, request, options, @@ -148,11 +189,11 @@ export class Incidents extends ClientSDK { * @remarks * Updates an incident with provided parameters */ - async update( + async updateIncident( request: operations.UpdateIncidentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsUpdate( + return unwrapAsync(incidentsUpdateIncident( this, request, options, @@ -160,16 +201,16 @@ export class Incidents extends ClientSDK { } /** - * Delete an alert from an incident + * Unarchive an incident * * @remarks - * Remove an alert from an incident + * Unarchive an incident */ - async deleteAlert( - request: operations.DeleteIncidentAlertRequest, + async unarchiveIncident( + request: operations.UnarchiveIncidentRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsDeleteAlert( + ): Promise { + return unwrapAsync(incidentsUnarchiveIncident( this, request, options, @@ -177,16 +218,21 @@ export class Incidents extends ClientSDK { } /** - * Set an alert as primary for an incident + * Update milestone times * * @remarks - * Setting an alert as primary will overwrite milestone times in the FireHydrant incident with times included in the primary alert. Services attached to the primary alert will also be automatically added to the incident. + * Update milestone times in bulk for a given incident. All milestone + * times for an incident must occur in chronological order + * corresponding to the configured order of milestones. If the result + * of this request would cause any milestone(s) to appear out of place, + * a 422 response will instead be returned. This includes milestones + * not explicitly submitted or updated in this request. */ - async setAlertAsPrimary( - request: operations.SetIncidentAlertAsPrimaryRequest, + async bulkUpdateIncidentMilestones( + request: operations.BulkUpdateIncidentMilestonesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsSetAlertAsPrimary( + ): Promise { + return unwrapAsync(incidentsBulkUpdateIncidentMilestones( this, request, options, @@ -194,13 +240,16 @@ export class Incidents extends ClientSDK { } /** - * List attachments for an incident + * List incident milestones + * + * @remarks + * List times and durations for each milestone on an incident */ - async listAttachments( - request: operations.ListIncidentAttachmentsRequest, + async listIncidentMilestones( + request: operations.ListIncidentMilestonesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsListAttachments( + ): Promise { + return unwrapAsync(incidentsListIncidentMilestones( this, request, options, @@ -208,16 +257,16 @@ export class Incidents extends ClientSDK { } /** - * Create an attachment for an incident + * List related changes on an incident * * @remarks - * Allows adding image attachments to an incident + * List related changes that have been attached to an incident */ - async createAttachment( - request: operations.CreateIncidentAttachmentRequest, + async listIncidentChangeEvents( + request: operations.ListIncidentChangeEventsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateAttachment( + ): Promise { + return unwrapAsync(incidentsListIncidentChangeEvents( this, request, options, @@ -225,16 +274,16 @@ export class Incidents extends ClientSDK { } /** - * Get chat channel information for an incident + * Add a related change to an incident * * @remarks - * Gives chat channel information for the specified incident + * Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. */ - async getChannel( - request: operations.GetIncidentChannelRequest, + async createIncidentChangeEvent( + request: operations.CreateIncidentChangeEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsGetChannel( + ): Promise { + return unwrapAsync(incidentsCreateIncidentChangeEvent( this, request, options, @@ -242,16 +291,16 @@ export class Incidents extends ClientSDK { } /** - * Close an incident + * Update a change attached to an incident * * @remarks - * Closes an incident and optionally close all children + * Update a change attached to an incident */ - async close( - request: operations.CloseIncidentRequest, + async updateIncidentChangeEvent( + request: operations.UpdateIncidentChangeEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsClose( + ): Promise { + return unwrapAsync(incidentsUpdateIncidentChangeEvent( this, request, options, @@ -259,16 +308,16 @@ export class Incidents extends ClientSDK { } /** - * List events for an incident + * List status pages for an incident * * @remarks - * List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type. + * List status pages that are attached to an incident */ - async listEvents( - request: operations.ListIncidentEventsRequest, + async listIncidentStatusPages( + request: operations.ListIncidentStatusPagesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsListEvents( + ): Promise { + return unwrapAsync(incidentsListIncidentStatusPages( this, request, options, @@ -276,16 +325,16 @@ export class Incidents extends ClientSDK { } /** - * Get an incident event + * Add a status page to an incident * * @remarks - * Retrieve a single event for an incident + * Add a status page to an incident. */ - async getEvent( - request: operations.GetIncidentEventRequest, + async createIncidentStatusPage( + request: operations.CreateIncidentStatusPageRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsGetEvent( + ): Promise { + return unwrapAsync(incidentsCreateIncidentStatusPage( this, request, options, @@ -293,16 +342,16 @@ export class Incidents extends ClientSDK { } /** - * Delete an incident event + * List links on an incident * * @remarks - * Delete a single event for an incident + * List all the editable, external incident links attached to an incident */ - async deleteEvent( - request: operations.DeleteIncidentEventRequest, + async listIncidentLinks( + request: operations.ListIncidentLinksRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsDeleteEvent( + ): Promise { + return unwrapAsync(incidentsListIncidentLinks( this, request, options, @@ -310,16 +359,16 @@ export class Incidents extends ClientSDK { } /** - * Update an incident event + * Add a link to an incident * * @remarks - * Update a single event for an incident + * Allows adding adhoc links to an incident as an attachment */ - async updateEvent( - request: operations.UpdateIncidentEventRequest, + async createIncidentLink( + request: operations.CreateIncidentLinkRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateEvent( + ): Promise { + return unwrapAsync(incidentsCreateIncidentLink( this, request, options, @@ -327,16 +376,16 @@ export class Incidents extends ClientSDK { } /** - * Update votes for an incident event + * Update the external incident link * * @remarks - * Allows for upvoting or downvoting an event + * Update the external incident link attributes */ - async updateEventVotes( - request: operations.UpdateIncidentEventVotesRequest, + async updateIncidentLink( + request: operations.UpdateIncidentLinkRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateEventVotes( + ): Promise { + return unwrapAsync(incidentsUpdateIncidentLink( this, request, options, @@ -344,16 +393,16 @@ export class Incidents extends ClientSDK { } /** - * Get vote counts for an incident event + * Remove a link from an incident * * @remarks - * Returns the current vote counts for an object + * Remove a link from an incident */ - async getEventVoteStatus( - request: operations.GetIncidentEventVoteStatusRequest, + async deleteIncidentLink( + request: operations.DeleteIncidentLinkRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsGetEventVoteStatus( + ): Promise { + return unwrapAsync(incidentsDeleteIncidentLink( this, request, options, @@ -361,16 +410,16 @@ export class Incidents extends ClientSDK { } /** - * Create a chat message for an incident + * Update the attribution of a transcript * * @remarks - * Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. + * Update the attribution of a transcript */ - async createGenericChatMessage( - request: operations.CreateIncidentGenericChatMessageRequest, + async updateTranscriptAttribution( + request: operations.UpdateTranscriptAttributionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateGenericChatMessage( + ): Promise { + return unwrapAsync(incidentsUpdateTranscriptAttribution( this, request, options, @@ -378,16 +427,16 @@ export class Incidents extends ClientSDK { } /** - * Delete a chat message from an incident + * Lists all of the messages in the incident's transcript * * @remarks - * Delete an existing generic chat message on an incident. + * Retrieve the transcript for a specific incident */ - async deleteChatMessage( - request: operations.DeleteIncidentChatMessageRequest, + async listTranscriptEntries( + request: operations.ListTranscriptEntriesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsDeleteChatMessage( + ): Promise { + return unwrapAsync(incidentsListTranscriptEntries( this, request, options, @@ -395,16 +444,16 @@ export class Incidents extends ClientSDK { } /** - * Update a chat message in an incident + * Delete a transcript from an incident * * @remarks - * Update an existing generic chat message on an incident. + * Delete a transcript from an incident */ - async updateChatMessage( - request: operations.UpdateIncidentChatMessageRequest, + async deleteTranscriptEntry( + request: operations.DeleteTranscriptEntryRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateChatMessage( + ): Promise { + return unwrapAsync(incidentsDeleteTranscriptEntry( this, request, options, @@ -412,22 +461,16 @@ export class Incidents extends ClientSDK { } /** - * Replace all impacts for an incident + * Retrieve all conference bridges for an incident * * @remarks - * Allows updating an incident's impacted infrastructure, with the option to - * move the incident into a different milestone and provide a note to update - * the incident timeline and any attached status pages. If this method is - * requested with the PUT verb, impacts will be completely replaced with the - * information in the request body, even if not provided (effectively clearing - * all impacts). If this method is requested with the PATCH verb, the provided - * impacts will be added or updated, but no impacts will be removed. + * Retrieve all conference bridges for an incident */ - async updateImpacts( - request: operations.UpdateIncidentImpactsRequest, + async listIncidentConferenceBridges( + request: operations.ListIncidentConferenceBridgesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateImpacts( + ): Promise { + return unwrapAsync(incidentsListIncidentConferenceBridges( this, request, options, @@ -435,22 +478,16 @@ export class Incidents extends ClientSDK { } /** - * Update impacts for an incident + * Retrieve the translations for a specific conference bridge * * @remarks - * Allows updating an incident's impacted infrastructure, with the option to - * move the incident into a different milestone and provide a note to update - * the incident timeline and any attached status pages. If this method is - * requested with the PUT verb, impacts will be completely replaced with the - * information in the request body, even if not provided (effectively clearing - * all impacts). If this method is requested with the PATCH verb, the provided - * impacts will be added or updated, but no impacts will be removed. + * Retrieve the translations for a specific conference bridge */ - async partialUpdateImpacts( - request: operations.PartialUpdateIncidentImpactsRequest, + async getConferenceBridgeTranslation( + request: operations.GetConferenceBridgeTranslationRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsPartialUpdateImpacts( + ): Promise { + return unwrapAsync(incidentsGetConferenceBridgeTranslation( this, request, options, @@ -458,16 +495,16 @@ export class Incidents extends ClientSDK { } /** - * List impacted infrastructure for an incident + * List similar incidents * * @remarks - * List impacted infrastructure on an incident by specifying type + * Retrieve a list of similar incidents */ - async listImpact( - request: operations.ListIncidentImpactRequest, + async listSimilarIncidents( + request: operations.ListSimilarIncidentsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsListImpact( + ): Promise { + return unwrapAsync(incidentsListSimilarIncidents( this, request, options, @@ -475,16 +512,16 @@ export class Incidents extends ClientSDK { } /** - * Add impacted infrastructure to an incident + * List attachments for an incident * * @remarks - * Add impacted infrastructure to an incident + * List attachments for an incident */ - async createImpact( - request: operations.CreateIncidentImpactRequest, + async listIncidentAttachments( + request: operations.ListIncidentAttachmentsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateImpact( + ): Promise { + return unwrapAsync(incidentsListIncidentAttachments( this, request, options, @@ -492,16 +529,16 @@ export class Incidents extends ClientSDK { } /** - * Remove impacted infrastructure from an incident + * Add an attachment to the incident timeline * * @remarks - * Remove impacted infrastructure on an incident + * Allows adding image attachments to an incident */ - async deleteImpact( - request: operations.DeleteIncidentImpactRequest, + async createIncidentAttachment( + request: operations.CreateIncidentAttachmentRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsDeleteImpact( + ): Promise { + return unwrapAsync(incidentsCreateIncidentAttachment( this, request, options, @@ -509,16 +546,16 @@ export class Incidents extends ClientSDK { } /** - * List links for an incident + * List events for an incident * * @remarks - * List all the editable, external incident links attached to an incident + * List all events for an incident. An event is a timeline entry. This can be filtered with params to retrieve events of a certain type. */ - async listLinks( - request: operations.ListIncidentLinksRequest, + async listIncidentEvents( + request: operations.ListIncidentEventsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsListLinks( + ): Promise { + return unwrapAsync(incidentsListIncidentEvents( this, request, options, @@ -526,16 +563,16 @@ export class Incidents extends ClientSDK { } /** - * Create a link for an incident + * Get an incident event * * @remarks - * Allows adding adhoc links to an incident as an attachment + * Retrieve a single event for an incident */ - async createLink( - request: operations.CreateIncidentLinkRequest, + async getIncidentEvent( + request: operations.GetIncidentEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateLink( + ): Promise { + return unwrapAsync(incidentsGetIncidentEvent( this, request, options, @@ -543,16 +580,16 @@ export class Incidents extends ClientSDK { } /** - * Update an external link for an incident + * Delete an incident event * * @remarks - * Updates the external incident link attributes + * Delete an event for an incident */ - async updateLink( - request: operations.UpdateIncidentLinkRequest, + async deleteIncidentEvent( + request: operations.DeleteIncidentEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateLink( + ): Promise { + return unwrapAsync(incidentsDeleteIncidentEvent( this, request, options, @@ -560,16 +597,16 @@ export class Incidents extends ClientSDK { } /** - * Delete an external link from an incident + * Update an incident event * * @remarks - * Deletes the external incident link + * Update a single event for an incident */ - async deleteLink( - request: operations.DeleteIncidentLinkRequest, + async updateIncidentEvent( + request: operations.UpdateIncidentEventRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsDeleteLink( + ): Promise { + return unwrapAsync(incidentsUpdateIncidentEvent( this, request, options, @@ -577,16 +614,22 @@ export class Incidents extends ClientSDK { } /** - * List milestones for an incident + * Update impacts for an incident * * @remarks - * List times and durations for each milestone on an incident + * Allows updating an incident's impacted infrastructure, with the option to + * move the incident into a different milestone and provide a note to update + * the incident timeline and any attached status pages. If this method is + * requested with the PUT verb, impacts will be completely replaced with the + * information in the request body, even if not provided (effectively clearing + * all impacts). If this method is requested with the PATCH verb, the provided + * impacts will be added or updated, but no impacts will be removed. */ - async listMilestones( - request: operations.ListIncidentMilestonesRequest, + async updateIncidentImpactPut( + request: operations.UpdateIncidentImpactPutRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsListMilestones( + ): Promise { + return unwrapAsync(incidentsUpdateIncidentImpactPut( this, request, options, @@ -594,21 +637,22 @@ export class Incidents extends ClientSDK { } /** - * Bulk update milestone timestamps for an incident + * Update impacts for an incident * * @remarks - * Update milestone times in bulk for a given incident. All milestone - * times for an incident must occur in chronological order - * corresponding to the configured order of milestones. If the result - * of this request would cause any milestone(s) to appear out of place, - * a 422 response will instead be returned. This includes milestones - * not explicitly submitted or updated in this request. + * Allows updating an incident's impacted infrastructure, with the option to + * move the incident into a different milestone and provide a note to update + * the incident timeline and any attached status pages. If this method is + * requested with the PUT verb, impacts will be completely replaced with the + * information in the request body, even if not provided (effectively clearing + * all impacts). If this method is requested with the PATCH verb, the provided + * impacts will be added or updated, but no impacts will be removed. */ - async updateMilestonesBulk( - request: operations.UpdateIncidentMilestonesBulkRequest, + async updateIncidentImpactPatch( + request: operations.UpdateIncidentImpactPatchRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateMilestonesBulk( + ): Promise { + return unwrapAsync(incidentsUpdateIncidentImpactPatch( this, request, options, @@ -616,16 +660,16 @@ export class Incidents extends ClientSDK { } /** - * Create a note for an incident + * List impacted infrastructure for an incident * * @remarks - * Create a new note on for an incident. The visibility field on a note determines where it gets posted. + * List impacted infrastructure on an incident by specifying type */ - async createNote( - request: operations.CreateIncidentNoteRequest, + async listIncidentImpacts( + request: operations.ListIncidentImpactsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateNote( + ): Promise { + return unwrapAsync(incidentsListIncidentImpacts( this, request, options, @@ -633,16 +677,16 @@ export class Incidents extends ClientSDK { } /** - * Update a note for an incident + * Add impacted infrastructure to an incident * * @remarks - * Updates the body of a note + * Add impacted infrastructure to an incident */ - async updateNote( - request: operations.UpdateIncidentNoteRequest, + async createIncidentImpact( + request: operations.CreateIncidentImpactRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateNote( + ): Promise { + return unwrapAsync(incidentsCreateIncidentImpact( this, request, options, @@ -650,16 +694,16 @@ export class Incidents extends ClientSDK { } /** - * List related changes for an incident + * Remove impacted infrastructure from an incident * * @remarks - * List related changes that have been attached to an incident + * Remove impacted infrastructure from an incident */ - async listRelatedChangeEvents( - request: operations.ListIncidentRelatedChangesRequest, + async deleteIncidentImpact( + request: operations.DeleteIncidentImpactRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsListRelatedChangeEvents( + ): Promise { + return unwrapAsync(incidentsDeleteIncidentImpact( this, request, options, @@ -667,16 +711,16 @@ export class Incidents extends ClientSDK { } /** - * Add a related change to an incident + * Add a note to an incident * * @remarks - * Add a related change to an incident. Changes added to an incident can be causes, fixes, or suspects. To remove a change from an incident, the type field should be set to dismissed. + * Create a new note on for an incident. The visibility field on a note determines where it gets posted. */ - async createRelatedChange( - request: operations.CreateIncidentRelatedChangeRequest, + async createIncidentNote( + request: operations.CreateIncidentNoteRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateRelatedChange( + ): Promise { + return unwrapAsync(incidentsCreateIncidentNote( this, request, options, @@ -684,16 +728,16 @@ export class Incidents extends ClientSDK { } /** - * Update a related change event for an incident + * Update a note * * @remarks - * Update a change attached to an incident + * Updates the body of a note */ - async updateRelatedChangeEvent( - request: operations.UpdateIncidentRelatedChangeEventRequest, + async updateIncidentNote( + request: operations.UpdateIncidentNoteRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUpdateRelatedChangeEvent( + ): Promise { + return unwrapAsync(incidentsUpdateIncidentNote( this, request, options, @@ -701,16 +745,16 @@ export class Incidents extends ClientSDK { } /** - * List incident relationships + * Add a chat message to an incident * * @remarks - * List any parent/child relationships for an incident + * Create a new generic chat message on an incident timeline. These are independent of any specific chat provider. */ - async getRelationships( - request: operations.GetIncidentRelationshipsRequest, + async createIncidentChatMessage( + request: operations.CreateIncidentChatMessageRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsGetRelationships( + ): Promise { + return unwrapAsync(incidentsCreateIncidentChatMessage( this, request, options, @@ -718,16 +762,33 @@ export class Incidents extends ClientSDK { } /** - * Resolve an incident + * Delete a chat message from an incident * * @remarks - * Resolves a currently active incident + * Delete an existing generic chat message on an incident. */ - async resolve( - request: operations.ResolveIncidentRequest, + async deleteIncidentChatMessage( + request: operations.DeleteIncidentChatMessageRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsResolve( + ): Promise { + return unwrapAsync(incidentsDeleteIncidentChatMessage( + this, + request, + options, + )); + } + + /** + * Update a chat message on an incident + * + * @remarks + * Update an existing generic chat message on an incident. + */ + async updateIncidentChatMessage( + request: operations.UpdateIncidentChatMessageRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentsUpdateIncidentChatMessage( this, request, options, @@ -735,16 +796,16 @@ export class Incidents extends ClientSDK { } /** - * List role assignments for an incident + * List incident assignees * * @remarks * Retrieve a list of all of the current role assignments for the incident */ - async listRoleAssignments( + async listIncidentRoleAssignments( request: operations.ListIncidentRoleAssignmentsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsListRoleAssignments( + return unwrapAsync(incidentsListIncidentRoleAssignments( this, request, options, @@ -752,16 +813,16 @@ export class Incidents extends ClientSDK { } /** - * Create a role assignment for an incident + * Assign a user to an incident * * @remarks * Assign a role to a user for this incident */ - async createRoleAssignment( + async createIncidentRoleAssignment( request: operations.CreateIncidentRoleAssignmentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsCreateRoleAssignment( + return unwrapAsync(incidentsCreateIncidentRoleAssignment( this, request, options, @@ -769,16 +830,16 @@ export class Incidents extends ClientSDK { } /** - * Delete a role assignment from an incident + * Unassign a user from an incident * * @remarks * Unassign a role from a user */ - async deleteRoleAssignment( + async deleteIncidentRoleAssignment( request: operations.DeleteIncidentRoleAssignmentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsDeleteRoleAssignment( + return unwrapAsync(incidentsDeleteIncidentRoleAssignment( this, request, options, @@ -786,13 +847,16 @@ export class Incidents extends ClientSDK { } /** - * List similar incidents + * Assign a team to an incident + * + * @remarks + * Assign a team for this incident */ - async listSimilar( - request: operations.GetSimilarIncidentsRequest, + async createIncidentTeamAssignment( + request: operations.CreateIncidentTeamAssignmentRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsListSimilar( + return unwrapAsync(incidentsCreateIncidentTeamAssignment( this, request, options, @@ -800,16 +864,16 @@ export class Incidents extends ClientSDK { } /** - * List status pages for an incident + * Unassign a team from an incident * * @remarks - * List status pages that are attached to an incident + * Unassign a team from an incident */ - async listStatusPages( - request: operations.ListIncidentStatusPagesRequest, + async deleteIncidentTeamAssignment( + request: operations.DeleteIncidentTeamAssignmentRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsListStatusPages( + ): Promise { + return unwrapAsync(incidentsDeleteIncidentTeamAssignment( this, request, options, @@ -817,16 +881,16 @@ export class Incidents extends ClientSDK { } /** - * Add a status page to an incident + * Get the current user's incident role * * @remarks - * Add a status page to an incident. + * Retrieve a user with current roles for an incident */ - async addStatusPage( - request: operations.CreateIncidentStatusPageRequest, + async getIncidentUser( + request: operations.GetIncidentUserRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsAddStatusPage( + ): Promise { + return unwrapAsync(incidentsGetIncidentUser( this, request, options, @@ -834,16 +898,16 @@ export class Incidents extends ClientSDK { } /** - * Add tasks from a task list to an incident + * List incident relationships * * @remarks - * Add all tasks from list to incident + * List any parent/child relationships for an incident */ - async createTaskList( - request: operations.CreateIncidentTaskListRequest, + async getIncidentRelationships( + request: operations.GetIncidentRelationshipsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateTaskList( + ): Promise { + return unwrapAsync(incidentsGetIncidentRelationships( this, request, options, @@ -851,16 +915,16 @@ export class Incidents extends ClientSDK { } /** - * Assign a team to an incident + * List scheduled maintenance events * * @remarks - * Assign a team for this incident + * Lists all scheduled maintenance events */ - async createTeamAssignment( - request: operations.CreateIncidentTeamAssignmentRequest, + async listScheduledMaintenances( + request: operations.ListScheduledMaintenancesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsCreateTeamAssignment( + ): Promise { + return unwrapAsync(incidentsListScheduledMaintenances( this, request, options, @@ -868,16 +932,16 @@ export class Incidents extends ClientSDK { } /** - * Remove a team assignment from an incident + * Create a scheduled maintenance event * * @remarks - * Unassign a team from an incident + * Create a new scheduled maintenance event */ - async deleteTeamAssignment( - request: operations.DeleteIncidentTeamAssignmentRequest, + async createScheduledMaintenance( + request: components.CreateScheduledMaintenance, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsDeleteTeamAssignment( + ): Promise { + return unwrapAsync(incidentsCreateScheduledMaintenance( this, request, options, @@ -885,16 +949,16 @@ export class Incidents extends ClientSDK { } /** - * List transcript messages for an incident + * Get a scheduled maintenance event * * @remarks - * Retrieve the transcript for a specific incident + * Fetch the details of a scheduled maintenance event. */ - async getTranscript( - request: operations.GetIncidentTranscriptRequest, + async getScheduledMaintenance( + request: operations.GetScheduledMaintenanceRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsGetTranscript( + ): Promise { + return unwrapAsync(incidentsGetScheduledMaintenance( this, request, options, @@ -902,13 +966,16 @@ export class Incidents extends ClientSDK { } /** - * Delete a transcript from an incident + * Delete a scheduled maintenance event + * + * @remarks + * Delete a scheduled maintenance event, preventing it from taking place. */ - async deleteTranscript( - request: operations.DeleteIncidentTranscriptRequest, + async deleteScheduledMaintenance( + request: operations.DeleteScheduledMaintenanceRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentsDeleteTranscript( + return unwrapAsync(incidentsDeleteScheduledMaintenance( this, request, options, @@ -916,16 +983,16 @@ export class Incidents extends ClientSDK { } /** - * Unarchive an incident + * Update a scheduled maintenance event * * @remarks - * Unarchives an incident + * Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes. */ - async unarchive( - request: operations.UnarchiveIncidentRequest, + async updateScheduledMaintenance( + request: operations.UpdateScheduledMaintenanceRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsUnarchive( + ): Promise { + return unwrapAsync(incidentsUpdateScheduledMaintenance( this, request, options, @@ -933,16 +1000,33 @@ export class Incidents extends ClientSDK { } /** - * Get a user's role in an incident + * Get the current user's vote status for an AI-generated incident summary * * @remarks - * Retrieve a user with current roles for an incident + * Get the current user's vote status for an AI-generated incident summary */ - async getUserRole( - request: operations.GetIncidentUserRoleRequest, + async getAiIncidentSummaryVoteStatus( + request: operations.GetAiIncidentSummaryVoteStatusRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentsGetUserRole( + ): Promise { + return unwrapAsync(incidentsGetAiIncidentSummaryVoteStatus( + this, + request, + options, + )); + } + + /** + * Vote on an AI-generated incident summary + * + * @remarks + * Vote on an AI-generated incident summary for the current user + */ + async voteAiIncidentSummary( + request: operations.VoteAiIncidentSummaryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentsVoteAiIncidentSummary( this, request, options, diff --git a/src/sdk/incidentsettings.ts b/src/sdk/incidentsettings.ts index a27dd648..d4071a01 100644 --- a/src/sdk/incidentsettings.ts +++ b/src/sdk/incidentsettings.ts @@ -2,50 +2,53 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { incidentSettingsArchiveIncidentType } from "../funcs/incidentSettingsArchiveIncidentType.js"; import { incidentSettingsCreateCustomFieldDefinition } from "../funcs/incidentSettingsCreateCustomFieldDefinition.js"; -import { incidentSettingsCreateImpact } from "../funcs/incidentSettingsCreateImpact.js"; import { incidentSettingsCreateIncidentRole } from "../funcs/incidentSettingsCreateIncidentRole.js"; import { incidentSettingsCreateIncidentType } from "../funcs/incidentSettingsCreateIncidentType.js"; -import { incidentSettingsCreateMilestone } from "../funcs/incidentSettingsCreateMilestone.js"; +import { incidentSettingsCreateLifecycleMeasurementDefinition } from "../funcs/incidentSettingsCreateLifecycleMeasurementDefinition.js"; +import { incidentSettingsCreateLifecycleMilestone } from "../funcs/incidentSettingsCreateLifecycleMilestone.js"; import { incidentSettingsCreatePriority } from "../funcs/incidentSettingsCreatePriority.js"; import { incidentSettingsCreateSeverity } from "../funcs/incidentSettingsCreateSeverity.js"; import { incidentSettingsCreateSeverityMatrixCondition } from "../funcs/incidentSettingsCreateSeverityMatrixCondition.js"; -import { incidentSettingsCreateTicketingPriority } from "../funcs/incidentSettingsCreateTicketingPriority.js"; +import { incidentSettingsCreateSeverityMatrixImpact } from "../funcs/incidentSettingsCreateSeverityMatrixImpact.js"; import { incidentSettingsDeleteCustomFieldDefinition } from "../funcs/incidentSettingsDeleteCustomFieldDefinition.js"; +import { incidentSettingsDeleteIncidentRole } from "../funcs/incidentSettingsDeleteIncidentRole.js"; +import { incidentSettingsDeleteIncidentType } from "../funcs/incidentSettingsDeleteIncidentType.js"; +import { incidentSettingsDeleteLifecycleMeasurementDefinition } from "../funcs/incidentSettingsDeleteLifecycleMeasurementDefinition.js"; import { incidentSettingsDeleteLifecycleMilestone } from "../funcs/incidentSettingsDeleteLifecycleMilestone.js"; import { incidentSettingsDeletePriority } from "../funcs/incidentSettingsDeletePriority.js"; -import { incidentSettingsDeleteRole } from "../funcs/incidentSettingsDeleteRole.js"; import { incidentSettingsDeleteSeverity } from "../funcs/incidentSettingsDeleteSeverity.js"; import { incidentSettingsDeleteSeverityMatrixCondition } from "../funcs/incidentSettingsDeleteSeverityMatrixCondition.js"; import { incidentSettingsDeleteSeverityMatrixImpact } from "../funcs/incidentSettingsDeleteSeverityMatrixImpact.js"; import { incidentSettingsGetFormConfiguration } from "../funcs/incidentSettingsGetFormConfiguration.js"; import { incidentSettingsGetIncidentRole } from "../funcs/incidentSettingsGetIncidentRole.js"; import { incidentSettingsGetIncidentType } from "../funcs/incidentSettingsGetIncidentType.js"; +import { incidentSettingsGetLifecycleMeasurementDefinition } from "../funcs/incidentSettingsGetLifecycleMeasurementDefinition.js"; import { incidentSettingsGetPriority } from "../funcs/incidentSettingsGetPriority.js"; import { incidentSettingsGetSeverity } from "../funcs/incidentSettingsGetSeverity.js"; import { incidentSettingsGetSeverityMatrix } from "../funcs/incidentSettingsGetSeverityMatrix.js"; import { incidentSettingsGetSeverityMatrixCondition } from "../funcs/incidentSettingsGetSeverityMatrixCondition.js"; import { incidentSettingsListCustomFieldDefinitions } from "../funcs/incidentSettingsListCustomFieldDefinitions.js"; +import { incidentSettingsListCustomFieldSelectOptions } from "../funcs/incidentSettingsListCustomFieldSelectOptions.js"; +import { incidentSettingsListIncidentRoles } from "../funcs/incidentSettingsListIncidentRoles.js"; import { incidentSettingsListIncidentTags } from "../funcs/incidentSettingsListIncidentTags.js"; import { incidentSettingsListIncidentTypes } from "../funcs/incidentSettingsListIncidentTypes.js"; +import { incidentSettingsListLifecycleMeasurementDefinitions } from "../funcs/incidentSettingsListLifecycleMeasurementDefinitions.js"; import { incidentSettingsListLifecyclePhases } from "../funcs/incidentSettingsListLifecyclePhases.js"; import { incidentSettingsListPriorities } from "../funcs/incidentSettingsListPriorities.js"; -import { incidentSettingsListRoles } from "../funcs/incidentSettingsListRoles.js"; -import { incidentSettingsListSelectOptions } from "../funcs/incidentSettingsListSelectOptions.js"; import { incidentSettingsListSeverities } from "../funcs/incidentSettingsListSeverities.js"; import { incidentSettingsListSeverityMatrixConditions } from "../funcs/incidentSettingsListSeverityMatrixConditions.js"; import { incidentSettingsListSeverityMatrixImpacts } from "../funcs/incidentSettingsListSeverityMatrixImpacts.js"; -import { incidentSettingsListTicketingPriorities } from "../funcs/incidentSettingsListTicketingPriorities.js"; -import { incidentSettingsUpdateCondition } from "../funcs/incidentSettingsUpdateCondition.js"; import { incidentSettingsUpdateCustomFieldDefinition } from "../funcs/incidentSettingsUpdateCustomFieldDefinition.js"; -import { incidentSettingsUpdateImpact } from "../funcs/incidentSettingsUpdateImpact.js"; import { incidentSettingsUpdateIncidentRole } from "../funcs/incidentSettingsUpdateIncidentRole.js"; +import { incidentSettingsUpdateIncidentType } from "../funcs/incidentSettingsUpdateIncidentType.js"; +import { incidentSettingsUpdateLifecycleMeasurementDefinition } from "../funcs/incidentSettingsUpdateLifecycleMeasurementDefinition.js"; import { incidentSettingsUpdateLifecycleMilestone } from "../funcs/incidentSettingsUpdateLifecycleMilestone.js"; import { incidentSettingsUpdatePriority } from "../funcs/incidentSettingsUpdatePriority.js"; import { incidentSettingsUpdateSeverity } from "../funcs/incidentSettingsUpdateSeverity.js"; import { incidentSettingsUpdateSeverityMatrix } from "../funcs/incidentSettingsUpdateSeverityMatrix.js"; -import { incidentSettingsUpdateType } from "../funcs/incidentSettingsUpdateType.js"; +import { incidentSettingsUpdateSeverityMatrixCondition } from "../funcs/incidentSettingsUpdateSeverityMatrixCondition.js"; +import { incidentSettingsUpdateSeverityMatrixImpact } from "../funcs/incidentSettingsUpdateSeverityMatrixImpact.js"; import { incidentSettingsValidateIncidentTags } from "../funcs/incidentSettingsValidateIncidentTags.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; @@ -54,31 +57,33 @@ import { unwrapAsync } from "../types/fp.js"; export class IncidentSettings extends ClientSDK { /** - * List custom field definitions + * List incident roles * * @remarks - * List all custom field definitions + * List all of the incident roles in the organization */ - async listCustomFieldDefinitions( + async listIncidentRoles( + request: operations.ListIncidentRolesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsListCustomFieldDefinitions( + ): Promise { + return unwrapAsync(incidentSettingsListIncidentRoles( this, + request, options, )); } /** - * Create a custom field definition + * Create an incident role * * @remarks - * Create a new custom field definition + * Create a new incident role */ - async createCustomFieldDefinition( - request: components.PostV1CustomFieldsDefinitions, + async createIncidentRole( + request: components.CreateIncidentRole, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsCreateCustomFieldDefinition( + ): Promise { + return unwrapAsync(incidentSettingsCreateIncidentRole( this, request, options, @@ -86,16 +91,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Delete a custom field definition + * Get an incident role * * @remarks - * Delete a custom field definition + * Retrieve a single incident role from its ID */ - async deleteCustomFieldDefinition( - request: operations.DeleteCustomFieldDefinitionRequest, + async getIncidentRole( + request: operations.GetIncidentRoleRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsDeleteCustomFieldDefinition( + ): Promise { + return unwrapAsync(incidentSettingsGetIncidentRole( this, request, options, @@ -103,16 +108,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Update a custom field definition + * Archive an incident role * * @remarks - * Update a single custom field definition + * Archives an incident role which will hide it from lists and metrics */ - async updateCustomFieldDefinition( - request: operations.UpdateCustomFieldDefinitionRequest, + async deleteIncidentRole( + request: operations.DeleteIncidentRoleRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsUpdateCustomFieldDefinition( + ): Promise { + return unwrapAsync(incidentSettingsDeleteIncidentRole( this, request, options, @@ -120,16 +125,16 @@ export class IncidentSettings extends ClientSDK { } /** - * List select options for a custom field + * Update an incident role * * @remarks - * Get the permissible values for the a currently active custom select or multi-select field. + * Update a single incident role from its ID */ - async listSelectOptions( - request: operations.GetCustomFieldSelectOptionsRequest, + async updateIncidentRole( + request: operations.UpdateIncidentRoleRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsListSelectOptions( + ): Promise { + return unwrapAsync(incidentSettingsUpdateIncidentRole( this, request, options, @@ -137,13 +142,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Get a form configuration + * Validate incident tags + * + * @remarks + * Validate the format of a list of tags */ - async getFormConfiguration( - request: operations.GetFormConfigurationRequest, + async validateIncidentTags( + request: Array, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsGetFormConfiguration( + ): Promise { + return unwrapAsync(incidentSettingsValidateIncidentTags( this, request, options, @@ -151,16 +159,16 @@ export class IncidentSettings extends ClientSDK { } /** - * List incident roles + * List incident tags * * @remarks - * List all of the incident roles in the organization + * List all of the incident tags in the organization */ - async listRoles( - request: operations.ListIncidentRolesRequest, + async listIncidentTags( + request: operations.ListIncidentTagsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsListRoles( + ): Promise { + return unwrapAsync(incidentSettingsListIncidentTags( this, request, options, @@ -168,16 +176,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Create an incident role + * List incident types * * @remarks - * Create a new incident role + * List all of the incident types in the organization */ - async createIncidentRole( - request: components.PostV1IncidentRoles, + async listIncidentTypes( + request: operations.ListIncidentTypesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsCreateIncidentRole( + ): Promise { + return unwrapAsync(incidentSettingsListIncidentTypes( this, request, options, @@ -185,16 +193,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Get an incident role + * Create an incident type * * @remarks - * Retrieve a single incident role from its ID + * Create a new incident type */ - async getIncidentRole( - request: operations.GetIncidentRoleRequest, + async createIncidentType( + request: components.CreateIncidentType, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsGetIncidentRole( + ): Promise { + return unwrapAsync(incidentSettingsCreateIncidentType( this, request, options, @@ -202,16 +210,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Archive an incident role + * Get an incident type * * @remarks - * Archives an incident role which will hide it from lists and metrics + * Retrieve a single incident type from its ID */ - async deleteRole( - request: operations.DeleteIncidentRoleRequest, + async getIncidentType( + request: operations.GetIncidentTypeRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsDeleteRole( + ): Promise { + return unwrapAsync(incidentSettingsGetIncidentType( this, request, options, @@ -219,16 +227,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Update an incident role + * Archive an incident type * * @remarks - * Update a single incident role from its ID + * Archives an incident type which will hide it from lists and metrics */ - async updateIncidentRole( - request: operations.UpdateIncidentRoleRequest, + async deleteIncidentType( + request: operations.DeleteIncidentTypeRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsUpdateIncidentRole( + ): Promise { + return unwrapAsync(incidentSettingsDeleteIncidentType( this, request, options, @@ -236,16 +244,16 @@ export class IncidentSettings extends ClientSDK { } /** - * List incident tags + * Update an incident type * * @remarks - * List all of the incident tags in the organization + * Update a single incident type from its ID */ - async listIncidentTags( - request: operations.ListIncidentTagsRequest, + async updateIncidentType( + request: operations.UpdateIncidentTypeRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsListIncidentTags( + ): Promise { + return unwrapAsync(incidentSettingsUpdateIncidentType( this, request, options, @@ -253,16 +261,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Validate incident tags + * List measurement definitions * * @remarks - * Validate the format of a list of tags + * List all of the measurement definitions in the organization */ - async validateIncidentTags( - request: Array, + async listLifecycleMeasurementDefinitions( + request: operations.ListLifecycleMeasurementDefinitionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsValidateIncidentTags( + ): Promise { + return unwrapAsync(incidentSettingsListLifecycleMeasurementDefinitions( this, request, options, @@ -270,16 +278,16 @@ export class IncidentSettings extends ClientSDK { } /** - * List incident types + * Create a measurement definition * * @remarks - * List all of the incident types in the organization + * Create a new measurement definition */ - async listIncidentTypes( - request: operations.ListIncidentTypesRequest, + async createLifecycleMeasurementDefinition( + request: operations.CreateLifecycleMeasurementDefinitionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsListIncidentTypes( + ): Promise { + return unwrapAsync(incidentSettingsCreateLifecycleMeasurementDefinition( this, request, options, @@ -287,16 +295,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Create an incident type + * Get a measurement definition * * @remarks - * Create a new incident type + * Retrieve a single measurement definition from its ID */ - async createIncidentType( - request: components.PostV1IncidentTypes, + async getLifecycleMeasurementDefinition( + request: operations.GetLifecycleMeasurementDefinitionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsCreateIncidentType( + ): Promise { + return unwrapAsync(incidentSettingsGetLifecycleMeasurementDefinition( this, request, options, @@ -304,16 +312,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Get an incident type + * Archive a measurement definition * * @remarks - * Retrieve a single incident type from its ID + * Archives a measurement definition which will hide it from lists and metrics */ - async getIncidentType( - request: operations.GetIncidentTypeRequest, + async deleteLifecycleMeasurementDefinition( + request: operations.DeleteLifecycleMeasurementDefinitionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsGetIncidentType( + ): Promise { + return unwrapAsync(incidentSettingsDeleteLifecycleMeasurementDefinition( this, request, options, @@ -321,16 +329,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Archive an incident type + * Update a measurement definition * * @remarks - * Archives an incident type which will hide it from lists and metrics + * Update a single measurement definition from its ID */ - async archiveIncidentType( - request: operations.ArchiveIncidentTypeRequest, + async updateLifecycleMeasurementDefinition( + request: operations.UpdateLifecycleMeasurementDefinitionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsArchiveIncidentType( + ): Promise { + return unwrapAsync(incidentSettingsUpdateLifecycleMeasurementDefinition( this, request, options, @@ -338,33 +346,31 @@ export class IncidentSettings extends ClientSDK { } /** - * Update an incident type + * List phases and milestones * * @remarks - * Update a single incident type from its ID + * List all of the lifecycle phases and milestones in the organization */ - async updateType( - request: operations.UpdateIncidentTypeRequest, + async listLifecyclePhases( options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsUpdateType( + ): Promise { + return unwrapAsync(incidentSettingsListLifecyclePhases( this, - request, options, )); } /** - * Create a milestone for an incident lifecycle + * Create a milestone * * @remarks * Create a new milestone */ - async createMilestone( - request: operations.CreateLifecycleMilestoneRequestBody, + async createLifecycleMilestone( + request: operations.CreateLifecycleMilestoneRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentSettingsCreateMilestone( + return unwrapAsync(incidentSettingsCreateLifecycleMilestone( this, request, options, @@ -372,7 +378,7 @@ export class IncidentSettings extends ClientSDK { } /** - * Delete a lifecycle milestone + * Delete a milestone * * @remarks * Delete a milestone @@ -389,7 +395,7 @@ export class IncidentSettings extends ClientSDK { } /** - * Update a lifecycle milestone + * Update a milestone * * @remarks * Update a milestone @@ -405,21 +411,6 @@ export class IncidentSettings extends ClientSDK { )); } - /** - * List lifecycle phases and milestones - * - * @remarks - * List all of the lifecycle phases and milestones in the organization - */ - async listLifecyclePhases( - options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsListLifecyclePhases( - this, - options, - )); - } - /** * List priorities * @@ -444,7 +435,7 @@ export class IncidentSettings extends ClientSDK { * Create a new priority */ async createPriority( - request: components.PostV1Priorities, + request: components.CreatePriority, options?: RequestOptions, ): Promise { return unwrapAsync(incidentSettingsCreatePriority( @@ -529,7 +520,7 @@ export class IncidentSettings extends ClientSDK { * Create a new severity */ async createSeverity( - request: components.PostV1Severities, + request: components.CreateSeverity, options?: RequestOptions, ): Promise { return unwrapAsync(incidentSettingsCreateSeverity( @@ -612,7 +603,7 @@ export class IncidentSettings extends ClientSDK { * Update available severities and impacts in your organization's severity matrix. */ async updateSeverityMatrix( - request: components.PatchV1SeverityMatrix, + request: components.UpdateSeverityMatrix, options?: RequestOptions, ): Promise { return unwrapAsync(incidentSettingsUpdateSeverityMatrix( @@ -646,7 +637,7 @@ export class IncidentSettings extends ClientSDK { * Create a new condition */ async createSeverityMatrixCondition( - request: components.PostV1SeverityMatrixConditions, + request: components.CreateSeverityMatrixCondition, options?: RequestOptions, ): Promise { return unwrapAsync(incidentSettingsCreateSeverityMatrixCondition( @@ -658,11 +649,14 @@ export class IncidentSettings extends ClientSDK { /** * Get a severity matrix condition + * + * @remarks + * Retrieve a specific condition */ async getSeverityMatrixCondition( request: operations.GetSeverityMatrixConditionRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(incidentSettingsGetSeverityMatrixCondition( this, request, @@ -691,13 +685,13 @@ export class IncidentSettings extends ClientSDK { * Update a severity matrix condition * * @remarks - * Update a specific condition + * Update a severity matrix condition */ - async updateCondition( + async updateSeverityMatrixCondition( request: operations.UpdateSeverityMatrixConditionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentSettingsUpdateCondition( + return unwrapAsync(incidentSettingsUpdateSeverityMatrixCondition( this, request, options, @@ -727,11 +721,11 @@ export class IncidentSettings extends ClientSDK { * @remarks * Create a new impact */ - async createImpact( - request: components.PostV1SeverityMatrixImpacts, + async createSeverityMatrixImpact( + request: components.CreateSeverityMatrixImpact, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentSettingsCreateImpact( + return unwrapAsync(incidentSettingsCreateSeverityMatrixImpact( this, request, options, @@ -739,7 +733,7 @@ export class IncidentSettings extends ClientSDK { } /** - * Delete an impact from the severity matrix + * Delete a severity matrix impact * * @remarks * Delete a specific impact @@ -756,16 +750,16 @@ export class IncidentSettings extends ClientSDK { } /** - * Update an impact in the severity matrix + * Update a severity matrix impact * * @remarks - * Update a specific impact + * Update a severity matrix impact */ - async updateImpact( + async updateSeverityMatrixImpact( request: operations.UpdateSeverityMatrixImpactRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(incidentSettingsUpdateImpact( + return unwrapAsync(incidentSettingsUpdateSeverityMatrixImpact( this, request, options, @@ -773,31 +767,99 @@ export class IncidentSettings extends ClientSDK { } /** - * List ticketing priorities + * Delete a custom field definition * * @remarks - * List all ticketing priorities available to the organization + * Delete a custom field definition */ - async listTicketingPriorities( + async deleteCustomFieldDefinition( + request: operations.DeleteCustomFieldDefinitionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsListTicketingPriorities( + ): Promise { + return unwrapAsync(incidentSettingsDeleteCustomFieldDefinition( this, + request, options, )); } /** - * Create a ticketing priority + * Update a custom field definition * * @remarks - * Create a single ticketing priority + * Update a single custom field definition */ - async createTicketingPriority( - request: components.PostV1TicketingPriorities, + async updateCustomFieldDefinition( + request: operations.UpdateCustomFieldDefinitionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentSettingsUpdateCustomFieldDefinition( + this, + request, + options, + )); + } + + /** + * List custom field definitions + * + * @remarks + * List all custom field definitions + */ + async listCustomFieldDefinitions( + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentSettingsListCustomFieldDefinitions( + this, + options, + )); + } + + /** + * Create a custom field definition + * + * @remarks + * Create a new custom field definition + */ + async createCustomFieldDefinition( + request: components.CreateCustomFieldDefinition, + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentSettingsCreateCustomFieldDefinition( + this, + request, + options, + )); + } + + /** + * Get available values for a custom field + * + * @remarks + * Get the permissible values for the a currently active custom select or multi-select field. + */ + async listCustomFieldSelectOptions( + request: operations.ListCustomFieldSelectOptionsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(incidentSettingsListCustomFieldSelectOptions( + this, + request, + options, + )); + } + + /** + * Get a form configuration + * + * @remarks + * Get a form configuration + */ + async getFormConfiguration( + request: operations.GetFormConfigurationRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(incidentSettingsCreateTicketingPriority( + ): Promise { + return unwrapAsync(incidentSettingsGetFormConfiguration( this, request, options, diff --git a/src/sdk/infrastructures.ts b/src/sdk/infrastructures.ts deleted file mode 100644 index 20881cf2..00000000 --- a/src/sdk/infrastructures.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { infrastructuresList } from "../funcs/infrastructuresList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Infrastructures extends ClientSDK { - /** - * List catalog entries - * - * @remarks - * Lists functionality, service and environment objects - */ - async list( - request: operations.ListInfrastructuresRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(infrastructuresList( - this, - request, - options, - )); - } -} diff --git a/src/sdk/integrations.ts b/src/sdk/integrations.ts index a6ca03d4..0b2a526c 100644 --- a/src/sdk/integrations.ts +++ b/src/sdk/integrations.ts @@ -3,87 +3,123 @@ */ import { integrationsCreateConnection } from "../funcs/integrationsCreateConnection.js"; -import { integrationsCreateFieldMap } from "../funcs/integrationsCreateFieldMap.js"; -import { integrationsDeleteFieldMap } from "../funcs/integrationsDeleteFieldMap.js"; -import { integrationsDeletePriority } from "../funcs/integrationsDeletePriority.js"; -import { integrationsDeleteProjectConfig } from "../funcs/integrationsDeleteProjectConfig.js"; +import { integrationsCreateSlackEmojiAction } from "../funcs/integrationsCreateSlackEmojiAction.js"; +import { integrationsDeleteSlackEmojiAction } from "../funcs/integrationsDeleteSlackEmojiAction.js"; import { integrationsDeleteStatuspageConnection } from "../funcs/integrationsDeleteStatuspageConnection.js"; -import { integrationsGet } from "../funcs/integrationsGet.js"; -import { integrationsGetAvailableFields } from "../funcs/integrationsGetAvailableFields.js"; -import { integrationsGetFieldMapAvailableFields } from "../funcs/integrationsGetFieldMapAvailableFields.js"; -import { integrationsGetProjectConfigurationOptions } from "../funcs/integrationsGetProjectConfigurationOptions.js"; -import { integrationsGetProjectFieldOptions } from "../funcs/integrationsGetProjectFieldOptions.js"; -import { integrationsGetStatus } from "../funcs/integrationsGetStatus.js"; +import { integrationsGetAwsCloudtrailBatch } from "../funcs/integrationsGetAwsCloudtrailBatch.js"; +import { integrationsGetAwsConnection } from "../funcs/integrationsGetAwsConnection.js"; +import { integrationsGetIntegration } from "../funcs/integrationsGetIntegration.js"; +import { integrationsGetSlackEmojiAction } from "../funcs/integrationsGetSlackEmojiAction.js"; import { integrationsGetStatuspageConnection } from "../funcs/integrationsGetStatuspageConnection.js"; -import { integrationsGetTicket } from "../funcs/integrationsGetTicket.js"; -import { integrationsList } from "../funcs/integrationsList.js"; -import { integrationsListCloudtrailBatches } from "../funcs/integrationsListCloudtrailBatches.js"; +import { integrationsGetZendeskCustomerSupportIssue } from "../funcs/integrationsGetZendeskCustomerSupportIssue.js"; +import { integrationsListAuthedProviders } from "../funcs/integrationsListAuthedProviders.js"; +import { integrationsListAwsCloudtrailBatches } from "../funcs/integrationsListAwsCloudtrailBatches.js"; +import { integrationsListAwsCloudtrailBatchEvents } from "../funcs/integrationsListAwsCloudtrailBatchEvents.js"; +import { integrationsListAwsConnections } from "../funcs/integrationsListAwsConnections.js"; import { integrationsListConnections } from "../funcs/integrationsListConnections.js"; -import { integrationsListEmojiActions } from "../funcs/integrationsListEmojiActions.js"; -import { integrationsListProjects } from "../funcs/integrationsListProjects.js"; +import { integrationsListConnectionStatuses } from "../funcs/integrationsListConnectionStatuses.js"; +import { integrationsListConnectionStatusesBySlug } from "../funcs/integrationsListConnectionStatusesBySlug.js"; +import { integrationsListConnectionStatusesBySlugAndId } from "../funcs/integrationsListConnectionStatusesBySlugAndId.js"; +import { integrationsListFieldMapAvailableFields } from "../funcs/integrationsListFieldMapAvailableFields.js"; +import { integrationsListIntegrations } from "../funcs/integrationsListIntegrations.js"; +import { integrationsListSlackEmojiActions } from "../funcs/integrationsListSlackEmojiActions.js"; +import { integrationsListSlackUsergroups } from "../funcs/integrationsListSlackUsergroups.js"; +import { integrationsListSlackWorkspaces } from "../funcs/integrationsListSlackWorkspaces.js"; +import { integrationsListStatuspageConnectionPages } from "../funcs/integrationsListStatuspageConnectionPages.js"; +import { integrationsListStatuspageConnections } from "../funcs/integrationsListStatuspageConnections.js"; import { integrationsRefreshConnection } from "../funcs/integrationsRefreshConnection.js"; -import { integrationsUpdateCloudTrailBatch } from "../funcs/integrationsUpdateCloudTrailBatch.js"; +import { integrationsSearchConfluenceSpaces } from "../funcs/integrationsSearchConfluenceSpaces.js"; +import { integrationsSearchZendeskTickets } from "../funcs/integrationsSearchZendeskTickets.js"; +import { integrationsUpdateAuthedProvider } from "../funcs/integrationsUpdateAuthedProvider.js"; +import { integrationsUpdateAwsCloudtrailBatch } from "../funcs/integrationsUpdateAwsCloudtrailBatch.js"; +import { integrationsUpdateAwsConnection } from "../funcs/integrationsUpdateAwsConnection.js"; import { integrationsUpdateConnection } from "../funcs/integrationsUpdateConnection.js"; import { integrationsUpdateFieldMap } from "../funcs/integrationsUpdateFieldMap.js"; -import { integrationsUpdatePriority } from "../funcs/integrationsUpdatePriority.js"; -import { integrationsUpdateTicketingFieldMap } from "../funcs/integrationsUpdateTicketingFieldMap.js"; +import { integrationsUpdateSlackEmojiAction } from "../funcs/integrationsUpdateSlackEmojiAction.js"; +import { integrationsUpdateStatuspageConnection } from "../funcs/integrationsUpdateStatuspageConnection.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; -import { Aws } from "./aws.js"; -import { FirehydrantTypescriptSDKSlack } from "./firehydranttypescriptsdkslack.js"; -import { FirehydrantTypescriptSDKStatuspage } from "./firehydranttypescriptsdkstatuspage.js"; -import { FirehydrantTypescriptSDKTicketing } from "./firehydranttypescriptsdkticketing.js"; export class Integrations extends ClientSDK { - private _aws?: Aws; - get aws(): Aws { - return (this._aws ??= new Aws(this._options)); - } - - private _slack?: FirehydrantTypescriptSDKSlack; - get slack(): FirehydrantTypescriptSDKSlack { - return (this._slack ??= new FirehydrantTypescriptSDKSlack(this._options)); + /** + * List integrations + * + * @remarks + * Lists the available and configured integrations + */ + async listIntegrations( + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsListIntegrations( + this, + options, + )); } - private _statuspage?: FirehydrantTypescriptSDKStatuspage; - get statuspage(): FirehydrantTypescriptSDKStatuspage { - return (this._statuspage ??= new FirehydrantTypescriptSDKStatuspage( - this._options, + /** + * Get an integration + * + * @remarks + * Retrieve a single integration + */ + async getIntegration( + request: operations.GetIntegrationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsGetIntegration( + this, + request, + options, )); } - private _ticketing?: FirehydrantTypescriptSDKTicketing; - get ticketing(): FirehydrantTypescriptSDKTicketing { - return (this._ticketing ??= new FirehydrantTypescriptSDKTicketing( - this._options, + /** + * Update field mapping + * + * @remarks + * Update field mapping + */ + async updateFieldMap( + request: operations.UpdateFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsUpdateFieldMap( + this, + request, + options, )); } /** - * List all available integrations + * List available fields for field mapping + * + * @remarks + * Get a description of the fields to which data can be mapped */ - async list( + async listFieldMapAvailableFields( + request: operations.ListFieldMapAvailableFieldsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsList( + ): Promise { + return unwrapAsync(integrationsListFieldMapAvailableFields( this, + request, options, )); } /** - * List AWS CloudTrail batches + * Lists the available and configured integrations * * @remarks - * Lists CloudTrail batches for the authenticated organization. + * Lists the available and configured integrations */ - async listCloudtrailBatches( - request: operations.ListAwsCloudtrailBatchesRequest, + async listAuthedProviders( + request: operations.ListAuthedProvidersRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsListCloudtrailBatches( + ): Promise { + return unwrapAsync(integrationsListAuthedProviders( this, request, options, @@ -91,16 +127,16 @@ export class Integrations extends ClientSDK { } /** - * Update an AWS CloudTrail batch + * Get an authed provider * * @remarks - * Update a CloudTrail batch with new information. + * Retrieve a single authed provider */ - async updateCloudTrailBatch( - request: operations.UpdateAwsCloudTrailBatchRequest, + async updateAuthedProvider( + request: operations.UpdateAuthedProviderRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsUpdateCloudTrailBatch( + ): Promise { + return unwrapAsync(integrationsUpdateAuthedProvider( this, request, options, @@ -109,11 +145,14 @@ export class Integrations extends ClientSDK { /** * List integration connections + * + * @remarks + * List available integration connections */ async listConnections( - request: operations.ListIntegrationConnectionsRequest, + request: operations.ListConnectionsRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(integrationsListConnections( this, request, @@ -122,12 +161,15 @@ export class Integrations extends ClientSDK { } /** + * Create a new integration connection + * + * @remarks * Create a new integration connection */ async createConnection( - request: operations.CreateIntegrationConnectionRequest, + request: operations.CreateConnectionRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(integrationsCreateConnection( this, request, @@ -135,13 +177,33 @@ export class Integrations extends ClientSDK { )); } + /** + * Refresh an integration connection + * + * @remarks + * Refresh the integration connection with the provided data + */ + async refreshConnection( + request: operations.RefreshConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsRefreshConnection( + this, + request, + options, + )); + } + /** * Update an integration connection + * + * @remarks + * Update the integration connection with the provided data */ async updateConnection( - request: operations.UpdateIntegrationConnectionRequest, + request: operations.UpdateConnectionRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(integrationsUpdateConnection( this, request, @@ -150,13 +212,31 @@ export class Integrations extends ClientSDK { } /** - * Refresh an integration connection + * Get integration connection status + * + * @remarks + * Retrieve overall integration connection status */ - async refreshConnection( - request: operations.RefreshIntegrationConnectionRequest, + async listConnectionStatuses( options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsRefreshConnection( + ): Promise { + return unwrapAsync(integrationsListConnectionStatuses( + this, + options, + )); + } + + /** + * Get an integration connection status + * + * @remarks + * Retrieve a single integration connection status + */ + async listConnectionStatusesBySlug( + request: operations.ListConnectionStatusesBySlugRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsListConnectionStatusesBySlug( this, request, options, @@ -164,16 +244,16 @@ export class Integrations extends ClientSDK { } /** - * Update a field mapping configuration + * Get an integration connection status * * @remarks - * Update field map + * Retrieve a single integration connection status */ - async updateFieldMap( - request: operations.UpdateIntegrationFieldMapRequest, + async listConnectionStatusesBySlugAndId( + request: operations.ListConnectionStatusesBySlugAndIdRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsUpdateFieldMap( + ): Promise { + return unwrapAsync(integrationsListConnectionStatusesBySlugAndId( this, request, options, @@ -181,16 +261,16 @@ export class Integrations extends ClientSDK { } /** - * List available fields for field mapping + * List AWS connections * * @remarks - * Get a description of the fields to which data can be mapped + * Lists the available and configured AWS integration connections for the authenticated organization. */ - async getFieldMapAvailableFields( - request: operations.GetIntegrationFieldMapAvailableFieldsRequest, + async listAwsConnections( + request: operations.ListAwsConnectionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsGetFieldMapAvailableFields( + ): Promise { + return unwrapAsync(integrationsListAwsConnections( this, request, options, @@ -198,16 +278,16 @@ export class Integrations extends ClientSDK { } /** - * List Slack emoji actions + * Get an AWS connection * * @remarks - * Lists all slack emoji actions + * Retrieves the information about the AWS connection. */ - async listEmojiActions( - request: operations.ListSlackEmojiActionsRequest, + async getAwsConnection( + request: operations.GetAwsConnectionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsListEmojiActions( + ): Promise { + return unwrapAsync(integrationsGetAwsConnection( this, request, options, @@ -215,13 +295,16 @@ export class Integrations extends ClientSDK { } /** - * Get an integration status + * Update an AWS connection + * + * @remarks + * Update the AWS connection with the provided data. */ - async getStatus( - request: operations.GetIntegrationStatusRequest, + async updateAwsConnection( + request: operations.UpdateAwsConnectionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsGetStatus( + ): Promise { + return unwrapAsync(integrationsUpdateAwsConnection( this, request, options, @@ -229,16 +312,16 @@ export class Integrations extends ClientSDK { } /** - * Get a Statuspage connection + * List CloudTrail batches * * @remarks - * Retrieve the information about the Statuspage connection. + * Lists CloudTrail batches for the authenticated organization. */ - async getStatuspageConnection( - request: operations.GetStatuspageConnectionRequest, + async listAwsCloudtrailBatches( + request: operations.ListAwsCloudtrailBatchesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsGetStatuspageConnection( + ): Promise { + return unwrapAsync(integrationsListAwsCloudtrailBatches( this, request, options, @@ -246,16 +329,16 @@ export class Integrations extends ClientSDK { } /** - * Delete a Statuspage connection + * Get a CloudTrail batch * * @remarks - * Deletes the given Statuspage integration connection. + * Retrieve a single CloudTrail batch. */ - async deleteStatuspageConnection( - request: operations.DeleteStatuspageConnectionRequest, + async getAwsCloudtrailBatch( + request: operations.GetAwsCloudtrailBatchRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsDeleteStatuspageConnection( + ): Promise { + return unwrapAsync(integrationsGetAwsCloudtrailBatch( this, request, options, @@ -263,16 +346,16 @@ export class Integrations extends ClientSDK { } /** - * Get an integration + * Update a CloudTrail batch * * @remarks - * Retrieve a single integration + * Update a CloudTrail batch with new information. */ - async get( - request: operations.GetIntegrationRequest, + async updateAwsCloudtrailBatch( + request: operations.UpdateAwsCloudtrailBatchRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsGet( + ): Promise { + return unwrapAsync(integrationsUpdateAwsCloudtrailBatch( this, request, options, @@ -280,16 +363,16 @@ export class Integrations extends ClientSDK { } /** - * Delete a ticketing priority + * List events for an AWS CloudTrail batch * * @remarks - * Delete a single ticketing priority by ID + * List events for an AWS CloudTrail batch */ - async deletePriority( - request: operations.DeleteTicketingPriorityRequest, + async listAwsCloudtrailBatchEvents( + request: operations.ListAwsCloudtrailBatchEventsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsDeletePriority( + ): Promise { + return unwrapAsync(integrationsListAwsCloudtrailBatchEvents( this, request, options, @@ -297,16 +380,16 @@ export class Integrations extends ClientSDK { } /** - * Update a ticketing priority + * List Confluence spaces * * @remarks - * Update a single ticketing priority's attributes + * Lists available space keys for the Confluence integration connection. */ - async updatePriority( - request: operations.UpdateTicketingPriorityRequest, + async searchConfluenceSpaces( + request: operations.SearchConfluenceSpacesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsUpdatePriority( + ): Promise { + return unwrapAsync(integrationsSearchConfluenceSpaces( this, request, options, @@ -314,16 +397,16 @@ export class Integrations extends ClientSDK { } /** - * List ticketing projects + * List Slack workspaces * * @remarks - * List all ticketing projects available to the organization + * Lists all Slack workspaces */ - async listProjects( - request: operations.ListTicketingProjectsRequest, + async listSlackWorkspaces( + request: operations.ListSlackWorkspacesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsListProjects( + ): Promise { + return unwrapAsync(integrationsListSlackWorkspaces( this, request, options, @@ -331,13 +414,31 @@ export class Integrations extends ClientSDK { } /** - * List configuration options for a ticketing project + * List Slack user groups + * + * @remarks + * Lists all Slack user groups */ - async getProjectConfigurationOptions( - request: operations.GetTicketingProjectConfigurationOptionsRequest, + async listSlackUsergroups( + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsListSlackUsergroups( + this, + options, + )); + } + + /** + * List Slack emoji actions + * + * @remarks + * Lists Slack emoji actions + */ + async listSlackEmojiActions( + request: operations.ListSlackEmojiActionsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(integrationsGetProjectConfigurationOptions( + return unwrapAsync(integrationsListSlackEmojiActions( this, request, options, @@ -345,13 +446,16 @@ export class Integrations extends ClientSDK { } /** - * List configuration options for a ticketing project field + * Create a new Slack emoji action + * + * @remarks + * Creates a new Slack emoji action */ - async getProjectFieldOptions( - request: operations.GetTicketingProjectFieldOptionsRequest, + async createSlackEmojiAction( + request: operations.CreateSlackEmojiActionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(integrationsGetProjectFieldOptions( + return unwrapAsync(integrationsCreateSlackEmojiAction( this, request, options, @@ -359,16 +463,16 @@ export class Integrations extends ClientSDK { } /** - * Create a field mapping for a ticketing project + * Get a Slack emoji action * * @remarks - * Creates field map for a ticketing project + * Retrieves a Slack emoji action */ - async createFieldMap( - request: operations.CreateTicketingProjectFieldMapRequest, + async getSlackEmojiAction( + request: operations.GetSlackEmojiActionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsCreateFieldMap( + ): Promise { + return unwrapAsync(integrationsGetSlackEmojiAction( this, request, options, @@ -376,16 +480,16 @@ export class Integrations extends ClientSDK { } /** - * List available fields for ticket field mapping + * Delete a Slack emoji action * * @remarks - * Returns metadata for the fields that are available for field mapping. + * Deletes a Slack emoji action */ - async getAvailableFields( - request: operations.GetTicketingProjectAvailableFieldsRequest, + async deleteSlackEmojiAction( + request: operations.DeleteSlackEmojiActionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsGetAvailableFields( + ): Promise { + return unwrapAsync(integrationsDeleteSlackEmojiAction( this, request, options, @@ -393,16 +497,16 @@ export class Integrations extends ClientSDK { } /** - * Delete a field map for a ticketing project + * Update a Slack emoji action * * @remarks - * Archive field map for a ticketing project + * Updates a Slack emoji action */ - async deleteFieldMap( - request: operations.DeleteTicketingProjectFieldMapRequest, + async updateSlackEmojiAction( + request: operations.UpdateSlackEmojiActionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(integrationsDeleteFieldMap( + return unwrapAsync(integrationsUpdateSlackEmojiAction( this, request, options, @@ -410,16 +514,16 @@ export class Integrations extends ClientSDK { } /** - * Update a field map for a ticketing project + * List Statuspage connections * * @remarks - * Update field map for a ticketing project + * Lists the available and configured Statuspage integrations connections for the authenticated organization. */ - async updateTicketingFieldMap( - request: operations.UpdateTicketingProjectFieldMapRequest, + async listStatuspageConnections( + request: operations.ListStatuspageConnectionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsUpdateTicketingFieldMap( + ): Promise { + return unwrapAsync(integrationsListStatuspageConnections( this, request, options, @@ -427,16 +531,16 @@ export class Integrations extends ClientSDK { } /** - * Delete a ticketing project configuration + * Get a Statuspage connection * * @remarks - * Archive configuration for a ticketing project + * Retrieve the information about the Statuspage connection. */ - async deleteProjectConfig( - request: operations.DeleteTicketingProjectConfigRequest, + async getStatuspageConnection( + request: operations.GetStatuspageConnectionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsDeleteProjectConfig( + ): Promise { + return unwrapAsync(integrationsGetStatuspageConnection( this, request, options, @@ -444,16 +548,84 @@ export class Integrations extends ClientSDK { } /** - * Get a ticket + * Delete a Statuspage connection * * @remarks - * Retrieves a single ticket by ID + * Deletes the given Statuspage integration connection. */ - async getTicket( - request: operations.GetTicketRequest, + async deleteStatuspageConnection( + request: operations.DeleteStatuspageConnectionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(integrationsGetTicket( + ): Promise { + return unwrapAsync(integrationsDeleteStatuspageConnection( + this, + request, + options, + )); + } + + /** + * Update a Statuspage connection + * + * @remarks + * Update the given Statuspage integration connection. + */ + async updateStatuspageConnection( + request: operations.UpdateStatuspageConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsUpdateStatuspageConnection( + this, + request, + options, + )); + } + + /** + * List StatusPage pages for a connection + * + * @remarks + * Lists available page IDs for the Statuspage integration connection. + */ + async listStatuspageConnectionPages( + request: operations.ListStatuspageConnectionPagesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsListStatuspageConnectionPages( + this, + request, + options, + )); + } + + /** + * Search for Zendesk tickets + * + * @remarks + * Search for Zendesk tickets + */ + async searchZendeskTickets( + request: operations.SearchZendeskTicketsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsSearchZendeskTickets( + this, + request, + options, + )); + } + + /** + * Search for Zendesk tickets + * + * @remarks + * Search for Zendesk tickets + */ + async getZendeskCustomerSupportIssue( + request: operations.GetZendeskCustomerSupportIssueRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(integrationsGetZendeskCustomerSupportIssue( this, request, options, diff --git a/src/sdk/list.ts b/src/sdk/list.ts deleted file mode 100644 index 2215dd48..00000000 --- a/src/sdk/list.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { tasksListDelete } from "../funcs/tasksListDelete.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class List extends ClientSDK { - /** - * Delete a task list - * - * @remarks - * Delete a task list - */ - async delete( - request: operations.DeleteTaskListRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksListDelete( - this, - request, - options, - )); - } -} diff --git a/src/sdk/maintenances.ts b/src/sdk/maintenances.ts deleted file mode 100644 index 08a6f411..00000000 --- a/src/sdk/maintenances.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { maintenancesCreate } from "../funcs/maintenancesCreate.js"; -import { maintenancesDelete } from "../funcs/maintenancesDelete.js"; -import { maintenancesList } from "../funcs/maintenancesList.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Maintenances extends ClientSDK { - /** - * List scheduled maintenance events - * - * @remarks - * Lists all scheduled maintenance events - */ - async list( - request: operations.ListScheduledMaintenancesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(maintenancesList( - this, - request, - options, - )); - } - - /** - * Create a scheduled maintenance event - * - * @remarks - * Create a new scheduled maintenance event - */ - async create( - request: components.PostV1ScheduledMaintenances, - options?: RequestOptions, - ): Promise { - return unwrapAsync(maintenancesCreate( - this, - request, - options, - )); - } - - /** - * Delete a scheduled maintenance event - * - * @remarks - * Delete a scheduled maintenance event, preventing it from taking place. - */ - async delete( - request: operations.DeleteScheduledMaintenanceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(maintenancesDelete( - this, - request, - options, - )); - } -} diff --git a/src/sdk/metrics.ts b/src/sdk/metrics.ts deleted file mode 100644 index 8de41994..00000000 --- a/src/sdk/metrics.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { metricsGetInfrastructure } from "../funcs/metricsGetInfrastructure.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Metrics extends ClientSDK { - /** - * Get metrics for a specific catalog entry - * - * @remarks - * Return metrics for a specific component - */ - async getInfrastructure( - request: operations.GetInfrastructureMetricsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsGetInfrastructure( - this, - request, - options, - )); - } -} diff --git a/src/sdk/metricsreporting.ts b/src/sdk/metricsreporting.ts index cee1a733..7797e065 100644 --- a/src/sdk/metricsreporting.ts +++ b/src/sdk/metricsreporting.ts @@ -2,18 +2,20 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { metricsReportingCreateMeasurementDefinition } from "../funcs/metricsReportingCreateMeasurementDefinition.js"; import { metricsReportingCreateSavedSearch } from "../funcs/metricsReportingCreateSavedSearch.js"; -import { metricsReportingDeleteMeasurementDefinition } from "../funcs/metricsReportingDeleteMeasurementDefinition.js"; -import { metricsReportingGetMeanTime } from "../funcs/metricsReportingGetMeanTime.js"; -import { metricsReportingGetMeasurementDefinition } from "../funcs/metricsReportingGetMeasurementDefinition.js"; +import { metricsReportingDeleteSavedSearch } from "../funcs/metricsReportingDeleteSavedSearch.js"; +import { metricsReportingGetMeanTimeReport } from "../funcs/metricsReportingGetMeanTimeReport.js"; +import { metricsReportingGetSavedSearch } from "../funcs/metricsReportingGetSavedSearch.js"; +import { metricsReportingGetSignalsGroupedMetrics } from "../funcs/metricsReportingGetSignalsGroupedMetrics.js"; +import { metricsReportingGetSignalsMttxAnalytics } from "../funcs/metricsReportingGetSignalsMttxAnalytics.js"; +import { metricsReportingGetSignalsTimeseriesAnalytics } from "../funcs/metricsReportingGetSignalsTimeseriesAnalytics.js"; import { metricsReportingListIncidentMetrics } from "../funcs/metricsReportingListIncidentMetrics.js"; import { metricsReportingListInfrastructureMetrics } from "../funcs/metricsReportingListInfrastructureMetrics.js"; -import { metricsReportingListMeasurementDefinitions } from "../funcs/metricsReportingListMeasurementDefinitions.js"; -import { metricsReportingListRetrospectives } from "../funcs/metricsReportingListRetrospectives.js"; +import { metricsReportingListInfrastructureTypeMetrics } from "../funcs/metricsReportingListInfrastructureTypeMetrics.js"; +import { metricsReportingListRetrospectiveMetrics } from "../funcs/metricsReportingListRetrospectiveMetrics.js"; import { metricsReportingListSavedSearches } from "../funcs/metricsReportingListSavedSearches.js"; import { metricsReportingListUserInvolvementMetrics } from "../funcs/metricsReportingListUserInvolvementMetrics.js"; -import { metricsReportingUpdateMeasurementDefinition } from "../funcs/metricsReportingUpdateMeasurementDefinition.js"; +import { metricsReportingUpdateSavedSearch } from "../funcs/metricsReportingUpdateSavedSearch.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -21,16 +23,16 @@ import { unwrapAsync } from "../types/fp.js"; export class MetricsReporting extends ClientSDK { /** - * List measurement definitions + * Get mean time metrics for incidents * * @remarks - * List all of the measurement definitions in the organization + * Returns a report with time bucketed analytics data */ - async listMeasurementDefinitions( - request: operations.ListMeasurementDefinitionsRequest, + async getMeanTimeReport( + request: operations.GetMeanTimeReportRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingListMeasurementDefinitions( + ): Promise { + return unwrapAsync(metricsReportingGetMeanTimeReport( this, request, options, @@ -38,16 +40,16 @@ export class MetricsReporting extends ClientSDK { } /** - * Create a measurement definition + * List retrospective metrics * * @remarks - * Create a new measurement definition + * Returns a report with retrospective analytics data */ - async createMeasurementDefinition( - request: operations.CreateMeasurementDefinitionRequestBody, + async listRetrospectiveMetrics( + request: operations.ListRetrospectiveMetricsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingCreateMeasurementDefinition( + ): Promise { + return unwrapAsync(metricsReportingListRetrospectiveMetrics( this, request, options, @@ -55,16 +57,16 @@ export class MetricsReporting extends ClientSDK { } /** - * Get a measurement definition + * List user metrics * * @remarks - * Retrieve a single measurement definition from its ID + * Returns a report with time bucketed analytics data */ - async getMeasurementDefinition( - request: operations.GetMeasurementDefinitionRequest, + async listUserInvolvementMetrics( + request: operations.ListUserInvolvementMetricsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingGetMeasurementDefinition( + ): Promise { + return unwrapAsync(metricsReportingListUserInvolvementMetrics( this, request, options, @@ -72,16 +74,16 @@ export class MetricsReporting extends ClientSDK { } /** - * Archive a measurement definition + * List incident metrics and analytics * * @remarks - * Archives a measurement definition which will hide it from lists and metrics + * Returns a report with time bucketed analytics data */ - async deleteMeasurementDefinition( - request: operations.DeleteMeasurementDefinitionRequest, + async listIncidentMetrics( + request: operations.ListIncidentMetricsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingDeleteMeasurementDefinition( + ): Promise { + return unwrapAsync(metricsReportingListIncidentMetrics( this, request, options, @@ -89,16 +91,16 @@ export class MetricsReporting extends ClientSDK { } /** - * Update a measurement definition + * List metrics for a component type * * @remarks - * Update a single measurement definition from its ID + * Returns metrics for all components of a given type */ - async updateMeasurementDefinition( - request: operations.UpdateMeasurementDefinitionRequest, + async listInfrastructureTypeMetrics( + request: operations.ListInfrastructureTypeMetricsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingUpdateMeasurementDefinition( + ): Promise { + return unwrapAsync(metricsReportingListInfrastructureTypeMetrics( this, request, options, @@ -106,16 +108,16 @@ export class MetricsReporting extends ClientSDK { } /** - * List incident metrics and analytics + * Get metrics for a component * * @remarks - * Returns a report with time bucketed analytics data + * Return metrics for a specific component */ - async listIncidentMetrics( - request: operations.ListIncidentMetricsRequest, + async listInfrastructureMetrics( + request: operations.ListInfrastructureMetricsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingListIncidentMetrics( + ): Promise { + return unwrapAsync(metricsReportingListInfrastructureMetrics( this, request, options, @@ -123,16 +125,16 @@ export class MetricsReporting extends ClientSDK { } /** - * List retrospective metrics for a date range + * Get a saved search * * @remarks - * Returns a report with retrospective analytics data + * Retrieve a specific save search */ - async listRetrospectives( - request: operations.ListRetrospectiveMetricsRequest, + async getSavedSearch( + request: operations.GetSavedSearchRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingListRetrospectives( + ): Promise { + return unwrapAsync(metricsReportingGetSavedSearch( this, request, options, @@ -140,16 +142,16 @@ export class MetricsReporting extends ClientSDK { } /** - * List user involvement metrics + * Delete a saved search * * @remarks - * Returns a report with time bucketed analytics data + * Delete a specific saved search */ - async listUserInvolvementMetrics( - request: operations.ListUserInvolvementMetricsRequest, + async deleteSavedSearch( + request: operations.DeleteSavedSearchRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingListUserInvolvementMetrics( + ): Promise { + return unwrapAsync(metricsReportingDeleteSavedSearch( this, request, options, @@ -157,16 +159,16 @@ export class MetricsReporting extends ClientSDK { } /** - * List metrics for all services, environments, functionalities, or customers + * Update a saved search * * @remarks - * Returns metrics for all components of a given type + * Update a specific saved search */ - async listInfrastructureMetrics( - request: operations.ListInfrastructureMetricsRequest, + async updateSavedSearch( + request: operations.UpdateSavedSearchRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingListInfrastructureMetrics( + ): Promise { + return unwrapAsync(metricsReportingUpdateSavedSearch( this, request, options, @@ -174,16 +176,16 @@ export class MetricsReporting extends ClientSDK { } /** - * Get mean time metrics for incidents + * List saved searches * * @remarks - * Returns a report with time bucketed analytics data + * Lists saved searches */ - async getMeanTime( - request: operations.GetMeanTimeReportRequest, + async listSavedSearches( + request: operations.ListSavedSearchesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingGetMeanTime( + ): Promise { + return unwrapAsync(metricsReportingListSavedSearches( this, request, options, @@ -191,16 +193,16 @@ export class MetricsReporting extends ClientSDK { } /** - * List saved searches + * Create a saved search * * @remarks - * Lists save searches + * Create a new saved search for a particular resource type */ - async listSavedSearches( - request: operations.ListSavedSearchesRequest, + async createSavedSearch( + request: operations.CreateSavedSearchRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(metricsReportingListSavedSearches( + return unwrapAsync(metricsReportingCreateSavedSearch( this, request, options, @@ -208,16 +210,50 @@ export class MetricsReporting extends ClientSDK { } /** - * Create a saved search + * Generate timeseries alert metrics * * @remarks - * Create a new saved search for a particular resource type + * Generate a timeseries-based report of metrics for Signals alerts */ - async createSavedSearch( - request: operations.CreateSavedSearchRequest, + async getSignalsTimeseriesAnalytics( + request: operations.GetSignalsTimeseriesAnalyticsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(metricsReportingCreateSavedSearch( + ): Promise { + return unwrapAsync(metricsReportingGetSignalsTimeseriesAnalytics( + this, + request, + options, + )); + } + + /** + * Generate grouped alert metrics + * + * @remarks + * Generate a report of grouped metrics for Signals alerts + */ + async getSignalsGroupedMetrics( + request: operations.GetSignalsGroupedMetricsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(metricsReportingGetSignalsGroupedMetrics( + this, + request, + options, + )); + } + + /** + * Get MTTX analytics for signals + * + * @remarks + * Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts + */ + async getSignalsMttxAnalytics( + request: operations.GetSignalsMttxAnalyticsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(metricsReportingGetSignalsMttxAnalytics( this, request, options, diff --git a/src/sdk/oncallschedules.ts b/src/sdk/oncallschedules.ts deleted file mode 100644 index bc56261b..00000000 --- a/src/sdk/oncallschedules.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { onCallSchedulesDelete } from "../funcs/onCallSchedulesDelete.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class OnCallSchedules extends ClientSDK { - /** - * Delete an on-call schedule for a team - * - * @remarks - * Delete a Signals on-call schedule by ID - */ - async delete( - request: operations.DeleteTeamOnCallScheduleRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(onCallSchedulesDelete( - this, - request, - options, - )); - } -} diff --git a/src/sdk/projectconfigurations.ts b/src/sdk/projectconfigurations.ts deleted file mode 100644 index 4f8a083d..00000000 --- a/src/sdk/projectconfigurations.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { projectConfigurationsCreate } from "../funcs/projectConfigurationsCreate.js"; -import { projectConfigurationsGet } from "../funcs/projectConfigurationsGet.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class ProjectConfigurations extends ClientSDK { - /** - * Create a ticketing project configuration - * - * @remarks - * Creates configuration for a ticketing project - */ - async create( - request: operations.CreateTicketingProjectConfigurationRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(projectConfigurationsCreate( - this, - request, - options, - )); - } - - /** - * Get a ticketing project configuration - * - * @remarks - * Retrieve configuration for a ticketing project - */ - async get( - request: operations.GetTicketingProjectConfigRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(projectConfigurationsGet( - this, - request, - options, - )); - } -} diff --git a/src/sdk/retrospectives.ts b/src/sdk/retrospectives.ts index daf0e8a3..d538341e 100644 --- a/src/sdk/retrospectives.ts +++ b/src/sdk/retrospectives.ts @@ -2,20 +2,36 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { retrospectivesCreateReason } from "../funcs/retrospectivesCreateReason.js"; -import { retrospectivesCreateReport } from "../funcs/retrospectivesCreateReport.js"; -import { retrospectivesDeleteReason } from "../funcs/retrospectivesDeleteReason.js"; -import { retrospectivesGetQuestion } from "../funcs/retrospectivesGetQuestion.js"; -import { retrospectivesGetReport } from "../funcs/retrospectivesGetReport.js"; -import { retrospectivesListQuestions } from "../funcs/retrospectivesListQuestions.js"; -import { retrospectivesListReportReasons } from "../funcs/retrospectivesListReportReasons.js"; -import { retrospectivesListReports } from "../funcs/retrospectivesListReports.js"; -import { retrospectivesPublishReport } from "../funcs/retrospectivesPublishReport.js"; -import { retrospectivesUpdateField } from "../funcs/retrospectivesUpdateField.js"; -import { retrospectivesUpdateQuestions } from "../funcs/retrospectivesUpdateQuestions.js"; -import { retrospectivesUpdateReason } from "../funcs/retrospectivesUpdateReason.js"; -import { retrospectivesUpdateReport } from "../funcs/retrospectivesUpdateReport.js"; -import { retrospectivesUpdateReportReasonOrder } from "../funcs/retrospectivesUpdateReportReasonOrder.js"; +import { retrospectivesCreateIncidentRetrospective } from "../funcs/retrospectivesCreateIncidentRetrospective.js"; +import { retrospectivesCreateIncidentRetrospectiveDynamicInput } from "../funcs/retrospectivesCreateIncidentRetrospectiveDynamicInput.js"; +import { retrospectivesCreateIncidentRetrospectiveField } from "../funcs/retrospectivesCreateIncidentRetrospectiveField.js"; +import { retrospectivesCreatePostMortemReason } from "../funcs/retrospectivesCreatePostMortemReason.js"; +import { retrospectivesCreatePostMortemReport } from "../funcs/retrospectivesCreatePostMortemReport.js"; +import { retrospectivesCreateRetrospectiveTemplate } from "../funcs/retrospectivesCreateRetrospectiveTemplate.js"; +import { retrospectivesDeleteIncidentRetrospectiveDynamicInput } from "../funcs/retrospectivesDeleteIncidentRetrospectiveDynamicInput.js"; +import { retrospectivesDeletePostMortemReason } from "../funcs/retrospectivesDeletePostMortemReason.js"; +import { retrospectivesDeleteRetrospectiveTemplate } from "../funcs/retrospectivesDeleteRetrospectiveTemplate.js"; +import { retrospectivesExportIncidentRetrospectives } from "../funcs/retrospectivesExportIncidentRetrospectives.js"; +import { retrospectivesGetIncidentRetrospectiveField } from "../funcs/retrospectivesGetIncidentRetrospectiveField.js"; +import { retrospectivesGetPostMortemQuestion } from "../funcs/retrospectivesGetPostMortemQuestion.js"; +import { retrospectivesGetPostMortemReport } from "../funcs/retrospectivesGetPostMortemReport.js"; +import { retrospectivesGetRetrospectiveTemplate } from "../funcs/retrospectivesGetRetrospectiveTemplate.js"; +import { retrospectivesListIncidentRetrospectives } from "../funcs/retrospectivesListIncidentRetrospectives.js"; +import { retrospectivesListPostMortemQuestions } from "../funcs/retrospectivesListPostMortemQuestions.js"; +import { retrospectivesListPostMortemReasons } from "../funcs/retrospectivesListPostMortemReasons.js"; +import { retrospectivesListPostMortemReports } from "../funcs/retrospectivesListPostMortemReports.js"; +import { retrospectivesListRetrospectives } from "../funcs/retrospectivesListRetrospectives.js"; +import { retrospectivesListRetrospectiveTemplates } from "../funcs/retrospectivesListRetrospectiveTemplates.js"; +import { retrospectivesPublishPostMortemReport } from "../funcs/retrospectivesPublishPostMortemReport.js"; +import { retrospectivesReorderPostMortemReasons } from "../funcs/retrospectivesReorderPostMortemReasons.js"; +import { retrospectivesShareIncidentRetrospectives } from "../funcs/retrospectivesShareIncidentRetrospectives.js"; +import { retrospectivesUpdateIncidentRetrospective } from "../funcs/retrospectivesUpdateIncidentRetrospective.js"; +import { retrospectivesUpdateIncidentRetrospectiveField } from "../funcs/retrospectivesUpdateIncidentRetrospectiveField.js"; +import { retrospectivesUpdatePostMortemField } from "../funcs/retrospectivesUpdatePostMortemField.js"; +import { retrospectivesUpdatePostMortemQuestions } from "../funcs/retrospectivesUpdatePostMortemQuestions.js"; +import { retrospectivesUpdatePostMortemReason } from "../funcs/retrospectivesUpdatePostMortemReason.js"; +import { retrospectivesUpdatePostMortemReport } from "../funcs/retrospectivesUpdatePostMortemReport.js"; +import { retrospectivesUpdateRetrospectiveTemplate } from "../funcs/retrospectivesUpdateRetrospectiveTemplate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -23,16 +39,16 @@ import { unwrapAsync } from "../types/fp.js"; export class Retrospectives extends ClientSDK { /** - * List retrospective questions + * Share an incident's retrospective * * @remarks - * List the questions configured to be provided and filled out on each retrospective report. + * Share incident retrospectives with users or teams */ - async listQuestions( - request: operations.ListRetrospectiveQuestionsRequest, + async shareIncidentRetrospectives( + request: operations.ShareIncidentRetrospectivesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesListQuestions( + ): Promise { + return unwrapAsync(retrospectivesShareIncidentRetrospectives( this, request, options, @@ -40,16 +56,16 @@ export class Retrospectives extends ClientSDK { } /** - * Update retrospective questions + * Export an incident's retrospective(s) * * @remarks - * Update the questions configured to be provided and filled out on future retrospective reports. + * Export incident's retrospective(s) using their templates */ - async updateQuestions( - request: components.PutV1PostMortemsQuestions, + async exportIncidentRetrospectives( + request: operations.ExportIncidentRetrospectivesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesUpdateQuestions( + ): Promise { + return unwrapAsync(retrospectivesExportIncidentRetrospectives( this, request, options, @@ -57,16 +73,152 @@ export class Retrospectives extends ClientSDK { } /** - * Get a retrospective question + * All attached retrospectives for an incident * * @remarks - * Get an incident retrospective question + * Retrieve retrospectives attached to an incident */ - async getQuestion( - request: operations.GetRetrospectiveQuestionRequest, + async listIncidentRetrospectives( + request: operations.ListIncidentRetrospectivesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesGetQuestion( + ): Promise { + return unwrapAsync(retrospectivesListIncidentRetrospectives( + this, + request, + options, + )); + } + + /** + * Create a new retrospective on the incident using the template + * + * @remarks + * Create a new retrospective for an incident + */ + async createIncidentRetrospective( + request: operations.CreateIncidentRetrospectiveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesCreateIncidentRetrospective( + this, + request, + options, + )); + } + + /** + * Update a retrospective on the incident + * + * @remarks + * Update a retrospective attached to an incident + */ + async updateIncidentRetrospective( + request: operations.UpdateIncidentRetrospectiveRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesUpdateIncidentRetrospective( + this, + request, + options, + )); + } + + /** + * Appends a new incident retrospective field to an incident retrospective + * + * @remarks + * Add a new field to an incident retrospective + */ + async createIncidentRetrospectiveField( + request: operations.CreateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesCreateIncidentRetrospectiveField( + this, + request, + options, + )); + } + + /** + * Get a retrospective field + * + * @remarks + * Retrieve a field on an incident retrospective + */ + async getIncidentRetrospectiveField( + request: operations.GetIncidentRetrospectiveFieldRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesGetIncidentRetrospectiveField( + this, + request, + options, + )); + } + + /** + * Update the value on a retrospective field + * + * @remarks + * Update retrospective field value + */ + async updateIncidentRetrospectiveField( + request: operations.UpdateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesUpdateIncidentRetrospectiveField( + this, + request, + options, + )); + } + + /** + * Add a new dynamic input field to a retrospective's dynamic input group field + * + * @remarks + * Add a new dynamic input field to a dynamic input group + */ + async createIncidentRetrospectiveDynamicInput( + request: operations.CreateIncidentRetrospectiveDynamicInputRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesCreateIncidentRetrospectiveDynamicInput( + this, + request, + options, + )); + } + + /** + * Removes a dynamic input from a retrospective's dynamic input group field + * + * @remarks + * Delete a dynamic input on a dynamic input group + */ + async deleteIncidentRetrospectiveDynamicInput( + request: operations.DeleteIncidentRetrospectiveDynamicInputRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesDeleteIncidentRetrospectiveDynamicInput( + this, + request, + options, + )); + } + + /** + * List retrospective reports + * + * @remarks + * List all retrospective reports + */ + async listRetrospectives( + request: operations.ListRetrospectivesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesListRetrospectives( this, request, options, @@ -79,11 +231,11 @@ export class Retrospectives extends ClientSDK { * @remarks * List all reports */ - async listReports( - request: operations.ListRetrospectiveReportsRequest, + async listPostMortemReports( + request: operations.ListPostMortemReportsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(retrospectivesListReports( + return unwrapAsync(retrospectivesListPostMortemReports( this, request, options, @@ -96,11 +248,11 @@ export class Retrospectives extends ClientSDK { * @remarks * Create a report */ - async createReport( - request: components.PostV1PostMortemsReports, + async createPostMortemReport( + request: components.CreatePostMortemReport, options?: RequestOptions, ): Promise { - return unwrapAsync(retrospectivesCreateReport( + return unwrapAsync(retrospectivesCreatePostMortemReport( this, request, options, @@ -113,11 +265,11 @@ export class Retrospectives extends ClientSDK { * @remarks * Get a report */ - async getReport( + async getPostMortemReport( request: operations.GetPostMortemReportRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(retrospectivesGetReport( + return unwrapAsync(retrospectivesGetPostMortemReport( this, request, options, @@ -130,11 +282,11 @@ export class Retrospectives extends ClientSDK { * @remarks * Update a report */ - async updateReport( + async updatePostMortemReport( request: operations.UpdatePostMortemReportRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(retrospectivesUpdateReport( + return unwrapAsync(retrospectivesUpdatePostMortemReport( this, request, options, @@ -142,16 +294,84 @@ export class Retrospectives extends ClientSDK { } /** - * Update a retrospective field + * List contributing factors for a retrospective report * * @remarks - * Update a field value on a post mortem report + * List all contributing factors to an incident */ - async updateField( - request: operations.UpdateRetrospectiveFieldRequest, + async listPostMortemReasons( + request: operations.ListPostMortemReasonsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesUpdateField( + ): Promise { + return unwrapAsync(retrospectivesListPostMortemReasons( + this, + request, + options, + )); + } + + /** + * Create a contributing factor for a retrospective report + * + * @remarks + * Add a new contributing factor to an incident + */ + async createPostMortemReason( + request: operations.CreatePostMortemReasonRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesCreatePostMortemReason( + this, + request, + options, + )); + } + + /** + * Delete a contributing factor from a retrospective report + * + * @remarks + * Delete a contributing factor + */ + async deletePostMortemReason( + request: operations.DeletePostMortemReasonRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesDeletePostMortemReason( + this, + request, + options, + )); + } + + /** + * Update a contributing factor in a retrospective report + * + * @remarks + * Update a contributing factor + */ + async updatePostMortemReason( + request: operations.UpdatePostMortemReasonRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesUpdatePostMortemReason( + this, + request, + options, + )); + } + + /** + * Reorder a contributing factor for a retrospective report + * + * @remarks + * Update the order of contributing factors in a retrospective report + */ + async reorderPostMortemReasons( + request: operations.ReorderPostMortemReasonsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesReorderPostMortemReasons( this, request, options, @@ -164,11 +384,11 @@ export class Retrospectives extends ClientSDK { * @remarks * Marks an incident retrospective as published and emails all of the participants in the report the summary */ - async publishReport( - request: operations.PublishRetrospectiveReportRequest, + async publishPostMortemReport( + request: operations.PublishPostMortemReportRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(retrospectivesPublishReport( + return unwrapAsync(retrospectivesPublishPostMortemReport( this, request, options, @@ -176,16 +396,16 @@ export class Retrospectives extends ClientSDK { } /** - * List contributing factors for a retrospective report + * Update a retrospective field * * @remarks - * List all contributing factors to an incident + * Update a field value on a post mortem report */ - async listReportReasons( - request: operations.ListRetrospectiveReportReasonsRequest, + async updatePostMortemField( + request: operations.UpdatePostMortemFieldRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesListReportReasons( + ): Promise { + return unwrapAsync(retrospectivesUpdatePostMortemField( this, request, options, @@ -193,16 +413,16 @@ export class Retrospectives extends ClientSDK { } /** - * Create a contributing factor for a retrospective report + * List retrospective questions * * @remarks - * Add a new contributing factor to an incident + * List the questions configured to be provided and filled out on each retrospective report. */ - async createReason( - request: operations.CreateRetrospectiveReportReasonRequest, + async listPostMortemQuestions( + request: operations.ListPostMortemQuestionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesCreateReason( + ): Promise { + return unwrapAsync(retrospectivesListPostMortemQuestions( this, request, options, @@ -210,16 +430,16 @@ export class Retrospectives extends ClientSDK { } /** - * Update the order of contributing factors in a retrospective report + * Update retrospective questions * * @remarks - * Reorder a contributing factor + * Update the questions configured to be provided and filled out on future retrospective reports. */ - async updateReportReasonOrder( - request: operations.UpdateRetrospectiveReportReasonOrderRequest, + async updatePostMortemQuestions( + request: components.UpdatePostMortemQuestions, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesUpdateReportReasonOrder( + ): Promise { + return unwrapAsync(retrospectivesUpdatePostMortemQuestions( this, request, options, @@ -227,16 +447,16 @@ export class Retrospectives extends ClientSDK { } /** - * Delete a contributing factor from a retrospective report + * Get a retrospective question * * @remarks - * Delete a contributing factor + * Get an incident retrospective question configured to be provided and filled out on each retrospective report. */ - async deleteReason( - request: operations.DeleteRetrospectiveReasonRequest, + async getPostMortemQuestion( + request: operations.GetPostMortemQuestionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesDeleteReason( + ): Promise { + return unwrapAsync(retrospectivesGetPostMortemQuestion( this, request, options, @@ -244,16 +464,84 @@ export class Retrospectives extends ClientSDK { } /** - * Update a contributing factor in a retrospective report + * List retrospective templates * * @remarks - * Update a contributing factor + * List all retrospective templates */ - async updateReason( - request: operations.UpdateRetrospectiveReasonRequest, + async listRetrospectiveTemplates( + request: operations.ListRetrospectiveTemplatesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(retrospectivesUpdateReason( + ): Promise { + return unwrapAsync(retrospectivesListRetrospectiveTemplates( + this, + request, + options, + )); + } + + /** + * Create a retrospective template + * + * @remarks + * Create a new retrospective template + */ + async createRetrospectiveTemplate( + request: operations.CreateRetrospectiveTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesCreateRetrospectiveTemplate( + this, + request, + options, + )); + } + + /** + * Get a retrospective template + * + * @remarks + * Retrieve a single retrospective template by ID + */ + async getRetrospectiveTemplate( + request: operations.GetRetrospectiveTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesGetRetrospectiveTemplate( + this, + request, + options, + )); + } + + /** + * Delete a retrospective template + * + * @remarks + * Delete a single retrospective template + */ + async deleteRetrospectiveTemplate( + request: operations.DeleteRetrospectiveTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesDeleteRetrospectiveTemplate( + this, + request, + options, + )); + } + + /** + * Update a retrospective template + * + * @remarks + * Update a single retrospective template + */ + async updateRetrospectiveTemplate( + request: operations.UpdateRetrospectiveTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(retrospectivesUpdateRetrospectiveTemplate( this, request, options, diff --git a/src/sdk/runbooks.ts b/src/sdk/runbooks.ts index 86c9b935..40e4b9d2 100644 --- a/src/sdk/runbooks.ts +++ b/src/sdk/runbooks.ts @@ -2,98 +2,38 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { runbooksCreate } from "../funcs/runbooksCreate.js"; -import { runbooksCreateExecution } from "../funcs/runbooksCreateExecution.js"; -import { runbooksDelete } from "../funcs/runbooksDelete.js"; -import { runbooksGet } from "../funcs/runbooksGet.js"; -import { runbooksGetExecution } from "../funcs/runbooksGetExecution.js"; -import { runbooksGetExecutionStepScript } from "../funcs/runbooksGetExecutionStepScript.js"; -import { runbooksGetExecutionVoteStatus } from "../funcs/runbooksGetExecutionVoteStatus.js"; -import { runbooksGetStepVoteStatus } from "../funcs/runbooksGetStepVoteStatus.js"; -import { runbooksList } from "../funcs/runbooksList.js"; -import { runbooksListActions } from "../funcs/runbooksListActions.js"; -import { runbooksListAudits } from "../funcs/runbooksListAudits.js"; -import { runbooksListExecutions } from "../funcs/runbooksListExecutions.js"; -import { runbooksListSelectOptions } from "../funcs/runbooksListSelectOptions.js"; -import { runbooksUpdate } from "../funcs/runbooksUpdate.js"; -import { runbooksUpdateExecutionStep } from "../funcs/runbooksUpdateExecutionStep.js"; -import { runbooksUpdateExecutionStepScriptState } from "../funcs/runbooksUpdateExecutionStepScriptState.js"; -import { runbooksUpdateExecutionStepVotes } from "../funcs/runbooksUpdateExecutionStepVotes.js"; -import { runbooksUpdateExecutionVotes } from "../funcs/runbooksUpdateExecutionVotes.js"; +import { runbooksCreateRunbook } from "../funcs/runbooksCreateRunbook.js"; +import { runbooksCreateRunbookExecution } from "../funcs/runbooksCreateRunbookExecution.js"; +import { runbooksDeleteRunbook } from "../funcs/runbooksDeleteRunbook.js"; +import { runbooksDeleteRunbookExecution } from "../funcs/runbooksDeleteRunbookExecution.js"; +import { runbooksGetRunbook } from "../funcs/runbooksGetRunbook.js"; +import { runbooksGetRunbookActionFieldOptions } from "../funcs/runbooksGetRunbookActionFieldOptions.js"; +import { runbooksGetRunbookExecution } from "../funcs/runbooksGetRunbookExecution.js"; +import { runbooksGetRunbookExecutionStepScript } from "../funcs/runbooksGetRunbookExecutionStepScript.js"; +import { runbooksListRunbookActions } from "../funcs/runbooksListRunbookActions.js"; +import { runbooksListRunbookAudits } from "../funcs/runbooksListRunbookAudits.js"; +import { runbooksListRunbookExecutions } from "../funcs/runbooksListRunbookExecutions.js"; +import { runbooksListRunbooks } from "../funcs/runbooksListRunbooks.js"; +import { runbooksUpdateRunbook } from "../funcs/runbooksUpdateRunbook.js"; +import { runbooksUpdateRunbookExecutionStep } from "../funcs/runbooksUpdateRunbookExecutionStep.js"; +import { runbooksUpdateRunbookExecutionStepScript } from "../funcs/runbooksUpdateRunbookExecutionStepScript.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; -import { Executions } from "./executions.js"; export class Runbooks extends ClientSDK { - private _executions?: Executions; - get executions(): Executions { - return (this._executions ??= new Executions(this._options)); - } - - /** - * List runbook audits - * - * @remarks - * Please contact support to enable audit logging for your account. - */ - async listAudits( - request: operations.ListRunbookAuditsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksListAudits( - this, - request, - options, - )); - } - - /** - * List runbooks - * - * @remarks - * Lists all available runbooks. - */ - async list( - request: operations.ListRunbooksRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksList( - this, - request, - options, - )); - } - - /** - * Create a runbook - * - * @remarks - * Create a new runbook for use with incidents. - */ - async create( - request: components.PostV1Runbooks, - options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksCreate( - this, - request, - options, - )); - } - /** * List runbook actions * * @remarks - * List all Runbook actions available through your connected integrations + * List all runbook actions available through your connected integrations */ - async listActions( + async listRunbookActions( request: operations.ListRunbookActionsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksListActions( + return unwrapAsync(runbooksListRunbookActions( this, request, options, @@ -104,13 +44,13 @@ export class Runbooks extends ClientSDK { * List runbook executions * * @remarks - * List all Runbook executions across all Runbooks + * List all runbook executions across all runbooks */ - async listExecutions( + async listRunbookExecutions( request: operations.ListRunbookExecutionsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksListExecutions( + return unwrapAsync(runbooksListRunbookExecutions( this, request, options, @@ -123,11 +63,11 @@ export class Runbooks extends ClientSDK { * @remarks * Attaches a runbook to an incident and executes it */ - async createExecution( - request: components.PostV1RunbooksExecutions, + async createRunbookExecution( + request: components.CreateRunbookExecution, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksCreateExecution( + return unwrapAsync(runbooksCreateRunbookExecution( this, request, options, @@ -140,11 +80,11 @@ export class Runbooks extends ClientSDK { * @remarks * Retrieve a runbook execution by ID */ - async getExecution( + async getRunbookExecution( request: operations.GetRunbookExecutionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksGetExecution( + return unwrapAsync(runbooksGetRunbookExecution( this, request, options, @@ -152,16 +92,16 @@ export class Runbooks extends ClientSDK { } /** - * Update a runbook execution step + * Terminate a runbook execution * * @remarks - * Updates a runbook step execution, especially for changing the state of a step execution. + * Terminates a runbook execution, preventing any further steps from being executed */ - async updateExecutionStep( - request: operations.UpdateRunbookExecutionStepRequest, + async deleteRunbookExecution( + request: operations.DeleteRunbookExecutionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksUpdateExecutionStep( + ): Promise { + return unwrapAsync(runbooksDeleteRunbookExecution( this, request, options, @@ -169,16 +109,16 @@ export class Runbooks extends ClientSDK { } /** - * Get a runbook execution step script + * Update a runbook step execution * * @remarks - * Retrieves the bash script from a "script" step. + * Updates a runbook step execution, especially for changing the state of a step execution. */ - async getExecutionStepScript( - request: operations.GetRunbookExecutionStepScriptRequest, + async updateRunbookExecutionStep( + request: operations.UpdateRunbookExecutionStepRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksGetExecutionStepScript( + return unwrapAsync(runbooksUpdateRunbookExecutionStep( this, request, options, @@ -186,16 +126,16 @@ export class Runbooks extends ClientSDK { } /** - * Update the script state for a runbook execution step + * Get a step's bash script * * @remarks - * Updates the execution's step. + * Retrieves the bash script from a "script" step. */ - async updateExecutionStepScriptState( - request: operations.UpdateRunbookExecutionStepScriptStateRequest, + async getRunbookExecutionStepScript( + request: operations.GetRunbookExecutionStepScriptRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksUpdateExecutionStepScriptState( + return unwrapAsync(runbooksGetRunbookExecutionStepScript( this, request, options, @@ -203,16 +143,16 @@ export class Runbooks extends ClientSDK { } /** - * Update votes for a runbook execution step + * Update a script step's execution status * * @remarks - * Allows for upvoting or downvoting an event + * Updates the execution's step. */ - async updateExecutionStepVotes( - request: operations.UpdateRunbookExecutionStepVotesRequest, + async updateRunbookExecutionStepScript( + request: operations.UpdateRunbookExecutionStepScriptRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksUpdateExecutionStepVotes( + ): Promise { + return unwrapAsync(runbooksUpdateRunbookExecutionStepScript( this, request, options, @@ -220,16 +160,16 @@ export class Runbooks extends ClientSDK { } /** - * Get vote counts for a runbook step + * List select options for a runbook integration action field * * @remarks - * Returns the current vote counts for an object + * List select options for a runbook integration action field */ - async getStepVoteStatus( - request: operations.GetRunbookStepVoteStatusRequest, + async getRunbookActionFieldOptions( + request: operations.GetRunbookActionFieldOptionsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksGetStepVoteStatus( + ): Promise { + return unwrapAsync(runbooksGetRunbookActionFieldOptions( this, request, options, @@ -237,16 +177,16 @@ export class Runbooks extends ClientSDK { } /** - * Vote on a runbook execution + * List runbooks * * @remarks - * Allows for upvoting or downvoting an event + * Lists all available runbooks. */ - async updateExecutionVotes( - request: operations.UpdateRunbookExecutionVotesRequest, + async listRunbooks( + request: operations.ListRunbooksRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksUpdateExecutionVotes( + ): Promise { + return unwrapAsync(runbooksListRunbooks( this, request, options, @@ -254,30 +194,16 @@ export class Runbooks extends ClientSDK { } /** - * Get vote counts for a runbook execution + * Create a runbook * * @remarks - * Returns the current vote counts for an object - */ - async getExecutionVoteStatus( - request: operations.GetRunbookExecutionVoteStatusRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksGetExecutionVoteStatus( - this, - request, - options, - )); - } - - /** - * List select options for a runbook integration action field + * Create a new runbook for use with incidents. */ - async listSelectOptions( - request: operations.GetRunbookSelectOptionsRequest, + async createRunbook( + request: components.CreateRunbook, options?: RequestOptions, - ): Promise { - return unwrapAsync(runbooksListSelectOptions( + ): Promise { + return unwrapAsync(runbooksCreateRunbook( this, request, options, @@ -290,11 +216,11 @@ export class Runbooks extends ClientSDK { * @remarks * Get a runbook and all its configuration */ - async get( + async getRunbook( request: operations.GetRunbookRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksGet( + return unwrapAsync(runbooksGetRunbook( this, request, options, @@ -308,11 +234,11 @@ export class Runbooks extends ClientSDK { * Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything * about a runbook, including but not limited to the steps, environments, attachment rules, and severities. */ - async update( + async updateRunbook( request: operations.UpdateRunbookRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksUpdate( + return unwrapAsync(runbooksUpdateRunbook( this, request, options, @@ -325,11 +251,28 @@ export class Runbooks extends ClientSDK { * @remarks * Delete a runbook and make it unavailable for any future incidents. */ - async delete( + async deleteRunbook( request: operations.DeleteRunbookRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(runbooksDelete( + return unwrapAsync(runbooksDeleteRunbook( + this, + request, + options, + )); + } + + /** + * List runbook audits + * + * @remarks + * Please contact support to enable audit logging for your account. + */ + async listRunbookAudits( + request: operations.ListRunbookAuditsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(runbooksListRunbookAudits( this, request, options, diff --git a/src/sdk/scim.ts b/src/sdk/scim.ts index bd9dd566..2282be4d 100644 --- a/src/sdk/scim.ts +++ b/src/sdk/scim.ts @@ -2,17 +2,17 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { scimCreate } from "../funcs/scimCreate.js"; -import { scimCreateUser } from "../funcs/scimCreateUser.js"; -import { scimDeleteGroup } from "../funcs/scimDeleteGroup.js"; -import { scimDeleteUser } from "../funcs/scimDeleteUser.js"; -import { scimGetGroup } from "../funcs/scimGetGroup.js"; -import { scimGetUser } from "../funcs/scimGetUser.js"; -import { scimListGroups } from "../funcs/scimListGroups.js"; -import { scimListUsers } from "../funcs/scimListUsers.js"; -import { scimReplaceUser } from "../funcs/scimReplaceUser.js"; -import { scimUpdateGroup } from "../funcs/scimUpdateGroup.js"; -import { scimUpdateUser } from "../funcs/scimUpdateUser.js"; +import { scimCreateSCIMGroup } from "../funcs/scimCreateSCIMGroup.js"; +import { scimCreateSCIMUser } from "../funcs/scimCreateSCIMUser.js"; +import { scimDeleteSCIMGroup } from "../funcs/scimDeleteSCIMGroup.js"; +import { scimDeleteSCIMUser } from "../funcs/scimDeleteSCIMUser.js"; +import { scimGetSCIMGroup } from "../funcs/scimGetSCIMGroup.js"; +import { scimGetSCIMUser } from "../funcs/scimGetSCIMUser.js"; +import { scimListSCIMGroups } from "../funcs/scimListSCIMGroups.js"; +import { scimListSCIMUsers } from "../funcs/scimListSCIMUsers.js"; +import { scimPatchSCIMUser } from "../funcs/scimPatchSCIMUser.js"; +import { scimUpdateSCIMGroup } from "../funcs/scimUpdateSCIMGroup.js"; +import { scimUpdateSCIMUser } from "../funcs/scimUpdateSCIMUser.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -20,16 +20,16 @@ import { unwrapAsync } from "../types/fp.js"; export class Scim extends ClientSDK { /** - * List teams via SCIM + * Get a SCIM group * * @remarks - * SCIM endpoint that lists all Teams (Colloquial for Group in the SCIM protocol) + * SCIM endpoint that lists a Team (Colloquial for Group in the SCIM protocol) */ - async listGroups( - request: operations.GetScimGroupsRequest, + async getScimGroup( + request: operations.GetScimGroupRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimListGroups( + return unwrapAsync(scimGetSCIMGroup( this, request, options, @@ -37,16 +37,16 @@ export class Scim extends ClientSDK { } /** - * Create a team via SCIM + * Update a SCIM group and assign members * * @remarks - * SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. + * SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. */ - async create( - request: components.PostV1ScimV2Groups, + async updateScimGroup( + request: operations.UpdateScimGroupRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimCreate( + return unwrapAsync(scimUpdateSCIMGroup( this, request, options, @@ -54,16 +54,16 @@ export class Scim extends ClientSDK { } /** - * Get a SCIM group + * Delete a SCIM group * * @remarks - * SCIM endpoint that lists a Team (Colloquial for Group in the SCIM protocol) + * SCIM endpoint to delete a Team (Colloquial for Group in the SCIM protocol). */ - async getGroup( - request: operations.GetScimGroupRequest, + async deleteScimGroup( + request: operations.DeleteScimGroupRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimGetGroup( + return unwrapAsync(scimDeleteSCIMGroup( this, request, options, @@ -71,16 +71,16 @@ export class Scim extends ClientSDK { } /** - * Update a SCIM group + * List SCIM groups * * @remarks - * SCIM endpoint to update a Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role, any missing members will be removed from the team. + * SCIM endpoint that lists all Teams (Colloquial for Group in the SCIM protocol) */ - async updateGroup( - request: operations.UpdateScimGroupRequest, + async listScimGroups( + request: operations.ListScimGroupsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimUpdateGroup( + return unwrapAsync(scimListSCIMGroups( this, request, options, @@ -88,16 +88,16 @@ export class Scim extends ClientSDK { } /** - * Delete a SCIM group + * Create a SCIM group and assign members * * @remarks - * SCIM endpoint to delete a Team (Colloquial for Group in the SCIM protocol). + * SCIM endpoint to create a new Team (Colloquial for Group in the SCIM protocol). Any members defined in the payload will be assigned to the team with no defined role. */ - async deleteGroup( - request: operations.DeleteScimGroupRequest, + async createScimGroup( + request: components.CreateScimGroup, options?: RequestOptions, ): Promise { - return unwrapAsync(scimDeleteGroup( + return unwrapAsync(scimCreateSCIMGroup( this, request, options, @@ -105,16 +105,16 @@ export class Scim extends ClientSDK { } /** - * List users via SCIM + * Get a SCIM user * * @remarks - * SCIM endpoint that lists users. This endpoint will display a list of Users currently in the system. + * SCIM endpoint that lists a User */ - async listUsers( - request: operations.GetScimUsersRequest, + async getScimUser( + request: operations.GetScimUserRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimListUsers( + return unwrapAsync(scimGetSCIMUser( this, request, options, @@ -122,16 +122,16 @@ export class Scim extends ClientSDK { } /** - * Create a user via SCIM + * Update a User from SCIM data * * @remarks - * SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. + * PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. */ - async createUser( - request: components.PostV1ScimV2Users, + async updateScimUser( + request: operations.UpdateScimUserRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimCreateUser( + return unwrapAsync(scimUpdateSCIMUser( this, request, options, @@ -139,16 +139,16 @@ export class Scim extends ClientSDK { } /** - * Get a SCIM user + * Delete a User matching SCIM data * * @remarks - * SCIM endpoint that lists a User + * SCIM endpoint to delete a User. This endpoint will deactivate a confirmed User record in our system. */ - async getUser( - request: operations.GetScimUserRequest, + async deleteScimUser( + request: operations.DeleteScimUserRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimGetUser( + return unwrapAsync(scimDeleteSCIMUser( this, request, options, @@ -156,16 +156,16 @@ export class Scim extends ClientSDK { } /** - * Replace a SCIM user + * Update a User from SCIM data * * @remarks - * PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes. + * PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. */ - async replaceUser( - request: operations.ReplaceScimUserRequest, + async patchScimUser( + request: operations.PatchScimUserRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimReplaceUser( + return unwrapAsync(scimPatchSCIMUser( this, request, options, @@ -173,16 +173,16 @@ export class Scim extends ClientSDK { } /** - * Delete a SCIM user + * List SCIM users * * @remarks - * SCIM endpoint to delete a User. This endpoint will deactivate a confirmed User record in our system. + * SCIM endpoint that lists users. This endpoint will display a list of Users currently in the system. */ - async deleteUser( - request: operations.DeleteScimUserRequest, + async listScimUsers( + request: operations.ListScimUsersRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(scimDeleteUser( + return unwrapAsync(scimListSCIMUsers( this, request, options, @@ -190,16 +190,16 @@ export class Scim extends ClientSDK { } /** - * Update a SCIM user + * Create a User from SCIM data * * @remarks - * PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes. + * SCIM endpoint to create and provision a new User. This endpoint will provision the User, which allows them to accept their account throught their IDP or via the Forgot Password flow. */ - async updateUser( - request: operations.UpdateScimUserRequest, + async createScimUser( + request: components.CreateScimUser, options?: RequestOptions, ): Promise { - return unwrapAsync(scimUpdateUser( + return unwrapAsync(scimCreateSCIMUser( this, request, options, diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 872c957a..34a65573 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -5,49 +5,53 @@ import { ClientSDK } from "../lib/sdks.js"; import { AccountSettings } from "./accountsettings.js"; import { Alerts } from "./alerts.js"; -import { AwsCloudtrailBatchEvents } from "./awscloudtrailbatchevents.js"; -import { AwsConnections } from "./awsconnections.js"; +import { Audiences } from "./audiences.js"; +import { CallRoutes } from "./callroutes.js"; +import { CatalogEntries } from "./catalogentries.js"; import { Changes } from "./changes.js"; -import { ChecklistTemplates } from "./checklisttemplates.js"; import { Communication } from "./communication.js"; -import { Confluence } from "./confluence.js"; import { Conversations } from "./conversations.js"; -import { Environments } from "./environments.js"; -import { Functionalities } from "./functionalities.js"; import { Incidents } from "./incidents.js"; import { IncidentSettings } from "./incidentsettings.js"; -import { Infrastructures } from "./infrastructures.js"; import { Integrations } from "./integrations.js"; -import { Maintenances } from "./maintenances.js"; -import { Metrics } from "./metrics.js"; import { MetricsReporting } from "./metricsreporting.js"; -import { OnCallSchedules } from "./oncallschedules.js"; -import { ProjectConfigurations } from "./projectconfigurations.js"; import { Retrospectives } from "./retrospectives.js"; import { Runbooks } from "./runbooks.js"; import { Scim } from "./scim.js"; -import { Services } from "./services.js"; import { Signals } from "./signals.js"; -import { Slack } from "./slack.js"; -import { Statuspage } from "./statuspage.js"; import { StatusPages } from "./statuspages.js"; -import { StatusUpdateTemplates } from "./statusupdatetemplates.js"; -import { System } from "./system.js"; import { Tasks } from "./tasks.js"; import { Teams } from "./teams.js"; import { Ticketing } from "./ticketing.js"; -import { TicketingPriorities } from "./ticketingpriorities.js"; -import { Tickets } from "./tickets.js"; import { Users } from "./users.js"; import { Webhooks } from "./webhooks.js"; -import { Zendesk } from "./zendesk.js"; -export class FirehydrantTypescriptSDK extends ClientSDK { +export class Firehydrant extends ClientSDK { private _accountSettings?: AccountSettings; get accountSettings(): AccountSettings { return (this._accountSettings ??= new AccountSettings(this._options)); } + private _catalogEntries?: CatalogEntries; + get catalogEntries(): CatalogEntries { + return (this._catalogEntries ??= new CatalogEntries(this._options)); + } + + private _teams?: Teams; + get teams(): Teams { + return (this._teams ??= new Teams(this._options)); + } + + private _signals?: Signals; + get signals(): Signals { + return (this._signals ??= new Signals(this._options)); + } + + private _changes?: Changes; + get changes(): Changes { + return (this._changes ??= new Changes(this._options)); + } + private _incidents?: Incidents; get incidents(): Incidents { return (this._incidents ??= new Incidents(this._options)); @@ -58,14 +62,9 @@ export class FirehydrantTypescriptSDK extends ClientSDK { return (this._alerts ??= new Alerts(this._options)); } - private _services?: Services; - get services(): Services { - return (this._services ??= new Services(this._options)); - } - - private _changes?: Changes; - get changes(): Changes { - return (this._changes ??= new Changes(this._options)); + private _statusPages?: StatusPages; + get statusPages(): StatusPages { + return (this._statusPages ??= new StatusPages(this._options)); } private _tasks?: Tasks; @@ -73,19 +72,14 @@ export class FirehydrantTypescriptSDK extends ClientSDK { return (this._tasks ??= new Tasks(this._options)); } - private _checklistTemplates?: ChecklistTemplates; - get checklistTemplates(): ChecklistTemplates { - return (this._checklistTemplates ??= new ChecklistTemplates(this._options)); - } - private _conversations?: Conversations; get conversations(): Conversations { return (this._conversations ??= new Conversations(this._options)); } - private _users?: Users; - get users(): Users { - return (this._users ??= new Users(this._options)); + private _retrospectives?: Retrospectives; + get retrospectives(): Retrospectives { + return (this._retrospectives ??= new Retrospectives(this._options)); } private _incidentSettings?: IncidentSettings; @@ -93,61 +87,14 @@ export class FirehydrantTypescriptSDK extends ClientSDK { return (this._incidentSettings ??= new IncidentSettings(this._options)); } - private _environments?: Environments; - get environments(): Environments { - return (this._environments ??= new Environments(this._options)); - } - - private _functionalities?: Functionalities; - get functionalities(): Functionalities { - return (this._functionalities ??= new Functionalities(this._options)); - } - - private _statusPages?: StatusPages; - get statusPages(): StatusPages { - return (this._statusPages ??= new StatusPages(this._options)); - } - - private _infrastructures?: Infrastructures; - get infrastructures(): Infrastructures { - return (this._infrastructures ??= new Infrastructures(this._options)); - } - private _integrations?: Integrations; get integrations(): Integrations { return (this._integrations ??= new Integrations(this._options)); } - private _awsCloudtrailBatchEvents?: AwsCloudtrailBatchEvents; - get awsCloudtrailBatchEvents(): AwsCloudtrailBatchEvents { - return (this._awsCloudtrailBatchEvents ??= new AwsCloudtrailBatchEvents( - this._options, - )); - } - - private _awsConnections?: AwsConnections; - get awsConnections(): AwsConnections { - return (this._awsConnections ??= new AwsConnections(this._options)); - } - - private _confluence?: Confluence; - get confluence(): Confluence { - return (this._confluence ??= new Confluence(this._options)); - } - - private _slack?: Slack; - get slack(): Slack { - return (this._slack ??= new Slack(this._options)); - } - - private _statuspage?: Statuspage; - get statuspage(): Statuspage { - return (this._statuspage ??= new Statuspage(this._options)); - } - - private _zendesk?: Zendesk; - get zendesk(): Zendesk { - return (this._zendesk ??= new Zendesk(this._options)); + private _users?: Users; + get users(): Users { + return (this._users ??= new Users(this._options)); } private _metricsReporting?: MetricsReporting; @@ -155,89 +102,38 @@ export class FirehydrantTypescriptSDK extends ClientSDK { return (this._metricsReporting ??= new MetricsReporting(this._options)); } - private _metrics?: Metrics; - get metrics(): Metrics { - return (this._metrics ??= new Metrics(this._options)); - } - - private _system?: System; - get system(): System { - return (this._system ??= new System(this._options)); - } - - private _retrospectives?: Retrospectives; - get retrospectives(): Retrospectives { - return (this._retrospectives ??= new Retrospectives(this._options)); - } - private _runbooks?: Runbooks; get runbooks(): Runbooks { return (this._runbooks ??= new Runbooks(this._options)); } - private _maintenances?: Maintenances; - get maintenances(): Maintenances { - return (this._maintenances ??= new Maintenances(this._options)); - } - - private _teams?: Teams; - get teams(): Teams { - return (this._teams ??= new Teams(this._options)); - } - - private _scim?: Scim; - get scim(): Scim { - return (this._scim ??= new Scim(this._options)); - } - - private _signals?: Signals; - get signals(): Signals { - return (this._signals ??= new Signals(this._options)); - } - private _communication?: Communication; get communication(): Communication { return (this._communication ??= new Communication(this._options)); } - private _statusUpdateTemplates?: StatusUpdateTemplates; - get statusUpdateTemplates(): StatusUpdateTemplates { - return (this._statusUpdateTemplates ??= new StatusUpdateTemplates( - this._options, - )); - } - - private _onCallSchedules?: OnCallSchedules; - get onCallSchedules(): OnCallSchedules { - return (this._onCallSchedules ??= new OnCallSchedules(this._options)); - } - - private _ticketingPriorities?: TicketingPriorities; - get ticketingPriorities(): TicketingPriorities { - return (this._ticketingPriorities ??= new TicketingPriorities( - this._options, - )); - } - private _ticketing?: Ticketing; get ticketing(): Ticketing { return (this._ticketing ??= new Ticketing(this._options)); } - private _projectConfigurations?: ProjectConfigurations; - get projectConfigurations(): ProjectConfigurations { - return (this._projectConfigurations ??= new ProjectConfigurations( - this._options, - )); + private _scim?: Scim; + get scim(): Scim { + return (this._scim ??= new Scim(this._options)); } - private _tickets?: Tickets; - get tickets(): Tickets { - return (this._tickets ??= new Tickets(this._options)); + private _callRoutes?: CallRoutes; + get callRoutes(): CallRoutes { + return (this._callRoutes ??= new CallRoutes(this._options)); } private _webhooks?: Webhooks; get webhooks(): Webhooks { return (this._webhooks ??= new Webhooks(this._options)); } + + private _audiences?: Audiences; + get audiences(): Audiences { + return (this._audiences ??= new Audiences(this._options)); + } } diff --git a/src/sdk/services.ts b/src/sdk/services.ts deleted file mode 100644 index 21057d3d..00000000 --- a/src/sdk/services.ts +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { servicesCreate } from "../funcs/servicesCreate.js"; -import { servicesCreateChecklistResponse } from "../funcs/servicesCreateChecklistResponse.js"; -import { servicesCreateDependency } from "../funcs/servicesCreateDependency.js"; -import { servicesCreateLinks } from "../funcs/servicesCreateLinks.js"; -import { servicesDelete } from "../funcs/servicesDelete.js"; -import { servicesDeleteDependency } from "../funcs/servicesDeleteDependency.js"; -import { servicesDeleteLink } from "../funcs/servicesDeleteLink.js"; -import { servicesGet } from "../funcs/servicesGet.js"; -import { servicesGetAvailableDownstreamDependencies } from "../funcs/servicesGetAvailableDownstreamDependencies.js"; -import { servicesGetDependency } from "../funcs/servicesGetDependency.js"; -import { servicesList } from "../funcs/servicesList.js"; -import { servicesListAvailableUpstreamDependencies } from "../funcs/servicesListAvailableUpstreamDependencies.js"; -import { servicesListDependencies } from "../funcs/servicesListDependencies.js"; -import { servicesListForUser } from "../funcs/servicesListForUser.js"; -import { servicesPatch } from "../funcs/servicesPatch.js"; -import { servicesUpdate } from "../funcs/servicesUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; -import { Catalogs } from "./catalogs.js"; - -export class Services extends ClientSDK { - private _catalogs?: Catalogs; - get catalogs(): Catalogs { - return (this._catalogs ??= new Catalogs(this._options)); - } - - /** - * Create a dependency relationship between services - * - * @remarks - * Creates a service dependency relationship between two services - */ - async createDependency( - request: components.PostV1ServiceDependencies, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesCreateDependency( - this, - request, - options, - )); - } - - /** - * Get a service dependency - * - * @remarks - * Retrieves a single service dependency by ID - */ - async getDependency( - request: operations.GetServiceDependencyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesGetDependency( - this, - request, - options, - )); - } - - /** - * Delete a service dependency - * - * @remarks - * Deletes a single service dependency - */ - async deleteDependency( - request: operations.DeleteServiceDependencyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesDeleteDependency( - this, - request, - options, - )); - } - - /** - * Update a service dependency - * - * @remarks - * Update the notes of the service dependency - */ - async update( - request: operations.UpdateServiceDependencyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesUpdate( - this, - request, - options, - )); - } - - /** - * List services - * - * @remarks - * List all of the services that have been added to the organization. - */ - async list( - request: operations.ListServicesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesList( - this, - request, - options, - )); - } - - /** - * Create a service - * - * @remarks - * Creates a service for the organization, you may also create or attach functionalities to the service on create. - */ - async create( - request: components.PostV1Services, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesCreate( - this, - request, - options, - )); - } - - /** - * Create multiple services and link them to external services - * - * @remarks - * Creates a service with the appropriate integration for each external service ID passed - */ - async createLinks( - request: components.PostV1ServicesServiceLinks, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(servicesCreateLinks( - this, - request, - options, - )); - } - - /** - * Get a service - * - * @remarks - * Retrieves a single service by ID - */ - async get( - request: operations.GetServiceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesGet( - this, - request, - options, - )); - } - - /** - * Delete a service - * - * @remarks - * Deletes the service from FireHydrant. - */ - async delete( - request: operations.DeleteServiceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesDelete( - this, - request, - options, - )); - } - - /** - * Update a service - * - * @remarks - * Update a services attributes, you may also add or remove functionalities from the service as well. - * Note: You may not remove or add individual label key/value pairs. You must include the entire object to override label values. - */ - async patch( - request: operations.UpdateServiceRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesPatch( - this, - request, - options, - )); - } - - /** - * List available downstream service dependencies - * - * @remarks - * Retrieves all services that are available to be downstream dependencies - */ - async getAvailableDownstreamDependencies( - request: operations.ListServiceAvailableDownstreamDependenciesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesGetAvailableDownstreamDependencies( - this, - request, - options, - )); - } - - /** - * List available upstream service dependencies - * - * @remarks - * Retrieves all services that are available to be upstream dependencies - */ - async listAvailableUpstreamDependencies( - request: operations.ListServiceAvailableUpstreamDependenciesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesListAvailableUpstreamDependencies( - this, - request, - options, - )); - } - - /** - * Create a checklist response for a service - * - * @remarks - * Creates a response for a checklist item - */ - async createChecklistResponse( - request: operations.CreateServiceChecklistResponseRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesCreateChecklistResponse( - this, - request, - options, - )); - } - - /** - * List dependencies for a service - * - * @remarks - * Retrieves a service's dependencies - */ - async listDependencies( - request: operations.GetServiceDependenciesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesListDependencies( - this, - request, - options, - )); - } - - /** - * Delete a service link - * - * @remarks - * Deletes a service link from FireHydrant. - */ - async deleteLink( - request: operations.DeleteServiceLinkRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(servicesDeleteLink( - this, - request, - options, - )); - } - - /** - * List services for a user's teams - * - * @remarks - * Retrieves a list of services owned by the teams a user is on - */ - async listForUser( - request: operations.ListUserServicesRequest, - options?: RequestOptions, - ): Promise> { - return unwrapAsync(servicesListForUser( - this, - request, - options, - )); - } -} diff --git a/src/sdk/signals.ts b/src/sdk/signals.ts index bedcfe91..bb65c87f 100644 --- a/src/sdk/signals.ts +++ b/src/sdk/signals.ts @@ -2,58 +2,74 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { signalsCreateEmailTarget } from "../funcs/signalsCreateEmailTarget.js"; -import { signalsCreateRule } from "../funcs/signalsCreateRule.js"; -import { signalsCreateWebhookTarget } from "../funcs/signalsCreateWebhookTarget.js"; -import { signalsDebug } from "../funcs/signalsDebug.js"; -import { signalsDeleteEmailTarget } from "../funcs/signalsDeleteEmailTarget.js"; -import { signalsDeleteEscalationPolicy } from "../funcs/signalsDeleteEscalationPolicy.js"; -import { signalsDeleteRule } from "../funcs/signalsDeleteRule.js"; -import { signalsDeleteWebhookTarget } from "../funcs/signalsDeleteWebhookTarget.js"; -import { signalsGetAnalyticsTimeseries } from "../funcs/signalsGetAnalyticsTimeseries.js"; -import { signalsGetEmailTarget } from "../funcs/signalsGetEmailTarget.js"; -import { signalsGetIngestUrl } from "../funcs/signalsGetIngestUrl.js"; -import { signalsGetMttxAnalytics } from "../funcs/signalsGetMttxAnalytics.js"; -import { signalsGetOnCallSchedule } from "../funcs/signalsGetOnCallSchedule.js"; -import { signalsGetRule } from "../funcs/signalsGetRule.js"; -import { signalsGetWebhookTarget } from "../funcs/signalsGetWebhookTarget.js"; -import { signalsListEmailTargets } from "../funcs/signalsListEmailTargets.js"; -import { signalsListEscalationPolicies } from "../funcs/signalsListEscalationPolicies.js"; -import { signalsListEventSources } from "../funcs/signalsListEventSources.js"; -import { signalsListGroupedMetrics } from "../funcs/signalsListGroupedMetrics.js"; -import { signalsListOnCall } from "../funcs/signalsListOnCall.js"; -import { signalsListRules } from "../funcs/signalsListRules.js"; -import { signalsListTransposers } from "../funcs/signalsListTransposers.js"; -import { signalsListWebhookTargets } from "../funcs/signalsListWebhookTargets.js"; -import { signalsUpdateEmailTarget } from "../funcs/signalsUpdateEmailTarget.js"; -import { signalsUpdateOnCallSchedule } from "../funcs/signalsUpdateOnCallSchedule.js"; -import { signalsUpdateRule } from "../funcs/signalsUpdateRule.js"; -import { signalsUpdateWebhookTarget } from "../funcs/signalsUpdateWebhookTarget.js"; +import { signalsCreateOnCallShift } from "../funcs/signalsCreateOnCallShift.js"; +import { signalsCreateSignalsEmailTarget } from "../funcs/signalsCreateSignalsEmailTarget.js"; +import { signalsCreateSignalsWebhookTarget } from "../funcs/signalsCreateSignalsWebhookTarget.js"; +import { signalsCreateTeamEscalationPolicy } from "../funcs/signalsCreateTeamEscalationPolicy.js"; +import { signalsCreateTeamOnCallSchedule } from "../funcs/signalsCreateTeamOnCallSchedule.js"; +import { signalsCreateTeamSignalRule } from "../funcs/signalsCreateTeamSignalRule.js"; +import { signalsDebugSignalsExpression } from "../funcs/signalsDebugSignalsExpression.js"; +import { signalsDeleteOnCallShift } from "../funcs/signalsDeleteOnCallShift.js"; +import { signalsDeleteSignalsEmailTarget } from "../funcs/signalsDeleteSignalsEmailTarget.js"; +import { signalsDeleteSignalsWebhookTarget } from "../funcs/signalsDeleteSignalsWebhookTarget.js"; +import { signalsDeleteTeamEscalationPolicy } from "../funcs/signalsDeleteTeamEscalationPolicy.js"; +import { signalsDeleteTeamOnCallSchedule } from "../funcs/signalsDeleteTeamOnCallSchedule.js"; +import { signalsDeleteTeamSignalRule } from "../funcs/signalsDeleteTeamSignalRule.js"; +import { signalsGetOnCallShift } from "../funcs/signalsGetOnCallShift.js"; +import { signalsGetSignalsEmailTarget } from "../funcs/signalsGetSignalsEmailTarget.js"; +import { signalsGetSignalsIngestUrl } from "../funcs/signalsGetSignalsIngestUrl.js"; +import { signalsGetSignalsWebhookTarget } from "../funcs/signalsGetSignalsWebhookTarget.js"; +import { signalsGetTeamEscalationPolicy } from "../funcs/signalsGetTeamEscalationPolicy.js"; +import { signalsGetTeamOnCallSchedule } from "../funcs/signalsGetTeamOnCallSchedule.js"; +import { signalsGetTeamSignalRule } from "../funcs/signalsGetTeamSignalRule.js"; +import { signalsListOrganizationOnCallSchedules } from "../funcs/signalsListOrganizationOnCallSchedules.js"; +import { signalsListSignalsEmailTargets } from "../funcs/signalsListSignalsEmailTargets.js"; +import { signalsListSignalsEventSources } from "../funcs/signalsListSignalsEventSources.js"; +import { signalsListSignalsTransposers } from "../funcs/signalsListSignalsTransposers.js"; +import { signalsListSignalsWebhookTargets } from "../funcs/signalsListSignalsWebhookTargets.js"; +import { signalsListTeamEscalationPolicies } from "../funcs/signalsListTeamEscalationPolicies.js"; +import { signalsListTeamOnCallSchedules } from "../funcs/signalsListTeamOnCallSchedules.js"; +import { signalsListTeamSignalRules } from "../funcs/signalsListTeamSignalRules.js"; +import { signalsUpdateOnCallShift } from "../funcs/signalsUpdateOnCallShift.js"; +import { signalsUpdateSignalsEmailTarget } from "../funcs/signalsUpdateSignalsEmailTarget.js"; +import { signalsUpdateSignalsWebhookTarget } from "../funcs/signalsUpdateSignalsWebhookTarget.js"; +import { signalsUpdateTeamEscalationPolicy } from "../funcs/signalsUpdateTeamEscalationPolicy.js"; +import { signalsUpdateTeamOnCallSchedule } from "../funcs/signalsUpdateTeamOnCallSchedule.js"; +import { signalsUpdateTeamSignalRule } from "../funcs/signalsUpdateTeamSignalRule.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; -import { FirehydrantTypescriptSDKSignalsTeams } from "./firehydranttypescriptsdksignalsteams.js"; export class Signals extends ClientSDK { - private _teams?: FirehydrantTypescriptSDKSignalsTeams; - get teams(): FirehydrantTypescriptSDKSignalsTeams { - return (this._teams ??= new FirehydrantTypescriptSDKSignalsTeams( - this._options, + /** + * List escalation policies for a team + * + * @remarks + * List all Signals escalation policies for a team. + */ + async listTeamEscalationPolicies( + request: operations.ListTeamEscalationPoliciesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(signalsListTeamEscalationPolicies( + this, + request, + options, )); } /** - * List grouped signal alert metrics + * Create an escalation policy for a team * * @remarks - * Generate a report of grouped metrics for Signals alerts + * Create a Signals escalation policy for a team. */ - async listGroupedMetrics( - request: operations.GetSignalGroupedMetricsRequest, + async createTeamEscalationPolicy( + request: operations.CreateTeamEscalationPolicyRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListGroupedMetrics( + return unwrapAsync(signalsCreateTeamEscalationPolicy( this, request, options, @@ -61,16 +77,16 @@ export class Signals extends ClientSDK { } /** - * Get MTTX analytics for signals + * Get an escalation policy for a team * * @remarks - * Get mean-time-to-acknowledged (MTTA) and mean-time-to-resolved (MTTR) metrics for Signals alerts + * Get a Signals escalation policy by ID */ - async getMttxAnalytics( - request: operations.GetSignalsMttxAnalyticsRequest, + async getTeamEscalationPolicy( + request: operations.GetTeamEscalationPolicyRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsGetMttxAnalytics( + return unwrapAsync(signalsGetTeamEscalationPolicy( this, request, options, @@ -78,16 +94,16 @@ export class Signals extends ClientSDK { } /** - * List timeseries metrics for signal alerts + * Delete an escalation policy for a team * * @remarks - * Generate a timeseries-based report of metrics for Signals alerts + * Delete a Signals escalation policy by ID */ - async getAnalyticsTimeseries( - request: operations.GetSignalsAnalyticsTimeseriesRequest, + async deleteTeamEscalationPolicy( + request: operations.DeleteTeamEscalationPolicyRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsGetAnalyticsTimeseries( + return unwrapAsync(signalsDeleteTeamEscalationPolicy( this, request, options, @@ -95,13 +111,16 @@ export class Signals extends ClientSDK { } /** - * Debug a signal + * Update an escalation policy for a team + * + * @remarks + * Update a Signals escalation policy by ID */ - async debug( - request: components.PostV1SignalsDebugger, + async updateTeamEscalationPolicy( + request: operations.UpdateTeamEscalationPolicyRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsDebug( + return unwrapAsync(signalsUpdateTeamEscalationPolicy( this, request, options, @@ -109,16 +128,16 @@ export class Signals extends ClientSDK { } /** - * List email targets for signals + * List on-call schedules for a team * * @remarks - * List all Signals email targets for a team. + * List all Signals on-call schedules for a team. */ - async listEmailTargets( - request: operations.ListSignalEmailTargetsRequest, + async listTeamOnCallSchedules( + request: operations.ListTeamOnCallSchedulesRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListEmailTargets( + return unwrapAsync(signalsListTeamOnCallSchedules( this, request, options, @@ -126,16 +145,16 @@ export class Signals extends ClientSDK { } /** - * Create an email target for signals + * Create an on-call schedule for a team * * @remarks - * Create a Signals email target for a team. + * Create a Signals on-call schedule for a team. */ - async createEmailTarget( - request: components.PostV1SignalsEmailTargets, + async createTeamOnCallSchedule( + request: operations.CreateTeamOnCallScheduleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsCreateEmailTarget( + return unwrapAsync(signalsCreateTeamOnCallSchedule( this, request, options, @@ -143,16 +162,16 @@ export class Signals extends ClientSDK { } /** - * Get a signal email target + * Get an on-call schedule for a team * * @remarks - * Get a Signals email target by ID + * Get a Signals on-call schedule by ID */ - async getEmailTarget( - request: operations.GetSignalEmailTargetRequest, + async getTeamOnCallSchedule( + request: operations.GetTeamOnCallScheduleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsGetEmailTarget( + return unwrapAsync(signalsGetTeamOnCallSchedule( this, request, options, @@ -160,16 +179,16 @@ export class Signals extends ClientSDK { } /** - * Delete a signal email target + * Delete an on-call schedule for a team * * @remarks - * Delete a Signals email target by ID + * Delete a Signals on-call schedule by ID */ - async deleteEmailTarget( - request: operations.DeleteSignalEmailTargetRequest, + async deleteTeamOnCallSchedule( + request: operations.DeleteTeamOnCallScheduleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsDeleteEmailTarget( + return unwrapAsync(signalsDeleteTeamOnCallSchedule( this, request, options, @@ -177,16 +196,16 @@ export class Signals extends ClientSDK { } /** - * Update a signal email target + * Update an on-call schedule for a team * * @remarks - * Update a Signals email target by ID + * Update a Signals on-call schedule by ID */ - async updateEmailTarget( - request: operations.UpdateSignalEmailTargetRequest, + async updateTeamOnCallSchedule( + request: operations.UpdateTeamOnCallScheduleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsUpdateEmailTarget( + return unwrapAsync(signalsUpdateTeamOnCallSchedule( this, request, options, @@ -194,13 +213,16 @@ export class Signals extends ClientSDK { } /** - * List event sources for signals + * Create a shift for an on-call schedule + * + * @remarks + * Create a Signals on-call shift in a schedule. */ - async listEventSources( - request: operations.ListSignalEventSourcesRequest, + async createOnCallShift( + request: operations.CreateOnCallShiftRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListEventSources( + return unwrapAsync(signalsCreateOnCallShift( this, request, options, @@ -208,16 +230,16 @@ export class Signals extends ClientSDK { } /** - * Get signal ingestion URL + * Get an on-call shift for a team schedule * * @remarks - * Retrieve the url for ingesting signals for your organization + * Get a Signals on-call shift by ID */ - async getIngestUrl( - request: operations.GetSignalIngestUrlRequest, + async getOnCallShift( + request: operations.GetOnCallShiftRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(signalsGetIngestUrl( + ): Promise { + return unwrapAsync(signalsGetOnCallShift( this, request, options, @@ -225,28 +247,33 @@ export class Signals extends ClientSDK { } /** - * List signal transposers + * Delete an on-call shift from a team schedule + * + * @remarks + * Delete a Signals on-call shift by ID */ - async listTransposers( + async deleteOnCallShift( + request: operations.DeleteOnCallShiftRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListTransposers( + return unwrapAsync(signalsDeleteOnCallShift( this, + request, options, )); } /** - * List webhook targets for signals + * Update an on-call shift for a team schedule * * @remarks - * List all Signals webhook targets. + * Update a Signals on-call shift by ID */ - async listWebhookTargets( - request: operations.ListSignalWebhookTargetsRequest, + async updateOnCallShift( + request: operations.UpdateOnCallShiftRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListWebhookTargets( + return unwrapAsync(signalsUpdateOnCallShift( this, request, options, @@ -254,16 +281,16 @@ export class Signals extends ClientSDK { } /** - * Create a webhook target for signals + * List Signals rules * * @remarks - * Create a Signals webhook target. + * List all Signals rules for a team. */ - async createWebhookTarget( - request: components.PostV1SignalsWebhookTargets, + async listTeamSignalRules( + request: operations.ListTeamSignalRulesRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsCreateWebhookTarget( + return unwrapAsync(signalsListTeamSignalRules( this, request, options, @@ -271,16 +298,16 @@ export class Signals extends ClientSDK { } /** - * Get a webhook target + * Create a Signals rule * * @remarks - * Get a Signals webhook target by ID + * Create a Signals rule for a team. */ - async getWebhookTarget( - request: operations.GetSignalsWebhookTargetRequest, + async createTeamSignalRule( + request: operations.CreateTeamSignalRuleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsGetWebhookTarget( + return unwrapAsync(signalsCreateTeamSignalRule( this, request, options, @@ -288,16 +315,16 @@ export class Signals extends ClientSDK { } /** - * Delete a webhook target + * Get a Signals rule * * @remarks - * Delete a Signals webhook target by ID + * Get a Signals rule by ID. */ - async deleteWebhookTarget( - request: operations.DeleteSignalsWebhookTargetRequest, + async getTeamSignalRule( + request: operations.GetTeamSignalRuleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsDeleteWebhookTarget( + return unwrapAsync(signalsGetTeamSignalRule( this, request, options, @@ -305,16 +332,16 @@ export class Signals extends ClientSDK { } /** - * Update a webhook target + * Delete a Signals rule * * @remarks - * Update a Signals webhook target by ID + * Delete a Signals rule by ID */ - async updateWebhookTarget( - request: operations.UpdateSignalsWebhookTargetRequest, + async deleteTeamSignalRule( + request: operations.DeleteTeamSignalRuleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsUpdateWebhookTarget( + return unwrapAsync(signalsDeleteTeamSignalRule( this, request, options, @@ -322,16 +349,16 @@ export class Signals extends ClientSDK { } /** - * List on-call schedules + * Update a Signals rule * * @remarks - * List all Signals on-call schedules for the entire organization. + * Update a Signals rule by ID */ - async listOnCall( - request: operations.ListSignalsOnCallRequest, + async updateTeamSignalRule( + request: operations.UpdateTeamSignalRuleRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListOnCall( + return unwrapAsync(signalsUpdateTeamSignalRule( this, request, options, @@ -339,16 +366,16 @@ export class Signals extends ClientSDK { } /** - * List escalation policies for a team + * List event sources for Signals * * @remarks - * List all Signals escalation policies for a team. + * List all Signals event sources for the authenticated user. */ - async listEscalationPolicies( - request: operations.ListTeamEscalationPoliciesRequest, + async listSignalsEventSources( + request: operations.ListSignalsEventSourcesRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListEscalationPolicies( + return unwrapAsync(signalsListSignalsEventSources( this, request, options, @@ -356,16 +383,16 @@ export class Signals extends ClientSDK { } /** - * Delete an escalation policy for a team + * List email targets for signals * * @remarks - * Delete a Signals escalation policy by ID + * List all Signals email targets for a team. */ - async deleteEscalationPolicy( - request: operations.DeleteTeamEscalationPolicyRequest, + async listSignalsEmailTargets( + request: operations.ListSignalsEmailTargetsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsDeleteEscalationPolicy( + return unwrapAsync(signalsListSignalsEmailTargets( this, request, options, @@ -373,16 +400,16 @@ export class Signals extends ClientSDK { } /** - * Get an on-call schedule for a team + * Create an email target for signals * * @remarks - * Get a Signals on-call schedule by ID + * Create a Signals email target for a team. */ - async getOnCallSchedule( - request: operations.GetTeamOnCallScheduleRequest, + async createSignalsEmailTarget( + request: components.CreateSignalsEmailTarget, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsGetOnCallSchedule( + return unwrapAsync(signalsCreateSignalsEmailTarget( this, request, options, @@ -390,16 +417,16 @@ export class Signals extends ClientSDK { } /** - * Update an on-call schedule for a team + * Get a signal email target * * @remarks - * Update a Signals on-call schedule by ID + * Get a Signals email target by ID */ - async updateOnCallSchedule( - request: operations.UpdateTeamOnCallScheduleRequest, + async getSignalsEmailTarget( + request: operations.GetSignalsEmailTargetRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsUpdateOnCallSchedule( + return unwrapAsync(signalsGetSignalsEmailTarget( this, request, options, @@ -407,16 +434,16 @@ export class Signals extends ClientSDK { } /** - * List signal rules for a team + * Delete a signal email target * * @remarks - * List all Signals rules for a team. + * Delete a Signals email target by ID */ - async listRules( - request: operations.ListTeamSignalRulesRequest, + async deleteSignalsEmailTarget( + request: operations.DeleteSignalsEmailTargetRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsListRules( + return unwrapAsync(signalsDeleteSignalsEmailTarget( this, request, options, @@ -424,16 +451,16 @@ export class Signals extends ClientSDK { } /** - * Create a signal rule for a team + * Update an email target * * @remarks - * Create a Signals rule for a team. + * Update a Signals email target by ID */ - async createRule( - request: operations.CreateTeamSignalRuleRequest, + async updateSignalsEmailTarget( + request: operations.UpdateSignalsEmailTargetRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsCreateRule( + return unwrapAsync(signalsUpdateSignalsEmailTarget( this, request, options, @@ -441,16 +468,16 @@ export class Signals extends ClientSDK { } /** - * Get a signal rule + * List webhook targets * * @remarks - * Get a Signals rule by ID. + * List all Signals webhook targets. */ - async getRule( - request: operations.GetTeamSignalRuleRequest, + async listSignalsWebhookTargets( + request: operations.ListSignalsWebhookTargetsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsGetRule( + return unwrapAsync(signalsListSignalsWebhookTargets( this, request, options, @@ -458,16 +485,16 @@ export class Signals extends ClientSDK { } /** - * Delete a signal rule + * Create a webhook target * * @remarks - * Delete a Signals rule by ID + * Create a Signals webhook target. */ - async deleteRule( - request: operations.DeleteTeamSignalRuleRequest, + async createSignalsWebhookTarget( + request: components.CreateSignalsWebhookTarget, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsDeleteRule( + return unwrapAsync(signalsCreateSignalsWebhookTarget( this, request, options, @@ -475,16 +502,116 @@ export class Signals extends ClientSDK { } /** - * Update a signal rule + * Get a webhook target * * @remarks - * Update a Signals rule by ID + * Get a Signals webhook target by ID */ - async updateRule( - request: operations.UpdateTeamSignalRuleRequest, + async getSignalsWebhookTarget( + request: operations.GetSignalsWebhookTargetRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(signalsGetSignalsWebhookTarget( + this, + request, + options, + )); + } + + /** + * Delete a webhook target + * + * @remarks + * Delete a Signals webhook target by ID + */ + async deleteSignalsWebhookTarget( + request: operations.DeleteSignalsWebhookTargetRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(signalsDeleteSignalsWebhookTarget( + this, + request, + options, + )); + } + + /** + * Update a webhook target + * + * @remarks + * Update a Signals webhook target by ID + */ + async updateSignalsWebhookTarget( + request: operations.UpdateSignalsWebhookTargetRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(signalsUpdateSignalsWebhookTarget( + this, + request, + options, + )); + } + + /** + * List signal transposers + * + * @remarks + * List all transposers for your organization + */ + async listSignalsTransposers( + options?: RequestOptions, + ): Promise { + return unwrapAsync(signalsListSignalsTransposers( + this, + options, + )); + } + + /** + * Get the signals ingestion URL + * + * @remarks + * Retrieve the url for ingesting signals for your organization + */ + async getSignalsIngestUrl( + request: operations.GetSignalsIngestUrlRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(signalsGetSignalsIngestUrl( + this, + request, + options, + )); + } + + /** + * Debug Signals expressions + * + * @remarks + * Debug Signals expressions + */ + async debugSignalsExpression( + request: components.DebugSignalsExpression, + options?: RequestOptions, + ): Promise { + return unwrapAsync(signalsDebugSignalsExpression( + this, + request, + options, + )); + } + + /** + * List on-call schedules + * + * @remarks + * List all Signals on-call schedules for the entire organization. + */ + async listOrganizationOnCallSchedules( + request: operations.ListOrganizationOnCallSchedulesRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(signalsUpdateRule( + return unwrapAsync(signalsListOrganizationOnCallSchedules( this, request, options, diff --git a/src/sdk/slack.ts b/src/sdk/slack.ts deleted file mode 100644 index 35ee0b33..00000000 --- a/src/sdk/slack.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { slackCreateEmojiAction } from "../funcs/slackCreateEmojiAction.js"; -import { slackListUsergroups } from "../funcs/slackListUsergroups.js"; -import { slackUpdateEmojiAction } from "../funcs/slackUpdateEmojiAction.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Slack extends ClientSDK { - /** - * Create a Slack emoji action - * - * @remarks - * Creates a new slack emoji action - */ - async createEmojiAction( - request: operations.CreateSlackEmojiActionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(slackCreateEmojiAction( - this, - request, - options, - )); - } - - /** - * Update a Slack emoji action - * - * @remarks - * Updates a slack emoji action - */ - async updateEmojiAction( - request: operations.UpdateSlackEmojiActionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(slackUpdateEmojiAction( - this, - request, - options, - )); - } - - /** - * List Slack usergroups - */ - async listUsergroups( - options?: RequestOptions, - ): Promise { - return unwrapAsync(slackListUsergroups( - this, - options, - )); - } -} diff --git a/src/sdk/statuspage.ts b/src/sdk/statuspage.ts deleted file mode 100644 index d7aaad1a..00000000 --- a/src/sdk/statuspage.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { statuspageUpdateConnection } from "../funcs/statuspageUpdateConnection.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Statuspage extends ClientSDK { - /** - * Update a Statuspage connection - * - * @remarks - * Update the given Statuspage integration connection. - */ - async updateConnection( - request: operations.UpdateStatuspageConnectionRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(statuspageUpdateConnection( - this, - request, - options, - )); - } -} diff --git a/src/sdk/statuspages.ts b/src/sdk/statuspages.ts index c36eae61..dedb7dd8 100644 --- a/src/sdk/statuspages.ts +++ b/src/sdk/statuspages.ts @@ -2,25 +2,25 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { statusPagesCreate } from "../funcs/statusPagesCreate.js"; -import { statusPagesCreateComponentGroup } from "../funcs/statusPagesCreateComponentGroup.js"; -import { statusPagesCreateLink } from "../funcs/statusPagesCreateLink.js"; -import { statusPagesCreateSubscribers } from "../funcs/statusPagesCreateSubscribers.js"; -import { statusPagesCreateSubscription } from "../funcs/statusPagesCreateSubscription.js"; -import { statusPagesDelete } from "../funcs/statusPagesDelete.js"; -import { statusPagesDeleteComponentGroup } from "../funcs/statusPagesDeleteComponentGroup.js"; -import { statusPagesDeleteImage } from "../funcs/statusPagesDeleteImage.js"; -import { statusPagesDeleteIncident } from "../funcs/statusPagesDeleteIncident.js"; -import { statusPagesDeleteLink } from "../funcs/statusPagesDeleteLink.js"; -import { statusPagesDeleteSubscribers } from "../funcs/statusPagesDeleteSubscribers.js"; -import { statusPagesDeleteSubscription } from "../funcs/statusPagesDeleteSubscription.js"; -import { statusPagesGet } from "../funcs/statusPagesGet.js"; -import { statusPagesList } from "../funcs/statusPagesList.js"; -import { statusPagesListSubscribers } from "../funcs/statusPagesListSubscribers.js"; -import { statusPagesUpdate } from "../funcs/statusPagesUpdate.js"; -import { statusPagesUpdateComponentGroup } from "../funcs/statusPagesUpdateComponentGroup.js"; -import { statusPagesUpdateImage } from "../funcs/statusPagesUpdateImage.js"; -import { statusPagesUpdateLink } from "../funcs/statusPagesUpdateLink.js"; +import { statusPagesCreateEmailSubscriber } from "../funcs/statusPagesCreateEmailSubscriber.js"; +import { statusPagesCreateNuncComponentGroup } from "../funcs/statusPagesCreateNuncComponentGroup.js"; +import { statusPagesCreateNuncConnection } from "../funcs/statusPagesCreateNuncConnection.js"; +import { statusPagesCreateNuncLink } from "../funcs/statusPagesCreateNuncLink.js"; +import { statusPagesCreateNuncSubscription } from "../funcs/statusPagesCreateNuncSubscription.js"; +import { statusPagesDeleteEmailSubscriber } from "../funcs/statusPagesDeleteEmailSubscriber.js"; +import { statusPagesDeleteIncidentStatusPage } from "../funcs/statusPagesDeleteIncidentStatusPage.js"; +import { statusPagesDeleteNuncComponentGroup } from "../funcs/statusPagesDeleteNuncComponentGroup.js"; +import { statusPagesDeleteNuncConnection } from "../funcs/statusPagesDeleteNuncConnection.js"; +import { statusPagesDeleteNuncImage } from "../funcs/statusPagesDeleteNuncImage.js"; +import { statusPagesDeleteNuncLink } from "../funcs/statusPagesDeleteNuncLink.js"; +import { statusPagesDeleteNuncSubscription } from "../funcs/statusPagesDeleteNuncSubscription.js"; +import { statusPagesGetNuncConnection } from "../funcs/statusPagesGetNuncConnection.js"; +import { statusPagesListEmailSubscribers } from "../funcs/statusPagesListEmailSubscribers.js"; +import { statusPagesListNuncConnections } from "../funcs/statusPagesListNuncConnections.js"; +import { statusPagesUpdateNuncComponentGroup } from "../funcs/statusPagesUpdateNuncComponentGroup.js"; +import { statusPagesUpdateNuncConnection } from "../funcs/statusPagesUpdateNuncConnection.js"; +import { statusPagesUpdateNuncImage } from "../funcs/statusPagesUpdateNuncImage.js"; +import { statusPagesUpdateNuncLink } from "../funcs/statusPagesUpdateNuncLink.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -33,11 +33,11 @@ export class StatusPages extends ClientSDK { * @remarks * Remove a status page incident attached to an incident */ - async deleteIncident( + async deleteIncidentStatusPage( request: operations.DeleteIncidentStatusPageRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(statusPagesDeleteIncident( + return unwrapAsync(statusPagesDeleteIncidentStatusPage( this, request, options, @@ -45,33 +45,31 @@ export class StatusPages extends ClientSDK { } /** - * Create a status page subscription + * List status pages * * @remarks - * Subscribe to status page updates + * Lists the information displayed as part of your FireHydrant hosted status pages. */ - async createSubscription( - request: components.PostV1NuncSubscriptions, + async listNuncConnections( options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesCreateSubscription( + ): Promise { + return unwrapAsync(statusPagesListNuncConnections( this, - request, options, )); } /** - * Unsubscribe from status page notifications + * Create a status page * * @remarks - * Unsubscribe from status page updates + * Create a new FireHydrant hosted status page for customer facing statuses. */ - async deleteSubscription( - request: operations.DeleteNuncSubscriptionRequest, + async createNuncConnection( + request: operations.CreateNuncConnectionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesDeleteSubscription( + ): Promise { + return unwrapAsync(statusPagesCreateNuncConnection( this, request, options, @@ -79,31 +77,33 @@ export class StatusPages extends ClientSDK { } /** - * List status pages + * List status page subscribers * * @remarks - * Lists the information displayed as part of your FireHydrant hosted status pages. + * Retrieves the list of subscribers for a status page. */ - async list( + async listEmailSubscribers( + request: operations.ListEmailSubscribersRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesList( + ): Promise { + return unwrapAsync(statusPagesListEmailSubscribers( this, + request, options, )); } /** - * Create a status page + * Add subscribers to a status page * * @remarks - * Create a new FireHydrant hosted status page for customer facing statuses. + * Subscribes a comma-separated string of emails to status page updates */ - async create( - request: operations.CreateStatusPageRequestBody, + async createEmailSubscriber( + request: operations.CreateEmailSubscriberRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesCreate( + ): Promise { + return unwrapAsync(statusPagesCreateEmailSubscriber( this, request, options, @@ -111,16 +111,16 @@ export class StatusPages extends ClientSDK { } /** - * Get a status page + * Remove subscribers from a status page * * @remarks - * Retrieve the information displayed as part of your FireHydrant hosted status page. + * Unsubscribes one or more status page subscribers. */ - async get( - request: operations.GetStatusPageRequest, + async deleteEmailSubscriber( + request: operations.DeleteEmailSubscriberRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesGet( + ): Promise { + return unwrapAsync(statusPagesDeleteEmailSubscriber( this, request, options, @@ -128,16 +128,16 @@ export class StatusPages extends ClientSDK { } /** - * Update a status page + * Get a status page * * @remarks - * Update your company's information and other components in the specified FireHydrant hosted status page. + * Retrieve the information displayed as part of your FireHydrant hosted status page. */ - async update( - request: operations.UpdateStatusPageRequest, + async getNuncConnection( + request: operations.GetNuncConnectionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(statusPagesUpdate( + return unwrapAsync(statusPagesGetNuncConnection( this, request, options, @@ -145,16 +145,16 @@ export class StatusPages extends ClientSDK { } /** - * Delete a status page + * Update a status page * * @remarks - * Delete a FireHydrant hosted status page, stopping updates of your incidents to it. + * Update your company's information and other components in the specified FireHydrant hosted status page. */ - async delete( - request: operations.DeleteStatusPageRequest, + async updateNuncConnection( + request: operations.UpdateNuncConnectionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(statusPagesDelete( + return unwrapAsync(statusPagesUpdateNuncConnection( this, request, options, @@ -162,16 +162,16 @@ export class StatusPages extends ClientSDK { } /** - * Create a component group for a status page + * Delete a status page * * @remarks - * Add a component group to be displayed on a FireHydrant status page + * Delete a FireHydrant hosted status page, stopping updates of your incidents to it. */ - async createComponentGroup( - request: operations.CreateStatusPageComponentGroupRequest, + async deleteNuncConnection( + request: operations.DeleteNuncConnectionRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(statusPagesCreateComponentGroup( + return unwrapAsync(statusPagesDeleteNuncConnection( this, request, options, @@ -184,11 +184,11 @@ export class StatusPages extends ClientSDK { * @remarks * Delete a component group displayed on a FireHydrant status page */ - async deleteComponentGroup( - request: operations.DeleteStatusPageComponentGroupRequest, + async deleteNuncComponentGroup( + request: operations.DeleteNuncComponentGroupRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(statusPagesDeleteComponentGroup( + return unwrapAsync(statusPagesDeleteNuncComponentGroup( this, request, options, @@ -201,11 +201,11 @@ export class StatusPages extends ClientSDK { * @remarks * Update a component group to be displayed on a FireHydrant status page */ - async updateComponentGroup( - request: operations.UpdateStatusPageComponentGroupRequest, + async updateNuncComponentGroup( + request: operations.UpdateNuncComponentGroupRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(statusPagesUpdateComponentGroup( + return unwrapAsync(statusPagesUpdateNuncComponentGroup( this, request, options, @@ -213,16 +213,16 @@ export class StatusPages extends ClientSDK { } /** - * Upload an image for a status page + * Create a component group for a status page * * @remarks - * Add or replace an image attached to a FireHydrant status page + * Add a component group to be displayed on a FireHydrant status page */ - async updateImage( - request: operations.UpdateStatusPageImageRequest, + async createNuncComponentGroup( + request: operations.CreateNuncComponentGroupRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(statusPagesUpdateImage( + return unwrapAsync(statusPagesCreateNuncComponentGroup( this, request, options, @@ -230,16 +230,16 @@ export class StatusPages extends ClientSDK { } /** - * Delete an image from a status page + * Delete a status page link * * @remarks - * Delete an image attached to a FireHydrant status page + * Delete a link displayed on a FireHydrant status page */ - async deleteImage( - request: operations.DeleteStatusPageImageRequest, + async deleteNuncLink( + request: operations.DeleteNuncLinkRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesDeleteImage( + ): Promise { + return unwrapAsync(statusPagesDeleteNuncLink( this, request, options, @@ -247,16 +247,16 @@ export class StatusPages extends ClientSDK { } /** - * Create a link for a status page + * Update a status page link * * @remarks - * Add a link to be displayed on a FireHydrant status page + * Update a link to be displayed on a FireHydrant status page */ - async createLink( - request: operations.CreateStatusPageLinkRequest, + async updateNuncLink( + request: operations.UpdateNuncLinkRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesCreateLink( + ): Promise { + return unwrapAsync(statusPagesUpdateNuncLink( this, request, options, @@ -264,16 +264,16 @@ export class StatusPages extends ClientSDK { } /** - * Delete a status page link + * Add link to a status page * * @remarks - * Delete a link displayed on a FireHydrant status page + * Add a link to be displayed on a FireHydrant status page */ - async deleteLink( - request: operations.DeleteStatusPageLinkRequest, + async createNuncLink( + request: operations.CreateNuncLinkRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesDeleteLink( + ): Promise { + return unwrapAsync(statusPagesCreateNuncLink( this, request, options, @@ -281,16 +281,16 @@ export class StatusPages extends ClientSDK { } /** - * Update a status page link + * Upload an image for a status page * * @remarks - * Update a link to be displayed on a FireHydrant status page + * Add or replace an image attached to a FireHydrant status page */ - async updateLink( - request: operations.UpdateStatusPageLinkRequest, + async updateNuncImage( + request: operations.UpdateNuncImageRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesUpdateLink( + ): Promise { + return unwrapAsync(statusPagesUpdateNuncImage( this, request, options, @@ -298,16 +298,16 @@ export class StatusPages extends ClientSDK { } /** - * List status page subscribers + * Delete an image from a status page * * @remarks - * Retrieves the list of subscribers for a status page. + * Delete an image attached to a FireHydrant status page */ - async listSubscribers( - request: operations.ListStatusPageSubscribersRequest, + async deleteNuncImage( + request: operations.DeleteNuncImageRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesListSubscribers( + ): Promise { + return unwrapAsync(statusPagesDeleteNuncImage( this, request, options, @@ -315,16 +315,16 @@ export class StatusPages extends ClientSDK { } /** - * Add subscribers to a status page + * Unsubscribe from status page notifications * * @remarks - * Subscribes a comma-separated string of emails to status page updates + * Unsubscribe from status page updates */ - async createSubscribers( - request: operations.CreateStatusPageSubscribersRequest, + async deleteNuncSubscription( + request: operations.DeleteNuncSubscriptionRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesCreateSubscribers( + ): Promise { + return unwrapAsync(statusPagesDeleteNuncSubscription( this, request, options, @@ -332,16 +332,16 @@ export class StatusPages extends ClientSDK { } /** - * Remove subscribers from a status page + * Create a status page subscription * * @remarks - * Unsubscribes one or more status page subscribers. + * Subscribe to status page updates */ - async deleteSubscribers( - request: operations.DeleteStatusPageSubscribersRequest, + async createNuncSubscription( + request: components.CreateNuncSubscription, options?: RequestOptions, - ): Promise { - return unwrapAsync(statusPagesDeleteSubscribers( + ): Promise { + return unwrapAsync(statusPagesCreateNuncSubscription( this, request, options, diff --git a/src/sdk/statusupdatetemplates.ts b/src/sdk/statusupdatetemplates.ts deleted file mode 100644 index ce7d0282..00000000 --- a/src/sdk/statusupdatetemplates.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { statusUpdateTemplatesCreate } from "../funcs/statusUpdateTemplatesCreate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class StatusUpdateTemplates extends ClientSDK { - /** - * Create a status update template - * - * @remarks - * Create a status update template for your organization - */ - async create( - request: components.PostV1StatusUpdateTemplates, - options?: RequestOptions, - ): Promise { - return unwrapAsync(statusUpdateTemplatesCreate( - this, - request, - options, - )); - } -} diff --git a/src/sdk/system.ts b/src/sdk/system.ts deleted file mode 100644 index 1251f4f0..00000000 --- a/src/sdk/system.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { systemPing } from "../funcs/systemPing.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class System extends ClientSDK { - /** - * Check API connectivity - * - * @remarks - * Simple endpoint to verify your API connection is working - */ - async ping( - options?: RequestOptions, - ): Promise { - return unwrapAsync(systemPing( - this, - options, - )); - } -} diff --git a/src/sdk/tasks.ts b/src/sdk/tasks.ts index 8cc489e2..25be08c4 100644 --- a/src/sdk/tasks.ts +++ b/src/sdk/tasks.ts @@ -2,43 +2,40 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { tasksConvertToFollowup } from "../funcs/tasksConvertToFollowup.js"; -import { tasksCreate } from "../funcs/tasksCreate.js"; +import { tasksConvertIncidentTask } from "../funcs/tasksConvertIncidentTask.js"; import { tasksCreateChecklistTemplate } from "../funcs/tasksCreateChecklistTemplate.js"; -import { tasksCreateList } from "../funcs/tasksCreateList.js"; -import { tasksDelete } from "../funcs/tasksDelete.js"; +import { tasksCreateIncidentTask } from "../funcs/tasksCreateIncidentTask.js"; +import { tasksCreateIncidentTaskList } from "../funcs/tasksCreateIncidentTaskList.js"; +import { tasksCreateTaskList } from "../funcs/tasksCreateTaskList.js"; import { tasksDeleteChecklistTemplate } from "../funcs/tasksDeleteChecklistTemplate.js"; -import { tasksGet } from "../funcs/tasksGet.js"; -import { tasksGetForIncident } from "../funcs/tasksGetForIncident.js"; +import { tasksDeleteIncidentTask } from "../funcs/tasksDeleteIncidentTask.js"; +import { tasksDeleteTaskList } from "../funcs/tasksDeleteTaskList.js"; +import { tasksGetChecklistTemplate } from "../funcs/tasksGetChecklistTemplate.js"; +import { tasksGetIncidentTask } from "../funcs/tasksGetIncidentTask.js"; +import { tasksGetTaskList } from "../funcs/tasksGetTaskList.js"; import { tasksListChecklistTemplates } from "../funcs/tasksListChecklistTemplates.js"; -import { tasksListForIncident } from "../funcs/tasksListForIncident.js"; -import { tasksListTasks } from "../funcs/tasksListTasks.js"; -import { tasksUpdate } from "../funcs/tasksUpdate.js"; +import { tasksListIncidentTasks } from "../funcs/tasksListIncidentTasks.js"; +import { tasksListTaskLists } from "../funcs/tasksListTaskLists.js"; import { tasksUpdateChecklistTemplate } from "../funcs/tasksUpdateChecklistTemplate.js"; -import { tasksUpdateTask } from "../funcs/tasksUpdateTask.js"; +import { tasksUpdateIncidentTask } from "../funcs/tasksUpdateIncidentTask.js"; +import { tasksUpdateTaskList } from "../funcs/tasksUpdateTaskList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; -import { List } from "./list.js"; export class Tasks extends ClientSDK { - private _list?: List; - get list(): List { - return (this._list ??= new List(this._options)); - } - /** - * List checklist templates + * Add tasks from a task list to an incident * * @remarks - * List all of the checklist templates that have been added to the organization + * Add all tasks from list to incident */ - async listChecklistTemplates( - request: operations.ListChecklistTemplatesRequest, + async createIncidentTaskList( + request: operations.CreateIncidentTaskListRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksListChecklistTemplates( + ): Promise { + return unwrapAsync(tasksCreateIncidentTaskList( this, request, options, @@ -46,16 +43,16 @@ export class Tasks extends ClientSDK { } /** - * Create a checklist template + * List tasks for an incident * * @remarks - * Creates a checklist template for the organization + * Retrieve a list of all tasks for a specific incident */ - async createChecklistTemplate( - request: components.PostV1ChecklistTemplates, + async listIncidentTasks( + request: operations.ListIncidentTasksRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksCreateChecklistTemplate( + ): Promise { + return unwrapAsync(tasksListIncidentTasks( this, request, options, @@ -63,16 +60,16 @@ export class Tasks extends ClientSDK { } /** - * Archive a checklist template + * Create an incident task * * @remarks - * Archive a checklist template + * Create a task */ - async deleteChecklistTemplate( - request: operations.DeleteChecklistTemplateRequest, + async createIncidentTask( + request: operations.CreateIncidentTaskRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksDeleteChecklistTemplate( + ): Promise { + return unwrapAsync(tasksCreateIncidentTask( this, request, options, @@ -80,16 +77,16 @@ export class Tasks extends ClientSDK { } /** - * Update a checklist template + * Get an incident task * * @remarks - * Update a checklist templates attributes + * Retrieve a single task for an incident */ - async updateChecklistTemplate( - request: operations.UpdateChecklistTemplateRequest, + async getIncidentTask( + request: operations.GetIncidentTaskRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksUpdateChecklistTemplate( + ): Promise { + return unwrapAsync(tasksGetIncidentTask( this, request, options, @@ -97,16 +94,16 @@ export class Tasks extends ClientSDK { } /** - * List tasks for an incident + * Delete an incident task * * @remarks - * Retrieve a list of all tasks for a specific incident + * Delete a task */ - async listForIncident( - request: operations.ListIncidentTasksRequest, + async deleteIncidentTask( + request: operations.DeleteIncidentTaskRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksListForIncident( + ): Promise { + return unwrapAsync(tasksDeleteIncidentTask( this, request, options, @@ -114,16 +111,16 @@ export class Tasks extends ClientSDK { } /** - * Create a task for an incident + * Update an incident task * * @remarks - * Create a task + * Update a task's attributes */ - async create( - request: operations.CreateIncidentTaskRequest, + async updateIncidentTask( + request: operations.UpdateIncidentTaskRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(tasksCreate( + return unwrapAsync(tasksUpdateIncidentTask( this, request, options, @@ -131,16 +128,16 @@ export class Tasks extends ClientSDK { } /** - * Get a task for an incident + * Convert a task to a follow-up * * @remarks - * Retrieve a single task for an incident + * Convert a task to a follow-up */ - async getForIncident( - request: operations.GetIncidentTaskRequest, + async convertIncidentTask( + request: operations.ConvertIncidentTaskRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksGetForIncident( + ): Promise { + return unwrapAsync(tasksConvertIncidentTask( this, request, options, @@ -148,16 +145,16 @@ export class Tasks extends ClientSDK { } /** - * Delete a task from an incident + * List task lists * * @remarks - * Delete a task + * Lists all task lists for your organization */ - async delete( - request: operations.DeleteIncidentTaskRequest, + async listTaskLists( + request: operations.ListTaskListsRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksDelete( + ): Promise { + return unwrapAsync(tasksListTaskLists( this, request, options, @@ -165,16 +162,16 @@ export class Tasks extends ClientSDK { } /** - * Update a task for an incident + * Create a task list * * @remarks - * Update a task's attributes + * Creates a new task list */ - async updateTask( - request: operations.UpdateIncidentTaskRequest, + async createTaskList( + request: components.CreateTaskList, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksUpdateTask( + ): Promise { + return unwrapAsync(tasksCreateTaskList( this, request, options, @@ -182,16 +179,16 @@ export class Tasks extends ClientSDK { } /** - * Convert a task to a follow-up + * Get a task list * * @remarks - * Convert a task to a follow-up + * Retrieves a single task list by ID */ - async convertToFollowup( - request: operations.ConvertIncidentTaskToFollowupRequest, + async getTaskList( + request: operations.GetTaskListRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksConvertToFollowup( + ): Promise { + return unwrapAsync(tasksGetTaskList( this, request, options, @@ -199,16 +196,16 @@ export class Tasks extends ClientSDK { } /** - * List task lists + * Delete a task list * * @remarks - * Lists all task lists for your organization + * Delete a task list */ - async listTasks( - request: operations.ListTaskListsRequest, + async deleteTaskList( + request: operations.DeleteTaskListRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(tasksListTasks( + return unwrapAsync(tasksDeleteTaskList( this, request, options, @@ -216,16 +213,16 @@ export class Tasks extends ClientSDK { } /** - * Create a task list + * Update a task list * * @remarks - * Creates a new task list + * Updates a task list's attributes and task list items */ - async createList( - request: components.PostV1TaskLists, + async updateTaskList( + request: operations.UpdateTaskListRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(tasksCreateList( + return unwrapAsync(tasksUpdateTaskList( this, request, options, @@ -233,16 +230,16 @@ export class Tasks extends ClientSDK { } /** - * Get a task list + * List checklist templates * * @remarks - * Retrieves a single task list by ID + * List all of the checklist templates that have been added to the organization */ - async get( - request: operations.GetTaskListRequest, + async listChecklistTemplates( + request: operations.ListChecklistTemplatesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksGet( + ): Promise { + return unwrapAsync(tasksListChecklistTemplates( this, request, options, @@ -250,16 +247,67 @@ export class Tasks extends ClientSDK { } /** - * Update a task list + * Create a checklist template * * @remarks - * Updates a task list's attributes and task list items + * Creates a checklist template for the organization */ - async update( - request: operations.UpdateTaskListRequest, + async createChecklistTemplate( + request: components.CreateChecklistTemplate, options?: RequestOptions, - ): Promise { - return unwrapAsync(tasksUpdate( + ): Promise { + return unwrapAsync(tasksCreateChecklistTemplate( + this, + request, + options, + )); + } + + /** + * Get a checklist template + * + * @remarks + * Retrieves a single checklist template by ID + */ + async getChecklistTemplate( + request: operations.GetChecklistTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tasksGetChecklistTemplate( + this, + request, + options, + )); + } + + /** + * Archive a checklist template + * + * @remarks + * Archive a checklist template + */ + async deleteChecklistTemplate( + request: operations.DeleteChecklistTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tasksDeleteChecklistTemplate( + this, + request, + options, + )); + } + + /** + * Update a checklist template + * + * @remarks + * Update a checklist templates attributes + */ + async updateChecklistTemplate( + request: operations.UpdateChecklistTemplateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(tasksUpdateChecklistTemplate( this, request, options, diff --git a/src/sdk/teams.ts b/src/sdk/teams.ts index 5b098fb5..355b4a82 100644 --- a/src/sdk/teams.ts +++ b/src/sdk/teams.ts @@ -2,54 +2,29 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { teamsArchive } from "../funcs/teamsArchive.js"; -import { teamsCreate } from "../funcs/teamsCreate.js"; -import { teamsCreateEscalationPolicy } from "../funcs/teamsCreateEscalationPolicy.js"; -import { teamsCreateOnCallSchedule } from "../funcs/teamsCreateOnCallSchedule.js"; -import { teamsCreateShift } from "../funcs/teamsCreateShift.js"; -import { teamsDeleteScheduleShift } from "../funcs/teamsDeleteScheduleShift.js"; -import { teamsGet } from "../funcs/teamsGet.js"; -import { teamsGetScheduleShift } from "../funcs/teamsGetScheduleShift.js"; -import { teamsList } from "../funcs/teamsList.js"; -import { teamsListOnCallSchedules } from "../funcs/teamsListOnCallSchedules.js"; +import { teamsCreateTeam } from "../funcs/teamsCreateTeam.js"; +import { teamsDeleteTeam } from "../funcs/teamsDeleteTeam.js"; +import { teamsGetTeam } from "../funcs/teamsGetTeam.js"; import { teamsListSchedules } from "../funcs/teamsListSchedules.js"; -import { teamsUpdate } from "../funcs/teamsUpdate.js"; -import { teamsUpdateEscalationPolicy } from "../funcs/teamsUpdateEscalationPolicy.js"; -import { teamsUpdateScheduleShift } from "../funcs/teamsUpdateScheduleShift.js"; +import { teamsListTeams } from "../funcs/teamsListTeams.js"; +import { teamsUpdateTeam } from "../funcs/teamsUpdateTeam.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Teams extends ClientSDK { - /** - * List schedules - * - * @remarks - * List all known schedules in FireHydrant as pulled from external sources - */ - async listSchedules( - request: operations.ListSchedulesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsListSchedules( - this, - request, - options, - )); - } - /** * List teams * * @remarks * List all of the teams in the organization */ - async list( + async listTeams( request: operations.ListTeamsRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(teamsList( + return unwrapAsync(teamsListTeams( this, request, options, @@ -62,11 +37,11 @@ export class Teams extends ClientSDK { * @remarks * Create a new team */ - async create( - request: components.PostV1Teams, + async createTeam( + request: components.CreateTeam, options?: RequestOptions, ): Promise { - return unwrapAsync(teamsCreate( + return unwrapAsync(teamsCreateTeam( this, request, options, @@ -79,11 +54,11 @@ export class Teams extends ClientSDK { * @remarks * Retrieve a single team from its ID */ - async get( + async getTeam( request: operations.GetTeamRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(teamsGet( + return unwrapAsync(teamsGetTeam( this, request, options, @@ -96,11 +71,11 @@ export class Teams extends ClientSDK { * @remarks * Archives an team which will hide it from lists and metrics */ - async archive( - request: operations.ArchiveTeamRequest, + async deleteTeam( + request: operations.DeleteTeamRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(teamsArchive( + return unwrapAsync(teamsDeleteTeam( this, request, options, @@ -113,62 +88,11 @@ export class Teams extends ClientSDK { * @remarks * Update a single team from its ID */ - async update( + async updateTeam( request: operations.UpdateTeamRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(teamsUpdate( - this, - request, - options, - )); - } - - /** - * List on-call schedules for a team - * - * @remarks - * List all Signals on-call schedules for a team. - */ - async listOnCallSchedules( - request: operations.ListTeamOnCallSchedulesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsListOnCallSchedules( - this, - request, - options, - )); - } - - /** - * Create an on-call schedule for a team - * - * @remarks - * Create a Signals on-call schedule for a team. - */ - async createOnCallSchedule( - request: operations.CreateTeamOnCallScheduleRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsCreateOnCallSchedule( - this, - request, - options, - )); - } - - /** - * Get an on-call shift for a team schedule - * - * @remarks - * Get a Signals on-call shift by ID - */ - async getScheduleShift( - request: operations.GetTeamScheduleShiftRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsGetScheduleShift( + return unwrapAsync(teamsUpdateTeam( this, request, options, @@ -176,84 +100,16 @@ export class Teams extends ClientSDK { } /** - * Delete an on-call shift from a team schedule - * - * @remarks - * Delete a Signals on-call shift by ID - */ - async deleteScheduleShift( - request: operations.DeleteTeamScheduleShiftRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsDeleteScheduleShift( - this, - request, - options, - )); - } - - /** - * Update an on-call shift in a team schedule - * - * @remarks - * Update a Signals on-call shift by ID - */ - async updateScheduleShift( - request: operations.UpdateTeamScheduleShiftRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsUpdateScheduleShift( - this, - request, - options, - )); - } - - /** - * Create an escalation policy for a team - * - * @remarks - * Create a Signals escalation policy for a team. - */ - async createEscalationPolicy( - request: operations.CreateTeamEscalationPolicyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsCreateEscalationPolicy( - this, - request, - options, - )); - } - - /** - * Update an escalation policy for a team - * - * @remarks - * Update a Signals escalation policy by ID - */ - async updateEscalationPolicy( - request: operations.UpdateTeamEscalationPolicyRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsUpdateEscalationPolicy( - this, - request, - options, - )); - } - - /** - * Create a shift for an on-call schedule + * List schedules * * @remarks - * Create a Signals on-call shift in a schedule. + * List all known schedules in FireHydrant as pulled from external sources */ - async createShift( - request: operations.CreateTeamOnCallScheduleShiftRequest, + async listSchedules( + request: operations.ListSchedulesRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(teamsCreateShift( + ): Promise { + return unwrapAsync(teamsListSchedules( this, request, options, diff --git a/src/sdk/ticketing.ts b/src/sdk/ticketing.ts index f899e708..7f49a5f8 100644 --- a/src/sdk/ticketing.ts +++ b/src/sdk/ticketing.ts @@ -2,25 +2,257 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { ticketingGetFieldMap } from "../funcs/ticketingGetFieldMap.js"; -import { ticketingUpdateProjectConfig } from "../funcs/ticketingUpdateProjectConfig.js"; +import { ticketingCreateInboundFieldMap } from "../funcs/ticketingCreateInboundFieldMap.js"; +import { ticketingCreateTicket } from "../funcs/ticketingCreateTicket.js"; +import { ticketingCreateTicketingFieldMap } from "../funcs/ticketingCreateTicketingFieldMap.js"; +import { ticketingCreateTicketingPriority } from "../funcs/ticketingCreateTicketingPriority.js"; +import { ticketingCreateTicketingProjectConfig } from "../funcs/ticketingCreateTicketingProjectConfig.js"; +import { ticketingDeleteInboundFieldMap } from "../funcs/ticketingDeleteInboundFieldMap.js"; +import { ticketingDeleteTicket } from "../funcs/ticketingDeleteTicket.js"; +import { ticketingDeleteTicketingFieldMap } from "../funcs/ticketingDeleteTicketingFieldMap.js"; +import { ticketingDeleteTicketingPriority } from "../funcs/ticketingDeleteTicketingPriority.js"; +import { ticketingDeleteTicketingProjectConfig } from "../funcs/ticketingDeleteTicketingProjectConfig.js"; +import { ticketingGetConfigurationOptions } from "../funcs/ticketingGetConfigurationOptions.js"; +import { ticketingGetInboundFieldMap } from "../funcs/ticketingGetInboundFieldMap.js"; +import { ticketingGetOptionsForField } from "../funcs/ticketingGetOptionsForField.js"; +import { ticketingGetTicket } from "../funcs/ticketingGetTicket.js"; +import { ticketingGetTicketingFieldMap } from "../funcs/ticketingGetTicketingFieldMap.js"; +import { ticketingGetTicketingPriority } from "../funcs/ticketingGetTicketingPriority.js"; +import { ticketingGetTicketingProject } from "../funcs/ticketingGetTicketingProject.js"; +import { ticketingGetTicketingProjectConfig } from "../funcs/ticketingGetTicketingProjectConfig.js"; +import { ticketingListAvailableInboundFieldMaps } from "../funcs/ticketingListAvailableInboundFieldMaps.js"; +import { ticketingListAvailableTicketingFieldMaps } from "../funcs/ticketingListAvailableTicketingFieldMaps.js"; +import { ticketingListInboundFieldMaps } from "../funcs/ticketingListInboundFieldMaps.js"; +import { ticketingListTicketingPriorities } from "../funcs/ticketingListTicketingPriorities.js"; +import { ticketingListTicketingProjects } from "../funcs/ticketingListTicketingProjects.js"; +import { ticketingListTickets } from "../funcs/ticketingListTickets.js"; +import { ticketingListTicketTags } from "../funcs/ticketingListTicketTags.js"; +import { ticketingUpdateInboundFieldMap } from "../funcs/ticketingUpdateInboundFieldMap.js"; +import { ticketingUpdateTicket } from "../funcs/ticketingUpdateTicket.js"; +import { ticketingUpdateTicketingFieldMap } from "../funcs/ticketingUpdateTicketingFieldMap.js"; +import { ticketingUpdateTicketingPriority } from "../funcs/ticketingUpdateTicketingPriority.js"; +import { ticketingUpdateTicketingProjectConfig } from "../funcs/ticketingUpdateTicketingProjectConfig.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Ticketing extends ClientSDK { + /** + * List tickets + * + * @remarks + * List all of the tickets that have been added to the organiation + */ + async listTickets( + request: operations.ListTicketsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingListTickets( + this, + request, + options, + )); + } + + /** + * Create a ticket + * + * @remarks + * Creates a ticket for a project + */ + async createTicket( + request: components.CreateTicket, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingCreateTicket( + this, + request, + options, + )); + } + + /** + * Get a ticket + * + * @remarks + * Retrieves a single ticket by ID + */ + async getTicket( + request: operations.GetTicketRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingGetTicket( + this, + request, + options, + )); + } + + /** + * Archive a ticket + * + * @remarks + * Archive a ticket + */ + async deleteTicket( + request: operations.DeleteTicketRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingDeleteTicket( + this, + request, + options, + )); + } + + /** + * Update a ticket + * + * @remarks + * Update a ticket's attributes + */ + async updateTicket( + request: operations.UpdateTicketRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingUpdateTicket( + this, + request, + options, + )); + } + + /** + * List ticketing projects + * + * @remarks + * List all ticketing projects available to the organization + */ + async listTicketingProjects( + request: operations.ListTicketingProjectsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingListTicketingProjects( + this, + request, + options, + )); + } + + /** + * Get a ticketing project + * + * @remarks + * Retrieve a single ticketing project by ID + */ + async getTicketingProject( + request: operations.GetTicketingProjectRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingGetTicketingProject( + this, + request, + options, + )); + } + + /** + * List configuration options for a ticketing project + * + * @remarks + * List all configuration options for a ticketing project + */ + async getConfigurationOptions( + request: operations.GetConfigurationOptionsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingGetConfigurationOptions( + this, + request, + options, + )); + } + + /** + * List a field's configuration options for a ticketing project + * + * @remarks + * List a field's configuration options for a ticketing project + */ + async getOptionsForField( + request: operations.GetOptionsForFieldRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingGetOptionsForField( + this, + request, + options, + )); + } + + /** + * List available fields for ticket field mapping + * + * @remarks + * Returns metadata for the fields that are available for field mapping. + */ + async listAvailableTicketingFieldMaps( + request: operations.ListAvailableTicketingFieldMapsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingListAvailableTicketingFieldMaps( + this, + request, + options, + )); + } + + /** + * Create a field mapping for a ticketing project + * + * @remarks + * Creates field map for a ticketing project + */ + async createTicketingFieldMap( + request: operations.CreateTicketingFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingCreateTicketingFieldMap( + this, + request, + options, + )); + } + /** * Get a field map for a ticketing project * * @remarks * Retrieve field map for a ticketing project */ - async getFieldMap( - request: operations.GetTicketingProjectFieldMapRequest, + async getTicketingFieldMap( + request: operations.GetTicketingFieldMapRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(ticketingGetFieldMap( + return unwrapAsync(ticketingGetTicketingFieldMap( + this, + request, + options, + )); + } + + /** + * Archive a field map for a ticketing project + * + * @remarks + * Archive field map for a ticketing project + */ + async deleteTicketingFieldMap( + request: operations.DeleteTicketingFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingDeleteTicketingFieldMap( this, request, options, @@ -28,16 +260,286 @@ export class Ticketing extends ClientSDK { } /** - * Update a ticketing project configuration + * Update a field map for a ticketing project + * + * @remarks + * Update field map for a ticketing project + */ + async updateTicketingFieldMap( + request: operations.UpdateTicketingFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingUpdateTicketingFieldMap( + this, + request, + options, + )); + } + + /** + * List available fields for ticket field mapping + * + * @remarks + * Returns metadata for the fields that are available for inbound field mapping. + */ + async listAvailableInboundFieldMaps( + request: operations.ListAvailableInboundFieldMapsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingListAvailableInboundFieldMaps( + this, + request, + options, + )); + } + + /** + * List inbound field maps for a ticketing project + * + * @remarks + * List all inbound field maps for a ticketing project + */ + async listInboundFieldMaps( + request: operations.ListInboundFieldMapsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingListInboundFieldMaps( + this, + request, + options, + )); + } + + /** + * Create inbound field map for a ticketing project + * + * @remarks + * Creates inbound field map for a ticketing project + */ + async createInboundFieldMap( + request: operations.CreateInboundFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingCreateInboundFieldMap( + this, + request, + options, + )); + } + + /** + * Get inbound field map for a ticketing project + * + * @remarks + * Retrieve inbound field map for a ticketing project + */ + async getInboundFieldMap( + request: operations.GetInboundFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingGetInboundFieldMap( + this, + request, + options, + )); + } + + /** + * Update inbound field map for a ticketing project + * + * @remarks + * Update inbound field map for a ticketing project + */ + async updateInboundFieldMap( + request: operations.UpdateInboundFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingUpdateInboundFieldMap( + this, + request, + options, + )); + } + + /** + * Archive inbound field map for a ticketing project + * + * @remarks + * Archive inbound field map for a ticketing project + */ + async deleteInboundFieldMap( + request: operations.DeleteInboundFieldMapRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingDeleteInboundFieldMap( + this, + request, + options, + )); + } + + /** + * Create a ticketing project configuration + * + * @remarks + * Creates configuration for a ticketing project + */ + async createTicketingProjectConfig( + request: operations.CreateTicketingProjectConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingCreateTicketingProjectConfig( + this, + request, + options, + )); + } + + /** + * Get configuration for a ticketing project + * + * @remarks + * Retrieve configuration for a ticketing project + */ + async getTicketingProjectConfig( + request: operations.GetTicketingProjectConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingGetTicketingProjectConfig( + this, + request, + options, + )); + } + + /** + * Archive a ticketing project configuration + * + * @remarks + * Archive configuration for a ticketing project + */ + async deleteTicketingProjectConfig( + request: operations.DeleteTicketingProjectConfigRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingDeleteTicketingProjectConfig( + this, + request, + options, + )); + } + + /** + * Update configuration for a ticketing project * * @remarks * Update configuration for a ticketing project */ - async updateProjectConfig( + async updateTicketingProjectConfig( request: operations.UpdateTicketingProjectConfigRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(ticketingUpdateProjectConfig( + return unwrapAsync(ticketingUpdateTicketingProjectConfig( + this, + request, + options, + )); + } + + /** + * List ticketing priorities + * + * @remarks + * List all ticketing priorities available to the organization + */ + async listTicketingPriorities( + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingListTicketingPriorities( + this, + options, + )); + } + + /** + * Create a ticketing priority + * + * @remarks + * Create a single ticketing priority + */ + async createTicketingPriority( + request: components.CreateTicketingPriority, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingCreateTicketingPriority( + this, + request, + options, + )); + } + + /** + * Get a ticketing priority + * + * @remarks + * Retrieve a single ticketing priority by ID + */ + async getTicketingPriority( + request: operations.GetTicketingPriorityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingGetTicketingPriority( + this, + request, + options, + )); + } + + /** + * Delete a ticketing priority + * + * @remarks + * Delete a single ticketing priority by ID + */ + async deleteTicketingPriority( + request: operations.DeleteTicketingPriorityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingDeleteTicketingPriority( + this, + request, + options, + )); + } + + /** + * Update a ticketing priority + * + * @remarks + * Update a single ticketing priority's attributes + */ + async updateTicketingPriority( + request: operations.UpdateTicketingPriorityRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingUpdateTicketingPriority( + this, + request, + options, + )); + } + + /** + * List ticket tags + * + * @remarks + * List all of the ticket tags in the organization + */ + async listTicketTags( + request: operations.ListTicketTagsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(ticketingListTicketTags( this, request, options, diff --git a/src/sdk/ticketingpriorities.ts b/src/sdk/ticketingpriorities.ts deleted file mode 100644 index 1d81caaf..00000000 --- a/src/sdk/ticketingpriorities.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ticketingPrioritiesGet } from "../funcs/ticketingPrioritiesGet.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class TicketingPriorities extends ClientSDK { - /** - * Get a ticketing priority - * - * @remarks - * Retrieve a single ticketing priority by ID - */ - async get( - request: operations.GetTicketingPriorityRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ticketingPrioritiesGet( - this, - request, - options, - )); - } -} diff --git a/src/sdk/tickets.ts b/src/sdk/tickets.ts deleted file mode 100644 index 2472a46d..00000000 --- a/src/sdk/tickets.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { ticketsCreate } from "../funcs/ticketsCreate.js"; -import { ticketsDelete } from "../funcs/ticketsDelete.js"; -import { ticketsList } from "../funcs/ticketsList.js"; -import { ticketsUpdate } from "../funcs/ticketsUpdate.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as components from "../models/components/index.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Tickets extends ClientSDK { - /** - * List tickets - * - * @remarks - * List all of the tickets that have been added to the organiation - */ - async list( - request: operations.ListTicketsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ticketsList( - this, - request, - options, - )); - } - - /** - * Create a ticket - * - * @remarks - * Creates a ticket for a project - */ - async create( - request: components.PostV1TicketingTickets, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ticketsCreate( - this, - request, - options, - )); - } - - /** - * Delete a ticket - */ - async delete( - request: operations.DeleteTicketRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ticketsDelete( - this, - request, - options, - )); - } - - /** - * Update a ticket - * - * @remarks - * Update a ticket's attributes - */ - async update( - request: operations.UpdateTicketRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(ticketsUpdate( - this, - request, - options, - )); - } -} diff --git a/src/sdk/users.ts b/src/sdk/users.ts index 3665d297..af58b323 100644 --- a/src/sdk/users.ts +++ b/src/sdk/users.ts @@ -2,9 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { usersGet } from "../funcs/usersGet.js"; -import { usersGetCurrent } from "../funcs/usersGetCurrent.js"; -import { usersList } from "../funcs/usersList.js"; +import { usersGetCurrentUser } from "../funcs/usersGetCurrentUser.js"; +import { usersGetUser } from "../funcs/usersGetUser.js"; +import { usersListUsers } from "../funcs/usersListUsers.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -12,31 +12,33 @@ import { unwrapAsync } from "../types/fp.js"; export class Users extends ClientSDK { /** - * Get the currently authenticated user + * List users * * @remarks - * Retrieve the current user + * Retrieve a list of all users in an organization */ - async getCurrent( + async listUsers( + request: operations.ListUsersRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(usersGetCurrent( + ): Promise { + return unwrapAsync(usersListUsers( this, + request, options, )); } /** - * List users + * Get a user * * @remarks - * Retrieve a list of all users in an organization + * Retrieve a single user by ID */ - async list( - request: operations.ListUsersRequest, + async getUser( + request: operations.GetUserRequest, options?: RequestOptions, - ): Promise { - return unwrapAsync(usersList( + ): Promise { + return unwrapAsync(usersGetUser( this, request, options, @@ -44,18 +46,16 @@ export class Users extends ClientSDK { } /** - * Get a user + * Get the currently authenticated user * * @remarks - * Retrieve a single user by ID + * Retrieve the current user */ - async get( - request: operations.GetUserRequest, + async getCurrentUser( options?: RequestOptions, - ): Promise { - return unwrapAsync(usersGet( + ): Promise { + return unwrapAsync(usersGetCurrentUser( this, - request, options, )); } diff --git a/src/sdk/webhooks.ts b/src/sdk/webhooks.ts index 526ba256..f8231c33 100644 --- a/src/sdk/webhooks.ts +++ b/src/sdk/webhooks.ts @@ -2,12 +2,12 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { webhooksCreate } from "../funcs/webhooksCreate.js"; -import { webhooksDelete } from "../funcs/webhooksDelete.js"; -import { webhooksGet } from "../funcs/webhooksGet.js"; -import { webhooksList } from "../funcs/webhooksList.js"; -import { webhooksListDeliveries } from "../funcs/webhooksListDeliveries.js"; -import { webhooksUpdate } from "../funcs/webhooksUpdate.js"; +import { webhooksCreateWebhook } from "../funcs/webhooksCreateWebhook.js"; +import { webhooksDeleteWebhook } from "../funcs/webhooksDeleteWebhook.js"; +import { webhooksGetWebhook } from "../funcs/webhooksGetWebhook.js"; +import { webhooksListWebhookDeliveries } from "../funcs/webhooksListWebhookDeliveries.js"; +import { webhooksListWebhooks } from "../funcs/webhooksListWebhooks.js"; +import { webhooksUpdateWebhook } from "../funcs/webhooksUpdateWebhook.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; @@ -20,11 +20,11 @@ export class Webhooks extends ClientSDK { * @remarks * Lists webhooks */ - async list( + async listWebhooks( request: operations.ListWebhooksRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(webhooksList( + return unwrapAsync(webhooksListWebhooks( this, request, options, @@ -37,11 +37,28 @@ export class Webhooks extends ClientSDK { * @remarks * Create a new webhook */ - async create( - request: components.PostV1Webhooks, + async createWebhook( + request: components.CreateWebhook, options?: RequestOptions, ): Promise { - return unwrapAsync(webhooksCreate( + return unwrapAsync(webhooksCreateWebhook( + this, + request, + options, + )); + } + + /** + * List webhook deliveries + * + * @remarks + * Get webhook deliveries + */ + async listWebhookDeliveries( + request: operations.ListWebhookDeliveriesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(webhooksListWebhookDeliveries( this, request, options, @@ -54,11 +71,11 @@ export class Webhooks extends ClientSDK { * @remarks * Retrieve a specific webhook */ - async get( + async getWebhook( request: operations.GetWebhookRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(webhooksGet( + return unwrapAsync(webhooksGetWebhook( this, request, options, @@ -71,11 +88,11 @@ export class Webhooks extends ClientSDK { * @remarks * Delete a specific webhook */ - async delete( + async deleteWebhook( request: operations.DeleteWebhookRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(webhooksDelete( + return unwrapAsync(webhooksDeleteWebhook( this, request, options, @@ -88,25 +105,11 @@ export class Webhooks extends ClientSDK { * @remarks * Update a specific webhook */ - async update( + async updateWebhook( request: operations.UpdateWebhookRequest, options?: RequestOptions, ): Promise { - return unwrapAsync(webhooksUpdate( - this, - request, - options, - )); - } - - /** - * List webhook deliveries - */ - async listDeliveries( - request: operations.ListWebhookDeliveriesRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(webhooksListDeliveries( + return unwrapAsync(webhooksUpdateWebhook( this, request, options, diff --git a/src/sdk/zendesk.ts b/src/sdk/zendesk.ts deleted file mode 100644 index 789b8fec..00000000 --- a/src/sdk/zendesk.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { zendeskSearchTickets } from "../funcs/zendeskSearchTickets.js"; -import { ClientSDK, RequestOptions } from "../lib/sdks.js"; -import * as operations from "../models/operations/index.js"; -import { unwrapAsync } from "../types/fp.js"; - -export class Zendesk extends ClientSDK { - /** - * Search for Zendesk tickets - */ - async searchTickets( - request: operations.SearchZendeskTicketsRequest, - options?: RequestOptions, - ): Promise { - return unwrapAsync(zendeskSearchTickets( - this, - request, - options, - )); - } -} diff --git a/src/types/async.ts b/src/types/async.ts new file mode 100644 index 00000000..689dba5d --- /dev/null +++ b/src/types/async.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type APICall = + | { + status: "complete"; + request: Request; + response: Response; + } + | { + status: "request-error"; + request: Request; + response?: undefined; + } + | { + status: "invalid"; + request?: undefined; + response?: undefined; + }; + +export class APIPromise implements Promise { + readonly #promise: Promise<[T, APICall]>; + readonly #unwrapped: Promise; + + readonly [Symbol.toStringTag] = "APIPromise"; + + constructor(p: [T, APICall] | Promise<[T, APICall]>) { + this.#promise = p instanceof Promise ? p : Promise.resolve(p); + this.#unwrapped = + p instanceof Promise + ? this.#promise.then(([value]) => value) + : Promise.resolve(p[0]); + } + + then( + onfulfilled?: + | ((value: T) => TResult1 | PromiseLike) + | null + | undefined, + onrejected?: + | ((reason: any) => TResult2 | PromiseLike) + | null + | undefined, + ): Promise { + return this.#promise.then( + onfulfilled ? ([value]) => onfulfilled(value) : void 0, + onrejected, + ); + } + + catch( + onrejected?: + | ((reason: any) => TResult | PromiseLike) + | null + | undefined, + ): Promise { + return this.#unwrapped.catch(onrejected); + } + + finally(onfinally?: (() => void) | null | undefined): Promise { + return this.#unwrapped.finally(onfinally); + } + + $inspect(): Promise<[T, APICall]> { + return this.#promise; + } +}